Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

fix for sorting boxes in nonMaxSuppression in ObjectDetection App #309

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ public int compare(Result o1, Result o2) {
return o1.score.compareTo(o2.score);
}
});


// Collections.sort() sorts in ascending order
// reverse array to obtain boxes arranged in descending order
Collections.reverse(boxes);

ArrayList<Result> selected = new ArrayList<>();
boolean[] active = new boolean[boxes.size()];
Arrays.fill(active, true);
Expand Down