SegAnyGAussians icon indicating copy to clipboard operation
SegAnyGAussians copied to clipboard

Export the segmented 3D into the .ply file?

Open engrkhurramshabbir opened this issue 1 year ago • 6 comments

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

engrkhurramshabbir avatar Jul 17 '24 15:07 engrkhurramshabbir

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.

Jumpat avatar Jul 18 '24 01:07 Jumpat

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.

engrkhurramshabbir avatar Jul 18 '24 12:07 engrkhurramshabbir

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 avatar Jul 19 '24 01:07 Jumpat

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.

Jumpat avatar Jul 19 '24 01:07 Jumpat

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?

feng-xiyun avatar Dec 05 '24 02:12 feng-xiyun

@feng-xiyun Hello, I've encountered the same problem. Have you solved it?

cyl-star avatar Oct 17 '25 05:10 cyl-star