PyTorch Implementation of CycleGAN and SSGAN for Domain Transfer (Minimal)

Overview

MNIST-to-SVHN and SVHN-to-MNIST

PyTorch Implementation of CycleGAN and Semi-Supervised GAN for Domain Transfer.

alt text

Prerequites


Usage

Clone the repository

$ git clone https://github.com/yunjey/mnist-svhn-transfer.git
$ cd mnist-svhn-transfer/

Download the dataset

$ chmod +x download.sh
$ ./download.sh

Train the model

1) CycleGAN
$ python main.py --use_labels=False --use_reconst_loss=True
2) SGAN
$ python main.py --use_labels=True --use_reconst_loss=False

Results

1) CycleGAN (should be re-uploaded)

From SVHN to MNIST From MNIST to SVHN
alt text alt text
alt text alt text

2) SGAN

From SVHN to MNIST From MNIST to SVHN
alt text alt text
alt text alt text
You might also like...
Transfer style api - An API to use with Tranfer Style App, where you can use two image and transfer the style

Transfer Style API It's an API to use with Tranfer Style App, where you can use

Implementation for
Implementation for "Domain-Specific Bias Filtering for Single Labeled Domain Generalization"

DSBF Introduction This repository contains the implementation code for paper: Domain-Specific Bias Filtering for Single Labeled Domain Generalization

Personalized Transfer of User Preferences for Cross-domain Recommendation (PTUPCDR)

This is the official implementation of our paper Personalized Transfer of User Preferences for Cross-domain Recommendation (PTUPCDR), which has been accepted by WSDM2022.

Minimal PyTorch implementation of YOLOv3
Minimal PyTorch implementation of YOLOv3

A minimal PyTorch implementation of YOLOv3, with support for training, inference and evaluation.

Minimal PyTorch implementation of Generative Latent Optimization from the paper
Minimal PyTorch implementation of Generative Latent Optimization from the paper "Optimizing the Latent Space of Generative Networks"

Minimal PyTorch implementation of Generative Latent Optimization This is a reimplementation of the paper Piotr Bojanowski, Armand Joulin, David Lopez-

Yolov5-lite - Minimal PyTorch implementation of YOLOv5
Yolov5-lite - Minimal PyTorch implementation of YOLOv5

Yolov5-Lite: Minimal YOLOv5 + Deep Sort Overview This repo is a shortened versio

[CVPR2021] Domain Consensus Clustering for Universal Domain Adaptation

[CVPR2021] Domain Consensus Clustering for Universal Domain Adaptation [Paper] Prerequisites To install requirements: pip install -r requirements.txt

Variational Attention: Propagating Domain-Specific Knowledge for Multi-Domain Learning in Crowd Counting (ICCV, 2021)

DKPNet ICCV 2021 Variational Attention: Propagating Domain-Specific Knowledge for Multi-Domain Learning in Crowd Counting Baseline of DKPNet is availa

CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation

CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation [arxiv] This is the official repository for CDTrans: Cross-domain Transformer for

Comments
  • implementation problems here

    implementation problems here

    I found two problems about the code. First, the reconstruction loss should be L1 loss instead of L2, according to cycleGAN's paper. Second, the generator and discriminator should update simutaneously, while in the code it firstly update discriminator and then use updated discriminator to update generator, which is wrong.

    opened by Ledzy 0
  • So is this code actually working?

    So is this code actually working?

    So is this code actually working? Readme says "(should be re-uploaded)", What does that mean? Some people here report that this code is just memorizing training examples but does not generalize. Is this true?

    Even worse than having no code is having code that is pretending to work but will just waste your time and then you have to implement it from scratch anyway...

    opened by mario98 9
  • the result is very pool

    the result is very pool

    when i run your code about cyclegan svhn to mnist,i find the result is very pool,maybe the sample example is good,but,the test examples is pool. for example ,it can translate 8 to 5, 2 to 0,the correct rate of the generate mnist is about 25%,when the correct rate about train mnist classify is 99%.

    opened by daishuolove 1
  • testing code

    testing code

    Hi, thanks for sharing the well-written code. Could you please also share the testing code? I have successfully trained the model, now I just want to test it on the validation set.

    opened by juntingzh 1
Owner
Yunjey Choi
Yunjey Choi
code for our paper "Source Data-absent Unsupervised Domain Adaptation through Hypothesis Transfer and Labeling Transfer"

SHOT++ Code for our TPAMI submission "Source Data-absent Unsupervised Domain Adaptation through Hypothesis Transfer and Labeling Transfer" that is ext

null 75 Dec 16, 2022
This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models are Pix2Pix, Pix2PixHD, CycleGAN and PointWise.

RGB2NIR_Experimental This repository contains several image-to-image translation models, whcih were tested for RGB to NIR image generation. The models

null 5 Jan 4, 2023
Code for CVPR2021 "Visualizing Adapted Knowledge in Domain Transfer". Visualization for domain adaptation. #explainable-ai

Visualizing Adapted Knowledge in Domain Transfer @inproceedings{hou2021visualizing, title={Visualizing Adapted Knowledge in Domain Transfer}, auth

Yunzhong Hou 80 Dec 25, 2022
Bald-to-Hairy Translation Using CycleGAN

GANiry: Bald-to-Hairy Translation Using CycleGAN Official PyTorch implementation of GANiry. GANiry: Bald-to-Hairy Translation Using CycleGAN, Fidan Sa

Fidan Samet 10 Oct 27, 2022
Minimal diffusion models - Minimal code and simple experiments to play with Denoising Diffusion Probabilistic Models (DDPMs)

Minimal code and simple experiments to play with Denoising Diffusion Probabilist

Rithesh Kumar 16 Oct 6, 2022
Official pytorch implementation of "Feature Stylization and Domain-aware Contrastive Loss for Domain Generalization" ACMMM 2021 (Oral)

Feature Stylization and Domain-aware Contrastive Loss for Domain Generalization This is an official implementation of "Feature Stylization and Domain-

null 22 Sep 22, 2022
A Pytorch Implementation of [Source data‐free domain adaptation of object detector through domain

A Pytorch Implementation of Source data‐free domain adaptation of object detector through domain‐specific perturbation Please follow Faster R-CNN and

null 1 Dec 25, 2021
Designing a Minimal Retrieve-and-Read System for Open-Domain Question Answering (NAACL 2021)

Designing a Minimal Retrieve-and-Read System for Open-Domain Question Answering Abstract In open-domain question answering (QA), retrieve-and-read mec

Clova AI Research 34 Apr 13, 2022
Official Implementation of Domain-Aware Universal Style Transfer

Domain Aware Universal Style Transfer Official Pytorch Implementation of 'Domain Aware Universal Style Transfer' (ICCV 2021) Domain Aware Universal St

KibeomHong 80 Dec 30, 2022
Transfer-Learn is an open-source and well-documented library for Transfer Learning.

Transfer-Learn is an open-source and well-documented library for Transfer Learning. It is based on pure PyTorch with high performance and friendly API. Our code is pythonic, and the design is consistent with torchvision. You can easily develop new algorithms, or readily apply existing algorithms.

THUML @ Tsinghua University 2.2k Jan 3, 2023