You need to agree to share your contact information to access this model
This repository is publicly accessible, but you have to accept the conditions to access its files and content.
By accessing this model, you agree to use it responsibly and in compliance with applicable laws. This model is intended for research and development purposes in driver assistance systems.
Log in or Sign Up to review the conditions and access this model content.
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 torch torchvision transformers huggingface_hub opencv-python numpy pillow albumentations
Basic Usage
from huggingface_hub import hf_hub_download
import sys
import os
# Download model loader
loader_path = hf_hub_download(
    repo_id="nexar-ai/badas-open",
    filename="badas_loader.py"
)
sys.path.insert(0, os.path.dirname(loader_path))
# Load model
from badas_loader import load_badas_model
model = load_badas_model()
# Predict on video
predictions = model.predict("dashcam_video.mp4")
# Get collision probability over time
for frame_idx, prob in enumerate(predictions):
    if prob > 0.8:  # High risk threshold
        print(f"β οΈ Collision risk at frame {frame_idx}: {prob:.2%}")
ποΈ 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
badas-open/
βββ model.safetensors         # Model weights
βββ config.json               # Model configuration  
βββ badas_loader.py          # Loading utilities
βββ preprocessing.py          # Video preprocessing
βββ 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
- Downloads last month
- 4
Model tree for nexar-ai/BADAS-Open
Base model
facebook/vjepa2-vitl-fpc64-256