



技术领域technical field
本发明涉及人工智能技术领域,更具体地,特别是指一种检测人员聚集的方法、系统、设备和存储介质。The present invention relates to the technical field of artificial intelligence, and more specifically, to a method, system, device and storage medium for detecting people gathering.
背景技术Background technique
近几年伴随人工智能技术的发展,特别是深度学习领域,越来越多的新技术开始应用于人们的生产、生活中。目前,AI(Artificial Intelligence,人工智能)已经在金融、医疗、工业制造及安防等多个领域实现了技术落地,而且应用场景也越来越丰富,引发了各个行业的深刻变革。未来AI的发展将是技术与产业的结合,实现AI技术赋能各行各业,解决痛点、创造价值、降本增效。In recent years, with the development of artificial intelligence technology, especially in the field of deep learning, more and more new technologies have begun to be applied to people's production and life. At present, AI (Artificial Intelligence, artificial intelligence) has achieved technical landing in many fields such as finance, medical care, industrial manufacturing, and security, and its application scenarios are becoming more and more abundant, triggering profound changes in various industries. The development of AI in the future will be a combination of technology and industry, enabling AI technology to empower all walks of life, solving pain points, creating value, reducing costs and increasing efficiency.
当前人工智能的大爆发正是由深度学习引起的。深度学习就是用深度神经网络来自动学习对象特征,然后让深度神经网络具备识别对象的能力。而图像识别作为深度学习应用(如CNN,RNN)的重要方向,应用已越来越广泛。在智能驾驶、人脸识别、医学影像识别,工业质检等领域也都有较成熟的应用。现实生产中,人员聚集检测在许多场景下具有强需求,特别是一些相对危险场景,如加油站、危化工厂等。目前的人员聚集检测多基于图像结构化算法识别,对图像质量依赖高,无法应对各种质量视频图像,检测效果差,误差率高。The current explosion of artificial intelligence is caused by deep learning. Deep learning is to use deep neural network to automatically learn object features, and then make deep neural network have the ability to recognize objects. As an important direction of deep learning applications (such as CNN, RNN), image recognition has become more and more widely used. It also has relatively mature applications in areas such as intelligent driving, face recognition, medical image recognition, and industrial quality inspection. In actual production, people gathering detection has a strong demand in many scenarios, especially some relatively dangerous scenarios, such as gas stations, hazardous chemical factories, etc. The current people gathering detection is mostly based on image structural algorithm recognition, which is highly dependent on image quality and cannot cope with various quality video images. The detection effect is poor and the error rate is high.
发明内容Contents of the invention
有鉴于此,本发明实施例的目的在于提出一种检测人员聚集的方法、系统、计算机设备及计算机可读存储介质,本发明通过深度学习模型检测出视频图像中的行人、同时对行人进行动态跟踪,当检测到视频中人员基本处于静止状态时,对人员中心点进行聚类,当每个聚类中人员平均距离小于给定相对参数,同时人员数量大于设定值时,则判定为人员聚集。In view of this, the purpose of the embodiments of the present invention is to propose a method, system, computer equipment and computer-readable storage medium for detecting people gathering. The present invention detects pedestrians in video images through a deep learning model, and simultaneously performs dynamic Tracking, when it is detected that the people in the video are basically in a static state, the center points of the people are clustered, and when the average distance of the people in each cluster is less than a given relative parameter, and the number of people is greater than the set value, it is judged as a person gather.
基于上述目的,本发明实施例的一方面提供了一种检测人员聚集的方法,包括如下步骤:对视频流进行解码,通过深度学习模型对解码后得到的图像进行人员检测;对人员进行动态跟踪,记录人员轨迹数据,并根据所述轨迹数据确定人员是否处于静止状态;响应于人员处于静止状态,对人员的中心点进行聚类;以及响应于每个聚类中人员平均距离小于人员聚集判定参数并且人员数量大于预设值,给出人员聚集的警告信息。Based on the above purpose, an aspect of the embodiment of the present invention provides a method for detecting people gathering, including the following steps: decoding the video stream, and performing personnel detection on the decoded image through a deep learning model; dynamically tracking the personnel , record personnel trajectory data, and determine whether the personnel is in a stationary state according to the trajectory data; in response to the personnel being in a stationary state, cluster the center points of the personnel; and determine in response to the average distance of personnel in each cluster being less than the personnel aggregation parameter and the number of people is greater than the preset value, a warning message of people gathering will be given.
在一些实施方式中,所述通过深度学习模型对解码后得到的图像进行人员检测包括:给每个人员分配一个目标框,并判断目标框的个数是否大于第二预设值,响应于目标框的个数大于第二预设值,人员检测完毕。In some implementations, the person detection of the decoded image using the deep learning model includes: assigning a target frame to each person, and judging whether the number of target frames is greater than a second preset value, and responding to the target If the number of frames is greater than the second preset value, the person detection is completed.
在一些实施方式中,所述根据所述轨迹数据确定人员是否处于静止状态包括:每隔预设时间获取一次目标框的坐标,并判断所述人员最近预设数量个目标框的中心点是否均处于预设半径的圆内;响应于所述人员最近预设数量个目标框的中心点处于预设半径的圆内,认为所述人员处于静止状态。In some implementations, the determining whether the person is in a stationary state according to the trajectory data includes: obtaining the coordinates of the target frame every preset time, and judging whether the center points of the person's latest preset number of target frames are uniform. Being within a circle with a preset radius; in response to the center points of the nearest preset number of target frames of the person being within a circle with a preset radius, it is considered that the person is in a static state.
在一些实施方式中,所述对人员的中心点进行聚类包括:对所有判定为静止状态的目标框中心点进行聚类,选择离中心平均距离最小的一簇,根据所述簇中各目标框的宽度计算人员聚集判定参数。In some embodiments, the clustering of the center points of the personnel includes: clustering the center points of all target frames determined to be in a static state, selecting a cluster with the smallest average distance from the center, and according to each target in the cluster The width of the box is used to calculate the personnel gathering judgment parameter.
本发明实施例的另一方面,提供了一种检测人员聚集的系统,包括:解码模块,配置用于对视频流进行解码,通过深度学习模型对解码后得到的图像进行人员检测;跟踪模块,配置用于对人员进行动态跟踪,记录人员轨迹数据,并根据所述轨迹数据确定人员是否处于静止状态;聚类模块,配置用于响应于人员处于静止状态,对人员的中心点进行聚类;以及警告模块,配置用于响应于每个聚类中人员平均距离小于人员聚集判定参数并且人员数量大于预设值,给出人员聚集的警告信息。Another aspect of the embodiments of the present invention provides a system for detecting people gathering, including: a decoding module configured to decode video streams, and perform people detection on decoded images through a deep learning model; a tracking module, It is configured to dynamically track the personnel, record the trajectory data of the personnel, and determine whether the personnel is in a static state according to the trajectory data; the clustering module is configured to cluster the central points of the personnel in response to the static state of the personnel; And a warning module configured to give a warning message of people gathering in response to the average distance of people in each cluster being smaller than the people gathering determination parameter and the number of people being greater than a preset value.
在一些实施方式中,所述解码模块配置用于:给每个人员分配一个目标框,并判断目标框的个数是否大于第二预设值,响应于目标框的个数大于第二预设值,人员检测完毕。In some embodiments, the decoding module is configured to: assign a target frame to each person, and determine whether the number of target frames is greater than a second preset value, and respond to the number of target frames being greater than the second preset value value, the personnel detection is completed.
在一些实施方式中,所述跟踪模块配置用于:每隔预设时间获取一次目标框的坐标,并判断所述人员最近预设数量个目标框的中心点是否均处于预设半径的圆内;响应于所述人员最近预设数量个目标框的中心点处于预设半径的圆内,认为所述人员处于静止状态。In some implementations, the tracking module is configured to: acquire the coordinates of the target frame every preset time, and judge whether the center points of the last preset number of target frames of the person are all within a circle with a preset radius ; Responding to the fact that the center points of the nearest preset number of target frames of the person are within a circle with a preset radius, it is considered that the person is in a static state.
在一些实施方式中,所述聚类模块配置用于:对所有判定为静止状态的目标框中心点进行聚类,选择离中心平均距离最小的一簇,根据所述簇中各目标框的宽度计算人员聚集判定参数。In some implementations, the clustering module is configured to: cluster the center points of all target frames determined to be in a static state, select a cluster with the smallest average distance from the center, and select a cluster according to the width of each target frame in the cluster Calculate the personnel gathering judgment parameters.
本发明实施例的又一方面,还提供了一种计算机设备,包括:至少一个处理器;以及存储器,所述存储器存储有可在所述处理器上运行的计算机指令,所述指令由所述处理器执行时实现如上方法的步骤。In another aspect of the embodiments of the present invention, there is also provided a computer device, including: at least one processor; and a memory, the memory stores computer instructions executable on the processor, and the instructions are executed by the The steps of the above method are realized when the processor executes.
本发明实施例的再一方面,还提供了一种计算机可读存储介质,计算机可读存储介质存储有被处理器执行时实现如上方法步骤的计算机程序。In yet another aspect of the embodiments of the present invention, a computer-readable storage medium is also provided, and the computer-readable storage medium stores a computer program for implementing the above method steps when executed by a processor.
本发明具有以下有益技术效果:通过目标识别、目标跟踪与K-Mean聚类等方法有效结合,有效解决实时视频的人员聚类检测问题,大幅提高检测速度及检测精度,使得在加油站、危化工企业生产中,多路视频的实时人员聚类检测成为可能,同时通过改进人员聚集判定的参数的计算方法,使针对任何距离的自动判定成为可能,改变了使用固定像素宽度作为聚集判断标准的弊端。The present invention has the following beneficial technical effects: through effective combination of methods such as target recognition, target tracking and K-Mean clustering, the problem of personnel clustering detection in real-time video can be effectively solved, the detection speed and detection accuracy can be greatly improved, and the In the production of chemical enterprises, real-time personnel cluster detection of multi-channel video becomes possible. At the same time, by improving the calculation method of the parameters of personnel aggregation judgment, automatic judgment for any distance is possible, which changes the use of fixed pixel width as the aggregation judgment standard. disadvantages.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的实施例。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention, and those skilled in the art can obtain other embodiments according to these drawings without any creative effort.
图1为本发明提供的检测人员聚集的方法的实施例的示意图;FIG. 1 is a schematic diagram of an embodiment of a method for detecting personnel gathering provided by the present invention;
图2为本发明提供的检测人员聚集的系统的实施例的示意图;FIG. 2 is a schematic diagram of an embodiment of a system for detecting people gathering provided by the present invention;
图3为本发明提供的检测人员聚集的计算机设备的实施例的硬件结构示意图;FIG. 3 is a schematic diagram of the hardware structure of an embodiment of a computer device for detecting people gathering provided by the present invention;
图4为本发明提供的检测人员聚集的计算机存储介质的实施例的示意图。Fig. 4 is a schematic diagram of an embodiment of a computer storage medium for detecting people gathering provided by the present invention.
具体实施方式Detailed ways
为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明实施例进一步详细说明。In order to make the object, technical solution and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
需要说明的是,本发明实施例中所有使用“第一”和“第二”的表述均是为了区分两个相同名称非相同的实体或者非相同的参量,可见“第一”“第二”仅为了表述的方便,不应理解为对本发明实施例的限定,后续实施例对此不再一一说明。It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are to distinguish two entities with the same name but different parameters or parameters that are not the same, see "first" and "second" It is only for the convenience of expression, and should not be construed as a limitation on the embodiments of the present invention, which will not be described one by one in the subsequent embodiments.
本发明实施例的第一个方面,提出了一种检测人员聚集的方法的实施例。图1示出的是本发明提供的检测人员聚集的方法的实施例的示意图。According to the first aspect of the embodiments of the present invention, an embodiment of a method for detecting a gathering of people is proposed. FIG. 1 is a schematic diagram of an embodiment of a method for detecting people gathering provided by the present invention.
如图1所示,本发明实施例包括如下步骤:As shown in Figure 1, the embodiment of the present invention includes the following steps:
S1、对视频流进行解码,通过深度学习模型对解码后得到的图像进行人员检测;S1. Decode the video stream, and perform personnel detection on the decoded image through a deep learning model;
S2、对人员进行动态跟踪,记录人员轨迹数据,并根据所述轨迹数据确定人员是否处于静止状态;S2. Dynamically track the personnel, record the trajectory data of the personnel, and determine whether the personnel is in a static state according to the trajectory data;
S3、响应于人员处于静止状态,对人员的中心点进行聚类;以及S3. In response to the fact that the person is in a stationary state, cluster the central points of the person; and
S4、响应于每个聚类中人员平均距离小于人员聚集判定参数并且人员数量大于预设值,给出人员聚集的警告信息。S4. In response to the average distance of people in each cluster being smaller than the people gathering determination parameter and the number of people being greater than a preset value, giving a warning message of people gathering.
本发明提出了一种利用深度学习进行人员聚集检测的方法。首先通过yolox通用人员检测模型进行人员检测,给出每个行人检测框,对每个检测到的行人进行动态跟踪,并记录历史轨迹,并实时对轨迹数据进行处理,当判断行人处于静止状态时,则获取当前行人检测框中心点,并对中心点数据集进行K-Mean聚类。选择平均距离最小的一个数据簇,当这个聚类中人员平均距离小于给定相对参数,同时人员数量大于给定值时,则判定为人员聚类。相对参数由该数据簇人员标记框的大小来计算,在图像中,近景人员框与远景人员框大小变化非常大,远处框小,人员相对间距也变小,反之则大,以此改变以往逻辑判断中使用固定像素宽度来判断人员是否聚集的错误方法。The invention proposes a method for detecting people gathering by using deep learning. Firstly, the personnel detection is carried out through the yolox general personnel detection model, and each pedestrian detection frame is given, and each detected pedestrian is dynamically tracked, and the historical trajectory is recorded, and the trajectory data is processed in real time. When it is judged that the pedestrian is in a static state , the center point of the current pedestrian detection frame is obtained, and K-Mean clustering is performed on the center point data set. Select a data cluster with the smallest average distance. When the average distance of personnel in this cluster is less than a given relative parameter and the number of personnel is greater than a given value, it is determined as a personnel cluster. The relative parameter is calculated by the size of the person marker frame of the data cluster. In the image, the size of the person frame in the foreground and the person frame in the foreground varies greatly, and the distance frame is small, and the relative distance between people is also smaller, and vice versa. It is a wrong way to use fixed pixel width in logical judgment to judge whether people are gathered.
对视频流进行解码,通过深度学习模型对解码后得到的图像进行人员检测。Decode the video stream, and perform personnel detection on the decoded image through the deep learning model.
在一些实施方式中,所述通过深度学习模型对解码后得到的图像进行人员检测包括:给每个人员分配一个目标框,并判断目标框的个数是否大于第二预设值,响应于目标框的个数大于第二预设值,人员检测完毕。In some implementations, the person detection of the decoded image using the deep learning model includes: assigning a target frame to each person, and judging whether the number of target frames is greater than a second preset value, and responding to the target If the number of frames is greater than the second preset value, the person detection is completed.
首先对视频流进行解码,将解码后的图像输入目标检测模型,进行行人目标检测,并获取取目标框坐标,判断目标框(人员)的个数,个数大于设定值,继续执行以下流程,否则再次进行行人目标检测。First, decode the video stream, input the decoded image into the target detection model, perform pedestrian target detection, and obtain the coordinates of the target frame, judge the number of target frames (people), if the number is greater than the set value, continue to execute the following process , otherwise perform pedestrian target detection again.
对人员进行动态跟踪,记录人员轨迹数据,并根据所述轨迹数据确定人员是否处于静止状态。Dynamically track the personnel, record the trajectory data of the personnel, and determine whether the personnel is in a static state according to the trajectory data.
在一些实施方式中,所述根据所述轨迹数据确定人员是否处于静止状态包括:每隔预设时间获取一次目标框的坐标,并判断所述人员最近预设数量个目标框的中心点是否均处于预设半径的圆内;响应于所述人员最近预设数量个目标框的中心点处于预设半径的圆内,认为所述人员处于静止状态。In some implementations, the determining whether the person is in a stationary state according to the trajectory data includes: obtaining the coordinates of the target frame every preset time, and judging whether the center points of the person's latest preset number of target frames are uniform. Being within a circle with a preset radius; in response to the center points of the nearest preset number of target frames of the person being within a circle with a preset radius, it is considered that the person is in a static state.
存储跟踪每一帧的目标框中心点坐标,当中心点坐标大于设定个数,则进行静止状态判断(最近若干个数的中心点处于某一给定半径的圆内,则认为静止状态),若判定为静止,继续执行以下流程,否则再次进行静止状态判断。Store and track the coordinates of the center point of the target frame for each frame. When the coordinates of the center point are greater than the set number, it will judge the static state (the center point of the nearest number is within a circle with a given radius, it is considered to be in a static state) , if it is judged to be stationary, continue to execute the following process, otherwise proceed to judge the static state again.
响应于人员处于静止状态,对人员的中心点进行聚类。The center points of the persons are clustered in response to the persons being stationary.
在一些实施方式中,所述对人员的中心点进行聚类包括:对所有判定为静止状态的目标框中心点进行聚类,选择离中心平均距离最小的一簇,根据所述簇中各目标框的宽度计算人员聚集判定参数。In some embodiments, the clustering of the center points of the personnel includes: clustering the center points of all target frames determined to be in a static state, selecting a cluster with the smallest average distance from the center, and according to each target in the cluster The width of the box is used to calculate the personnel gathering judgment parameter.
首先选取平均距离最小的一簇人员,获取该簇数据中每个人员识别框的宽度,然后进行加权计算获取,改变以往判定参数直接采用固定像素值的方法。新方法会依据人员聚集出现在图像中的位置,自动进行判定参数缩放,当聚集人员离摄像头较远时,检测的人员框会变小,此时计算的判定参数也会变小,反之则变大,会依据聚集人员在图像中的位置,自动缩放,实现动态检测判定。如采用固定像素宽度作为判定标准,则只适用于一个场景,无法做到自动调节。First, select a cluster of people with the smallest average distance, obtain the width of each person’s identification frame in the cluster data, and then perform weighted calculations to obtain it, changing the previous method of determining parameters and directly using fixed pixel values. The new method will automatically scale the judgment parameters according to the position where the people gather in the image. When the people gathered are far away from the camera, the detected people frame will become smaller, and the calculated judgment parameters will also be smaller at this time, and vice versa. Large, it will automatically zoom according to the position of the gathered people in the image to realize dynamic detection and judgment. If a fixed pixel width is used as the judgment standard, it is only applicable to one scene and cannot be adjusted automatically.
响应于每个聚类中人员平均距离小于人员聚集判定参数并且人员数量大于预设值,给出人员聚集的警告信息。依据聚集判定参数对该簇中的人员进行距离判定,若该簇中距离小于判断参数的人员数量大于设定的人数限值,则给出聚集警告。In response to the average distance of people in each cluster being smaller than the people gathering determination parameter and the number of people being greater than a preset value, a warning message of people gathering is given. According to the aggregation judgment parameter, the distance of the personnel in the cluster is judged. If the number of people in the cluster whose distance is smaller than the judgment parameter is greater than the set number limit, an aggregation warning will be given.
本发明的主要创新点一是使用Kalman filtering(卡尔曼滤波)及optical flow相结合方法对人员进行跟踪,并利用跟踪坐标判定人员的运动/静止状态,二是使用K-Mean聚类对人员中心坐标进行聚类,从而获取最为聚集的一簇,三是利用人员检测框的宽度来计算判断人员是否聚集的判定参数,实现判定参数依据人员远近自动缩放,以改变使用固定像素宽度来判定时,只适用于某一距离的弊端。The main innovation of the present invention is to use the combined method of Kalman filtering (Kalman filtering) and optical flow to track the personnel, and use the tracking coordinates to determine the movement/stationary state of the personnel; The coordinates are clustered to obtain the most clustered cluster. The third is to use the width of the personnel detection frame to calculate the judgment parameters for judging whether the people are gathered, and realize the automatic scaling of the judgment parameters according to the distance of the people, so as to change the judgment when using a fixed pixel width. Cons that only work at a certain distance.
需要特别指出的是,上述检测人员聚集的方法的各个实施例中的各个步骤均可以相互交叉、替换、增加、删减,因此,这些合理的排列组合变换之于检测人员聚集的方法也应当属于本发明的保护范围,并且不应将本发明的保护范围局限在实施例之上。It should be pointed out that the various steps in the various embodiments of the above-mentioned method for detecting the gathering of people can be mutually interspersed, replaced, added, and deleted. protection scope of the present invention and should not be limited to the embodiments.
基于上述目的,本发明实施例的第二个方面,提出了一种检测人员聚集的系统。如图2所示,系统200包括如下模块:解码模块,配置用于对视频流进行解码,通过深度学习模型对解码后得到的图像进行人员检测;跟踪模块,配置用于对人员进行动态跟踪,记录人员轨迹数据,并根据所述轨迹数据确定人员是否处于静止状态;聚类模块,配置用于响应于人员处于静止状态,对人员的中心点进行聚类;以及警告模块,配置用于响应于每个聚类中人员平均距离小于人员聚集判定参数并且人员数量大于预设值,给出人员聚集的警告信息。Based on the above purpose, a second aspect of the embodiments of the present invention proposes a system for detecting people gathering. As shown in FIG. 2 , the
在一些实施方式中,所述解码模块配置用于:给每个人员分配一个目标框,并判断目标框的个数是否大于第二预设值,响应于目标框的个数大于第二预设值,人员检测完毕。In some embodiments, the decoding module is configured to: assign a target frame to each person, and determine whether the number of target frames is greater than a second preset value, and respond to the number of target frames being greater than the second preset value value, the personnel detection is completed.
在一些实施方式中,所述跟踪模块配置用于:每隔预设时间获取一次目标框的坐标,并判断所述人员最近预设数量个目标框的中心点是否均处于预设半径的圆内;响应于所述人员最近预设数量个目标框的中心点处于预设半径的圆内,认为所述人员处于静止状态。In some implementations, the tracking module is configured to: acquire the coordinates of the target frame every preset time, and judge whether the center points of the last preset number of target frames of the person are all within a circle with a preset radius ; Responding to the fact that the center points of the nearest preset number of target frames of the person are within a circle with a preset radius, it is considered that the person is in a static state.
在一些实施方式中,所述聚类模块配置用于:对所有判定为静止状态的目标框中心点进行聚类,选择离中心平均距离最小的一簇,根据所述簇中各目标框的宽度计算人员聚集判定参数。In some implementations, the clustering module is configured to: cluster the center points of all target frames determined to be in a static state, select a cluster with the smallest average distance from the center, and select a cluster according to the width of each target frame in the cluster Calculate the personnel gathering judgment parameters.
基于上述目的,本发明实施例的第三个方面,提出了一种计算机设备,包括:至少一个处理器;以及存储器,存储器存储有可在处理器上运行的计算机指令,指令由处理器执行以实现如下步骤:S1、对视频流进行解码,通过深度学习模型对解码后得到的图像进行人员检测;S2、对人员进行动态跟踪,记录人员轨迹数据,并根据所述轨迹数据确定人员是否处于静止状态;S3、响应于人员处于静止状态,对人员的中心点进行聚类;以及S4、响应于每个聚类中人员平均距离小于人员聚集判定参数并且人员数量大于预设值,给出人员聚集的警告信息。Based on the above purpose, a third aspect of the embodiments of the present invention proposes a computer device, including: at least one processor; and a memory, the memory stores computer instructions that can run on the processor, and the instructions are executed by the processor to The following steps are implemented: S1. Decode the video stream, and perform personnel detection on the decoded image through the deep learning model; S2. Dynamically track the personnel, record the personnel trajectory data, and determine whether the personnel is at rest according to the trajectory data State; S3, in response to the personnel being in a static state, clustering the central points of the personnel; and S4, in response to the average distance of the personnel in each cluster being less than the personnel aggregation determination parameter and the number of personnel greater than the preset value, giving the personnel aggregation warning message.
在一些实施方式中,所述通过深度学习模型对解码后得到的图像进行人员检测包括:给每个人员分配一个目标框,并判断目标框的个数是否大于第二预设值,响应于目标框的个数大于第二预设值,人员检测完毕。In some implementations, the person detection of the decoded image using the deep learning model includes: assigning a target frame to each person, and judging whether the number of target frames is greater than a second preset value, and responding to the target If the number of frames is greater than the second preset value, the person detection is completed.
在一些实施方式中,所述根据所述轨迹数据确定人员是否处于静止状态包括:每隔预设时间获取一次目标框的坐标,并判断所述人员最近预设数量个目标框的中心点是否均处于预设半径的圆内;响应于所述人员最近预设数量个目标框的中心点处于预设半径的圆内,认为所述人员处于静止状态。In some implementations, the determining whether the person is in a stationary state according to the trajectory data includes: obtaining the coordinates of the target frame every preset time, and judging whether the center points of the person's latest preset number of target frames are uniform. Being within a circle with a preset radius; in response to the center points of the nearest preset number of target frames of the person being within a circle with a preset radius, it is considered that the person is in a static state.
在一些实施方式中,所述对人员的中心点进行聚类包括:对所有判定为静止状态的目标框中心点进行聚类,选择离中心平均距离最小的一簇,根据所述簇中各目标框的宽度计算人员聚集判定参数。In some embodiments, the clustering of the center points of the personnel includes: clustering the center points of all target frames determined to be in a static state, selecting a cluster with the smallest average distance from the center, and according to each target in the cluster The width of the box is used to calculate the personnel gathering judgment parameter.
如图3所示,为本发明提供的上述检测人员聚集的计算机设备的一个实施例的硬件结构示意图。As shown in FIG. 3 , it is a schematic diagram of the hardware structure of an embodiment of the above-mentioned computer equipment for detecting people gathering provided by the present invention.
以如图3所示的装置为例,在该装置中包括一个处理器301以及一个存储器302。Taking the device shown in FIG. 3 as an example, the device includes a
处理器301和存储器302可以通过总线或者其他方式连接,图3中以通过总线连接为例。The
存储器302作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本申请实施例中的检测人员聚集的方法对应的程序指令/模块。处理器301通过运行存储在存储器302中的非易失性软件程序、指令以及模块,从而执行服务器的各种功能应用以及数据处理,即实现检测人员聚集的方法。The
存储器302可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据检测人员聚集的方法的使用所创建的数据等。此外,存储器302可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器302可选包括相对于处理器301远程设置的存储器,这些远程存储器可以通过网络连接至本地模块。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The
一个或者多个检测人员聚集的方法对应的计算机指令303存储在存储器302中,当被处理器301执行时,执行上述任意方法实施例中的检测人员聚集的方法。One or
执行上述检测人员聚集的方法的计算机设备的任何一个实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。Any one embodiment of the computer device that executes the above-mentioned method for detecting people gathering can achieve the same or similar effects as any of the above-mentioned method embodiments corresponding to it.
本发明还提供了一种计算机可读存储介质,计算机可读存储介质存储有被处理器执行时执行检测人员聚集的方法的计算机程序。The present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program for executing the method for detecting people gathering when executed by a processor.
如图4所示,为本发明提供的上述检测人员聚集的计算机存储介质的一个实施例的示意图。以如图4所示的计算机存储介质为例,计算机可读存储介质401存储有被处理器执行时执行如上方法的计算机程序402。As shown in FIG. 4 , it is a schematic diagram of an embodiment of the above-mentioned computer storage medium for detecting people gathering provided by the present invention. Taking the computer storage medium shown in FIG. 4 as an example, the computer
最后需要说明的是,本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关硬件来完成,检测人员聚集的方法的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,程序的存储介质可为磁碟、光盘、只读存储记忆体(ROM)或随机存储记忆体(RAM)等。上述计算机程序的实施例,可以达到与之对应的前述任意方法实施例相同或者相类似的效果。Finally, it should be noted that those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware to complete, and the program for detecting people gathering can be stored in a computer-readable When the program is executed, the program may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium of the program may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), and the like. The foregoing computer program embodiments can achieve the same or similar effects as any of the foregoing method embodiments corresponding thereto.
以上是本发明公开的示例性实施例,但是应当注意,在不背离权利要求限定的本发明实施例公开的范围的前提下,可以进行多种改变和修改。根据这里描述的公开实施例的方法权利要求的功能、步骤和/或动作不需以任何特定顺序执行。此外,尽管本发明实施例公开的元素可以以个体形式描述或要求,但除非明确限制为单数,也可以理解为多个。The above are the exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications can be made without departing from the scope of the disclosed embodiments of the present invention defined in the claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in an individual form, they may also be understood as a plurality unless explicitly limited to a singular number.
应当理解的是,在本文中使用的,除非上下文清楚地支持例外情况,单数形式“一个”旨在也包括复数形式。还应当理解的是,在本文中使用的“和/或”是指包括一个或者一个以上相关联地列出的项目的任意和所有可能组合。It should be understood that as used herein, the singular form "a" and "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
上述本发明实施例公开实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments disclosed in the above-mentioned embodiments of the present invention are only for description, and do not represent the advantages and disadvantages of the embodiments.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。Those of ordinary skill in the art can understand that all or part of the steps for implementing the above-mentioned embodiments can be completed by hardware, or can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. The above-mentioned The storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like.
所属领域的普通技术人员应当理解:以上任何实施例的讨论仅为示例性的,并非旨在暗示本发明实施例公开的范围(包括权利要求)被限于这些例子;在本发明实施例的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,并存在如上的本发明实施例的不同方面的许多其它变化,为了简明它们没有在细节中提供。因此,凡在本发明实施例的精神和原则之内,所做的任何省略、修改、等同替换、改进等,均应包含在本发明实施例的保护范围之内。Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is exemplary only, and is not intended to imply that the scope (including claims) disclosed by the embodiments of the present invention is limited to these examples; under the idea of the embodiments of the present invention , the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the above embodiments of the present invention, which are not provided in details for the sake of brevity. Therefore, within the spirit and principle of the embodiments of the present invention, any omissions, modifications, equivalent replacements, improvements, etc., shall be included in the protection scope of the embodiments of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211454719.3ACN115761636A (en) | 2022-11-21 | 2022-11-21 | Method, system, equipment and storage medium for detecting people gathering |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202211454719.3ACN115761636A (en) | 2022-11-21 | 2022-11-21 | Method, system, equipment and storage medium for detecting people gathering |
| Publication Number | Publication Date |
|---|---|
| CN115761636Atrue CN115761636A (en) | 2023-03-07 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202211454719.3AWithdrawnCN115761636A (en) | 2022-11-21 | 2022-11-21 | Method, system, equipment and storage medium for detecting people gathering |
| Country | Link |
|---|---|
| CN (1) | CN115761636A (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115984027A (en)* | 2023-03-20 | 2023-04-18 | 长沙迪迈数码科技股份有限公司 | Underground personnel gathering early warning method and device based on UWB and storage medium |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111325048A (en)* | 2018-12-13 | 2020-06-23 | 杭州海康威视数字技术股份有限公司 | Personnel gathering detection method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111325048A (en)* | 2018-12-13 | 2020-06-23 | 杭州海康威视数字技术股份有限公司 | Personnel gathering detection method and device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115984027A (en)* | 2023-03-20 | 2023-04-18 | 长沙迪迈数码科技股份有限公司 | Underground personnel gathering early warning method and device based on UWB and storage medium |
| Publication | Publication Date | Title |
|---|---|---|
| CN110688987A (en) | Pedestrian position detection and tracking method and system | |
| Ali et al. | RES: Real-time video stream analytics using edge enhanced clouds | |
| US10510157B2 (en) | Method and apparatus for real-time face-tracking and face-pose-selection on embedded vision systems | |
| US20110052068A1 (en) | Identifying anomalous object types during classification | |
| CN111724439A (en) | A visual positioning method and device in a dynamic scene | |
| CN107145833A (en) | Method and device for determining face area | |
| CN114360041B (en) | Fatigue state detection method and system based on key point detection and head posture | |
| WO2011022279A2 (en) | Background model for complex and dynamic scenes | |
| CN103440667B (en) | The automaton that under a kind of occlusion state, moving target is stably followed the trail of | |
| CN112232316B (en) | Crowd gathering detection method and device, electronic equipment and storage medium | |
| CN111291646A (en) | A method, device, equipment and storage medium for people flow statistics | |
| CN113887547B (en) | Key point detection method, device and electronic device | |
| CN109753884A (en) | A Video Behavior Recognition Method Based on Key Frame Extraction | |
| CN113537107A (en) | Face recognition and tracking method, device and equipment based on deep learning | |
| CN109993770A (en) | A target tracking method for adaptive spatiotemporal learning and state recognition | |
| CN110610120B (en) | A face track matching method | |
| CN115761636A (en) | Method, system, equipment and storage medium for detecting people gathering | |
| CN115578669A (en) | Method and device for identifying foreign matter in camera lens | |
| WO2023273629A1 (en) | System and apparatus for configuring neural network model in edge server | |
| CN114332163A (en) | A method and system for high-altitude parabolic detection based on semantic segmentation | |
| CN114359618A (en) | Training method of neural network model, electronic equipment and computer program product | |
| CN108710879B (en) | Pedestrian candidate region generation method based on grid clustering algorithm | |
| CN117133056A (en) | A method, device, electronic equipment and medium for monitoring phone calls | |
| CN114724236A (en) | Behavior identification method and system based on 3D convolutional neural network | |
| CN114913442A (en) | A kind of abnormal behavior detection method, device and computer storage medium |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| WW01 | Invention patent application withdrawn after publication | ||
| WW01 | Invention patent application withdrawn after publication | Application publication date:20230307 |