MCPcopy Index your code
hub / github.com/devinli123/MV-SAM3D

github.com/devinli123/MV-SAM3D @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,060 symbols 3,349 edges 123 files 343 documented · 32%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

MV-SAM3D

MV-SAM3D is a multi-view 3D reconstruction framework that extends SAM 3D Objects to leverage observations from multiple viewpoints. It supports both single-object and multi-object generation, and is designed to produce more stable geometry, texture, and scene-level consistency.

Paper

Installation

Please follow the environment setup from:

Data Format

scene/
├── images/
│   ├── 0.png
│   ├── 1.png
│   └── ...
├── object_a/
│   ├── 0.png
│   ├── 1.png
│   └── ...
├── object_b/
│   └── ...
└── ...

Mask files are RGBA PNG where alpha indicates foreground.

Results Comparison

Single-object

Single-View (View 3) Single-View (View 6) MV-SAM3D
Input Image Input Image Input Images
↓ 3D Reconstruction ↓
Single-view baseline. Single-view baseline. Better multi-view consistency.

Multi-object

SAM 3D (single-view) MV-SAM3D w/o Pose Optimization MV-SAM3D (full)
Shape and pose are often unstable. Multi-view improves object quality. Improved overall scene alignment.

Quick Start

Single-object inference

python run_inference_weighted.py \
  --input_path ./data/example \
  --mask_prompt stuffed_toy \
  --da3_output ./da3_outputs/example/da3_output.npz

Multi-object inference

python run_inference_weighted.py \
  --input_path ./data/desk_objects0 \
  --mask_prompt keyboard,speaker,mug,stuffed_toy \
  --da3_output ./da3_outputs/desk_objects0/da3_output.npz \
  --merge_da3_glb \
  --run_pose_optimization

Default Settings (No Extra Flags)

For single-object inference (run_inference_weighted.py), key defaults are:

  • Stage 1 weighting: enabled (stage1_entropy_alpha=30.0)
  • Stage 2 weighting: enabled (stage2_weight_source=entropy)
  • Stage 2 alpha defaults: stage2_entropy_alpha=30.0, stage2_visibility_alpha=30.0

Preprocessing for a New Scene

python preprocessing/build_mvsam3d_dataset.py \
  --input data/your_scene \
  --objects keyboard,speaker,mug,stuffed_toy
python scripts/run_da3.py \
  --image_dir ./data/your_scene/images \
  --output_dir ./da3_outputs/your_scene

Citation

@article{li2026mv,
  title={MV-SAM3D: Adaptive Multi-View Fusion for Layout-Aware 3D Generation},
  author={Li, Baicheng and Wu, Dong and Li, Jun and Zhou, Shunkai and Zeng, Zecui and Li, Lusong and Zha, Hongbin},
  journal={arXiv preprint arXiv:2603.11633},
  year={2026}
}

Acknowledgments

We thank the authors of SAM 3D Objects and Depth Anything 3 for their excellent work!!!

License

Please refer to LICENSE for usage terms.

Core symbols most depended-on inside this repo

reshape
called by 148
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py
cpu
called by 135
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py
to
called by 124
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py
replace
called by 58
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py
float
called by 56
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py
detach
called by 48
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py
dim
called by 32
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py
unbind
called by 30
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py

Shape

Method 586
Function 344
Class 130

Languages

Python100%

Modules by API surface

sam3d_objects/data/dataset/tdfy/pose_target.py58 symbols
sam3d_objects/pipeline/multi_view_weighted.py44 symbols
sam3d_objects/pipeline/inference_pipeline.py42 symbols
sam3d_objects/model/backbone/tdfy_dit/modules/sparse/basic.py41 symbols
sam3d_objects/data/dataset/tdfy/img_and_mask_transforms.py41 symbols
run_inference_weighted.py32 symbols
sam3d_objects/model/backbone/tdfy_dit/models/sparse_structure_vae.py28 symbols
sam3d_objects/model/backbone/generator/flow_matching/model.py27 symbols
sam3d_objects/utils/latent_weighting.py25 symbols
sam3d_objects/config/utils.py25 symbols
sam3d_objects/model/backbone/tdfy_dit/modules/attention/modules.py23 symbols
sam3d_objects/model/backbone/generator/classifier_free_guidance.py23 symbols

For agents

$ claude mcp add MV-SAM3D \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact