Skip to content

Commit

Permalink
fix: nms tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Smirkey committed Jan 3, 2024
1 parent 13e23f1 commit fe2b479
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions powerboxesrs/src/nms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ pub fn nms<N>(
where
N: Num + PartialOrd + ToPrimitive + Copy,
{
let mut above_score_threshold: Vec<usize> = (1..scores.len()).collect();
if score_threshold < utils::EPS {
let mut above_score_threshold: Vec<usize> = (0..scores.len()).collect();
if score_threshold > utils::EPS {
// filter out boxes lower than score threshold
above_score_threshold = scores
.iter()
Expand Down Expand Up @@ -161,8 +161,8 @@ pub fn rtree_nms<N>(
where
N: RTreeNum + ToPrimitive + Send + Sync,
{
let mut above_score_threshold: Vec<usize> = (1..scores.len()).collect();
if score_threshold < utils::EPS {
let mut above_score_threshold: Vec<usize> = (0..scores.len()).collect();
if score_threshold > utils::EPS {
// filter out boxes lower than score threshold
above_score_threshold = scores
.iter()
Expand Down

0 comments on commit fe2b479

Please sign in to comment.