|
2 | 2 |
|
3 | 3 | Evaluation Metrics: |
4 | 4 | HOTA: see https://arxiv.org/abs/2009.07736 |
5 | | - scenario-level F1: see https://jivp-eurasipjournals.springeropen.com/articles/10.1155/2008/246309 |
6 | | - timestamp-level F1: see https://arxiv.org/abs/2008.08063 |
| 5 | + scenario-level F1 |
| 6 | + timestamp-level F1 |
7 | 7 | """ |
8 | 8 |
|
9 | 9 | from pathlib import Path |
@@ -136,11 +136,13 @@ def filter_drivable_area(tracks: Sequences, dataset_dir: Optional[str]) -> Seque |
136 | 136 | frame["translation_m"] = frame["translation_m"][is_evaluated] |
137 | 137 | frame["size"] = frame["size"][is_evaluated] |
138 | 138 | frame["yaw"] = frame["yaw"][is_evaluated] |
139 | | - frame["velocity_m_per_s"] = frame["velocity_m_per_s"][is_evaluated] |
140 | 139 | frame["label"] = frame["label"][is_evaluated] |
141 | 140 | frame["name"] = frame["name"][is_evaluated] |
142 | 141 | frame["track_id"] = frame["track_id"][is_evaluated] |
143 | 142 |
|
| 143 | + if "velocity_m_per_s" in frame: |
| 144 | + frame["velocity_m_per_s"] = frame["velocity_m_per_s"][is_evaluated] |
| 145 | + |
144 | 146 | if "score" in frame: |
145 | 147 | frame["score"] = frame["score"][is_evaluated] |
146 | 148 |
|
@@ -251,8 +253,8 @@ def compute_temporal_metrics( |
251 | 253 | output_dir: The directory to save the plotted confusion matrices. |
252 | 254 |
|
253 | 255 | Returns: |
254 | | - timestamp_f1: The F1 score where each timestamp counts as a prediction to evaluate. |
255 | 256 | scenario_f1: The F1 score where each log-prompt pair counts as a prediction to evaluate. |
| 257 | + timestamp_f1: The F1 score where each timestamp counts as a prediction to evaluate. |
256 | 258 |
|
257 | 259 |
|
258 | 260 | """ |
@@ -364,7 +366,7 @@ def evaluate( |
364 | 366 | output_dir = out + "/partial_tracks" |
365 | 367 | Path(output_dir).mkdir(parents=True, exist_ok=True) |
366 | 368 |
|
367 | | - partial_track_hota, timestamp_f1, scenario_f1 = evaluate_scenario_mining( |
| 369 | + partial_track_hota, scenario_f1, timestamp_f1 = evaluate_scenario_mining( |
368 | 370 | track_predictions, |
369 | 371 | labels, |
370 | 372 | objective_metric=objective_metric, |
@@ -421,8 +423,8 @@ def evaluate_scenario_mining( |
421 | 423 |
|
422 | 424 | Returns: |
423 | 425 | referred_hota: The HOTA tracking metric applied to all objects with the category REFERRED_OBJECT |
424 | | - timestamp_f1: A retrieval/classification metric for determining if each timestamp contains any instance of the prompt. |
425 | 426 | scenario_f1: A retrieval/classification metric for determining if each data log contains any instance of the prompt. |
| 427 | + timestamp_f1: A retrieval/classification metric for determining if each timestamp contains any instance of the prompt. |
426 | 428 | """ |
427 | 429 | classes = list(AV2_CATEGORIES) |
428 | 430 |
|
|
0 commit comments