deepstream

皮煜
2023-12-01

比较好的英文文档:
https://docs.nvidia.com/metropolis/deepstream/5.0DP/plugin-manual/index.html#page/DeepStream%20Plugins%20Development%20Guide/deepstream_plugin_introduction.html#

1、从本质上来说DeepStream是NVIDIA基于GStreamer的插件系统开发的,自然也继承了GStreamer的特性。NVIDIA将自家的技术,如:TensorRT, cuDNN,CUDA, Video SDK等以插件的形式集成进GStreamer当中。DeepStream SDK features hardware-accelerated building blocks, called plugins that bring deep neural networks and other complex processing tasks into a stream processing pipeline.
2、Gst-nvstreammux
The muxer uses a round-robin algorithm to collect frames from the sources. It tries to collect an average of (batch-size/num-source) frames per batch from each source (if all sources are live and their frame rates are all the same). The number varies for each source, though, depending on the sources’ frame rates.
The muxer attaches an NvDsBatchMeta metadata structure to the output batched buffer.
3、Tiler插件(nvmultistreamtiler)将此批次合成为单个2D帧。 DeepStream OSD插件(nvosd)使用生成的元数据在合成帧上绘制阴影框,矩形和文本
4、docker
https://ngc.nvidia.com/catalog/containers/nvidia:deepstream
5、插件
https://docs.nvidia.com/metropolis/deepstream/dev-
guide/text/DS_plugin_gst-nvstreammux.html#gst-properties

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/accelerated_gstreamer.html#

6、开发者资料
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/hardware_acceleration_in_webrtc.html

7、CMakeList.txt

cmake_minimum_required(VERSION 3.0)
project(deep)

find_package(PkgConfig REQUIRED)
pkg_search_module(GST REQUIRED gstreamer-1.0)

include_directories(${GST_INCLUDE_DIRS})
//deepstream用到的头文件在这里
include_directories(/opt/nvidia/deepstream/deepstream-5.0/sources/includes)

add_executable(mytest deepstream-test1-app.c)

target_include_directories(mytest PRIVATE ${GST_INCLUDE_DIRS})
//deepstream用到的库都在/opt/nvidia/deepstream/deepstream-5.0/lib/,但是要根据不同的用途,引用不同的库
target_link_libraries(mytest ${GST_LIBRARIES} /opt/nvidia/deepstream/deepstream-5.0/lib/libnvdsgst_meta.so /opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_meta.so)

8、官网实例
https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_C_Sample_Apps.html
9、数据类型
https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_plugin_metadata.html
https://zhuanlan.zhihu.com/p/359079725

10、输入的是264编码后的文件,先parse,然后解码。
11、流数据可以通过RTSP或本地文件系统通过网络传输,也可以直接从摄像机传输。流是使用CPU捕获的。一旦帧进入内存,它们就被发送到使用NVDEC加速器进行解码。
12、SDK的文件夹分析
https://www.freesion.com/article/6602736829/
13、nvosd是用于在图像上画框,如果要显示,后面还要加显示的插件。
14、Gst-nvmsgconv:将DeepStream完整模式所支持打对象检测、分析模块、事件、位置和传感器详细语义等任何有获取对象的信息,传输到消息代理(message broker)去。
Gst-nvmsgbroker:此使用指定的通信协议向服务器发送有效负载消息。
NVmsgconv和nvmsgbroker插件允许感知图通过消息缓存连接到分析服务器或云。它接收输入元数据并创建通过此支持的协议发送的消息。
由于带宽限制,将数TB的视频数据传输到云可能是不可行的。因此,您需要一种分析边缘像素的解决方案,并仅将重要元数据传输到云或分析服务器以获得进一步的见解。右边是智能城市的解决方案,它可以实现边缘感知,而且只需要元数据到云端,DeepStream及其消息代理插件,提供从边缘设备无缝连接到云的能力。
NVIDIA意识到连接到云服务对于IOT应用程序来说非常重要。
15、一些gstreamer的例子
https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/accelerated_gstreamer.html#wwpID0E0LR0HA

相关阅读

相关文章

相关问答