DeepStream推理dewarped所有surfaces

server/2025/3/10 17:54:12/

原视频\opt\nvidia\deepstream\deepstream\samples\streams\sample_cam6.mp4如上图所示,是一个360度的球型视频,DeepStream的nvdewarper插件可以将原视频拆分成多个单独的视频,nvdewarper可以生成最大4个dewarped surfaces.

\opt\nvidia\deepstream\deepstream-7.1\sources\apps\sample_apps\deepstream-dewarper-test例子只是将nvdewarper拆分的视频进行显示,并没有做推理,pipeline是source->dewarper->nvstreammux->tiler->sink.

deepstream-app可以支持对nvdewarper拆分的视频进行推理,

source2_dewarper_test.yml内容如下:

####################################################################################################
# SPDX-FileCopyrightText: Copyright (c) 2024 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.
####################################################################################################application:enable-perf-measurement: 1perf-measurement-interval-sec: 5gie-kitti-output-dir: streamscltiled-display:enable: 1rows: 1columns: 2width: 1920height: 1080gpu-id: 0#(0): nvbuf-mem-default - Default memory allocated, specific to particular platform#(1): nvbuf-mem-cuda-pinned - Allocate Pinned/Host cuda memory applicable for Tesla#(2): nvbuf-mem-cuda-device - Allocate Device cuda memory applicable for Tesla#(3): nvbuf-mem-cuda-unified - Allocate Unified cuda memory applicable for Tesla#(4): nvbuf-mem-surface-array - Allocate Surface Array memory, applicable for Jetsonnvbuf-memory-type: 0source:csv-file-path: sources_2.csvsink0:enable: 1#Type - 1=FakeSink 2=EglSink 3=Filetype: 2sync: 1source-id: 0gpu-id: 0nvbuf-memory-type: 0sink1:enable: 1type: 3#1=mp4 2=mkvcontainer: 1#1=h264 2=h265codec: 1#encoder type 0=Hardware 1=Softwareenc-type: 0sync: 0#iframeinterval=10bitrate: 2000000#H264 Profile - 0=Baseline 2=Main 4=High#H265 Profile - 0=Main 1=Main10# set profile only for hw encoder, sw encoder selects profile based on sw-presetprofile: 0output-file: out.mp4source-id: 0# "num-surfaces-per-frame" in all dewarper configs should be same
# and should be equal to "num-surfaces-per-frame" in "streammux" config# following config is applicable to [source0]
dewarper0:enable: 1source-id: 6config-file: /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-dewarper-test/config_dewarper.txtgpu-id: 0nvbuf-memory-type: 0num-output-buffers: 4# following config is applicable to [source1]
dewarper1:enable: 1#Camera Idsource-id: 11config-file: /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-dewarper-test/config_dewarper.txtgpu-id: 0nvbuf-memory-type: 0num-output-buffers: 4num-batch-buffers: 4osd:enable: 1gpu-id: 0border-width: 1text-size: 15text-color: 1;1;1;1text-bg-color: 0.3;0.3;0.3;1font: Serifshow-clock: 0clock-x-offset: 800clock-y-offset: 820clock-text-size: 12clock-color: 1;0;0;0nvbuf-memory-type: 0display-mask: 1streammux:gpu-id: 0##Boolean property to inform muxer that sources are livebatch-size: 8##time out in usec, to wait after the first buffer is available##to push the batch even if the complete batch is not formedbatched-push-timeout: 33000## Set muxer output width and heightwidth: 960height: 752##Enable to maintain aspect ratio wrt source, and allow black borders, works##along with width, height propertiesenable-padding: 0nvbuf-memory-type: 0num-surfaces-per-frame: 4## If set to TRUE, system timestamp will be attached as ntp timestamp## If set to FALSE, ntp timestamp from rtspsrc, if available, will be attached# attach-sys-ts-as-ntp: 1primary-gie:enable: 1gpu-id: 0model-engine-file: ../../models/Primary_Detector/resnet18_trafficcamnet_pruned.onnx_b4_gpu0_int8.enginebatch-size: 4#Required by the app for OSD, not a plugin propertybbox-border-color0: 1;0;0;1bbox-border-color1: 0;1;1;1bbox-border-color2: 0;0;1;1bbox-border-color3: 0;1;0;1interval: 0gie-unique-id: 1nvbuf-memory-type: 0config-file: config_infer_primary.ymltests:file-loop: 0

sources_2.csv内容如下:

# SPDX-FileCopyrightText: Copyright (c) 2024 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.
enable,type,uri,num-sources,gpu-id,cudadec-memtype
1,3,file://../../streams/sample_cam6.mp4,1,0,0
1,3,file://../../streams/sample_cam6.mp4,1,0,0

命令如下:deepsteram-app -c source2_dewarper_test.yml

结果如下:

可以看到,源有两个,每个源可以分成4个单独的图像,nvinfer再对8个单独图像做推理,画面上都有bbox。


http://www.ppmy.cn/server/173988.html

相关文章

Android中的Loader机制

Android中的Loader机制是在Android 3.0版本之后引入的一种异步加载数据的方法。以下是对Android中Loader机制的详细解释: 一、Loader机制的基本概念 Loader是Android提供的一种异步加载数据的机制,它可以在后台线程中执行耗时操作,并在加载…

高效编程指南:PyCharm与DeepSeek的完美结合

DeepSeek接入Pycharm 前几天DeepSeek的充值窗口又悄悄的开放了,这也就意味着我们又可以丝滑的使用DeepSeek的API进行各种辅助性工作了。本文我们来聊聊如何在代码编辑器中使用DeepSeek自动生成代码。 注:本文适用于所有的JetBrains开发工具&#xff0c…

软件测试基础:功能测试知识总结

🍅 点击文末小卡片 ,免费获取软件测试全套资料,资料在手,涨薪更快 一、测试项目启动与研读需求文档 (一) 组建测试团队 1、测试团队中的角色 2、测试团队的基本责任 尽早地发现软件程序、系统或产品中…

【Go学习实战】03-2-博客查询及登录

【Go学习实战】03-2-博客查询及登录 读取数据库数据初始化数据库首页真实数据分类查询分类查询测试 文章查询文章查询测试 分类文章列表测试 登录功能登录页面登录接口获取json参数登录失败测试 md5加密jwt工具 登录成功测试 文章详情测试 读取数据库数据 因为我们之前的数据都…

React基础之React.memo

允许组件在props没有改变的情况下跳过渲染 React渲染的机制是:只要父组件重新渲染,子组件就会跟着重新渲染,如果子组件不需要进行重新更新,此时就会存在资源浪费 const xxxmemo( ) import { memo, useMemo, useReducer, useState …

PDFMathTranslate安装使用

PDF全文翻译!!!! PDFMathTranslate安装使用 它是个啥 PDFMathTranslate 可能是一个用于 PDF 文件的数学公式翻译 工具。它可能包含以下功能: 提取 PDF 内的数学公式 将数学公式转换成 LaTeX 代码 翻译数学公式的内…

DeepSeek-R1:引领AI领域革新,MLA技术助力模型迁移

摘要 DeepSeek的MLA技术实现了大型机器学习模型的轻松迁移,其突破性产品DeepSeek-R1凭借显著降低的训练和推理成本,吸引了业界广泛关注。MLA技术的核心在于创新性的低秩压缩键值缓存架构,使得推理成本大幅减少,仅为同等性能大型模…

vue2 插值语法中使用可选链运算符(.?)compile异常排查思路

[TOC](vue2 插值语法中使用可选链运算符(.?)compile异常排查思路) 前言 最近接到组内前端求助&#xff0c;在使用v-for进行动态渲染的时候项目突然不能正常编译了&#xff0c;报错提示SyntaxError: Unexpected token ...十分奇怪 代码可参考如下&#xff1a; <h3>动态…