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

PR: Read JPEG images directly #2388

Merged
merged 126 commits into from
Jul 8, 2020
Merged

PR: Read JPEG images directly #2388

merged 126 commits into from
Jul 8, 2020

Conversation

andfoy
Copy link
Contributor

@andfoy andfoy commented Jul 3, 2020

No description provided.

@andfoy andfoy changed the title Read JPEG images directly PR: Read JPEG images directly Jul 3, 2020
@codecov
Copy link

codecov bot commented Jul 7, 2020

Codecov Report

Merging #2388 into master will increase coverage by 1.10%.
The diff coverage is 73.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2388      +/-   ##
==========================================
+ Coverage   70.68%   71.79%   +1.10%     
==========================================
  Files          94       94              
  Lines        7905     8254     +349     
  Branches     1245     1371     +126     
==========================================
+ Hits         5588     5926     +338     
+ Misses       1932     1931       -1     
- Partials      385      397      +12     
Impacted Files Coverage Δ
torchvision/io/__init__.py 100.00% <ø> (ø)
torchvision/io/image.py 71.73% <73.33%> (+0.77%) ⬆️
torchvision/transforms/functional.py 83.18% <0.00%> (+2.26%) ⬆️
torchvision/transforms/transforms.py 83.02% <0.00%> (+6.98%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b80465...2ace447. Read the comment docs.

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 for the PR!

I think this is good to merge, I only have a couple of comments (tests and .accessor.

Also, I wonder if we could in a follow-up PR maybe look into some small optimizations / improvements that I pointed out?

torchvision/csrc/cpu/image/readjpeg_cpu.cpp Outdated Show resolved Hide resolved
torchvision/csrc/cpu/image/readjpeg_cpu.cpp Outdated Show resolved Hide resolved
Comment on lines +16 to +17
const static JOCTET EOI_BUFFER[1] = {JPEG_EOI};
char jpegLastErrorMsg[JMSG_LENGTH_MAX];
Copy link
Member

Choose a reason for hiding this comment

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

for a next PR: it would be great if there was a way of avoiding having those globals.

test/test_image.py Outdated Show resolved Hide resolved
test/test_image.py Outdated Show resolved Hide resolved
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!

@fmassa fmassa merged commit 4246abc into pytorch:master Jul 8, 2020
@andfoy andfoy deleted the add_jpeg branch July 8, 2020 18:00
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.

3 participants