gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Model3D pointcloud data format support (not display mode)

Open trihook opened this issue 1 year ago • 5 comments

  • [ ] I have searched to see if a similar issue already exists.

Is your feature request related to a problem? Please describe.
For gr.Model3D, can show the 3d data only with face information without face data can not show.

ex for .obj following data with face data show normal, but without "f" data can not show

Created by Open3D 
object name: output_mesh
number of vertices: 272009
number of triangles: 256444
v -0.977078 -0.860674 1.852 0.337255 0.333333 0.407843
...
f 210423//210423 211058//211058 211056//211056
...

Describe the solution you'd like
Can gr.Model3D support PointCload data directly ex for .obj data only contain v (without face ) ex for .ply only x,y,z + r,g,b support directly like following format binary_little_endian 1.0 comment Created by Open3D element vertex 272009 property double x property double y property double z property uchar red property uchar green property uchar blue end_header

Additional context
Thank your amazing job!!

trihook avatar Jul 18 '24 05:07 trihook

Hi @trihook I don't really understand the issue here. Can you explain a bit more, provide an example gradio, as well as a sample file that is not rendering correctly? cc @dawoodkhan82

abidlabs avatar Jul 18 '24 21:07 abidlabs

Hi @trihook I don't really understand the issue here. Can you explain a bit more, provide an example gradio, as well as a sample file that is not rendering correctly? cc @dawoodkhan82 Thank for you reply! following is test 3d files point_cloud_with.zip 3 files in zip 1.point_cloud_without_face.ply, 2.point_cloud_without_face.obj, 3.point_cloud_with_face.obj 1 and 2 is pure pointcloud data, 3 is using pointcloud data to recontruct sufface so 3 have face data

1,2,3 render corredlty in Meshlab software, image but 1,2 can not render in gr.Model3D(), 3 is ok I using following code for testing , my gradio version is 4.38.1 gr.Model3D(display_mode="solid")

My feature request is gr.Model3D() can support pure pointcloud data (no face data after surface reconstruction )

trihook avatar Jul 19 '24 03:07 trihook

@trihook Just to clarify, even when setting the ``display_modetopoint_cloud` the files are not displayed correctly?

dawoodkhan82 avatar Jul 19 '24 14:07 dawoodkhan82

@trihook Just to clarify, even when setting the ``display_modetopoint_cloud` the files are not displayed correctly?

yes, even when setting the ``display_modetopoint_cloud` the files are not displayed correctly

trihook avatar Jul 22 '24 02:07 trihook

I got the same problem.

zuodexin avatar Oct 04 '24 11:10 zuodexin

I also had the same problem when I tried the point color data with only point coordinates and colors. Gradio only gave me the blank rendering result. Then, I checked the example ply on the official webpage. It seems to be a 3D Gaussian file with position, color, opacity, rotation, and scale.

Will the gradio support the point cloud rendering like open3d and trimesh? Thanks for your consideration!

kunkun0w0 avatar Jan 20 '25 00:01 kunkun0w0

Would one of you be open to opening a PR for this?

freddyaboulton avatar Sep 19 '25 12:09 freddyaboulton