How yxjiang0125/mvs works
MVSAnywhere estimates metric depth from a reference image and posed source views, with demo/inference entry points for scans and user recordings. Dataset adapters supply multi-view imagery and camera geometry; the depth model builds multi-view features and predicts depth, with optional monocular calibration and refinement. Demo options can fuse depth into meshes. The repository also supports training and evaluation, and a separate RegSplatfacto integration uses MVSAnywhere depth for Gaussian-splatting regularization. The README establishes these capabilities; sampled excerpts are partial, so uncertain internal wiring is omitted.
Main entry points: sr_depth_model.py Depth Model · run_demo.py Demo Runner · train.py Training Entry · datasets Dataset Adapters
Components 22
Data and Geometry
- Dataset Adapters
src/mvsanywhere/datasets - MVS Tuple Dataset
src/mvsanywhere/datasets/generic_mvs_dataset.py - Geometry Utilities
src/mvsanywhere/utils/geometry_utils.py
Depth Estimation
- Depth Model
src/mvsanywhere/experiment_modules/sr_depth_model.py - Cost Volume
src/mvsanywhere/modules/cost_volume.py - Feature Volumes
src/mvsanywhere/modules/feature_volume.py - Network Blocks
src/mvsanywhere/modules/networks.py - Metric Calibration
src/mvsanywhere/modules/metric_calibration.py
Inference and Fusion
- Demo Runner
src/mvsanywhere/run_demo.py - Inference API
hubconf.py - Depth Fusion
src/mvsanywhere/tools/partial_fuser.py - TSDF Volume
src/mvsanywhere/tools/tsdf.py - Mesh Rendering
src/mvsanywhere/tools/mesh_renderer.py
Training and Evaluation
- Depth Losses
src/mvsanywhere/losses.py - Training Entry
src/mvsanywhere/train.py - Evaluation
scripts/evaluation.py
Splat Regularization
- Splat Data Manager
src/regsplatfacto/regsplatfacto/data/regsplatfacto_datamanager.py - MVS Splat Dataset
src/regsplatfacto/regsplatfacto/data/mvsanywhere_dataset.py - RegSplatfacto Model
src/regsplatfacto/regsplatfacto/regsplatfacto_model.py - Splat Rendering
src/regsplatfacto/regsplatfacto/render_for_meshing.py
Other components
- Scan / Recording
- Depth / Mesh Output
Connections 24
- Scan / Recording → Demo Runner: provides scan
- Demo Runner → Dataset Adapters: configures input
- Dataset Adapters → MVS Tuple Dataset: adapts tuples
- Demo Runner → Depth Model: runs inference
- Inference API → Depth Model: invokes model
- Depth Model → Cost Volume: builds matching
- Depth Model → Feature Volumes: uses features
- Depth Model → Network Blocks: uses blocks
- Depth Model → Metric Calibration: calibrates depth
- Depth Model → Geometry Utilities: uses geometry
- Depth Model → Depth / Mesh Output: predicts depth
- Demo Runner → Depth Fusion: requests fusion
- Depth Fusion → TSDF Volume: integrates depth
- TSDF Volume → Mesh Rendering: extracts mesh
- Mesh Rendering → Depth / Mesh Output: produces mesh
- Training Entry → Dataset Adapters: loads training data
- Training Entry → Depth Model: trains model
- Training Entry → Depth Losses: computes losses
- Evaluation → Depth Model: evaluates predictions
- Splat Data Manager → MVS Splat Dataset: creates dataset
- MVS Splat Dataset → Inference API: requests depth
- Splat Data Manager → RegSplatfacto Model: supplies training data
- RegSplatfacto Model → Splat Rendering: renders splats
- Splat Rendering → Depth / Mesh Output: produces render