From 67d7e4153a254b73144b667b8abc91205da15f1d Mon Sep 17 00:00:00 2001 From: wangna11BD <79366697+wangna11BD@users.noreply.github.com> Date: Fri, 31 Dec 2021 11:11:14 +0800 Subject: [PATCH] fix mpr and doc (#550) --- docs/en_US/tutorials/face_enhancement.md | 2 ++ docs/zh_CN/tutorials/face_enhancement.md | 2 ++ ppgan/apps/mpr_predictor.py | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/en_US/tutorials/face_enhancement.md b/docs/en_US/tutorials/face_enhancement.md index 2c3b87b13..318c01048 100644 --- a/docs/en_US/tutorials/face_enhancement.md +++ b/docs/en_US/tutorials/face_enhancement.md @@ -18,6 +18,8 @@ faceenhancer = FaceEnhancement() img = faceenhancer.enhance_from_image(img) ``` +Note: please convert the image to float type, currently does not support int8 type. + ### Train (TODO) In the future, training scripts will be added to facilitate users to train more types of GPEN. diff --git a/docs/zh_CN/tutorials/face_enhancement.md b/docs/zh_CN/tutorials/face_enhancement.md index 3bb9aceb6..0d3c3e166 100644 --- a/docs/zh_CN/tutorials/face_enhancement.md +++ b/docs/zh_CN/tutorials/face_enhancement.md @@ -18,6 +18,8 @@ faceenhancer = FaceEnhancement() img = faceenhancer.enhance_from_image(img) ``` +注意:请将图片转为float类型输入,目前不支持int8类型 + ### 训练(TODO) 未来还将添加训练脚本方便用户训练出更多类型的 GPEN 人脸增强。 diff --git a/ppgan/apps/mpr_predictor.py b/ppgan/apps/mpr_predictor.py index f9560e0c0..6ae12df54 100644 --- a/ppgan/apps/mpr_predictor.py +++ b/ppgan/apps/mpr_predictor.py @@ -110,7 +110,7 @@ def run(self, images_path=None): os.makedirs(self.output_path, exist_ok=True) task_path = os.path.join(self.output_path, self.task) os.makedirs(task_path, exist_ok=True) - image_files = self.get_images(self.images_path) + image_files = self.get_images(images_path) for image_file in tqdm(image_files): img = self.read_image(image_file) image_name = os.path.basename(image_file)