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

Unified inputs for T.RandomAffine transformation (2292) #2478

Merged
merged 6 commits into from
Jul 29, 2020

Conversation

vfdev-5
Copy link
Collaborator

@vfdev-5 vfdev-5 commented Jul 16, 2020

Related to #2292

Description:

  • Unified inputs for T.RandomAffine transformation
  • Added tests checking same result for default and scripted results
  • Updated docs

Additionally:

  • Updated types for RandomResizedCrop to accept both types tuples and lists (scripted and non-scripted versions)
  • improved tests for Resized Crop

@vfdev-5 vfdev-5 mentioned this pull request Jul 16, 2020
16 tasks
@vfdev-5 vfdev-5 requested a review from fmassa July 16, 2020 17:48
@codecov
Copy link

codecov bot commented Jul 21, 2020

Codecov Report

Merging #2478 into master will increase coverage by 2.64%.
The diff coverage is 57.14%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2478      +/-   ##
==========================================
+ Coverage   68.82%   71.46%   +2.64%     
==========================================
  Files          94       94              
  Lines        7974     8320     +346     
  Branches     1267     1420     +153     
==========================================
+ Hits         5488     5946     +458     
+ Misses       2082     1947     -135     
- Partials      404      427      +23     
Impacted Files Coverage Δ
torchvision/transforms/functional.py 84.32% <ø> (+3.75%) ⬆️
torchvision/transforms/transforms.py 76.19% <57.14%> (+0.14%) ⬆️
torchvision/io/video.py 69.82% <0.00%> (+1.18%) ⬆️
torchvision/models/detection/rpn.py 93.13% <0.00%> (+2.57%) ⬆️
torchvision/transforms/functional_pil.py 67.94% <0.00%> (+4.85%) ⬆️
torchvision/models/detection/roi_heads.py 82.34% <0.00%> (+5.10%) ⬆️
torchvision/__init__.py 78.12% <0.00%> (+6.25%) ⬆️
torchvision/datasets/video_utils.py 75.75% <0.00%> (+7.27%) ⬆️
... and 6 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 ab73b44...9383050. 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!

@@ -734,14 +733,14 @@ def __init__(self, size, scale=(0.08, 1.0), ratio=(3. / 4., 4. / 3.), interpolat

@staticmethod
def get_params(
img: Tensor, scale: Tuple[float, float], ratio: Tuple[float, float]
img: Tensor, scale: List[float], ratio: List[float]
Copy link
Member

Choose a reason for hiding this comment

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

The changes in this function seem unrelated to the whole goal of the PR.

For the next time, can you please factor them out in a different PR?

@fmassa fmassa merged commit 9bd25d0 into pytorch:master Jul 29, 2020
@vfdev-5 vfdev-5 deleted the vfdev-5/issue-2292-t-random-affine branch August 3, 2020 06:56
bryant1410 pushed a commit to bryant1410/vision-1 that referenced this pull request Nov 22, 2020
* [WIP] Unified input for T.RandomAffine

* Unified inputs for T.RandomAffine transformation

* Update transforms.py

* Updated docs of F.affine fillcolor

* Update transforms.py
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