Giter Club home page Giter Club logo

bmd's Introduction

Attention: Our new work on source-free universal domain adaptation has been accepted by CVPR-2023! The paper "Upcycling Models under Domain and Category Shift" is available at https://arxiv.org/abs/2303.07110. The code also has been made public at https://github.com/ispc-lab/GLC.

The official repository of our paper "BMD: A General Class-balanced Multicentric Dynamic Prototype Strategy for Source-free Domain Adaptation". Here, we present the demo implementation on VisDA-C dataset.

Prerequisites

  • python3
  • pytorch >= 1.7.0
  • torchvision
  • numpy, scipy, sklearn, PIL, argparse, tqdm, wandb

Step

  1. Please first prepare the pytorch enviroment.
  2. Please download the VisDA-C dataset from the official website, and then unzip the dataset to the ./data folder.
  3. Prepare the source model by running following command

    sh ./scripts/train_soruce.sh

  4. Perform the target model adaptation by running following command. Please note that you need to first assign the source model checkpoint path in the ./scripts/train_target.sh script.

    sh ./scripts/train_target.sh

Acknowledgement

This codebase is based on SHOT-ICML2020.

Citation

If you find it helpful, please consider citing:

@inproceedings{sanqing2022BMD,
  title={BMD: A General Class-balanced Multicentric Dynamic Prototype Strategy for Source-free Domain Adaptation},
  author={Sanqing Qu, Guang Chen, Jing Zhang, Zhijun Li, Wei He, Dacheng Tao},
  booktitle={European conference on computer vision},
  year={2022}
}

bmd'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

Watchers

 avatar

bmd's Issues

Most parameters are frozen

BMD/main_target.py

Lines 184 to 188 in 3723b32

for k, v in model.backbone_layer.named_parameters():
if "bn" in k:
param_group += [{'params': v, 'lr': args.lr*0.1}]
else:
v.requires_grad = False

Hello, thanks for sharing your code. In the above a few lines, only parameters in BN layers will be updated and all the other parameters are frozen. Does this mean only BN parameters are trained?

Office31 results

Good morning, I am trying to reproduce the Office31 results of the paper but I am getting lower accuracy for every domain-pair. I am using the released code and the hparams written in the paper. Do you have any suggestions on what can be the cause of this? What version of CUDA did you use?
Thank you

Can not reproduce office-31 and officehome dataset results

Hi, thanks for your excellent work.
I can't reproduce the results based on the office-31 and officehome dataset. I have changed the parameter S, α=0.3,β=0.1 according to the article. Are there another parameters I need to change? How can I solve that?

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.