当前位置:网站首页>[3D Detection Series-PointRCNN] Reproduces the PointRCNN code, and realizes the visualization of PointRCNN3D target detection, including the download link of pre-training weights (starting from 0 and
[3D Detection Series-PointRCNN] Reproduces the PointRCNN code, and realizes the visualization of PointRCNN3D target detection, including the download link of pre-training weights (starting from 0 and
2022-07-30 04:45:00 【Callme_TeacherPi℡】
[3D检测系列-PointRCNN] 复现PointRCNN代码
(1)Use the dataset format provided by the official website
(3)Displays with a specific index LiDAR 和图像
(4)显示带有modified LiDAR fileAppend point cloud labels/标记的 LiDAR 作为第 5 维
Attach the environment configuration first:
Ubuntu18.04
python3.6
pytorch 1.8.0 torchvision 0.9.0 cuda 11.1
(These few are in no hurry to dress up,后面有教程) mayavi 4.7.1 vkt 8.2.0 traits 6.2.0 traitsui 7.2.1 PyQt5 5.15.2
1.下载代码
https://github.com/sshaoshuai/PointRCNN
Pytorch版本的代码、直接进github下载,This step should not require much explanation.
If you can't download it, you can open a terminal directly,输入一下代码
git clone https://github.com/sshaoshuai/PointRCNN
!!!!注意 !!!!
!!!The code is incomplete after downloading!!!
不然会报以下错误:No moudle named 'iou3d_cuda'
pointnet2_libOpen is empty,这个时候需要在githubOpen this folder separately,Download what's inside,Then put it in the local code folder.Then you also need to run the following code to install some tools:
sh build_and_install.sh
错误1:
error: command 'gcc' failed with exit status 1
解决方法:进入一下目录:~/pointnet2_lib/pointnet2/src/ ----->将文件中所有cpp文件的的THCState_getCurrensStream(state) 全部改为 c10::cuda::getCurrentCUDAStream()
错误2:
解决方法:进入一下目录:~/lib/utils/roipool3d/src/roipool3d.cpp ----->将文件中的AT_CHECK 改为 TORCH_CHECK
2.准备数据集
(1)Use the dataset format provided by the official website
首先需要下载KITTI数据集,If you are on the official website, you don't have to try it because you can't download it at all.There is a big guy who uploaded it directly in Baidu cloud disk and everyone can download it in him.KITTI数据集下载(百度云)(It is not easy for the author to give others a thumbs up and support!!)
Then the data set structure of the official website is as follows:
Maybe some idiots don't understand(I'll try my best to explain it to you guys,可自行跳过),You can refer to mine below:
(2)使用软连接
because of runningPointRCNN之前,I ran firstPointPIllarsSo in order to avoid re-copying a copy,Soft connection can be used directly.将PointPillarsThe data set inside is directly connected here.
在PointRCNN的data/KITTI文件夹下:
ln -s (PointPillars数据集的路径) object
objectRepresents the name of the created folder,It's better to take that name,Otherwise, modify the code. And the path to the dataset is inclusivetraining和testing的根目录.然后就会生成一个object文件就OK了.
3.检测结果
Direct detection is possible using the author's pre-trained model,将模型放在tools下面,He can't download it from the Internet.我上传到CSDN了:----PointRCNN预训练权值-----
Next, start testing:
python eval_rcnn.py --cfg_file cfgs/default.yaml --ckpt PointRCNN.pth --batch_size 4 --eval_mode rcnn --set RPN.LOC_XZ_FINE false
错误1:
TypeError: load() missing 1 requered positional argument : ‘Loader’
解决方法:
pip install pyyaml==5.1
开始了!!!!Start waiting now!!
大约等10分钟后:
The detection results are placed under the following paths:
PointRCNN/output/rcnn/default/eval/epoch_no_number/val/final_result/
4.结果可视化
Clone visualizer:
git clone https://github.com/kuixu/kitti_object_vis.git
After cloningdataAlso in the file like above2.(2)Set up a soft connection as well.可以把他的objectAfter deleting it, do it again.Then some dependencies are required:(Remember to use mirroring, otherwise it will be slow!!!)
pip install opencv-python pillow scipy matplotlib pyside2
然后需要使用conda来安装mayavi,这个不能用pip我也不知道为什么....But it does work herepipBasically useless....不知道为什么
conda install mayavi
然后在kitti_object_vis文件中打开终端:
(1)仅显示 LiDAR
python kitti_object.py --show_lidar_with_depth --img_fov --const_box --vis
此时可能出现以下错误:
错误1:ModuleNotFoundError: No module named 'vtkIOParallelPython'
解决方法:
conda install jsoncpp=1.8.3
pip install pyface==7.3.0
Then continue our code to appear the interface:(大功告成!!)Press Enter once in the terminal to view the next image
Then there are several other different display methods below:(The specific can view the source codegithub kitti_object_vis)
(2)显示 LiDAR 和图像
python kitti_object.py --show_lidar_with_depth --img_fov --const_box --vis --show_image_with_boxes
(3)Displays with a specific index LiDAR 和图像
python kitti_object.py --show_lidar_with_depth --img_fov --const_box --vis --show_image_with_boxes --ind 1
(4)显示带有modified LiDAR file
Append point cloud labels/标记的 LiDAR 作为第 5 维
python kitti_object.py --show_lidar_with_depth --img_fov --const_box --vis --pc_label
自己写的所以有点复杂,但是至少能完成嘿嘿.如果各位有优化欢迎评论区讨论!!
大功告成!编写不易,大家成功后点个关注or赞谢谢~~
边栏推荐
- 2.4 hill sorting
- A must see for software testers!Database knowledge MySQL query statement Daquan
- How to use labelme
- C# One Week Introductory "C# - Classes and Objects" Day Six
- [Redis Master Cultivation Road] Jedis - the basic use of Jedis
- Perspective transformation matrix of image perspective correction should be matrix (single)/findHomography with getPerspectiveTransformd difference
- js operation to add or subtract from the current date (day, week, month, year)
- Discourse Custom Header Links
- String Problem (Part 1)
- Boss Rush (two-point answer + DP)
猜你喜欢
webService interface
Machine Learning: Knowing the Dimensionality Reduction Process Through Low Variance Filtering
【软件工程之美 - 专栏笔记】31 | 软件测试要为产品质量负责吗?
handler+message [message mechanism]
Seven, custom configuration
软件测试员必看!数据库知识mysql查询语句大全
Unity3D Application simulation enters the front and background and pauses
MySQL String Concatenation - Various String Concatenation Practical Cases
Web page element parsing a tag
MYSQL unique constraint
随机推荐
双指针问题(下)
小程序使用npm包定制全局样式
LeetCode Algorithm 328. 奇偶链表
四、Web开发
五、视图解析与模板引擎
Xiamen SenseCore Technology MC3172(1): Introduction and Environment Construction
Introduction to Thymeleaf
DAY17: weak password detection and test
The Double Pointer Problem (Part 2)
三、依赖配置管理
Seven, custom configuration
Notes on "The Law of Construction"---Chapter 10 Typical Users and Scenarios
Get the local IP and Request's IP
BGP的简单实验
Become a qualified cybersecurity, do you know this?
Learning of redis_Basic part
Alibaba Cloud's EasyNLP Chinese text image generation model takes you to become an artist in seconds
DAY17:弱口令的探测与测试
Excellent MySQL interview questions, 99% must ask in preparation for August!I can't pass the interview
The Azure developer news 丨 memorabilia in July