Pipeline¶
- class aquamvs.Pipeline(config)[source]¶
Multi-view stereo reconstruction pipeline.
Primary programmatic entry point for AquaMVS.
Example
pipeline = Pipeline(config) pipeline.run()
- Parameters:
config (PipelineConfig)
- class aquamvs.PipelineContext(config, calibration, undistortion_maps, projection_models, pairs, ring_cameras, auxiliary_cameras, device, masks)[source]¶
Precomputed data that is constant across all frames.
Created once by setup_pipeline() and reused for every frame.
- aquamvs.run_pipeline(config)[source]¶
Run the full reconstruction pipeline over video frames.
Uses a two-pass architecture to avoid Open3D OpenGL / CUDA GPU memory conflicts on Windows:
Compute pass — matching, depth estimation, fusion, surface reconstruction. All outputs saved to disk.
Viz pass — reload saved artifacts from disk, render all visualizations.
Between passes,
torch.cuda.empty_cache()frees GPU memory so Open3D’s OpenGL context can allocate without competing with CUDA.- Parameters:
config (PipelineConfig) – Full pipeline configuration.
- Return type:
None
- aquamvs.process_frame(frame_idx, raw_images, ctx)[source]¶
Process a single frame through the full reconstruction pipeline.
Runs all stages sequentially, saving outputs to the frame’s output directory. Each stage logs its completion. Visualization calls are gated by VizConfig and output persistence by OutputConfig.
- Parameters:
frame_idx (int) – Frame index (for output directory naming).
raw_images (dict[str, ndarray]) – Camera name to raw BGR image (H, W, 3) uint8 mapping. May contain None values for cameras that failed to read.
ctx (PipelineContext) – Precomputed pipeline context from setup_pipeline().
- Return type:
None
Protocols¶
- class aquamvs.pipeline.interfaces.FrameSource(*args, **kwargs)[source]¶
Protocol for frame iteration over multi-camera video or image sequences.
Abstracts both VideoSet and ImageDirectorySet to allow uniform iteration over synchronized frames from multiple cameras.
- class aquamvs.pipeline.interfaces.CalibrationProvider(*args, **kwargs)[source]¶
Protocol for providing calibration data to the pipeline.
Defines the interface for accessing camera calibration parameters and refractive geometry. The existing CalibrationData class already satisfies this protocol structurally — no modifications needed.
- property cameras: dict[str, CameraData]¶
Per-camera calibration data, keyed by camera name.