CNN model evaluation, boxsuppress function how to reconstruct my own mask?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Feature Detection and Extraction finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!