All Projects → sagiebenaim → Oneshottranslation

sagiebenaim / Oneshottranslation

Licence: other
Pytorch implementation of "One-Shot Unsupervised Cross Domain Translation" NIPS 2018

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Oneshottranslation

Distancegan
Pytorch implementation of "One-Sided Unsupervised Domain Mapping" NIPS 2017
Stars: ✭ 180 (+33.33%)
Mutual labels:  gan, unsupervised-learning, image-generation, image-manipulation
Tsit
[ECCV 2020 Spotlight] A Simple and Versatile Framework for Image-to-Image Translation
Stars: ✭ 141 (+4.44%)
Mutual labels:  gan, image-generation, image-manipulation
Cyclegan
Software that can generate photos from paintings, turn horses into zebras, perform style transfer, and more.
Stars: ✭ 10,933 (+7998.52%)
Mutual labels:  gan, image-generation, image-manipulation
Pix2pix
Image-to-image translation with conditional adversarial nets
Stars: ✭ 8,765 (+6392.59%)
Mutual labels:  gan, image-generation, image-manipulation
Focal Frequency Loss
Focal Frequency Loss for Generative Models
Stars: ✭ 141 (+4.44%)
Mutual labels:  gan, image-generation, image-manipulation
Anycost Gan
[CVPR 2021] Anycost GANs for Interactive Image Synthesis and Editing
Stars: ✭ 367 (+171.85%)
Mutual labels:  gan, image-generation, image-manipulation
Pytorch Cyclegan And Pix2pix
Image-to-Image Translation in PyTorch
Stars: ✭ 16,477 (+12105.19%)
Mutual labels:  gan, image-generation, image-manipulation
automatic-manga-colorization
Use keras.js and cyclegan-keras to colorize manga automatically. All computation in browser. Demo is online:
Stars: ✭ 20 (-85.19%)
Mutual labels:  gan, image-manipulation, image-generation
UEGAN
[TIP2020] Pytorch implementation of "Towards Unsupervised Deep Image Enhancement with Generative Adversarial Network"
Stars: ✭ 68 (-49.63%)
Mutual labels:  gan, image-manipulation, unsupervised-learning
Awesome-ICCV2021-Low-Level-Vision
A Collection of Papers and Codes for ICCV2021 Low Level Vision and Image Generation
Stars: ✭ 163 (+20.74%)
Mutual labels:  gan, image-manipulation, image-generation
Exprgan
Facial Expression Editing with Controllable Expression Intensity
Stars: ✭ 98 (-27.41%)
Mutual labels:  gan, image-generation, image-manipulation
Hidt
Official repository for the paper "High-Resolution Daytime Translation Without Domain Labels" (CVPR2020, Oral)
Stars: ✭ 513 (+280%)
Mutual labels:  gan, unsupervised-learning, image-generation
Lggan
[CVPR 2020] Local Class-Specific and Global Image-Level Generative Adversarial Networks for Semantic-Guided Scene Generation
Stars: ✭ 97 (-28.15%)
Mutual labels:  gan, image-generation, image-manipulation
Domain Transfer Network
TensorFlow Implementation of Unsupervised Cross-Domain Image Generation
Stars: ✭ 850 (+529.63%)
Mutual labels:  unsupervised-learning, image-generation
Contrastive Unpaired Translation
Contrastive unpaired image-to-image translation, faster and lighter training than cyclegan (ECCV 2020, in PyTorch)
Stars: ✭ 822 (+508.89%)
Mutual labels:  image-generation, image-manipulation
Image To Image Papers
🦓<->🦒 🌃<->🌆 A collection of image to image papers with code (constantly updating)
Stars: ✭ 949 (+602.96%)
Mutual labels:  gan, image-manipulation
Context Encoder
[CVPR 2016] Unsupervised Feature Learning by Image Inpainting using GANs
Stars: ✭ 731 (+441.48%)
Mutual labels:  gan, unsupervised-learning
Discogan Pytorch
PyTorch implementation of "Learning to Discover Cross-Domain Relations with Generative Adversarial Networks"
Stars: ✭ 961 (+611.85%)
Mutual labels:  gan, unsupervised-learning
Combogan
Stars: ✭ 134 (-0.74%)
Mutual labels:  gan, image-manipulation
Mixnmatch
Pytorch implementation of MixNMatch
Stars: ✭ 694 (+414.07%)
Mutual labels:  image-generation, image-manipulation

Pytorch implementation of One-Shot Unsupervised Cross Domain Translation (arxiv).

Prerequisites

  • Python 3.6
  • Pytorch 0.4
  • Numpy/Scipy/Pandas
  • Progressbar
  • OpenCV
  • visdom
  • dominate

MNIST-to-SVHN and SVHN-to-MNIST

To train autoencoder for both MNIST and SVHN (In mnist_to_svhn folder): python main_autoencoder.py --use_augmentation=True

To train OST for MNIST to SVHN: python main_mnist_to_svhn.py --pretrained_g=True --save_models_and_samples=True --use_augmentation=True --one_way_cycle=True --freeze_shared=False

To train OST for SVHN to MNIST: python main_svhn_to_mnist.py --pretrained_g=True --save_models_and_samples=True --use_augmentation=True --one_way_cycle=True --freeze_shared=False

Drawing and Style Transfer Tasks

Download Dataset

To download dataset (in drawing_and_style_transfer folder): bash datasets/download_cyclegan_dataset.sh $DATASET_NAME where DATASET_NAME is one of (facades, cityscapes, maps, monet2photo, summer2winter_yosemite)

Train Autoencoder

To train autoencoder for facades (in drawing_and_style_transfer folder): python train.py --dataroot=./datasets/facades/trainB --name=facades_autoencoder --model=autoencoder --dataset_mode=single --no_dropout --n_downsampling=2 --num_unshared=2

In the reverse direction (images of facades): python train.py --dataroot=./datasets/facades/trainA --name=facades_autoencoder_reverse --model=autoencoder --dataset_mode=single --no_dropout --n_downsampling=2 --num_unshared=2

Train OST

To train OST for images to facades: python train.py --dataroot=./datasets/facades/ --name=facades_ost --load_dir=facades_autoencoder --model=ost --no_dropout --n_downsampling=2 --num_unshared=2 --start=0 --max_items_A=1

To train OST for facades to images (reverse direction): python train.py --dataroot=./datasets/facades/ --name=facades_ost_reverse --load_dir=facades_autoencoder_reverse --model=ost --no_dropout --n_downsampling=2 --num_unshared=2 --start=0 --max_items_A=1 --A='B' --B='A'

To visualize losses: run python -m visdom.server

Test OST

To test OST for images to facades: python test.py --dataroot=./datasets/facades/ --name=facades_ost --model=ost --no_dropout --n_downsampling=2 --num_unshared=2 --start=0 --max_items_A=1

To test OST for facades to images (reverse direction): python test.py --dataroot=./datasets/facades/ --name=facades_ost_reverse --model=ost --no_dropout --n_downsampling=2 --num_unshared=2 --start=0 --max_items_A=1 --A='B' --B='A'

Options

Additional scripts for other datasets are at ./drawing_and_style_transfer/scripts

Options are at ./drawing_and_style_transfer/options

Reference

If you found this code useful, please cite the following paper:

@inproceedings{Benaim2018OneShotUC,
  title={One-Shot Unsupervised Cross Domain Translation},
  author={Sagie Benaim and Lior Wolf},
  booktitle={NeurIPS},
  year={2018}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].