mirror of
https://github.com/iperov/DeepFaceLab.git
synced 2025-07-06 21:12:07 -07:00
SampleProcessor now uses CUBIC interpolation (was LANCSOZ4) in order to reduce CPU usage
This commit is contained in:
parent
541d6e1cc9
commit
41abda42d2
2 changed files with 4 additions and 4 deletions
|
@ -167,9 +167,9 @@ class SampleProcessor(object):
|
|||
if is_face_sample and target_face_type != -1:
|
||||
if target_face_type > sample.face_type:
|
||||
raise Exception ('sample %s type %s does not match model requirement %s. Consider extract necessary type of faces.' % (sample.filename, sample.face_type, target_face_type) )
|
||||
img = cv2.warpAffine( img, LandmarksProcessor.get_transform_mat (sample.landmarks, size, target_face_type), (size,size), flags=cv2.INTER_LANCZOS4 )
|
||||
img = cv2.warpAffine( img, LandmarksProcessor.get_transform_mat (sample.landmarks, size, target_face_type), (size,size), flags=cv2.INTER_CUBIC )
|
||||
else:
|
||||
img = cv2.resize( img, (size,size), cv2.INTER_LANCZOS4 )
|
||||
img = cv2.resize( img, (size,size), cv2.INTER_CUBIC )
|
||||
|
||||
if random_sub_size != 0:
|
||||
sub_size = size - random_sub_size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue