Spaces:
Build error
Build error
VascoDVRodrigues
commited on
Commit
·
8e5798a
1
Parent(s):
71a8d2b
changed README
Browse files
README.md
CHANGED
|
@@ -13,6 +13,76 @@ app_file: app.py
|
|
| 13 |
pinned: false
|
| 14 |
---
|
| 15 |
|
| 16 |
-
#
|
| 17 |
|
| 18 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
pinned: false
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# How to Use
|
| 17 |
|
| 18 |
+
The MOT metrics takes two numeric arrays as input corresponding to the predictions and references bounding boxes:
|
| 19 |
+
```python
|
| 20 |
+
>>> import numpy as np
|
| 21 |
+
>>> module = evaluate.load("SEA-AI/mot-metrics")
|
| 22 |
+
>>> predicted =[[1,1,10,20,30,40,0.85],[2,1,15,25,35,45,0.78],[2,2,55,65,75,85,0.95]]
|
| 23 |
+
>>> ground_truth = [[1, 1, 10, 20, 30, 40],[2, 1, 15, 25, 35, 45]]
|
| 24 |
+
|
| 25 |
+
>>> results = module._compute(predictions=predicted, references=ground_truth, max_iou=0.5)
|
| 26 |
+
>>> results
|
| 27 |
+
{'idf1': 0.8421052631578947, 'idp': 0.8888888888888888,
|
| 28 |
+
'idr': 0.8, 'recall': 0.8, 'precision': 0.8888888888888888,
|
| 29 |
+
'num_unique_objects': 3,'mostly_tracked': 2,
|
| 30 |
+
'partially_tracked': 1, 'mostly_lost': 0,
|
| 31 |
+
'num_false_positives': 1, 'num_misses': 2,
|
| 32 |
+
'num_switches': 0, 'num_fragmentations': 0,
|
| 33 |
+
'mota': 0.7, 'motp': 0.02981870229007634,
|
| 34 |
+
'num_transfer': 0, 'num_ascend': 0,
|
| 35 |
+
'num_migrate': 0}
|
| 36 |
+
```
|
| 37 |
+
|
| 38 |
+
## Input
|
| 39 |
+
Each line of the **predictions** array is a list with the following format:
|
| 40 |
+
```
|
| 41 |
+
[frame ID, object ID, x, y, width, height, confidence]
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
Each line of the **references** array is a list with the following format:
|
| 45 |
+
```
|
| 46 |
+
[frame ID, object ID, x, y, width, height]
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
The `max_iou` parameter is used to filter out the bounding boxes with IOU less than the threshold. The default value is 0.5. This means that if a ground truth and a predicted bounding boxes IoU value is less than 0.5, then the predicted bounding box is not considered for association.
|
| 50 |
+
|
| 51 |
+
## Output
|
| 52 |
+
The output is a dictionary containing the following metrics:
|
| 53 |
+
|
| 54 |
+
| Name | Description |
|
| 55 |
+
| :------------------- | :--------------------------------------------------------------------------------- |
|
| 56 |
+
| idf1 | ID measures: global min-cost F1 score. |
|
| 57 |
+
| idp | ID measures: global min-cost precision. |
|
| 58 |
+
| idr | ID measures: global min-cost recall. |
|
| 59 |
+
| recall | Number of detections over number of objects. |
|
| 60 |
+
| precision | Number of detected objects over sum of detected and false positives. |
|
| 61 |
+
| num_unique_objects | Total number of unique object ids encountered. |
|
| 62 |
+
| mostly_tracked | Number of objects tracked for at least 80 percent of lifespan. |
|
| 63 |
+
| partially_tracked | Number of objects tracked between 20 and 80 percent of lifespan. |
|
| 64 |
+
| mostly_lost | Number of objects tracked less than 20 percent of lifespan. |
|
| 65 |
+
| num_false_positives | Total number of false positives (false-alarms). |
|
| 66 |
+
| num_misses | Total number of misses. |
|
| 67 |
+
| num_switches | Total number of track switches. |
|
| 68 |
+
| num_fragmentations | Total number of switches from tracked to not tracked. |
|
| 69 |
+
| mota | Multiple object tracker accuracy. |
|
| 70 |
+
| motp | Multiple object tracker precision. |
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
## Citations
|
| 74 |
+
```bibtex
|
| 75 |
+
@InProceedings{huggingface:module,
|
| 76 |
+
title = {A great new module},
|
| 77 |
+
authors={huggingface, Inc.},
|
| 78 |
+
year={2020}}
|
| 79 |
+
|
| 80 |
+
@article{milan2016mot16,
|
| 81 |
+
title={MOT16: A benchmark for multi-object tracking},
|
| 82 |
+
author={Milan, Anton and Leal-Taix{\'e}, Laura and Reid, Ian and Roth, Stefan and Schindler, Konrad},
|
| 83 |
+
journal={arXiv preprint arXiv:1603.00831},
|
| 84 |
+
year={2016}}
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
## Further References
|
| 88 |
+
- [Github Repository - py-motmetrics](https://github.com/cheind/py-motmetrics/tree/develop)
|