Error while using pretrained model
Ali-Rashidi opened this issue · 4 comments
Hi
I'm trying to feed a point cloud that has been generated with open3d to a pretrained PCN but I get this error :
'open3d.cpu.pybind.geometry.PointCloud' object has no attribute 'shape'
Can you please help me? Thanks a lot.
hi, the input should be torch.Tensor
, try to extract the point cloud out as coordinates by use '.points'.
ref: http://www.open3d.org/docs/0.14.1/python_api/open3d.geometry.PointCloud.html
Hello Again. Thanks a lot for your answer.
I did what you said. First I get the points then convert them into numpy array and then into tensor.
Now I'm getting a new error:
... , in forward
bs , n , _ = xyz.shape
ValueError: not enough values to unpack (expected 3, got 2)
the input size is (number of points , 3) = (4472 , 3) .
Do you have any idea how to solve this error?
Thanks again :)
Hi @Ali-Rashidi ,
Sorry for the late reply. Have you solve your problem? When you use your own point cloud data, you should:
- Downsample it to 2048 point (opinional)
- Unsqueeze the Tensor to 3 demension (B N 3). For example, (4472, 3) -> (1, 4472, 3) by using
xyz.unsqueeze(0)
Feel free to reopen the issue.
Best regards
Hello
Tnx for your reply
I solved the problem.
Tnx a lot