Giter Site home page Giter Site logo

htgkd-1's Introduction

HTGKD

Code (pytorch) for 'Model Adaptation through Hypothesis Transfer with Gradual Knowledge Distillation' on Office-31, Office-Home, VisDA-C. This paper has been submitted to IROS2021.

Preliminary

You need to download the Office-31, Office-Home, VisDA-C dataset, modify the path of images in each '.txt' under the folder './object/data/'.

The experiments are conducted on one GPU (NVIDIA RTX TITAN).

  • python == 3.7.3
  • pytorch ==1.6.0
  • torchvision == 0.7.0

Training and evaluation

  1. First training model on the source data, Office-Home dataset is shown here.

~/anaconda3/bin/python htgkd_source.py --trte val --output ckpsmix2020r0/source/ --da uda --gpu_id 0 --dset office-home --max_epoch 50 --s 0 --seed 2020 ~/anaconda3/bin/python htgkd_source.py --trte val --output ckpsmix2020r0/source/ --da uda --gpu_id 0 --dset office-home --max_epoch 50 --s 1 --seed 2020 ~/anaconda3/bin/python htgkd_source.py --trte val --output ckpsmix2020r0/source/ --da uda --gpu_id 0 --dset office-home --max_epoch 50 --s 2 --seed 2020 ~/anaconda3/bin/python htgkd_source.py --trte val --output ckpsmix2020r0/source/ --da uda --gpu_id 0 --dset office-home --max_epoch 50 --s 3 --seed 2020

  1. Then adapting source model to target domain, with only the unlabeled target data.

~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 0 --t 1 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020 ~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 0 --t 2 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020 ~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 0 --t 3 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020 ~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 1 --t 0 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020 ~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 1 --t 2 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020 ~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 1 --t 3 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020 ~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 2 --t 0 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020 ~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 2 --t 1 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020 ~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 2 --t 3 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020 ~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 3 --t 0 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020 ~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 3 --t 1 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020 ~/anaconda3/bin/python htgkd_target.py --cls_par 0.05 --da uda --dset office-home --gpu_id 0 --s 3 --t 2 --output_src ckpsmix2020r0/source/ --output ckpsmix2020r0/target_mix/ --seed 2020

Results

The results of HTGKD is display under the folder './object/result/'.

Acknowledgement

The codes are based on SHOT (ICML 2020, also source-free).

Contact

htgkd-1's People

Contributors

tntek avatar

Watchers

James Cloos avatar

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.