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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Feature Detection and Extraction에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!