Git Product home page Git Product logo

glc's Introduction

PWC PWC PWC PWC

๐ŸŒŸ๐ŸŒŸ๐ŸŒŸ: Our new work on source-free universal domain adaptation has been accepted by CVPR-2024! The paper "LEAD: Learning Decomposition for Source-free Universal Domain Adaptation" is available at https://arxiv.org/abs/2403.03421. The code has been made public at https://github.com/ispc-lab/LEAD.

โœจโœจโœจ: We provide a substantial extension to this paper. "GLC++: Source-Free Universal Domain Adaptation through Global-Local Clustering and Contrastive Affinity Learning" is available at https://arxiv.org/abs/2403.14410. The code has been made public at https://github.com/ispc-lab/GLC-plus.

Introduction

Deep neural networks (DNNs) often perform poorly in the presence of domain shift and category shift. To address this, in this paper, we explore the Source-free Universal Domain Adaptation (SF-UniDA). SF-UniDA is appealing in view that universal model adaptation can be resolved only on the basis of a standard pre-trained closed-set model, i.e., without source raw data and dedicated model architecture. To achieve this, we develop a generic global and local clustering technique (GLC). GLC equips with an inovative one-vs-all global pseudo-labeling strategy to realize "known" and "unknown" data samples separation under various category-shift. Remarkably, in the most challenging open-partial-set DA scenario, GLC outperforms UMAD by 14.8% on the VisDA benchmark.

Framework

Prerequisites

  • python3, pytorch, numpy, PIL, scipy, sklearn, tqdm, etc.
  • We have presented the our conda environment file in ./environment.yml.

Dataset

We have conducted extensive expeirments on four datasets with three category shift scenario, i.e., Partial-set DA (PDA), Open-set DA (OSDA), and Open-partial DA (OPDA). The following is the details of class split for each scenario. Here, $\mathcal{Y}$, $\mathcal{\bar{Y}_s}$, and $\mathcal{\bar{Y}_t}$ denotes the source-target-shared class, the source-private class, and the target-private class, respectively.

Datasets Class Split $\mathcal{Y}/\mathcal{\bar{Y}_s}/\mathcal{\bar{Y}_t}$
OPDA OSDA PDA
Office-31 10/10/11 10/0/11 10/21/0
Office-Home 10/5/50 25/0/40 25/40/0
VisDA-C 6/3/3 6/0/6 6/6/0
DomainNet 150/50/145

Please manually download these datasets from the official websites, and unzip them to the ./data folder. To ease your implementation, we have provide the image_unida_list.txt for each dataset subdomains.

./data
โ”œโ”€โ”€ Office
โ”‚   โ”œโ”€โ”€ Amazon
|       โ”œโ”€โ”€ ...
โ”‚       โ”œโ”€โ”€ image_unida_list.txt
โ”‚   โ”œโ”€โ”€ Dslr
|       โ”œโ”€โ”€ ...
โ”‚       โ”œโ”€โ”€ image_unida_list.txt
โ”‚   โ”œโ”€โ”€ Webcam
|       โ”œโ”€โ”€ ...
โ”‚       โ”œโ”€โ”€ image_unida_list.txt
โ”œโ”€โ”€ OfficeHome
โ”‚   โ”œโ”€โ”€ ...
โ”œโ”€โ”€ VisDA
โ”‚   โ”œโ”€โ”€ ...

Training

  1. Open-partial Domain Adaptation (OPDA) on Office, OfficeHome, and VisDA
# Source Model Preparing
bash ./scripts/train_source_OPDA.sh
# Target Model Adaptation
bash ./scripts/train_target_OPDA.sh
  1. Open-set Domain Adaptation (OSDA) on Office, OfficeHome, and VisDA
# Source Model Preparing
bash ./scripts/train_source_OSDA.sh
# Target Model Adaptation
bash ./scripts/train_target_OSDA.sh
  1. Partial-set Domain Adaptation (PDA) on Office, OfficeHome, and VisDA
# Source Model Preparing
bash ./scripts/train_source_PDA.sh
# Target Model Adaptation
bash ./scripts/train_target_PDA.sh

Citation

If you find our codebase helpful, please star our project and cite our paper:

@inproceedings{sanqing2023GLC,
  title={Upcycling Models under Domain and Category Shift},
  author={Qu, Sanqing and Zou, Tianpei and Rรถhrbein, Florian and Lu, Cewu and Chen, Guang and Tao, Dacheng and Jiang, Changjun},
  booktitle={CVPR},
  year={2023},
}

@inproceedings{sanqing2022BMD,
  title={BMD: A general class-balanced multicentric dynamic prototype strategy for source-free domain adaptation},
  author={Qu, Sanqing and Chen, Guang and Zhang, Jing and Li, Zhijun and He, Wei and Tao, Dacheng},
  booktitle={ECCV},
  year={2022}
}

Contact

glc's People

Contributors

sanqingqu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

glc's Issues

the code

Hello, I am very interested in your article, I would like to know what are the functions of these two parts, thank you.
image

training OPDA for DomainNet

Dear authors, thanks for your great work.
Can you provide the image_unida_list.txt for DomainNet?
Meanwhile, is the setup for DomainNet and VisDA the same? e.g., training epochs for source and target. Otherwise could you detail the training parameters?
Looking forward your reply. Thanks a lot.

the code

train_source.py is the closed-set pre-training model. train_target.py It is to do various open set verifications on the target domain.
Is my understanding correct? If it is not correct, please correct me. Looking forward to your reply, thank you

Dataset code

Hi! Thanks for your contributions to such great work and I'm wondering if the relevant code for 'dataset' is missing

article

Hello, I would like to ask whether this article has been accepted by cvpr or

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.