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

Enable crop_center method to handle (W, H, C) images #17626

Merged
merged 3 commits into from
Jun 10, 2022

Conversation

alaradirik
Copy link
Contributor

  • Enables crop_center image utility method to handle (W, H, C) and (C, W, H) images
  • Added support to expand 2D / (W, H) image arrays to 3D / (C, W, H) shape

@alaradirik alaradirik requested a review from sgugger June 9, 2022 13:05
@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 9, 2022

The documentation is not available anymore as the PR was closed or merged.

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thanks a lot for fixing this! Also pinging @NielsRogge for review :-)

src/transformers/image_utils.py Show resolved Hide resolved
src/transformers/image_utils.py Outdated Show resolved Hide resolved
@alaradirik alaradirik merged commit 49becba into huggingface:main Jun 10, 2022
elusenji pushed a commit to elusenji/transformers that referenced this pull request Jun 12, 2022
* enable crop_center method to handle (W, H, C) images

* minor style and comment edits
amyeroberts pushed a commit to amyeroberts/transformers that referenced this pull request Jun 16, 2022
* enable crop_center method to handle (W, H, C) images

* minor style and comment edits
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.

4 participants