diff --git a/README.md b/README.md index caf7ad6699cde16f60b1671926c00aaf0a6e93a5..a44bd788cd3dd46a5c9da814b2c1706ab1508255 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -简体中文 | [English](./README_en.md) +English | [简体中文](./README_cn.md) # PaddleGAN -飞桨生成对抗网络开发套件--PaddleGAN,为开发者提供经典及前沿的生成对抗网络高性能实现,并支撑开发者快速构建、训练及部署生成对抗网络,以供学术、娱乐及产业应用。 +PaddleGAN provides developers with high-performance implementation of classic and SOTA Generative Adversarial Networks, and support developers to quickly build, train and deploy GANs for academic, entertainment and industrial usage. -GAN--生成对抗网络,被“卷积网络之父”**Yann LeCun(杨立昆)**誉为**「过去十年计算机科学领域最有趣的想法之一」**,是近年来火遍全网,AI研究者最为关注的深度学习技术方向之一。 +GAN-Generative Adversarial Network, was praised by "the Father of Convolutional Networks" **Yann LeCun (Yang Likun)** as **[One of the most interesting ideas in the field of computer science in the past decade]**. It's one the research area in deep learning that AI researchers are most concerned about.
@@ -13,130 +13,119 @@ GAN--生成对抗网络,被“卷积网络之父”**Yann LeCun(杨立昆) [![License](https://img.shields.io/badge/license-Apache%202-red.svg)](LICENSE)![python version](https://img.shields.io/badge/python-3.6+-orange.svg) -## 近期贡献者 +## Recent Contributors [![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/0)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/0)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/1)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/1)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/2)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/2)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/3)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/3)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/4)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/4)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/5)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/5)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/6)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/6)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/7)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/7) -## 快速开始 +## Quick Start -* 请确保您按照[安装文档](./docs/zh_CN/install.md)的说明正确安装了PaddlePaddle和PaddleGAN +* Please refer [install](./docs/en_US/install.md) to ensure you sucessfully installed PaddlePaddle and PaddleGAN. -* 通过ppgan.apps接口直接使用应用: +* Get started through ppgan.app interface: - ```python - from ppgan.apps import RealSRPredictor - sr = RealSRPredictor() - sr.run("docs/imgs/monarch.png") - ``` + ```python + from ppgan.apps import RealSRPredictor + sr = RealSRPredictor() + sr.run("docs/imgs/monarch.png") + ``` +* More applications, please refer to [ppgan.apps apis](./docs/en_US/apis/apps.md) +* More tutorials: + - [Data preparation](./docs/en_US/data_prepare.md) + - [Training/Evaluating/Testing basic usage](./docs/zh_CN/get_started.md) -* 更多应用的使用请参考[ppgan.apps API](./docs/zh_CN/apis/apps.md) -* 更多训练、评估教程: - * [数据准备](./docs/zh_CN/data_prepare.md) - * [训练/评估/推理教程](./docs/zh_CN/get_started.md) +## Model Tutorial -## 经典模型实现 +* [Pixel2Pixel](./docs/en_US/tutorials/pix2pix_cyclegan.md) +* [CycleGAN](./docs/en_US/tutorials/pix2pix_cyclegan.md) +* [PSGAN](./docs/en_US/tutorials/psgan.md) +* [First Order Motion Model](./docs/en_US/tutorials/motion_driving.md) +* [FaceParsing](./docs/en_US/tutorials/face_parse.md) +* [AnimeGANv2](./docs/en_US/tutorials/animegan.md) +* [U-GAT-IT](./docs/en_US/tutorials/ugatit.md) -* [Pixel2Pixel](./docs/zh_CN/tutorials/pix2pix_cyclegan.md) -* [CycleGAN](./docs/zh_CN/tutorials/pix2pix_cyclegan.md) -* [PSGAN](./docs/zh_CN/tutorials/psgan.md) -* [First Order Motion Model](./docs/zh_CN/tutorials/motion_driving.md) -* [FaceParsing](./docs/zh_CN/tutorials/face_parse.md) -* [AnimeGANv2](./docs/zh_CN/tutorials/animegan.md) -* [U-GAT-IT](./docs/zh_CN/tutorials/ugatit.md) +## Composite Application -## 复合应用 +* [Video restore](./docs/zh_CN/tutorials/video_restore.md) -* [视频修复](./docs/zh_CN/tutorials/video_restore.md) +## Examples -## 在线教程 - -您可以通过[人工智能学习与实训社区AI Studio](https://aistudio.baidu.com/aistudio/index) 的示例工程在线体验PaddleGAN的部分能力: - -|在线教程 | 链接 | -|--------------|-----------| -|老北京视频修复|[点击体验](https://aistudio.baidu.com/aistudio/projectdetail/1161285)| -|表情动作迁移-当苏大强唱起unravel |[点击体验](https://aistudio.baidu.com/aistudio/projectdetail/1048840)| - -## 效果展示 - -### 图片变换 +### Image Translation
-### 老视频修复 - +### Old video restore
-### 动作迁移 - +### Motion driving
- +
-### 超分辨率 +### Super resolution
-### 妆容迁移 +### Makeup shifter
-### 人脸动漫化 +### Face cartoonization
-### 照片动漫化 +### Photo animation
-## 版本更新 +## Changelog - v0.1.0 (2020.11.02) - - 初版发布,支持Pixel2Pixel、CycleGAN、PSGAN模型,支持视频插针、超分、老照片/视频上色、视频动作生成等应用。 - - 模块化设计,接口简单易用。 + - Release first version, supported models include Pixel2Pixel, CycleGAN, PSGAN. Supported applications include video frame interpolation, super resolution, colorize images and videos, image animation. + - Modular design and friendly interface. -## 欢迎加入PaddleGAN技术交流群 +## Community -扫描二维码加入PaddleGAN QQ群[群号:1058398620],获得更高效的问题答疑,与各行业开发者交流讨论,我们期待您的加入! +Scan OR Code below to join [PaddleGAN QQ Group:1058398620], you can get offical technical support here and communicate with other developers/friends. Look forward to your participation!
-### PaddleGAN 特别兴趣小组(Special Interest Group) - -最早于1961年被[ACM(Association for Computing Machinery)](https://en.wikipedia.org/wiki/Association_for_Computing_Machinery)首次提出并使用,国际顶尖开源组织包括[Kubernates](https://kubernetes.io/)都采用SIGs的形式,使拥有同样特定兴趣的成员可以共同分享、学习知识并进行项目开发。这些成员不需要在同一国家/地区、同一个组织,只要大家志同道合,都可以奔着相同的目标一同学习、工作、玩耍~ +### PaddleGAN Special Interest Group(SIG) -PaddleGAN SIG就是这样一个汇集对GAN感兴趣小伙伴们的开发者组织,在这里,有百度飞桨的一线开发人员、有来自世界500强的资深工程师、有国内外顶尖高校的学生。 +It was first proposed and used by [ACM(Association for Computing Machinery)](https://en.wikipedia.org/wiki/Association_for_Computing_Machinery) in 1961. Top International open source organizations including [Kubernates](https://kubernetes.io/) all adopt the form of SIGs, so that members with the same specific interests can share, learn knowledge and develop projects. These members do not need to be in the same country/region or the same organization, as long as they are like-minded, they can all study, work, and play together with the same goals~ -我们正在持续招募有兴趣、有能力的开发者加入我们一起共同建设本项目,并一起探索更多有用、有趣的应用。欢迎大家在加入群后联系我们讨论加入SIG并参与共建事宜。 +PaddleGAN SIG is such a developer organization that brings together people who interested in GAN. There are frontline developers of PaddlePaddle, senior engineers from the world's top 500, and students from top universities at home and abroad. -SIG贡献: +We are continuing to recruit developers interested and capable to join us building this project and explore more useful and interesting applications together. -- [zhen8838](https://github.com/zhen8838): 贡献AnimeGANv2. -- [Jay9z](https://github.com/Jay9z): 贡献DCGAN的示例、修改安装文档等。 -- [HighCWu](https://github.com/HighCWu): 贡献c-DCGAN和WGAN,以及对`paddle.vision.datasets`数据集的支持。 +SIG contributions: +- [zhen8838](https://github.com/zhen8838): contributed to AnimeGANv2. +- [Jay9z](https://github.com/Jay9z): contributed to DCGAN and updated install docs, etc. +- [HighCWu](https://github.com/HighCWu): contributed to c-DCGAN and WGAN. Support to use `paddle.vision.datasets`. -## 贡献代码 -我们非常欢迎您可以为PaddleGAN提供任何贡献和建议。大多数贡献都需要同意参与者许可协议(CLA)。当提交拉取请求时,CLA机器人会自动检查您是否需要提供CLA。 只需要按照机器人提供的说明进行操作即可。CLA只需要同意一次,就能应用到所有的代码仓库上。关于更多的流程请参考[贡献指南](docs/zh_CN/contribute.md)。 +## Contributing -## 许可证书 +Contributions and suggestions are highly welcomed. Most contributions require you to agree to a [Contributor License Agreement (CLA)](https://cla-assistant.io/PaddlePaddle/PaddleGAN) declaring. +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA. Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. +For more, please reference [contribution guidelines](docs/en_US/contribute.md). -本项目的发布受[Apache 2.0 license](LICENSE)许可认证。 +## License +PaddleGAN is released under the [Apache 2.0 license](LICENSE). diff --git a/README_cn.md b/README_cn.md new file mode 100644 index 0000000000000000000000000000000000000000..0fd7cae094bc317bdd1f05d379862a0730986a1f --- /dev/null +++ b/README_cn.md @@ -0,0 +1,142 @@ + +简体中文 | [English](./README.md) + +# PaddleGAN + +飞桨生成对抗网络开发套件--PaddleGAN,为开发者提供经典及前沿的生成对抗网络高性能实现,并支撑开发者快速构建、训练及部署生成对抗网络,以供学术、娱乐及产业应用。 + +GAN--生成对抗网络,被“卷积网络之父”**Yann LeCun(杨立昆)**誉为**「过去十年计算机科学领域最有趣的想法之一」**,是近年来火遍全网,AI研究者最为关注的深度学习技术方向之一。 + +
+ +
+ +[![License](https://img.shields.io/badge/license-Apache%202-red.svg)](LICENSE)![python version](https://img.shields.io/badge/python-3.6+-orange.svg) + +## 近期贡献者 + +[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/0)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/0)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/1)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/1)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/2)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/2)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/3)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/3)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/4)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/4)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/5)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/5)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/6)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/6)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/7)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/7) + +## 快速开始 + +* 请确保您按照[安装文档](./docs/zh_CN/install.md)的说明正确安装了PaddlePaddle和PaddleGAN + +* 通过ppgan.apps接口直接使用应用: + + ```python + from ppgan.apps import RealSRPredictor + sr = RealSRPredictor() + sr.run("docs/imgs/monarch.png") + ``` + +* 更多应用的使用请参考[ppgan.apps API](./docs/zh_CN/apis/apps.md) +* 更多训练、评估教程: + * [数据准备](./docs/zh_CN/data_prepare.md) + * [训练/评估/推理教程](./docs/zh_CN/get_started.md) + +## 经典模型实现 + +* [Pixel2Pixel](./docs/zh_CN/tutorials/pix2pix_cyclegan.md) +* [CycleGAN](./docs/zh_CN/tutorials/pix2pix_cyclegan.md) +* [PSGAN](./docs/zh_CN/tutorials/psgan.md) +* [First Order Motion Model](./docs/zh_CN/tutorials/motion_driving.md) +* [FaceParsing](./docs/zh_CN/tutorials/face_parse.md) +* [AnimeGANv2](./docs/zh_CN/tutorials/animegan.md) +* [U-GAT-IT](./docs/zh_CN/tutorials/ugatit.md) + +## 复合应用 + +* [视频修复](./docs/zh_CN/tutorials/video_restore.md) + +## 在线教程 + +您可以通过[人工智能学习与实训社区AI Studio](https://aistudio.baidu.com/aistudio/index) 的示例工程在线体验PaddleGAN的部分能力: + +|在线教程 | 链接 | +|--------------|-----------| +|老北京视频修复|[点击体验](https://aistudio.baidu.com/aistudio/projectdetail/1161285)| +|表情动作迁移-当苏大强唱起unravel |[点击体验](https://aistudio.baidu.com/aistudio/projectdetail/1048840)| + +## 效果展示 + +### 图片变换 + +
+ +
+ +### 老视频修复 + +
+ +
+ + +### 动作迁移 + +
+ +
+ +### 超分辨率 + +
+ +
+ + +### 妆容迁移 + +
+ +
+ + +### 人脸动漫化 + +
+ +
+ +### 照片动漫化 + +
+ +
+ +## 版本更新 + +- v0.1.0 (2020.11.02) + - 初版发布,支持Pixel2Pixel、CycleGAN、PSGAN模型,支持视频插针、超分、老照片/视频上色、视频动作生成等应用。 + - 模块化设计,接口简单易用。 + +## 欢迎加入PaddleGAN技术交流群 + +扫描二维码加入PaddleGAN QQ群[群号:1058398620],获得更高效的问题答疑,与各行业开发者交流讨论,我们期待您的加入! + +
+ +
+ +### PaddleGAN 特别兴趣小组(Special Interest Group) + +最早于1961年被[ACM(Association for Computing Machinery)](https://en.wikipedia.org/wiki/Association_for_Computing_Machinery)首次提出并使用,国际顶尖开源组织包括[Kubernates](https://kubernetes.io/)都采用SIGs的形式,使拥有同样特定兴趣的成员可以共同分享、学习知识并进行项目开发。这些成员不需要在同一国家/地区、同一个组织,只要大家志同道合,都可以奔着相同的目标一同学习、工作、玩耍~ + +PaddleGAN SIG就是这样一个汇集对GAN感兴趣小伙伴们的开发者组织,在这里,有百度飞桨的一线开发人员、有来自世界500强的资深工程师、有国内外顶尖高校的学生。 + +我们正在持续招募有兴趣、有能力的开发者加入我们一起共同建设本项目,并一起探索更多有用、有趣的应用。欢迎大家在加入群后联系我们讨论加入SIG并参与共建事宜。 + +SIG贡献: + +- [zhen8838](https://github.com/zhen8838): 贡献AnimeGANv2. +- [Jay9z](https://github.com/Jay9z): 贡献DCGAN的示例、修改安装文档等。 +- [HighCWu](https://github.com/HighCWu): 贡献c-DCGAN和WGAN,以及对`paddle.vision.datasets`数据集的支持。 + + +## 贡献代码 + +我们非常欢迎您可以为PaddleGAN提供任何贡献和建议。大多数贡献都需要同意参与者许可协议(CLA)。当提交拉取请求时,CLA机器人会自动检查您是否需要提供CLA。 只需要按照机器人提供的说明进行操作即可。CLA只需要同意一次,就能应用到所有的代码仓库上。关于更多的流程请参考[贡献指南](docs/zh_CN/contribute.md)。 + +## 许可证书 + +本项目的发布受[Apache 2.0 license](LICENSE)许可认证。 diff --git a/README_en.md b/README_en.md deleted file mode 100644 index f3528289913b00129e8fdea96f99ae81c4e3c53b..0000000000000000000000000000000000000000 --- a/README_en.md +++ /dev/null @@ -1,131 +0,0 @@ - -English | [简体中文](./README.md) - -# PaddleGAN - -PaddleGAN provides developers with high-performance implementation of classic and SOTA Generative Adversarial Networks, and support developers to quickly build, train and deploy GANs for academic, entertainment and industrial usage. - -GAN-Generative Adversarial Network, was praised by "the Father of Convolutional Networks" **Yann LeCun (Yang Likun)** as **[One of the most interesting ideas in the field of computer science in the past decade]**. It's one the research area in deep learning that AI researchers are most concerned about. - -
- -
- -[![License](https://img.shields.io/badge/license-Apache%202-red.svg)](LICENSE)![python version](https://img.shields.io/badge/python-3.6+-orange.svg) - - -## Recent Contributors -[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/0)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/0)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/1)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/1)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/2)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/2)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/3)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/3)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/4)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/4)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/5)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/5)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/6)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/6)[![](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/images/7)](https://sourcerer.io/fame/LaraStuStu/paddlepaddle/paddlegan/links/7) - -## Quick Start - -* Please refer [install](./docs/en_US/install.md) to ensure you sucessfully installed PaddlePaddle and PaddleGAN. - -* Get started through ppgan.app interface: - - ```python - from ppgan.apps import RealSRPredictor - sr = RealSRPredictor() - sr.run("docs/imgs/monarch.png") - ``` -* More applications, please refer to [ppgan.apps apis](./docs/en_US/apis/apps.md) -* More tutorials: - - [Data preparation](./docs/en_US/data_prepare.md) - - [Training/Evaluating/Testing basic usage](./docs/zh_CN/get_started.md) - -## Model Tutorial - -* [Pixel2Pixel](./docs/en_US/tutorials/pix2pix_cyclegan.md) -* [CycleGAN](./docs/en_US/tutorials/pix2pix_cyclegan.md) -* [PSGAN](./docs/en_US/tutorials/psgan.md) -* [First Order Motion Model](./docs/en_US/tutorials/motion_driving.md) -* [FaceParsing](./docs/en_US/tutorials/face_parse.md) -* [AnimeGANv2](./docs/en_US/tutorials/animegan.md) -* [U-GAT-IT](./docs/en_US/tutorials/ugatit.md) - -## Composite Application - -* [Video restore](./docs/zh_CN/tutorials/video_restore.md) - -## Examples - -### Image Translation - -
- -
- -### Old video restore -
- -
- - -### Motion driving -
- -
- -### Super resolution - -
- -
- - -### Makeup shifter - -
- -
- - -### Face cartoonization - -
- -
- -### Photo animation - -
- -
- -## Changelog - -- v0.1.0 (2020.11.02) - - Release first version, supported models include Pixel2Pixel, CycleGAN, PSGAN. Supported applications include video frame interpolation, super resolution, colorize images and videos, image animation. - - Modular design and friendly interface. - -## Community - -Scan OR Code below to join [PaddleGAN QQ Group:1058398620], you can get offical technical support here and communicate with other developers/friends. Look forward to your participation! - -
- -
- -### PaddleGAN Special Interest Group(SIG) - -It was first proposed and used by [ACM(Association for Computing Machinery)](https://en.wikipedia.org/wiki/Association_for_Computing_Machinery) in 1961. Top International open source organizations including [Kubernates](https://kubernetes.io/) all adopt the form of SIGs, so that members with the same specific interests can share, learn knowledge and develop projects. These members do not need to be in the same country/region or the same organization, as long as they are like-minded, they can all study, work, and play together with the same goals~ - -PaddleGAN SIG is such a developer organization that brings together people who interested in GAN. There are frontline developers of PaddlePaddle, senior engineers from the world's top 500, and students from top universities at home and abroad. - -We are continuing to recruit developers interested and capable to join us building this project and explore more useful and interesting applications together. - -SIG contributions: - -- [zhen8838](https://github.com/zhen8838): contributed to AnimeGANv2. -- [Jay9z](https://github.com/Jay9z): contributed to DCGAN and updated install docs, etc. -- [HighCWu](https://github.com/HighCWu): contributed to c-DCGAN and WGAN. Support to use `paddle.vision.datasets`. - - -## Contributing - -Contributions and suggestions are highly welcomed. Most contributions require you to agree to a [Contributor License Agreement (CLA)](https://cla-assistant.io/PaddlePaddle/PaddleGAN) declaring. -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA. Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA. -For more, please reference [contribution guidelines](docs/en_US/contribute.md). - -## License -PaddleGAN is released under the [Apache 2.0 license](LICENSE). diff --git a/ppgan/apps/dain_predictor.py b/ppgan/apps/dain_predictor.py index 332cf58c0068e043571a9c937e60ca854d5625d7..31d9e974782d5007fdaff141fe7b42f8c41834f9 100644 --- a/ppgan/apps/dain_predictor.py +++ b/ppgan/apps/dain_predictor.py @@ -120,7 +120,7 @@ class DAINPredictor(BasePredictor): if not os.path.exists(os.path.join(frame_path_combined, vidname)): os.makedirs(os.path.join(frame_path_combined, vidname)) - for i in range(frame_num - 1): + for i in tqdm(range(frame_num - 1)): first = frames[i] second = frames[i + 1] first_index = int(first.split('/')[-1].split('.')[-2])