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

1 次查看(过去 30 天)
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.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Feature Detection and Extraction 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by