未验证 提交 3211114d 编写于 作者: Q qingqing01 提交者: GitHub

Merge pull request #3 from Joejiong/joe-gan-dev1

Add shell to download several datasets
......@@ -101,3 +101,7 @@ venv.bak/
# mypy
.mypy_cache/
# data
data/
output_dir/
\ No newline at end of file
English | [简体中文](./README.md)
# PaddleGAN
still under development!!
## Download Dataset
This script could download several dataset for paired images for image2image translation task.
```
cd PaddleGAN/script/
bash pix2pix_download.sh [cityscapes|facades|edges2handbags|edges2shoes|maps]
```
## Train
```
python -u tools/main.py --config-file configs/cyclegan-cityscapes.yaml
......
epochs: 200
isTrain: True
output_dir: output_dir
lambda_L1: 100
model:
name: Pix2PixModel
generator:
name: UnetGenerator
norm_type: batch
input_nc: 3
output_nc: 3
num_downs: 8 #unet256
ngf: 64
use_dropout: False
discriminator:
name: NLayerDiscriminator
ndf: 64
n_layers: 3
input_nc: 6
norm_type: batch
gan_mode: vanilla
dataset:
train:
name: PairedDataset
dataroot: data/facades/
phase: train
max_dataset_size: inf
direction: BtoA
input_nc: 3
output_nc: 3
serial_batches: False
pool_size: 0
transform:
load_size: 286
crop_size: 256
preprocess: resize_and_crop
no_flip: False
test:
name: PairedDataset
dataroot: data/facades/
phase: test
max_dataset_size: inf
direction: BtoA
input_nc: 3
output_nc: 3
serial_batches: True
pool_size: 50
transform:
load_size: 256
crop_size: 256
preprocess: resize_and_crop
no_flip: True
optimizer:
name: Adam
beta1: 0.5
lr_scheduler:
name: linear
learning_rate: 0.0002
start_epoch: 100
decay_epochs: 100
log_config:
interval: 100
visiual_interval: 500
snapshot_config:
interval: 5
FILE=$1
URL=https://people.eecs.berkeley.edu/~tinghuiz/projects/pix2pix/datasets/$FILE.tar.gz
TAR_FILE=./$FILE.tar.gz
TARGET_DIR=./$FILE/
wget -N $URL -O $TAR_FILE --no-check-certificate
mkdir $TARGET_DIR
tar -zxvf $TAR_FILE -C ../data/
rm $TAR_FILE
rm -rf $TARGET_DIR
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册