fix: fix bug in how we apply NMS#417
Merged
raphael0202 merged 1 commit intodevelopfrom Feb 4, 2026
Merged
Conversation
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
|
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




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)whileNMSBoxesexpects it as(x_min, y_min, width, height).I fixed the issue, and:
nmsparameter to enable/disable NMS for easier debuggingapply_nmsfunction