ubuntu18.04安装OpenPCDet

  • 系统信息(cat /etc/os-release)
NAME="Ubuntu"
VERSION="18.04.5 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.5 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
  • 安装系统依赖
apt update
apt install build-essential openssl libssl-dev libboost-all-dev
  • 安装显卡驱动
sudo ./NVIDIA-Linux-x86_64-470.103.01.run --no-kernel-module # lxd容器内部需要加参数kernel-module,实际物理机器不需要加
  • 安装cuda
sudo sh ./cuda_10.1.168_418.67_linux.run
  • 安装cudnn
dpkg -i libcudnn7_7.6.5.32-1+cuda10.1_amd64.deb
dpkg -i libcudnn7-dev_7.6.5.32-1+cuda10.1_amd64.deb
  • 创建虚拟环境
conda create -n OpenPCDet python=3.6
conda activate OpenPCDet
  • 安装pytorch
wget http://download.pytorch.org/whl/cu101/torch-1.7.0%2Bcu101-cp36-cp36m-linux_x86_64.whl
pip install torch-1.7.0+cu101-cp36-cp36m-linux_x86_64.whl
  • 安装torchvision
wget http://download.pytorch.org/whl/cu101/torchvision-0.8.1%2Bcu101-cp36-cp36m-linux_x86_64.whl
pip install torchvision-0.8.1+cu101-cp36-cp36m-linux_x86_64.whl 
  • 检查gpu是否可用
python -c 'import torch; print(torch.cuda.is_available())'
  • 安装cmake(>=3.13)
tar -xvzf cmake-3.22.3.tar.gz
cd cmake-3.22.3
./configure
make -j 8
make install
  • 安装spconv(安装完后spconv不能删除)
git clone  https://github.com/traveller59/spconv.git   --recursive
cd spconv
git -branch <v1.2.1>
cd third_party
rm rf cutlass mp11 pybind11
git clone git://github.com/NVIDIA/cutlass.git
git clone git://github.com/boostorg/mp11.git
git clone git://github.com/pybind/pybind11.git
cd spconv
python setup.py bdist_wheel
cd dist
pip install spconv-1.2.1-cp36-cp36m-linux_x86_64.whl
  • 安装OpenPCDet
git clone https://github.com/open-mmlab/OpenPCDet.git
pip install -r requirements.txt
python setup.py develop
  • 安装open3d
pip install open3d pcl transforms3d
  • demo
python demo.py --cfg_file cfgs/kitti_models/pv_rcnn.yaml --ckpt pv_rcnn_8369.pth --data_path ${POINT_CLOUD_DATA}
  • Dataset Preparation
python -m pcdet.datasets.kitti.kitti_dataset create_kitti_infos tools/cfgs/dataset_configs/kitti_dataset.yaml
python pcdet/datasets/pandaset/pandaset_dataset.py  create_pandaset_infos tools/cfgs/dataset_configs/pandaset_dataset.yaml
  • Training
python test.py --cfg_file ${CONFIG_FILE} --batch_size ${BATCH_SIZE} --ckpt ${CKPT}
  • Testing
python test.py --cfg_file ${CONFIG_FILE} --batch_size ${BATCH_SIZE} --eval_all
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

Janloinge

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

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

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

打赏作者

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

抵扣说明:

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

余额充值