octree-nn / ocnn-pytorch

Octree-based 3D Convolutional Neural Networks
MIT License
156 stars 17 forks source link

features in Octree object is a list of None #30

Closed junmeng6025 closed 7 months ago

junmeng6025 commented 7 months ago

Hi, I'm facing an issue about generating octree feature. I've already generated Octree upon point cloud successfully, with attributions children, neighbor etc, but the attribution features is a list of None.

Snipaste_2024-04-04_12-02-22

When I try to generate feature data using ocnn.modules.InputFeature, it claims an error:

Exception has occurred: TypeError
unsupported operand type(s) for *: 'Tensor' and 'NoneType'
  File "/root/OpenPCDet/pcdet/models/backbones_3d/vfe/pillarmamba_vfe.py", line 805, in <module>
    data = octree_feature(octree)
TypeError: unsupported operand type(s) for *: 'Tensor' and 'NoneType'

I think these NoneType might come up due to features and normals, but I have o idea how should these two be generated. Thanks in advance.

wang-ps commented 7 months ago

I guess your input point cloud has only xyz coordinates. It has no normals or other features, such as RGB colors. I suggest you directly use the coordinates as the point feature. To this end, you can use the following function

x = octree.get_input_feature(feature = 'L' or 'P', nempty = True or False)

https://ocnn-pytorch.readthedocs.io/en/latest/modules/octree.html#ocnn.octree.Octree.get_input_feature