Coder Social home page Coder Social logo

bentengma / learning-via-translation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simon4yan/learning-via-translation

0.0 1.0 0.0 5.57 MB

Image-Image Domain Adaptation with Preserved Self-Similarity and Domain-Dissimilarity for Person Re-identification (https://arxiv.org/pdf/1711.07027.pdf). CVPR2018

License: MIT License

Python 8.01% MATLAB 69.33% C++ 2.14% M 0.10% C 19.98% Mercury 0.02% Shell 0.42%

learning-via-translation's Introduction

Learning-via-Translation

Image-Image Domain Adaptation with Preserved Self-Similarity and Domain-Dissimilarity for Person Re-identification (https://arxiv.org/pdf/1711.07027.pdf)


Framework Overview

Learning via translation for domain adaptation in person re-ID consists of two steps:

1. Source-target image translation

The first step is to translate the annotated dataset from source domain to target domain in an unsupervised manner.

For more reference, you can find our modified training code and generating code in ./SPGAN. We wrote a detailed README. If you still has some question, feel free to contact me ([email protected]).

2. Feature learning

With the translated dataset that contains labels, feature learning methods are applied to train re-ID models.

Feature Learning

The code for re-ID feature learning is mainly modified from IDE.

Train

  1. Train baselines:
 cd $IDE_ROOT
  # train IDE on Market-1501
  ./experiments/market/train_IDE_ResNet_50_baseline.sh  
  # train IDE on DukeMTMC-reID
  ./experiments/duke/train_IDE_ResNet_50_baseline.sh
  # The IDE models for Market-1501 and DukeMTMC-reID are saved under: "out/market_train" and "out/duke_train", respectively
  # If you encounter this problem: bash: ./experiments/market/train_IDE_ResNet_50_baseline.sh: Permission denied
  # Please execute: chmod 777 -R experiments/
  1. Train IDE models trained on the translated images:
 cd $IDE_ROOT
  # train IDE on Market-1501
  ./experiments/market/train_IDE_ResNet_50_domain.sh  
  # train IDE on DukeMTMC-reID
  ./experiments/duke/train_IDE_ResNet_50_domain.sh

Feature Extraction

# 1. Market-1501:
cd $IDE_ROOT/market_evaluation
Run Matlab: extract_feature.m
# The IDE features are saved under: "market_evaluation/feat"
# 2. DukeMTMC-reID:
cd $IDE_ROOT/duke_evaluation
Run Matlab: extract_feature.m
# The IDE features are saved under: "duke_evaluation/feat"

Evaluation

  Run Matlab: baseline_evaluation_IDE.m

Trained Model

  • Baseline models

    IDE_Market and IDE_Duke: Onedrive; Baidu Yun

  • IDE models trained on the translated images:

    IDE_Market2duke (SPGAN) and IDE_Duke2Market (SPGAN): Onedrive; Baidu Yun

Results

(see more details in paper)

Contributing

If you have an implementation for a different framework, or an enhanced version of the current code, feel free to contribute to the repository. For any issues related to the code you can use the issue tracker from GitHub.

References

[1] W. Deng, L. Zheng, Q. Ye, G. Kang, Y. Yang, and J. Jiao. Image-image domain adaptation with preserved self-similarity and domain-dissimilarity for person re-identification. arXiv preprint arXiv:1711.07027, 2017.

[2] L. Zheng, Y. Yang, and A. G. Hauptmann. Person reidentification: Past, present and future. arXiv preprint arXiv:1610.02984, 2016.

@inproceedings{image-image18,
 author    = {Weijian Deng and
              Liang Zheng and
              Qixiang Ye and
              Guoliang Kang and
              Yi Yang and
              Jianbin Jiao},
 title     = {Image-Image Domain Adaptation with Preserved Self-Similarity and Domain-Dissimilarity
              for Person Re-identification},
 booktitle = {CVPR},
 year      = {2018},
}

License

The code is released under the MIT License. See the attached LICENSE file.

Frequently Asked Questions

Q1: The direct transfer performance using pytorch is much lower than caffe.

Ans: We find the BN is the key factor to this gap, and see more in here.

Q2: Train IDE or IDE+ by using pytorch?

Ans: Yes, we recommend Person_reID_baseline_pytorch. Note that bn needed to be fixed (see Q1).

(We also give a simple code of IDE and IDE+ here, which is modifed from Person_reID_baseline_pytorch).

learning-via-translation's People

Contributors

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