AccidentBlip: Agent of Accident Warning based on MA-former

Yihua Shao, Yeling Xu, Xinwei Long, Siyu Chen, Ziyang Yan, Yang Yang, Haoting Liu, Yan Wang, Hao Tang, Zhen Lei

TL;DR

AccidentBlip is a vision-only transformer agent designed to detect and predict traffic accidents in real-time. By introducing a novel Motion Accident Transformer (MA-former) that prioritizes temporal attention over standard self-attention, the model achieves state-of-the-art performance on the DeepAccident dataset, outperforming more computationally expensive multimodal and large-language-model-based approaches.

What Problem Does This Paper Address?

Predicting traffic accidents is a high-stakes challenge for autonomous driving. Traditional methods often rely on temporal networks like RNNs or LSTMs, which can struggle with the complexity of real-world driving. More recent "multimodal" solutions attempt to solve this by fusing LiDAR and vision data, but these are often prohibitively expensive and memory-intensive for vehicle deployment.

Furthermore, many existing video-language models (Video LLMs) are designed for single-view video and fail to account for the multi-camera setups (front, back, sides) standard in modern vehicles. There is a clear need for a system that is efficient, vision-only, and capable of reasoning across both time (consecutive frames) and space (multiple viewpoints and even multiple vehicles).

Methods

The authors propose AccidentBlip, a framework built around the MA-former (Motion Accident Transformer). The architecture follows a sophisticated pipeline:

  1. Feature Extraction: Multi-view images from each frame are processed by a pre-trained Vision Transformer (ViT-14g) to extract spatial features.
  2. MA-former: This is the core innovation. Unlike the standard Q-former used in models like BLIP-2, the MA-former replaces self-attention with temporal attention. This allows the model to use the "query" from the previous frame to inform the current frame, effectively creating a memory of recent motion.
  3. Residual Connections: The model employs two specific residual connections ($c_1$ and $c_2$) to link previous queries and current image features to the transformer's output. This prevents the loss of critical information over long sequences.
  4. Complex System Adaptation: For Vehicle-to-Vehicle (V2V) and Vehicle-to-Everything (V2X) scenarios, AccidentBlip aggregates queries from multiple vehicles and infrastructure nodes, concatenating them to form a global understanding of the traffic scene.
Fig. 1: Overall architecture of AccidentBlip. We input the multi-view images of each frame into ViT to obtain the features of each frame. Then we input previous frame query and multi-view images features into MA-former and input the text description. Finally, we use residual to connect the previous frame query and the image features of this frame with MA- former’s output and input it into the MA-former corresponding to the next frame.

Datasets

The model was trained and evaluated on the DeepAccident dataset. This is a comprehensive benchmark containing 691 scenarios and 285,000 samples. Crucially, it includes synchronized data from four different vehicles and one infrastructure node, making it ideal for testing V2V and V2X capabilities.

Key Insights and Ideas

  • Temporal over Spatial Self-Attention: The researchers found that for accident prediction, modeling how a scene changes over time is more critical than standard self-attention within a single frame's features. By forcing the model to look at the transition between frames, it captures "motion" more effectively.
  • Vision-Only Efficiency: AccidentBlip proves that you don't necessarily need LiDAR to achieve high-accuracy accident warnings. By optimizing how visual temporal data is processed, the model outperforms multimodal competitors like V2Xformer while avoiding their high memory overhead.
  • The Power of Residuals: The ablation studies revealed that the residual connection linking the previous frame's query ($c_1$) was the most significant contributor to temporal understanding. When combined with the image feature residual ($c_2$), the model's precision jumped by over 8%.
Fig. 2: Architecture of MA-former. MA-former replaces Q-former’s self-attention with temporal attention to realize processing temporal images.

Key Results

AccidentBlip achieved state-of-the-art (SOTA) results across several categories on the DeepAccident benchmark:

  • Ego-Vehicle Detection: Reached 62.6% Precision and 64.7% Accident Prediction Accuracy (APA), significantly higher than Video-LLaVA and AccidentGPT.
  • V2X Scenarios: When utilizing infrastructure data, performance climbed to 72.4% APA.
  • Prediction Horizon: The model is highly effective at providing early warnings. It maintains strong predictive power up to a 3-second horizon, though accuracy begins to drop off at the 4-second mark.
Table showing AccidentBlip outperforming baselines in both ego and V2X (ego + infra) settings.

Limitations and Future Work

While AccidentBlip is a major step forward, the authors note a few areas for growth:

  • Prediction Limit: The model's "foresight" effectively caps at 4 seconds. Extending this horizon would provide even more reaction time for autonomous systems.
  • Integration: The current work focuses on the "warning agent" aspect. Future work could involve integrating this temporal reasoning directly into the end-to-end planning and control modules of autonomous vehicles.
  • Environmental Robustness: As a vision-only system, its performance in extreme weather (heavy fog or snow) remains a standard challenge for the field to address.

Summary updated

BibTeX
@misc{shao2024accidentblip,
  author = {Yihua Shao and Yeling Xu and Xinwei Long and Siyu Chen and Ziyang Yan and Yang Yang and Haoting Liu and Yan Wang and Hao Tang and Zhen Lei},
  title = {{AccidentBlip: Agent of Accident Warning based on MA-former}},
  year = {2024},
  eprint = {2404.12149},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.12149},
}
Figure