All Projects → ergysr → Deepcc

ergysr / Deepcc

Multi-Target, Multi-Camera Tracking

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Deepcc

Person Reid Gan Pytorch
A Pytorch Implementation of "Unlabeled Samples Generated by GAN Improve the Person Re-identification Baseline in vitro"(ICCV17)
Stars: ✭ 147 (-50.84%)
Mutual labels:  person-reidentification
Dispersion-based-Clustering
The source code for our work "Towards better Validity: Dispersion based Clustering for unsupervised Person Re-identification"
Stars: ✭ 33 (-88.96%)
Mutual labels:  person-reidentification
FedReID
Implementation of Federated Learning to Person Re-identification (Code for ACMMM 2020 paper)
Stars: ✭ 68 (-77.26%)
Mutual labels:  person-reidentification
Awesome Person Re Identification
Awesome Person Re-Identification
Stars: ✭ 184 (-38.46%)
Mutual labels:  person-reidentification
Dgd person reid
Domain Guided Dropout for Person Re-identification
Stars: ✭ 229 (-23.41%)
Mutual labels:  person-reidentification
Hetero-center-loss-for-cross-modality-person-re-id
Code for paper "Hetero-center loss for cross-modality person re-identification"
Stars: ✭ 47 (-84.28%)
Mutual labels:  person-reidentification
Attribute Aware Attention
[ACM MM 2018] Attribute-Aware Attention Model for Fine-grained Representation Learning
Stars: ✭ 143 (-52.17%)
Mutual labels:  person-reidentification
HiCMD
[CVPR2020] Hi-CMD: Hierarchical Cross-Modality Disentanglement for Visible-Infrared Person Re-Identification
Stars: ✭ 64 (-78.6%)
Mutual labels:  person-reidentification
Person reid baseline pytorch
Pytorch ReID: A tiny, friendly, strong pytorch implement of object re-identification baseline. Tutorial 👉https://github.com/layumi/Person_reID_baseline_pytorch/tree/master/tutorial
Stars: ✭ 2,963 (+890.97%)
Mutual labels:  person-reidentification
AOS4ReID
Adversarially Occluded Samples for Person Re-identification, CVPR 2018
Stars: ✭ 32 (-89.3%)
Mutual labels:  person-reidentification
Person Reid 3d
🗽 Parameter-Efficient Person Re-identification in the 3D Space 🗽
Stars: ✭ 193 (-35.45%)
Mutual labels:  person-reidentification
Image Text Embedding
TOMM2020 Dual-Path Convolutional Image-Text Embedding https://arxiv.org/abs/1711.05535
Stars: ✭ 223 (-25.42%)
Mutual labels:  person-reidentification
MetaBIN
[CVPR2021] Meta Batch-Instance Normalization for Generalizable Person Re-Identification
Stars: ✭ 58 (-80.6%)
Mutual labels:  person-reidentification
Self Similarity Grouping
Self-similarity Grouping: A Simple Unsupervised Cross Domain Adaptation Approach for Person Re-identification (ICCV 2019, Oral)
Stars: ✭ 171 (-42.81%)
Mutual labels:  person-reidentification
Deep-Association-Learning
Tensorflow Implementation on Paper [BMVC2018]Deep Association Learning for Unsupervised Video Person Re-identification
Stars: ✭ 68 (-77.26%)
Mutual labels:  person-reidentification
Reid Mgn
Reproduction of paper: Learning Discriminative Features with Multiple Granularities for Person Re-Identification
Stars: ✭ 145 (-51.51%)
Mutual labels:  person-reidentification
Awesome-Cross-Domain-Person-Re-identification
Awesome-Cross-Domain-Person-Re-identification
Stars: ✭ 17 (-94.31%)
Mutual labels:  person-reidentification
2016 person re Id
TOMM2017 A Discriminatively Learned CNN Embedding for Person Re-identification
Stars: ✭ 255 (-14.72%)
Mutual labels:  person-reidentification
person-reid-incremental
Incremental Learning in Person Re-Identification
Stars: ✭ 12 (-95.99%)
Mutual labels:  person-reidentification
AdversarialBinaryCoding4ReID
Codes of the paper "Adversarial Binary Coding for Efficient Person Re-identification"
Stars: ✭ 12 (-95.99%)
Mutual labels:  person-reidentification

---> Announcement <---

The CVPR2019 Workshop on Target Re-Identification and Multi-Target Multi-Camera Tracking is now accepting paper submissions, and there will be three international challenges on withheld data, one on MTMC Tracking and two on ReID. More details to come soon.

DeepCC

Features for Multi-Target Multi-Camera Tracking and Re-Identification. CVPR 2018

Ergys Ristani, Carlo Tomasi

[BibTeX]


Multi-Target Multi-Camera Tracking (MTMCT) is the problem of determining who is where at all times given a set of video streams as input. The output is a set of person trajectories. Person re-identification (ReID) is a closely related problem. Given a query image of a person, the goal is to retrieve from a database of images taken by different cameras the images where the same person appears.

In this repository, we provide MATLAB code to run and evaluate our tracker, as well as Tensorflow code to learn appearance features with our weighted triplet loss. This code has been written over the past years as part of my PhD research, initially for multi-target tracking by correlation clustering (BIPCC), and lately extended to use deep features in multi-camera settings (DeepCC). We additionally provide tools to download and interact with the DukeMTMC dataset.


Downloading the data

DukeMTMC

After cloning this repository you need to download the DukeMTMC dataset. Specify a folder of your choice in src/duke/downloadDukeMTMC.m and run the relevant parts of the script, omitting the cells which are tagged optional. For the tracker to run you only need to download videos, OpenPose detections, and precomputed detection features.

Please be patient as you are downloading ~160 GB of data. [md5sum]


Running the tracker

As a first step you need to set up the dataset root directory. Edit the following line in get_opts.m:

opts.dataset_path = 'F:/DukeMTMC/';

Dependencies

Clone mexopencv in src/external/ and follow its installation instructions. This interface is used to read images directly from the Duke videos.

Pre-computed features

Download the pre-computed features into experiments/demo/L0-features/.

Compiling

Run compile to obtain mex files for the solvers and helper functions.

Training an appearance model

To train and evaluate our appearance model which employs the weighted triplet loss, first download resnet_v1_50.ckpt in src/triplet-reid/. Then install imgaug. Modify the images folder net.image_root = 'F:/DukeMTMC/DukeMTMC-reID'; accordingly in get_opts.m, Finally run:

mkdir('src/triplet-reid/experiments/')
opts = get_opts();
train_duke(opts);
embed(opts);
evaluation_res_duke_fast(opts);

The code will run 25,000 training iterations, compute embeddings for query and gallery images of the DukeMTMC-reID benchmark, and finally print the mAP and rank-1 score. The above functions are MATLAB interfaces to the Tensorflow/Python3 code of Beyer et al. The code has been extended to include our weighted triplet loss.

Alternatively you can run train_duke_hnm to train with hard negative mining.

Once you train a model, you can analyze the distribution of distances between features to obtain a separation threshold:

view_distance_distribution(opts);

Optionally, you can use features = embed_detections(opts, detections); to compute features for a set of detections in the format [camera, frame, left, top, width, height];. A usage example can be found in compute_L0_features.m.

Running DeepCC

Run demo and you will see output logs while the tracker is running. When the tracker completes, you will see the quantitative evaluation results for the sequence trainval-mini.

Note on solvers

The graph solver is set in opts.optimization. By default Correlation Clustering by a Binary Integer Program (BIPCC) is used. It solves every graph instance optimally by relying on the Gurobi solver, for which an academic license may be obtained for free.

opts.optimization = 'BIPCC'; 
opts.gurobi_path = 'C:/gurobi800/win64/matlab';

If you don't want to use Gurobi, we also provide two existing approximate solvers: Adaptive Label Iterative Conditional Models (AL-ICM) and Kernighan-Lin (KL). From our experience, the best trade-off between accuracy and speed is achieved with option 'KL'.

Understanding errors

To gain qualitative insights why the tracker fails you can run render_results(opts)

This will generate movies with the rendered trajectories validated against ground truth using the ID measures. Color-coded tails with IDTP, IDFP and IDFN give an intuition for the tracker's failures. The movies will be placed under experiments/demo/video-results.

Visualization

To visualize the detections you can run the demo show_detections.

You can run render_trajectories_top or render_trajectories_side to generate a video animation similar to the gif playing at the top of this page.

To generate ID Precision/Recall plots like in the state of the art section see render_state_of_the_art. Make sure that you update the files provided in src/visualization/data/duke_*_scores.txt with the latest MOTChallenge submissions. The provided scores are only supplied as a reference.

State of the art

The state of the art for DukeMTMC is available on MOTChallenge. Submission instructions can be found on this page.

The original submission file duke.txt can be downloaded here. Results from the released tracker may differ from submission time due changes in code and settings. Once you are happy with the performance of your extensions to DeepCC, run prepareMOTChallengeSubmission(opts) to obtain a submission file duke.txt for MOTChallenge.

Remarks

MTMCT and ReID problems differ subtly but fundamentally. In MTMCT the decisions made by the tracker are hard: Two person images either have the same identity or not. In ReID the decisions are soft: The gallery images are ranked without making hard decisions. MTMCT training requires a loss that correctly classifies all pairs of observations. ReID instead only requires a loss that correctly ranks a pair of images by which is most similar to the query. Below I illustrate two ideal feature spaces, one for ReID and one for MTMCT, and argue that the MTMCT classification condition is stronger.

In MTMCT the ideal feature space should satisfy the classification condition globally, meaning that the largest class variance among all identities should be smaller than the smallest separation margin between any pair of identities. When this condition holds, a threshold (the maximum class variance) can be found to correctly classify any pair of features as co-identical or not. The classification condition also implies correct ranking in ReID for any given query.

For correct ranking in ReID it is sufficient that for any query the positive examples are ranked higher than all the negative examples. In the above example the ranking condition is satisfied and guarantees correct ReID ranking for any query. Yet there exists no threshold that correctly classifies all pairs. Therefore the ReID ranking condition is subsumed by the MTMCT classification condition.

Citing

If this code helps your research, please cite the following work which made it possible.

@phdthesis{ristani2018thesis,
  author       = {Ergys Ristani}, 
  title        = {People Tracking and Re-Identification from Multiple Cameras},
  school       = {Duke University},
  year         = {2018}
}

@inproceedings{ristani2018features,
  title =        {Features for Multi-Target Multi-Camera Tracking and Re-Identification},
  author =       {Ristani, Ergys and Tomasi, Carlo},
  booktitle =    {Conference on Computer Vision and Pattern Recognition},
  year =         {2018}
}

@inproceedings{ristani2016MTMC,
  title =        {Performance Measures and a Data Set for Multi-Target, Multi-Camera Tracking},
  author =       {Ristani, Ergys and Solera, Francesco and Zou, Roger and Cucchiara, Rita and Tomasi, Carlo},
  booktitle =    {European Conference on Computer Vision workshop on Benchmarking Multi-Target Tracking},
  year =         {2016}
}

@inproceedings{ristani2014tracking,
  title =        {Tracking Multiple People Online and in Real Time},
  author =       {Ristani, Ergys and Tomasi, Carlo},
  booktitle =    {Asian Conference on Computer Vision},
  year =         {2014},
  pages =        {444--459},
  organization = {Springer}
}

License

This code is licensed under CC BY-NC 4.0. Some external dependencies have their own license.

The DukeMTMC dataset is licensed under CC BY-NC-SA 4.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].