Git Product home page Git Product logo

afn's Introduction

AFN

PyTorch implementation for Larger Norm More Transferable: An Adaptive Feature Norm Approach for Unsupervised Domain Adaptation.

Requirements

  • Platform : Linux

  • Hardware : Nvidia GPU

  • Others:

    • CUDA 9.0.176
    • PyTorch 0.4.1
    • tqdm

Datasets

Please follow the README.md in subfolder Data to organize datasets

Training and Evaluation

  • Make sure you have organized datasets and satisfied the requirements.

  • According to the hierarchy in following block, enter corresponding setting ,dataset and method folder.

  • Modify parameters: data_root, result and snapshot in main.sh,and can switch model through changing model.

  • If you want to run the IAFN+ENT mothod on Office-31 or ImageCLEF-DA, you have to modify the command CUDA_VISIBLE_DEVICES=${gpu_id} python train.py \ to CUDA_VISIBLE_DEVICES=${gpu_id} python train_ent.py \

  • run bash main.sh in your terminal

.
├── README.md
├── data
│   ├── ImageCLEF
│   ├── Office31
│   ├── OfficeHome
│   ├── README.md
│   └── Visda2017
├── partial
│   ├── OfficeHome
│   │   ├── HAFN
│   │   └── SAFN
│   ├── README.md
│   └── Visda2017
│       ├── HAFN
│       └── SAFN
├── resources
└── vanilla
    ├── ImageCLEF
    │   ├── HAFN
    │   └── SAFN
    ├── Office31
    │   ├── HAFN
    │   └── SAFN
    ├── README.md
    └── Visda2017
        ├── HAFN
        └── SAFN

Here are some description of parameters :

  • data_root : the directory of data.
  • snapshot : the directory to store and load state dicts.
  • result : the directory that store evaluating results.
  • post : distinguish each experiment.
  • repeat : distinguish each repeated result in a experiment.
  • gpu_id : the GPU ID to run experiments.
  • model : switch model between resnet101 and resnet50

Citation

If you use AFN in your research, please consider citing:

@InProceedings{Xu_2019_ICCV,
author = {Xu, Ruijia and Li, Guanbin and Yang, Jihan and Lin, Liang},
title = {Larger Norm More Transferable: An Adaptive Feature Norm Approach for Unsupervised Domain Adaptation},
booktitle = {The IEEE International Conference on Computer Vision (ICCV)},
month = {October},
year = {2019}
}

afn's People

Contributors

jihanyang avatar

Watchers

 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.