Skip to content

Add FastImageProcessor for EfficientNet#37119

Open
chewyuenrachael wants to merge 3 commits intohuggingface:mainfrom
chewyuenrachael:add-fast-image-processor-efficientnet
Open

Add FastImageProcessor for EfficientNet#37119
chewyuenrachael wants to merge 3 commits intohuggingface:mainfrom
chewyuenrachael:add-fast-image-processor-efficientnet

Conversation

@chewyuenrachael
Copy link
Copy Markdown

Add FastImageProcessor for EfficientNet

What does this PR do?

This PR implements a FastImageProcessor for the EfficientNet model using BaseImageProcessorFast.

  • Added EfficientNetImageProcessorFast to support fast GPU-based preprocessing using PyTorch/Torchvision ops
  • Verified default values (e.g., size, crop_size, normalization) match the existing slow processor
  • Cleaned out unused attributes (default_to_square, do_convert_rgb) after comparing both implementations
  • Updated the test file test_image_processing_efficientnet.py to support both fast and slow processors using image_processor_list pattern
  • Verified that all relevant tests pass with RUN_SLOW=1

This PR contributes to [#36978](#36978)

Before submitting

Who can review?

This contribution affects vision models.
Tagging: @qubvel @amyeroberts for review.

Thanks in advance! 🤗

@github-actions github-actions Bot marked this pull request as draft March 31, 2025 00:26
@github-actions
Copy link
Copy Markdown
Contributor

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.

@chewyuenrachael chewyuenrachael marked this pull request as ready for review March 31, 2025 00:31
@github-actions github-actions Bot requested review from ydshieh and yonigozlan March 31, 2025 00:31
@chewyuenrachael chewyuenrachael changed the title Add FastImageProcessor for EfficientNet and update test suite Add FastImageProcessor for EfficientNet Mar 31, 2025
@chewyuenrachael chewyuenrachael force-pushed the add-fast-image-processor-efficientnet branch from c5916d3 to 03faa4e Compare April 16, 2025 17:50
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.

1 participant