Giter Site home page Giter Site logo

bit-da / ssan Goto Github PK

View Code? Open in Web Editor NEW
29.0 3.0 9.0 479 KB

[ACMMM 2020] Code release for "Simultaneous Semantic Alignment Network for Heterogenous Domain Adaptation" https://arxiv.org/abs/2008.01677

Home Page: https://arxiv.org/abs/2008.01677

Python 100.00%
heterogeneous-domain-adaptation knowledge-distillation pytorch semantic-alignment

ssan's Introduction

Simultaneous Semantic Alignment Network for Heterogeneous Domain Adaptation

This is a pytorch implementation of SSAN.

Paper

Simultaneous Semantic Alignment Network for Heterogeneous Domain Adaptation

Shuang Li, Binhui Xie, Jiashu Wu, Ying Zhao, Chi Harold Liu, Zhengming Ding

ACM International Conference on Multimedia, 2020

Abstract

Heterogeneous domain adaptation (HDA) transfers knowledge across source and target domains that present heterogeneities e.g., distinct domain distributions and difference in feature type or dimension. Most previous HDA methods tackle this problem through learning a domain-invariant feature subspace to reduce the discrepancy between domains. However, the intrinsic semantic properties contained in data are under-explored in such alignment strategy, which is also indispensable to achieve promising adaptability. In this paper, we propose a Simultaneous Semantic Alignment Network (SSAN) to simultaneously exploit correlations among categories and align the centroids for each category across domains. In particular, we propose an implicit semantic correlation loss to transfer the correlation knowledge of source categorical prediction distributions to target domain. Meanwhile, by leveraging target pseudo-labels, a robust triplet-centroid alignment mechanism is explicitly applied to align feature representations for each category. Notably, a pseudo-label refinement procedure with geometric similarity involved is introduced to enhance the target pseudo-label assignment accuracy. Comprehensive experiments on various HDA tasks across text-to-image, image-to-image and text-to-text successfully validate the superiority of our SSAN against state-of-the-art HDA methods.

Prerequisites

  • Python 3.6
  • Pytorch 1.3.1
  • numpy
  • scipy
  • matplotlib
  • scikit_learn
  • CUDA >= 8.0

Step-by-step installation

$ conda create -n ssan -y python=3.6
$ conda activate ssan

# this installs the right pip and dependencies for the fresh python
$ conda install -y ipython pip

# to install the required python packages, run
$ pip install -r requirements.txt

Getting started

All datasets can be downloaded here and put in <root_dir>/datasets

Train and Evaluate

Image-To-Image
$ python main.py --source amazon_surf --target amazon_decaf --cuda 0 --nepoch 3000 --partition 20 --prototype three --layer double --d_common 256 --optimizer mSGD --lr 0.1 --alpha 0.1 --beta 0.004 --gamma 0.1 --combine_pred Cosine --checkpoint_path checkpoint/ --temperature 5.0

Acknowledgements

Especially thanks to Yuan Yao for helping experiments

Citation

If you find this code useful for your research, please cite our paper:

@inproceedings{li2020simultaneous,
    title = {Simultaneous Semantic Alignment Network for Heterogeneous Domain Adaptation},
    author = {Li, Shuang and Xie, Binhui and Wu, Jiashu and Zhao, Ying and Liu, Chi Harold and Ding, Zhengming},
    booktitle = {The 28th ACM International Conference on Multimedia (MM'20))}, 
    pages     = {3866--3874},
    publisher = {{ACM}},
    year = {2020}
}

Contact

If you have any problem about our code, feel free to contact

or describe your problem in Issues.

ssan's People

Contributors

binhuixie 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  avatar

Watchers

 avatar  avatar  avatar

ssan's Issues

About utils.py

Hi,
I appreciate your excellent work. And I am trying to learn from that.
I noticed the"os.environ['PYTHONASHSEED'] = str(args.seed)" in line 16 of utils.py. I searched "PYTHONASHSEED" but got no result but "PYTHONHASHSEED", which has an "H" between the "N" and "A".
So, I think maybe it should be "PYTHONHASHSEED".

Code for SGW

Dear author,

I found you have reported the results of SGW method in the paper. However, I can not find the code of SGW. Could you please offer some help?

Thank you very much!

Best wishes

Discriminator

为什么判别器在优化的时候用总的损失?

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.