前言
这个复现是根据RandLA-Net windows Pytorch实现这个博主做的。前面的配置和数据都有,所以直接从预处理开始了。现在在运行train.py,中间遇到了很多问题,想着手写记录的,又觉得麻烦,就放在这里,可以自己复盘总结,也可以供大家一起交流。
数据问题
因为数据是用的s3dis,之前做pointnet++,下载过这个数据,就没有重新下载,就把pointnet++里的数据复制过来了,运行的时候显示好几个文件里面是空内容,有警告,但是没有报错,就想着先不管他,继续往下跑了,结果错误越来越多,都还是我解决不了的。就从头再来,重新下载数据。这个文章里的连接我打不开,就重新找了个🔗下载。(如果大家需要的话,我就发网盘链接哈)果然 数据源一换,那运行效果咔咔的。好吧,还是遇到问题了·······
之前的问题(只有问题,没有解决)
Requirement already satisfied: protobuf in f:\envs\learn_1\lib\site-packages (4.25.3)
ERROR: Could not find a version that satisfies the requirement 3.19.0 (from versions: none) ERROR: No matching distribution found for 3.19.0
(安装特定版本的 protobuf
(3.19.0)时未找到匹配的版本)
points = np.loadtxt(elem, dtype=np.float32) Traceback (most recent call last): adding wall to point cloud... File "H:\pointnet\RandLA-Net-pytorch-master\utils\prepare_s3dis.py", line 45, in <module> points = np.loadtxt(elem, dtype=np.float32) File "F:\envs\learn_1\lib\site-packages\numpy\lib\npyio.py", line 1356, in loadtxt arr = _read(fname, dtype=dtype, comment=comment, delimiter=delimiter, File "F:\envs\learn_1\lib\site-packages\numpy\lib\npyio.py", line 999, in _read arr = _load_from_filelike( ValueError: the number of columns changed from 6 to 7 at row 297498; use `usecols` to select a subset and avoid this error
(在读取数据时发现在第297498行,数据的列数从6列变成了7列,导致了数列不匹配的错误)
H:\pointnet\RandLA-Net-pytorch-master\utils\prepare_s3dis.py:45: UserWarning: loadtxt: input contained no data: "H:\pointnet\RandLA-Net-pytorch-master\datasets\s3dis\Stanford3dDataset_v1.2\Area_2\auditorium_1\Annotations\clutter_12.txt" points = np.loadtxt(elem, dtype=np.float32)
(该文件没有包含任何数据)
H:\pointnet\RandLA-Net-pytorch-master\utils\prepare_s3dis.py:45: UserWarning: loadtxt: input contained no data: "H:\pointnet\RandLA-Net-pytorch-master\datasets\s3dis\Stanford3dDataset_v1.2\Area_1\conferenceRoom_2\Annotations\beam_1.txt" points = np.loadtxt(elem, dtype=np.float32)
(同上)
INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'grid_subsampling' extension error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
(缺少了 Microsoft Visual C++ 14.0 或更高版本的编译器)
ImportError: cannot import name '__all__' from 'numpy.linalg'
(尝试导入 numpy.linalg
模块时出现了问题)
解决的问题
ValueError: the number of columns changed from 6 to 5 at row 180389; use `usecols` to select a subset and avoid this error
换了数据集之后,运行预处理文件,显示列数变了,但是区域5里有很多文件,要一个一个找太麻烦了,我就在代码里添加内容,让他显示是哪个文件的问题。
- 输出当前处理的文件路径: 这样能够准确地看到是哪个文件导致了问题。
- 捕获具体的异常信息: 在加载数据时,可以捕获
ValueError
异常,并打印出错的具体信息,例如数据的行数或列数。
最后找到错误文件了,打开txt,找到那一行,但是他的列数就是六列啊,没有任何问题,我就把那一行给删了,再运行就显示成功了。
下采样好像也没啥报错,我也记不得了,整体运行的比错误的数据集稍微顺畅一些
train.py
ModuleNotFoundError: No module named 'torch_points_kernels'
昨天走之前遇到这个问题,一直解决不出来,今天开机再运行,又是新的别的错误。
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject.
这个就是升级numpy(昨天一直在安装、卸载、安装、卸载,numpy不兼容的问题真的很烦)
AttributeError: module 'numpy' has no attribute 'bool8'
这个问题我看大家写的又要降低numpy版本·····
这个是那么多错误文件里唯一的bool8,将np.bool8改为np.bool_,这个问题好了,又来了新的问题
ImportError: numpy.core.multiarray failed to import
这个又显示我的numpy版本低····,又得卸载再安,
就到这里把·····后面我也还没解决呢