MT-GAN-PyTorch - PyTorch Implementation of Learning to Transfer: Unsupervised Domain Translation via Meta-Learning

Overview

MT-GAN-PyTorch

PyTorch Implementation of AAAI-2020 Paper "Learning to Transfer: Unsupervised Domain Translation via Meta-Learning"

Dependency:

Python 3.6

PyTorch 0.4.0

Usage:

Unsupervised Domain Translation via Meta-Learning

  1. Downloading labels2photos, horses2zebras, summer2winter, apple2orange, monet2photo, cezanne2photo, ukiyoe2photo, vangogh2photo, photos2maps and labels2facades datasets following CycleGAN.

  2. Organize these translation datasets as:

    meta_datarooot
    ├── vangogh2photo
    |   ├── trainA
    |   ├── trainB
    |   
    ├── ukiyoe2photo
        ├── trainA
        ├── trainB
    ...
    
  3. Train MT-GAN on 10-shot tranlation:

    $ python train.py --name mtgan_results --model mt_gan --meta_dataroot meta_datarooot --k_spt 10 --k_qry 10 --finetune_step 1000

  4. Test MT-GAN on 10-shot translation:

    $ python test.py --name mtgan_results --model mt_gan --meta_dataroot meta_datarooot --k_spt 10 --k_qry 10 --finetune_step 1000

  5. Train MT-GAN on 5-shot translation:

    $ python train.py --name mtgan_results --model mt_gan --meta_dataroot meta_datarooot --k_spt 5 --k_qry 5 --finetune_step 1000

  6. Test MT-GAN on 5-shot translation:

    $ python test.py --name mtgan_results --model mt_gan --meta_dataroot meta_datarooot --k_spt 5 --k_qry 5 --finetune_step 1000

You might also like...
Code of Adverse Weather Image Translation with Asymmetric and Uncertainty aware GAN
Code of Adverse Weather Image Translation with Asymmetric and Uncertainty aware GAN

Adverse Weather Image Translation with Asymmetric and Uncertainty-aware GAN (AU-GAN) Official Tensorflow implementation of Adverse Weather Image Trans

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.

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.

Official Implementation of Domain-Aware Universal Style Transfer
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

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-

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

[CVPR 2021] Unsupervised 3D Shape Completion through GAN Inversion
[CVPR 2021] Unsupervised 3D Shape Completion through GAN Inversion

ShapeInversion Paper Junzhe Zhang, Xinyi Chen, Zhongang Cai, Liang Pan, Haiyu Zhao, Shuai Yi, Chai Kiat Yeo, Bo Dai, Chen Change Loy "Unsupervised 3D

Code for Dual Contrastive Learning for Unsupervised Image-to-Image Translation, NTIRE, CVPRW 2021.
Code for Dual Contrastive Learning for Unsupervised Image-to-Image Translation, NTIRE, CVPRW 2021.

arXiv Dual Contrastive Learning Adversarial Generative Networks (DCLGAN) We provide our PyTorch implementation of DCLGAN, which is a simple yet powerf

Implementation of
Implementation of "JOKR: Joint Keypoint Representation for Unsupervised Cross-Domain Motion Retargeting"

JOKR: Joint Keypoint Representation for Unsupervised Cross-Domain Motion Retargeting Pytorch implementation for the paper "JOKR: Joint Keypoint Repres

Official implementation of "DSP: Dual Soft-Paste for Unsupervised Domain Adaptive Semantic Segmentation"

DSP Official implementation of "DSP: Dual Soft-Paste for Unsupervised Domain Adaptive Semantic Segmentation". Accepted by ACM Multimedia 2021. Authors

Comments
  • Regarding loading state_dict in finetuning

    Regarding loading state_dict in finetuning

    Firstly, thank you for making the code public, makes it a lot easier for people who want to apply this method to other domains.

    Secondly, I'd like to ask if the following is intentional or a copy-paste error:

            netG_A.load_state_dict(self.netG_A.state_dict()) 
            netG_B.load_state_dict(self.netG_A.state_dict())
            netD_A.load_state_dict(self.netD_A.state_dict()) 
            netD_B.load_state_dict(self.netD_A.state_dict()) 
    

    MT-GAN-PyTorch/models/mt_gan_model.py line: 270 -273

    Shouldn't netG_B and netD_B be loaded with self.netG_B and self.netD_B state_dicts respectively? If I am not mistakenstate_dict doesn't only contain the architecture information but also the network weights. Also, if it's intentional, then I find it a bit confusing that how models performing opposite operations can share the same weights?

    opened by omayrkhan 0
  • Drawing the Figure 1,2 in the paper and table 1 and table 2

    Drawing the Figure 1,2 in the paper and table 1 and table 2

    Dear Sir , Brilliant Work! ..thank you very much for your efforts. Please how can I plot ( Figures 1,2 in your paper ) Moreover, how can I get the same results you put in the table 1 and table 2 ?? thanks in advance.

    opened by BassantTolba1234 0
Owner
Ph.D. Candidate of University of Science and Technology of China
null
Implementation of "Meta-rPPG: Remote Heart Rate Estimation Using a Transductive Meta-Learner"

Meta-rPPG: Remote Heart Rate Estimation Using a Transductive Meta-Learner This repository is the official implementation of Meta-rPPG: Remote Heart Ra

Eugene Lee 137 Dec 13, 2022
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
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

null 238 Dec 22, 2022
CDTrans: Cross-domain Transformer for Unsupervised Domain Adaptation

[ICCV2021] TransReID: Transformer-based Object Re-Identification [pdf] The official repository for TransReID: Transformer-based Object Re-Identificati

DamoCV 569 Dec 30, 2022
Pytorch implementation of CVPR2021 paper "MUST-GAN: Multi-level Statistics Transfer for Self-driven Person Image Generation"

MUST-GAN Code | paper The Pytorch implementation of our CVPR2021 paper "MUST-GAN: Multi-level Statistics Transfer for Self-driven Person Image Generat

TianxiangMa 46 Dec 26, 2022
Official PyTorch implementation of Retrieve in Style: Unsupervised Facial Feature Transfer and Retrieval.

Retrieve in Style: Unsupervised Facial Feature Transfer and Retrieval PyTorch This is the PyTorch implementation of Retrieve in Style: Unsupervised Fa

null 60 Oct 12, 2022
FuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space OptimizationFuseDream: Training-Free Text-to-Image Generationwith Improved CLIP+GAN Space Optimization

FuseDream This repo contains code for our paper (paper link): FuseDream: Training-Free Text-to-Image Generation with Improved CLIP+GAN Space Optimizat

XCL 191 Dec 31, 2022
DR-GAN: Automatic Radial Distortion Rectification Using Conditional GAN in Real-Time

DR-GAN: Automatic Radial Distortion Rectification Using Conditional GAN in Real-Time Introduction This is official implementation for DR-GAN (IEEE TCS

Kang Liao 18 Dec 23, 2022
PyTorch Implementation of CycleGAN and SSGAN for Domain Transfer (Minimal)

MNIST-to-SVHN and SVHN-to-MNIST PyTorch Implementation of CycleGAN and Semi-Supervised GAN for Domain Transfer. Prerequites Python 3.5 PyTorch 0.1.12

Yunjey Choi 401 Dec 30, 2022
A PyTorch implementation for Unsupervised Domain Adaptation by Backpropagation(DANN), support Office-31 and Office-Home dataset

DANN A PyTorch implementation for Unsupervised Domain Adaptation by Backpropagation Prerequisites Linux or OSX NVIDIA GPU + CUDA (may CuDNN) and corre

null 8 Apr 16, 2022