我通过velodyne在. bin文件中生成了几个点云,并希望以视频或动画的形式查看各种点云。
My files 000000.bin to 007480.bin are from a route with a LIDAR turned on until the end of the path and they are all in a directory called ../velodyne/ and I'm running a Deep learning model called OpenPCDet and it's time to run the demo.py with the following command:
python demo.py --cfg_file cfgs/kitti_models/pointrcnn.yaml --ckpt ../OpenPCDet/stev_models/pointrcnn_7870.pth --data_path ../OpenPCDet/data/ kitti/training/velodyne/ enter image description here the result I have is that it opens an image through the Open3D visualizer but I have to keep clicking Q (quit) or ESC to close the window and the code read the next image. My goal is to run demo.py and it will read all the .bin files at once and do the detection with OpenPCDet model treined.
https://github.com/open-mmlab/OpenPCDet/blob/master/tools/demo.py
我已经安装了你需要的一切,现在我必须运行它,如果它是一个视频已经检测到我训练的对象...
1条答案
按热度按时间nukf8bse1#
您可以修改demo.py脚本来实现这一点。Mayavi能够将图像保存为特定文件夹中的.png-s。在绘图下插入以下内容:
因为它被插入到
for idx, data_dict in enumerate(demo_dataset)
的循环中,所以它将遍历所有bin。在这之后,您可以使用另一个脚本将导出的图像连接到视频中。如下所示:https://stackoverflow.com/a/44948030/16495145请注意,如果您对将云“转换”为png-s感到满意,这将非常有效。