Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiaoqin0241
PaddleGAN
提交
34aecfbb
P
PaddleGAN
项目概览
xiaoqin0241
/
PaddleGAN
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleGAN
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleGAN
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
34aecfbb
编写于
11月 12, 2020
作者:
L
LielinJiang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/PaddlePaddle/PaddleGAN
into release/0.1.0
上级
ce38ba13
dd163d8d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
3 deletion
+15
-3
ppgan/apps/psgan_predictor.py
ppgan/apps/psgan_predictor.py
+10
-2
requirments.txt
requirments.txt
+1
-0
setup.py
setup.py
+4
-1
未找到文件。
ppgan/apps/psgan_predictor.py
浏览文件 @
34aecfbb
...
...
@@ -185,14 +185,22 @@ class PSGANPredictor(BasePredictor):
inference
=
Inference
(
self
.
cfg
,
self
.
weight_path
)
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
(
"*"
))
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
)
for
reference_path
in
reference_paths
:
if
not
reference_path
.
is_file
():
print
(
reference_path
,
"is not a valid file."
)
continue
reference
=
Image
.
open
(
reference_path
).
convert
(
"RGB"
)
# Transfer the psgan from reference to source.
...
...
requirments.txt
浏览文件 @
34aecfbb
...
...
@@ -4,3 +4,4 @@ scikit-image>=0.14.0
scipy>=1.1.0
opencv-python
imageio-ffmpeg
dlib
setup.py
浏览文件 @
34aecfbb
...
...
@@ -20,7 +20,7 @@ with open('requirments.txt', encoding="utf-8-sig") as f:
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
()
return
README
...
...
@@ -30,10 +30,13 @@ setup(
packages
=
[
'ppgan'
],
include_package_data
=
True
,
entry_points
=
{
"console_scripts"
:
[
"paddlegan= paddlegan.paddlegan:main"
]},
author
=
'PaddlePaddle Author'
,
version
=
'0.1.0'
,
install_requires
=
requirements
,
license
=
'Apache License 2.0'
,
description
=
'Awesome GAN toolkits based on PaddlePaddle'
,
long_description
=
readme
(),
long_description_content_type
=
'text/markdown'
,
url
=
'https://github.com/PaddlePaddle/PaddleGAN'
,
download_url
=
'https://github.com/PaddlePaddle/PaddleGAN.git'
,
keywords
=
[
'gan paddlegan'
],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录