KenjieDec commited on
Commit
3623a2c
1 Parent(s): ae09014
Files changed (1) hide show
  1. face_enhancement.py +3 -3
face_enhancement.py CHANGED
@@ -92,10 +92,10 @@ class FaceEnhancement(object):
92
  full_mask = full_mask[:, :, np.newaxis]
93
  img = cv2.convertScaleAbs(img*(1-full_mask) + full_img*full_mask)
94
 
95
- if self.use_sr and img_sr==not None:
96
- img = cv2.convertScaleAbs(img_sr*(1-full_mask) + full_img*full_mask)
97
- else:
98
  img = cv2.convertScaleAbs(img*(1-full_mask) + full_img*full_mask)
 
 
99
 
100
  return img, orig_faces, enhanced_faces
101
 
 
92
  full_mask = full_mask[:, :, np.newaxis]
93
  img = cv2.convertScaleAbs(img*(1-full_mask) + full_img*full_mask)
94
 
95
+ if self.use_sr and img_sr == None:
 
 
96
  img = cv2.convertScaleAbs(img*(1-full_mask) + full_img*full_mask)
97
+ else:
98
+ img = cv2.convertScaleAbs(img_sr*(1-full_mask) + full_img*full_mask)
99
 
100
  return img, orig_faces, enhanced_faces
101