Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
e405f3c3
Unverified
Commit
e405f3c3
authored
Feb 16, 2023
by
Nicolas Hug
Committed by
GitHub
Feb 16, 2023
Browse files
Make rotate_image_tensor's results fully BC with v1 (#7271)
parent
8f198e53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
torchvision/transforms/v2/functional/_geometry.py
torchvision/transforms/v2/functional/_geometry.py
+3
-3
No files found.
torchvision/transforms/v2/functional/_geometry.py
View file @
e405f3c3
...
...
@@ -832,10 +832,10 @@ def rotate_image_tensor(
center_f
=
[
0.0
,
0.0
]
if
center
is
not
None
:
if
expand
:
# TODO: Do we actually want to warn, or just document this?
warnings
.
warn
(
"The provided center argument has no effect on the result if expand is True"
)
else
:
# Center values should be in pixel coordinates but translated such that (0, 0) corresponds to image center.
center_f
=
[(
c
-
s
*
0.5
)
for
c
,
s
in
zip
(
center
,
[
width
,
height
])]
# Center values should be in pixel coordinates but translated such that (0, 0) corresponds to image center.
center_f
=
[(
c
-
s
*
0.5
)
for
c
,
s
in
zip
(
center
,
[
width
,
height
])]
# due to current incoherence of rotation angle direction between affine and rotate implementations
# we need to set -angle.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment