Dataset Viewer
Auto-converted to Parquet
video
video
time_of_event
float64
3.03
56.8
time_of_alert
float64
1.97
55.5
light_conditions
stringclasses
4 values
weather
stringclasses
4 values
scene
stringclasses
7 values
time_to_accident
float64
19.5
18.633
Normal
Cloudy
Urban
null
19.8
19.233
Normal
Cloudy
Sub-urban
null
20.101
20.068
Normal
Clear
Urban
null
19.267
18.333
Normal
Clear
Urban
null
21.146
18.196
Normal
Clear
Highway
null
19.953
17.551
Normal
Clear
Urban
null
20.287
19.219
Normal
Clear
Sub-urban
null
19.6
19.367
Normal
Cloudy
Sub-urban
null
19.833
18.267
Normal
Clear
Highway
null
21.177
17.942
Bright
Clear
Sub-urban
null
19
16.167
Normal
Clear
Highway
null
19.667
17
Normal
Cloudy
Urban
null
20.24
17.417
Normal
Clear
Sub-urban
null
20.133
19.067
Normal
Cloudy
Urban
null
10.067
6.833
Normal
Cloudy
Highway
null
20.706
16.493
Normal
Clear
Urban
null
19.967
17.867
Normal
Cloudy
Sub-urban
null
10.426
10.226
Normal
Clear
Other
null
21.864
20.197
Normal
Clear
Sub-urban
null
9.832
6.733
Normal
Cloudy
Highway
null
20.9
18.533
Normal
Cloudy
Urban
null
20.033
16.4
Dark
Clear
Urban
null
18.3
15.733
Normal
Clear
Urban
null
20.35
17.5
Normal
Clear
Urban
null
19.709
18.794
Normal
Cloudy
Urban
null
20.192
18.722
Normal
Cloudy
Urban
null
19.11
16.823
Normal
Clear
Urban
null
20.6
19.633
Normal
Clear
Urban
null
19.493
17.73
Normal
Clear
Urban
null
20.087
17.184
Normal
Rain
Urban
null
19.4
18.5
Normal
Cloudy
Highway
null
20.266
17.945
Normal
Rain
Urban
null
17.647
15.229
Normal
Cloudy
Highway
null
19.667
18.833
Normal
Clear
Urban
null
18.467
17.233
Normal
Cloudy
Urban
null
19.314
18.301
Normal
Clear
Highway
null
18
16.5
Normal
Cloudy
Highway
null
19.465
17.766
Normal
Clear
Urban
null
19.601
17.347
Normal
Clear
Sub-urban
null
20.033
16.633
Normal
Cloudy
Sub-urban
null
10.431
8.398
Twilight
Clear
Sub-urban
null
17.4
15.233
Normal
Clear
Urban
null
20.181
18.451
Normal
Cloudy
Sub-urban
null
20.8
19.533
Normal
Clear
Urban
null
19.633
16.833
Normal
Rain
Sub-urban
null
19.794
18.781
Normal
Clear
Urban
null
3.921
3.072
Normal
Clear
Highway
null
19.133
17.833
Normal
Cloudy
Urban
null
19.4
15.933
Normal
Cloudy
Highway
null
21.067
18.6
Normal
Rain
Highway
null
19.9
17.867
Normal
Clear
Urban
null
19.149
18.071
Normal
Rain
Urban
null
19.57
17.933
Normal
Clear
Sub-urban
null
20.967
20.067
Normal
Clear
Urban
null
20.15
18.515
Normal
Clear
Highway
null
19.933
19.1
Normal
Clear
Highway
null
19.237
17.898
Normal
Cloudy
Urban
null
19.667
18.667
Normal
Cloudy
Highway
null
19.233
17.3
Normal
Cloudy
Urban
null
20.02
19.119
Normal
Cloudy
Urban
null
20.745
17.641
Normal
Clear
Highway
null
19.52
15.449
Normal
Clear
Highway
null
10.524
9.991
Normal
Cloudy
Highway
null
19.805
18.629
Normal
Clear
Urban
null
19.231
17.811
Normal
Cloudy
Urban
null
19.233
17.133
Normal
Cloudy
Urban
null
19.661
18.453
Dark
Clear
Highway
null
21.86
19.867
Normal
Rain
Other
null
10.697
8.398
Normal
Cloudy
Highway
null
19.533
19.233
Normal
Clear
Urban
null
20.9
19.367
Normal
Clear
Sub-urban
null
20.267
18.733
Normal
Clear
Urban
null
19.92
19.019
Normal
Cloudy
Highway
null
22.267
21.5
Normal
Rain
Urban
null
18.6
17.8
Normal
Clear
Sub-urban
null
17.671
16.364
Normal
Clear
Other
null
20.167
19
Normal
Clear
Urban
null
20
18.833
Normal
Clear
Urban
null
19.964
17.645
Normal
Cloudy
Highway
null
19.9
16.733
Normal
Cloudy
Urban
null
20.533
20.133
Normal
Clear
Urban
null
20.733
19.533
Normal
Clear
Highway
null
20.55
18.048
Normal
Clear
Urban
null
20.133
16.167
Normal
Cloudy
Highway
null
19.448
17.9
Normal
Clear
Urban
null
21.8
19.774
Normal
Clear
Urban
null
19.167
17.333
Normal
Clear
Sub-urban
null
18.933
17.567
Normal
Clear
Urban
null
21.733
19.3
Normal
Cloudy
Urban
null
20.487
18.852
Normal
Clear
Highway
null
20.285
18.946
Normal
Clear
Urban
null
20.7
19.5
Normal
Clear
Urban
null
18.386
18.021
Normal
Clear
Urban
null
9.096
6.131
Normal
Cloudy
Highway
null
10.064
8.464
Normal
Clear
Highway
null
19.667
15.812
Normal
Cloudy
Urban
null
18.933
17.667
Normal
Cloudy
Sub-urban
null
19.666
18.297
Normal
Clear
Urban
null
19.4
18.9
Normal
Clear
Urban
null
19.806
18.611
Normal
Cloudy
Urban
null
End of preview. Expand in Data Studio

Nexar Collision Prediction Dataset

This dataset is part of the Nexar Dashcam Crash Prediction Challenge on Kaggle.

Dataset

The Nexar collision prediction dataset comprises videos from Nexar dashcams. Videos have a resolution of 1280x720 at 30 frames per second and typically have about 40 seconds of duration. The dataset contains 1500 videos where half show events where there was a collision or a collision was eminent (positive cases), and the other half shows regular driving (negative cases). The time of the event (collision or near-miss) is available for positive cases. The dataset is available in the train folder.

Goal

The goal of this dataset is to help build models to predict the time of collision. Models should be able to predict if a collision is about to happen or not. Both collisions and near-misses are treated equally as positive cases.

Model Assessment and Test Set

Models should be able to predict that a collision is about to happen as soon as possible, while minimizing false positives. Assessment scripts will be made available shortly that calculate the mean average precision across different times before collision (e.g. 500ms, 1000ms, 1500ms).

For this purpose, a test set is provided where videos have about 10 sec and end at 500/1000/1500ms before the event. The time_to_accident column tells how much time before the event the video was clipped (this columns is not available in the training set where videos are not clipped).

The test set is devided into public and private subsets to mirror Kaggle's competition. During the competition, teams only had access to scores computed on the public subset. At the end of the competition, teams were ranked using the scores on the private subset.

More details are available in the paper.

Usage

Loading training data

from datasets import load_dataset

dataset = load_dataset("videofolder", data_dir="/your/path/nexar_collision_prediction", split="train", drop_labels=False)

A positive example would look like this:

{'video': <decord.video_reader.VideoReader object at 0x7f5a97c22670>, 'label': 1, 'time_of_event': 20.367, 'time_of_alert': 19.299, 'light_conditions': 'Normal', 'weather': 'Cloudy', 'scene': 'Urban', 'time_to_accident': None}

and a negative example like this:

{'video': <decord.video_reader.VideoReader object at 0x7ff190129b50>, 'label': 0, 'time_of_event': None, 'time_of_alert': None, 'light_conditions': 'Normal', 'weather': 'Cloudy', 'scene': 'Urban', 'time_to_accident': None}

Running an evaluation

Included is a script that calculates mAP scores for the public and private test sets. The input is a CSV with one line per test video with the video ID and score (see sample_submission.csv).

$ python evaluate_submission.py sample_submission.csv
mAP (Public): 0.841203
mAP (Private): 0.861791

Paper and Citation

A paper is available describing the dataset and the evaluation framework used on the Nexar Dashcam Crash Prediction Challenge.

Please use the following reference when citing this dataset:

Daniel C. Moura, Shizhan Zhu, and Orly Zvitia . Nexar Dashcam Collision Prediction Dataset and Challenge. https://arxiv.org/abs/2503.03848, 2025.

BibTeX:

@misc{nexar2025dashcamcollisionprediction,
      title={Nexar Dashcam Collision Prediction Dataset and Challenge}, 
      author={Daniel C. Moura and Shizhan Zhu and Orly Zvitia},
      year={2025},
      eprint={2503.03848},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2503.03848}, 
}
Downloads last month
838

Models trained or fine-tuned on nexar-ai/nexar_collision_prediction