How to split a batched octree to raw octree
MisEty opened this issue · comments
I noticed that the pytorch O-CNN use "merge_octree" to build a new octree from raw data as the batched data. How can I get the raw data from the batched octree? eg: batch size = 4 and I have the batched octree, how can I get the feature of the first octree from the batched octree?
Denote the extracted features as A, the corresponding octree depth of A is D, the shape of A is (1, C, H, 1). With the code index = ocnn.octree_property(octree, 'index', D)
, we can get a tensor index
, and the shape of index
is (H,). If you would like to get features of the k^th octree, you can try the following code feature_k = A[:, :, index==k]
Thanks! and can I rebuild the full raw octree, not only feature, from the batched octree?
Yes, there is no information loss when merging octrees.
Please refer to the merge_octree.cpp to revert the process.
Seems very difficult... Thanks for your help!