fix: interpolation maybe be 0
parent
1c01d7a74e
commit
0dccfb917d
|
@ -79,7 +79,7 @@ class UnifiedResize(object):
|
|||
if isinstance(interpolation, str):
|
||||
interpolation = _cv2_interp_from_str[interpolation.lower()]
|
||||
# compatible with opencv < version 4.4.0
|
||||
elif not interpolation:
|
||||
elif interpolation is None:
|
||||
interpolation = cv2.INTER_LINEAR
|
||||
self.resize_func = partial(cv2.resize, interpolation=interpolation)
|
||||
elif backend.lower() == "pil":
|
||||
|
|
|
@ -60,7 +60,7 @@ class UnifiedResize(object):
|
|||
if isinstance(interpolation, str):
|
||||
interpolation = _cv2_interp_from_str[interpolation.lower()]
|
||||
# compatible with opencv < version 4.4.0
|
||||
elif not interpolation:
|
||||
elif interpolation is None:
|
||||
interpolation = cv2.INTER_LINEAR
|
||||
self.resize_func = partial(cv2.resize, interpolation=interpolation)
|
||||
elif backend.lower() == "pil":
|
||||
|
|
Loading…
Reference in New Issue