Skip to content

Dramwig/STDW

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STDW

This repository is the official implementation of STDW.

TL;DR: The paper introduces a dynamic self-training method for gradual domain adaptation that effectively transfers knowledge across domains.

Environment Setup

conda create -n torch python=3.9
conda activate torch
conda install pytorch==2.2.2 torchvision==0.17.2 torchaudio==2.2.2 pytorch-cuda=12.1 -c pytorch -c nvidia
conda install tqdm matplotlib pandas scikit-learn
pip install POT # for GOAT

🛠️ Usage

Data set placement:

  • Download the Portraits dataset from here and put pictures in the data/portraits/F/ and data/portraits/M/ folders.
  • Download the Covertype dataset from here and place it in data/covertype/covertype.data.gz.
  • MNIST will be automatically downloaded by the code.

Optional: Pre-train source domain classifiers to ensure reproducibility

python pre_train.py --gpu_ids 0 # Pre-train the classifier on the source domain

Train the model by running commands like the following:

python main_stdw.py --dataset mnist --gpu_ids 0 # Run the GOAT model
python main_gan.py --dataset mnist --gpu_ids 0 # Run the FlowGTA model

Recommendation for Testing

If you plan to modify or extend our method, we highly recommend using the project FlowLine: Automated tool for running Python programs in a streamlined manner for all testing.

Acknowledgments

We thank the authors of the GOAT official.

About

[NIPS 2025] Self-Training with Dynamic Weighting for Robust Gradual Domain Adaptation

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages