Update inference_gfpgan.py
Browse files- inference_gfpgan.py +11 -11
inference_gfpgan.py
CHANGED
@@ -134,20 +134,20 @@ def main():
|
|
134 |
input_img, has_aligned=args.aligned, only_center_face=args.only_center_face, paste_back=True)
|
135 |
|
136 |
# save faces
|
137 |
-
|
138 |
# save cropped face
|
139 |
-
|
140 |
-
|
141 |
# save restored face
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
# save comparison image
|
149 |
-
|
150 |
-
|
151 |
#
|
152 |
# save restored img
|
153 |
if restored_img is not None:
|
|
|
134 |
input_img, has_aligned=args.aligned, only_center_face=args.only_center_face, paste_back=True)
|
135 |
|
136 |
# save faces
|
137 |
+
# for idx, (cropped_face, restored_face) in enumerate(zip(cropped_faces, restored_faces)):
|
138 |
# save cropped face
|
139 |
+
# save_crop_path = os.path.join(args.output, 'cropped_faces', f'{basename}_{idx:02d}.png')
|
140 |
+
# imwrite(cropped_face, save_crop_path)
|
141 |
# save restored face
|
142 |
+
# if args.suffix is not None:
|
143 |
+
# save_face_name = f'{basename}_{idx:02d}_{args.suffix}.png'
|
144 |
+
# else:
|
145 |
+
# save_face_name = f'{basename}_{idx:02d}.png'
|
146 |
+
# save_restore_path = os.path.join(args.output, 'restored_faces', save_face_name)
|
147 |
+
# imwrite(restored_face, save_restore_path)
|
148 |
# save comparison image
|
149 |
+
# cmp_img = np.concatenate((cropped_face, restored_face), axis=1)
|
150 |
+
# imwrite(cmp_img, os.path.join(args.output, 'cmp', f'{basename}_{idx:02d}.png'))
|
151 |
#
|
152 |
# save restored img
|
153 |
if restored_img is not None:
|