• Stars
    star
    265
  • Rank 154,577 (Top 4 %)
  • Language
    C
  • License
    MIT License
  • Created almost 8 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

TOMM2017 A Discriminatively Learned CNN Embedding for Person Re-identification

A Discriminatively Learned CNN Embedding for Person Re-identification

In this package, we provide our training and testing code written in Matconvnet for the paper [A Discriminatively Learned CNN Embedding for Person Re-identification] (https://arxiv.org/abs/1611.05666).

We also include matconvnet-beta23 which has been modified for our paper. All codes have been test on Ubuntu14.04 and Ubuntu16.04 with Matlab R2015b.

This code is ONLY released for academic use.

Resources

~What's new: We add the data preparation and evaluation codes for CUHK03.

~What's new: We make the code of model structure more easy to follow.

~What's new: We provide a better code for extract feature.

~What's new: We provide a faster evaluation code for Market-1501.

Installation

  1. Clone this repo

    git clone https://github.com/layumi/2016_person_re-ID.git
    cd 2016_person_re-ID
    mkdir data
  2. Download the pretrained model.

    This model is ONLY released for academic use. You can find the pretrained model in GoogleDriver or [BaiduYun] (https://pan.baidu.com/s/1miG2OpM). Download and put them into the ./data.

    BaiduYun sometime changes the link. If you find the url fail, you can contact me to update it.

  3. Compile matconvnet (Note that I have included my Matconvnet in this repo, so you do not need to download it again. I has changed some codes comparing with the original version. For example, one of the difference is in /matlab/+dagnn/@DagNN/initParams.m. If one layer has params, I will not initialize it again, especially for pretrained model.)

    You just need to uncomment and modify some lines in gpu_compile.m and run it in Matlab. Try it~ (The code does not support cudnn 6.0. You may just turn off the Enablecudnn or try cudnn5.1)

    If you fail in compilation, you may refer to http://www.vlfeat.org/matconvnet/install/

Dataset

  • Download Market1501 Dataset. [Google] [Baidu] The photos are taken in Tsinghua University.

  • DukeMTMC-reID is a larger dataset in the same format of Market1501. The photos are taken in Duke University. You can download it from DukeMTMC-reID Dataset. We also upload the result to DukeMTMC-reID leaderboard.

  • If you want to rehearsal our result on CUHK03 Dataset, you can simply change the number of kernel from 751 to 1367 in resnet52_market.m and recreate net.mat. Because there are 751 IDs in Market-1501 while 1367 training identities are in CUHK03. More information can be found in cuhk03-prepare-eval dir. We add the data preparation and evaluation codes for CUHK03.

  • Training dataset for Oxford5k (http://cmp.felk.cvut.cz/cnnimageretrieval/)

Test

  1. Run test/test_gallery_query_crazy.m to extract the features of images in the gallery and query set. They will store in a .mat file. Then you can use it to do evaluation.
  2. Evaluate feature on the Market-1501. Run evaluation/zzd_evaluation_res_faster.m. You can get the following Single-query Result.
Methods Β  Β  Β  Β  Β  Β  Β  Rank@1 mAP
Ours* (SQ) 80.82% 62.30%
Ours* (MQ-avg) 86.67% 70.16%
Ours* (MQ-max) 86.76% 70.68%
Ours* (MQ-max+rerank) 86.67% 72.55%

*Note that the result is slightly higher than the result reported in our paper.

*For multi-query result, you can use evaluation/zzd_evaluation_res_fast.m . It is slower than evaluation/zzd_evaluation_res_faster.m since it need to extract extra features. (The evaluation code is modified from the Market-1501 Baseline Code)

FQA

  1. What is multi-query setting?

Actually, we can get a sequence of the query under one camera instead of one image. Then we can use every image in this sequence to extract a query mean feature (mean of feature extracted from several images). We call it multi-query. If we use this feature to do person retrieval, we usually get a better result. But it use additional images (in 'Market-1501/gt_bboxes'). You can find more detail in the original paper.

Train

  1. Add your dataset path into prepare_data.m and run it. Make sure the code outputs the right image path.

  2. Run train_id_net_res_2stream.m to have fun.

Citation

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

@article{zheng2016discriminatively,
  title={A Discriminatively Learned CNN Embedding for Person Re-identification},
  author={Zheng, Zhedong and Zheng, Liang and Yang, Yi},
 Β doi={10.1145/3159171},
  note={\mbox{doi}:\url{10.1145/3159171}},
  journal={ACM Transactions on Multimedia Computing Communications and Applications},
  year={2017}
}

Acknowledge

Thanks for Xuanyi Dong to realize our paper in Caffe.

Thanks for Weihang Chen to realize our paper in Keras.

Thanks for Weihang Chen to report the bug in prepare_data.m.

Related Repos

  1. Person re-ID with GAN
  2. Pedestrian Alignment Network

More Repositories

1

Person_reID_baseline_pytorch

⛹️ Pytorch ReID: A tiny, friendly, strong pytorch implement of person re-id / vehicle re-id baseline. Tutorial πŸ‘‰https://github.com/layumi/Person_reID_baseline_pytorch/tree/master/tutorial
Python
4,058
star
2

Vehicle_reID-Collection

πŸš— the collection of vehicle re-ID papers, datasets. πŸš—
453
star
3

University1652-Baseline

ACM Multimedia2020 University-1652: A Multi-view Multi-source Benchmark for Drone-based Geo-localization 🚁 annotates 1652 buildings in 72 universities around the world.
Python
452
star
4

AICIty-reID-2020

πŸš— The 1st Place Submission to AICity Challenge 2020 re-id track (Baidu-UTS submission)
Python
449
star
5

Seg-Uncertainty

IJCAI2020 & IJCV2021 πŸŒ‡ Unsupervised Scene Adaptation with Memory Regularization in vivo
Python
386
star
6

Person-reID_GAN

ICCV2017 Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in vitro
Cuda
317
star
7

Image-Text-Embedding

TOMM2020 Dual-Path Convolutional Image-Text Embedding 🐾 https://arxiv.org/abs/1711.05535
MATLAB
280
star
8

person-reid-3d

TNNLS'22 πŸ—½ Parameter-Efficient Person Re-identification in the 3D Space πŸ—½
Python
262
star
9

Pedestrian_Alignment

TCSVT2018 Pedestrian Alignment Network for Large-scale Person Re-identification
Cuda
237
star
10

Person-reID-triplet-loss

Person re-ID baseline with triplet loss
Python
189
star
11

2015_Face_Detection

CVPR2015 Cascade CNNs for Face Detection
HTML
136
star
12

Person-reID-verification

🐨 (pytorch version) TOMM2017 A Discriminatively Learned CNN Embedding for Person Re-identification 🐨
Python
100
star
13

2016_super_resolution

ICCV2015 Image Super-Resolution Using Deep Convolutional Networks
Cuda
86
star
14

Awesome-Fools

πŸ’€ A collection of methods to fool the deep neural network πŸ’€
76
star
15

3D-Magic-Mirror

πŸ‘—3D Magic Mirror: Clothing Reconstruction from a Single Image via a Causal PerspectiveπŸ‘— Single-View 3D Reconstruction
Python
72
star
16

U_turn

IJCV22 πŸ™ˆ Attack your retrieval model via Query! They are not robust as you expected! πŸ™‰
Python
47
star
17

AdaBoost_Seg

TIP2022 Adaptive Boosting (AdaBoost) for Domain Adaptation ? πŸ€·β€β™€οΈ Why not ! πŸ™†β€β™€οΈ
Python
45
star
18

visualize_matconvnet

A simple code to visualize net for matconvnet.
MATLAB
35
star
19

2016_GAN_Matlab

Generative Adversarial Nets for Matlab
HTML
35
star
20

2016_Artist_Style

Using CNN to create 'famous painting' with Matlab code
HTML
19
star
21

DukeMTMC-reID_baseline

DukeMTMC-reID_baseline (Matlab)
Cuda
18
star
22

UTS-Person-reID-Practical

UTS Person-reID Practical By Zhedong Zheng
18
star
23

HQ-Market

Market-1501 dataset with super-resolution quality
Python
18
star
24

Image-Retrieval-by-Finetuning-CNN

Code for project
Python
17
star
25

Awesome-Text2Motion-Generation

Awesome-Text2Motion-Generation
16
star
26

ACMMM2023Workshop

UAVM @ ACM MM2023 Workshop on UAVs in Multimedia: Capturing the World from a New Perspective
16
star
27

NLP-AICity2021

The 1st Place Submission to AICity Track5 - Natural Language-based Vehicle Retrieval.
Python
15
star
28

UAVM2023

ACM MM Workshop on UAVs in Multimedia: Capturing the World from a New Perspective (UAVM 2023)
12
star
29

Person_reID_baseline_matconvnet

Matconvnet implement of Person re-identification baseline. We arrived Rank@1=87.74% mAP=69.46% only with softmax loss.
Cuda
12
star
30

matlab_email_demo

a easy solution for baby sitting program!!! (MATLAB)
M
11
star
31

ICME2022SS

ICME2022 Special Session β€œBeyond Accuracy: Responsible, Responsive, and Robust Multimedia Retrieval ”
11
star
32

To-Academic-Newcomers

10
star
33

DCGAN-pytorch

Pytorch implement of DCGAN and LSGAN
Python
8
star
34

University1652-triplet-loss

triplet loss with hard negative / soft margin for the University-1652 dataset.
Python
8
star
35

2016_Class_Activation_Mapping

semantic segmentation in MATLAB
HTML
7
star
36

Robust-GPUs

Python
7
star
37

layumi.github.io

UTS Group Seminar http://www.zdzheng.xyz
HTML
6
star
38

market1501_body_point

MATLAB
6
star
39

Cifar10-Adaboost

Python
6
star
40

2016_Center_Loss

Matlab_ECCV16_Center_Loss
HTML
4
star
41

google_scholar_scrapy

extract data from google scholar
Python
4
star
42

Oxford-Paris-Attack

πŸ™ˆ We added our attacking method ODFA (https://arxiv.org/abs/1809.02681). The performance drops from 88.2% to 2.24% on Oxford. πŸ™‰
Python
4
star
43

visualize_face_detection_net

MATLAB
3
star
44

SOTA-semi

3
star
45

Matlab_TripletLoss

Matlab_TripletLoss
MATLAB
3
star
46

Batch-Normal-For-Caffe

Extend batch normalization layer for caffe
C++
3
star
47

pytorch-mnist

Draw mnist
Python
3
star
48

Awesome-Sign-Language

awesome list for sign language
3
star
49

2015_speech

word audio recognition
HTML
2
star
50

layumi

2
star
51

pkl2mat

a tool for transfer pkl file to mat file
Python
2
star
52

ACMMM2024Workshop-UAV

2
star
53

ComputerVisionAwardPapers

1
star
54

2016_FlowNet

Cuda
1
star
55

Zhedong-Zheng-blog

zhedong zheng's blog
CSS
1
star
56

2016_Video_Stabilization

A project @Fudan for 2016 Digital Image Processing
C
1
star
57

empty

1
star
58

Workshop-Proposal-DDL

1
star
59

WordNet_Matlab

a simple api for matlab to search semantic synonym
MATLAB
1
star
60

MORE2024

Multimedia Object Re-identification Workshop (MORE) @ ICMR2024
1
star