Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing on my point cloud #31

Open
FSet89 opened this issue Mar 14, 2024 · 1 comment
Open

Testing on my point cloud #31

FSet89 opened this issue Mar 14, 2024 · 1 comment

Comments

@FSet89
Copy link

FSet89 commented Mar 14, 2024

I want to test the completion model on my point cloud. I load it as a Nx3 array where N~9000 and I feed it to the ckpt-best-shapenet34_21-cd_l2.pth model checkpoint. The output is a list of 4 tensors with shape:
torch.Size([1, 256, 3]) torch.Size([1, 512, 3]) torch.Size([1, 2048, 3]) torch.Size([1, 8192, 3])
I'm a bit confused here. How do I recover the predicted cloud?
I tried to switch C and N axes like suggested in another issue but I get a CUDA error:

CUDA kernel failed : invalid configuration argument
void gather_points_kernel_wrapper(int, int, int, int, const float*, const int*, float*) at L:29 in /home/x/SnowflakeNet/models/pointnet2_ops_lib/pointnet2_ops/_ext-src/src/sampling_gpu.cu

@BowenTan02
Copy link

BowenTan02 commented Mar 28, 2024

Please refer to this issue #23
After the prediction is generated, you can try:

completed_pc = open3d.geometry.PointCloud()
# result is a list of tensors
completed_point_cloud = completed_point_cloud[-1].cpu().numpy()
# convert to float64 array
completed_point_cloud = completed_point_cloud.astype(np.float64)
# remove first dimension
completed_point_cloud = np.squeeze(completed_point_cloud)
print("Predicted Shape", completed_point_cloud.shape)
completed_pc.points = open3d.utility.Vector3dVector(completed_point_cloud)

where completed_point_cloud is the model output after running Mustafa's function complete_point_cloud in his script.
I hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants