mirror of
https://github.com/zebrajr/faceswap.git
synced 2025-12-06 00:20:09 +01:00
bugfix: CV2 error on previews
This commit is contained in:
parent
66845ea5f0
commit
0837273d46
|
|
@ -665,7 +665,8 @@ class _Samples(): # pylint:disable=too-few-public-methods
|
|||
"""
|
||||
scale = target_size / sample.shape[1]
|
||||
if scale == 1.0:
|
||||
return sample
|
||||
# cv2 complains if we don't do this :/
|
||||
return np.ascontiguousarray(sample)
|
||||
logger.debug("Resizing sample: (side: '%s', sample.shape: %s, target_size: %s, scale: %s)",
|
||||
side, sample.shape, target_size, scale)
|
||||
interpn = cv2.INTER_CUBIC if scale > 1.0 else cv2.INTER_AREA
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user