KPConv-PyTorch icon indicating copy to clipboard operation
KPConv-PyTorch copied to clipboard

Windows running error

Open GeoSur opened this issue 3 years ago • 6 comments

thanks for your sharing! I have run this code on linux successfully,but when I run it on windows followed the instructions,some errors generated:RuntimeError: expected scalar type Long but found Int. is anyone knows what happened? or how to solve this problem?

GeoSur avatar Mar 15 '22 13:03 GeoSur

I personally do not use the code on windows, so I am afraid I won't be of much help. This repo is aimed at Linux primarily, if you want to run it with windows, you should expect having to modify the implementation and correct bugs.

Some other people might have tried it on windows if you can find other issues mentioning it.

HuguesTHOMAS avatar Mar 15 '22 16:03 HuguesTHOMAS

I personally do not use the code on windows, so I am afraid I won't be of much help. This repo is aimed at Linux primarily, if you want to run it with windows, you should expect having to modify the implementation and correct bugs.

Some other people might have tried it on windows if you can find other issues mentioning it.

Thanks for your quick reply! I will try to modify this code or just run it on Linux. I try it on Windows because it equipped with a better Gpu. If i can out modify this, I will run it only on Linux.
By the way,if I want to test the Toronto3d data set, what should I do? And have you considered adding a weak supervision module to the kpconv framework? I have saw some papers did it on Als dataset but they didn't provide the source code. Do you have the similar plan?

GeoSur avatar Mar 15 '22 23:03 GeoSur

have you considered adding a weak supervision module to the kpconv framework?

No, this repo is really for defining a 3D point cloud convolution. It should serve as a base for more repos that implements more ideas with this convolution operator.

if I want to test the Toronto3d data set

You can reuse the code for S3DIS, modify the different parameters defining the files:

https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/e600c1667d085aeb5cf89d8dbe5a97aad4270d88/datasets/S3DIS.py#L88-L89 https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/e600c1667d085aeb5cf89d8dbe5a97aad4270d88/datasets/S3DIS.py#L107-L108 https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/e600c1667d085aeb5cf89d8dbe5a97aad4270d88/datasets/S3DIS.py#L113-L116

and then modify the preparation function https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/e600c1667d085aeb5cf89d8dbe5a97aad4270d88/datasets/S3DIS.py#L134 I don't know what the data looks like in this particular dataset, but you should load it, and save it as .ply point clouds with the same properties as S3DIS: https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/e600c1667d085aeb5cf89d8dbe5a97aad4270d88/datasets/S3DIS.py#L689-L692

HuguesTHOMAS avatar Mar 16 '22 16:03 HuguesTHOMAS

have you considered adding a weak supervision module to the kpconv framework?

No, this repo is really for defining a 3D point cloud convolution. It should serve as a base for more repos that implements more ideas with this convolution operator.

if I want to test the Toronto3d data set

You can reuse the code for S3DIS, modify the different parameters defining the files:

https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/e600c1667d085aeb5cf89d8dbe5a97aad4270d88/datasets/S3DIS.py#L88-L89

https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/e600c1667d085aeb5cf89d8dbe5a97aad4270d88/datasets/S3DIS.py#L107-L108

https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/e600c1667d085aeb5cf89d8dbe5a97aad4270d88/datasets/S3DIS.py#L113-L116

and then modify the preparation function

https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/e600c1667d085aeb5cf89d8dbe5a97aad4270d88/datasets/S3DIS.py#L134

I don't know what the data looks like in this particular dataset, but you should load it, and save it as .ply point clouds with the same properties as S3DIS: https://github.com/HuguesTHOMAS/KPConv-PyTorch/blob/e600c1667d085aeb5cf89d8dbe5a97aad4270d88/datasets/S3DIS.py#L689-L692

Thanks for your reply!!

GeoSur avatar Mar 17 '22 08:03 GeoSur

@GeoSur Did you implement it on win? Can you communicate some, my QQ3454136228

hongzhiqiang67 avatar Oct 05 '22 00:10 hongzhiqiang67

You can solve this by simply modifying your utils/trainer.py:

utils/trainer.py

labels = torch.tensor(batch.labels, dtype=torch.long)
loss = net.loss(outputs, labels)
acc = net.accuracy(outputs, labels)

This solved the same problem for me. @HuguesTHOMAS @GeoSur

Yarroudh avatar May 18 '23 01:05 Yarroudh