Skip to content

Commit

Permalink
fix: stop using utils::EPS in NMS
Browse files Browse the repository at this point in the history
  • Loading branch information
Smirkey committed Apr 29, 2024
1 parent 7d2e5e0 commit 37f8ed4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions powerboxesrs/src/nms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ where
let intersection: N = area(x, y, xx, yy);
let area2: N = area(b2x, b2y, b2xx, b2yy);
let union: N = area1 + area2 - intersection;
let iou: f64 = intersection.to_f64().unwrap() / (union.to_f64().unwrap() + utils::EPS);
let iou: f64 = intersection.to_f64().unwrap() / union.to_f64().unwrap();
if iou > iou_threshold {
suppress[j] = true;
}
Expand Down Expand Up @@ -229,7 +229,7 @@ where
let intersection: N = area(x, y, xx, yy);
let area2: N = area(b2x, b2y, b2xx, b2yy);
let union: N = area1 + area2 - intersection;
let iou: f64 = intersection.to_f64().unwrap() / (union.to_f64().unwrap() + utils::EPS);
let iou: f64 = intersection.to_f64().unwrap() / union.to_f64().unwrap();
if iou > iou_threshold_f64 {
suppress[idx_j] = true;
}
Expand Down

0 comments on commit 37f8ed4

Please sign in to comment.