四类检测(交通)
四类检测(交通)1、视频检测2、实时检测2.1、USB摄像头2.2、CSI摄像头
四类检测是DeepStream自带的案例演示:对画面中的人、车、路标、自行车进行检测和计数。
教程只进行基础的演示,其它应用需要用户自行开发
1、视频检测
进入案例所在文件夹:
x cd /opt/nvidia/deepstream/deepstream-7.1/sources/apps/sample_apps/deepstream-test1
编译源码:参考同文件夹下的README
x sudo make CUDA_VER=12.6 # 出厂镜像编译过,无需用户编译
运行案例:参考同文件夹下的dstest1_config.yml
x ./deepstream-test1-app dstest1_config.yml 或者 ./deepstream-test1-app ../../../../samples/streams/sample_720p.h264

配置文件:dstest1_config.yml
x ################################################################################ # SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # SPDX-License-Identifier: LicenseRef-NvidiaProprietary # # NVIDIA CORPORATION, its affiliates and licensors retain all intellectual # property and proprietary rights in and to this material, related # documentation and any modifications thereto. Any use, reproduction, # disclosure or distribution of this material and related documentation # without an express license agreement from NVIDIA CORPORATION or # its affiliates is strictly prohibited. ################################################################################ source: location: ../../../../samples/streams/sample_720p.h264 streammux: batch-size: 1 batched-push-timeout: 40000 width: 1920 height: 1080 # Inference using nvinfer: primary-gie: plugin-type: 0 config-file-path: dstest1_pgie_config.yml ## Inference using nvinferserver: #primary-gie: # plugin-type: 1 # config-file-path: dstest1_pgie_nvinferserver_config.txt
2、实时检测
若多个摄像头,自行修改.txt配置文件:以下案例都是主板只接一个摄像头运行时的效果。
2.1、USB摄像头
x cd /opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app x deepstream-app -c source1_usb_dec_infer_resnet_int8.txt

2.2、CSI摄像头
x cd /opt/nvidia/deepstream/deepstream-7.1/samples/configs/deepstream-app x deepstream-app -c source1_csi_dec_infer_resnet_int8.txt
