GithubHelp home page GithubHelp logo

tencentyouturesearch / activelearning-sdm Goto Github PK

View Code? Open in Web Editor NEW
19.0 2.0 2.0 116 KB

Implementation of CVPR 2022 paper "Learning Distinctive Margin toward Active Domain Adaptation”

License: Other

Python 100.00%

activelearning-sdm's Introduction

Learning Distinctive Margin toward Active Domain Adaptation

  • A Pytorch implementation of our CVPR 2022 paper "Learning Distinctive Margin toward Active Domain Adaptation"
  • arXiv

Installation

  • Python 3.7
  • Pytorch 1.8.0
  • torchvision 0.9
  • Numpy 1.20

Run the code

Preliminaries

Training

  • Setting

Modify the configuration in SDM_code/config/ini.config

Arg:
[data]
name : dataset
path = dataset location
source = the initial of certain scenario 
target = the initial of certain scenario
class = number of categories
[sample]
strategy = certain sample strategy
[param]
epoch : we set it to 40 in our experiments
lr : learning rate
batch : batch size
sdm_lambda : default value is 0.01
sdm_margin : default value is 1.0
  • Usage

After modify setting, just run the code:

python3 run.py
  • Log

We also provide our experiment logs saved in SDM_code/log/{dataset}_{source}{target}.log. For example, officehome_AC.log

Acknowledgement

This codebase is built upon TQS.

Citation

If you find our work helps your research, please kindly consider citing our paper in your publications.

@article{xie2022sdm
	title={Learning Distinctive Margin toward Active Domain Adaptation},
    author={Xie, Ming and Li, Yuxi and Wang, Yabiao and Luo, Zekun and Gan, Zhenye and Sun, Zhongyi and Chi, Mingmin and Wang, Chengjie and Wang, Pei},
    booktitle={IEEE/CVF International Conference on Computer Vision and Pattern Recognition},
    year={2022}
}

activelearning-sdm's People

Contributors

lyxok1 avatar swordlidev avatar

Stargazers

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

Watchers

 avatar  avatar

activelearning-sdm's Issues

Using the same target dataset for both training and testing in Office31

Hi, I realized that you are testing the model on the same target dataset that was used during trainng and active sampling ('tr_or_te' doesn't exist in the filename). Here:

train_target_data = loader.get_data(cfg.DATA_NAME,os.path.join(cfg.DATA_PATH,cfg.DATA_TARGET),
transform.test_transform,tr_or_te='train',n_views=cfg.N_VIEWS)
test_target_data = loader.get_data(cfg.DATA_NAME,os.path.join(cfg.DATA_PATH,cfg.DATA_TARGET),
transform.test_transform,tr_or_te='test',n_views=cfg.N_VIEWS)

Could you explain why you did that? Thanks

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.