# KITTI Object data transformation and visualization
## Dataset
Download the data (calib, image\_2, label\_2, velodyne) from [Kitti Object Detection Dataset](http://www.cvlibs.net/datasets/kitti/eval_object.php?obj_benchmark=3d) and place it in your data folder at `kitti/object`
The folder structure is as following:
```
kitti
object
testing
calib
000000.txt
image_2
000000.png
label_2
000000.txt
velodyne
000000.bin
pred
000000.txt
training
calib
000000.txt
image_2
000000.png
label_2
000000.txt
velodyne
000000.bin
pred
000000.txt
```
## Install locally on a Ubuntu 16.04 PC with GUI
- start from a new conda enviornment:
```
(base)$ conda create -n kitti_vis python=3.7 # vtk does not support python 3.8
(base)$ conda activate kitti_vis
```
- opencv, pillow, scipy, matplotlib
```
(kitti_vis)$ pip install opencv-python pillow scipy matplotlib
```
- install mayavi from conda-forge, this installs vtk and pyqt5 automatically
```
(kitti_vis)$ conda install mayavi -c conda-forge
```
- test installation
```
(kitti_vis)$ python kitti_object.py --show_lidar_with_depth --img_fov --const_box --vis
```
**Note: the above installation has been tested not work on MacOS.**
## Install remotely
Please refer to the [jupyter](jupyter/) folder for installing on a remote server and visulizing in Jupyter Notebook.
## Visualization
1. 3D boxes on LiDar point cloud in volumetric mode
2. 2D and 3D boxes on Camera image
3. 2D boxes on LiDar Birdview
4. LiDar data on Camera image
```shell
$ python kitti_object.py --help
usage: kitti_object.py [-h] [-d N] [-i N] [-p] [-s] [-l N] [-e N] [-r N]
[--gen_depth] [--vis] [--depth] [--img_fov]
[--const_box] [--save_depth] [--pc_label]
[--show_lidar_on_image] [--show_lidar_with_depth]
[--show_image_with_boxes]
[--show_lidar_topview_with_boxes]
KIITI Object Visualization
optional arguments:
-h, --help show this help message and exit
-d N, --dir N input (default: data/object)
-i N, --ind N input (default: data/object)
-p, --pred show predict results
-s, --stat stat the w/h/l of point cloud in gt bbox
-l N, --lidar N velodyne dir (default: velodyne)
-e N, --depthdir N depth dir (default: depth)
-r N, --preddir N predicted boxes (default: pred)
--gen_depth generate depth
--vis show images
--depth load depth
--img_fov front view mapping
--const_box constraint box
--save_depth save depth into file
--pc_label 5-verctor lidar, pc with label
--show_lidar_on_image
project lidar on image
--show_lidar_with_depth
--show_lidar, depth is supported
--show_image_with_boxes
show lidar
--show_lidar_topview_with_boxes
show lidar topview
--split use training split or testing split (default: training)
```
```shell
$ python kitti_object.py
```
Specific your own folder,
```shell
$ python kitti_object.py -d /path/to/kitti/object
```
Show LiDAR only
```
$ python kitti_object.py --show_lidar_with_depth --img_fov --const_box --vis
```
Show LiDAR and image
```
$ python kitti_object.py --show_lidar_with_depth --img_fov --const_box --vis --show_image_with_boxes
```
Show LiDAR and image with specific index
```
$ python kitti_object.py --show_lidar_with_depth --img_fov --const_box --vis --show_image_with_boxes --ind 1
```
Show LiDAR with `modified LiDAR file` with an additional point cloud label/marker as the 5th dimention(5 vector: x, y, z, intensity, pc_label). (This option is for very specific case. If you don't have this type of data, don't use this option).
```
$ python kitti_object.py --show_lidar_with_depth --img_fov --const_box --vis --pc_label
```
## Demo
#### 2D, 3D boxes and LiDar data on Camera image
<img src="./imgs/rgb.png" alt="2D, 3D boxes LiDar data on Camera image" align="center" />
<img src="./imgs/lidar-label.png" alt="boxes with class label" align="center" />
Credit: @yuanzhenxun
#### LiDar birdview and point cloud (3D)
<img src="./imgs/lidar.png" alt="LiDar point cloud and birdview" align="center" />
## Show Predicted Results
Firstly, map KITTI official formated results into data directory
```
./map_pred.sh /path/to/results
```
```python
python kitti_object.py -p --vis
```
<img src="./imgs/pred.png" alt="Show Predicted Results" align="center" />
## Acknowlegement
Code is mainly from [f-pointnet](https://github.com/charlesq34/frustum-pointnets) and [MV3D](https://github.com/bostondiditeam/MV3D)
Clichong
- 粉丝: 1722
- 资源: 6
最新资源
- 博途S7-1200主站与S7-200从站实现RS485通讯程序 S7-200可以当作一个仪表
- C#、C++分别开发的OPC DA CLIENT软件. 1、枚举服务器名称; 2、连接服务器以后枚举出TAG; 3、根据TAG名称自动读取服务器数据; 4、图片内有OPC SERVER和CLIENT实
- python-workspace.zip.005
- 龙门上下料样本程序,四轴 用台达AS228T和台达触摸屏编写 注意软件是用台达新款软件ISPSOFT ,借鉴价值高,程序有注释
- 一款window下的串口监视抓包工具
- 欧姆龙CP1H与3台力士乐VFC-x610变频器通讯程序 功能:原创程序,可直接用于现场程序 欧姆龙CP1H的CIF11通讯板,实现对3台力士乐VFC-x610变频器 设定频率,控制正反转,读取实际
- dp111113333
- CV-密集人群图像数据集(5800张图片).rar
- 福特汽车主观评价规范,性能开发参考,英文原版直译,评价条目、规则描述非常细致 包含平顺舒适性,转向,操稳,NVH,制动,加速感,驾驶性等等性能,并详细描述了评价的准备工作 评价条目细分至第四级,共
- 三菱FX3S两轴标准程序,XZ两轴,包含轴点动,回零,相对与绝对定位,只要弄明白这个程序,就可以非常了解整个项目的程序如何去编写,从哪里开始下手,可提供程序问题解答,程序流程清晰明了,注释完整
- MATLAB代码:考虑P2G与碳捕集机组的多能微网低碳经济调度 关键词:碳交易 阶梯碳交易 碳捕集 多能微网 低碳调度 仿真平台:MATLAB+yalmip+cplex 主要内容:代码主要做的是一个
- 本程序采用matlab编写,主要是实现电流注入型牛拉法 除此之外,本人还编写了很多种关于潮流计算的程序,主要有牛拉法,前推回代法,以还有相和三相潮流计算程序
- 智能门锁架构图,供大家参考
- 三菱FX3U六轴标准程序,程序包含本体3轴控制,扩展3个1PG定位模块,一共六轴 程序有轴点动控制,回零控制,相对定位,绝对定位 另有气缸数个,一个大是DD马达控制的转盘,整个是转盘多工位流水作业
- 批量登录到远程Linux服务器检查服务器时间差的shell
- MATLAB电动车七自由度整车模型 MATLAB Simulink电动车转弯制动abs模型asr转弯制动防抱死abs模型+模糊控制算法+七自由度整车模型+纵向运动+侧向运动+横摆运动+四轮魔术公式+四
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0