Spaces:
Running on Zero
Running on Zero
File size: 5,574 Bytes
f234112 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | # Data Dictionary β Member 4
Companion to `reports/phase2_data_preparation.md`. Column semantics from the
Phase 1/2 audits; label semantics marked where unconfirmed.
## Part 1 β DTC-FM Near-Miss Dataset
Processed file: `data/processed/near_miss/dtc_fm_combined.csv` (+ `.parquet` exact-float copy).
| Column | Type | Unit | Meaning | Missing | Origin | Leakage concern | Deployment concern |
|---|---|---|---|---|---|---|---|
| sample_index | int64 | β | **Internal processing index 0..2507 (row position). NOT a real dataset ID.** | 0 | generated Phase 2 | none | none |
| speed_object_1_kph | int64 | km/h | Speed of object 1 in the interaction | 0 | original | none | none |
| speed_object_2_kph | int64 | km/h | Speed of object 2 in the interaction | 0 | original | none | none |
| angle_degrees | float64 | degrees | Encounter angle between objects (0.01β89.98) | 0 | original | none | none |
| PET | float64 | s | Post-Encroachment Time between object pairs (0.53β3.00) | 0 | original | none statistical | **POST-EVENT: only measurable after the interaction completes β unavailable for real-time decisions** |
| acceleration_obj1_mps2 | float64 | m/sΒ² | Longitudinal acceleration of object 1 (β5.0β5.0, quantized ~0.56 steps) | 0 | original | none | none |
| acceleration_obj2_mps2 | float64 | m/sΒ² | Longitudinal acceleration of object 2 (β5.0β4.44) | 0 | original | none | none |
| min_dist_dual_check_m | float64 | m | Minimum separation distance under dual checking (0.5β25.71) | 0 | original | none | none |
| object_count_at_frame1 | int64 | count | Objects detected in the reference frame (5β57) | 0 | original | none | none |
| target_dist_px | float64 | px | Distance between objects in camera pixel space (0β613.4) | 0 | original | none | **camera-dependent: not transferable across camera geometries** |
| FE_inv_PET | float64 | 1/s | Engineered, verified `1/PET` | 0 | derived (verified) | redundancy only | inherits PET post-event limitation |
| FE_safety_index | float64 | β | Engineered, **formula UNIDENTIFIED**; β `(1/PET)/dist_px Γ unknown term`; extremes clipped at round caps (max 2.85e7) | 0 | derived (unverified) | **MEDIUM β unverified provenance** | unknown |
| FE_log_mesafe | float64 | ln(px) | Engineered, verified `ln(1 + target_dist_px)` ("mesafe" = distance) | 0 | derived (verified) | redundancy only | camera-dependent |
| FE_dist_squared | float64 | pxΒ² | Engineered, verified `target_dist_pxΒ²` | 0 | derived (verified) | redundancy only | camera-dependent |
| class_object_1 | str | β | Object 1 type β {Car, VRU, Ped, LCV, HCV} | 0 | original categorical | none | none |
| class_object_2 | str | β | Object 2 type β {Car, VRU, Ped, LCV} (no HCV) | 0 | original categorical | none | none |
| event_type | int64 | β | **Binary target. `0 = class_0`, `1 = class_1`. Semantics UNCONFIRMED** β no label map in the files; class-conditional statistics are *consistent with* 1 = conflict/near-miss but this is not documentation-confirmed | 0 | original label | β | β |
### Notes
- Class counts: class_0 = 1,867 (74.44%), class_1 = 641 (25.56%) β moderately imbalanced.
- Acceleration values are quantized (~0.56 m/sΒ² steps, likely per-frame estimation).
- `class_object_1 = HCV` occurs in only 2 rows; treat as rare category in Phase 3.
- No train/val/test split exists in the source; splitting is deferred to a later phase.
## Part 2 β Accident CCTV Object-Detection Dataset
Canonical source: the 4 Parquet shards in `dataset/` (never copied into
processed outputs). Processed indexes: `data/processed/accident/{train,validation,test}_index.parquet`.
| Field | Type | Meaning | Structure |
|---|---|---|---|
| image | struct<bytes: binary, path: string> | CCTV frame, embedded PNG | 640Γ640 px; `path` is always null (bytes only) |
| image.bytes | binary | PNG-encoded image | verified decodable on a sampled basis; IHDR-validated on all 2,763 |
| objects | struct<bbox, category> | annotation container | one struct per image |
| objects.bbox | list<fixed_size_list<float32, 4>> | per-object box, **COCO-style [x, y, w, h] absolute pixels** | 1β12 boxes/image; 100% within image bounds (x+w β€ 640, y+h β€ 640) |
| objects.category | list<int64> | per-object class id | `0 = accident`, `1 = non_accident` (per source dataset card; map not embedded in files) |
### Index fields (processed artifact)
| Column | Type | Meaning |
|---|---|---|
| split | str | train / validation / test |
| source_file | str | original parquet shard name |
| row_index | int64 | 0-based row WITHIN source_file β internal reference is `(source_file, row_index)`; **not a dataset ID** |
| image_sha256 | str | content hash of the embedded PNG (dup/integrity key) |
| image_format, width, height | str/int32 | IHDR-derived; all PNG 640Γ640 |
| n_objects | int32 | annotation count for the image |
| categories | list<int64> | copy of objects.category |
| bbox | list<list<float32[4]>> | copy of objects.bbox (unchanged representation) |
### Usage in future pipeline
- Phase 5 (accident model) reads images by resolving `(source_file, row_index)`
against the canonical shards; the index supplies annotations without loading bytes.
- No bounding-box normalization was performed (Phase 2 policy: preserve
representation unless a downstream model requires conversion).
- Image-level accident prevalence is ~99% (nearly every frame contains β₯1
accident-labeled object), so image-level classification is trivially biased;
the meaningful task is object-level detection/localization. |