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

[YOLOS] Fix - return padded annotations #29300

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

amyeroberts
Copy link
Collaborator

What does this PR do?

Yolos image processor wasn't returning annotations after padding, this fixes that as well as some small adjustments:

  • Removes slow markers (tests aren't slow and ensures failures are caught)
  • Fixes the failing slow tests
  • Some small nits to make detr & yolos aligned

This was a breaking change introduced in #28363 cc @ArthurZucker as I think this should be included in a patch

Fixes #29239

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

@amyeroberts amyeroberts changed the title Fix yolos processing [YOLOS] Fix - return padded annotations Feb 26, 2024
update_bboxes=do_convert_annotations,
return_tensors=return_tensors,
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just reordering as return_tensors is normally returned last and it makes it easier to compare models when all arguments are in the same order

@HuggingFaceDocBuilderDev

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.

Copy link
Collaborator

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing

@amyeroberts amyeroberts merged commit f1b1379 into huggingface:main Mar 1, 2024
18 checks passed
@amyeroberts amyeroberts deleted the fix-yolos-image-processor branch March 1, 2024 09:42
itazap pushed a commit that referenced this pull request May 14, 2024
* Fix yolos processing

* Add back slow marker - protects for pycocotools in slow

* Slow decorator goes above copied from header
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

YolosImageProcessor.preprocess drops annotations when padding
3 participants