Adversarial Reweighting for Partial Domain Adaptation

Overview

Adversarial Reweighting for Partial Domain Adaptation

Code for paper "Xiang Gu, Xi Yu, Yan Yang, Jian Sun, Zongben Xu, Adversarial Reweighting for Partial Domain Adaptation, Conference on Neural Information Processing Systems (NeurIPS), 2021".

Prerequisites:

python==3.6.13
pytorch ==1.5.1
torchvision ==0.6.1
numpy==1.19.2
cvxpy ==1.1.14
tqdm ==4.1.2
Pillow == 8.3.1

Datasets:

Download the datasets of
VisDA-2017
DomainNet
Office-Home
Office
ImageNet
Caltech-256
and put them into the folder "./data/" and modify the path of images in each '.txt' under the folder './data/'. Note the full list of ImageNet (imagenet.txt) is too big. Please download it here and put it into './data/imagenet_caltech/'.

Domain ID:

VisDA-2017: train (synthetic), validation (real) ==> 0,1
DomainNet: clipart, painting, real, sketch ==> 0,1,2,3
Office-Home: Art, Clipart, Product, RealWorld ==> 0,1,2,3
Office: amazon, dslr, webcam ==> 0,1,2
ImageNet-Caltech: imagenet, caltech ==> 0,1

Training

VisDA-2017:

python train.py --dset visda-2017 --s 0 --t 1

DomainNet:

python train.py --dset domainnet --s 0 --t 1

Office-Home:

#for AR
python train.py --dset office_home --s 0 --t 1
#for AR+LS
python train.py --dset office_home --s 0 --t 1 --label_smooth

Office:

python train.py --dset office --s 0 --t 1

ImageNet-Caltech:

python train.py --dset imagenet_caltech --s 0 --t 1

Citation:

@inproceedings{
gu2021adversarial,
title={Adversarial Reweighting for Partial Domain Adaptation},
author={Xiang Gu and Xi Yu and Yan Yang and Jian Sun and Zongben Xu},
booktitle={Thirty-Fifth Conference on Neural Information Processing Systems},
year={2021},
url={https://openreview.net/forum?id=f5liPryFRoA}
}

Reference code:

https://github.com/thuml/CDAN
https://github.com/tim-learn/BA3US
https://github.com/XJTU-XGU/RSDA

Contact:

If you have any problem, feel free to contect [email protected].

You might also like...
Progressive Domain Adaptation for Object Detection
Progressive Domain Adaptation for Object Detection

Progressive Domain Adaptation for Object Detection Implementation of our paper Progressive Domain Adaptation for Object Detection, based on pytorch-fa

Code release for
Code release for "Transferable Semantic Augmentation for Domain Adaptation" (CVPR 2021)

Transferable Semantic Augmentation for Domain Adaptation Code release for "Transferable Semantic Augmentation for Domain Adaptation" (CVPR 2021) Paper

Code to reproduce the experiments in the paper
Code to reproduce the experiments in the paper "Transformer Based Multi-Source Domain Adaptation" (EMNLP 2020)

Transformer Based Multi-Source Domain Adaptation Dustin Wright and Isabelle Augenstein To appear in EMNLP 2020. Read the preprint: https://arxiv.org/a

PyTorch code for the paper
PyTorch code for the paper "Curriculum Graph Co-Teaching for Multi-target Domain Adaptation" (CVPR2021)

PyTorch code for the paper "Curriculum Graph Co-Teaching for Multi-target Domain Adaptation" (CVPR2021) This repo presents PyTorch implementation of M

Self-Supervised Learning for Domain Adaptation on Point-Clouds
Self-Supervised Learning for Domain Adaptation on Point-Clouds

Self-Supervised Learning for Domain Adaptation on Point-Clouds Introduction Self-supervised learning (SSL) allows to learn useful representations from

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

The official codes of
The official codes of "Semi-supervised Models are Strong Unsupervised Domain Adaptation Learners".

SSL models are Strong UDA learners Introduction This is the official code of paper "Semi-supervised Models are Strong Unsupervised Domain Adaptation L

Official pytorch implement for “Transformer-Based Source-Free Domain Adaptation”
Official pytorch implement for “Transformer-Based Source-Free Domain Adaptation”

Official implementation for TransDA Official pytorch implement for “Transformer-Based Source-Free Domain Adaptation”. Overview: Result: Prerequisites:

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

Comments
  • AR (w/ linear)

    AR (w/ linear)

    Hi,

    First of all, thank you for sharing your code!

    I tried to replicate the results for AR (w/linear) for Office-Home on the AC task. I did so by setting the variable normalize_classifier = False. However, I was only able to achieve 60.24% while the paper reports 62.13%. Are there any other changes I need to make to the code to achieve the reported accuracy?

    Thanks!

    opened by tiagosalvador 2
Owner
null
Robust Self-augmentation for NER with Meta-reweighting

Robust Self-augmentation for NER with Meta-reweighting

Lam chi 17 Nov 22, 2022
RDA: Robust Domain Adaptation via Fourier Adversarial Attacking

RDA: Robust Domain Adaptation via Fourier Adversarial Attacking Updates 08/2021: check out our domain adaptation for video segmentation paper Domain A

null 17 Nov 30, 2022
FedMM: Saddle Point Optimization for Federated Adversarial Domain Adaptation

This repository contains the code accompanying the paper " FedMM: Saddle Point Optimization for Federated Adversarial Domain Adaptation" Paper link: R

null 20 Jun 29, 2022
Cycle Consistent Adversarial Domain Adaptation (CyCADA)

Cycle Consistent Adversarial Domain Adaptation (CyCADA) A pytorch implementation of CyCADA. If you use this code in your research please consider citi

Hyunwoo Ko 2 Jan 10, 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
[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

Guangrui Li 84 Dec 26, 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
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
Partial implementation of ODE-GAN technique from the paper Training Generative Adversarial Networks by Solving Ordinary Differential Equations

ODE GAN (Prototype) in PyTorch Partial implementation of ODE-GAN technique from the paper Training Generative Adversarial Networks by Solving Ordinary

Somshubra Majumdar 15 Feb 10, 2022