Giter Club home page Giter Club logo

rank-reid's Introduction

Rank Re-identification

Introduction

Model

Siamese Network

RankNet

  • Base Network:ResNet50
  • Input:Given a ranking list, choose a probe image A, two gallery image B, C
  • Output:Compute the probability that rank AB > rank AC

Hardware

  • NVIDIA TITANX 11G
  • Memory: >=16G

Data prepare

Download

Preprocess

Take Market-1501 as an example:

  • download
  • rename training directory to 'train', rename probe directory to 'probe', renmae gallery directory to 'test'

Your data directory will look like this:

Market-1501
├── probe
│   ├── 0003_c1s6_015971_00.jpg
│   ├── 0003_c3s3_064744_00.jpg
│   ├── 0003_c4s6_015641_00.jpg
│   ├── 0003_c5s3_065187_00.jpg
│   └── 0003_c6s3_088392_00.jpg
├── test
│   ├── 0003_c1s6_015971_02.jpg
│   ├── 0003_c1s6_015996_02.jpg
│   ├── 0003_c4s6_015716_03.jpg
│   ├── 0003_c5s3_065187_01.jpg
│   ├── 0003_c6s3_088392_04.jpg
│   └── 0003_c6s3_088442_04.jpg
└── train
    ├── 0002_c1s1_000451_03.jpg
    ├── 0002_c1s1_000551_01.jpg
    ├── 0002_c1s1_000776_01.jpg
    ├── 0002_c1s1_000801_01.jpg
    ├── 0002_c1s1_069056_02.jpg
    └── 0002_c6s1_073451_02.jpg

Execution

Detail Instruction

  • baseline:ResNet52 base network

    • evaluate.py
      • extract_feature: compute ranking result by base network and evaluate rank accuracy + mAP
      • similarity_matrix: Cosine similarity of CNN features(accelerated by GPU)
      • On test set, compute ranking table with test_predict
      • On training set,compute ranking table with train_predict
      • Compute rank accuracy and mAP with map_rank_quick_eval on Market1501(can be extended to DukeMTMC4ReID)
      • Compute rank accuracy with grid_result_eval on GRID
    • train.py
      • Use source dataset to pretrain ResNet52 base network
  • pair: pretrain siamese network

    • pair_train.py:pretrain with two input images
      • pair_generator: data generator, selecting positive and negative samples according to person id
      • pair_model: build a Keras based Siamese network
    • eval:evaluate on Siamese Network and ranknet
      • load corresponding model
      • call function in baseline/evaluate.py for test
  • transfer: incremental training with ranking table

    • simple_rank_transfer.py: learning to rank with three input images
      • triplet_generator_by_rank_list:image generator
      • rank_transfer_model:three input image, one ranking loss

Reference

Citation

Please cite this paper in your publications if it helps your research:

@article{
  title={Unsupervised Cross-dataset Person Re-identification by Transfer Learning of Spatial-Temporal Patterns},
  author={Jianming, Lv and Weihang, Chen and Qing, Li and Can, Yang},
  journal={CVPR},
  year={2018}
}

rank-reid's People

Contributors

ahangchen avatar

Watchers

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