loitering detection

研究徘徊检测算法已经有段时间了,是时候亮剑了。

认识

徘徊检测

定义(文献二):所谓徘徊就是运动人体在一个地方停留超过一段时间或者运动轨迹出现异常(在一个地方来回反复的走)。

徘徊检测首先要利用混合高斯模型和背景差法来提取运动目标,得到运动物体的最小外接矩形轮廓,然后画出运动目标的运动轨迹,当目标出现徘徊行为时,自动产生报警信号。

 

过程(文献一):

徘徊检测(与跟踪)算法实现的是以下过程:首先要检测出监控场景内出现的运动目标,然后对检测出的运动目标进行行为分析,当目标出现徘徊行为时,则自动产生报警信号,并且在显示器上实施目标跟踪。由于徘徊行为发生的准确判定是一个极其复杂的过程,所以我们展开这方面的工作,最终提出了一条徘徊判定标准,包括以下三个方面:

判定标准

1.目标在防区内移动的总距离

判定依据很简单:根据监控视频图像的大小,设定出目标允许在防区内移动的总距离,然后把目标在每帧图像中移动的路程加起来,当这个累加值超过预设值时就判定满足徘徊条件。

 

2.目标通过防区所用的时间

3.目标在当前帧位置与第一次进入防区位置间的距离变化情况(即位移)

 

在这几个判定标准的基础上,利用背景差分检测运动目标,但是,这个算法有个致命的弱点,就是只能检测出动态的目标,而对于静止的目标则无法检测与跟踪,为了有效解决这一问题,本文采取实时船体背景差分方法提取的目标轮廓信息到Cameshift算法中,在判定目标静止后,采用Camshift算法继续跟踪目标,最终实现了徘徊目标自动检测与跟踪报警。

 

文献一里,主要是基于视频序列的徘徊检测跟踪算法的分析与实现,主要工作为:

第一:设计了一种基于静态场景下的背景差分和Camshift相结合的目标检测和跟踪方法。这种算法可以解决目标静止后跟踪丢失的问题。另外,在深入剖析徘徊行为特点的基础上提出了一条徘徊判定理论,并通过了大量实验的验证。

第二:在PC终端,完成了基于C语言和opencv库的徘徊检测跟踪算法的设计与实现。

第三:基于嵌入式技术和DVS6446(ARM+DSP)平台的相关知识,成功移植了徘徊检测与跟踪算法。

其流程图如下:

 

 

个人认为,上述几点表述上相对严密了,但是具体实现起来稍显复杂。因此,我这里主要推荐文献二的方法,基于运动轨迹的徘徊行为检测,直观明了,实现容易,而且准确率比较高。

 

基于运动轨迹路程的判定方法

运动目标的轨迹是以人体目标的最小外接矩形框的中心坐标生成的,这里规定矩形框的中心为运动目标的质心。外接矩形的宽度、高度表示人体目标的宽度、高度。通过目标的运动轨迹,可以计算出运动目标的位移(即目标在当前帧的位置与第一次进入画面的位置间的距离)及目标在监控画面内移动的总路程。

位移和路程的区别在于,位移是一个有向线段,其大小是两点之间的直线长度,而路程是一点到另一点之间经过的总的距离之和(线段长度)。由于运动目标在每个相邻帧间运动的距离很小,所以不必每帧都计算位移和总路程。在实际应用里,首先在视频序列中提取运动目标的质心在每一帧中的位置坐标,然后采取每隔几帧的方法计算出运动目标的位移和移动的总路程。

 

应用场景

基于计算机识别技术,AI徘徊检测能配合现场摄像头,自动识别监控点下同一人物进出次数,对多次进出徘徊人员实时检测预警,填补人为管控死角,加强安全管控。

一般在银行、珠宝店、公园等地方,若出现人员连续在一个地方来回进出多次,AI即可通过摄像头进行追踪统计,及时圈定可疑人员,重点关注,及时采取安全措施。

先看应用场景:

 

 

后记

除了以上两种方法,笔者使用了另一种更加精准的方法:检测+跟踪+判定。

其中检测基于YOLOV3,跟踪基于KF Tracker算法,判定基于上述方法二自己实现。目前效果非常不错。由于项目暂未公开,抱歉不能开源代码。

效果展示:

 

 

 

 

 

参考文献:

1.基于视频序列的徘徊检测跟踪算法的分析与实现

2.基于运动轨迹的徘徊行为检测

  • 2
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
Behavior recognition is a field of research that focuses on developing algorithms and methods to automatically identify and classify human behaviors from various sources of data, such as video, audio, and physiological signals. The goal of behavior recognition is to develop systems that can accurately and efficiently recognize and analyze human behavior in real-world settings. There are several approaches used to recognize human behavior, including rule-based, feature-based, and machine learning-based approaches. Rule-based approaches involve designing rules that describe the characteristics of a behavior, such as its temporal and spatial patterns. Feature-based approaches involve extracting features from the data that are relevant to the behavior, such as motion or sound features. Machine learning-based approaches involve training models on labeled data to learn patterns and classify behaviors. Behavior recognition has many applications, including in security and surveillance, healthcare, and human-computer interaction. In security and surveillance, behavior recognition can be used to identify suspicious behavior, such as loitering or aggressive behavior, and alert security personnel. In healthcare, behavior recognition can be used to monitor patients and detect changes in behavior that may indicate a health problem. In human-computer interaction, behavior recognition can be used to develop more intuitive and responsive interfaces. Despite the progress made in behavior recognition, there are still many challenges to overcome. One challenge is the need for large amounts of labeled data to train machine learning models. Another challenge is the need to develop robust algorithms that can handle variations in behavior due to individual differences, environmental factors, and cultural norms. Overall, behavior recognition is a promising area of research with many potential applications. As the field continues to advance, we can expect to see new and innovative approaches to recognizing and analyzing human behavior in real-world settings.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值