Code Monkey home page Code Monkey logo

mhpl's Introduction

implementation for MHPL (Minimum happy points)

Prerequisites:

  • python == 3.7.3
  • pytorch == 1.0.1.post2
  • torchvision == 0.2.2
  • numpy, scipy, sklearn, PIL, argparse, tqdm

Dataset:

  • Please manually download the datasets Office, Office-Home, VisDA-C from the official websites, and modify the path of images in each '.txt' under the folder './object/data/'. The source model of office-home and visda can be downloaded in this Url

Training:

Active Source free domain adaptation (ASFDA) on the Office/ Office-Home dataset
- Train model on the source domain **A** (**s = 0**), we view the full source data as a test set.
```python
cd object/
python MHPL_source.py --trte full --da uda --output ckps/source/ --gpu_id 0 --dset office --max_epoch 100 --s 0 --t 1
```

- Adaptation to other target domains **D and W**, respectively
```python
python MHPL_target.py --beta 0.3 --ratio 0.05 --alpha 3.0 --da uda --output_src ckps/source/ --output ckps/target/ --gpu_id 0 --dset office --s 0 --t 1  
```
Active Source free domain adaptation (ASFDA) on the VisDA-C dataset
- Synthetic-to-real 
```python
cd object/
 python MHPL_source.py --trte full --output ckps/source/ --da uda --gpu_id 0 --dset VISDA-C --net resnet101 --lr 1e-3 --max_epoch 10 --s 0 --t 1
 python MHPL_target.py --beta 0.3 --ratio 0.05 --alpha 25.0 --da uda --dset VISDA-C --gpu_id 0 --s 0 --t 1 --output_src ckps/source/ --output ckps/target/ --net resnet101 --lr 1e-3
 ```

mhpl's People

Contributors

fanwang826 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.