junyanz/BicycleGAN sits at 1.5k stars on GitHub, written primarily in Python. Toward Multimodal Image-to-Image Translation
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
Pytorch implementation for multimodal image-to-image translation. For example, given the same night image, our model is able to synthesize possible day images with different types of lighting, sky and clouds. The training requires paired data.
Note: The current software works well with PyTorch 0.41+. Check out the older branch that supports PyTorch 0.1-0.3.
Toward Multimodal Image-to-Image Translation.
Jun-Yan Zhu,
Richard Zhang, Deepak Pathak, Trevor Darrell, Alexei A. Efros, Oliver Wang, Eli Shechtman.
UC Berkeley and Adobe Research
In Neural Information Processing Systems, 2017.
Example results
Other Implementations
[Tensorflow] by Youngwoon Lee (USC CLVR Lab).
[Tensorflow] by Kv Manohar.
Prerequisites
Linux or macOS
Python 3
CPU or NVIDIA GPU + CUDA CuDNN
Getting Started
Installation
Clone this repo:
git clone -b master --single-branch https://github.com/junyanz/BicycleGAN.git
cd BicycleGAN
Install PyTorch and dependencies from http://pytorch.org
Install python libraries visdom, dominate, and moviepy.
The test results will be saved to a html file here: ./results/edges2shoes/val/index.html.
Generate results with synchronized latent vectors
bash ./scripts/test_edges2shoes.sh --sync
Results can be found at ./results/edges2shoes/val_sync/index.html.
Generate Morphing Videos
We can also produce a morphing video similar to this GIF and Youtube video.
bash ./scripts/video_edges2shoes.sh
Results can be found at ./videos/edges2shoes/.
Model Training
To train a model, download the training images (e.g., edges2shoes).
bash ./datasets/download_dataset.sh edges2shoes
Train a model:
bash ./scripts/train_edges2shoes.sh
To view training results and loss plots, run python -m visdom.server and click the URL http://localhost:8097. To see more intermediate results, check out ./checkpoints/edges2shoes_bicycle_gan/web/index.html
See more training details for other datasets in ./scripts/train.sh.
Datasets (from pix2pix)
Download the datasets using the following script. Many of the datasets are collected by other researchers. Please cite their papers if you use the data.
Download the testset.
bash ./datasets/download_testset.sh dataset_name
Download the training and testset.
bash ./datasets/download_dataset.sh dataset_name
facades: 400 images from CMP Facades dataset. [Citation]
maps: 1096 training images scraped from Google Maps
edges2shoes: 50k training images from UT Zappos50K dataset. Edges are computed by HED edge detector + post-processing. [Citation]
edges2handbags: 137K Amazon Handbag images from iGAN project. Edges are computed by HED edge detector + post-processing. [Citation]
night2day: around 20K natural scene images from Transient Attributes dataset [Citation]
Models
Download the pre-trained models with the following script.
Figure 6 shows realism vs diversity of our method.
Realism We use the Amazon Mechanical Turk (AMT) Real vs Fake test from this repository, first introduced in this work.
Diversity For each input image, we produce 20 translations by randomly sampling 20 z vectors. We compute LPIPS distance between consecutive pairs to get 19 paired distances. You can compute this by putting the 20 images into a directory and using this script (note that we used version 0.0 rather than default 0.1, so use flag -v 0.0). This is done for 100 input images. This results in 1900 total distances (100 images X 19 paired distances each), which are averaged together. A larger number means higher diversity.
Citation
If you find this useful for your research, please use the following.
@inproceedings{zhu2017toward,
title={Toward multimodal image-to-image translation},
author={Zhu, Jun-Yan and Zhang, Richard and Pathak, Deepak and Darrell, Trevor and Efros, Alexei A and Wang, Oliver and Shechtman, Eli},
booktitle={Advances in Neural Information Processing Systems},
year={2017}
}
If you use modules from CycleGAN or pix2pix paper, please use the following:
@inproceedings{CycleGAN2017,
title={Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networkss},
author={Zhu, Jun-Yan and Park, Taesung and Isola, Phillip and Efros, Alexei A},
booktitle={Computer Vision (ICCV), 2017 IEEE International Conference on},
year={2017}
}
@inproceedings{isola2017image,
title={Image-to-Image Translation with Conditional Adversarial Networks},
author={Isola, Phillip and Zhu, Jun-Yan and Zhou, Tinghui and Efros, Alexei A},
booktitle={Computer Vision and Pattern Recognition (CVPR), 2017 IEEE Conference on},
year={2017}
}
Acknowledgements
This code borrows heavily from the pytorch-CycleGAN-and-pix2pix repository.
The most recent commit recorded on junyanz/BicycleGAN was 6.3 years ago, based on the GitHub push timestamp. The repository has 252 forks — one of the better signals of community interest.
Is junyanz/BicycleGAN open source?
TopGit's metadata for junyanz/BicycleGAN does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What topics is junyanz/BicycleGAN associated with?
GitHub's repository topics for junyanz/BicycleGAN: "deep-learning", "gans", "generative-adversarial-network", "pix2pix", "pytorch". TopGit's editorial category is AI Tools.
Where can I see junyanz/BicycleGAN in action?
The project maintains a homepage at https://junyanz.github.io/BicycleGAN/. The README tab on this page also usually contains screenshots and a quickstart.
Where do I read more about junyanz/BicycleGAN?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/junyanz/BicycleGAN is the definitive source.
Read full README in the tab above.
Curious whether BicycleGAN is right for you?
Let ChatGPT, Claude, or Perplexity look into it — click below and see what AI actually says about BicycleGAN.