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

Add write_file #2765

Merged
merged 3 commits into from
Oct 6, 2020
Merged

Add write_file #2765

merged 3 commits into from
Oct 6, 2020

Conversation

fmassa
Copy link
Member

@fmassa fmassa commented Oct 6, 2020

This PR implements a torchscript-compatible way of saving 1d uint8 tensors into a file.

In a follow-up PR, I'll probably remove or refactor write_png / write_jpeg to rely on write_file

@fmassa fmassa requested a review from andfoy October 6, 2020 16:24
Copy link
Contributor

@andfoy andfoy left a comment

Choose a reason for hiding this comment

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

LGTM!

@codecov
Copy link

codecov bot commented Oct 6, 2020

Codecov Report

Merging #2765 into master will increase coverage by 1.74%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2765      +/-   ##
==========================================
+ Coverage   71.38%   73.13%   +1.74%     
==========================================
  Files          96       96              
  Lines        8311     8319       +8     
  Branches     1293     1293              
==========================================
+ Hits         5933     6084     +151     
+ Misses       1967     1838     -129     
+ Partials      411      397      -14     
Impacted Files Coverage Δ
torchvision/io/image.py 86.53% <100.00%> (+2.44%) ⬆️
torchvision/io/video.py 69.82% <0.00%> (+1.18%) ⬆️
torchvision/ops/deform_conv.py 70.00% <0.00%> (+3.33%) ⬆️
torchvision/models/detection/rpn.py 93.16% <0.00%> (+4.70%) ⬆️
torchvision/models/detection/roi_heads.py 82.34% <0.00%> (+5.10%) ⬆️
torchvision/datasets/video_utils.py 84.84% <0.00%> (+7.27%) ⬆️
torchvision/ops/boxes.py 93.25% <0.00%> (+7.86%) ⬆️
torchvision/io/_video_opt.py 47.50% <0.00%> (+8.75%) ⬆️
torchvision/__init__.py 78.12% <0.00%> (+12.50%) ⬆️
... and 4 more

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 635406c...d1b9431. Read the comment docs.

@fmassa fmassa merged commit 6e639d3 into pytorch:master Oct 6, 2020
@fmassa fmassa deleted the write_file branch October 6, 2020 18:40
bryant1410 pushed a commit to bryant1410/vision-1 that referenced this pull request Nov 22, 2020
* Add write_file

* Fix lint
vfdev-5 pushed a commit to Quansight/vision that referenced this pull request Dec 4, 2020
* Add write_file

* Fix lint
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.

2 participants