diff --git a/README.md b/README.md index f4e16b4fc9f0e33a01d6664600b77b0ce563317a..719d17ca186ff019bf0be064d0d3a2013b638527 100644 --- a/README.md +++ b/README.md @@ -1,32 +1,54 @@ -English | [简体中文](./README.md) +English | [简体中文](./README_cn.md) # PaddleGAN -still under development!! +PaddleGAN is an development kit of Generative Adversarial Network based on PaddlePaddle. -## Download Dataset -This script could download several dataset for paired images for image2image translation task. +![](./docs/imgs/color_sr_peking.gif) -``` -cd PaddleGAN/script/ -bash pix2pix_download.sh [cityscapes|facades|edges2handbags|edges2shoes|maps] -``` -## Train -``` -python -u tools/main.py --config-file configs/cyclegan-cityscapes.yaml -``` +Features: -continue train from last checkpoint -``` -python -u tools/main.py --config-file configs/cyclegan-cityscapes.yaml --resume your_checkpoint_path -``` +- Highly Flexible: + + Components are designed to be modular. Model architectures, as well as data +preprocess pipelines, can be easily customized with simple configuration +changes. + +- Rich applications: + + PaddleGAN provides rich of applications, such as image generation, image restore, image colorization, video interpolate, makeup shifter. + +## Install + +### 1. install paddlepaddle + +PaddleGAN work with: +* PaddlePaddle >= 2.0.0-rc +* Python >= 3.5+ -multiple gpus train: ``` -CUDA_VISIBLE_DEVICES=0,1 python -m paddle.distributed.launch tools/main.py --config-file configs/pix2pix-cityscapes.yaml +pip install -U paddlepaddle-gpu ``` -## Evaluate +### 2. install ppgan ``` -python tools/main.py --config-file configs/cyclegan-cityscapes.yaml --evaluate-only --load your_weight_path +git clone https://github.com/PaddlePaddle/PaddleGAN +cd PaddleGAN + +pip install -v -e . # or "python setup.py develop" ``` + +## Data Prepare +Please refer to [data prepare](./docs/data_prepare.md) for dataset preparation. + +## Get Start +Please refer [get stated](./docs/get_started.md) for the basic usage of PaddleGAN. + + +## License +PaddleGAN is released under the [Apache 2.0 license](LICENSE). + + +## Contributing + +Contributions are highly welcomed and we would really appreciate your feedback!! diff --git a/README_cn.md b/README_cn.md new file mode 100644 index 0000000000000000000000000000000000000000..3b6526cdd729b3f9ca7695e9cfb19d695a5c1826 --- /dev/null +++ b/README_cn.md @@ -0,0 +1,53 @@ +[English](./README.md) | 简体中文 + +# PaddleGAN + +PaddleGAN 是一个基于飞桨的生成对抗网络开发工具包. + +![](./docs/imgs/color_sr_peking.gif) + +特性: + +- 高度的灵活性: + + 模块化设计,解耦各个网络组件,开发者轻松搭建、试用各种检测模型及优化策略,快速得到高性能、定制化的算法。 + +- 丰富的应用: + + PaddleGAN 提供了非常多的应用,比如说图像生成,图像修复,图像上色,视频补帧,人脸妆容迁移等. + +## 安装 + +### 1. 安装 paddlepaddle + +PaddleGAN 所需的版本: +* PaddlePaddle >= 2.0.0-rc +* Python >= 3.5+ + +``` +pip install -U paddlepaddle-gpu +``` + +### 2. 安装ppgan +``` +git clone https://github.com/PaddlePaddle/PaddleGAN +cd PaddleGAN + +pip install -v -e . # or "python setup.py develop" +``` + +## 数据准备 +请参考 [数据准备](./docs/data_prepare.md) 来准备对应的数据. + + +## 快速开始 +训练,预测,推理等请参考 [快速开始](./docs/get_started.md). + + +## 许可证书 +本项目的发布受[Apache 2.0 license](LICENSE)许可认证。 + + +## 贡献代码 + +我们非常欢迎你可以为PaddleGAN提供代码,也十分感谢你的反馈。 diff --git a/docs/data_prepare.md b/docs/data_prepare.md new file mode 100644 index 0000000000000000000000000000000000000000..2d2c527ac2e6210db2240c7262e1c4dedf47dd58 --- /dev/null +++ b/docs/data_prepare.md @@ -0,0 +1,36 @@ +## data prepare + +It is recommended to symlink the dataset root to `$PaddleGAN/data`. + + +``` +PaddleGAN +|-- configs +|-- data +| |-- cityscapes +| | ├── test +| | ├── testA +| | ├── testB +| | ├── train +| | ├── trainA +| | └── trainB +| ├── horse2zebra +| | ├── testA +| | ├── testB +| | ├── trainA +| | └── trainB +| └── facades +| ├── test +| ├── train +| └── val +|-- docs +|-- ppgan +|-- tools + +``` + +### cyclegan datasets +more dataset for cyclegan you can download from [here](https://people.eecs.berkeley.edu/~taesung_park/CycleGAN/datasets/) + +### pix2pix datasets +more dataset for pix2pix you can download from [here](hhttps://people.eecs.berkeley.edu/~tinghuiz/projects/pix2pix/datasets/) diff --git a/docs/get_started.md b/docs/get_started.md new file mode 100644 index 0000000000000000000000000000000000000000..8b10409de80374a7492c4f79d01de3a508e2e908 --- /dev/null +++ b/docs/get_started.md @@ -0,0 +1,19 @@ +## Train +``` +python -u tools/main.py --config-file configs/cyclegan_cityscapes.yaml +``` + +continue train from last checkpoint +``` +python -u tools/main.py --config-file configs/cyclegan_cityscapes.yaml --resume your_checkpoint_path +``` + +multiple gpus train: +``` +CUDA_VISIBLE_DEVICES=0,1 python -m paddle.distributed.launch tools/main.py --config-file configs/pix2pix_cityscapes.yaml +``` + +## Evaluate +``` +python tools/main.py --config-file configs/cyclegan_cityscapes.yaml --evaluate-only --load your_weight_path +```