From d3f87261f3610a86367ff3d682891e4ab1bfb0f8 Mon Sep 17 00:00:00 2001 From: lijianshe02 <48898730+lijianshe02@users.noreply.github.com> Date: Tue, 17 Nov 2020 16:07:20 +0800 Subject: [PATCH] fix psgan doc (#92) --- docs/en_US/tutorials/psgan.md | 2 +- docs/zh_CN/tutorials/psgan.md | 2 +- ppgan/apps/psgan_predictor.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/en_US/tutorials/psgan.md b/docs/en_US/tutorials/psgan.md index 278ee45..74af4a6 100644 --- a/docs/en_US/tutorials/psgan.md +++ b/docs/en_US/tutorials/psgan.md @@ -19,7 +19,7 @@ python tools/psgan_infer.py \ --config-file configs/makeup.yaml \ --model_path /your/model/path \ --source_path docs/imgs/ps_source.png \ - --reference_dir docs/imgs/ref/ps_ref \ + --reference_dir docs/imgs/ref \ --evaluate-only True ``` **params:** diff --git a/docs/zh_CN/tutorials/psgan.md b/docs/zh_CN/tutorials/psgan.md index 1f33638..5d55f14 100644 --- a/docs/zh_CN/tutorials/psgan.md +++ b/docs/zh_CN/tutorials/psgan.md @@ -19,7 +19,7 @@ python tools/psgan_infer.py \ --config-file configs/makeup.yaml \ --model_path /your/model/path \ --source_path docs/imgs/ps_source.png \ - --reference_dir docs/imgs/ref/ps_ref \ + --reference_dir docs/imgs/ref \ --evaluate-only True ``` **参数说明:** diff --git a/ppgan/apps/psgan_predictor.py b/ppgan/apps/psgan_predictor.py index fef0f91..488a7a8 100644 --- a/ppgan/apps/psgan_predictor.py +++ b/ppgan/apps/psgan_predictor.py @@ -210,8 +210,10 @@ class PSGANPredictor(BasePredictor): ref_img_name = os.path.split(reference_path)[1] if not os.path.exists(self.output_path): - os.makedirs(sefl.output_path) + os.makedirs(self.output_path) save_path = os.path.join(self.output_path, 'transfered_ref_' + ref_img_name) image.save(save_path) + print('Transfered image {} has been saved!'.format(save_path)) + print('done!!!') -- GitLab