octree-nn / ocnn-pytorch

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

Octree; 'NoneType' object has no attribute 'device' #3

Closed samanemami closed 2 years ago

samanemami commented 2 years ago

When I try to build an OCTree, it returns the following error.

oc_tree = Octree(depth=8, full_depth=2)
oc_tree.xyzb(8)
'NoneType' object has no attribute 'device'

The oc_tree has the following type

ocnn.octree.octree.Octree
samanemami commented 2 years ago

As far as I understand, we have to build oc_tree after calling the class and the only method that works fine for this matter is build_octree(point) Cause in any case we have to feed the octree with the points.

But there is a conflict between the size when applying the voxel with built octree

oc_tree = ocnn.octree.Octree(depth=8)
oc_tree.build_octree(point)
ocnn.nn.octree2voxel(tensor_cloud, oc_tree, 8)
RuntimeError: shape mismatch: value tensor of shape [841348, 3] cannot be broadcast to indexing result of shape [109320, 3]
wang-ps commented 2 years ago

please refer to the example files in this folder https://github.com/octree-nn/ocnn-pytorch/blob/master/projects/datasets to figure out the usage of build_octree

samanemami commented 2 years ago

Thanks, But I could not find related examples to build_octree, they used the Point class only. I think we can relate this issue to #5

wang-ps commented 2 years ago

Please first run the provided examples following the tutorials like Classification, Segmentation