Skip to content

Commit ff8e731

Browse files
authored
Update main_test_face_enhancement.py
1 parent 047dc42 commit ff8e731

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

main_test_face_enhancement.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
RetinaFace-R50.pth: https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/models/RetinaFace-R50.pth
2020
GPEN-512.pth: https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/models/GPEN-512.pth
2121
22+
Update(04/12/2023):
23+
step 1: Download <RetinaFace-R50.pth> model and <GPEN-BFR-512.pth> model and put them into `model_zoo`. See https://github.com/yangxy/GPEN for more details!
24+
RetinaFace-R50.pth: https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/models/RetinaFace-R50.pth
25+
GPEN-BFR-512.pth: https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/models/GPEN-BFR-512.pth
26+
27+
2228
step 2: Install ninja by `pip install ninja`; set <inputdir> for your own testing images
2329
2430
step 3: `python main_test_face_enhancement.py`
@@ -144,9 +150,9 @@ def process(self, img):
144150
need_face_detection = True
145151

146152
if need_face_detection:
147-
enhancer = faceenhancer_with_detection_alignment(model_path=os.path.join('model_zoo','GPEN-512.pth'), size=512, channel_multiplier=2)
153+
enhancer = faceenhancer_with_detection_alignment(model_path=os.path.join('model_zoo','GPEN-BFR-512.pth'), size=512, channel_multiplier=2)
148154
else:
149-
enhancer = faceenhancer(model_path=os.path.join('model_zoo','GPEN-512.pth'), size=512, channel_multiplier=2)
155+
enhancer = faceenhancer(model_path=os.path.join('model_zoo','GPEN-BFR-512.pth'), size=512, channel_multiplier=2)
150156

151157
for idx, img_file in enumerate(util.get_image_paths(inputdir)):
152158
img_name, ext = os.path.splitext(os.path.basename(img_file))

0 commit comments

Comments
 (0)