jolibrain / pytorch-CycleGAN-and-pix2pix

Image-to-Image Translation in PyTorch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Logo

Prerequisites

  • Linux or macOS
  • Python 3
  • CPU or NVIDIA GPU + CUDA CuDNN

Getting Started

Installation

  • Clone this repo:
git clone https://github.com/jolibrain/pytorch-CycleGAN-and-pix2pix
cd pytorch-CycleGAN-and-pix2pix
  • Install PyTorch and other dependencies (torchvision, visdom and dominate, FID).
    • For pip users, please type the command pip install -r requirements.txt.

JoliGAN train

  • Options :
Model Network Decoder
CycleGAN, CycleGAN_semantic, CycleGAN_semantic_mask resnet, Unet, mobile_resnet Vanilla, Sty2

You can tune the hyperparameters in ./scripts/train_cyclegan.sh and then use the following line command.

bash ./scripts/train_cyclegan.sh

You can tune the hyperparameters in ./scripts/train_cyclegan_semantic.sh and then use the following line command.

bash ./scripts/train_cyclegan_semantic.sh

You can tune the hyperparameters in ./scripts/train_cyclegan_semantic_mask.sh and then use the following line command.

bash ./scripts/train_cyclegan_semantic_mask.sh

Datasets

  • Unaligned : apple2orange, horse2zebra
  • Unaligned with labels : svhn2mnist
  • Unaligned with mask labels : glasses2noglasses,

Dataloader

To choose a dataloader please use the flag --dataset_mode dataloader_name. There are three dataloaders for different dataset architectures :

  • Unaligned (unaligned)
  • Unaligned with labels (unaligned_labeled)
  • Unaligned with mask labels (unaligned_labeled_mask)

Acknowledgments

Our code is inspired by pytorch-CycleGAN-and-pix2pix.

About

Image-to-Image Translation in PyTorch

License:Other


Languages

Language:Python 94.6%Language:Cuda 2.6%Language:Shell 2.0%Language:MATLAB 0.4%Language:C++ 0.4%