8000 Question: Sparse Point Cloud with Default reconstruct.py Demo - Expected Behavior? · Issue #15 · cvg/mpsfm · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Question: Sparse Point Cloud with Default reconstruct.py Demo - Expected Behavior? #15
Open
@shuta-ochiai

Description

@shuta-ochiai

Hi MPSFM Team,

I've been working with your mpsfm pipeline and successfully ran the reconstruction using the command python3 reconstruct.py with default parameters, similar to what might be shown in a demo. I used a dataset of 6 indoor images. The process completed successfully, registering all 6 images.

While the pipeline executed without errors, the resulting point cloud appears to be significantly sparser than I anticipated. Only 1497 points exist. My main question is whether this level of sparsity is the expected behavior when using reconstruct.py with its default settings on a small indoor dataset (6 images), or if it might suggest an area I should investigate further (e.g., specific default parameter effects, characteristics of the sparse SfM output, etc.).

Context:

Command Executed: python3 reconstruct.py (using default parameters).
Input Data: 6 indoor images.
Environment: The pipeline was run within a Docker container. The environment uses Python 3.10, CUDA 12.4.1, and
RTX-3090. (I can provide more details about the Docker setup if necessary).
Execution Log :

# python3 reconstruct.py 
==================================================
        STARTING RECONSTRUCTION
==================================================
Extracting netvlad retrieval features...
100%|███████████████████████████████████████| 529M/529M [01:42<00:00, 5.39MB/s]
Loaded netvlad model.
100%|███████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:00<00:00,  9.61it/s]
Extracting retrieval pairs...
Extracting pairwise superpoint+lightglue information...
Loaded SuperPoint model
Loaded superpoint model.
100%|███████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:00<00:00, 20.14it/s]
/usr/local/lib/python3.10/dist-packages/lightglue/lightglue.py:24: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32)
Downloading: "https://github.com/cvg/LightGlue/releases/download/v0.1_arxiv/superpoint_lightglue.pth" to /root/.cache/torch/hub/checkpoints/superpoint_lightglue_v0-1_arxiv.pth
100%|████████████████████████████████████████████████████████████████████████████████████| 45.3M/45.3M [00:01<00:00, 25.8MB/s]
Loaded lightglue model.
100%|█████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:00<00:00, 20.00it/s]
Finished exporting matches.
Extracting metric3dv2 depth...
📥 Downloading via wget: https://huggingface.co/JUGGHM/Metric3D/resolve/main/metric_depth_vit_giant2_800k.pth
--2025-05-17 23:14:55--  https://huggingface.co/JUGGHM/Metric3D/resolve/main/metric_depth_vit_giant2_800k.pth
Resolving huggingface.co (huggingface.co)... 3.165.39.34, 3.165.39.25, 3.165.39.16, ...
Connecting to huggingface.co (huggingface.co)|3.165.39.34|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://cdn-lfs-us-1.hf.co/repos/3b/f8/3bf8e492b45dd45c9bf4c2df43a62156bbdde577f80961422920758dfdd68a04/22d64c4dec098fa56eb17b6f22b1fb7d16b4742c66a9c8ee73e7dae61c0d2a1b?response-content-disposit
75AA
ion=inline%3B+filename*%3DUTF-8%27%27metric_depth_vit_giant2_800k.pth%3B+filename%3D%22metric_depth_vit_giant2_800k.pth%22%3B&Expires=1747527295&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc0NzUyNzI5NX19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy11cy0xLmhmLmNvL3JlcG9zLzNiL2Y4LzNiZjhlNDkyYjQ1ZGQ0NWM5YmY0YzJkZjQzYTYyMTU2YmJkZGU1NzdmODA5NjE0MjI5MjA3NThkZmRkNjhhMDQvMjJkNjRjNGRlYzA5OGZhNTZlYjE3YjZmMjJiMWZiN2QxNmI0NzQyYzY2YTljOGVlNzNlN2RhZTYxYzBkMmExYj9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSoifV19&Signature=oShGG7NAKfOy5nayvQvYSxwhQWE%7EAQC3rZNJP4VmXGG57sEu6TWpCwbGCLkP4zU%7E8Q-rWqho9BfroN0CfYHUv8bTwWtdzphlzL3oFlUgWVL9RCKi7Z6%7EU4edOQcZAv6d6McH3FastQu5HDk6FmKMqSoWDCx%7E%7EtUOc0jWTiBgxGyXP-pBW7g0dY9vfNTbrRcO8ajJRqt4SvRskWx-8-lq5okf6xM-h-ZdTFP7Qbeed0W-65lTOcRBhICXHsSO-iihS9Ud2fpZUzJwux7p41BSXe9OuC-PS-7fdM9BLD-95z6qpf7BcM3e5taYzU9uNYucDzt5MrkU0NkIEvTkOjbxlQ__&Key-Pair-Id=K24J24Z295AEI9 [following]
--2025-05-17 23:14:55--  https://cdn-lfs-us-1.hf.co/repos/3b/f8/3bf8e492b45dd45c9bf4c2df43a62156bbdde577f80961422920758dfdd68a04/22d64c4dec098fa56eb17b6f22b1fb7d16b4742c66a9c8ee73e7dae61c0d2a1b?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27metric_depth_vit_giant2_800k.pth%3B+filename%3D%22metric_depth_vit_giant2_800k.pth%22%3B&Expires=1747527295&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc0NzUyNzI5NX19LCJSZXNvdXJjZSI6Imh0dHBzOi8vY2RuLWxmcy11cy0xLmhmLmNvL3JlcG9zLzNiL2Y4LzNiZjhlNDkyYjQ1ZGQ0NWM5YmY0YzJkZjQzYTYyMTU2YmJkZGU1NzdmODA5NjE0MjI5MjA3NThkZmRkNjhhMDQvMjJkNjRjNGRlYzA5OGZhNTZlYjE3YjZmMjJiMWZiN2QxNmI0NzQyYzY2YTljOGVlNzNlN2RhZTYxYzBkMmExYj9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSoifV19&Signature=oShGG7NAKfOy5nayvQvYSxwhQWE%7EAQC3rZNJP4VmXGG57sEu6TWpCwbGCLkP4zU%7E8Q-rWqho9BfroN0CfYHUv8bTwWtdzphlzL3oFlUgWVL9RCKi7Z6%7EU4edOQcZAv6d6McH3FastQu5HDk6FmKMqSoWDCx%7E%7EtUOc0jWTiBgxGyXP-pBW7g0dY9vfNTbrRcO8ajJRqt4SvRskWx-8-lq5okf6xM-h-ZdTFP7Qbeed0W-65lTOcRBhICXHsSO-iihS9Ud2fpZUzJwux7p41BSXe9OuC-PS-7fdM9BLD-95z6qpf7BcM3e5taYzU9uNYucDzt5MrkU0NkIEvTkOjbxlQ__&Key-Pair-Id=K24J24Z295AEI9
Resolving cdn-lfs-us-1.hf.co (cdn-lfs-us-1.hf.co)... 3.166.244.90, 3.166.244.32, 3.166.244.70, ...
Connecting to cdn-lfs-us-1.hf.co (cdn-lfs-us-1.hf.co)|3.166.244.90|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5510989187 (5.1G) [binary/octet-stream]
Saving to: ‘/submodules/mpsfm/local/weights/metric_depth_vit_giant2_800k.pth’

/submodules/mpsfm/local/weights/metri 100%[=======================================================================>]   5.13G   109MB/s    in 49s     

2025-05-17 23:15:44 (107 MB/s) - ‘/submodules/mpsfm/local/weights/metric_depth_vit_giant2_800k.pth’ saved [5510989187/5510989187]

/usr/local/lib/python3.10/dist-packages/timm/models/layers/__init__.py:48: FutureWarning: Importing from timm.models.layers is deprecated, please import via timm.layers
  warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.layers", FutureWarning)
/usr/local/lib/python3.10/dist-packages/timm/models/registry.py:4: FutureWarning: Importing from timm.models.registry is deprecated, please import via timm.models
  warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", FutureWarning)
/submodules/mpsfm/third_party/Metric3D/mono/model/backbones/ViT_DINO.py:248: FutureWarning: xformers.components is deprecated and is not maintained anymore. It might be removed in a future version of xFormers 
  from xformers.components.attention import ScaledDotProduct
xFormers not available
xFormers not available
Loaded metric3dv2 model.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:07<00:00,  1.27s/it]
Extracting metric3dv2 normals...
Skipping the extraction.
Extracting ['sky'] masks...
📥 Downloading via gdown: 1jJpcRXAHaTR1zk4xD1kVYXtnO1-C982K
Downloading...
From (original): https://drive.google.com/uc?id=1jJpcRXAHaTR1zk4xD1kVYXtnO1-C982K
From (redirected): https://drive.google.com/uc?id=1jJpcRXAHaTR1zk4xD1kVYXtnO1-C982K&confirm=t&uuid=fd8641e8-cbc6-4bfb-826e-7b1ba19399f9
To: /submodules/mpsfm/local/weights/skyseg.onnx
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 176M/176M [00:03<00:00, 47.1MB/s]
Loaded skyseg model.
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:08<00:00,  1.36s/it]
Estimating geometry and verifying matches...
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 15/15 [00:00<00:00, 238.79it/s]
Initializing camera integration data...
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 6/6 [00:00<00:00, 24.55it/s]
(5/6) Registering and Optimizing Image 5 indoor_DSC02882.JPG                    
Ending mapper loop because all images are registered
(6/6) GLOBAL REFINEMENT                                                         
Reconstrtuction complete with (6/6) registered images
Rec has 6/6 registered images
Image

My Questions:

For the default reconstruct.py pipeline and a small indoor dataset (e.g., 6 images), is a sparse point cloud the typical output?
Are there specific default parameters that lead to a sparser reconstruction, which could be tuned for a denser result?

Thank you for your time and this valuable project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0