Skip to content

Commit

Permalink
fix psgan doc (PaddlePaddle#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
lijianshe02 authored Nov 17, 2020
1 parent 9fcfc6e commit d3f8726
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/en_US/tutorials/psgan.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand Down
2 changes: 1 addition & 1 deletion docs/zh_CN/tutorials/psgan.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
**参数说明:**
Expand Down
4 changes: 3 additions & 1 deletion ppgan/apps/psgan_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,10 @@ def run(self):

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!!!')

0 comments on commit d3f8726

Please sign in to comment.