0、前言
OpenPCDet项目之前我就复现过,一个很优秀的项目,这几天又需要用到这个项目,再次复现遇到了不少问题,特此记录复现的流程
1、环境准备
1.1、前置条件
以下是我安装的版本
- CUDA 11.3
- CUDNN 8.2.1
CUDA和CUDNN安装可以参考这篇文章https://blog.csdn.net/qq_50195602/article/details/130337805
1.2、其他环境总览
- python=3.8
- torch==1.11
- spconv-cu113
- cmake version 3.26.3
驱动版本
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 510.108.03 Driver Version: 510.108.03 CUDA Version: 11.6 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... Off | 00000000:01:00.0 Off | N/A |
| N/A 42C P8 N/A / N/A | 9MiB / 2048MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| 0 N/A N/A 980 G /usr/lib/xorg/Xorg 4MiB |
| 0 N/A N/A 1592 G /usr/lib/xorg/Xorg 4MiB |
+-----------------------------------------------------------------------------+
(open3) neo@neo:~/code/OpenPCDet/tools$ pip list
Package Version Editable project location
------------------------ ------------- -------------------------
addict 2.4.0
argcomplete 3.0.6
asttokens 2.2.1
attrs 23.1.0
av 10.0.0
av2 0.2.1
backcall 0.2.0
ccimport 0.4.2
certifi 2022.12.7
charset-normalizer 3.1.0
click 8.1.3
cmake 3.26.3
colorlog 6.7.0
comm 0.1.3
ConfigArgParse 1.5.3
contourpy 1.0.7
cumm-cu113 0.4.8
cycler 0.11.0
dash 2.9.3
dash-core-components 2.0.0
dash-html-components 2.0.0
dash-table 5.0.0
debugpy 1.6.7
decorator 5.1.1
distlib 0.3.6
easydict 1.10
executing 1.2.0
fastjsonschema 2.16.3
filelock 3.12.0
fire 0.5.0
Flask 2.2.3
fonttools 4.39.3
idna 3.4
imageio 2.27.0
importlib-metadata 6.6.0
importlib-resources 5.12.0
ipykernel 6.22.0
ipython 8.12.0
ipywidgets 8.0.6
itsdangerous 2.1.2
jedi 0.18.2
Jinja2 3.1.2
joblib 1.2.0
jsonschema 4.17.3
jupyter_client 8.2.0
jupyter_core 5.3.0
jupyterlab-widgets 3.0.7
kiwisolver 1.4.4
kornia 0.6.12
lark 1.1.5
lazy_loader 0.2
lit 16.0.1
llvmlite 0.39.1
markdown-it-py 2.2.0
MarkupSafe 2.1.2
matplotlib 3.7.1
matplotlib-inline 0.1.6
mdurl 0.1.2
mpmath 1.3.0
nbformat 5.7.0
nest-asyncio 1.5.6
networkx 3.1
ninja 1.11.1
nox 2023.4.22
numba 0.56.4
numpy 1.23.5
nvidia-cublas-cu11 11.10.3.66
nvidia-cuda-cupti-cu11 11.7.101
nvidia-cuda-nvrtc-cu11 11.7.99
nvidia-cuda-runtime-cu11 11.7.99
nvidia-cudnn-cu11 8.5.0.96
nvidia-cufft-cu11 10.9.0.58
nvidia-curand-cu11 10.2.10.91
nvidia-cusolver-cu11 11.4.0.1
nvidia-cusparse-cu11 11.7.4.91
nvidia-nccl-cu11 2.14.3
nvidia-nvtx-cu11 11.7.91
open3d 0.17.0
opencv-python 4.7.0.72
packaging 23.1
pandas 2.0.0
parso 0.8.3
pccm 0.4.6
pcdet 0.6.0+4d8624f /home/neo/code/OpenPCDet
pexpect 4.8.0
pickleshare 0.7.5
Pillow 9.5.0
pip 23.0.1
pkgutil_resolve_name 1.3.10
platformdirs 3.2.0
plotly 5.14.1
portalocker 2.7.0
prompt-toolkit 3.0.38
protobuf 3.20.3
psutil 5.9.5
ptyprocess 0.7.0
pure-eval 0.2.2
pyarrow 11.0.0
pybind11 2.10.4
Pygments 2.15.1
pyparsing 3.0.9
pyproj 3.5.0
pyquaternion 0.9.9
pyrsistent 0.19.3
python-dateutil 2.8.2
pytz 2023.3
PyWavelets 1.4.1
PyYAML 6.0
pyzmq 25.0.2
requests 2.28.2
rich 13.3.4
scikit-image 0.20.0
scikit-learn 1.2.2
scipy 1.9.1
setuptools 66.0.0
SharedArray 3.2.2
six 1.16.0
spconv-cu113 2.3.6
stack-data 0.6.2
sympy 1.11.1
tenacity 8.2.2
tensorboardX 2.6
termcolor 2.2.0
threadpoolctl 3.1.0
tifffile 2023.4.12
torch 2.0.0
torchvision 0.15.1
tornado 6.3.1
tqdm 4.65.0
traitlets 5.9.0
triton 2.0.0
typing_extensions 4.5.0
tzdata 2023.3
urllib3 1.26.15
virtualenv 20.22.0
wcwidth 0.2.6
Werkzeug 2.2.3
wheel 0.38.4
widgetsnbextension 4.0.7
zipp 3.15.0
2、详细步骤
2.1、创建conda环境
conda create -n open python=3.8
conda activate open
2.2、安装包(除了torch)
pip install -r requirements.txt
2.3、安装torch
pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113
2.4、安装稀疏卷积库
pip install spconv-cu113
2.5、安装cmake及一些其他的包
#cmake安装
pip install cmake
#可视化工具
pip install open3d
#其他的包
pip install av2
pip install kornia
2.6 编译项目
python setup.py develop
查看是否安装成功
2.7、运行demo
cd tools
python demo.py --cfg_file cfgs/kitti_models/pv_rcnn.yaml --ckpt ckpts/kitti/pv_rcnn_8369.pth --data_path /home/neo/data/kitti/vel/000000.bin
2.8、报错处理
undefined symbol: _ZN3c104impl23ExcludeDispatchKeyGuardC1ENS_11DispatchKeyE
网上很多人说是torch版本不匹配的问题,但是我的版本是匹配的,仔细分析报错发现可嫩是编译过程出错,所以我重新配置conda环境并重新编译(python setup.py develop就是编译),问题就解决了。
注意重新编译需要删除build文件
rm -r build
至此复现结束,如果有什么问题可以在评论区一起交流
标签:OpenPCDet,记录,python,cu113,复现,install,nvidia,pip,cu11 From: https://www.cnblogs.com/mrneojeep/p/17390375.html