bundle.recon3d.stages.sfm.base

Structure-from-Motion stage — base class and I/O contracts.

Attributes

log

Classes

SfmBackend

Supported Structure-from-Motion backends.

SfmInput

Input contract for the Structure-from-Motion stage.

SfmOutput

Output contract from the Structure-from-Motion stage.

SfmStage

Base class for SfM backends.

Module Contents

bundle.recon3d.stages.sfm.base.log
class bundle.recon3d.stages.sfm.base.SfmBackend[source]

Bases: str, enum.Enum

Supported Structure-from-Motion backends.

COLMAP = 'colmap'
PYCUSFM = 'pycusfm'
class bundle.recon3d.stages.sfm.base.SfmInput(/, **data: Any)[source]

Bases: bundle.core.data.Data

Input contract for the Structure-from-Motion stage.

images_dir: pathlib.Path
initial_poses: pathlib.Path | None = None
class bundle.recon3d.stages.sfm.base.SfmOutput(/, **data: Any)[source]

Bases: bundle.core.data.Data

Output contract from the Structure-from-Motion stage.

The sparse reconstruction follows the COLMAP convention:
sparse_dir/

cameras.bin images.bin points3D.bin

sparse_dir: pathlib.Path
database_path: pathlib.Path
images_dir: pathlib.Path | None = None
backend: SfmBackend
validate_exists() → bool[source]

Check that all expected output files are present.

class bundle.recon3d.stages.sfm.base.SfmStage(/, **data: Any)[source]

Bases: bundle.recon3d.stages.base.Stage

Base class for SfM backends.

Subclasses implement _run with the backend-specific pipeline. Common validation and setup lives here.

name: str = 'sfm'
backend: SfmBackend
use_gpu: bool
matcher: str = 'exhaustive'
undistort: bool = True
async run(input: bundle.core.data.Data) → bundle.core.data.Data[source]

Execute the stage and return the output contract.

abstractmethod check_deps() → bool[source]
Async:

Verify that external tools required by this stage are available.