-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Added a flag 'process_exif: bool = False' to 'read_image' #8109
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8109
Note: Links to docs will display an error until the docs builds have been completed. This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Hi @Zekrom-7780! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
Torch does not have such functionality yet. However, the whole point of vision/torchvision/csrc/io/image/cpu/decode_png.cpp Lines 22 to 25 in 15c166a
and
I don't know if |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
@pmeier ,I looked at So, sould i completely erase the changes that I made here? |
Mostly yes I'm afraid. To avoid this in the future, please talk to us to get guidance if needed before you start implementing something
What about We have similar situation for JPEG already:
vision/torchvision/io/image.py Lines 132 to 134 in 7b4681a
that allows decoding on GPU, which is not available for vision/torchvision/io/image.py Line 70 in 7b4681a
If you want to use the vision/torchvision/io/image.py Line 215 in 7b4681a
vision/torchvision/io/image.py Line 240 in 7b4681a
Thoughts @NicolasHug? |
I think we should prioritize support for jpeg over png (it's more common, and this is what the original feature request was using. As for where we expose the new parameter, exposing it at the highest level i.e. |
Thank you soo much for your comments, I'll start working on only the |
Thanks for the PR @Zekrom-7780 , native C++ support for exif was added in (#8303, #8279, #8342, #8302) |
Description
This pull request addresses issue #7977 by introducing a new feature to read and display EXIF metadata from images using the PyTorch Vision library.
Changes Made
PIL
to do thatprocess_exif
and set it's default value toFalse
.True
, then the user can see the EXIF details of the image, and that is present in the functionprocess_exif_metadata
.process_exif
does.ufmt
Reviewers
cc @pmeier @NicolasHug
P.S.
Sorry if this PR is written unprofessionally, and I didn't know if I had to add unit-tests for it, so I haven't added them here.