pyg-team / pytorch_geometric

Graph Neural Network Library for PyTorch
https://pyg.org
MIT License
21.35k stars 3.66k forks source link

Trouble running pointnet2_classification script #711

Open Tojens opened 5 years ago

Tojens commented 5 years ago

❓ Questions & Help

Hi

First of all, I'm excited to work with this project in relation to my own data. Before I attempt that though, I'd like to run a couple of examples, but when I try the pointnet2 classification script I get the following error:

FileExistsError: [WinError 183] Cannot create a file when that file already exists: 'C:\Program Files\Anaconda3\envs\pointcnn\pointdemo\data\ModelNet10\ModelNet10' -> 'C:\Program Files\Anaconda3\envs\pointcnn\pointdemo\data\ModelNet10\raw'

Do you know of any possible solution to this problem? I have been able to run the gcn.py example, so I am not exactly sure why this fails while extracting the downloaded modelnet10 data.

rusty1s commented 5 years ago

This seems Windows related :( I fixed it in the master branch. If you do not want to re-install PyG, you can manually download the ModelNet10 data and move it to the raw/ directory.

Tojens commented 5 years ago

Thank you very much for the help. It worked perfectly. I do have a more general question, that I hope you might be able to help with.

Having run the Pointnet++ classification example on some input data, i would like to view the classified result as a point cloud with assigned labels. Can you provide some guidelines for how I might go about doing that?

My current understanding would be, that a library like Open3d would be needed for visualization, but that PyG could classify the point cloud using Pointnet++. Any help you can provide as to how I can obtain a classified pointcloud with PyG would be very helpful.

rusty1s commented 5 years ago

You can convert your point clouds (xyz = data.pos.numpy()) and the computed label to, e.g., numpy, and use tools like Open3d to visualize them.:

pcd = o3d.geometry.PointCloud()
pcd.points = o3d.utility.Vector3dVector(xyz)
Tojens commented 5 years ago

Thanks for the quick response. I will look into it :)