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

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

Open cucalyptas opened this issue 3 years ago • 3 comments

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 :)

cucalyptas avatar Jan 14 '22 08:01 cucalyptas

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:

  • There are previous issues about windows bugs you could look at:

    • https://github.com/HuguesTHOMAS/KPConv-PyTorch/issues/130
    • https://github.com/HuguesTHOMAS/KPConv-PyTorch/issues/83
  • You can also try to contact the persons who encountered these issues, to see if they found solutions

  • You can try to investigate python wrapper compilation on Windows and your particular error

  • Or simply switch to linux

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.

HuguesTHOMAS avatar Jan 14 '22 15:01 HuguesTHOMAS

hi,Did you solve this problem? thanks:)

ixuejieo avatar Apr 04 '23 10:04 ixuejieo