Skip to content
5 changes: 5 additions & 0 deletions benchmark/reconstruction/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
from evaluation.tartanair import (
DatasetTartanAirPerspective,
DatasetTartanAirSpherical,
DatasetTartanAirSphericalReprojected,
)
from evaluation.tartanair.tartanair_v2 import load_manifest
from evaluation.utils import (
Expand Down Expand Up @@ -92,6 +93,7 @@ def run_once(args: argparse.Namespace) -> MetricsByDatasetByCatByScene | None:
"imc2025": DatasetIMC2025,
"tartanair-v2-perspective": DatasetTartanAirPerspective,
"tartanair-v2-spherical": DatasetTartanAirSpherical,
"tartanair-v2-spherical-reprojected": DatasetTartanAirSphericalReprojected,
}

metrics: MetricsByDatasetByCatByScene = {}
Expand Down Expand Up @@ -190,6 +192,9 @@ def run_seeds(args: argparse.Namespace) -> None:


def main() -> None:
import multiprocessing

multiprocessing.set_start_method("spawn", force=True)
args = parse_args(__doc__)
if args.seeds is not None:
run_seeds(args)
Expand Down
3 changes: 2 additions & 1 deletion benchmark/reconstruction/evaluation/tartanair/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,13 @@ this subset:
The exact source revision, trajectories, frames, and packaging checksums are
recorded in `tartanair_v2_manifest.json`.

From the COLMAP checkout, download and evaluate both pipeline variants with:
From the COLMAP checkout, download and evaluate the pipeline variants with:

```bash
python benchmark/reconstruction/download.py --datasets tartanair-v2
python benchmark/reconstruction/evaluate.py \
--datasets tartanair-v2-perspective tartanair-v2-spherical \
tartanair-v2-spherical-reprojected \
--colmap_path /path/to/colmap
```

Expand Down
5 changes: 5 additions & 0 deletions benchmark/reconstruction/evaluation/tartanair/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,8 @@ class DatasetTartanAirPerspective(DatasetTartanAir):
class DatasetTartanAirSpherical(DatasetTartanAir):
dataset_name = "tartanair-v2-spherical"
render_type = "spherical"


class DatasetTartanAirSphericalReprojected(DatasetTartanAir):
dataset_name = "tartanair-v2-spherical-reprojected"
render_type = "spherical_reprojected"
23 changes: 20 additions & 3 deletions benchmark/reconstruction/evaluation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,19 @@ def panorama_reconstruction(
if sparse_path.exists():
pycolmap.logging.info("Skipping reconstruction, as it already exists")
return
if args.feature != "sift":
raise ValueError("Panorama reconstruction currently supports SIFT only")
if args.feature == "sift":
extractor_type = pycolmap.FeatureExtractorType.SIFT
matcher_type = pycolmap.FeatureMatcherType.SIFT_BRUTEFORCE
elif args.feature == "aliked":
# ALIKED_LIGHTGLUE rather than automatic_reconstructor's plain
# "--feature aliked" default (ALIKED_BRUTEFORCE): this benchmark
# exists to evaluate the ALIKED+LightGlue combination specifically.
extractor_type = pycolmap.FeatureExtractorType.ALIKED_N16ROT
matcher_type = pycolmap.FeatureMatcherType.ALIKED_LIGHTGLUE
else:
raise ValueError(
f"Unknown feature type for panorama reconstruction: {args.feature}"
)
if args.mapper == "hierarchical":
raise ValueError(
"Panorama reconstruction does not support hierarchical mapping"
Expand All @@ -802,7 +813,11 @@ def panorama_reconstruction(
)

render_type = scene_info.reconstruction_backend.removeprefix("panorama-")
if render_type not in {"perspective_overlapping", "spherical"}:
if render_type not in {
"perspective_overlapping",
"spherical",
"spherical_reprojected",
}:
raise ValueError(
f"Unknown panorama reconstruction backend: "
f"{scene_info.reconstruction_backend}"
Expand Down Expand Up @@ -831,6 +846,8 @@ def panorama_reconstruction(
matcher=panorama.Matcher.SEQUENTIAL,
mapper=panorama.Mapper(args.mapper),
render_type=panorama.PanoRenderType(render_type),
extractor_type=extractor_type,
matcher_type=matcher_type,
random_seed=args.random_seed,
num_threads=num_threads,
gpu_index=gpu_index,
Expand Down
Loading