Voxelnet: End-to-end learning for point cloud based 3d object detection 代码运行

论文介绍

论文地址:https://arxiv.org/abs/1711.06396

代码运行

代码地址:有多个版本

1.Implementation of VoxelNet: End-to-End Learning for Point Cloud Based 3D Object Detection in tensorflow 2.0.0.

based on a previous version from Qiangui

地址:

https://github.com/steph1793/Voxelnet.git

2.unofficial inplementation of VoxelNet: End-to-End Learning for Point Cloud Based 3D Object Detection in TensorFlow

地址:

GitHub - qianguih/voxelnet: This is an unofficial inplementation of VoxelNet in TensorFlow.

3.VoxelNet-tensorflow

地址:

GitHub - tsinghua-rll/VoxelNet-tensorflow: A 3D object detection system for autonomous driving.


我选择的版本:2

GitHub - qianguih/voxelnet: This is an unofficial inplementation of VoxelNet in TensorFlow.

在autodl上租用服务器配置环境:

我的环境是Ubuntu20.04+Python3.7

创建conda环境:

conda create -n voxelnet python=3.7
conda activate voxelnet

安装TensorFlow及其他依赖:

pip3 install tensorflow==1.14.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install easydict -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install scikit-build -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install opencv-python==3.4.3.18 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install llvmlite==0.32.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
python3 -m pip install --upgrade --force pip
pip3 install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install shapely -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install numba -i https://pypi.tuna.tsinghua.edu.cn/simple
pip3 install Cython -i https://pypi.tuna.tsinghua.edu.cn/simple

编译Cython模块

python3 setup.py build_ext --inplace

报错:

无法打开包括文件: “numpy/arrayobject.h”: No such file or directory

解决:

参考博客http://t.csdnimg.cn/abFlO

编译evaluation代码

cd kitti_eval
​​​​​​​g++ -o evaluate_object_3d_offline evaluate_object_3d_offline.cpp

遇到报错:

evaluate_object_3d_offline.cpp:12:10: fatal error: boost/numeric/ublas/matrix.hpp: No such file or directory

解决: 

sudo apt-get update
sudo apt-get install libboost-all-dev

给evaluation脚本赋予执行权限

chmod +x launch_test.sh

数据准备

数据文件夹组织

├── data
│   └── KITTI
│       ├── training
│       │   ├── calib
│       │   |── image_2
│       │   |── label_2
│       │   └── velodyne
│       ├── validation
│       │   ├── calib
│       │   |── image_2
│       │   |── label_2
│       │   └── velodyne
│       └── data_object_calib
│           ├── testing
│           │   └── calib
│           └── training
│               └── calib

数据下载参考博客:代码复现:voxelnet_tensorflow版本(3D-detection)_github代码复现过程-CSDN博客

修改数据路径

修改config.py中以下两行:

__C.DATA_DIR = './data/KITTI'
__C.CALIB_DIR = './data/KITTI/data_object_calib/training/calib'

修改程序

test.py,使用官方提供的一个车辆模型进行测试,并把可视化打开

if __name__ == '__main__':
    parser = argparse.ArgumentParser(description='testing')

    parser.add_argument('-n', '--tag', type=str, nargs='?', default='pre_trained_car',
                        help='set log tag')
    parser.add_argument('--output-path', type=str, nargs='?',
                        default='./predictions', help='results output dir')
    parser.add_argument('-b', '--single-batch-size', type=int, nargs='?', default=2,
                        help='set batch size for each gpu')
    parser.add_argument('-v', '--vis', type=bool, nargs='?', default=True,
                        help='set the flag to True if dumping visualizations')

运行程序

python3 test.py

结果会保存在./predictions/vis下

评估效果

./kitti_eval/evaluate_object_3d_offline data/KITTI/validation/label_2 ./predictions

在predictions文件夹下保存评估结果

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

空_指针

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

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

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

打赏作者

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

抵扣说明:

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

余额充值