Skip to content

fix: fix bug in how we apply NMS#417

Merged
raphael0202 merged 1 commit intodevelopfrom
fix-nms
Feb 4, 2026
Merged

fix: fix bug in how we apply NMS#417
raphael0202 merged 1 commit intodevelopfrom
fix-nms

Conversation

@raphael0202
Copy link
Copy Markdown
Contributor

@raphael0202 raphael0202 commented Feb 4, 2026

The bboxes we provided to NMSBoxes didn't have the right format: we provided the bounding box as (y_min, x_min, y_max, x_max) while NMSBoxes expects it as (x_min, y_min, width, height).

I fixed the issue, and:

  • added a nms parameter to enable/disable NMS for easier debugging
  • exported the NMS logic in an apply_nms function
  • added many unit tests

The bboxes we provided to NMSBoxes didn't have the right format:
we provided the bounding box as (y_min, x_min, y_max, x_max) while
NMSBoxes expects it as (x_min, y_min, width, height).

I fixed the issue, and:

- added a nms parameter to enable/disable NMS for easier debugging
- exported the NMS logic in an apply_nms function
- added many unit tests
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 4, 2026

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@raphael0202 raphael0202 merged commit 26d1361 into develop Feb 4, 2026
8 of 11 checks passed
@raphael0202 raphael0202 deleted the fix-nms branch February 4, 2026 10:47
raphael0202 added a commit to openfoodfacts/robotoff that referenced this pull request Feb 4, 2026
See openfoodfacts/openfoodfacts-python#417
for more information.

I also:

- added a `nms` parameter to the image prediction route for easier
debugging.
- fixed a bug when calling the bbox visualization function: we filtered
  out bboxes with confidence < 0.5, and only displayed up to 20 bboxes.
  We now display all bounding boxes.
raphael0202 added a commit to openfoodfacts/robotoff that referenced this pull request Feb 4, 2026
See openfoodfacts/openfoodfacts-python#417
for more information.

I also:

- added a `nms` parameter to the image prediction route for easier
debugging.
- fixed a bug when calling the bbox visualization function: we filtered
  out bboxes with confidence < 0.5, and only displayed up to 20 bboxes.
  We now display all bounding boxes.
raphael0202 added a commit to openfoodfacts/robotoff that referenced this pull request Feb 4, 2026
See openfoodfacts/openfoodfacts-python#417 for
more information.

I also:

- added a `nms` parameter to the image prediction route for easier
debugging.
- fixed a bug when calling the bbox visualization function: we filtered
out bboxes with confidence < 0.5, and only displayed up to 20 bboxes. We
now display all bounding boxes.
raphael0202 added a commit to openfoodfacts/open-prices that referenced this pull request Feb 4, 2026
Some bounding boxes were filtered out due to a bug in how we
called the NMS function.

See openfoodfacts/openfoodfacts-python#417
for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant