Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract Mesh Problem #19

Open
johnren-code opened this issue May 9, 2024 · 5 comments
Open

Extract Mesh Problem #19

johnren-code opened this issue May 9, 2024 · 5 comments

Comments

@johnren-code
Copy link

Loading trained model at iteration 30000
Reading camera 240/240
Loading Training Cameras
Loading Test Cameras
export training images ...
reconstruct radiance fields: 240it [00:03, 64.30it/s]
export images: 240it [02:02, 1.97it/s]
export mesh ...
reconstruct radiance fields: 240it [00:02, 82.01it/s]
Running tsdf volume integration ...
voxel_size: 0.004
sdf_trunc: 0.02
depth_truc: 3.0
TSDF integration progress: 240it [00:01, 159.15it/s]
[Open3D WARNING] Write PLY failed: mesh has 0 vertices.
mesh saved at /root/autodl-tmp/project/2d-gaussian-splatting/output/127876ac-b/train/ours_30000/fuse.ply
post processing the mesh to have 1000 clusterscluster_to_kep
[Open3D DEBUG] [ClusterConnectedTriangles] Compute triangle adjacency
[Open3D DEBUG] [ClusterConnectedTriangles] Done computing triangle adjacency
[Open3D DEBUG] [ClusterConnectedTriangles] Done clustering, #clusters=0
Traceback (most recent call last):
File "render.py", line 102, in
mesh_post = post_process_mesh(mesh, cluster_to_keep=args.num_cluster)
File "/root/autodl-tmp/project/2d-gaussian-splatting/utils/mesh_utils.py", line 35, in post_process_mesh
n_cluster = np.sort(cluster_n_triangles.copy())[-cluster_to_keep]
IndexError: index -1000 is out of bounds for axis 0 with size 0.

I train and render with my own dataset. What is the possible problem?

@hbb1
Copy link
Owner

hbb1 commented May 9, 2024

Related to #14

@johnren-code
Copy link
Author

Thank you for your advice! I have adjusted the depth_trunc accroding to the scene. The [Open3D WARNING] Write PLY failed: mesh has 0 vertices is missed. But the error still occurs:

Traceback (most recent call last):
File "render.py", line 102, in
mesh_post = post_process_mesh(mesh, cluster_to_keep=args.num_cluster)
File "/root/autodl-tmp/project/2d-gaussian-splatting/utils/mesh_utils.py", line 35, in post_process_mesh
n_cluster = np.sort(cluster_n_triangles.copy())[-cluster_to_keep]
IndexError: index -1000 is out of bounds for axis 0 with size 325

@johnren-code
Copy link
Author

post processing the mesh to have 1000 clusterscluster_to_kep
[Open3D DEBUG] [ClusterConnectedTriangles] Compute triangle adjacency
[Open3D DEBUG] [ClusterConnectedTriangles] Done computing triangle adjacency
[Open3D DEBUG] [ClusterConnectedTriangles] Done clustering, #clusters=325
Traceback (most recent call last):
File "render.py", line 102, in
mesh_post = post_process_mesh(mesh, cluster_to_keep=args.num_cluster)
File "/root/autodl-tmp/project/2d-gaussian-splatting/utils/mesh_utils.py", line 35, in post_process_mesh
n_cluster = np.sort(cluster_n_triangles.copy())[-cluster_to_keep]
IndexError: index -1000 is out of bounds for axis 0 with size 325

@johnren-code
Copy link
Author

Should I adjust the value of n_cluster?

@hbb1
Copy link
Owner

hbb1 commented May 9, 2024

Not related to the post-processing step.

The [Open3D WARNING] Write PLY failed: mesh has 0 vertices is missed.

It suggests that you don't effective adjust the depth_trunc and the mesh still has 0 vertices.
You may estimate the depth range according to the values of the depth-map or according to the the camera extent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants