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
29135c22
Commit
29135c22
authored
Jun 22, 2022
by
zhengmiao
Committed by
zhouzaida
Jul 19, 2022
Browse files
[Fix] Nearest interpolation to resize seg map
parent
39eb4ec6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
mmcv/transforms/processing.py
mmcv/transforms/processing.py
+3
-3
No files found.
mmcv/transforms/processing.py
View file @
29135c22
...
...
@@ -210,13 +210,13 @@ class Resize(BaseTransform):
gt_seg
=
mmcv
.
imrescale
(
results
[
'gt_seg_map'
],
results
[
'scale'
],
interpolation
=
self
.
interpolation
,
interpolation
=
'nearest'
,
backend
=
self
.
backend
)
else
:
gt_seg
=
mmcv
.
imresize
(
results
[
'gt_seg_map'
],
results
[
'scale'
],
interpolation
=
self
.
interpolation
,
interpolation
=
'nearest'
,
backend
=
self
.
backend
)
results
[
'gt_seg_map'
]
=
gt_seg
...
...
@@ -938,7 +938,7 @@ class RandomChoiceResize(BaseTransform):
assert
mmcv
.
is_list_of
(
self
.
scales
,
tuple
)
self
.
resize_cfg
=
dict
(
type
=
resize_type
,
**
resize_kwargs
)
# create a empty Re
i
size object
# create a empty Resize object
self
.
resize
=
TRANSFORMS
.
build
({
'scale'
:
0
,
**
self
.
resize_cfg
})
@
cache_randomness
...
...
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