dmoura commited on
Commit
aa97ded
·
verified ·
1 Parent(s): eb317f4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +25 -7
README.md CHANGED
@@ -18,11 +18,11 @@ size_categories:
18
 
19
  # Nexar Collision Prediction Dataset
20
 
21
- This dataset is part of an [ongoing competition on Kaggle](https://www.kaggle.com/competitions/nexar-collision-prediction/).
22
 
23
  ## Dataset
24
 
25
- 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.
26
 
27
 
28
  ## Goal
@@ -30,13 +30,21 @@ The Nexar collision prediction dataset comprises videos from Nexar dashcams. Vid
30
  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.
31
 
32
 
33
- ## Model assessment
34
 
35
- Models should be able to predict that a collision is about to happen as soon as possible, while avoiding false positives. Assessment scripts will be made available shortly that calculate the mean average precision across different times before collision (e.g. 500ms, 1000ms, 2000ms).
 
 
 
 
 
 
36
 
37
 
38
  ## Usage
39
 
 
 
40
  ``` python
41
  from datasets import load_dataset
42
 
@@ -46,16 +54,26 @@ dataset = load_dataset("videofolder", data_dir="/your/path/nexar_collision_predi
46
  A positive example would look like this:
47
 
48
  ``` bash
49
- {'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'}
50
  ```
51
 
52
  and a negative example like this:
53
 
54
  ``` bash
55
- {'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'}
 
 
 
 
 
 
 
 
 
 
56
  ```
57
 
58
- ## Paper and citation
59
 
60
  A [paper](https://arxiv.org/abs/2503.03848) is available describing the dataset and the evaluation framework used on the [Nexar Dashcam Crash Prediction Challenge](https://www.kaggle.com/competitions/nexar-collision-prediction/).
61
 
 
18
 
19
  # Nexar Collision Prediction Dataset
20
 
21
+ This dataset is part of the [Nexar Dashcam Crash Prediction Challenge on Kaggle](https://www.kaggle.com/competitions/nexar-collision-prediction/).
22
 
23
  ## Dataset
24
 
25
+ 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.
26
 
27
 
28
  ## Goal
 
30
  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.
31
 
32
 
33
+ ## Model Assessment and Test Set
34
 
35
+ 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).
36
+
37
+ 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).
38
+
39
+ The test set is devided into public and private subsets to mirror [Kaggle's competition](https://www.kaggle.com/competitions/nexar-collision-prediction/). 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.
40
+
41
+ More details are available in the [paper](https://arxiv.org/abs/2503.03848).
42
 
43
 
44
  ## Usage
45
 
46
+ ### Loading training data
47
+
48
  ``` python
49
  from datasets import load_dataset
50
 
 
54
  A positive example would look like this:
55
 
56
  ``` bash
57
+ {'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}
58
  ```
59
 
60
  and a negative example like this:
61
 
62
  ``` bash
63
+ {'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}
64
+ ```
65
+
66
+ ### Running an evaluation
67
+
68
+ 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`).
69
+
70
+ ``` bash
71
+ $ python evaluate_submission.py sample_submission.csv
72
+ mAP (Public): 0.841203
73
+ mAP (Private): 0.861791
74
  ```
75
 
76
+ ## Paper and Citation
77
 
78
  A [paper](https://arxiv.org/abs/2503.03848) is available describing the dataset and the evaluation framework used on the [Nexar Dashcam Crash Prediction Challenge](https://www.kaggle.com/competitions/nexar-collision-prediction/).
79