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

Export the segmented 3D into the .ply file? #91

Open
engrkhurramshabbir opened this issue Jul 17, 2024 · 5 comments
Open

Export the segmented 3D into the .ply file? #91

engrkhurramshabbir opened this issue Jul 17, 2024 · 5 comments

Comments

@engrkhurramshabbir
Copy link

Thanks for sharing your valuable work. Is it possible to export the segmented 3D into the .ply file?

@Jumpat
Copy link
Owner

Jumpat commented Jul 18, 2024

Of course. After run .segment() (in render.py you can find the function), the gaussian_model is the segmented 3D object(s). Then, you can simply save it as a common 3D-GS Gaussian model.

@engrkhurramshabbir
Copy link
Author

Unfortunately, I am unable to get any .ply file after running the render.py code. I am using PCA and 3D Cluster to save the precomputed_mask.pt
Untitled

But when I execute "python render.py -m output/ae32a2ba-a --precomputed_mask segmentation_res/precomputed_mask.pt --target scene --segment"
I don't get any .ply file which has the 3D segmentation information as shown in above attached picture in the GUI. Moreover, the 2D rendered images are also RGB and do have any segmentation information.

@Jumpat
Copy link
Owner

Jumpat commented Jul 19, 2024

Yeah. First, I haven't provided the function to store the PCA and 3D cluster results. You may need to implement it as you like since there may be many possible storing forms.

To store the segmented object(s) as a 3D-GS ply file, render.py only provides a sample about calling the .segment() function. To store the segmented Gaussian model, you need to add scene.save(scene.loaded_iter, target='seg_no_mask') after calling .segment().

@Jumpat
Copy link
Owner

Jumpat commented Jul 19, 2024

Hints: If you just want to save the PCA colors as Gaussian colors, you can just find this color in the GUI code (l1, l2) and replace the original point color with the PCA color and call this.

Note that the pca decomposition is conducted on rendered feature. If you want to save it as 3D Gaussian point you need to conduct the projection on point features instead.

@feng-xiyun
Copy link

I am unable to get any .ply file after running the render.py code.
I am using SIMILARITY and click mode and multi-click mode to save the precomputed_mask.pt, when I execute "python render.py -m output/1203ae32a2ba --precomputed _mask segmentation_res/precomputed_mask.pt --target scene --segment", I don't get any .ply file.
How to export the segmented 3D into the .ply file?

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

3 participants