-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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 image post-processing for OWLv2 #30686
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for updating our example, @jla524!
This is something which should really be handled within the image processor of the model itself, specifically the rescaling of the box dimensions
…to fix_owlv2_example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great - thanks for taking the time to update the example as well!
Technically this is a breaking change. However, as many users have highlighted this confusing behaviour and it should always have been done in the post-processing method, I think it's OK to add directly.
Final request is to add a test here so that we check the images and boxes are rescaled as expected in the post processing method. Once that's done I think we're good to merge!
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Added a test for the resize. I'm not sure if this is the right approach. Let me know what you think! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great - thanks for iterating on this!
For the test, have you visualized the bounding boxes to confirm they are sensible? It would be good to check this + bboxes on the examples to make sure everything is a-ok before merge. Otherwise looks good to go!
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Yes, the boxes look reasonable. One thing to note is that the box on the right is slightly out of bound. The box has a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing, adding tests and verifying the outputs!
Hi @jla524 Thank you for the fix. Our doctesting for this model now has one failure. See below.
(on a T4 GPU machine) I think it's expected? Would you like to take a look to confirm and open a pull request to update
|
@ydshieh Yes, I'll send in a PR to fix this. |
What does this PR do?
Fixes #30131 (issue)
Who can review?
@NielsRogge @nisyad-ms