Jetson 共用资料

汽车检测

2023-07-25 tuwei312

汽车检测

1.介绍

该项目包含背靠背检测器应用程序,以展示Deepstream SDK的功能。请按照apps/sample_apps/deepstream-app/README中的说明安装deepstream SDK、deepstream SDK本身和应用程序的必备组件。要是使用我们镜像可以跳过这一步。

2.下载模型

要下载第二个nvinfer的模型,请访问

https://github.com/NVIDIA-AI-IOT/redaction_with_deepstream

使用以下命令:

$ cd /opt/nvidia/deepstream/deepstream/samples/models
$ sudo mkdir Secondary_FaceDetect
$ cd Secondary_FaceDetect
$ sudo wget https://github.com/NVIDIA-AI-IOT/redaction_with_deepstream/raw/master/fd_lpd_model/fd_lpd.caffemodel
$ sudo wget https://raw.githubusercontent.com/NVIDIA-AI-IOT/redaction_with_deepstream/master/fd_lpd_model/fd_lpd.prototxt
$ sudo wget https://raw.githubusercontent.com/NVIDIA-AI-IOT/redaction_with_deepstream/master/fd_lpd_model/labels.txt

这里要是下载不了,可以到电脑上下载了再传到nano相对应的路径上。

背靠背检测器应用程序管道:

3.编译步骤和执行

首先是设置Makefile的文件里面的cuda_ver成我们自己的版本,之后就是运行程序

首先是到路径:

$ cd 
/opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream_reference_apps-master/back-to-back-detectors

之后运行

$ Set CUDA_VER in the MakeFile as per platform.
    For Jetson, CUDA_VER=10.2
    For x86, CUDA_VER=11.8
$ sudo make

$ ./back-to-back-detectors <h264_elementary_stream>
  Ex.: ./back-to-back-detectors ../../../../../samples/streams/sample_720p.h264

结果应该如下所示:

注意: 使用sudo运行上述命令。 将secondary_detector_config.txt中的路径编辑到从上述站点下载的模型的位置。

本文件应描述样品背靠背检测器的应用。此示例建立在deeptstream-test1示例的基础上,以演示如何在管道中添加多个背靠背检测器。“nvinfer”元素的两个实例依次添加到nvstreammux之后和显示组件之前的管道中。这两个“nvinfer”实例都有自己的配置文件。第一个“nvinfer”实例(人/车/自行车/路标)将始终充当主要检测器。


首页
产品
案例
联系