Initialize the same unified loader used by benchmark/evaluation.
()
| 95 | |
| 96 | |
| 97 | def _init_benchmark_dataset(): |
| 98 | """Initialize the same unified loader used by benchmark/evaluation.""" |
| 99 | global _benchmark_dataset, _scene_to_dataset_idx, DATASET_Z_FAR |
| 100 | |
| 101 | _benchmark_dataset = BenchmarkDataset( |
| 102 | scene_index_path=str(SCENE_INDEX_PATH), |
| 103 | benchmark_root=str(BENCHMARK_ROOT), |
| 104 | tags=None, |
| 105 | tag_operator="AND", |
| 106 | max_scenes=None, |
| 107 | ) |
| 108 | _scene_to_dataset_idx = { |
| 109 | s["scene_id"]: i for i, s in enumerate(_benchmark_dataset.scenes) |
| 110 | } |
| 111 | DATASET_Z_FAR = { |
| 112 | name: float(reader.DEFAULT_Z_FAR) |
| 113 | for name, reader in _benchmark_dataset._readers.items() |
| 114 | } |
| 115 | |
| 116 | |
| 117 | # --------------------------------------------------------------------------- |