TensorFlow implementation of SG-GAN.
- TensorFlow (implemented in v1.3)
- numpy
- scipy
- pillow
-
Prepare dataset. We present example images in
datasets
folder for reference as data format, and scriptsprepare_data.py
andsegment_class.py
for reference in preparing dataset. -
Train a model:
CUDA_VISIBLE_DEVICES=0 python main.py
Models are saved to ./checkpoints/
(can be changed by passing --checkpoint_dir=your_dir
).
- Continue training a model (useful for updating parameters)
CUDA_VISIBLE_DEVICES=0 python main.py --continue_train 1
- Finally, test the model:
CUDA_VISIBLE_DEVICES=0 python main.py --phase test --img_width 2048 --img_height 1024
Adapted test images will be outputted to ./test/
(can be changed by passing --test_dir=your_dir
).
- The TensorFlow implementation of CycleGAN, https://github.com/xhujoy/CycleGAN-tensorflow