Update README.md
Browse files
README.md
CHANGED
|
@@ -132,15 +132,15 @@ This folder contains four CSV files corresponding to the four observation groups
|
|
| 132 |
- Weaving Segments 4–5;
|
| 133 |
- Weaving Segments 6–7.
|
| 134 |
|
| 135 |
-
The files provide reconstructed vehicle trajectories expressed in a road-aligned
|
| 136 |
|
| 137 |
The main fields are defined as follows:
|
| 138 |
|
| 139 |
- `Ego_Vehicle_ID`: processed vehicle identifier interpreted together with the corresponding observation-group identity. Unit: dimensionless identifier.
|
| 140 |
- `Frame`: frame index in the corresponding processed sequence; source-to-processed mappings are used when linking raw and processed records. Unit: dimensionless frame index.
|
| 141 |
- `Delta_t_s`: elapsed time from the previous record of the same vehicle after ordering by frame; the first trajectory record serves as the temporal reference and uses a blank value by definition. Unit: s.
|
| 142 |
-
- `x_center`: vehicle-center coordinate
|
| 143 |
-
- `y_center`: vehicle-center coordinate
|
| 144 |
- `v_x`: longitudinal vehicle velocity. Unit: m/s.
|
| 145 |
- `v_y`: lateral vehicle velocity. Unit: m/s.
|
| 146 |
- `a_x`: longitudinal vehicle acceleration. Unit: m/s².
|
|
@@ -270,13 +270,13 @@ The relevant variables are:
|
|
| 270 |
|
| 271 |
These variables describe image-space measurements, while metric physical distances are provided after coordinate transformation.
|
| 272 |
|
| 273 |
-
### Road-Aligned
|
| 274 |
|
| 275 |
-
The
|
| 276 |
|
| 277 |
For scenes recorded by multiple UAV video sequences, a stabilized reference frame is selected as the master frame. Static road features visible in both the source frames and the master frame are used as control points, and fixed planar homography transformations are applied to project vehicle locations from different UAV views into a common reference coordinate system.
|
| 278 |
|
| 279 |
-
Static road reference points with known physical distances are then used to determine the metric scale. A local
|
| 280 |
|
| 281 |
In this coordinate system:
|
| 282 |
|
|
@@ -288,7 +288,7 @@ In this coordinate system:
|
|
| 288 |
|
| 289 |
The principal variables expressed in this system are `x_center`, `y_center`, `v_x`, `v_y`, `a_x`, and `a_y`.
|
| 290 |
|
| 291 |
-
For files containing bidirectional traffic,
|
| 292 |
|
| 293 |
### Vehicle-Pair Local Interaction Coordinate System
|
| 294 |
|
|
@@ -302,7 +302,7 @@ The relative position of the target vehicle is projected into this local coordin
|
|
| 302 |
|
| 303 |
The vehicle-pair local coordinate transformation is defined for pairs with nonzero relative velocity, for which the relative-velocity direction provides the local-axis orientation.
|
| 304 |
|
| 305 |
-
This vehicle-pair local coordinate system complements the
|
| 306 |
|
| 307 |
## Temporal Resolution
|
| 308 |
|
|
@@ -340,7 +340,7 @@ Data collection was performed during daytime periods under clear and low-wind co
|
|
| 340 |
|
| 341 |
The processed trajectory and semantic data were generated through a standardized workflow.
|
| 342 |
|
| 343 |
-
The major stages include UAV video stabilization and region-of-interest extraction, vehicle detection and multi-object tracking, lane-region annotation, multi-video coordinate registration, transformation from image coordinates to road-aligned metric coordinates, trajectory quality screening, trajectory-gap reconstruction, trajectory smoothing, vehicle kinematic calculation, vehicle-length estimation, surrogate-safety-measure calculation, and interaction semantic annotation.
|
| 344 |
|
| 345 |
Vehicle trajectories are reconstructed using PCHIP interpolation where sufficient observations are available, with linear interpolation applied to sparse cases. Symmetric exponential moving average (sEMA) filtering is subsequently applied to improve trajectory smoothness while reducing temporal phase shift.
|
| 346 |
|
|
@@ -352,7 +352,7 @@ The [Principal Processing Code folder](https://huggingface.co/datasets/Interesti
|
|
| 352 |
|
| 353 |
### Files and Functions
|
| 354 |
|
| 355 |
-
- **`coordinate_transform.py`** registers source-image coordinates to a master frame using a planar homography and converts pixel coordinates into
|
| 356 |
- **`filter_trajectory_outliers.py`** screens metric trajectories using observed duration, observation count, spatial extent, and average path speed. It produces retained records, a separate screening-output file, and a per-vehicle screening summary. The same screening is also integrated into reconstruction, so separate execution is optional.
|
| 357 |
- **`reconstruct_trajectories.py`** screens trajectories, reconstructs trajectory gaps, interpolates positions, fills lane/direction attributes, applies symmetric exponential moving average (sEMA) smoothing, and calculates velocities and accelerations. It also preserves source/original identifiers and produces timing information. Measured merge and diverge reference coordinates can optionally be supplied to generate the corresponding distance fields.
|
| 358 |
- **`estimate_vehicle_length.py`** estimates a fixed physical length for each vehicle directly from the six-column raw detection records and the calibration JSON. It returns vehicle-level length estimates, the number of retained observations, and quality indicators.
|
|
@@ -381,7 +381,7 @@ Each processing script provides `--help`. The commands below use descriptive pla
|
|
| 381 |
1. **Raw detections:** one source recording with `Frame, Vehicle_ID, x_center_px, y_center_px, width_px, height_px`. Pixel coordinates must refer to the same image view used for calibration.
|
| 382 |
2. **Scene calibration:** a completed copy of `calibration_template.json`, including the master source, master-frame origin, reference segments with measured physical distances, and corresponding control points for non-master sources.
|
| 383 |
3. **Lane and direction annotations:** verified `Lane number` and `Direction` fields are incorporated with the metric trajectories to support lane-based processing and road-geometry interpretation.
|
| 384 |
-
4. **Recording metadata:** the actual constant frame rate for each source, and explicit source/ID/time mappings when combining recordings. Optional merge/diverge distances require measured reference cross-sections in the same metric coordinate system.
|
| 385 |
5. **Interaction inputs:** interaction annotation uses a candidate-pair CSV and calibrated PR parameter CSV prepared according to the input schemas described below.
|
| 386 |
|
| 387 |
For calibration, replace the required `null` values with measured values and change `template_only` to `false` only after completing the configuration. At least four valid corresponding points are required for each non-master homography. The current implementation is configured for horizontally aligned road scenes with `rotation_rad = 0`, consistent with the coordinate configuration used for U-EASWS. The master-frame scale is the mean of the measured physical-to-pixel distance ratios. Metric x increases to the right of the aligned master image, while metric y reverses the image's downward axis.
|
|
@@ -428,7 +428,7 @@ Newly reconstructed outputs additionally retain `Source_ID`, `Original_Vehicle_I
|
|
| 428 |
|
| 429 |
### Vehicle-Length Estimation Settings
|
| 430 |
|
| 431 |
-
The estimator constructs bounding-box corners internally from the center coordinates and half the width/height. It transforms all four corners to metric
|
| 432 |
|
| 433 |
Quality-control screening removes nonfinite measurements and nonpositive box dimensions before aggregation. With at least four valid candidates, a 1.5-IQR filter is applied, and the 25th percentile of the retained candidates is assigned as the fixed vehicle length when at least five observations are retained. The output lateral extent provides an additional bounding-box diagnostic. The multi-frame aggregation and IQR-based screening improve robustness to frame-level bounding-box variation, while the six pixel-space fields are combined with metric calibration to estimate physical vehicle length.
|
| 434 |
|
|
@@ -525,9 +525,9 @@ The released `Raw_Data` provides frame-level vehicle detection and tracking outp
|
|
| 525 |
|
| 526 |
These records provide image-space vehicle positions and detection-box dimensions that support independent trajectory post-processing and customized methodological workflows.
|
| 527 |
|
| 528 |
-
The road-aligned
|
| 529 |
|
| 530 |
-
`Vehicle_Length_m` is an estimated physical vehicle attribute derived from multi-frame detection bounding boxes transformed into the metric coordinate system.
|
| 531 |
|
| 532 |
The interaction-strength annotation quantifies proximity-induced interaction and complements the TTC-, PET-, and DRAC-based risk semantic information.
|
| 533 |
|
|
|
|
| 132 |
- Weaving Segments 4–5;
|
| 133 |
- Weaving Segments 6–7.
|
| 134 |
|
| 135 |
+
The files provide reconstructed vehicle trajectories expressed in a road-aligned variant of the Frenet coordinate system together with vehicle kinematic states, lane information, traffic direction, geometry-related distances, and estimated vehicle length.
|
| 136 |
|
| 137 |
The main fields are defined as follows:
|
| 138 |
|
| 139 |
- `Ego_Vehicle_ID`: processed vehicle identifier interpreted together with the corresponding observation-group identity. Unit: dimensionless identifier.
|
| 140 |
- `Frame`: frame index in the corresponding processed sequence; source-to-processed mappings are used when linking raw and processed records. Unit: dimensionless frame index.
|
| 141 |
- `Delta_t_s`: elapsed time from the previous record of the same vehicle after ordering by frame; the first trajectory record serves as the temporal reference and uses a blank value by definition. Unit: s.
|
| 142 |
+
- `x_center`: longitudinal vehicle-center coordinate in the road-aligned variant of the Frenet coordinate system. Unit: m.
|
| 143 |
+
- `y_center`: lateral vehicle-center coordinate in the road-aligned variant of the Frenet coordinate system. Unit: m.
|
| 144 |
- `v_x`: longitudinal vehicle velocity. Unit: m/s.
|
| 145 |
- `v_y`: lateral vehicle velocity. Unit: m/s.
|
| 146 |
- `a_x`: longitudinal vehicle acceleration. Unit: m/s².
|
|
|
|
| 270 |
|
| 271 |
These variables describe image-space measurements, while metric physical distances are provided after coordinate transformation.
|
| 272 |
|
| 273 |
+
### Road-Aligned Variant of the Frenet Coordinate System
|
| 274 |
|
| 275 |
+
The preprocessed basic trajectory data adopt a road-aligned variant of the Frenet coordinate system, where the longitudinal and lateral coordinates describe the along-road and cross-road directions, respectively.
|
| 276 |
|
| 277 |
For scenes recorded by multiple UAV video sequences, a stabilized reference frame is selected as the master frame. Static road features visible in both the source frames and the master frame are used as control points, and fixed planar homography transformations are applied to project vehicle locations from different UAV views into a common reference coordinate system.
|
| 278 |
|
| 279 |
+
Static road reference points with known physical distances are then used to determine the metric scale. A local coordinate origin is defined in the master frame.
|
| 280 |
|
| 281 |
In this coordinate system:
|
| 282 |
|
|
|
|
| 288 |
|
| 289 |
The principal variables expressed in this system are `x_center`, `y_center`, `v_x`, `v_y`, `a_x`, and `a_y`.
|
| 290 |
|
| 291 |
+
For files containing bidirectional traffic, the same road-aligned variant of the Frenet coordinate system is used for both travel directions, while the `Direction` field identifies the corresponding vehicle travel direction.
|
| 292 |
|
| 293 |
### Vehicle-Pair Local Interaction Coordinate System
|
| 294 |
|
|
|
|
| 302 |
|
| 303 |
The vehicle-pair local coordinate transformation is defined for pairs with nonzero relative velocity, for which the relative-velocity direction provides the local-axis orientation.
|
| 304 |
|
| 305 |
+
This vehicle-pair local coordinate system complements the road-aligned variant of the Frenet coordinate system used for `x_center` and `y_center` by describing pairwise relative positions.
|
| 306 |
|
| 307 |
## Temporal Resolution
|
| 308 |
|
|
|
|
| 340 |
|
| 341 |
The processed trajectory and semantic data were generated through a standardized workflow.
|
| 342 |
|
| 343 |
+
The major stages include UAV video stabilization and region-of-interest extraction, vehicle detection and multi-object tracking, lane-region annotation, multi-video coordinate registration, transformation from image coordinates to road-aligned Frenet-based metric coordinates, trajectory quality screening, trajectory-gap reconstruction, trajectory smoothing, vehicle kinematic calculation, vehicle-length estimation, surrogate-safety-measure calculation, and interaction semantic annotation.
|
| 344 |
|
| 345 |
Vehicle trajectories are reconstructed using PCHIP interpolation where sufficient observations are available, with linear interpolation applied to sparse cases. Symmetric exponential moving average (sEMA) filtering is subsequently applied to improve trajectory smoothness while reducing temporal phase shift.
|
| 346 |
|
|
|
|
| 352 |
|
| 353 |
### Files and Functions
|
| 354 |
|
| 355 |
+
- **`coordinate_transform.py`** registers source-image coordinates to a master frame using a planar homography and converts pixel coordinates into road-aligned Frenet-based metric coordinates. It requires a completed calibration JSON and the corresponding source identifier. It retains source identity and adds metric vehicle-center coordinates.
|
| 356 |
- **`filter_trajectory_outliers.py`** screens metric trajectories using observed duration, observation count, spatial extent, and average path speed. It produces retained records, a separate screening-output file, and a per-vehicle screening summary. The same screening is also integrated into reconstruction, so separate execution is optional.
|
| 357 |
- **`reconstruct_trajectories.py`** screens trajectories, reconstructs trajectory gaps, interpolates positions, fills lane/direction attributes, applies symmetric exponential moving average (sEMA) smoothing, and calculates velocities and accelerations. It also preserves source/original identifiers and produces timing information. Measured merge and diverge reference coordinates can optionally be supplied to generate the corresponding distance fields.
|
| 358 |
- **`estimate_vehicle_length.py`** estimates a fixed physical length for each vehicle directly from the six-column raw detection records and the calibration JSON. It returns vehicle-level length estimates, the number of retained observations, and quality indicators.
|
|
|
|
| 381 |
1. **Raw detections:** one source recording with `Frame, Vehicle_ID, x_center_px, y_center_px, width_px, height_px`. Pixel coordinates must refer to the same image view used for calibration.
|
| 382 |
2. **Scene calibration:** a completed copy of `calibration_template.json`, including the master source, master-frame origin, reference segments with measured physical distances, and corresponding control points for non-master sources.
|
| 383 |
3. **Lane and direction annotations:** verified `Lane number` and `Direction` fields are incorporated with the metric trajectories to support lane-based processing and road-geometry interpretation.
|
| 384 |
+
4. **Recording metadata:** the actual constant frame rate for each source, and explicit source/ID/time mappings when combining recordings. Optional merge/diverge distances require measured reference cross-sections in the same road-aligned Frenet-based metric coordinate system.
|
| 385 |
5. **Interaction inputs:** interaction annotation uses a candidate-pair CSV and calibrated PR parameter CSV prepared according to the input schemas described below.
|
| 386 |
|
| 387 |
For calibration, replace the required `null` values with measured values and change `template_only` to `false` only after completing the configuration. At least four valid corresponding points are required for each non-master homography. The current implementation is configured for horizontally aligned road scenes with `rotation_rad = 0`, consistent with the coordinate configuration used for U-EASWS. The master-frame scale is the mean of the measured physical-to-pixel distance ratios. Metric x increases to the right of the aligned master image, while metric y reverses the image's downward axis.
|
|
|
|
| 428 |
|
| 429 |
### Vehicle-Length Estimation Settings
|
| 430 |
|
| 431 |
+
The estimator constructs bounding-box corners internally from the center coordinates and half the width/height. It transforms all four corners to the road-aligned Frenet-based metric coordinate system and uses the longitudinal maximum-minus-minimum extent as a frame-level length candidate, providing a direct geometric length estimate from the supplied bounding boxes.
|
| 432 |
|
| 433 |
Quality-control screening removes nonfinite measurements and nonpositive box dimensions before aggregation. With at least four valid candidates, a 1.5-IQR filter is applied, and the 25th percentile of the retained candidates is assigned as the fixed vehicle length when at least five observations are retained. The output lateral extent provides an additional bounding-box diagnostic. The multi-frame aggregation and IQR-based screening improve robustness to frame-level bounding-box variation, while the six pixel-space fields are combined with metric calibration to estimate physical vehicle length.
|
| 434 |
|
|
|
|
| 525 |
|
| 526 |
These records provide image-space vehicle positions and detection-box dimensions that support independent trajectory post-processing and customized methodological workflows.
|
| 527 |
|
| 528 |
+
The road-aligned Frenet-based coordinates are scene-specific metric coordinates designed to describe longitudinal and lateral vehicle motion within each weaving scenario.
|
| 529 |
|
| 530 |
+
`Vehicle_Length_m` is an estimated physical vehicle attribute derived from multi-frame detection bounding boxes transformed into the road-aligned Frenet-based metric coordinate system.
|
| 531 |
|
| 532 |
The interaction-strength annotation quantifies proximity-induced interaction and complements the TTC-, PET-, and DRAC-based risk semantic information.
|
| 533 |
|