Configuration¶
- class aquamvs.PipelineConfig(*, calibration_path='', output_dir='', camera_input_map=<factory>, mask_dir=None, pipeline_mode='full', matcher_type='lightglue', quality_preset=None, preprocessing=<factory>, sparse_matching=<factory>, dense_matching=<factory>, reconstruction=<factory>, runtime=<factory>, **extra_data)[source]¶
Top-level configuration for the AquaMVS reconstruction pipeline.
- Parameters:
calibration_path (str)
output_dir (str)
mask_dir (str | None)
pipeline_mode (Literal['sparse', 'full'])
matcher_type (Literal['lightglue', 'roma'])
quality_preset (QualityPreset | None)
preprocessing (PreprocessingConfig)
sparse_matching (SparseMatchingConfig)
dense_matching (DenseMatchingConfig)
reconstruction (ReconstructionConfig)
runtime (RuntimeConfig)
extra_data (Any)
- camera_input_map¶
Mapping from camera name to input path (video file or image directory).
- pipeline_mode¶
Pipeline execution mode (“sparse” or “full”).
- Type:
Literal[‘sparse’, ‘full’]
- matcher_type¶
Matcher backend (“lightglue” or “roma”).
- Type:
Literal[‘lightglue’, ‘roma’]
- quality_preset¶
Optional quality preset (fast/balanced/quality) to apply default values.
- Type:
aquamvs.config.QualityPreset | None
- preprocessing¶
Preprocessing configuration.
- sparse_matching¶
Sparse matching configuration.
- dense_matching¶
Dense matching configuration.
- reconstruction¶
Reconstruction configuration.
- runtime¶
Runtime configuration.
- model_config = {'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- apply_preset(preset)[source]¶
Apply a quality preset to this configuration.
Only applies preset values to parameters that are still at their defaults. User-specified values take precedence and are not overridden.
- Parameters:
preset (QualityPreset) – Quality preset to apply.
- Returns:
Self for method chaining.
- Return type:
- auto_apply_preset()[source]¶
Warn when quality_preset is present in config (no longer applied at runtime).
Presets are now baked in at init time via
aquamvs init --preset <name>. Loading a config with quality_preset set does NOT silently override user-specified values.- Return type:
- check_cross_stage_constraints()[source]¶
Validate cross-stage constraints and warn about extra fields.
- Return type:
- classmethod from_yaml(path)[source]¶
Load configuration from a YAML file.
Missing fields use their default values. Loaded values are merged over defaults. Supports backward compatibility with old flat structure.
- Parameters:
- Returns:
Loaded configuration with defaults filled in.
- Raises:
FileNotFoundError – If the file does not exist.
yaml.YAMLError – If the file is not valid YAML.
ValueError – If validation fails (with all errors collected).
- Return type:
- class aquamvs.PreprocessingConfig(*, color_norm_enabled=False, color_norm_method='gain', frame_start=0, frame_stop=None, frame_step=1, **extra_data)[source]¶
Configuration for preprocessing (color normalization + frame sampling).
Consolidates ColorNormConfig and FrameSamplingConfig.
- Parameters:
- color_norm_method¶
Normalization method (“gain” or “histogram”).
- Type:
Literal[‘gain’, ‘histogram’]
- model_config = {'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class aquamvs.SparseMatchingConfig(*, extractor_type='superpoint', max_keypoints=2048, detection_threshold=0.005, clahe_enabled=False, clahe_clip_limit=2.0, num_neighbors=4, include_center=True, filter_threshold=0.1, **extra_data)[source]¶
Configuration for sparse matching (extraction + pair selection + matching).
Consolidates FeatureExtractionConfig, PairSelectionConfig, and MatchingConfig.
- Parameters:
- extractor_type¶
Feature extractor backend.
- Type:
Literal[‘superpoint’, ‘aliked’, ‘disk’]
- model_config = {'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class aquamvs.DenseMatchingConfig(*, certainty_threshold=0.5, max_correspondences=100000, **extra_data)[source]¶
Configuration for RoMa v2 dense matching.
- model_config = {'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class aquamvs.ReconstructionConfig(*, num_depths=128, cost_function='ncc', window_size=11, depth_margin=0.05, depth_batch_size=4, min_consistent_views=3, depth_tolerance=0.005, roma_depth_tolerance=0.02, voxel_size=0.001, min_confidence=0.1, surface_method='poisson', poisson_depth=9, grid_resolution=0.002, bpa_radii=None, target_faces=None, outlier_removal_enabled=True, outlier_nb_neighbors=20, outlier_std_ratio=2.0, **extra_data)[source]¶
Configuration for reconstruction (stereo + fusion + surface + outliers).
Consolidates DenseStereoConfig, FusionConfig, SurfaceConfig, and OutlierRemovalConfig.
- Parameters:
num_depths (int)
cost_function (Literal['ncc', 'ssim'])
window_size (int)
depth_margin (float)
depth_batch_size (int)
min_consistent_views (int)
depth_tolerance (float)
roma_depth_tolerance (float)
voxel_size (float)
min_confidence (float)
surface_method (Literal['poisson', 'heightfield', 'bpa'])
poisson_depth (int)
grid_resolution (float)
target_faces (int | None)
outlier_removal_enabled (bool)
outlier_nb_neighbors (int)
outlier_std_ratio (float)
extra_data (Any)
- cost_function¶
Photometric cost function.
- Type:
Literal[‘ncc’, ‘ssim’]
- depth_batch_size¶
Number of depth planes to process per batch in plane sweep (1 = no batching).
- Type:
- roma_depth_tolerance¶
Maximum depth disagreement for RoMa pairwise depth aggregation (meters).
- Type:
- surface_method¶
Surface reconstruction method.
- Type:
Literal[‘poisson’, ‘heightfield’, ‘bpa’]
- bpa_radii¶
List of ball radii for Ball Pivoting Algorithm (meters), or None to auto-estimate.
- target_faces¶
Target triangle count for mesh simplification (None = no simplification).
- Type:
int | None
- model_config = {'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class aquamvs.RuntimeConfig(*, device='cpu', save_features=False, keep_intermediates=True, save_consistency_maps=False, viz_enabled=False, viz_stages=<factory>, benchmark_extractors=<factory>, benchmark_clahe=<factory>, icp_max_distance=0.01, quiet=False, **extra_data)[source]¶
Configuration for runtime settings (device + output + viz + benchmark + evaluation).
Consolidates DeviceConfig, OutputConfig, VizConfig, BenchmarkConfig, and EvaluationConfig.
Depth maps, point clouds, and meshes are always saved (no toggle).
- Parameters:
- device¶
PyTorch device string.
- Type:
Literal[‘cpu’, ‘cuda’]
- model_config = {'extra': 'allow'}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod validate_benchmark_extractors(v)[source]¶
Validate that all benchmark_extractors are valid.