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
fa470ebc
Unverified
Commit
fa470ebc
authored
May 24, 2020
by
Miguel Mendez
Committed by
GitHub
May 24, 2020
Browse files
Force copy of input img (#297)
parent
02f2573a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mmcv/image/photometric.py
mmcv/image/photometric.py
+1
-1
No files found.
mmcv/image/photometric.py
View file @
fa470ebc
...
@@ -14,7 +14,7 @@ def imnormalize(img, mean, std, to_rgb=True):
...
@@ -14,7 +14,7 @@ def imnormalize(img, mean, std, to_rgb=True):
Returns:
Returns:
ndarray: The normalized image.
ndarray: The normalized image.
"""
"""
img
=
np
.
float32
(
img
)
if
img
.
dtype
!=
np
.
float32
else
img
.
copy
(
)
img
=
img
.
copy
().
astype
(
np
.
float32
)
return
imnormalize_
(
img
,
mean
,
std
,
to_rgb
)
return
imnormalize_
(
img
,
mean
,
std
,
to_rgb
)
...
...
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