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
MMCV
Commits
864942be
Commit
864942be
authored
Jun 23, 2022
by
huanghaian
Committed by
zhouzaida
Jul 19, 2022
Browse files
fix resize error
parent
29135c22
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
2 deletions
+0
-2
mmcv/transforms/processing.py
mmcv/transforms/processing.py
+0
-1
tests/test_transforms/test_transforms_processing.py
tests/test_transforms/test_transforms_processing.py
+0
-1
No files found.
mmcv/transforms/processing.py
View file @
864942be
...
...
@@ -187,7 +187,6 @@ class Resize(BaseTransform):
backend
=
self
.
backend
)
results
[
'img'
]
=
img
results
[
'img_shape'
]
=
img
.
shape
[:
2
]
results
[
'scale'
]
=
img
.
shape
[:
2
][::
-
1
]
results
[
'scale_factor'
]
=
(
w_scale
,
h_scale
)
results
[
'keep_ratio'
]
=
self
.
keep_ratio
...
...
tests/test_transforms/test_transforms_processing.py
View file @
864942be
...
...
@@ -92,7 +92,6 @@ class TestResize:
transform
=
Resize
(
scale
=
(
2000
,
2000
),
keep_ratio
=
True
)
results
=
transform
(
copy
.
deepcopy
(
data_info
))
assert
results
[
'img'
].
shape
[:
2
]
==
(
2000
,
1200
)
assert
results
[
'scale'
]
==
(
1200
,
2000
)
assert
results
[
'scale_factor'
]
==
(
1200
/
800
,
2000
/
1333
)
# test resize_bboxes/seg/kps
...
...
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