vggt icon indicating copy to clipboard operation
vggt copied to clipboard

Results of demo_colmap.py: The number of point clouds is 0

Open songsenIng opened this issue 6 months ago • 7 comments

Hello, thanks for the great contribution. I used Gradio Web Interface online through Hugging Face, uploaded 8 images with a resolution of 1405*1057 from local, and I got a good point cloud result. But when I used the same dataset and ran demo_colmap.py locally, I got a wrong result. cameras.bin, images.bin, points3d.bin are all empty files, it did not get the correct pose and point cloud. Do you know what is the reason? When used in the Gaussian model, the following results were produced.

Number of points at initialisation :  0 [02/06 15:59:20]
Traceback (most recent call last):
  File "train.py", line 304, in <module>                                                                                                                         
    training(lp.extract(args), op.extract(args), pp.extract(args), args.test_iterations, args.save_iterations, args.checkpoint_iterations, args.start_checkpoint)
  File "train.py", line 38, in training                                                                                                                          
    scene = Scene(dataset, gaussians)                                                                                                                            
  File "F:\2d-gaussian-splatting-main\scene\__init__.py", line 94, in __init__                                                                                   
    self.gaussians.create_from_pcd(scene_info.point_cloud, self.cameras_extent)    
  File "F:\2d-gaussian-splatting-main\scene\gaussian_model.py", line 142, in create_from_pcd                                                                     
    dist2 = torch.clamp_min(distCUDA2(torch.from_numpy(np.asarray(pcd.points)).float().cuda()), 0.0000001)                                                       
RuntimeError: tabulate: failed to synchronize: cudaErrorInvalidConfiguration: invalid configuration argument

songsenIng avatar Jun 02 '25 08:06 songsenIng

Hi can you share your image files? If the files are not allowed to share, I guess

  1. 3D points are filtered out by hard-coded confidence thres, e.g.,

https://github.com/facebookresearch/vggt/blob/22d5c18fe6a99aef16b37a863f458935cf7b3120/demo_colmap.py#L192C9-L192C25

  1. The pycolmap package is not installed correctly

jytime avatar Jun 02 '25 12:06 jytime

Hi can you share your image files? If the files are not allowed to share, I guess

  1. 3D points are filtered out by hard-coded confidence thres, e.g.,

https://github.com/facebookresearch/vggt/blob/22d5c18fe6a99aef16b37a863f458935cf7b3120/demo_colmap.py#L192C9-L192C25

  1. The pycolmap package is not installed correctly

When I used a dataset with 8 images, I got a file with 0 point clouds. But when I changed to a dataset with 30 images, I got the result (but the quality of this point cloud is worse than the online version of Gradio Web Interface). I didn't find the reason. Here are the data I used and the results. Below is the inference process.

Arguments: {'scene_dir': './dataset/banana_sparse_vggt_8', 'seed': 42, 'use_ba': False, 'max_reproj_error': 8.0, 'shared_camera': False, 'camera_type': 'SIMPLE_PINHOLE', 'vis_thresh': 0.2, 'query_frame_
num': 5, 'max_query_pts': 2048, 'fine_tracking': True, 'checkpoint': './checkpoints/model.pt'}
Setting seed as: 42
Using device: cuda        
Using dtype: torch.float16
Model loaded
Loaded 8 images from ./dataset/banana_sparse_vggt_8\images
Converting to COLMAP format
Saving reconstruction to ./dataset/banana_sparse_vggt_8/sparse
(vggsfm) PS F:\vggt-main> 

songsenIng avatar Jun 02 '25 13:06 songsenIng

I see. It seems just by tuning conf_thres_value to a smaller value can get a much better result.

I am going to also export conf_thres_value as an arg. Please let me know if this work for you.

jytime avatar Jun 02 '25 14:06 jytime

I see. It seems just by tuning conf_thres_value to a smaller value can get a much better result.

I am going to also export conf_thres_value as an arg. Please let me know if this work for you.

Thanks to the author's suggestion, when I gradually reduced the value of conf_thres_value to 1, I got better results.

songsenIng avatar Jun 02 '25 15:06 songsenIng

it seems that the conf result is all nearly 1.0,i do not know if this is the bug of the model

GuitarYourself avatar Jun 06 '25 08:06 GuitarYourself

if for some scenes the depth conf is all almost 1.0, it means either the scene contains a lot of dynamic pixels, or really little overlap.

jytime avatar Jun 06 '25 14:06 jytime

Hi can you share your image files? If the files are not allowed to share, I guess

  1. 3D points are filtered out by hard-coded confidence thres, e.g.,

https://github.com/facebookresearch/vggt/blob/22d5c18fe6a99aef16b37a863f458935cf7b3120/demo_colmap.py#L192C9-L192C25

  1. The pycolmap package is not installed correctly

When I used a dataset with 8 images, I got a file with 0 point clouds. But when I changed to a dataset with 30 images, I got the result (but the quality of this point cloud is worse than the online version of Gradio Web Interface). I didn't find the reason. Here are the data I used and the results. Below is the inference process.

Arguments: {'scene_dir': './dataset/banana_sparse_vggt_8', 'seed': 42, 'use_ba': False, 'max_reproj_error': 8.0, 'shared_camera': False, 'camera_type': 'SIMPLE_PINHOLE', 'vis_thresh': 0.2, 'query_frame_
num': 5, 'max_query_pts': 2048, 'fine_tracking': True, 'checkpoint': './checkpoints/model.pt'}
Setting seed as: 42
Using device: cuda        
Using dtype: torch.float16
Model loaded
Loaded 8 images from ./dataset/banana_sparse_vggt_8\images
Converting to COLMAP format
Saving reconstruction to ./dataset/banana_sparse_vggt_8/sparse
(vggsfm) PS F:\vggt-main> 

@jytime

I meet the same issue. When I use demo_colmap.py without 'use_ba', same with this issue, though I set the confidence threshold lower, points are not visualized in the colmap GUI. But there are points in points3D.bin. So I want to know that this is the bug or not.

When I set 'use_ba=True', I can see the points in the colmap GUI. So I suspect that something is not aligned when 'use_ba=False'.

Image

yoomimi avatar Jun 19 '25 06:06 yoomimi