DeepStream 部署 RTSP + scaled-yolov4 (tensorrtx)

2023-05-16

DeepStream应用程序将深度神经网络和其他复杂的处理任务引入到流处理管道中,以实现对视频和其他传感器数据的近实时分析。从这些传感器中提取有意义的见解为提高运营效率和安全性创造了机会。例如,摄像头是当前使用最多的物联网传感器。在我们的家中,街道上,停车场,大型购物中心,仓库,工厂中都可以找到相机–无处不在。视频分析的潜在用途是巨大的:访问控制,防止丢失,自动结帐,监视,安全,自动检查(QA),包裹分类(智能物流),交通控制/工程,工业自动化等。

DeepStream

在这里插入图片描述
在这里插入图片描述

DeepStream Graph Architecture

在这里插入图片描述

Achieving Higher Accuracy & Real-Time Performance Using DeepStream

在这里插入图片描述


安装Deepstream

  1. 这部分参考网上教程,一步一步安装就行。
  2. 安装成功,可以运行samples里得程序,测试下是否安装成功,这里就不多介绍。

在这里插入图片描述

生成TRT模型(.engine文件)

  1. 网上大多数是基于 trtexec 来生成 .engine 文件,这里选择基于tensorrtx来生成 .engine 文件。参考: https://github.com/wang-xinyu/tensorrtx/tree/master/scaled-yolov4

    1. generate yolov4_csp.wts from pytorch implementation with yolov4-csp.cfg and yolov4-csp.weights.
      git clone https://github.com/wang-xinyu/tensorrtx.git
      git clone -b yolov4-csp https://github.com/WongKinYiu/ScaledYOLOv4.git
      // download yolov4-csp.weights from https://github.com/WongKinYiu/ScaledYOLOv4/tree/yolov4-csp#yolov4-csp
      cp {tensorrtx}/scaled-yolov4/gen_wts.py {ScaledYOLOv4/}
      cd {ScaledYOLOv4/}
      python gen_wts.py yolov4-csp.weights
      // a file 'yolov4_csp.wts' will be generated.
      
    2. put yolov4_csp.wts into {tensorrtx}/scaled-yolov4, build and run
      mv yolov4_csp.wts {tensorrtx}/scaled-yolov4/
      cd {tensorrtx}/scaled-yolov4
      mkdir build
      cd build
      cmake ..
      make
      sudo ./yolov4csp -s                          // serialize model to plan file i.e. 'yolov4csp.engine'
      sudo ./yolov4csp -d ../../yolov3-spp/samples // deserialize plan file and run inference, the images in samples will be processed.
      

部署 Deepstream_rtsp

  1. 基于Deepstream实现RTSP访问。 参考: https://github.com/tosonw/deepstream-test1-app_rtsp
  2. 修改 deepstream_test1_app_demo_rtsp.c 。 在nvosd上增加一个探头,测试下识别是否正确。修改部分如下。
#ifdef PLATFORM_TEGRA
    if (!gst_element_link_many(rtppay, parse, decoder, NULL))
    {
        printf("\nFailed to link elements 0.\n");
        return -1;
    }
    if (!gst_element_link_many(streammux, pgie, nvvidconv, nvosd, transform, sink, NULL))
    {
        printf("\nFailed to link elements 2.\n");
        return -1;
    }
#else
    if (!gst_element_link_many(rtppay, parse, decoder, sink, NULL))
    {
        printf("\nFailed to link elements.\n");
        return -1;
    }
#endif

#ifdef PLATFORM_TEGRA  
	// 这里增加一个探头 参考 deepstream-test1中代码
    osd_sink_pad = gst_element_get_static_pad(nvosd, "sink");
    if (!osd_sink_pad)
        g_print("Unable to get sink pad\n");
    else
        gst_pad_add_probe(osd_sink_pad, GST_PAD_PROBE_TYPE_BUFFER,
                          osd_sink_pad_buffer_probe, NULL, NULL);
    gst_object_unref(osd_sink_pad);
#endif 
static GstPadProbeReturn
osd_sink_pad_buffer_probe (GstPad * pad, GstPadProbeInfo * info,
    gpointer u_data)
{
    GstBuffer *buf = (GstBuffer *) info->data;
    guint num_rects = 0; 
    NvDsObjectMeta *obj_meta = NULL;
    guint vehicle_count = 0;
    guint person_count = 0;
    NvDsMetaList * l_frame = NULL;
    NvDsMetaList * l_obj = NULL;
    NvDsDisplayMeta *display_meta = NULL;

    NvDsBatchMeta *batch_meta = gst_buffer_get_nvds_batch_meta (buf);

    for (l_frame = batch_meta->frame_meta_list; l_frame != NULL;
      l_frame = l_frame->next) {
        NvDsFrameMeta *frame_meta = (NvDsFrameMeta *) (l_frame->data);
        int offset = 0;
        for (l_obj = frame_meta->obj_meta_list; l_obj != NULL;
                l_obj = l_obj->next) {
            obj_meta = (NvDsObjectMeta *) (l_obj->data);
            if (obj_meta->class_id == PGIE_CLASS_ID_VEHICLE) {
                vehicle_count++;
                num_rects++;
            }
            if (obj_meta->class_id == PGIE_CLASS_ID_PERSON) {
                person_count++;
                num_rects++;
            }
        }
        display_meta = nvds_acquire_display_meta_from_pool(batch_meta);
        NvOSD_TextParams *txt_params  = &display_meta->text_params[0];
        display_meta->num_labels = 1;
        txt_params->display_text = g_malloc0 (MAX_DISPLAY_LEN);
        offset = snprintf(txt_params->display_text, MAX_DISPLAY_LEN, "Person = %d ", person_count);
        offset = snprintf(txt_params->display_text + offset , MAX_DISPLAY_LEN, "Vehicle = %d ", vehicle_count);

        /* Now set the offsets where the string should appear */
        txt_params->x_offset = 10;
        txt_params->y_offset = 12;

        /* Font , font-color and font-size */
        txt_params->font_params.font_name = "Serif";
        txt_params->font_params.font_size = 10;
        txt_params->font_params.font_color.red = 1.0;
        txt_params->font_params.font_color.green = 1.0;
        txt_params->font_params.font_color.blue = 1.0;
        txt_params->font_params.font_color.alpha = 1.0;

        /* Text background color */
        txt_params->set_bg_clr = 1;
        txt_params->text_bg_clr.red = 0.0;
        txt_params->text_bg_clr.green = 0.0;
        txt_params->text_bg_clr.blue = 0.0;
        txt_params->text_bg_clr.alpha = 1.0;

        nvds_add_display_meta_to_frame(frame_meta, display_meta);
    }

    g_print ("Frame Number = %d Number of objects = %d "
            "Vehicle Count = %d Person Count = %d\n",
            frame_number, num_rects, vehicle_count, person_count);
    frame_number++;
    return GST_PAD_PROBE_OK;
}
  1. 测试
    1. mkdir build & cd build & make
    2. ./deepstream_test1_app_demo_rtsp_ (拷贝 deepstream-test1中 dstest1_pgie_config.txt )
    3. 成功运行后,会看到画面中的识别效果。 下面开始集成我们自己的yolov4模型。

部署 Yolov4 模型

  1. git clone https://github.com/NVIDIA-AI-IOT/yolov4_deepstream
  2. cd yolov4_deepstream/
  3. 修改 nvdsparsebbox_Yolo.cpp (修改按照tensorrtx方式去转换bbox)
#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstring>
#include <fstream>
#include <iostream>
#include <unordered_map>
#include <map>
#include "nvdsinfer_custom_impl.h"

#define BBOX_CONF_THRESH 0.5
#define NMS_THRESH 0.4

static constexpr int LOCATIONS = 4;
struct alignas(float) Detection {
	//x y w h
	float bbox[LOCATIONS];
	float det_confidence;
	float class_id;
	float class_confidence;
};

static const int NUM_CLASSES_YOLO = 1;
static const int MAX_OUTPUT_BBOX_COUNT = 1000;
static const int DETECTION_SIZE = sizeof(Detection) / sizeof(float);

bool cmp(const Detection& a, const Detection& b) {
	return a.det_confidence > b.det_confidence;
}

float clamp(const float val, const float minVal, const float maxVal) {
	assert(minVal <= maxVal);
	return std::min(maxVal, std::max(minVal, val));
}
extern "C" bool NvDsInferParseYoloV4(
	std::vector<NvDsInferLayerInfo> const& outputLayersInfo,
	NvDsInferNetworkInfo const& networkInfo,
	NvDsInferParseDetectionParams const& detectionParams,
	std::vector<NvDsInferParseObjectInfo>&objectList);

static void convertBBoxYoloV4(const Detection& detect, const uint& netW, const uint& netH, NvDsInferParseObjectInfo& b) {
	const float* bbox = detect.bbox;
	float xCenter = bbox[0];
	float yCenter = bbox[1];
	float w = bbox[2];
	float h = bbox[3];
	float x0 = xCenter - w * 0.5;
	float y0 = yCenter - h * 0.5;
	float x1 = x0 + w;
	float y1 = y0 + h;
	x0 = clamp(x0, 0, netW);
	y0 = clamp(y0, 0, netH);
	x1 = clamp(x1, 0, netW);
	y1 = clamp(y1, 0, netH);
	b.left = x0;
	b.width = clamp(x1 - x0, 0, netW);
	b.top = y0;
	b.height = clamp(y1 - y0, 0, netH);
}

static void
decodeYoloV4Tensor(std::vector<Detection>& probs, const uint& netW, const uint& netH, std::vector<NvDsInferParseObjectInfo>& objInfos)
{
	for (uint i = 0; i < probs.size(); ++i)
	{
		NvDsInferParseObjectInfo obj;
		convertBBoxYoloV4(probs[i], netW, netH, obj);
		if (obj.width < 1 || obj.height < 1) return;
		obj.detectionConfidence = probs[i].det_confidence;
		obj.classId = probs[i].class_id;
		objInfos.push_back(obj);
	}
}

extern "C"  bool NvDsInferParseYoloV4(
	std::vector<NvDsInferLayerInfo> const& outputLayersInfo,
	NvDsInferNetworkInfo const& networkInfo,
	NvDsInferParseDetectionParams const& detectionParams,
	std::vector<NvDsInferParseObjectInfo>&objectList)
{
	const NvDsInferLayerInfo& layer = outputLayersInfo[0];
	std::vector<Detection> res;
	std::map<float, std::vector<Detection>> m;
	float* output = (float*)layer.buffer;
	for (int i = 0; i < output[0] && i < MAX_OUTPUT_BBOX_COUNT; i++) {
		if (output[1 + DETECTION_SIZE * i + 4] <= BBOX_CONF_THRESH) continue;
		Detection det;
		memcpy(&det, &output[1 + DETECTION_SIZE * i], DETECTION_SIZE * sizeof(float));
		res.push_back(det);
	}
	decodeYoloV4Tensor(res, networkInfo.width, networkInfo.height, objectList);
	return true;
}

static NvDsInferParseObjectInfo convertBBox(const float& bx, const float& by, const float& bw,
	const float& bh, const int& stride, const uint& netW,
	const uint& netH)
{
	NvDsInferParseObjectInfo b;
	// Restore coordinates to network input resolution
	float xCenter = bx * stride;
	float yCenter = by * stride;
	float x0 = xCenter - bw / 2;
	float y0 = yCenter - bh / 2;
	float x1 = x0 + bw;
	float y1 = y0 + bh;

	x0 = clamp(x0, 0, netW);
	y0 = clamp(y0, 0, netH);
	x1 = clamp(x1, 0, netW);
	y1 = clamp(y1, 0, netH);
	b.left = x0;
	b.width = clamp(x1 - x0, 0, netW);
	b.top = y0;
	b.height = clamp(y1 - y0, 0, netH);
	return b;
}

static void addBBoxProposal(const float bx, const float by, const float bw, const float bh,
	const uint stride, const uint& netW, const uint& netH, const int maxIndex,
	const float maxProb, std::vector<NvDsInferParseObjectInfo>& binfo)
{
	NvDsInferParseObjectInfo bbi = convertBBox(bx, by, bw, bh, stride, netW, netH);
	if (bbi.width < 1 || bbi.height < 1) return;
	bbi.detectionConfidence = maxProb;
	bbi.classId = maxIndex;
	binfo.push_back(bbi);
}
/* Check that the custom function has been defined correctly */
CHECK_CUSTOM_PARSE_FUNC_PROTOTYPE(NvDsInferParseYoloV4);
  1. make 编译,生成 libnvdsinfer_custom_impl_Yolo_plugins.so
  2. 修改 dstest1_pgie_config.txt
[property]
gpu-id=0
net-scale-factor=0.0039215697906911373
# yolov4
#0=RGB, 1=BGR
model-color-format=0
model-engine-file=yolov4-face.engine
labelfile-path=labels.txt
batch-size=1
## 0=FP32, 1=INT8, 2=FP16 mode
network-mode=2
num-detected-classes=1
gie-unique-id=1
network-type=0
is-classifier=0
## 0=Group Rectangles, 1=DBSCAN, 2=NMS, 3= DBSCAN+NMS Hybrid, 4 = None(No clustering)
cluster-mode=2
maintain-aspect-ratio=1
parse-bbox-func-name=NvDsInferParseYoloV4
custom-lib-path=nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo_plugins.so

[class-attrs-all]
nms-iou-threshold=0.6
pre-cluster-threshold=0.4
  1. 参数根据自己路径配置
    1. model-engine-file : trt模型路径
    2. num-detected-classes: 类别数
    3. parse-bbox-func-name: 对应我们实现的方法名 NvDsInferParseYoloV4
    4. custom-lib-path: 生成得动态库路径。 这里有个问题就是: 我们还需要链接 myplugins。但无论怎么配置,都无法链接多个动态库,上网查了一圈也没找到好的解决办法,有知道的大佬麻烦指导下,感谢。我的解决办法是将两个库合并成一个库。
  2. 重新编译,测试后发现,无法识别出结果。然后经过一番查找,参考这位大佬的方案: https://github.com/wang-xinyu/tensorrtx/issues/146 得到完美解决,抱拳。 修改内容如下
yololayer.cu
1.
CalDetection<<< (yolo.width*yolo.height*batchSize + mThreadCount - 1) / mThreadCount, mThreadCount>>> 
to:
CalDetection<<< (yolo.width*yolo.height*batchSize + mThreadCount - 1) / mThreadCount, mThreadCount, 0, stream>>>
2.
CUDA_CHECK(cudaMemset(output + idx*outputElem, 0, sizeof(float))); 
to:
CUDA_CHECK(cudaMemsetAsync(output + idx*outputElem, 0, sizeof(float))); 

mish.cu
1.
mish_kernel<<<grid_size, block_size>>>(inputs[0], output, input_size_ * batchSize);
to:
mish_kernel<<<grid_size, block_size, 0, stream>>>(inputs[0], output, input_size_ * batchSize);
  1. 编译生成 nvdsinfer_custom_impl_Yolo_plugins.so
  2. 运行 ./deepstream_test1_app_demo_rtsp_ (顺利的话,就可以正确的识别出结果了)
  3. 这里我使用的是: scaled-yolov4 模型,那么别的模型,以此类推应该都没什么问题。
  4. 最后想说下,为什么选择使用这个方式去实现。主要因为我个人感觉tensorrtx使用 trt c++ api方式去实现,效率上可能更优一些,而且也可以解决许多op不支持的问题,所以个人比较倾向使用tensorrtx. (个人想法)

END

  1. 以上就差不多就是实现的全部过程了,如果有不对的方法,欢迎大佬指正,感谢。
  2. 内容全部纯人工手动输出,感觉有用的小伙伴,给个好评,亲。

在这里插入图片描述


参考连接

  1. https://github.com/wang-xinyu/tensorrtx
  2. https://github.com/tosonw/deepstream-test1-app_rtsp
  3. https://blog.csdn.net/weixin_38369492/article/details/104859567
  4. https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_C_Sample_Apps.html
  5. https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_custom_YOLO.html
  6. https://blog.csdn.net/Tosonw/article/details/104154090
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

DeepStream 部署 RTSP + scaled-yolov4 (tensorrtx) 的相关文章

  • Nginx+FFmpeg实现rtsp流转hls流,在WEB通过H5 video实现视频播放

    概述 本文介绍通过Nginx FFmpeg实现rtsp流转hls流 在WEB通过H5 video标签实现视频播放功能 此方法可用于网络摄像头RTSP视频流WEB端实时播放 一 FFmpeg Nginx转流hls 1 FFmpeg安装 官网
  • [yolov4]yolov4.weights

    版本 https github com AlexeyAB darknet 权重链接 yolov4 weights https 72k us file 26468910 439532813 提取密码 446792 yolov4 conv 13
  • 海康硬盘录像机无法通过rtsp协议连接到EasyNVR的Web页面如何处理?

    RTSP协议视频平台EasyNVR有直播版和录像版 录像版可以直接进行录像存储和回放 但是很多用户由于没有回放需求 就会使用硬盘录像机作为视频存储设备 最近有用户反馈发现自己的海康硬盘录像机无法通过rtsp连接到EasyNVR的Web页面上
  • x264编码h264

    提示 文章写完后 目录可以自动生成 如何生成可参考右边的帮助文档 文章目录 前言 一 x264介绍 二 x264中主要的编码接口以及主要数据结构介绍 1 void x264 param default x264 param t 2 int
  • Yolox_s可视化网络结构图

    Yolox共有七种网络结构 包含2种轻量级网络 和5种标准网络 轻量级网络 1 Yolox Nano可视化网络结构图 点击查看 2 Yolox Tiniy可视化网络结构图 点击查看 标准网络 1 Yolox s可视化网络结构图 点击查看 2
  • yolov4训练自己的数据模型

    看了下yolov4的作者给的操作说明 链接如下 https github com AlexeyAB darknet how to compile on linux using make 有兴趣的可以去看看 总结起来 跟yolov3的操作方式
  • H5播放之Rtsp转Websocket点播录像抓拍

    H5播放之Rtsp转Websocket点播录像抓拍 HLS的延时 websocket播放 实现思路 广大网友们 很久没上CSDN了 暨上次RTSP转HLS文章发布以来 一直还有一个问题没有解决 如何避免HLS切片带来的不可避免的高延时 HL
  • 使用 libstreaming 在 rtsp 中发送多播音频以从 Android 设备进行上游传输

    该代码一次仅针对一名用户进行流式传输 任何人都可以帮助我同时在多个系统中播放流 将其转换为多播或广播 提前致谢 库源在这里 https github com fyhertz libstreaming 我当前的代码是 mSurfaceView
  • 在VLC播放器中播放RTSP流

    我正在尝试用java制作一个简单的rtsp流媒体服务器 服务器能够将视频正确地传输到自定义写入播放器 问题是我无法在 vlc 媒体播放器中播放相同的流 当我启动 vlc 媒体播放器并输入流媒体详细信息时 我的服务器显示 vlc 发出的以下请
  • 无法使用 Vitamio 进行直播

    我正在尝试使用Vitamio要运行 RTSP 视频流 我在更新 Vitamio sample 后使用它来运行流VideoViewDemo活动 public class VideoViewDemo extends Activity TODO
  • 如何在 Android 中使用 RTSP 链接直播视频?

    我尝试开发一个用于实时视频流的应用程序 它适用于某些链接 但其他一些链接不起作用 这是我的代码 Uri stream Uri parse rtsp 208 77 20 52 1935 dmm1 ten Intent videointent
  • RTSP RTP 客户端流、时间戳、live555

    我有一个位于不同国家 地区的网络摄像机 具有不同的时区 并且应用了它自己的日期时间值 例如 2012 04 16 11 30 00 然后是我的电脑所在的位置 例如我的电脑时间是 2012 14 16 06 10 00 我的目的 流式传输时
  • RTSP/RTMP 视频流客户端 iOS [关闭]

    Closed 此问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 help closed questions 目前不接受答案 我需要一个开源解决方案 库来将 RTSP RTMP 流式传输到 iOS 应用程序 我需要构建一个连接到媒
  • RTSP 身份验证:摘要问题

    我需要向流媒体服务器验证我的 RTSP 流 挑战如下 RTSP 1 0 401 Unauthorized WWW Authenticate Digest realm Streaming Server nonce 76bfe6986d3e76
  • rtmp和rtsp协议有什么区别?

    我只是想知道 rtsp 和 rtmp 协议之间有什么区别 如果我的服务器上有 mp3 并且我正在我的 Android 中使用 http 播放它 那么它们在工作中有何不同 在android中如果我想实现rtmp或rtsp 哪个是最好的 and
  • 使用 Node Media Server 将 IP cam 的 RTSP 重新流式传输到 http/ws 并以 html 形式显示

    Goal 我的目标是在标准 HTML 页面 html5 css3 vanilla javascript 无魔法 无插件 上显示 IP 摄像头的 RTSP 输出流 HTML 页面应托管在我的 Raspberry Pi 上的 NGINX Web
  • ffmpeg rtsp解码缓冲区太小

    我在 Android 上使用 ffmpeg 解码 rtsp 当图像快速更新或高分辨率时 我很快就会看到像素化 经过谷歌搜索 我发现它可能与UDP缓冲区大小有关 然后我在 ffmpeg libavformat udp c 中使用以下参数重新编
  • 如何将网络摄像头转为 rtsp

    我有一个产品 可以在输入 rtsp url 后分析视频 我想使用网络摄像头通过网络摄像头 rtsp 流式传输并提供我的产品 我怎样才能做到这一点 这取决于您使用的网络摄像头 大多数支持 RTSP 但许多不发布访问流的接口 因为它们设计为与网
  • 将 RTSP 流转换为 HTTP 并使用 VLC 客户端进行流传输

    我有一个通过 RTSP 提供流的 IP 摄像机 我可以使用以下 URL 在带有 VLC 播放器的 PC 上播放它 rtsp 192 168 1 52 554 user admin password channel 1 stream 0 sd
  • Android 4.0.4 MediaPlayer 使用 RTSP url 准备问题

    我正在开发的视频流应用程序遇到了一个奇怪的问题 实际的视频 音频流在我的所有测试设备上都运行良好 然而 在看似任何 4 0 的设备上 当使用 RTSP URL 时 prepare 会立即返回 这会导致在加载视频时向用户提供正确反馈的问题 并

随机推荐

  • Oracle 指定字段排序 Oracle自定义排序 Oracle特定字段排序

    Oracle 指定字段排序 Oracle自定义排序 Oracle特定字段排序 一 概述 在项目开发中 xff0c 遇到一个需求大致内容是 xff1a 某个位置的用户 xff0c 优先推荐当地服务 比如 xff1a 在某个城市 xff0c 优
  • Idea Jrebel 报错:Cannot reactivate, offline seat in use ...

    Idea Jrebel 报错 xff1a Cannot reactivate offline seat in use 一 问题描述 在使用idea Jrebel续期的时候 xff0c 修改idea激活服务器地址时 xff0c 遇到报错 xf
  • 阿里云DDNS+iKuai 软路由+证书安装

    一 获取aliyun AccessKey 首先在阿里云买好域名 然后进入控制台打开 AccessKey 进来后会有提醒 xff1a 云账号 AccessKey 是您访问阿里云 API 的密钥 xff0c 具有该账户完全的权限 xff0c 请
  • ffmpeg: 从视频里提取视频帧,并保存为图片文件

    用ffmpeg处理视频时 xff0c 有时需要从视频里提取某个时间的一帧视频数据 xff0c 这时需要用到ffmpeg的一个关键函数 xff0c av seek frame av seek frame原型如下 xff1a span clas
  • 手把手教你用Python分析微信聊天内容

    在开始之前 先简单说下我为何会写这篇文章 为了开发新客户 领导安排公司的客服们加入了很多的微信群 在群内收集目标客户的联系方式 然而她们收集客户信息的方式非常的原始 在微信群内翻看群聊记录 gt 寻找客户发出的电话号码 gt 复制 gt 打
  • ubuntu 环境变量

    一 设置环境变量三种方法 a 临时变量 直接在终端命令框输入 xff1a export PATH 61 PATH usr local arm gcc linaro 4 9 4 2017 01 x86 64 arm linux gnueabi
  • iOS 高德地图路线规划

    最近做了高德地图路线规划 xff0c 把自己不熟的点记录一下 xff1a 1 地图不显示当前位置精准圈 xff1a 设置mapview的 customizeUserLocationAccuracyCircleRepresentation 属
  • 1.点亮1个led程序分析(汇编)

    最终目标 点亮led灯 1 xff1a 通过原理图 xff0c 确定nLED 1的引脚关系 GPF4 2 xff1a 查看S3C2440手册 xff0c 找到控制GPF4引脚的方法 GPFCON 配置寄存器 GPFDAT 数据寄存器 3 x
  • 高效求List差集

    List求差集问题 xff0c 解决思路使用了List的结构特性 先上代码 xff0c 再分析 List list1 61 new LinkedList List list2 61 new LinkedList List list3 61
  • UIImageView 和 UIView的基础使用

    1 UIView 的基本属性 设置位置 UIView view 61 UIView alloc initWithFrame CGRectMake 100 100 100 100 self window addSubview view 设置背
  • MAMP PHP5.6、PHP7.4.20 …… 安装redis、mongodb等扩展

    一 下载php对应版本源码 xff1a https www php net releases 解压后放入 对应版本 下面 Application MAMP bin php php5 6 10 include php 二 下载扩展包 http
  • B-Code For 1 Codeforces 768【递归】 好题!

    题意 xff1a 起初 xff0c 序列中仅有数n if n 61 0 amp amp n 61 1 在原来的位置补充3个元素n 2 n 2 n 2 直至该序列用仅有0和1 现在问区间 l r 有多少个1 思路 xff1a 一开始想用vec
  • AtCoder褐名记

    今年四月份开始参加AtCoder比赛 xff0c 至今参加了9次 在第9次结束后 xff0c 涨了一级 xff0c 从最低级的灰名涨到倒数第二级的褐名 相对于我这样的新手而言 xff0c AtCoder比TopCoder和Codeforce
  • 基于FFmpeg H264 + G711A 音视频裸流合并 MP4文件 ( G711A 转 AAC)

    由于 FFmpeg 只支持H264 43 AAC的mp4封装格式的 xff0c 并不支持H264 43 G711的mp4封装格式 所以需要将G711a转码成AAC格式的 然后封装成mp4文件 xff0c 但网上有说 通过修改movenc c
  • YOLOV3 网络结构学习笔记

    注 xff1a 本文非原创 xff0c 文章内容都是引用以下文章中 xff0c 本文只是记录学习笔记 yolo系列之yolo v3 深度解析 木盏的博客 CSDN博客 yolo3 YOLO v3算法详解 Atlas 的博客 CSDN博客 y
  • 基于人脸特征点实现疲劳检测

    为了有效监测驾驶员是否疲劳驾驶 避免交通事故的发生 提出了一种利用人脸特征点进行实时疲劳驾驶检测的新方法 对驾驶员驾驶时的面部图像进行实时监控 首先检测人脸 并利用ERT算法定位人脸特征点 然后根据人脸眼睛区域的特征点坐标信息计算眼睛纵横比
  • 基于 HPSocket , 实现 socket 通讯

    HPSocket HP Socket 是一套通用的高性能 TCP UDP HTTP 通信框架 xff0c 包含服务端组件 客户端组件和 Agent 组件 xff0c 广泛适用于各种不同应用场景的 TCP UDP HTTP 通信系统 xff0
  • windows 基于 MediaPipe 实现 PoseTracking

    MediaPipe是用于构建跨平台多模态应用ML管道的框架 xff0c 其包括快速ML推理 xff0c 经典计算机视觉和媒体内容处理 xff08 如视频解码 xff09 在2019年6月举行的CVPR大会 xff0c MeidaPipe正式
  • windows 基于 MediaPipe 实现 HandTracking

    OverView 感知手的形状和运动的能力可能是改善跨各种技术领域和平台的用户体验的重要组成部分 例如 xff0c 它可以构成手语理解和手势控制的基础 xff0c 还可以在增强现实中将数字内容和信息叠加在物理世界之上 虽然对人们来说很自然
  • DeepStream 部署 RTSP + scaled-yolov4 (tensorrtx)

    DeepStream应用程序将深度神经网络和其他复杂的处理任务引入到流处理管道中 xff0c 以实现对视频和其他传感器数据的近实时分析 从这些传感器中提取有意义的见解为提高运营效率和安全性创造了机会 例如 xff0c 摄像头是当前使用最多的