Skip to content

Add Fast owlvit Processor#37164

Merged
yonigozlan merged 6 commits intohuggingface:mainfrom
keetrap:fast_owlvit
Apr 14, 2025
Merged

Add Fast owlvit Processor#37164
yonigozlan merged 6 commits intohuggingface:mainfrom
keetrap:fast_owlvit

Conversation

@keetrap
Copy link
Copy Markdown
Contributor

@keetrap keetrap commented Apr 1, 2025

related #36978
cc @yonigozlan

@github-actions github-actions Bot marked this pull request as draft April 1, 2025 06:37
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 1, 2025

Hi 👋, thank you for opening this pull request! The pull request is converted to draft by default. The CI will be paused while the PR is in draft mode. When it is ready for review, please click the Ready for review button (at the bottom of the PR page). This will assign reviewers and trigger CI.

@keetrap keetrap changed the title Fast owlvit Add Fast owlvit Processor Apr 1, 2025
@keetrap keetrap marked this pull request as ready for review April 1, 2025 06:42
@github-actions github-actions Bot requested review from ydshieh and yonigozlan April 1, 2025 06:42
Copy link
Copy Markdown
Member

@yonigozlan yonigozlan 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 contributing @keetrap ! Just a few things to change, otherwise LGTM

Comment thread src/transformers/models/owlvit/image_processing_owlvit_fast.py Outdated
Comment thread src/transformers/models/owlvit/image_processing_owlvit_fast.py Outdated
Comment thread src/transformers/models/owlvit/image_processing_owlvit_fast.py Outdated
Comment thread src/transformers/models/owlvit/image_processing_owlvit_fast.py Outdated
image_mean = OPENAI_CLIP_MEAN
image_std = OPENAI_CLIP_STD
size = {"height": 768, "width": 768}
default_to_square = None
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be default_to_square = True
It might also fix the issue with test_image_processor_from_dict_with_kwargs - AssertionError: {'shortest_edge': 42} != {'height': 42, 'width': 42}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks. Changes done

Copy link
Copy Markdown
Member

@yonigozlan yonigozlan 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 iterating @keetrap ! LGTM

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

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.

@yonigozlan yonigozlan merged commit 20ceaca into huggingface:main Apr 14, 2025
20 checks passed
cyr0930 pushed a commit to cyr0930/transformers that referenced this pull request Apr 18, 2025
* Add Fast Owlvit Processor

* Update image_processing_owlvit_fast.py

* Update image_processing_owlvit_fast.py

---------

Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request May 14, 2025
* Add Fast Owlvit Processor

* Update image_processing_owlvit_fast.py

* Update image_processing_owlvit_fast.py

---------

Co-authored-by: Yoni Gozlan <74535834+yonigozlan@users.noreply.github.com>
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.

3 participants