tad-eval
TAD: A Large-Scale Benchmark for Traffic Accidents Detection from Video Surveillance — Xu et al. (2022) (arXiv:2209.12386, 2022)
What this evaluates
Evaluates computer vision models on detecting traffic accidents from surveillance footage across image classification, video classification, and object detection tasks. It probes the model's ability to distinguish accident scenarios from normal traffic and localize accident events in real-world highway scenes.
Datasets
Metrics
F1-score (primary) — range: [0, 1]
- Harmonic mean of Precision and Recall: 2 * (Precision * Recall) / (Precision + Recall). Used as the headline metric for binary accident classification tasks.
mAP@0.5 — range: [0, 1]
- Mean Average Precision at Intersection over Union (IoU) threshold of 0.5. Averages the AP across all four accident categories (roll over, wreck, collision, victims).
Recall — range: [0, 1]
- True Positive Rate: TP / (TP + FN). Measures the proportion of actual accidents correctly identified.
Precision — range: [0, 1]
- Positive Predictive Value: TP / (TP + FP). Measures the proportion of predicted accidents that are correct.
AP — range: [0, 1]
- Average Precision across all confidence thresholds for a single class.
AR — range: [0, 1]
- Average Recall across all confidence thresholds and IoU thresholds for a single class.
Input / output format
Input: RGB images or video clips (16 frames, 112x112 pixels) captured from third-person surveillance cameras on highways.
Output: Binary class label (Accident/Normal) for classification tasks; bounding boxes with class labels (roll over, wreck, collision, victims) and confidence scores for object detection.
Scoring recipe
def compute_metrics(preds, gold):
# Classification
tp = sum(1 for p, g in zip(preds, gold) if p == 1 and g == 1)
fp = sum(1 for p, g in zip(preds, gold) if p == 1 and g == 0)
fn = sum(1 for p, g in zip(preds, gold) if p == 0 and g == 1)
precision = tp / (tp + fp) if (tp + fp) > 0 else 0
recall = tp / (tp + fn) if (tp + fn) > 0 else 0
f1 = 2 * precision * recall / (precision + recall) if (precision + recall) > 0 else 0
# Object Detection (per class)
aps = []
for cls in classes:
cls_preds = get_preds_for_class(preds, cls)
cls_gold = get_gold_for_class(gold, cls)
aps.append(calculate_ap(cls_preds, cls_gold, iou_thresh=0.5))
map_05 = sum(aps) / len(aps)
return f1, map_05, precision, recall
Common pitfalls
- Bounding boxes are expanded by 1/3 from the minimum external rectangle to capture background features, which inflates detection metrics compared to standard tight annotations.
- The test set is fixed across all three tasks (1490 images / same video source), so performance gains may not be independent across image classification, video classification, and object detection.
- A fixed confidence threshold of 0.4 is used to convert object detection outputs into binary accident predictions, which is non-standard for mAP calculation and affects Recall/Precision/F1.
Evidence (verbatim from paper)
TAD randomly extracted 24,810 labeled images from 333 videos, 4 main accident types. ... TAD is split into train, validation and test sets. ... Evaluation metrics for objection detection are AR, AP and MAP(0.5) while results for tests on single image are measured by Recall, Precision and F1-score to present comparison with image classification. The comparison results of image classification task within the three datasets evaluated by Recall, Precision and F1-score in Table 3.
Citation
@misc{xu2022tad,
title={TAD: A Large-Scale Benchmark for Traffic Accidents Detection from Video Surveillance},
author={Xu et al. (2022)},
year={2022},
note={arXiv:2209.12386}
}
1---2name: tad-eval3description: Evaluates computer vision models on detecting traffic accidents from surveillance footage across image classification, video classification, and object detection tasks. It probes the model's ability to distinguish accident scenarios from normal traffic and localize accident events in real-world highway scenes. Use when the user wants to benchmark on TAD, or asks about evaluating this task. Reports F1-score.4---56# tad-eval78> TAD: A Large-Scale Benchmark for Traffic Accidents Detection from Video Surveillance — Xu et al. (2022) (arXiv:2209.12386, 2022)910## What this evaluates1112Evaluates computer vision models on detecting traffic accidents from surveillance footage across image classification, video classification, and object detection tasks. It probes the model's ability to distinguish accident scenarios from normal traffic and localize accident events in real-world highway scenes.1314## Datasets1516- **TAD** — total 24810; splits: train (-1), val (-1), test (1490); repo https://github.com/yajunbaby/TAD-benchmark1718## Metrics1920- `F1-score` **(primary)** — range: [0, 1]21 - Harmonic mean of Precision and Recall: 2 * (Precision * Recall) / (Precision + Recall). Used as the headline metric for binary accident classification tasks.22- `mAP@0.5` — range: [0, 1]23 - Mean Average Precision at Intersection over Union (IoU) threshold of 0.5. Averages the AP across all four accident categories (roll over, wreck, collision, victims).24- `Recall` — range: [0, 1]25 - True Positive Rate: TP / (TP + FN). Measures the proportion of actual accidents correctly identified.26- `Precision` — range: [0, 1]27 - Positive Predictive Value: TP / (TP + FP). Measures the proportion of predicted accidents that are correct.28- `AP` — range: [0, 1]29 - Average Precision across all confidence thresholds for a single class.30- `AR` — range: [0, 1]31 - Average Recall across all confidence thresholds and IoU thresholds for a single class.3233## Input / output format3435**Input**: RGB images or video clips (16 frames, 112x112 pixels) captured from third-person surveillance cameras on highways.3637**Output**: Binary class label (Accident/Normal) for classification tasks; bounding boxes with class labels (roll over, wreck, collision, victims) and confidence scores for object detection.3839## Scoring recipe4041```python42def compute_metrics(preds, gold):43 # Classification44 tp = sum(1 for p, g in zip(preds, gold) if p == 1 and g == 1)45 fp = sum(1 for p, g in zip(preds, gold) if p == 1 and g == 0)46 fn = sum(1 for p, g in zip(preds, gold) if p == 0 and g == 1)47 precision = tp / (tp + fp) if (tp + fp) > 0 else 048 recall = tp / (tp + fn) if (tp + fn) > 0 else 049 f1 = 2 * precision * recall / (precision + recall) if (precision + recall) > 0 else 050 51 # Object Detection (per class)52 aps = []53 for cls in classes:54 cls_preds = get_preds_for_class(preds, cls)55 cls_gold = get_gold_for_class(gold, cls)56 aps.append(calculate_ap(cls_preds, cls_gold, iou_thresh=0.5))57 map_05 = sum(aps) / len(aps)58 return f1, map_05, precision, recall59```6061## Common pitfalls6263- Bounding boxes are expanded by 1/3 from the minimum external rectangle to capture background features, which inflates detection metrics compared to standard tight annotations.64- The test set is fixed across all three tasks (1490 images / same video source), so performance gains may not be independent across image classification, video classification, and object detection.65- A fixed confidence threshold of 0.4 is used to convert object detection outputs into binary accident predictions, which is non-standard for mAP calculation and affects Recall/Precision/F1.6667## Evidence (verbatim from paper)6869> TAD randomly extracted 24,810 labeled images from 333 videos, 4 main accident types. ... TAD is split into train, validation and test sets. ... Evaluation metrics for objection detection are AR, AP and MAP(0.5) while results for tests on single image are measured by Recall, Precision and F1-score to present comparison with image classification. The comparison results of image classification task within the three datasets evaluated by Recall, Precision and F1-score in Table 3.7071## Citation7273```bibtex74@misc{xu2022tad,75 title={TAD: A Large-Scale Benchmark for Traffic Accidents Detection from Video Surveillance},76 author={Xu et al. (2022)},77 year={2022},78 note={arXiv:2209.12386}79}80```8182- arXiv: 2209.12386