fix: Add bounding box to nutrition extraction#1545
fix: Add bounding box to nutrition extraction#1545abderhman487 wants to merge 1 commit intoopenfoodfacts:mainfrom
Conversation
|
@abderhman487 so sorry, I only see this PR now, I will try to review it soon ! |
|
@alexgarel @raphael0202 Any updates? |
|
Hello @abderhman487, |
|
@abderhman487 could you solve the small merge conflict so that @raphael0202 can review afterwards ? |
|
I'm sorry it took me so long to review your PR. We have an object detection model to detect the position of the nutrition table, and we can use the prediction of this model to provide the bounding box of the nutrition table. |
What
Implementation Details
NutrientPredictionandNutritionExtractionPredictionclasses to include bounding box informationcompute_bounding_boxfunction to calculate the overall bounding box from individual word positionsNutrientExtractionImporterto include bounding box data in generated insightsNutrientExtractionAnnotatorHow This Improves User Experience
This enhancement significantly improves the visualization of nutrition extraction results during validation. Previously, the bounding box was only used internally for cropping, but was not exposed in the insight data. Now, users validating nutrition insights can see exactly which part of the image was analyzed, and even propose corrections to the bounding box if needed.
Fixes
Add bounding box to nutrition extraction #1539