HuguesTHOMAS / KPConv-PyTorch

Kernel Point Convolution implemented in PyTorch
MIT License
789 stars 158 forks source link

AttributeError: module 'cpp_wrappers.cpp_subsampling.grid_subsampling' has no attribute 'subsample' #142

Open cucalyptas opened 2 years ago

cucalyptas commented 2 years ago

Hi Thomas,

Thank you so much for your fantastic work and detailed documentation.

I'm trying to get started with KPConv-PyTorch using the pretrained weights on S3DIS you kindly included. I was hoping you could offer some insight into the following error:

..\KPConv-PyTorch>python test_models.py

Data Preparation


Preparing ply files Done in 0.0s (Note: this took a while the first time)

Preparing KDTree for cloud Area_5, subsampled at 0.030 Traceback (most recent call last): File "test_models.py", line 172, in test_dataset = S3DISDataset(config, set='validation', use_potentials=True) File "..\KPConv-PyTorch\datasets\S3DIS.py", line 171, in init self.load_subsampled_clouds() File "..\KPConv-PyTorch\datasets\S3DIS.py", line 748, in load_subsampled_clouds sampleDl=dl) File "..\KPConv-PyTorch\datasets\common.py", line 70, in grid_subsampling return cpp_subsampling.subsample(points, AttributeError: module 'cpp_wrappers.cpp_subsampling.grid_subsampling' has no attribute 'subsample'

I'm running this on Windows 10, Python 3.7.11, in an Anaconda virtual environment. I suspect that the issue might be with the compiling of the C++ extension modules in cpp_wrappers. When I do this, I get the following error:

..\KPConv-PyTorch\cpp_wrappers\cpp_neighbors\setup.py:1: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives from distutils.core import setup, Extension running build_ext INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils

The batch file goes on to execute seemingly fine.

Any ideas would be appreciated! Thank you :)

HuguesTHOMAS commented 2 years ago

As I told other people previously, I personally use Linux to run the code. I only tried Windows once a while ago to test if it worked, so I don't really know how to help. Here are some ideas for you to find a solution:

In any case, if you manage to run the code on Windows, I would be glad if you could post the solution here for future people having the same bug.

ixuejieo commented 1 year ago

hi,Did you solve this problem? thanks:)

moonsea0203 commented 3 months ago

Is there any progress about the mistake?I am in urgent need of it.Thanks a lot!