change the default interpolation of pil from `NEAREST` to `BILINEAR` (same to cv2 backend)
parent
00a2863414
commit
3b8b39644f
|
@ -100,6 +100,8 @@ class UnifiedResize(object):
|
|||
elif backend.lower() == "pil":
|
||||
if isinstance(interpolation, str):
|
||||
interpolation = _pil_interp_from_str[interpolation.lower()]
|
||||
elif interpolation is None:
|
||||
interpolation = Image.BILINEAR
|
||||
self.resize_func = partial(
|
||||
_pil_resize, resample=interpolation, return_numpy=return_numpy)
|
||||
else:
|
||||
|
|
|
@ -99,6 +99,8 @@ class UnifiedResize(object):
|
|||
elif backend.lower() == "pil":
|
||||
if isinstance(interpolation, str):
|
||||
interpolation = _pil_interp_from_str[interpolation.lower()]
|
||||
elif interpolation is None:
|
||||
interpolation = Image.BILINEAR
|
||||
self.resize_func = partial(
|
||||
_pil_resize, resample=interpolation, return_numpy=return_numpy)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue