Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: making changes in importer.py and annotate.py #1518

Closed

Conversation

prasanna7codes
Copy link

What

-Implemented the Image Orientation Auto-Rotation feature.
ImageOrientationImporter class parses the prediction.data JSON to determine the required rotation based on word orientation.
-ImageOrientationAnnotator class rotates the image if needed based on the rotation angle from the importer.
Integrated logic to check if the predicted orientation is not "up" and confidence is >= 95% before rotating.

Screenshot

Fixes bug(s)

  • #Fixed issue with incorrectly rotated images from contributors.
    #Fixed issue where images were not rotated automatically if the predicted orientation was incorrect.

Part of

@prasanna7codes prasanna7codes requested a review from a team as a code owner January 31, 2025 19:06
@prasanna7codes prasanna7codes changed the title making changes in importer.py and annotate.py fix: making changes in importer.py and annotate.py Jan 31, 2025
@alexgarel
Copy link
Member

@prasanna7codes thanks a lot for this contribution.

Sorry because it's a long time since I worked on robotoff, and main robotoff contributor is AFK for some time !

That said I'm not sure the way you wrote it is not the way robotoff work.

The importer should generate an insight, which if auto applied, will generate the annotation.
See https://openfoodfacts.github.io/robotoff/explanations/predictions/ and https://openfoodfacts.github.io/robotoff/how-to-guides/add-predictor/

Please take a look how it works for the others.

Also a test would be appreciated if you can.

You can come on the slack.openfoodfacts.org in #robotoff to discuss it if needed.

@prasanna7codes prasanna7codes closed this by deleting the head repository Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants