BADAS-Open: Ego-Centric Collision Prediction Model
π― Overview
BADAS-Open (V-JEPA2 Based Advanced Driver Assistance System) is a state-of-the-art collision prediction model specifically designed for ego-centric threat detection in real-world driving scenarios. Unlike traditional methods that detect any visible accident, BADAS focuses exclusively on collisions and near-misses that directly threaten the recording vehicle, dramatically reducing false alarms in real-world deployment.
Key Features
- π― Ego-Centric Focus: Distinguishes between ego-vehicle threats and irrelevant accidents
- π Real-World Trained: Trained on 1,500 real dashcam videos from actual driving scenarios
- β‘ State-of-the-Art Performance: Outperforms academic methods and commercial ADAS systems
- π§ Foundation Model Based: Built on V-JEPA2 for superior temporal understanding
- π¬ Near-Miss Learning: Includes emergency maneuver scenarios for richer training signals
π Performance
BADAS-Open achieves state-of-the-art results across all major benchmarks when evaluated on ego-vehicle involved collisions:
| Dataset | AP β | AUC β | mTTA (s) β | Test Size |
|---|---|---|---|---|
| Nexar | 0.86 | 0.88 | 4.9 | 1,344 |
| DoTA | 0.94 | 0.70 | 4.0 | 367 |
| DADA-2000 | 0.87 | 0.77 | 4.3 | 113 |
| DAD | 0.66 | 0.87 | 2.7 | 116 |
Compared to baseline methods (DSTA, UString) with AP scores of 0.06-0.53
What Makes This Different?
Traditional collision prediction models are trained to detect any accident in the camera's view, leading to excessive false alarms from irrelevant incidents (e.g., accidents in adjacent lanes). BADAS solves this by:
- Ego-Centric Reformulation: Only predicting collisions that directly threaten the ego vehicle
- Real-World Data: Trained on actual dashcam footage, not synthetic or staged scenarios
- Consensus-Based Timing: Alert times validated by 10 certified defensive driving experts
- Near-Miss Inclusion: Learning from successfully-avoided dangerous situations
Example: BADAS prediction on real dashcam footage
π Quick Start
Installation
pip install badas
Basic Usage
from badas.inference import BADAS, BADASConfig
# Load from HuggingFace (downloads and caches on first run)
predictor = BADAS.from_pretrained("nexar-ai/BADAS-Open")
# Or from a local file:
# predictor = BADAS("BADAS-Open.ckpt")
# Predict on a video
predictions = predictor.predict_video("dashcam.mp4", stride=1)
for pred in predictions:
if pred["probability"] > 0.8:
print(f"[{pred['timestamp']:.2f}s] β οΈ Collision risk: {pred['probability']:.2%}")
Moving-Window (Streaming) Inference
# Yields one prediction per stride window as frames arrive
for pred in predictor.predict_stream("dashcam.mp4", stride=1):
print(f"[{pred['timestamp']:.2f}s] {pred['risk_level']:<6} p={pred['probability']:.3f}")
ποΈ Model Architecture
Input Video (16 frames @ 256Γ256)
β
V-JEPA2 Encoder (ViT-L)
β (2048 patches Γ 1024 dim)
Attentive Probe Aggregation (12 queries Γ 64 dim)
β
3-Layer MLP Prediction Head
β
Collision Probability [0, 1]
ποΈ Model Architecture
BADAS architecture: V-JEPA2 backbone with attentive probe aggregation and MLP head
Key Components:
- Backbone: V-JEPA2 (Vision Joint-Embedding Predictive Architecture v2)
- Patch Aggregation: Attentive probe with 12 learned queries
- Head: 3-layer MLP with GELU activation, LayerNorm, dropout 0.1
- Training: End-to-end fine-tuning on Nexar dataset (1.5k videos)
π Requirements
- Python β₯ 3.8
- PyTorch β₯ 2.0
- torchvision β₯ 0.15
- transformers β₯ 4.30
- opencv-python β₯ 4.8
- huggingface_hub β₯ 0.16
π Model Files
nexar-ai/BADAS-Open/
βββ BADAS-Open.ckpt # Model weights (standard BADAS checkpoint)
βββ badas_loader.py # Minimal loading example
βββ README.md # This file
π¬ Training Details
- Dataset: Nexar Dashcam Collision Prediction Dataset (1,500 videos)
- 750 collision/near-miss events
- 750 normal driving samples
- Optimizer: AdamW (lr=1e-5, weight decay=1e-4)
- Loss: Binary Cross-Entropy
- Augmentations: Weather simulation (rain, snow), lighting variations, motion blur
- Training Time: ~8 hours on 4Γ A100 GPUs
π― Use Cases
β Recommended Uses
- Driver assistance system research
- Autonomous vehicle safety testing
- Dashcam collision warning applications
- Traffic safety analysis
- Dataset for training improved models
β οΈ Limitations
- Long-tail events: Performance drops on rare categories (animals, motorcycles)
- Monocular only: Requires single-camera dashcam input
- Processing delay: 16-frame buffer introduces latency
- Not for critical safety: Research model, not certified for production deployment
π Citation
If you use this model in your research, please cite:
@article{goldshmidt2025badas,
title={BADAS: Context Aware Collision Prediction Using Real-World Dashcam Data},
author={Goldshmidt, Roni and Scott, Hamish and Niccolini, Lorenzo and
Zhu, Shizhan and Moura, Daniel and Zvitia, Orly},
journal={arXiv preprint},
year={2025}
}
π Resources
- π Paper: arXiv (coming soon)
- ποΈ Dataset: Nexar Collision Prediction Dataset
- π Challenge: Kaggle Competition
- π Website: www.nexar-ai.com
- π» Code: GitHub Repository
π€ Model Variants
- BADAS-Open (this model): Trained on 1.5k public videos
- BADAS-Pro: Commercial variant trained on 40k proprietary videos
- Higher performance (AP: 0.91 on Nexar)
- Better edge-case handling
- Contact Nexar for licensing
βοΈ License & Terms
This model is released under Apache 2.0 License with the following conditions:
- β Free for research and commercial use
- β Modification and redistribution permitted
- β οΈ No warranty provided - use at your own risk
- β οΈ Not certified for safety-critical applications
- π Must provide attribution when using
Responsible AI Notice: This model is intended to assist human drivers, not replace them. Always maintain full attention while driving.
π Acknowledgments
- V-JEPA2 foundation model by Meta AI Research
- Nexar's driver community for dataset contribution
- Re-annotations of DAD, DADA-2000, and DoTA benchmarks
Open an issue on our GitHub or contact us at research@nexar.com
Model tree for nexar-ai/BADAS-Open
Base model
facebook/vjepa2-vitl-fpc64-256