facebookresearch / pytorch3d

PyTorch3D is FAIR's library of reusable components for deep learning with 3D data
https://pytorch3d.org/
Other
8.72k stars 1.31k forks source link

Render the vertex property of a ply model #1382

Open willer94 opened 1 year ago

willer94 commented 1 year ago

🚀 Render the vertex property of a ply model

It seems that pytorch3D cannot load and render a ply model with a scalar property. Such feature is useful in generating synthetic datasets in semantic segmentation. For a ply model with the following header:

obj_info Generated by CloudCompare!
element vertex 74005
property float x
property float y
property float z
property float scalar_label
element face 105918
property list uchar int vertex_indices
end_header
0.317872 -0.556218 0.265332 1 
0.279817 -0.438001 0.260033 1 
0.32239 -0.419735 0.267801 1 
0.279064 -0.429663 0.258732 1 
0.281066 -0.472349 0.245594 1 
0.325213 -0.535105 0.24979 1 
0.321952 -0.483616 0.26578 1 
0.323012 -0.478118 0.235942 1 
0.322256 -0.577594 0.249162 1 
0.322933 -0.55097 0.243218 1 
0.321956 -0.496558 0.264436 1 
0.322696 -0.503181 0.237797 1 
...
bottler commented 1 year ago

I hope that this file can be loaded by PyTorch3D and the scalar_label is being ignored, and you are asking that we should not ignore it. Is that right?

What does the scalar_label property mean, and what do you want PyTorch3D to do with it? For example, do you want it to become a feature of each point?