GithubHelp home page GithubHelp logo

bit-da / eada Goto Github PK

View Code? Open in Web Editor NEW
76.0 1.0 12.0 1.03 MB

[AAAI 2022] Official Implementation of Active Learning for Domain Adaptation: An Energy-based Approach https://arxiv.org/abs/2112.01406

Home Page: https://arxiv.org/abs/2112.01406

License: MIT License

Python 100.00%
active-learning domain-adaptation energy-based-model data-efficiency

eada's Introduction


Active Learning for Domain Adaptation: An Energy-based Approach

Binhui Xie, Longhui Yuan, Shuang Li, Chi Harold Liu, Xinjing Cheng and Guoren Wang

Paper   Bilibili   Slides  

Unsupervised domain adaptation (UDA) has recently emerged as an effective paradigm for generalizing deep neural networks to new target domains. However, there is still enormous potential to be tapped to reach the fully supervised performance.

We start from an observation that energy-based models exhibit free energy biases when training (source) and test (target) data come from different distributions. Inspired by this inherent mechanism, we empirically reveal that a simple yet efficient energy-based sampling strategy sheds light on selecting the most valuable target samples than existing approaches requiring particular architectures or computation of the distances.

Our algorithm, Energy-based Active Domain Adaptation (EADA), queries groups of target data that incorporate both domain characteristic and instance uncertainty into every selection round. Meanwhile, by aligning the free energy of target data compact around the source domain via a regularization term, domain gap can be implicitly diminished.

UDA over time

Through extensive experiments, we show that EADA surpasses state-of-the-art methods on well-known challenging benchmarks with substantial improvements, making it a useful option in the open world.

For more information on EADA, please check our [Paper].

If you find this project useful in your research, please consider citing:

@inproceedings{xie2022active,
  title={Active learning for domain adaptation: An energy-based approach},
  author={Xie, Binhui and Yuan, Longhui and Li, Shuang and Liu, Chi Harold and Cheng, Xinjing and Wang, Guoren},
  booktitle={Proceedings of the AAAI Conference on Artificial Intelligence},
  volume={36},
  number={8},
  pages={8708--8716},
  year={2022}
}

Setup Environment

For this project, we used python 3.7.5. We recommend setting up a new virtual environment:

Step-by-step installation

conda create --name activeDA -y python=3.7
conda activate activeDA

# this installs the right pip and dependencies for the fresh python
conda install -y ipython pip

pip install -r requirements.txt

Setup Datasets

The data folder should be structured as follows:

├── data/
│   ├── office31/	
|   |   ├── amazon/
|   |   ├── dslr/
|   |   ├── webcam/	
│   ├── home/     
|   |   ├── Art/
|   |   ├── Clipart/
|   |   ├── Product/
|   |   ├── RealWorld/
│   ├── visda2017/
|   |   ├── train/
|   |   ├── validation/
│   └──	

Symlink the required dataset

ln -s /path_to_office31_dataset data/office31
ln -s /path_to_home_dataset data/home
ln -s /path_to_visda2017_dataset/clf/ data/visda2017

Running the code

For Office-31

python main.py --cfg configs/office.yaml

For Office-Home

python main.py --cfg configs/home.yaml

For VisDA-2017

python main.py --cfg configs/visda2017.yaml

Acknowledgements

This project is based on the following open-source projects. We thank their authors for making the source code publicly available.

Contact

If you have any problem about our code, feel free to contact

or describe your problem in Issues.

eada's People

Contributors

binhuixie avatar yuanlonghui 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

eada's Issues

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.