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 that directly threaten the recording vehicle.
- π― Ego-Centric Focus: Only predicts collisions threatening the ego vehicle, reducing false alarms by 85%
- π Real-World Performance: Trained on 1,500+ real dashcam videos with expert-validated annotations
- β‘ Production Ready: Optimized for real-time inference on edge devices
- π§ Foundation Model: Built on Meta's V-JEPA2 for superior temporal understanding
BADAS-Open achieves state-of-the-art results across all major benchmarks:
| Dataset | AP β | AUC β | mTTA (s) β | FPS |
|---|---|---|---|---|
| Nexar | 0.86 | 0.88 | 4.9 | 45 |
| DoTA | 0.94 | 0.70 | 4.0 | 52 |
| DADA-2000 | 0.87 | 0.77 | 4.3 | 48 |
| DAD | 0.66 | 0.87 | 2.7 | 50 |
Outperforms previous SOTA (DSTA, UString) by 30-80% on AP metric
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
# Install from PyPI
pip install badas
# Or install from source
git clone https://github.com/nexar-ai/badas-open.git
cd badas-open
pip install -e .from badas import BADASModel
# Initialize model
model = BADASModel(device="cuda") # or "cpu" for CPU inference
# Predict on video
predictions = model.predict("dashcam_video.mp4")
# Get collision risk for each frame window
for i, prob in enumerate(predictions):
if prob > 0.8:
print(f"β οΈ High collision risk at {i*0.125:.1f}s: {prob:.2%}")import torch
from badas import load_badas_model, preprocess_video
# Load model with custom configuration
model = load_badas_model(
device="cuda",
checkpoint_path="path/to/custom_checkpoint.pth" # Optional
)
# Preprocess video manually for batch processing
frames = preprocess_video(
"dashcam_video.mp4",
target_fps=8,
num_frames=16,
img_size=224
)
# Run inference
with torch.no_grad():
collision_probs = model(frames)
# Estimate time to collision
tta = model.estimate_time_to_accident(collision_probs, fps=8.0)
if tta is not None:
print(f"π¨ Collision in {tta:.1f} seconds!")BADAS leverages a sophisticated architecture combining:
- V-JEPA2 Backbone: Vision Joint-Embedding Predictive Architecture for temporal understanding
- Attentive Probe: 12 learned queries for spatial-temporal aggregation
- MLP Head: 3-layer prediction head with GELU activation and LayerNorm
- Getting Started Guide: Installation and basic usage
- API Reference: Detailed API documentation
- Model Zoo: Pre-trained model variants
- Training Guide: Fine-tune on custom data
- Deployment Guide: Production deployment strategies
If you use BADAS in your research, please cite our paper:
@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 arXiv:2025.xxxxx},
year={2025}
}The Nexar Collision Prediction Dataset used to train BADAS is available at:
- π€ HuggingFace Dataset
- π Kaggle Competition
# Clone repository
git clone https://github.com/nexar-ai/badas-open.git
cd badas-open
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest tests/
# Format code
black badas/
isort badas/# Basic inference example
python examples/basic_inference.py
# Batch processing example
python examples/batch_processing.py
# Real-time demo
python examples/realtime_demo.pyWe welcome contributions! Please see our Contributing Guidelines for details.
- π§ Performance optimizations
- π± Mobile/edge deployment
- π Multi-region dataset expansion
- π Evaluation metrics
- π Documentation improvements
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
- V-JEPA2 Foundation Model by Meta AI Research
- Nexar Driver Community for dataset contribution
- Academic Partners for benchmark annotations
- π Website: nexar.ai/badas
This model is intended for research and development purposes. It should not be used as the sole decision-making system for vehicle safety. Always maintain full attention while driving and follow all traffic laws and safety regulations.


