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

deinterlacing PNG images with read_image #4268

Merged
merged 4 commits into from
Aug 12, 2021
Merged

Conversation

vmoens
Copy link
Contributor

@vmoens vmoens commented Aug 10, 2021

Interlaced images is not supported bytorchvision.io.read_image (precisely by torchvision/csrc/io/image/cpu/decode_png.cpp).
I implemented a solution to deinterlace interlaced PNG images when needed using libpng.

Closes #4252

@vmoens vmoens requested a review from fmassa August 10, 2021 14:55
@vmoens vmoens marked this pull request as ready for review August 10, 2021 15:57
@vmoens vmoens changed the title WIP deinterlacing PNG images with read_image deinterlacing PNG images with read_image Aug 11, 2021
Copy link
Member

@fmassa fmassa 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 the PR!

Can you add tests (with a dummy interlaced image and its corresponding deinterlaced) so that we can test this corner case?

Copy link
Member

@fmassa fmassa 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!

@vmoens vmoens merged commit e1f22ed into pytorch:master Aug 12, 2021
facebook-github-bot pushed a commit that referenced this pull request Aug 20, 2021
Summary:
* interlaced png images

Reviewed By: NicolasHug

Differential Revision: D30417198

fbshipit-source-id: fe5ba53b6e668aa55e2e6d4702d1be559f848b57

Co-authored-by: Vincent Moens <vmoens@fb.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PNG images not being deinterlaced by read_image
3 participants