跑openpcdet/pointpillars遇到的问题
Pointpillars+openpcdet官方数据/自定义篇
官方代码链接:
https://github.com/shangjie-li/pointpillars
https://github.com/open-mmlab/OpenPCDet
- 报错1 下载数据集太慢(外网下载且40G数据)
#按照指定目录下载data ./pointpillars/data/kitti/training/
#./pointpillars/data/kitti/testing/
wget https://s3.eu-central-1.amazonaws.com/avg-kitti/data_object_velodyne.zip
# 报错 连不上ssl
wget https://s3.eu-central-1.amazonaws.com/avg-kitti/data_object_image_2.zip
wget https://s3.eu-central-1.amazonaws.com/avg-kitti/data_object_calib.zip
wget https://s3.eu-central-1.amazonaws.com/avg-kitti/data_object_label_2.zip
wget https://drive.google.com/file/d/1d5mq0RXRnvHPVeKx6Q612z0YRO1t2wAp/view?usp=sharing
- 解决(添加代理即可,在clash打开 allow LAN )
vi ~/.bashrc
按i
export http_proxy="http://xxx:7890"
export https_proxy="http://xxx:7890"
按esc
:wq
source ~/.bashrc
# xxx是自己电脑的地址 按 win+r cmd 输入ipconfig查看 wlan
- 报错 2
(pointpillars) root@f8f4cdac2a2a:~/data/wkl/pointpillars# python dataset_player.py --show_boxes
Traceback (most recent call last):
File "dataset_player.py", line 13, in <module>
from utils import open3d_vis_utils as V
File "/root/data/wkl/pointpillars/utils/open3d_vis_utils.py", line 1, in <module>
import open3d
File "/root/data/anaconda3/envs/pointpillars/lib/python3.7/site-packages/open3d/__init__.py", line 28, in <module>
from .open3d import * # py2 py3 compatible
ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- 解决2
#解决
sudo apt-get update
sudo apt-get install libgl1-mesa-glx
- 报错3 并解决(上一篇博文)
GLFW Error: X11: The DISPLAY environment variable is missing
Failed to initialize GLFW
#解决
#下载VcXsrv https://sourceforge.net/projects/vcxsrv/
#参考 https://blog.csdn.net/qq_37698947/article/details/122361495
#其中 export DISPLAY=XXX:13.0
#xxx是ipconfig 本地电脑的地址
- 报错4 ProxyError
ProxyError: Conda cannot proceed due to an error in your proxy configuration.
Check for typos and other configuration errors in any ‘.netrc’ file in your home directory,
any environment variables ending in ‘_PROXY’, and any other system-wide proxy
configuration settings.
- 解决
#输入命令
env | grep -i "_PROXY"
#得到输出结果:
#https_proxy=http://XXX:7890
#http_proxy=http://XXX:7890
#再输入命令unset将这几项代理删除:
unset https_proxy
unset http_proxy
#解决
- 报错5 cuda不匹配
RuntimeError:
The detected CUDA version (12.2) mismatches the version that was used to compile
PyTorch (11.7). Please make sure to use the same CUDA versions.
- 解决
#https://blog.csdn.net/perseverence_/article/details/134408420
File "/root/data/anaconda3/envs/openpcdet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 499, in build_extensions
_check_cuda_version(compiler_name, compiler_version)
File "/root/data/anaconda3/envs/openpcdet/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 386, in _check_cuda_version
raise RuntimeError(CUDA_MISMATCH_MESSAGE.format(cuda_str_version, torch.version.cuda))
RuntimeError:
The detected CUDA version (12.2) mismatches the version that was used to compile
PyTorch (11.7). Please make sure to use the same CUDA versions.
#参考 https://blog.csdn.net/pd162/article/details/135529103
#这两个都可以 https://blog.csdn.net/qq_51570094/article/details/124148671
#vi ~/.bashrc
#按i
#export CUDA_HOME=/usr/local/cuda-11.3
#按esc
#:wq
#source ~/.bashrc
- 报错6 并解决
File "/root/data/wkl/OpenPCDet/pcdet/datasets/argo2/argo2_utils/so3.py", line 19
(...,3,3) 3D rotation matrices.
"""
return C.quaternion_to_rotation_matrix(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
quat_wxyz, order=C.QuaternionCoeffOrder.WXYZ
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
)
#解决
pip uninstall kornia
pip install kornia==0.6.5
- 报错7 并解决
#'''报错: File "/root/data/anaconda3/envs/openpcdet/lib/python3.8/site-packages/spconv/pytorch/ops.py", line 156, in get_indice_pairs
num_act_out = SpconvOps.get_indice_pairs(alloc,
RuntimeError: /io/build/temp.linux-x86_64-cpython-38/spconv/build/core_cc/src/csrc/sparse/all/SpconvOps/SpconvOps_get_indice_pairs.cc(65)
not implemented for CPU ONLY build.'''
#解决
pip uninstall spconv
pip install spconv-cu113
- 报错8 undefined symbol:ZN3c104impl23ExcludeDispatchKeyGuardC1ENS 11DispatchKeyE
- 报错9 ‘EasyDict’ object has no attribute ‘BACKUP_DB_INFO’
#报错
''' File "/root/data/wkl/OpenPCDet/pcdet/datasets/dataset.py", line 31, in __init__
self.data_augmentor = DataAugmentor(
File "/root/data/wkl/OpenPCDet/pcdet/datasets/augmentor/data_augmentor.py", line 24, in __init__
cur_augmentor = getattr(self, cur_cfg.NAME)(config=cur_cfg)
File "/root/data/wkl/OpenPCDet/pcdet/datasets/augmentor/data_augmentor.py", line 40, in gt_sampling
db_sampler = database_sampler.DataBaseSampler(
File "/root/data/wkl/OpenPCDet/pcdet/datasets/augmentor/database_sampler.py", line 35, in __init__
sampler_cfg.DB_INFO_PATH[0] = sampler_cfg.BACKUP_DB_INFO['DB_INFO_PATH']
AttributeError: 'EasyDict' object has no attribute 'BACKUP_DB_INFO' '''
#解决
cd tools
#(openpcdet) root@f8f4cdac2a2a:~/data/wkl/openpcdet_self/tools# python train.py --cfg_file /root/data/wkl/openpcdet_self/tools/cfgs/custom_models/pv_rcnn.yaml --batch_size=1 --epochs=30
- 报错10
RuntimeError: mat1 and mat2 shapes cannot be multiplied (8192x416 and 544x128)'''
#暂时未解决 应该是custom_dataset.yaml里面的POINT_CLOUD_RANGE和VOXEL_SIZE的设置不对产生的问题
- 报错11 name ‘iou3d_nms_cuda’ from ‘pcdet.ops.iou3d_nms’
#报错
''' File "/root/data/wkl/openpcdet_self/tools/../pcdet/ops/iou3d_nms/iou3d_nms_utils.py", line 9, in <module>
from . import iou3d_nms_cuda
ImportError: cannot import name 'iou3d_nms_cuda' from 'pcdet.ops.iou3d_nms' (/root/data/wkl/openpcdet_self/tools/../pcdet/ops/iou3d_nms/__init__.py)'''
#解决
python setup.py develop
- 报错12
''' RuntimeError: CUDA error: device-side assert triggered
Compile with~TORCH USE CUDA DSA to enable device-side assertions. '''
这个问题网上搜了我也以为是tensor等很复杂的网络结构的问题
结果是版本问题 当时我的版本是2.2.1+cu121(版本太高),和别人一样的代码却跑不出来(能跑成的环境为python3.9 1.10.0+cu113)
没办法只能重新配环境
openpcdet)root@f8f4cdac2a2a:~/data/wkl/0penPcDet/tools# python
Python 3.8.18(default,sep 112023,13:40:15)GCC 11.2.0::Anaconda,Inc.on linuxType "help","copyright","credits" or "license" for more information.
>>>import torch
>>>print(torch.__version__)
>>>2.2.1+cu121
>>>exit()
conda install -n open python=3.9
conda install pytorch=1.10.0 torchvision=0.11.1 torchaudio=0.10.0 cudatoolkit=11.3 -c pytorch
#记得把里面的torch>1.0删掉
pip install -r requirements.txt
python
>>>import torch
>>>print(torch.__version__) #这里显示为1.10.0了
>>>exit()
#然后就解决了