TOP: Temporal Occurrence Prediction

Accident Anticipation via Temporal Occurrence Prediction

Tianhao Zhao, Yiyang Zou, Zihao Mao, Peilun Xiao, Yulin Huang, Hongda Yang, Yuxuan Li, Qun Li, Guobin Wu, Yutian Lin

Abstract

Traffic accident anticipation is a critical task for autonomous driving systems. We propose Temporal Occurrence Prediction (TOP), a novel framework that predicts when accidents will occur through temporal modeling. Our method enables real-time accident anticipation by modeling the temporal occurrence of potential collisions, providing timely alerts to enhance road safety.

The key insight is that modeling the temporal dynamics of accident occurrence allows for more accurate and actionable predictions in online scenarios. This leads to more reliable anticipation systems suitable for practical deployment.

Method Overview

🎯 Temporal Modeling

We model accident anticipation through temporal occurrence prediction, capturing when accidents are likely to happen.

⚡ Online Prediction

Our method performs real-time accident anticipation, suitable for practical deployment in autonomous driving systems.

🔄 Unified Framework

The same architecture works across multiple datasets (CAP, DADA, Nexar) with consistent evaluation metrics.

Datasets

Download the datasets and annotations for training and evaluation:

CAP & DADA Datasets

Nexar Dataset

Evaluation Metrics

Our framework introduces comprehensive evaluation metrics for accident anticipation:

Temporal Metrics

📊 mAP (Mean Average Precision)

Average precision computed at different time windows (0.5s, 1.0s, 1.5s) before the accident. Measures classification accuracy at various anticipation horizons.

📈 mAUC (Mean Area Under ROC)

Mean AUC computed at FPR ≤ 10% across time windows. Evaluates true positive rate while maintaining low false alarm rate.

⏱️ TTA (Time-to-Accident)

Measures how early the model detects accidents before they occur. Higher TTA indicates earlier and more actionable warnings.

Metric Computation

We provide a reference implementation of our evaluation metrics. Key metrics include:

Download the metrics implementation:

Download metrics_example.py

Key Results

Our method achieves state-of-the-art performance on multiple benchmarks:

CAP Dataset

XX.X%
mAP
XX.X%
mAUC
XX.X%
AP@0.5s

DADA-2000 Dataset

XX.X%
mAP
XX.X%
mAUC
XX.X%
AP@1.0s

Nexar Dataset

XX.X%
mAP
XX.X%
mAUC
X.Xs
TTA

Quick Start

Get started with TOP in three steps:

1. Install Dependencies

conda create -n top python=3.8.5 -y
conda activate top
pip install torch torchvision
pip install -U openmim
mim install mmengine==0.10.7
mim install mmcv==2.2.0

2. Clone and Install

git clone https://github.com/happytianhao/TOP.git
cd TOP
pip install -v -e .

3. Train

python tools/train.py configs/accident_anticipation/top/top_cap.py

Citation

If you find this work useful, please consider citing:

@inproceedings{zhao2025accident,
  title={Accident Anticipation via Temporal Occurrence Prediction},
  author={Zhao, Tianhao and Zou, Yiyang and Mao, Zihao and Xiao, Peilun and Huang, Yulin and Yang, Hongda and Li, Yuxuan and Li, Qun and Wu, Guobin and Lin, Yutian},
  booktitle={Advances in Neural Information Processing Systems (NeurIPS)},
  year={2025}
}

Follow-up Work

Check out our follow-up work on collision-anchored risk propagation:

RiskProp: Collision-Anchored Self-Supervised Risk Propagation for Early Accident Anticipation
Yiyang Zou, Tianhao Zhao, Peilun Xiao, Hongyu Jin, Longyu Qi, Yuxuan Li, Liyin Liang, Yifeng Qian, Chunbo Lai, Yutian Lin, Zhihui Li, Yu Wu
CVPR 2026 Highlight

@inproceedings{zou2026riskprop,
  title={RiskProp: Collision-Anchored Self-Supervised Risk Propagation for Early Accident Anticipation},
  author={Zou, Yiyang and Zhao, Tianhao and Xiao, Peilun and Jin, Hongyu and Qi, Longyu and Li, Yuxuan and Liang, Liyin and Qian, Yifeng and Lai, Chunbo and Lin, Yutian and Li, Zhihui and Wu, Yu},
  booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year={2026}
}