OpenPCDet配置安装记录

一、前言

OpenPCDet是一套基于PyTorch实现的点云3D目标检测代码库
本次实验主要的介绍和参考:https://zhuanlan.zhihu.com/p/152120636
https://blog.csdn.net/W1995S/article/details/114597797
https://blog.csdn.net/QLeelq/article/details/120994231
https://github.com/traveller59/spconv
https://github.com/open-mmlab/OpenPCDet/blob/master/docs/INSTALL.md
https://blog.csdn.net/weixin_42905141/article/details/124515876#t11
本机环境:1.ubuntu20
2.cuda11.1
3.3060ti
4.pytorch==1.9.0+cu111

二、安装spconv

spconv:空间稀疏卷积库
github的链接:https://github.com/traveller59/spconv
根据自己的配置来安装
在这里插入图片描述
输入指令:

nvcc -V

查看cuda版本选择对应版本安装
在这里插入图片描述
测试是否安装成功

python3
import spconv

不报错就是安装成功
在这里插入图片描述

三、安装openPCDet

1.下载源码

git clone https://github.com/open-mmlab/OpenPCDet.git

2.安装

cd OpenPCDet
pip install -r requirements.txt
python3 setup.py develop

遇到的问题
问题1

ERROR: numba 0.55.1 has requirement numpy<1.22,>=1.18, but you'll have numpy 1.22.2 which is incompatible.

原因是numpy版本不匹配。
解决方法:

sudo pip uninstall numpy
pip install -r requirements.txt

问题2
输入:python3 setup.py develop时

Traceback (most recent call last):
  File "setup.py", line 8, in <module>
    from torch.utils.cpp_extension import BuildExtension, CUDAExtension
ModuleNotFoundError: No module named 'torch'

解决方法:

python3 setup.py develop --user

3.验证

python3
import pcdet

没报错就可以
在这里插入图片描述

四、安装open3d

pip3 install open3d
速度慢的话用国内镜像
pip3 install open3d -i https://pypi.tuna.tsinghua.edu.cn/simple

五、下载kitti的3D数据集

1.下载数据集
下载链接:http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d
在这里插入图片描述
参考:https://blog.csdn.net/weixin_42905141/article/details/124515876#t11
这位大兄弟分享了百度云。

2.解压并排序
下载好数据集后,解压压缩包,会出现training和testing文件夹,将每一个压缩包解压后的文件夹置于data/kittit文件夹下。在这里插入图片描述
在这里插入图片描述

3.测试
前面因为没有bin的雷达数据,现在有数据了,测试一下。
在tools文件夹下,摆放如下文件
在这里插入图片描述
修改demo.py文件中

def parse_config():
    parser = argparse.ArgumentParser(description='arg parser')
    parser.add_argument('--cfg_file', type=str, default='cfgs/kitti_models/pv_rcnn.yaml',
                        help='specify the config for demo')
    parser.add_argument('--data_path', type=str, default='000000.bin',
                        help='specify the point cloud data file or directory')
    parser.add_argument('--ckpt', type=str, default='pv_rcnn_8369.pth', help='specify the pretrained model')
    parser.add_argument('--ext', type=str, default='.bin', help='specify the extension of your point cloud data file')

    args = parser.parse_args()

运行代码效果
在这里插入图片描述
遇到的问题:
ImportError: numpy.core.multiarray failed to import
解决方法:
参考:https://github.com/open-mmlab/OpenPCDet/issues/867
主要是版本对应问题,我使用别人的版本对应还是出现问题了,后面继续补充安装SharedArray后解决问题。

  • 1
    点赞
  • 20
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 10
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 10
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小俊俊的博客

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值