utils

ns_docker_wrapper.utils.select_largest_model(sfm_model_path: Path = PosixPath('nerfstudio_output/processed_data/colmap/sparse')) Path[source]

Selects the largest COLMAP model from a directory.

Loads all COLMAP reconstruction models from the specified path and returns the path to the largest one (the model with the most registered images).

Parameters:

sfm_model_path (Path) – The path to the directory containing COLMAP models. Defaults to “./nerfstudio_output/processed_data/colmap/sparse”.

Returns:

The path to the largest COLMAP model directory.

Return type:

Path

Raises:
  • FileNotFoundError – If the specified path does not exist.

  • ValueError – If no COLMAP models are found in the specified path.