A collection of implementations of deep domain adaptation algorithms

Overview

Deep Transfer Learning on PyTorch

MIT License

This is a PyTorch library for deep transfer learning. We divide the code into two aspects: Single-source Unsupervised Domain Adaptation (SUDA) and Multi-source Unsupervised Domain Adaptation (MUDA). There are many SUDA methods, however I find there is a few MUDA methods with deep learning. Besides, MUDA with deep learning might be a more promising direction for domain adaptation.

Here I have implemented some deep transfer methods as follows:

  • UDA
    • DDC:Deep Domain Confusion Maximizing for Domain Invariance
    • DAN: Learning Transferable Features with Deep Adaptation Networks (ICML2015)
    • Deep Coral: Deep CORAL Correlation Alignment for Deep Domain Adaptation (ECCV2016)
    • Revgrad: Unsupervised Domain Adaptation by Backpropagation (ICML2015)
    • MRAN: Multi-representation adaptation network for cross-domain image classification (Neural Network 2019)
    • DSAN: Deep Subdomain Adaptation Network for Image Classification (IEEE Transactions on Neural Networks and Learning Systems 2020)
  • MUDA
    • Aligning Domain-specific Distribution and Classifier for Cross-domain Classification from Multiple Sources (AAAI2019)
  • Application
    • Cross-domain Fraud Detection: Modeling Users’ Behavior Sequences with Hierarchical Explainable Network for Cross-domain Fraud Detection (WWW2020)
    • Learning to Expand Audience via Meta Hybrid Experts and Critics for Recommendation and Advertising (KDD2021)
  • Survey

Results on Office31(UDA)

Method A - W D - W W - D A - D D - A W - A Average
ResNet 68.4±0.5 96.7±0.5 99.3±0.1 68.9±0.2 62.5±0.3 60.7±0.3 76.1
DDC 75.8±0.2 95.0±0.2 98.2±0.1 77.5±0.3 67.4±0.4 64.0±0.5 79.7
DDC* 78.3±0.4 97.1±0.1 100.0±0.0 81.7±0.9 65.2±0.6 65.1±0.4 81.2
DAN 83.8±0.4 96.8±0.2 99.5±0.1 78.4±0.2 66.7±0.3 62.7±0.2 81.3
DAN* 82.6±0.7 97.7±0.1 100.0±0.0 83.1±0.9 66.8±0.3 66.6±0.4 82.8
DCORAL* 79.0±0.5 98.0±0.2 100.0±0.0 82.7±0.1 65.3±0.3 64.5±0.3 81.6
Revgrad 82.0±0.4 96.9±0.2 99.1±0.1 79.7±0.4 68.2±0.4 67.4±0.5 82.2
Revgrad* 82.6±0.9 97.8±0.2 100.0±0.0 83.3±0.9 66.8±0.1 66.1±0.5 82.8
MRAN 91.4±0.1 96.9±0.3 99.8±0.2 86.4±0.6 68.3±0.5 70.9±0.6 85.6
DSAN 93.6±0.2 98.4±0.1 100.0±0.0 90.2±0.7 73.5±0.5 74.8±0.4 88.4

Note that the results without '*' comes from paper. The results with '*' are run by myself with the code.

Results on Office31(MUDA)

Standards Method A,W - D A,D - W D,W - A Average
ResNet 99.3 96.7 62.5 86.2
DAN 99.5 96.8 66.7 87.7
Single Best DCORAL 99.7 98.0 65.3 87.7
RevGrad 99.1 96.9 68.2 88.1
DAN 99.6 97.8 67.6 88.3
Source Combine DCORAL 99.3 98.0 67.1 88.1
RevGrad 99.7 98.1 67.6 88.5
Multi-Source MFSAN 99.5 98.5 72.7 90.2

Results on OfficeHome(MUDA)

Standards Method C,P,R - A A,P,R - C A,C,R - P A,C,P - R Average
ResNet 65.3 49.6 79.7 75.4 67.5
DAN 64.1 50.8 78.2 75.0 67.0
Single Best DCORAL 68.2 56.5 80.3 75.9 70.2
RevGrad 67.9 55.9 80.4 75.8 70.0
DAN 68.5 59.4 79.0 82.5 72.4
Source Combine DCORAL 68.1 58.6 79.5 82.7 72.2
RevGrad 68.4 59.1 79.5 82.7 72.4
Multi-Source MFSAN 72.1 62.0 80.3 81.8 74.1

Note that (1) Source combine: all source domains are combined together into a traditional single-source v.s. target setting. (2) Single best: among the multiple source domains, we report the best single source transfer results. (3) Multi-source: the results of MUDA methods.

Note

If you find that your accuracy is 100%, the problem might be the dataset folder. Please note that the folder structure required for the data provider to work is:

-dataset
    -amazon
    -webcam
    -dslr

Contact

If you have any problem about this library, please create an Issue or send us an Email at:

Reference

If you use this repository, please cite the following papers:

@inproceedings{zhu2019aligning,
  title={Aligning domain-specific distribution and classifier for cross-domain classification from multiple sources},
  author={Zhu, Yongchun and Zhuang, Fuzhen and Wang, Deqing},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={33},
  pages={5989--5996},
  year={2019}
}
@article{zhu2020deep,
  title={Deep Subdomain Adaptation Network for Image Classification},
  author={Zhu, Yongchun and Zhuang, Fuzhen and Wang, Jindong and Ke, Guolin and Chen, Jingwu and Bian, Jiang and Xiong, Hui and He, Qing},
  journal={IEEE Transactions on Neural Networks and Learning Systems},
  year={2020},
  publisher={IEEE}
}
Owner
Yongchun Zhu
ICT Yongchun Zhu
Yongchun Zhu
A collection of Jupyter notebooks to play with NVIDIA's StyleGAN3 and OpenAI's CLIP for a text-based guided image generation.

StyleGAN3 CLIP-based guidance StyleGAN3 + CLIP StyleGAN3 + inversion + CLIP This repo is a collection of Jupyter notebooks made to easily play with St

Eugenio Herrera 176 Dec 30, 2022
A simplified framework and utilities for PyTorch

Here is Poutyne. Poutyne is a simplified framework for PyTorch and handles much of the boilerplating code needed to train neural networks. Use Poutyne

GRAAL/GRAIL 534 Dec 17, 2022
"Domain Adaptive Semantic Segmentation without Source Data" (ACM MM 2021)

LDBE Pytorch implementation for two papers (the paper will be released soon): "Domain Adaptive Semantic Segmentation without Source Data", ACM MM2021.

benfour 16 Sep 28, 2022
Tandem Mass Spectrum Prediction with Graph Transformers

MassFormer This is the original implementation of MassFormer, a graph transformer for small molecule MS/MS prediction. Check out the preprint on arxiv

Röst Lab 13 Oct 27, 2022
Retinal vessel segmentation based on GT-UNet

Retinal vessel segmentation based on GT-UNet Introduction This project is a retinal blood vessel segmentation code based on UNet-like Group Transforme

Kent0n 27 Dec 18, 2022
Evaluation toolkit of the informative tracking benchmark comprising 9 scenarios, 180 diverse videos, and new challenges.

Informative-tracking-benchmark Informative tracking benchmark (ITB) higher diversity. It contains 9 representative scenarios and 180 diverse videos. m

Xin Li 15 Nov 26, 2022
Where2Act: From Pixels to Actions for Articulated 3D Objects

Where2Act: From Pixels to Actions for Articulated 3D Objects The Proposed Where2Act Task. Given as input an articulated 3D object, we learn to propose

Kaichun Mo 69 Nov 28, 2022
Unconstrained Text Detection with Box Supervisionand Dynamic Self-Training

SelfText Beyond Polygon: Unconstrained Text Detection with Box Supervisionand Dynamic Self-Training Introduction This is a PyTorch implementation of "

weijiawu 34 Nov 09, 2022
Multiple types of NN model optimization environments. It is possible to directly access the host PC GUI and the camera to verify the operation. Intel iHD GPU (iGPU) support. NVIDIA GPU (dGPU) support.

mtomo Multiple types of NN model optimization environments. It is possible to directly access the host PC GUI and the camera to verify the operation.

Katsuya Hyodo 24 Mar 02, 2022
BarcodeRattler - A Raspberry Pi Powered Barcode Reader to load a game on the Mister FPGA using MBC

Barcode Rattler A Raspberry Pi Powered Barcode Reader to load a game on the Mist

Chrissy 29 Oct 31, 2022
lightweight python wrapper for vowpal wabbit

vowpal_porpoise Lightweight python wrapper for vowpal_wabbit. Why: Scalable, blazingly fast machine learning. Install Install vowpal_wabbit. Clone and

Joseph Reisinger 163 Nov 24, 2022
School of Artificial Intelligence at the Nanjing University (NJU)School of Artificial Intelligence at the Nanjing University (NJU)

F-Principle This is an exercise problem of the digital signal processing (DSP) course at School of Artificial Intelligence at the Nanjing University (

Thyrix 5 Nov 23, 2022
This repo is about implementing different approaches of pose estimation and also is a sub-task of the smart hospital bed project :smile:

Pose-Estimation This repo is a sub-task of the smart hospital bed project which is about implementing the task of pose estimation 😄 Many thanks to th

Max 11 Oct 17, 2022
Simple implementation of Mobile-Former on Pytorch

Simple-implementation-of-Mobile-Former At present, only the model but no trained. There may be some bug in the code, and some details may be different

Acheung 103 Dec 31, 2022
a basic code repository for basic task in CV(classification,detection,segmentation)

basic_cv a basic code repository for basic task in CV(classification,detection,segmentation,tracking) classification generate dataset train predict de

1 Oct 15, 2021
Unsupervised Foreground Extraction via Deep Region Competition

Unsupervised Foreground Extraction via Deep Region Competition [Paper] [Code] The official code repository for NeurIPS 2021 paper "Unsupervised Foregr

28 Nov 06, 2022
なりすまし検出(anti-spoof-mn3)のWebカメラ向けデモ

FaceDetection-Anti-Spoof-Demo なりすまし検出(anti-spoof-mn3)のWebカメラ向けデモです。 モデルはPINTO_model_zoo/191_anti-spoof-mn3からONNX形式のモデルを使用しています。 Requirement mediapipe

KazuhitoTakahashi 8 Nov 18, 2022
Implements Gradient Centralization and allows it to use as a Python package in TensorFlow

Gradient Centralization TensorFlow This Python package implements Gradient Centralization in TensorFlow, a simple and effective optimization technique

Rishit Dagli 101 Nov 01, 2022
JUSTICE: A Benchmark Dataset for Supreme Court’s Judgment Prediction

JUSTICE: A Benchmark Dataset for Supreme Court’s Judgment Prediction CSCI 544 Final Project done by: Mohammed Alsayed, Shaayan Syed, Mohammad Alali, S

Smit Patel 3 Dec 28, 2022
Codebase for Diffusion Models Beat GANS on Image Synthesis.

Codebase for Diffusion Models Beat GANS on Image Synthesis.

Katherine Crowson 128 Dec 02, 2022