octree-nn / ocnn-pytorch

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

Issues about organizing my own dataset。 Sorry to disturb you #13

Closed zhongxiaj closed 1 year ago

zhongxiaj commented 1 year ago

I am trying organize my own dataset to fit the Net

xyz = np.loadtxt('/mnt/zxj/datasets/cangkou/cangsao_test_yazulen2/78248/Lower/45.xyz')  ------>>1. contain (x,y,z)
X_std = (xyz - xyz.min(axis=0)) / (xyz.max(axis=0) - xyz.min(axis=0))
xyz = X_std / (1+1)  -1
print('\nxyzxyzxyzxyzxyzxyzxyz', xyz.shape)    ------------------------------------------------------->2.(n,3)
po = Points(torch.from_numpy(xyz))#.permute(0,2,1)    ----------------------------------------->3. <class cnn.octree.points.Points'>       

li =[po]
li = ocnn.octree.merge_points(li)----------------------------------------------------------------->4.<class cnn.octree.points.Points'>   
octree = Octree(6).build_octree(li)------------------------------------------------------------> 5.<class 'torch.Tensor'>
data = self.get_input_feature(octree)

how can I convert the 4.<class cnn.octree.points.Points'> to not tensor? I am just following the doc ( following the the documen: thttps://ocnn-pytorch.readthedocs.io/en/latest/modules/octree.html)

zhongxiaj commented 1 year ago

how can I convert the 4.<class cnn.octree.points.Points'> to but not tensor? I am just following the doc ( following the the documen: thttps://ocnn-pytorch.readthedocs.io/en/latest/modules/octree.html)

wang-ps commented 1 year ago

class ocnn.octree.points.Points is a python class containing several Pytorch Tensors as its properties.

What do you mean by "to but not tensor"?

zhongxiaj commented 1 year ago

class ocnn.octree.points.Points is a python class containing several Pytorch Tensors as its properties.

What do you mean by "to but not tensor"?

I am trying to convert 4.<class cnn.octree.points.Points'> to <class 'ocnn.octree.octree.Octree'> In my view, the function"octree = Octree(6).build_octree(li)" could touch the goal, but in fact it feedback 5.<class 'torch.Tensor'> . How can I do?

zhongxiaj commented 1 year ago

class ocnn.octree.points.Points is a python class containing several Pytorch Tensors as its properties.

What do you mean by "to but not tensor"? I find the funcition is what I want :ocnn.dataset.Transform Thanks for your great work!!