Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleGAN
提交
3d86ec00
P
PaddleGAN
项目概览
PaddlePaddle
/
PaddleGAN
1 年多 前同步成功
通知
97
Star
7254
Fork
1210
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleGAN
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3d86ec00
编写于
10月 12, 2020
作者:
L
lijianshe02
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add psgan code
上级
8797a98e
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
226 addition
and
13 deletion
+226
-13
configs/makeup.yaml
configs/makeup.yaml
+14
-0
ppgan/datasets/__init__.py
ppgan/datasets/__init__.py
+14
-0
ppgan/datasets/makeup_dataset.py
ppgan/datasets/makeup_dataset.py
+14
-0
ppgan/datasets/transforms/makeup_transforms.py
ppgan/datasets/transforms/makeup_transforms.py
+14
-0
ppgan/faceutils/__init__.py
ppgan/faceutils/__init__.py
+14
-3
ppgan/faceutils/dlibutils/main.py
ppgan/faceutils/dlibutils/main.py
+14
-2
ppgan/faceutils/mask/__init__.py
ppgan/faceutils/mask/__init__.py
+14
-2
ppgan/faceutils/mask/main.py
ppgan/faceutils/mask/main.py
+0
-2
ppgan/faceutils/mask/model.py
ppgan/faceutils/mask/model.py
+14
-2
ppgan/models/__init__.py
ppgan/models/__init__.py
+14
-0
ppgan/models/discriminators/nlayers.py
ppgan/models/discriminators/nlayers.py
+14
-0
ppgan/models/generators/__init__.py
ppgan/models/generators/__init__.py
+14
-0
ppgan/models/generators/makeup.py
ppgan/models/generators/makeup.py
+14
-0
ppgan/models/makeup_model.py
ppgan/models/makeup_model.py
+14
-0
ppgan/modules/nn.py
ppgan/modules/nn.py
+14
-0
ppgan/utils/options.py
ppgan/utils/options.py
+14
-0
ppgan/utils/preprocess.py
ppgan/utils/preprocess.py
+14
-0
tools/main.py
tools/main.py
+2
-2
未找到文件。
configs/makeup.yaml
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
epochs
:
200
isTrain
:
False
output_dir
:
tmp
...
...
ppgan/datasets/__init__.py
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
.unpaired_dataset
import
UnpairedDataset
from
.single_dataset
import
SingleDataset
from
.paired_dataset
import
PairedDataset
...
...
ppgan/datasets/makeup_dataset.py
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
cv2
import
os.path
from
.base_dataset
import
BaseDataset
,
get_transform
...
...
ppgan/datasets/transforms/makeup_transforms.py
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
paddle.vision.transforms
as
T
import
cv2
...
...
ppgan/faceutils/__init__.py
浏览文件 @
3d86ec00
#!/usr/bin/python
# -*- encoding: utf-8 -*-
#from . import faceplusplus as fpp
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
.
import
dlibutils
as
dlib
from
.
import
mask
from
.
import
image
ppgan/faceutils/dlibutils/main.py
浏览文件 @
3d86ec00
#!/usr/bin/python
# -*- encoding: utf-8 -*-
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
os.path
as
osp
import
numpy
as
np
...
...
ppgan/faceutils/mask/__init__.py
浏览文件 @
3d86ec00
#!/usr/bin/python
# -*- encoding: utf-8 -*-
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
.main
import
FaceParser
ppgan/faceutils/mask/main.py
浏览文件 @
3d86ec00
#!/usr/bin/python
# -*- encoding: utf-8 -*-
import
os.path
as
osp
import
numpy
as
np
...
...
ppgan/faceutils/mask/model.py
浏览文件 @
3d86ec00
#!/usr/bin/python
# -*- encoding: utf-8 -*-
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
paddle
from
paddle
import
nn
import
paddle.nn.functional
as
F
...
...
ppgan/models/__init__.py
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
.base_model
import
BaseModel
from
.cycle_gan_model
import
CycleGANModel
from
.pix2pix_model
import
Pix2PixModel
...
...
ppgan/models/discriminators/nlayers.py
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
paddle
import
functools
import
numpy
as
np
...
...
ppgan/models/generators/__init__.py
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from
.resnet
import
ResnetGenerator
from
.unet
import
UnetGenerator
from
.rrdb_net
import
RRDBNet
...
...
ppgan/models/generators/makeup.py
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
paddle
import
paddle.nn
as
nn
import
paddle.nn.functional
as
F
...
...
ppgan/models/makeup_model.py
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
paddle
import
paddle.nn
as
nn
import
paddle.nn.functional
as
F
...
...
ppgan/modules/nn.py
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
paddle
import
paddle.nn
as
nn
import
math
...
...
ppgan/utils/options.py
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
argparse
...
...
ppgan/utils/preprocess.py
浏览文件 @
3d86ec00
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
cv2
import
numpy
as
np
...
...
tools/main.py
浏览文件 @
3d86ec00
...
...
@@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import
os
import
sys
...
...
@@ -30,7 +31,7 @@ def main(args, cfg):
# build trainer
trainer
=
Trainer
(
cfg
)
# continue train or evaluate, checkpoint need contain epoch and optimizer info
if
args
.
resume
:
trainer
.
resume
(
args
.
resume
)
...
...
@@ -50,4 +51,3 @@ if __name__ == '__main__':
cfg
=
get_config
(
args
.
config_file
)
main
(
args
,
cfg
)
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录