mirror of https://github.com/open-mmlab/mmcv.git
Force copy of input img (#297)
parent
02f2573a29
commit
fa470ebcef
|
@ -14,7 +14,7 @@ def imnormalize(img, mean, std, to_rgb=True):
|
|||
Returns:
|
||||
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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue