Add ImageProcessorFast to Efficientnet processor #37094
Open
Yann-CV wants to merge 14 commits intohuggingface:mainfrom
Open
Add ImageProcessorFast to Efficientnet processor #37094Yann-CV wants to merge 14 commits intohuggingface:mainfrom
Yann-CV wants to merge 14 commits intohuggingface:mainfrom
Conversation
Contributor
Author
|
I am spotting an inconsistency between slow (in efficientnet) and fast resize (base class): is returning You can obtain quite a gap in mean value for the same interpolation mode. |
Contributor
Author
|
All other method are outputing the same result (normalize and rescale) between slow and fast |
Contributor
Author
|
using bilinear resizing is making the test pass (too much difference between PIL and torchvision with nearest) |
Contributor
Author
|
@ydshieh @yonigozlan the test are failing on test non related to this pull request. |
5 tasks
81 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Following #36978:
This pull request introduces a new fast image processor for EfficientNet models and integrates it into the existing codebase. The changes include updates to documentation, initialization files, and test cases to support the new
EfficientNetImageProcessorFast.Integration of
EfficientNetImageProcessorFast:docs/source/en/model_doc/efficientnet.md: Added documentation forEfficientNetImageProcessorFast.src/transformers/__init__.py: IncludedEfficientNetImageProcessorFastin the import structure and import statements. [1] [2]src/transformers/models/auto/image_processing_auto.py: Updated the image processor mapping to includeEfficientNetImageProcessorFast. [1] [2]src/transformers/models/efficientnet/__init__.py: Added import forEfficientNetImageProcessorFast.Implementation of
EfficientNetImageProcessorFast:src/transformers/models/efficientnet/image_processing_efficientnet_fast.py: Added the implementation of theEfficientNetImageProcessorFastclass, including methods for preprocessing, rescaling, and normalizing images.Testing and Dummy Objects:
src/transformers/utils/dummy_torchvision_objects.py: Added a dummy class forEfficientNetImageProcessorFastto handle cases wheretorchvisionis not available.tests/models/efficientnet/test_image_processing_efficientnet.py: Updated test cases to includeEfficientNetImageProcessorFastand ensure it is tested alongside the standardEfficientNetImageProcessor. [1] [2] [3]Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.