autonomousvision / gaussian-opacity-fields

Gaussian Opacity Fields: Efficient and Compact Surface Reconstruction in Unbounded Scenes
https://niujinshuchong.github.io/gaussian-opacity-fields/
Other
559 stars 26 forks source link

What's the difference between extract_mesh.py and extract_mesh_tsdf.py? #23

Closed sumai-1998 closed 1 month ago

sumai-1998 commented 1 month ago

Which result of these two .py is the 'Ours' in the teaser? When i run extract_mesh_tsdf.py, there is a error :

Rendering progress: 0%| | 0/49 [00:02<?, ?it/s] Traceback (most recent call last): File "extract_mesh_tsdf.py", line 107, in extract_mesh(model.extract(args), args.iteration, pipeline.extract(args)) File "extract_mesh_tsdf.py", line 90, in extract_mesh tsdf_fusion(dataset.model_path, "test", iteration, cams, gaussians, pipeline, background, kernel_size) File "extract_mesh_tsdf.py", line 64, in tsdf_fusion frustum_block_coords = vbg.compute_unique_block_coordinates( RuntimeError: [Open3D Error] (void open3d::t::geometry::kernel::voxel_grid::DepthTouchCUDA(std::shared_ptr&, const open3d::core::Tensor&, const open3d::core::Tensor&, const open3d::core::Tensor&, open3d::core::Tensor&, open3d::t::geometry::kernel::voxel_grid::index_t, float, float, float, float, open3d::t::geometry::kernel::voxel_grid::index_t)) /root/Open3D/cpp/open3d/t/geometry/kernel/VoxelBlockGridCUDA.cu:197: No block is touched in TSDF volume, abort integration. Please check specified parameters, especially depth_scale and voxel_size

Have you ever met this error?

sumai-1998 commented 1 month ago

I changed the code to this:

        frustum_block_coords = vbg.compute_unique_block_coordinates(o3d_depth, intrinsic, extrinsic, 500.0, 2.0)
        # print(frustum_block_coords)
        # frustum_block_coords = vbg.compute_unique_block_coordinates(o3d_depth, intrinsic, extrinsic, 1.0, 6.0) #RAW

        vbg.integrate(frustum_block_coords, o3d_depth, o3d_color, intrinsic,intrinsic, extrinsic, 500.0, 2.0)
        # vbg.integrate(frustum_block_coords, o3d_depth, o3d_color, intrinsic,intrinsic, extrinsic, 1.0, 6.0)

    mesh = vbg.extract_point_cloud().to_legacy()
    print(mesh)
    # mesh = vbg.extract_triangle_mesh().to_legacy()

Then it ends with no error, but also no vertices and mesh Reading camera 49/49 Loading Training Cameras Loading Test Cameras Rendering progress: 100%|████████████████████████████| 49/49 [00:15<00:00, 3.16it/s] PointCloud with 0 points. Finished job on GPU 0 with scene 24

Job (0, (24, 2)) has finished., rellasing GPU 0 All jobs have been processed.

I run on DTU scan24 wtih original camera pose. And the 'extract_mesh_tsdf.py' can obtain a faithful result mesh.

niujinshuchong commented 1 month ago

Hi, we use extract_mesh.py for the ours in the teaser figure. extract_mesh_tsdf.py use tsdf fusion with rendered depth maps.