Movatterモバイル変換


[0]ホーム

URL:


CN109101888B - A kind of tourist flow monitoring and early warning method - Google Patents

A kind of tourist flow monitoring and early warning method
Download PDF

Info

Publication number
CN109101888B
CN109101888BCN201810763293.7ACN201810763293ACN109101888BCN 109101888 BCN109101888 BCN 109101888BCN 201810763293 ACN201810763293 ACN 201810763293ACN 109101888 BCN109101888 BCN 109101888B
Authority
CN
China
Prior art keywords
model
gaussian
value
pixel value
distribution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810763293.7A
Other languages
Chinese (zh)
Other versions
CN109101888A (en
Inventor
刘璎瑛
丁绍刚
赵维铎
许凯
屈鹏程
周源赣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Agricultural University
Original Assignee
Nanjing Agricultural University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Agricultural UniversityfiledCriticalNanjing Agricultural University
Priority to CN201810763293.7ApriorityCriticalpatent/CN109101888B/en
Publication of CN109101888ApublicationCriticalpatent/CN109101888A/en
Application grantedgrantedCritical
Publication of CN109101888BpublicationCriticalpatent/CN109101888B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

The invention discloses a visitor flow monitoring and early warning method, which relates to the field of intelligent tourism and can count the resident quantity of visitors in real time and complement the information about the resident quantity in safety early warning information in scenic spots. The invention comprises the following steps: acquiring video images of scenic spots with dense pedestrian flow by using a camera; homogenizing videos collected under different illumination by adopting an illumination compensation method, and extracting a tourist target based on a Gaussian mixture model; judging the high-density people stream, setting threshold values of all scenic spots according to the area ratio of segmentation pixels of the tourist images in the ROI, judging the high-density people stream when the threshold values are exceeded, tracking the residence time of the high-density people stream, and starting a high-density tourist output program to monitor the people flow when the threshold values are exceeded; the passenger volume calculation adopts a person head detection technology based on a deep learning network, so that the front, side and back head characteristics of a person can be accurately identified, and the accurate detection of high-density people flow can be realized. And if the numerical value exceeds a preset threshold value, giving out early warning.

Description

Translated fromChinese
一种游客人流量监控预警方法A kind of tourist flow monitoring and early warning method

技术领域technical field

本发明涉及智能旅游领域,尤其涉及一种游客人流量监控预警方法。The invention relates to the field of intelligent tourism, in particular to a method for monitoring and early warning of the flow of tourists.

背景技术Background technique

随着国人生活水平的提高和旅游业的发展,景区内游客的数量增长迅速。尤其是国家法定假日著名景区内都是游客爆满,使游客游览的舒适度下降,也带来了游览的安全隐患。目前景区中游客流的统计有以下几种方法:一是基于票务系统进行客流统计,该技术适合在封闭景区中,要求持有特定的介质,统计的区域范围有限,开阔式景区不适合。二是基于视频监控系统,通过人脸识别技术进行人员识别,从而进一步实现流动游客数量的统计。该技术受天气、光线影响严重,在雨天、大雾、黑夜等自然条件下影响游客数量统计的准确性。三是通过移动互联网技术,利用手机信令数据,收集手机实时位置信息,准确掌握景区旅客数量、位置分布、来源地分布等信息,可以对人群实时、动态的进行监测和统计,需要移动通信网络的支持,涉及到用户的隐私,在实际应用中有很大的限制。这些技术各有优劣,但实现的是景区内游客数量的统计,在游客驻留量监控方面还没有相关研究。驻留量指在某个景点停留一定时间的游客数量,驻留量可以反映该景点的游客吸引度及游客在此景点停留的时长,与传统意义的游客流量监控不同。景区人流量拥堵的主要原因是短时间内大量游客涌入并且长时间驻留,如果只是实时统计游客量来进行游客游览安全预警,会造成预警机制不够全面和准确。With the improvement of people's living standards and the development of tourism, the number of tourists in the scenic area has grown rapidly. In particular, the famous scenic spots on national statutory holidays are full of tourists, which reduces the comfort of tourists and brings hidden safety hazards. At present, there are several methods for the statistics of tourist flow in scenic spots: First, the passenger flow statistics are based on the ticketing system. This technology is suitable for closed scenic spots and requires a specific medium. The statistical area is limited, and it is not suitable for open scenic spots. Second, based on the video surveillance system, people are identified through face recognition technology, so as to further realize the statistics of the number of floating tourists. The technology is seriously affected by weather and light, which affects the accuracy of the number of tourists in natural conditions such as rain, fog, and darkness. The third is to use mobile Internet technology and mobile phone signaling data to collect real-time location information of mobile phones, accurately grasp the number of tourists in scenic spots, location distribution, source distribution and other information, and can monitor and count the crowd in real time and dynamically, which requires a mobile communication network. , which involves user privacy and has great limitations in practical applications. These technologies have their own advantages and disadvantages, but what is achieved is the statistics of the number of tourists in the scenic spot, and there is no relevant research on the monitoring of the number of tourists. The resident volume refers to the number of tourists who stay in a certain scenic spot for a certain period of time. The resident volume can reflect the tourist attraction of the scenic spot and the length of time tourists stay in the scenic spot, which is different from the traditional monitoring of tourist flow. The main reason for the traffic congestion in the scenic spot is the influx of tourists in a short period of time and the long-term stay. If only real-time statistics of the number of tourists are used for tourist safety warning, the early warning mechanism will not be comprehensive and accurate.

因此,现有技术中缺乏一种针对游客驻留量的统计方法,能够实时统计游客的驻留量,补足景区内安全预警信息中关于驻留量的信息。Therefore, the prior art lacks a statistical method for the resident amount of tourists, which can count the resident amount of tourists in real time and supplement the information about the resident amount in the security warning information in the scenic spot.

发明内容SUMMARY OF THE INVENTION

本发明提供一种游客人流量监控预警方法,能够将深度学习技术应用于高密度人流量检测,提出了基于迁移学习的人头模型检测方法,实施监控景区内游客的驻留量,实现了景区高密度人流量的准确检测及预警。The present invention provides a monitoring and early warning method for tourist flow, which can apply deep learning technology to high-density human flow detection, and proposes a head model detection method based on migration learning, which monitors the number of tourists in the scenic spot and realizes high-density scenic spot detection. Accurate detection and early warning of dense human flow.

为达到上述目的,本发明采用如下技术方案:To achieve the above object, the present invention adopts the following technical solutions:

一种游客人流量监控预警方法,采用一种游客人流量监控预警系统运行。一种游客人流量监控预警系统包括:摄像头、网络硬盘录像机、监控主机和报警盒,摄像头连接网络硬盘录像机,网络硬盘录像机连接监控主机,监控主机连接报警盒,监控主机在发现故障时触发报警盒报警。A visitor flow monitoring and early warning method adopts a tourist flow monitoring and early warning system to operate. A visitor flow monitoring and early warning system comprises: a camera, a network hard disk video recorder, a monitoring host and an alarm box, the camera is connected to the network hard disk recorder, the network hard disk video recorder is connected to the monitoring host, the monitoring host is connected to an alarm box, and the monitoring host triggers the alarm box when a fault is found Call the police.

一种游客人流量监控预警方法,包括:A method for monitoring and early warning of visitor flow, comprising:

S1、采集各景点摄像头一天内的摄像视频,对摄像视频采用基于光照补偿的高斯模型检测算法进行前景提取,得到前景输出。S1. Collect the camera video of each scenic spot camera within one day, and use a Gaussian model detection algorithm based on illumination compensation to extract the foreground of the camera video to obtain the foreground output.

S2、在ROI(Region of interest,感兴趣区域)区域内对前景输出进行面积比计算,根据景点人流密度阈值进行高密度人群跟踪,在到达预定时间时,输出高密度人群图片。其中,在摄像视频第一帧图像中开始选取ROI作为待监测的区域范围,按照S1进行前景提取,对提取的前景输出进行连通域标记,获取前景帧中最大连通域,即前景团块面积;将当前帧中前景团块面积除以框选的驻点区域面积,判断比值是否大于预警值,对超出预警值的团块面积进行跟踪,在预设时间内比值均大于预警值,系统给出高密度人群判定。S2. Calculate the area ratio of the foreground output in the ROI (Region of Interest) area, track high-density crowds according to the crowd density threshold of the scenic spot, and output high-density crowd pictures when the predetermined time is reached. Among them, the ROI is selected as the area to be monitored in the first frame image of the camera video, and the foreground is extracted according to S1, and the extracted foreground output is marked with a connected domain to obtain the largest connected domain in the foreground frame, that is, the foreground blob area; Divide the foreground clump area in the current frame by the area of the stagnant point area selected by the frame, determine whether the ratio is greater than the warning value, and track the clump area that exceeds the warning value. The ratio is greater than the warning value within the preset time, and the system gives High-density crowd determination.

S3、采用迁移学习技术,在深度学习网络上利用具有高密度人群的标注图片进行人头检测模型的训练,得到训练好的模型。模型训练是离线完成的,可将训练好的模型加载后进行在线的检测输出。基于深度学习的人头模型检测方法,人头检测模型采用残差网络模型结构,即加入了残差块的深层次卷积神经网络,该网络包含输入层、卷积层、池化层、全连接层、输出层五个部分。图片由输入层导入,在卷积层提取特征,在池化层中降维选择特征,通过全连接层链接有效特征在输出层实现人头检测。基于深度学习的检测算法很多,可根据实际需要进行选择,下面以R‐FCN算法为例进行人头模型训练检测的步骤介绍:S3. Using the transfer learning technology, the human head detection model is trained on the deep learning network by using the labeled pictures with high density of people, and the trained model is obtained. Model training is done offline, and the trained model can be loaded for online detection output. The human head model detection method based on deep learning, the human head detection model adopts a residual network model structure, that is, a deep convolutional neural network with residual blocks added. The network includes an input layer, a convolution layer, a pooling layer, and a fully connected layer. , five parts of the output layer. The image is imported from the input layer, the features are extracted in the convolution layer, the dimension reduction is selected in the pooling layer, and the effective features are linked through the fully connected layer to achieve head detection in the output layer. There are many detection algorithms based on deep learning, which can be selected according to actual needs. The following takes the R-FCN algorithm as an example to introduce the steps of human head model training and detection:

(1)利用开源标注工具Labeling实现对景区高密度人群图片的人头标注,输入标注好的人头图片,通过FCN(Fully-connection Network,全连通网络)全卷积神经网络生成图片的特征图;(1) Use the open source labeling tool Labeling to realize the human head labeling of high-density crowd pictures in scenic spots, input the labeled human head pictures, and generate the feature map of the picture through the FCN (Fully-connection Network, fully connected network) fully convolutional neural network;

(2)将计算出来的特征图输入RPN(Region Propsal Network,区域提取网络),进而生成ROIS(Region of Interest S为复数,多个感兴趣区域);然后将生成的ROIS输入对位置敏感的ROI池化层,给子网学习预测出目标区域;(2) Input the calculated feature map into RPN (Region Propsal Network, region extraction network), and then generate ROIS (Region of Interest S is a complex number, multiple regions of interest); then input the generated ROIS into a position-sensitive ROI The pooling layer predicts the target area for the subnet learning;

(3)ROI子网将FCN提取的特征与RPN输出的候选区域,将预测目标与标签目标之间的误差进行反向传播,计算训练的损失值,通过多次迭代使得损失值达到可能的最小值,以此来完成人头区域的分类和定位。(3) The ROI subnet uses the features extracted by the FCN and the candidate region output by the RPN, back-propagates the error between the prediction target and the label target, calculates the loss value of the training, and makes the loss value reach the smallest possible value through multiple iterations value, in order to complete the classification and localization of the head area.

(4)经过一定次数的训练,以总损失曲线图判断网络权重是否达到最优,得到能够判断人头和位置的检测模型。用训练得到的检测模型对选取的测试集图片进行人头检测,以准确率和误检率为标准进行模型的评判。(4) After a certain number of trainings, the total loss curve is used to judge whether the network weight is optimal, and a detection model that can judge the head and position is obtained. Use the detection model obtained by training to perform head detection on the selected test set pictures, and judge the model based on the accuracy rate and false detection rate.

S4、将输出的高密度人群图片输入训练好的模型,进行游客量检测,当人数超过阈值时,训练好的模型输出报警信号。前帧判断给出高密度人群驻留预警,开启游客人数统计算法。以训练好的人头模型检测算法进行高密度人流量的检测计数,人数超过预设值可进行人流量预警。S4. Input the output high-density crowd pictures into the trained model to detect the number of tourists. When the number of people exceeds the threshold, the trained model outputs an alarm signal. The judgment of the previous frame gives an early warning of the presence of high-density crowds, and starts the tourist number counting algorithm. The trained human head model detection algorithm is used to detect and count high-density human flow. If the number of people exceeds the preset value, the human flow warning can be carried out.

进一步的,在S1中,基于光照补偿的高斯模型检测算法包括:将摄像视频当前帧图像进行单通道亮度均衡化处理,利用亮度插值构造单通道全局差值矩阵,对三通道图像进行亮度增强处理,得到光照补偿后的视频;Further, in S1, the Gaussian model detection algorithm based on illumination compensation includes: performing single-channel brightness equalization processing on the current frame image of the camera video, constructing a single-channel global difference matrix by brightness interpolation, and performing brightness enhancement processing on the three-channel image. , get the video after illumination compensation;

对光照补偿后的视频利用混合高斯模型进行前景提取,采用形态学操作进行前景目标完整输出,得到前景输出。For the video after illumination compensation, the mixed Gaussian model is used to extract the foreground, and the morphological operation is used to complete the output of the foreground target, and the foreground output is obtained.

进一步的,混合高斯模型方法包括:Further, mixture Gaussian model methods include:

SS1、初始化混合高斯模型,计算时间段T内视频序列图像的每一个灰度像素的均值μ0和方差σ02,用μ0和方差σ02来初始化k个高斯模型的参数,k为正整数,μ0和σ02的计算公式如下SS1. Initialize the mixture Gaussian model, calculate the mean μ0 and variance σ02 of each gray pixel of the video sequence image in the time period T, and use μ0 and variance σ02 to initialize the parameters of k Gaussian models, k is For positive integers, the formulas for μ0 and σ02 are as follows

Figure BDA0001727520150000041
Figure BDA0001727520150000041

Figure BDA0001727520150000042
Figure BDA0001727520150000042

其中,It为新像素值,t的取值为1,2,…T;Among them, It is the new pixel value, and the value of t is 1, 2,...T;

SS2、将每个新像素值It同第k个高斯模型进行比较,直到找到匹配的像素值分布模型,匹配是指,新像素值It和第k个高斯模型的均值偏差在2.5σ内,比较采用的公式如下:SS2. Compare each new pixel value It with the kth Gaussian model until a matching pixel value distribution model is found. Matching means that the mean deviation between the new pixel value It and the kth Gaussian modelis within2.5σ , the comparison formula is as follows:

|Itk,t-1|≤2.5σk,t-1|Itk,t-1 |≤2.5σk,t-1

式中μk,t-1、σk,t-1分别为t-1时刻高斯模型的分布均值和方差;where μk,t-1 and σk,t-1 are the distribution mean and variance of the Gaussian model at time t-1, respectively;

SS3、若匹配的像素值分布模型符合背景所需要求,则匹配的像素值分布模型对应的像素标记为背景部分,否则标记为前景部分;SS3. If the matched pixel value distribution model meets the requirements of the background, the pixel corresponding to the matched pixel value distribution model is marked as the background part, otherwise it is marked as the foreground part;

SS4、若新像素值It与k个高斯模型中的一个或几个相匹配,说明新像素值It较为符合当前像素值的分布,需要适当增加权值,此时新像素值It的均值、方差、权值更新公式如下:SS4. If the new pixel value It matches one or more of thek Gaussian models, it means that the new pixel value Itis more in line with the distribution of the current pixel value, and the weight needs to be appropriately increased. At this time, the value of the new pixel valueIt is The mean, variance, and weight update formulas are as follows:

μk,t=(1-α)μk,t-1+αItμk,t =(1-α)μk,t-1 +αIt

Figure BDA0001727520150000051
Figure BDA0001727520150000051

ωk,t=(1-β)ωk,t-1+βθωk,t =(1-β)ωk,t-1 +βθ

其中,ωk,t为t时刻第k个高斯分布的权重,ωk,t-1为t-1时刻第k个高斯分分布的权重,μk,t,σk,t分别为t时刻第k个高斯分布的均值和方差,θ为匹配参数,当新像素值符合k个高斯分布时θ=1,不符合时θ=0;α为参数更新率,表示背景变换速度,β为学习率,当新像素值符合k个高斯分布时θ=1,不符合时θ=0;Among them, ωk,t is the weight of the kth Gaussian distribution at time t, ωk,t-1 is the weight of the kth Gaussian distribution at time t-1, μk,t , σk,t are the time t respectively The mean and variance of the kth Gaussian distribution, θ is the matching parameter, when the new pixel value conforms to the k Gaussian distribution, θ=1, when it does not conform to the k Gaussian distribution, θ=0; α is the parameter update rate, indicating the background transformation speed, β is the learning rate, θ=1 when the new pixel value conforms to k Gaussian distributions, and θ=0 when it does not;

SS5、若在SS2中,新像素值It没有任何高斯模型与之匹配,则权重最小的高斯分布模式被替换,即该模式的均值为当前像素值,标准差为初始较大值,权重为较小值;SS5 . If in SS2, the new pixel value It does not have any Gaussian model to match it, the Gaussian distribution pattern with the smallest weight is replaced, that is, the mean of the pattern is the current pixel value, the standard deviation is the initial larger value, and the weight is smaller value;

SS6、各高斯模型根据其对应的ωk,t的值从大到小排序,权重大、标准差小的高斯模型排列靠前,得到高斯模型的序列;SS6. Each Gaussian model is sorted from large to small according to its corresponding value of ωk, t , and the Gaussian models with large weights and small standard deviations are arranged in the front, and the sequence of Gaussian models is obtained;

SS7、将序列前b个高斯分布模型标记为背景B,B满足下式,参数T表示背景所占比,为设定阈值,T的取值范围为,0.5≤T≤1,b为正整数SS7. Mark the first b Gaussian distribution models of the sequence as background B, B satisfies the following formula, the parameter T represents the proportion of the background, which is the set threshold, the value range of T is, 0.5≤T≤1, b is a positive integer

Figure BDA0001727520150000061
Figure BDA0001727520150000061

本发明的有益效果是:The beneficial effects of the present invention are:

园林景区场景复杂,桥、廊、亭、厅,假山、平台、洞门等场所使视频背景多样,在高密度复杂场景下,极小人脸、大量人脸遮挡和人头后脑勺等情况,使现有技术中的检测算法准确度不高,本发明对目前的人脸检测技术进行改进,从检测对象着手,将人脸检测范围扩大至整个人头。利用基于深度学习的人头检测模型,通过神经网络对大量数据集进行学习,基于深度学习的人头检测模型可提升目标的多角度和遮挡下的检测能力,算法适应能力极大提高,提升了目标检测算法在个体检测上的表现和性能,从而实时监控景区内游客的驻留量,实现了景区高密度人流量的准确检测及预警。The scenes of garden scenic spots are complex. Bridges, corridors, pavilions, halls, rockeries, platforms, cave doors and other places make the video backgrounds diverse. The detection algorithm in the prior art has low accuracy, and the present invention improves the current face detection technology, starts from the detection object, and expands the face detection range to the entire human head. Using the human head detection model based on deep learning, a large number of data sets are learned through neural networks. The human head detection model based on deep learning can improve the detection ability of the target from multiple angles and under occlusion, and the algorithm adaptability is greatly improved, which improves the target detection. The performance and performance of the algorithm in individual detection, so as to monitor the number of tourists in the scenic spot in real time, and realize the accurate detection and early warning of high-density human flow in the scenic spot.

附图说明Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to illustrate the technical solutions in the embodiments of the present invention more clearly, the following briefly introduces the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.

图1是本发明方法的流程示意图;Fig. 1 is the schematic flow sheet of the method of the present invention;

图2是基于光照补偿的混合高斯视频前景提取算法框图;Figure 2 is a block diagram of a mixed Gaussian video foreground extraction algorithm based on illumination compensation;

图3是彩色图像光照补偿示意图;Fig. 3 is the schematic diagram of illumination compensation of color image;

图4是R-FCN网络结构图;Fig. 4 is the R-FCN network structure diagram;

图5是基于人头检测模型的游客量统计技术路线框图;Fig. 5 is a block diagram of the technical route block diagram of tourist volume based on the head detection model;

图6是基于深度学习和人头检测模型的景区人流量统计及预警系统框图。Figure 6 is a block diagram of a scenic spot traffic statistics and early warning system based on a deep learning and human head detection model.

具体实施方式Detailed ways

为使本领域技术人员更好地理解本发明的技术方案,下面结合具体实施方式对本发明作进一步详细描述。In order to make those skilled in the art better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to specific embodiments.

本实施例提供一种游客人流量监控预警方法,采用一种游客人流量监控预警系统运行。一种游客人流量监控预警系统运行包括:一种游客人流量监控预警系统包括:摄像头、网络硬盘录像机、监控主机和报警盒,摄像头连接网络硬盘录像机,网络硬盘录像机连接监控主机,监控主机连接报警盒,监控主机在发现故障时触发报警盒报警。The present embodiment provides a method for monitoring and pre-warning the flow of tourists, using a system for monitoring and pre-warning the flow of tourists. The operation of a tourist traffic monitoring and early warning system includes: a tourist traffic monitoring and early warning system includes: a camera, a network hard disk video recorder, a monitoring host and an alarm box, the camera is connected to the network hard disk video recorder, the network hard disk video recorder is connected to the monitoring host, and the monitoring host is connected to an alarm Box, the monitoring host triggers the alarm box alarm when it finds a fault.

一种游客人流量监控预警方法,其方法流程图如图1所示,包括:A method for monitoring and early warning of visitor flow, the flow chart of which is shown in Figure 1, including:

S1、采集各景点摄像头一天内的摄像视频,对摄像视频采用基于光照补偿的高斯模型检测算法进行前景提取,得到前景输出,流程如图2所示。S1. Collect the camera video of each scenic spot camera within one day, and use the Gaussian model detection algorithm based on illumination compensation to extract the foreground of the camera video, and obtain the foreground output. The process is shown in Figure 2.

基于光照补偿的高斯模型检测算法,如图3所示,包括:将摄像视频当前帧图像进行单通道亮度均衡化处理,利用亮度插值构造单通道全局差值矩阵,对三通道图像进行亮度增强处理,得到光照补偿后的视频;The Gaussian model detection algorithm based on illumination compensation, as shown in Figure 3, includes: performing single-channel brightness equalization processing on the current frame image of the camera video, constructing a single-channel global difference matrix by brightness interpolation, and performing brightness enhancement processing on the three-channel image , get the video after illumination compensation;

对光照补偿后的视频利用混合高斯模型进行前景提取,采用形态学操作进行前景目标完整输出,得到前景输出。For the video after illumination compensation, the mixed Gaussian model is used to extract the foreground, and the morphological operation is used to complete the output of the foreground target, and the foreground output is obtained.

其中,混合高斯模型方法包括:Among them, the mixture Gaussian model method includes:

SS1、初始化混合高斯模型,计算时间段T内视频序列图像的每一个灰度像素的均值μ0和方差,用μ0和方差σ02来初始化k个高斯模SS1. Initialize the mixture Gaussian model, calculate the mean μ0 and variance of each gray pixel of the video sequence image in the time period T, and use μ0 and variance σ02 to initialize k Gaussian modes

型的参数,k为正整数,μ0和σ0的计算公式如下type parameters, k is a positive integer, and the formulas for μ0 and σ0 are as follows

Figure BDA0001727520150000081
Figure BDA0001727520150000081

Figure BDA0001727520150000082
Figure BDA0001727520150000082

其中,It为新像素值,t的取值为1,2,…TAmong them, It is the new pixel value, and the value of t is 1, 2,...T

SS2、将每个新像素值It同第k个高斯模型进行比较,直到找到匹配的像素值分布模型,匹配是指,新像素值It和第k个高斯模型的均值偏差在2.5σ内,比较采用的公式如下:SS2. Compare each new pixel value It with the kth Gaussian model until a matching pixel value distribution model is found. Matching means that the mean deviation between the new pixel value It and the kth Gaussian modelis within2.5σ , the comparison formula is as follows:

|Itk,t-1|≤2.5σk,t-1|Itk,t-1 |≤2.5σk,t-1

式中μk,t-1、σk,t-1分别为t-1时刻高斯模型的分布均值和方差;where μk,t-1 and σk,t-1 are the distribution mean and variance of the Gaussian model at time t-1, respectively;

SS3、若匹配的像素值分布模型符合背景所需要求,则匹配的像素值分布模型对应的像素标记为背景部分,否则标记为前景部分;SS3. If the matched pixel value distribution model meets the requirements of the background, the pixel corresponding to the matched pixel value distribution model is marked as the background part, otherwise it is marked as the foreground part;

SS4、若新像素值It与k个高斯模型中的一个或几个相匹配,说明新像素值It较为符合当前像素值的分布,需要适当增加权值,此时新像素值It的均值、方差、权值更新公式如下:SS4. If the new pixel value It matches one or more of thek Gaussian models, it means that the new pixel value Itis more in line with the distribution of the current pixel value, and the weight needs to be appropriately increased. At this time, the value of the new pixel valueIt is The mean, variance, and weight update formulas are as follows:

μk,t=(1-α)μk,t-1+αItμk,t =(1-α)μk,t-1 +αIt

Figure BDA0001727520150000083
Figure BDA0001727520150000083

ωk,t=(1-β)ωk,t-1+βθωk,t =(1-β)ωk,t-1 +βθ

其中,其中,ωk,t为t时刻第k个高斯分布的权重,ωk,t-1为t-1时刻第k个高斯分分布的权重,μk,t,σk,t分别为t时刻第k个高斯分布的均值和方差,θ为匹配参数,当新像素值符合k个高斯分布时θ=1,不符合时θ=0;α为参数更新率,表示背景变换速度,β为学习率为当新像素值符合k个高斯分布时θ=1,不符合时θ=0;Among them, ωk,t is the weight of the kth Gaussian distribution at time t, ωk,t-1 is the weight of the kth Gaussian distribution at time t-1, μk,t , σk,t are respectively The mean and variance of the kth Gaussian distribution at time t, θ is the matching parameter, when the new pixel value conforms to the k Gaussian distribution, θ=1, when it does not conform to the k Gaussian distribution, θ=0; α is the parameter update rate, indicating the background transformation speed, β The learning rate is θ=1 when the new pixel value conforms to k Gaussian distributions, and θ=0 when it does not conform;

SS5、若在SS2中,新像素值It没有任何高斯模型与之匹配,则权重最小高斯分布模型,即该模式的均值为当前像素值,标准差为初始较大值,权重为较小值;SS5 . If in SS2, the new pixel value It does not have any Gaussian model to match it, then the weight is the smallest Gaussian distribution model, that is, the mean of this mode is the current pixel value, the standard deviation is the initial larger value, and the weight is smaller. ;

SS6、各高斯模型根据其对应的ωk,t的值从大到小排序,权重大、标准差小的高斯模型排列靠前,得到高斯模型的序列;SS6. Each Gaussian model is sorted from large to small according to its corresponding value of ωk, t , and the Gaussian models with large weights and small standard deviations are arranged in the front, and the sequence of Gaussian models is obtained;

SS7、将序列前b个高斯分布模型标记为背景B,B满足下式,参数T表示背景所占比,为设定阈值,T的取值范围为,0.5≤T≤1,b为正整数,SS7. Mark the first b Gaussian distribution models of the sequence as background B, B satisfies the following formula, the parameter T represents the proportion of the background, which is the set threshold, the value range of T is, 0.5≤T≤1, b is a positive integer ,

Figure BDA0001727520150000091
Figure BDA0001727520150000091

S2、在ROI(Region of interest,感兴趣区域)区域内对前景输出进行面积比计算,根据景点人流密度阈值进行高密度人群跟踪,在到达预定时间时,输出高密度人群图片。其中,在摄像视频第一帧图像中开始选取ROI作为待监测的区域范围,按照S1进行前景提取,对提取的前景输出进行连通域标记,获取前景帧中最大连通域,即前景团块面积;将当前帧中前景团块面积除以框选的驻点区域面积,判断比值是否大于预警值,对超出预警值的团块面积进行跟踪,在预设时间内比值均大于预警值,系统给出高密度人群判定。S2. Calculate the area ratio of the foreground output in the ROI (Region of Interest) area, track high-density crowds according to the crowd density threshold of the scenic spot, and output high-density crowd pictures when the predetermined time is reached. Among them, the ROI is selected as the area to be monitored in the first frame image of the camera video, and the foreground is extracted according to S1, and the extracted foreground output is marked with a connected domain to obtain the largest connected domain in the foreground frame, that is, the foreground blob area; Divide the foreground clump area in the current frame by the area of the stagnant point area selected by the frame, determine whether the ratio is greater than the warning value, and track the clump area that exceeds the warning value. The ratio is greater than the warning value within the preset time, and the system gives High-density crowd determination.

S3、采用迁移学习技术,在深度学习网络上利用具有高密度人群的标注图片进行人头检测模型的训练,得到训练好的模型。模型训练是离线完成的,可将训练好的模型加载后进行在线的检测输出。基于深度学习的人头模型检测方法,人头检测模型采用残差网络模型结构,即加入了残差块的深层次卷积神经网络,该网络包含输入层、卷积层、池化层、全连接层、输出层五个部分。图片由输入层导入,在卷积层提取特征,在池化层中降维选择特征,通过全连接层链接有效特征在输出层实现人头检测。基于深度学习的检测算法很多,可根据实际需要进行选择,下面以R‐FCN算法为例进行人头模型训练检测的步骤介绍,其中R‐FCN网络结构图如图4所示:S3. Using the transfer learning technology, the human head detection model is trained on the deep learning network by using the labeled pictures with high density of people, and the trained model is obtained. Model training is done offline, and the trained model can be loaded for online detection output. The human head model detection method based on deep learning, the human head detection model adopts a residual network model structure, that is, a deep convolutional neural network with residual blocks added. The network includes an input layer, a convolution layer, a pooling layer, and a fully connected layer. , five parts of the output layer. The image is imported from the input layer, the features are extracted in the convolution layer, the dimension reduction is selected in the pooling layer, and the effective features are linked through the fully connected layer to achieve head detection in the output layer. There are many detection algorithms based on deep learning, which can be selected according to actual needs. The following takes the R-FCN algorithm as an example to introduce the steps of human head model training and detection. The R-FCN network structure diagram is shown in Figure 4:

(1)利用开源标注工具Labeling实现对景区高密度人群图片的人头标注,输入标注好的人头图片,通过FCN(Fully-connection Network,全连通网络)全卷积神经网络生成图片的特征图;(1) Use the open source labeling tool Labeling to realize the human head labeling of high-density crowd pictures in scenic spots, input the labeled human head pictures, and generate the feature map of the picture through the FCN (Fully-connection Network, fully connected network) fully convolutional neural network;

(2)将计算出来的特征图输入RPN(Region Propsal Network,区域提取网络),进而生成ROIS(Region of Interest,S是复数,多个感兴趣区域);然后将生成的ROIS输入对位置敏感的ROI池化层,给子网学习预测出目标区域;(2) Input the calculated feature map into RPN (Region Propsal Network, region extraction network), and then generate ROIS (Region of Interest, S is a complex number, multiple regions of interest); then input the generated ROIS into position-sensitive The ROI pooling layer predicts the target area for the subnet learning;

(3)ROI子网将FCN提取的特征与RPN输出的候选区域,将预测目标与标签目标之间的误差进行反向传播,计算训练的损失值,通过多次迭代使得损失值达到可能的最小值,以此来完成人头区域的分类和定位。(3) The ROI subnet uses the features extracted by the FCN and the candidate region output by the RPN, back-propagates the error between the prediction target and the label target, calculates the loss value of the training, and makes the loss value reach the smallest possible value through multiple iterations value, in order to complete the classification and localization of the head area.

(4)经过一定次数的训练,以总损失曲线图判断网络权重是否达到最优,得到能够判断人头和位置的检测模型。用训练得到的检测模型对选取的测试集图片进行人头检测,如图5所示,以准确率和误检率为标准进行模型的评判。(4) After a certain number of trainings, the total loss curve is used to judge whether the network weight is optimal, and a detection model that can judge the head and position is obtained. Use the detection model obtained by training to perform head detection on the selected test set pictures, as shown in Figure 5, and judge the model based on the accuracy rate and false detection rate.

S4、将输出的高密度人群图片输入训练好的模型,进行游客量检测,当人数超过阈值时,训练好的模型输出报警信号。前帧判断给出高密度人群驻留预警,开启游客人数统计算法。以训练好的人头模型检测算法进行高密度人流量的检测计数,人数超过预设值进行人流量预警。基于深度学习和人头检测模型的景区人流量统计及预警系统框图,如图6所示。S4. Input the output high-density crowd pictures into the trained model to detect the number of tourists. When the number of people exceeds the threshold, the trained model outputs an alarm signal. The judgment of the previous frame gives an early warning of the presence of high-density crowds, and starts the tourist number counting algorithm. The trained human head model detection algorithm is used to detect and count high-density human flow, and the number of people exceeds the preset value for human flow warning. The block diagram of the scenic spot traffic statistics and early warning system based on deep learning and head detection model is shown in Figure 6.

本发明的有益效果是:The beneficial effects of the present invention are:

园林景区场景复杂,桥、廊、亭、厅,假山、平台、洞门等场所使视频背景多样,在高密度复杂场景下,极小人脸、大量人脸遮挡和人头后脑勺等情况,使现有技术中的检测算法准确度不高,本发明对目前的人脸检测技术进行改进,从检测对象着手,将人脸检测范围扩大至整个人头。利用基于深度学习的人头检测模型,通过神经网络对大量数据集进行学习,基于深度学习的人头检测模型可提升目标的多角度和遮挡下的检测能力,算法适应能力极大提高,提升了目标检测算法在个体检测上的表现和性能,从而实时监控景区内游客的驻留量,实现了景区高密度人流量的准确检测及预警。The scenes of garden scenic spots are complex. Bridges, corridors, pavilions, halls, rockeries, platforms, cave doors and other places make the video backgrounds diverse. The detection algorithm in the prior art has low accuracy, and the present invention improves the current face detection technology, starts from the detection object, and expands the face detection range to the entire human head. Using the human head detection model based on deep learning, a large number of data sets are learned through neural networks. The human head detection model based on deep learning can improve the detection ability of the target from multiple angles and under occlusion, and the algorithm adaptability is greatly improved, which improves the target detection. The performance and performance of the algorithm in individual detection, so as to monitor the number of tourists in the scenic spot in real time, and realize the accurate detection and early warning of high-density human flow in the scenic spot.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art who is familiar with the technical scope disclosed by the present invention can easily think of changes or substitutions. All should be included within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.

Claims (1)

1. A visitor flow monitoring and early warning method is characterized by comprising the following steps of:
s1, collecting the camera videos of the cameras of each scenic spot in one day, and performing foreground extraction on the camera videos by adopting a Gaussian model detection algorithm based on illumination compensation, wherein the Gaussian model detection algorithm based on illumination compensation comprises the following steps: performing single-channel brightness equalization processing on a current frame image of the video camera, constructing a single-channel global difference matrix by utilizing brightness interpolation, and performing brightness enhancement processing on a three-channel image to obtain a video subjected to illumination compensation;
carrying out foreground extraction on the video subjected to illumination compensation by using a Gaussian mixture model, and carrying out complete output on a foreground target by using morphological operation to obtain foreground output, wherein the foreground extraction by using the Gaussian mixture model comprises the following steps:
SS1, initializing a Gaussian mixture model, and calculating the mean value mu of each gray pixel of the video sequence image in the time period T0Sum variance σ02By mu0Sum variance σ02To initialize the parameters of k Gaussian models, k being a positive integer, mu0And σ02The calculation formula of (a) is as follows:
Figure FDA0003627603930000011
Figure FDA0003627603930000012
wherein, ItThe value of T is 1,2, … T;
SS2, each new pixel value ItComparing with the k-th Gaussian model until a matched pixel value distribution model is found, wherein the matching means that a new pixel value I is obtainedtAnd the mean deviation of the kth Gaussian model is within 2.5 sigma, and the formula adopted by comparison is as follows:
|Itk,t-1|≤2.5σk,t-1
in the formula ofk,t-1、σk,t-1Respectively is the distribution mean and variance of the kth Gaussian model at the time of t-1;
SS3, if the matched pixel value distribution model meets the requirement of the background, the pixel corresponding to the matched pixel value distribution model is marked as the background part, otherwise, the pixel is marked as the foreground part;
SS4, if new pixel value ItMatching one or more of the k Gaussian models to account for new pixel values ItThe distribution of the current pixel value is satisfied, and the weight value is increased properly, and the new pixel value ItThe updating formulas of the mean value, the variance and the weight value are as follows:
μk,t=(1-α)μk,t-1+αIt
Figure FDA0003627603930000021
ωk,t=(1-β)ωk,t-1+βθ
wherein, ω isk,tWeight, ω, of the kth Gaussian distribution at time tk,t-1Weight of the k-th Gaussian distribution at time t-1, μk,t,σk,tRespectively, the mean value and the variance of the kth Gaussian distribution at the time t, theta is a matching parameter, and theta is 1 when a new pixel value accords with the kth Gaussian distribution and 0 when the new pixel value does not accord with the kth Gaussian distribution; alpha is a parameter updating rate and represents a background transformation speed, and beta is a learning rate;
SS5, if SS2 shows new pixel value ItIf no Gaussian model is matched with the model, replacing the Gaussian distribution model with the minimum weight, namely, the mean value of the model is the current pixel value, the standard deviation is an initial large value, and the weight is a small value;
SS6, and omega corresponding to each Gaussian modelk,tThe values of the Gaussian models are sorted from large to small, the Gaussian models with large weight and small standard deviation are arranged in front, and a sequence of the Gaussian models is obtained;
SS7, marking B Gaussian distribution models in front of the sequence as background B, wherein B satisfies the following formula, parameter T represents the ratio occupied by the background and is a set threshold, T is in the value range of 0.5-1, B is a positive integer,
Figure FDA0003627603930000031
s2, calculating the area ratio of the foreground output in the region of interest, tracking high-density crowd according to the scenic spot pedestrian flow density threshold, and outputting a high-density crowd picture when the preset time is reached;
s3, training a head detection model by using a transfer learning technology and using a labeled picture of a high-density crowd on a deep learning network to obtain a trained model;
and S4, inputting the output high-density crowd pictures into the trained model, detecting the number of tourists, and outputting an alarm signal by the trained model when the number of people exceeds a threshold value.
CN201810763293.7A2018-07-112018-07-11 A kind of tourist flow monitoring and early warning methodActiveCN109101888B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201810763293.7ACN109101888B (en)2018-07-112018-07-11 A kind of tourist flow monitoring and early warning method

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201810763293.7ACN109101888B (en)2018-07-112018-07-11 A kind of tourist flow monitoring and early warning method

Publications (2)

Publication NumberPublication Date
CN109101888A CN109101888A (en)2018-12-28
CN109101888Btrue CN109101888B (en)2022-06-14

Family

ID=64846107

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201810763293.7AActiveCN109101888B (en)2018-07-112018-07-11 A kind of tourist flow monitoring and early warning method

Country Status (1)

CountryLink
CN (1)CN109101888B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN109819208B (en)*2019-01-022021-01-12江苏警官学院Intensive population security monitoring management method based on artificial intelligence dynamic monitoring
CN109948550A (en)*2019-03-202019-06-28北京百分点信息科技有限公司 A system and method for monitoring the flow of people in a smart railway station
CN110135274B (en)*2019-04-192023-06-16佛山科学技术学院Face recognition-based people flow statistics method
CN110390266A (en)*2019-06-242019-10-29黄燕A kind of system and its measurement method of the measurement scenic spot flow of the people based on area algorithm
CN112146666A (en)*2019-06-272020-12-29奥迪股份公司Vehicle driving route marking method and device, computer equipment and storage medium
CN110517251B (en)*2019-08-282022-04-08嘉应学院 A system and method for overload detection and early warning in scenic area
CN110688924A (en)*2019-09-192020-01-14天津天地伟业机器人技术有限公司RFCN-based vertical monocular passenger flow volume statistical method
CN111640150B (en)*2019-09-202021-04-02贵州英弗世纪科技有限公司Video data source analysis system and method
CN111010439A (en)*2019-12-162020-04-14重庆锐云科技有限公司Scenic spot comfort level monitoring and early warning method
CN111885202B (en)*2020-08-032024-05-31南京亚太嘉园智慧空间营造有限公司VGG algorithm-based information processing platform for exhibition hall of Internet of things
CN114550077B (en)*2022-01-102025-07-25东南数字经济发展研究院Panoramic image-based people flow statistics method and system
CN114283386B (en)*2022-01-282024-06-21浙江传媒学院Real-time monitoring system for analyzing and adapting to dense scene people stream based on big data
CN114926973B (en)*2022-04-062023-07-14珠海市横琴渤商数字科技有限公司Video monitoring method, device, system, server and readable storage medium
CN116778411A (en)*2023-06-142023-09-19天翼电信终端有限公司People flow prediction method and device, electronic equipment and nonvolatile storage medium
CN116542509A (en)*2023-06-212023-08-04广东致盛技术有限公司Campus logistics task management method and device
CN116523319B (en)*2023-06-302023-09-08中国市政工程西南设计研究总院有限公司Comprehensive management method and system for intelligent park
CN117041484B (en)*2023-07-182024-05-24中建科工集团运营管理有限公司People stream dense area monitoring method and system based on Internet of things
CN118396783B (en)*2024-06-252024-08-30深圳市海宇科电子科技有限公司Local information intelligent service platform based on set top box

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN106845344A (en)*2016-12-152017-06-13重庆凯泽科技股份有限公司Demographics' method and device
CN107229894A (en)*2016-03-242017-10-03上海宝信软件股份有限公司Intelligent video monitoring method and system based on computer vision analysis technology
CN107301387A (en)*2017-06-162017-10-27华南理工大学A kind of image Dense crowd method of counting based on deep learning
CN107679502A (en)*2017-10-122018-02-09南京行者易智能交通科技有限公司A kind of Population size estimation method based on the segmentation of deep learning image, semantic

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107229894A (en)*2016-03-242017-10-03上海宝信软件股份有限公司Intelligent video monitoring method and system based on computer vision analysis technology
CN106845344A (en)*2016-12-152017-06-13重庆凯泽科技股份有限公司Demographics' method and device
CN107301387A (en)*2017-06-162017-10-27华南理工大学A kind of image Dense crowd method of counting based on deep learning
CN107679502A (en)*2017-10-122018-02-09南京行者易智能交通科技有限公司A kind of Population size estimation method based on the segmentation of deep learning image, semantic

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
景区""空间游客驻留分布密度研究;杨文学;《中国优秀硕士学位论文全文数据库 信息科技辑》;20180415;第9、14、19-21页*

Also Published As

Publication numberPublication date
CN109101888A (en)2018-12-28

Similar Documents

PublicationPublication DateTitle
CN109101888B (en) A kind of tourist flow monitoring and early warning method
US10735694B2 (en)System and method for activity monitoring using video data
CN110781836A (en)Human body recognition method and device, computer equipment and storage medium
CN110232330B (en)Pedestrian re-identification method based on video detection
CN103971386A (en)Method for foreground detection in dynamic background scenario
CN105512640A (en)Method for acquiring people flow on the basis of video sequence
CN106875424A (en)A kind of urban environment driving vehicle Activity recognition method based on machine vision
CN109657581A (en)Urban track traffic gate passing control method based on binocular camera behavioral value
CN103425967A (en)Pedestrian flow monitoring method based on pedestrian detection and tracking
CN113515968A (en)Method, device, equipment and medium for detecting street abnormal event
CN107194396A (en)Method for early warning is recognized based on the specific architecture against regulations in land resources video monitoring system
CN112712052A (en)Method for detecting and identifying weak target in airport panoramic video
CN109919053A (en) A deep learning vehicle parking detection method based on surveillance video
CN114373162B (en)Dangerous area personnel intrusion detection method and system for transformer substation video monitoring
CN110796580B (en)Intelligent traffic system management method and related products
CN118609356B (en)Method for real-time monitoring and predicting traffic jam induced by specific sudden aggregation event
Yaghoobi Ershadi et al.Vehicle tracking and counting system in dusty weather with vibrating camera conditions
CN108846852A (en)Monitor video accident detection method based on more examples and time series
CN106570449A (en) A method and system for detecting people flow and popularity index based on region definition
CN106570885A (en)Background modeling method based on brightness and texture fusion threshold value
Basalamah et al.Deep learning framework for congestion detection at public places via learning from synthetic data
CN110796008A (en) An early fire detection method based on video images
CN108960165A (en)A kind of stadiums population surveillance method based on intelligent video identification technology
CN116823533B (en)Intelligent visit guiding method and system for ecological garden
Parsola et al.Automated system for road extraction and traffic volume estimation for traffic jam detection

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp