“a1c7d035aa9d16102c822a6986ed16a85d70d524”上不存在“vendor/git@gitcode.net:diandianxiyu/soar.git”
提交 34aecfbb 编写于 作者: L LielinJiang

Merge branch 'master' of https://github.com/PaddlePaddle/PaddleGAN into release/0.1.0

...@@ -185,14 +185,22 @@ class PSGANPredictor(BasePredictor): ...@@ -185,14 +185,22 @@ class PSGANPredictor(BasePredictor):
inference = Inference(self.cfg, self.weight_path) inference = Inference(self.cfg, self.weight_path)
postprocess = PostProcess(self.cfg) postprocess = PostProcess(self.cfg)
source = Image.open(self.args.source_path).convert("RGB") try:
source = Image.open(self.args.source_path).convert("RGB")
except IOError:
print("Error: {} is not exist".format(self.args.source_path))
sys.exit()
reference_paths = list(Path(self.args.reference_dir).glob("*")) reference_paths = list(Path(self.args.reference_dir).glob("*"))
if len(reference_paths) == 0:
print("Error: Can't find image file in {}.".format(
self.args.reference_dir))
sys.exit()
np.random.shuffle(reference_paths) np.random.shuffle(reference_paths)
for reference_path in reference_paths: for reference_path in reference_paths:
if not reference_path.is_file(): if not reference_path.is_file():
print(reference_path, "is not a valid file.") print(reference_path, "is not a valid file.")
continue continue
reference = Image.open(reference_path).convert("RGB") reference = Image.open(reference_path).convert("RGB")
# Transfer the psgan from reference to source. # Transfer the psgan from reference to source.
......
...@@ -4,3 +4,4 @@ scikit-image>=0.14.0 ...@@ -4,3 +4,4 @@ scikit-image>=0.14.0
scipy>=1.1.0 scipy>=1.1.0
opencv-python opencv-python
imageio-ffmpeg imageio-ffmpeg
dlib
...@@ -20,7 +20,7 @@ with open('requirments.txt', encoding="utf-8-sig") as f: ...@@ -20,7 +20,7 @@ with open('requirments.txt', encoding="utf-8-sig") as f:
def readme(): def readme():
with open('doc/doc_en/whl_en.md', encoding="utf-8-sig") as f: with open('README_en.md', encoding="utf-8-sig") as f:
README = f.read() README = f.read()
return README return README
...@@ -30,10 +30,13 @@ setup( ...@@ -30,10 +30,13 @@ setup(
packages=['ppgan'], packages=['ppgan'],
include_package_data=True, include_package_data=True,
entry_points={"console_scripts": ["paddlegan= paddlegan.paddlegan:main"]}, entry_points={"console_scripts": ["paddlegan= paddlegan.paddlegan:main"]},
author='PaddlePaddle Author',
version='0.1.0', version='0.1.0',
install_requires=requirements, install_requires=requirements,
license='Apache License 2.0', license='Apache License 2.0',
description='Awesome GAN toolkits based on PaddlePaddle', description='Awesome GAN toolkits based on PaddlePaddle',
long_description=readme(),
long_description_content_type='text/markdown',
url='https://github.com/PaddlePaddle/PaddleGAN', url='https://github.com/PaddlePaddle/PaddleGAN',
download_url='https://github.com/PaddlePaddle/PaddleGAN.git', download_url='https://github.com/PaddlePaddle/PaddleGAN.git',
keywords=['gan paddlegan'], keywords=['gan paddlegan'],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册