双目立体视觉(9)PyTorch & ZED 3D人体识别与追踪 (下)

 双目立体视觉(9)PyTorch & ZED 3D人体识别与追踪 (下)_第1张图片

项目地址:GitHub - stereolabs/zed-examples: ZED SDK Example projects

官方文档:Stereolabs Docs: API Reference, Tutorials, and Integration

How to Use PyTorch with ZED | Stereolabshttps://www.stereolabs.com/docs/pytorch/github项目地址:3D Mask R-CNN using the ZED and Pytorch

GitHub - stereolabs/zed-pytorch: 3D Object detection using the ZED and Pytorchhttps://github.com/stereolabs/zed-pytorch

3D Mask R-CNN using the ZED and Pytorch

The ZED SDK can be interfaced with Pytorch for adding 3D localization of custom objects detected with Mask-RCNN. In this Python 3 sample, we will show you how to detect, segmente, classify and locate objects in 3D space using the ZED stereo camera and Pytorch.


1. 环境配置

双目立体视觉(9)PyTorch & ZED 3D人体识别与追踪 (上)_Techblog of HaoWANG-CSDN博客项目地址:GitHub - stereolabs/zed-examples: ZED SDK Example projects官方文档:Stereolabs Docs: API Reference, Tutorials, and IntegrationHow to Use PyTorch with ZED | Stereolabshttps://www.stereolabs.com/docs/pytorch/github项目地址:3D Mask R-CNN using the ZED and ...https://haowang.blog.csdn.net/article/details/121227055    在安装torch和编译maskrcnn时,不同的环境配置会有异常或者报错,参考上一篇博客解决。


2. 测试验证

     从这个存储库下载示例代码。我们提供了一个简单的网络摄像机演示,演示了如何使用 maskrcnn 进行推理:

激活conda环境:

conda activate pytorch_env

 下载预训练模型,测试运行:

python zed_object_detection.py --config-file configs/caffe2/e2e_mask_rcnn_R_50_C4_1x_caffe2.yaml --min-image-size 256

 注意:显卡的显存不够时会报错

双目立体视觉(9)PyTorch & ZED 3D人体识别与追踪 (下)_第2张图片

 也开始使用其他版本:

# A SVO file can be loaded
python zed_object_detection.py --svo-filename path/to/svo_file.svo

# for best results, use min-image-size 800
python zed_object_detection.py --min-image-size 800

# or change the model that you want to use
python zed_object_detection.py --config-file configs/caffe2/e2e_mask_rcnn_R_101_FPN_1x_caffe2.yaml --min-image-size 300

# in order to see the probability heatmaps, pass --show-mask-heatmaps
python zed_object_detection.py --min-image-size 300 --show-mask-heatmaps

# for the keypoint demo
python zed_object_detection.py --config-file configs/caffe2/e2e_keypoint_rcnn_R_50_FPN_1x_caffe2.yaml --min-image-size 300

# can also run it on the CPU
python zed_object_detection.py --min-image-size 300 MODEL.DEVICE cpu

        模型会被自动下载,如果等待时间过长,请直接在命令行内右单击下载网址,手动下载并重命名与模型一致,且置于指定文件夹中,重新运行即可跳过自动下载步骤。

使用CPU版本效果展示:

 

你可能感兴趣的:(SLAM技术总结,pytorch,3d,人工智能,Mask,RCNN,ZED双目相机)