CNN model evaluation, boxsuppress function how to reconstruct my own mask?

1 view (last 30 days)
Hello, I am working on object detection. I found the code here:
And I reached the model evaluation step.
I am having a problem with the matrix dimensions.
They use 64*64 image box and a
mask = [-1 0 1 0 ; 0 -1 0 1]
when I use 50*100 image box what should my mask be?
The code is :
function keep = boxsuppress(boxes, scores, threshold)
% BOXSUPPRESS Box non-maxima suprression
% KEEP = BOXSUPPRESS(BOXES, SCORES, THRESHOLD)
;
scores(any([-1 0 1 0 ; 0 -1 0 1] * boxes < 0)) = -inf ;
keep = false(1, size(boxes,2)) ;
while true
[score, best] = max(scores) ;
if score == -inf, break ; end
keep(best) = true ;
remove = boxinclusion(boxes(:,best), boxes, 'pascalFormat', true) >= threshold ;
scores(remove) = -inf ;
scores(best) = -inf ; % `best` is not in `remove` if threshold > 1
end
end
I tried to use .* rather than * but it still didn't work.

Answers (0)

Categories

Find more on Recognition, Object Detection, and Semantic Segmentation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!