Skip to content

Tubaher/TrackEval

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrackEval

Code for evaluating object tracking.

This codebase provides code for a number of different tracking evaluation metrics (including the HOTA metrics), as well as supporting running all of these metrics on a number of different tracking benchmarks. Plus plotting of results and other things one may want to do for tracking evaluation.

NEW: RobMOTS Challenge 2021

Call for submission to our RobMOTS Challenge (Robust Multi-Object Tracking and Segmentation) held in conjunction with our RVSU CVPR'21 Workshop. Robust tracking evaluation against 8 tracking benchmarks. Submission deadline May 27th. Also check out our workshop call for papers.

Official Evaluation Code

The following benchmarks use TrackEval as their official evaluation code, check out the links to see TrackEval in action:

If you run a tracking benchmark and want to use TrackEval as your official evaluation code, please contact Jonathon (contact details below).

Currently implemented metrics

The following metrics are currently implemented:

Metric Family Submetrics Paper Code Notes
HOTA metrics HOTA, DetA, AssA, LocA, DetPr, DetRe, AssPr, AssRe paper code Recommended tracking metric
CLEARMOT metrics MOTA, MOTP, MT, ML, Frag, etc. paper code
Identity metrics IDF1, IDP, IDR paper code
VACE metrics ATA, SFDA paper code
Track mAP metrics Track mAP paper code Requires confidence scores
J & F metrics J&F, J, F paper code Only for Seg Masks

Currently implemented benchmarks

The following benchmarks are currently implemented:

Benchmark Sub-benchmarks Type Website Code Data Format
MOTChallenge MOT15/16/17/20 2D BBox website code format
KITTI Tracking 2D BBox website code format
BDD-100k 2D BBox website code format
TAO 2D BBox website code format
MOTS KITTI-MOTS, MOTS-Challenge Seg Mask website code and code format
DAVIS Unsupervised Seg Mask website code format
YouTube-VIS Seg Mask website code format

HOTA metrics

This code is also the official reference implementation for the HOTA metrics:

HOTA: A Higher Order Metric for Evaluating Multi-Object Tracking. IJCV 2020. Jonathon Luiten, Aljosa Osep, Patrick Dendorfer, Philip Torr, Andreas Geiger, Laura Leal-Taixe and Bastian Leibe.

HOTA is a novel set of MOT evaluation metrics which enable better understanding of tracking behaviour than previous metrics.

For more information check out the following links:

Properties of this codebase

The code is written 100% in python with only numpy and scipy as minimum requirements.

The code is designed to be easily understandable and easily extendable.

The code is also extremely fast, running at more than 10x the speed of the both MOTChallengeEvalKit, and py-motmetrics (see detailed speed comparison below).

The implementation of CLEARMOT and ID metrics aligns perfectly with the MOTChallengeEvalKit.

By default the code prints results to the screen, saves results out as both a summary txt file and a detailed results csv file, and outputs plots of the results. All outputs are by default saved to the 'tracker' folder for each tracker.

Preparing the data

In order to use the track eval, it is important to follow this guide:

Get the kitti track txt files.

  1. Setting the output folder in ppnet.txt configuration file. The variable is kitti-track-output-dir=<desired output folder path>.

  2. Execute the app with the command deepstream-transfer-learning-app -c <configuration_file_name.txt>. In our specific case was deepstream-transfer-learning-app -c ppnet.txt.

  3. Go to the <desired output folder path> and you will find the kitti track txt files.

Group output KITTI tracker files into a single file and give JSON format

  • Run the following line:
python utils/file_formater_JSON_to_KITTI.py -file <PATH TO KITTI-TRACK ZIP OR FOLDER> -images <PATH TO FRAMES FOLDER>
  • Output: KITTI_CUMMULATED.txt, formated_KITTI_CUMMULATED.txt

Subir el JSON e imagenes a VGG Image Annotator

  1. Modify get_frames.py to configure the video input, the output folder for the frames and to configure the frames names. It is important to know that kitti track files have a name in a specific format Ex: 00_000_000000.txt corresponding to the frame 0.

Note: The name of each frame should be the same as the corresponding kitti track file. There is a unique kitti track file for each frame.

  1. Execute get_frames.py.

Custom config for VGG annotator

To use the VGG Image annotator we need to add attributes to the annotations. We have to add specifically region attributes for: tracker_id, frame_id and name

Using VGG Image Annotator to make tracker id corrections in each video frame.

  1. Go to VGG Image Annotator https://www.robots.ox.ac.uk/~vgg/software/via/via_demo.html.

  2. Remove the example images and then click on "Add Files". Select all the frames and then upload them.

  3. Correct each track id in each frame.

from JSON vgg annotations to KITTI format for video sequence

After we obtain the gt labels from the VGG annotator, we just have to excecute the notebook json2kitti to obatain a kitti txt file for that specific video sequence.

DeepStream Configuration files

The configs used for the tracker evaluation can be found in deepstream_configs/.. . An explanation of the configs used are:

  1. config_nvdsanalytics.txt -> 10 line crossing over the stream 0 are implemented to count people in and people out of the room.
  2. ppnet.txt -> general config for the deepstream app
  3. pri-ppnet.txt -> min-confidence for detection is set to 0.1
  4. tracker-orig.yml -> changes in feature extraction and duplicates4IOU

Running the code

The code can be run in one of two ways:

  • From the terminal via one of the scripts here. See each script for instructions and arguments, hopefully this is self-explanatory.
  • Directly by importing this package into your code, see the same scripts above for how.

Quickly evaluate on supported benchmarks

To enable you to use TrackEval for evaluation as quickly and easily as possible, we provide ground-truth data, meta-data and example trackers for all currently supported benchmarks. You can download this here: data.zip (~150mb).

The easiest way to begin is to extract this zip into the repository root folder such that the file paths look like: TrackEval/data/gt/...

This then corresponds to the default paths in the code. You can now run each of the scripts here without providing any arguments and they will by default evaluate all trackers present in the supplied file structure. To evaluate your own tracking results, simply copy your files as a new tracker folder into the file structure at the same level as the example trackers (MPNTrack, CIWT, track_rcnn, qdtrack, ags, Tracktor++, STEm_Seg), ensuring the same file structure for your trackers as in the example.

Of course, if your ground-truth and tracker files are located somewhere else you can simply use the script arguments to point the code toward your data.

To ensure your tracker outputs data in the correct format, check out our format guides for each of the supported benchmarks here, or check out the example trackers provided.

Evaluate on your own custom benchmark

To evaluate on your own data, you have two options:

  • Write custom dataset code (more effort, rarely worth it).
  • Convert your current dataset and trackers to the same format of an already implemented benchmark.

To convert formats, check out the format specifications defined here.

By default, we would recommend the MOTChallenge format, although any implemented format should work. Note that for many cases you will want to use the argument --DO_PREPROC False unless you want to run preprocessing to remove distractor objects.

Requirments

Code tested on Python 3.7.

  • Minimum requirements: numpy, scipy
  • For plotting: matplotlib
  • For segmentation datasets (KITTI MOTS, MOTS-Challenge, DAVIS, YouTube-VIS): pycocotools
  • For DAVIS dataset: Pillow
  • For J & F metric: opencv_python, scikit_image
  • For simples test-cases for metrics: pytest

use pip3 -r install requirements.txt to install all possible requirements.

use pip3 -r install minimum_requirments.txt to only install the minimum if you don't need the extra functionality as listed above.

Timing analysis

Evaluating CLEAR + ID metrics on Lift_T tracker on MOT17-train (seconds) on a i7-9700K CPU with 8 physical cores (median of 3 runs):

Num Cores TrackEval MOTChallenge Speedup vs MOTChallenge py-motmetrics Speedup vs py-motmetrics
1 9.64 66.23 6.87x 99.65 10.34x
4 3.01 29.42 9.77x 33.11x*
8 1.62 29.51 18.22x 61.51x*

*using a different number of cores as py-motmetrics doesn't allow multiprocessing.

python scripts/run_mot_challenge.py --BENCHMARK MOT17 --TRACKERS_TO_EVAL Lif_T --METRICS CLEAR Identity --USE_PARALLEL False --NUM_PARALLEL_CORES 1  

Evaluating CLEAR + ID metrics on LPC_MOT tracker on MOT20-train (seconds) on a i7-9700K CPU with 8 physical cores (median of 3 runs):

Num Cores TrackEval MOTChallenge Speedup vs MOTChallenge py-motmetrics Speedup vs py-motmetrics
1 18.63 105.3 5.65x 175.17 9.40x
python scripts/run_mot_challenge.py --BENCHMARK MOT20 --TRACKERS_TO_EVAL LPC_MOT --METRICS CLEAR Identity --USE_PARALLEL False --NUM_PARALLEL_CORES 1

License

TrackEval is released under the MIT License.

Contact

If you encounter any problems with the code, please contact Jonathon Luiten ([email protected]). If anything is unclear, or hard to use, please leave a comment either via email or as an issue and I would love to help.

Dedication

This codebase was built for you, in order to make your life easier! For anyone doing research on tracking or using trackers, please don't hesitate to reach out with any comments or suggestions on how things could be improved.

Contributing

We welcome contributions of new metrics and new supported benchmarks. Also any other new features or code improvements. Send a PR, an email, or open an issue detailing what you'd like to add/change to begin a conversation.

Citing TrackEval

If you use this code in your research, please use the following BibTeX entry:

@misc{luiten2020trackeval,
  author =       {Jonathon Luiten, Arne Hoffhues},
  title =        {TrackEval},
  howpublished = {\url{https://github.com/JonathonLuiten/TrackEval}},
  year =         {2020}
}

Furthermore, if you use the HOTA metrics, please cite the following paper:

@article{luiten2020IJCV,
  title={HOTA: A Higher Order Metric for Evaluating Multi-Object Tracking},
  author={Luiten, Jonathon and Osep, Aljosa and Dendorfer, Patrick and Torr, Philip and Geiger, Andreas and Leal-Taix{\'e}, Laura and Leibe, Bastian},
  journal={International Journal of Computer Vision},
  pages={1--31},
  year={2020},
  publisher={Springer}
}

If you use any other metrics please also cite the relevant papers, and don't forget to cite each of the benchmarks you evaluate on.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published