CN117392743A - Human body running identification method, device, electronic equipment and storage medium - Google Patents

Human body running identification method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117392743A
CN117392743A CN202311182981.1A CN202311182981A CN117392743A CN 117392743 A CN117392743 A CN 117392743A CN 202311182981 A CN202311182981 A CN 202311182981A CN 117392743 A CN117392743 A CN 117392743A
Authority
CN
China
Prior art keywords
human body
head
frame
detection frame
target image
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.)
Pending
Application number
CN202311182981.1A
Other languages
Chinese (zh)
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.)
Shenzhen Intellifusion Technologies Co Ltd
Original Assignee
Shenzhen Intellifusion Technologies Co Ltd
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 Shenzhen Intellifusion Technologies Co Ltd filed Critical Shenzhen Intellifusion Technologies Co Ltd
Priority to CN202311182981.1A priority Critical patent/CN117392743A/en
Publication of CN117392743A publication Critical patent/CN117392743A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V40/00Recognition of biometric, human-related or animal-related patterns in image or video data
    • G06V40/20Movements or behaviour, e.g. gesture recognition
    • G06V40/23Recognition of whole body movements, e.g. for sport training
    • G06V40/25Recognition of walking or running movements, e.g. gait recognition

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Psychiatry (AREA)
  • Social Psychology (AREA)
  • Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Traffic Control Systems (AREA)
  • Image Analysis (AREA)

Abstract

The application is applicable to the technical field of image processing, and provides a human running identification method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring target images of at least two frames including a target pedestrian; based on each target image, determining a human body center point and a human head detection frame corresponding to each target image; determining the moving speed of the head pixels of the target pedestrians based on each target image and the human body center point and the head detection frame corresponding to each target image; if the moving speed of the human head pixels is greater than or equal to the moving speed threshold of the human head pixels, determining that the target pedestrian is in a running state, compared with the problem that the classification accuracy is low or the recognition time is long in the human body running recognition method in the prior art, the human body running recognition accuracy is improved, and the human body running recognition efficiency in multiple scenes is also improved.

Description

人体奔跑的识别方法、装置、电子设备及存储介质Human body running recognition method, device, electronic equipment and storage medium

技术领域Technical field

本申请属于图像处理技术领域,尤其涉及一种人体奔跑的识别方法、装置、电子设备及存储介质。The present application belongs to the field of image processing technology, and in particular relates to a method, device, electronic equipment and storage medium for identifying human running.

背景技术Background technique

在城市治理等多个场景中,需要通过图像处理对行人是否处于奔跑状态进行识别。In many scenarios such as urban governance, image processing is needed to identify whether pedestrians are running.

目前人体奔跑的识别方法分类准确率较低或者识别时间比较长,响应速度慢,导致人体奔跑的识别效率低。The current recognition methods of human running have low classification accuracy or long recognition time and slow response speed, resulting in low recognition efficiency of human running.

现有技术存在人体奔跑的识别方法在多个场景识别效率低的问题。There is a problem in the existing technology that the recognition method of human running is inefficient in multiple scenes.

发明内容Contents of the invention

本申请实施例提供了一种人体奔跑的识别方法、装置、电子设备及存储介质,可以解决现有技术存在人体奔跑的识别方法在多个场景识别效率低的问题。Embodiments of the present application provide a method, device, electronic device, and storage medium for identifying human body running, which can solve the problem in the existing technology that the identification method of human body running is inefficient in multiple scenes.

第一方面,本申请实施例提供了一种人体奔跑的识别方法,包括:In the first aspect, embodiments of the present application provide a method for identifying human running, including:

获取包括目标行人的至少两帧的目标图像;Obtaining at least two frames of target images including the target pedestrian;

基于各所述目标图像,确定各所述目标图像对应的人体中心点和人头检测框;Based on each of the target images, determine the human body center point and the human head detection frame corresponding to each of the target images;

基于各所述目标图像以及各所述目标图像对应的所述人体中心点和所述人头检测框,确定所述目标行人的人头像素移动速度;Based on each of the target images and the human body center point and the head detection frame corresponding to each of the target images, determine the head pixel movement speed of the target pedestrian;

若所述人头像素移动速度大于或者等于人头像素移动速度阈值,确定所述目标行人为奔跑状态。If the moving speed of the head pixel is greater than or equal to the moving speed threshold of the head pixel, it is determined that the target pedestrian is in a running state.

在其中一个实施例中,各所述目标图像包括第一帧目标图像和第二帧目标图像;In one of the embodiments, each of the target images includes a first frame target image and a second frame target image;

基于各所述目标图像,确定各所述目标图像对应的人体中心点和人头检测框,包括:Based on each of the target images, determine the human body center point and head detection frame corresponding to each of the target images, including:

基于所述第一帧目标图像和所述第二帧目标图像,确定所述第一帧目标图像的第一人体检测框和所述第二帧目标图像的第二人体检测框;Based on the first frame target image and the second frame target image, determine the first human body detection frame of the first frame target image and the second human body detection frame of the second frame target image;

基于所述第一人体检测框和所述第二人体检测框,确定所述第一人体检测框对应的第一人体中心点和所述第二人体检测框对应的第二人体中心点;Based on the first human body detection frame and the second human body detection frame, determine the first human body center point corresponding to the first human body detection frame and the second human body center point corresponding to the second human body detection frame;

基于所述第一人体检测框和所述第二人体检测框,确定与所述第一人体中心点对应的第一人头检测框和与所述第二人体中心点对应的第二人头检测框,所述第一人头检测框处于所述第一人体检测框内,所述第二人头检测框处于所述第二人体检测框内。Based on the first human body detection frame and the second human body detection frame, determine a first human head detection frame corresponding to the first human body center point and a second human head detection frame corresponding to the second human body center point. , the first head detection frame is within the first human body detection frame, and the second head detection frame is within the second human body detection frame.

在其中一个实施例中,各所述目标图像包括第一帧目标图像和第二帧目标图像;In one of the embodiments, each of the target images includes a first frame target image and a second frame target image;

基于各所述目标图像,确定各所述目标图像对应的人体中心点和人头检测框,还包括:Based on each of the target images, determining the human body center point and the head detection frame corresponding to each of the target images also includes:

基于所述第一帧目标图像,同步确定所述第一帧目标图像的第一人体检测框和第一人头检测框;Based on the first frame of the target image, synchronously determine the first human body detection frame and the first head detection frame of the first frame of the target image;

基于所述第二帧目标图像,同步确定所述第二帧目标图像的第二人体检测框和第二人头检测框;Based on the second frame target image, synchronously determine a second human body detection frame and a second head detection frame of the second frame target image;

基于所述第一人体检测框和所述第二人体检测框,分别确定所述第一人体检测框对应的第一人体中心点和所述第二人体检测框对应的第二人体中心点。Based on the first human body detection frame and the second human body detection frame, a first human body center point corresponding to the first human body detection frame and a second human body center point corresponding to the second human body detection frame are respectively determined.

在其中一个实施例中,各所述目标图像包括第一帧目标图像和第二帧目标图像,所述第一帧目标图像对应第一人体中心点和第一人头检测框,所述第二帧目标图像对应第二人体中心点和第二人头检测框;In one embodiment, each of the target images includes a first frame of target image and a second frame of target image. The first frame of target image corresponds to a first human body center point and a first head detection frame, and the second frame of target image corresponds to a first human body center point and a first head detection frame. The frame target image corresponds to the second human body center point and the second head detection frame;

基于各所述目标图像以及各所述目标图像对应的所述人体中心点和所述人头检测框,确定所述目标行人的人头像素移动速度,包括:Based on each of the target images and the human body center point and the head detection frame corresponding to each of the target images, determining the head pixel movement speed of the target pedestrian includes:

基于所述第一人体中心点、所述第二人体中心点、所述第一人头检测框、所述第二人头检测框及所述第一帧目标图像和所述第二帧目标图像之间的间隔时间,确定所述目标行人的人头像素移动速度。Based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the first frame target image and the second frame target image. The interval time between, determine the head pixel moving speed of the target pedestrian.

在其中一个实施例中,所述基于所述第一人体中心点、所述第二人体中心点、所述第一人头检测框、所述第二人头检测框及所述第一帧目标图像和所述第二帧目标图像之间的间隔时间,确定所述目标行人的人头像素移动速度,包括:In one embodiment, the method is based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the first frame target image. The interval time between the second frame of the target image and the second frame of the target image determines the head pixel movement speed of the target pedestrian, including:

基于所述第一人体中心点的第一人体中心坐标和所述第二人体中心点的第二人体中心坐标,确定所述目标行人的人体像素移动距离;Determine the human body pixel movement distance of the target pedestrian based on the first human body center coordinate of the first human body center point and the second human body center coordinate of the second human body center point;

基于所述第一人头检测框的第一角点坐标和第二角点坐标,或者基于所述第二人头检测框的第三角点坐标和第四角点坐标,确定所述目标行人的人头像素宽度,其中,所述第一角点坐标对应的第一角点与所述第二角点坐标对应的第二角点为所述第一人头检测框的对角点,所述第二角点坐标对应的第三角点与所述第四角点坐标对应的第四角点为所述第二人头检测框的对角点;Determine the head of the target pedestrian based on the first corner point coordinates and the second corner point coordinates of the first head detection frame, or based on the third corner point coordinates and the fourth corner point coordinates of the second head detection frame Pixel width, wherein the first corner point corresponding to the first corner point coordinates and the second corner point corresponding to the second corner point coordinates are diagonal points of the first head detection frame, and the second corner point The third corner point corresponding to the corner point coordinates and the fourth corner point corresponding to the fourth corner point coordinates are diagonal points of the second head detection frame;

基于所述人体像素移动距离、所述人头像素宽度及所述间隔时间,确定所述目标行人的人头像素移动速度。Based on the human body pixel movement distance, the head pixel width and the interval time, the head pixel movement speed of the target pedestrian is determined.

在其中一个实施例中,所述人头像素移动速度包括沿第一方向的第一人头像素移动速度和沿第二方向的第二人头像素移动速度,其中,所述第一方向垂直于所述第二方向;In one embodiment, the head pixel moving speed includes a first head pixel moving speed along a first direction and a second head pixel moving speed along a second direction, wherein the first direction is perpendicular to the second direction;

所述基于所述第一人体中心点、所述第二人体中心点、所述第一人头检测框、所述第二人头检测框及所述第一帧目标图像和所述第二帧目标图像之间的间隔时间,确定所述目标行人的人头像素移动速度,还包括:The method is based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame, the first frame target image and the second frame target. The interval time between images determines the head pixel movement speed of the target pedestrian, and also includes:

基于所述第一人体中心点、所述第二人体中心点、所述第一人头检测框、所述第二人头检测框及所述第一帧目标图像和所述第二帧目标图像之间的间隔时间,确定所述第一人头像素移动速度;Based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the first frame target image and the second frame target image. The interval time between, determine the pixel movement speed of the first head;

基于所述第一人体中心点、所述第二人体中心点、所述第一人头检测框、所述第二人头检测框及所述第一帧目标图像和所述第二帧目标图像之间的间隔时间,确定所述第二人头像素移动速度;Based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the first frame target image and the second frame target image. determine the pixel movement speed of the second head;

基于所述第一人头像素移动速度和所述第二人头像素移动速度,确定所述目标行人的人头像素移动速度。Based on the first head pixel moving speed and the second head pixel moving speed, the head pixel moving speed of the target pedestrian is determined.

在其中一个实施例中,确定所述人头像素移动速度阈值,包括:In one embodiment, determining the head pixel movement speed threshold includes:

获取第一样本数据集、第二样本数据集和预设人头像素移动速度,所述第一样本数据集包括多个样本行人为奔跑状态的第一像素移动速度,所述第二样本数据集包括多个所述样本行人为行走状态的第二像素移动速度;Obtain a first sample data set, a second sample data set and a preset head pixel moving speed. The first sample data set includes the first pixel moving speed of multiple sample pedestrians in a running state. The second sample data The set includes a plurality of second pixel movement speeds of the sample pedestrians in the walking state;

若预设人头像素移动速度小于或者等于所述第一样本数据集的预设比例数量的第一像素移动速度,且所述预设人头像素移动速度大于或者等于所述第二样本数据集的所述预设比例数量的第二像素移动速度,确定所述预设人头像素移动速度为所述人头像素移动速度阈值。If the preset head pixel movement speed is less than or equal to the first pixel movement speed of the preset proportion of the first sample data set, and the preset head pixel movement speed is greater than or equal to the second sample data set The preset proportional number of second pixel movement speeds determines the preset head pixel movement speed as the head pixel movement speed threshold.

第二方面,本申请实施例提供了一种人体奔跑的识别装置,包括:In the second aspect, embodiments of the present application provide a device for identifying human body running, including:

获取模块,用于获取包括目标行人的至少两帧的目标图像;An acquisition module, configured to acquire at least two frames of target images including the target pedestrian;

第一确定模块,用于基于各所述目标图像,确定各所述目标图像对应的人体中心点和人头检测框;A first determination module, configured to determine the human body center point and head detection frame corresponding to each target image based on each of the target images;

第二确定模块,用于基于各所述目标图像以及各所述目标图像对应的所述人体中心点和所述人头检测框,确定所述目标行人的人头像素移动速度;A second determination module, configured to determine the head pixel movement speed of the target pedestrian based on each of the target images and the human body center point and the head detection frame corresponding to each of the target images;

第三确定模块,用于若所述人头像素移动速度大于或者等于人头像素移动速度阈值,确定所述目标行人为奔跑状态。The third determination module is used to determine that the target pedestrian is in a running state if the moving speed of the head pixel is greater than or equal to the moving speed threshold of the head pixel.

第三方面,本申请实施例提供了一种电子设备,包括存储器、处理器以及存储在存储器中并可在处理器上运行的计算机程序,处理器执行计算机程序时实现如第一方面内容中任一项所述的方法。In a third aspect, embodiments of the present application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, any of the contents in the first aspect are implemented. The method described in one item.

第四方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时实现如第一方面内容中任一项方法。In the fourth aspect, embodiments of the present application provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, any method in the first aspect is implemented.

本申请实施例与现有技术相比存在的有益效果是:Compared with the prior art, the beneficial effects of the embodiments of the present application are:

本申请实施例的第一方面提供的人体奔跑的识别方法,通过获取包括目标行人的至少两帧的目标图像;基于各目标图像,确定各目标图像对应的人体中心点和人头检测框;基于各目标图像以及各目标图像对应的人体中心点和人头检测框,确定目标行人的人头像素移动速度;若人头像素移动速度大于或者等于人头像素移动速度阈值,确定目标行人为奔跑状态,由于能通过包括目标行人的目标图像对应的人体中心点和人头检测框,确定目标行人的人头像素移动速度,并与人头像素移动速度阈值进行比较,即可判定目标行人是否处于奔跑状态,相比于现有技术的人体奔跑的识别方法分类准确率较低或者识别时间比较长的问题,既提高了人体奔跑的识别准确率,也提高了在多个场景的人体奔跑的识别效率。The first aspect of the embodiment of the present application provides a method for identifying human running by acquiring at least two frames of target images including target pedestrians; based on each target image, determining the human body center point and head detection frame corresponding to each target image; based on each target image The target image and the human body center point and head detection frame corresponding to each target image determine the head pixel moving speed of the target pedestrian; if the head pixel moving speed is greater than or equal to the head pixel moving speed threshold, it is determined that the target pedestrian is in a running state. Since it can pass The human body center point and head detection frame corresponding to the target pedestrian's target image are used to determine the head pixel moving speed of the target pedestrian, and compared with the head pixel moving speed threshold, it can be determined whether the target pedestrian is in a running state. Compared with the existing technology This method not only improves the accuracy of recognition of human running, but also improves the recognition efficiency of human running in multiple scenes.

可以理解的是,上述第二方面、第三方面和第四方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。It can be understood that the beneficial effects of the above-mentioned second aspect, third aspect and fourth aspect can be referred to the relevant description in the above-mentioned first aspect, and will not be described again here.

附图说明Description of the drawings

为了更清楚地说明本申请具体实施方式或现有技术中的技术方案,下面将对具体实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly explain the specific embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description The drawings illustrate some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without exerting creative efforts.

图1为本申请一实施例提供的一种人体奔跑的识别方法的流程示意图;Figure 1 is a schematic flowchart of a human running recognition method provided by an embodiment of the present application;

图2为本申请实施例提供的基于各目标图像,确定各目标图像对应的人体中心点和人头检测框的流程示意图;Figure 2 is a schematic flow chart of determining the human body center point and head detection frame corresponding to each target image based on each target image provided by the embodiment of the present application;

图3为本申请一实施例提供的第一帧目标图像与第二帧目标图像合成于图像坐标系的示意图;Figure 3 is a schematic diagram of the first frame target image and the second frame target image synthesized in the image coordinate system according to an embodiment of the present application;

图4为本申请另一实施例提供的基于各目标图像,确定各目标图像对应的人体中心点和人头检测框的流程示意图;Figure 4 is a schematic flowchart of determining the human body center point and the head detection frame corresponding to each target image based on each target image according to another embodiment of the present application;

图5为本申请一实施例提供的基于第一人体中心点、第二人体中心点、第一人头检测框、第二人头检测框及第一帧目标图像和第二帧目标图像之间的间隔时间,确定目标行人的人头像素移动速度的流程示意图;Figure 5 shows an embodiment of the present application based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the relationship between the first frame target image and the second frame target image. Interval time, process diagram for determining the pixel movement speed of the target pedestrian’s head;

图6为本申请另一实施例提供的基于第一人体中心点、第二人体中心点、第一人头检测框、第二人头检测框及第一帧目标图像和第二帧目标图像之间的间隔时间,确定目标行人的人头像素移动速度的流程示意图;Figure 6 shows another embodiment of the present application based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the relationship between the first frame target image and the second frame target image. The schematic flow chart of determining the pixel moving speed of the target pedestrian's head at the interval;

图7为本申请另一实施例提供的基于第一人体中心点、第二人体中心点、第一人头检测框、第二人头检测框及第一帧目标图像和第二帧目标图像之间的间隔时间,确定目标行人的人头像素移动速度的流程示意图;Figure 7 shows another embodiment of the present application based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the relationship between the first frame target image and the second frame target image. The schematic flow chart of determining the pixel moving speed of the target pedestrian's head at the interval;

图8为本申请一实施例提供的若人头像素移动速度大于或者等于人头像素移动速度阈值,确定目标行人为奔跑状态的流程示意图;Figure 8 is a schematic flowchart of determining that the target pedestrian is in a running state if the head pixel movement speed is greater than or equal to the head pixel movement speed threshold provided by an embodiment of the present application;

图9为本申请实施例提供的奔跑识别装置的结构示意图。Figure 9 is a schematic structural diagram of a running recognition device provided by an embodiment of the present application.

具体实施方式Detailed ways

以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、设备、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures and technologies are provided to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the application with unnecessary detail.

应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It will be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integers, steps, operations, elements and/or components but does not exclude one or more other The presence or addition of features, integers, steps, operations, elements, components and/or collections thereof.

还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "once" or "in response to determining" or "in response to detecting" depending on the context. ". Similarly, the phrase "if determined" or "if [the described condition or event] is detected" may be interpreted, depending on the context, to mean "once determined" or "in response to a determination" or "once the [described condition or event] is detected ]" or "in response to detection of [the described condition or event]".

另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of this application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.

在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。“多个”表示“两个或两个以上”。Reference in this specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Therefore, the phrases "in one embodiment", "in some embodiments", "in other embodiments", "in other embodiments", etc. appearing in different places in this specification are not necessarily References are made to the same embodiment, but rather to "one or more but not all embodiments" unless specifically stated otherwise. The terms “including,” “includes,” “having,” and variations thereof all mean “including but not limited to,” unless otherwise specifically emphasized. "Multiple" means "two or more".

在城市治理等多个场景中,需要通过图像处理对行人是否处于奔跑状态进行识别。In many scenarios such as urban governance, image processing is needed to identify whether pedestrians are running.

目前人体奔跑的识别方法分类准确率较低或者识别时间比较长,响应速度慢,导致人体奔跑的识别效率低。The current recognition methods of human running have low classification accuracy or long recognition time and slow response speed, resulting in low recognition efficiency of human running.

故现有技术存在人体奔跑的识别方法在多个场景识别效率低的问题。Therefore, there is a problem in the existing technology that the human running recognition method has low recognition efficiency in multiple scenes.

针对上述问题,本申请实施例提供的人体奔跑的识别方法,通过获取包括目标行人的至少两帧的目标图像;基于各目标图像,确定各目标图像对应的人体中心点和人头检测框;基于各目标图像以及各目标图像对应的人体中心点和人头检测框,确定目标行人的人头像素移动速度;若人头像素移动速度大于或者等于人头像素移动速度阈值,确定目标行人为奔跑状态,由于能通过包括目标行人的目标图像对应的人体中心点和人头检测框,确定目标行人的人头像素移动速度,并与人头像素移动速度阈值进行比较,即可判定目标行人是否处于奔跑状态,相比于现有技术的人体奔跑的识别方法分类准确率较低或者识别时间比较长的问题,既提高了人体奔跑的识别准确率,也提高了在多个场景的人体奔跑的识别效率。In response to the above problems, the embodiment of the present application provides a method for identifying human running by acquiring at least two frames of target images including target pedestrians; based on each target image, determining the human body center point and head detection frame corresponding to each target image; based on each target image. The target image and the human body center point and head detection frame corresponding to each target image determine the head pixel moving speed of the target pedestrian; if the head pixel moving speed is greater than or equal to the head pixel moving speed threshold, it is determined that the target pedestrian is in a running state. Since it can pass The human body center point and head detection frame corresponding to the target pedestrian's target image are used to determine the head pixel moving speed of the target pedestrian, and compared with the head pixel moving speed threshold, it can be determined whether the target pedestrian is in a running state. Compared with the existing technology This method not only improves the accuracy of recognition of human running, but also improves the recognition efficiency of human running in multiple scenes.

下面结合具体实施例对本申请提供的奔跑识别方法进行示例性的说明。The following is an exemplary description of the running recognition method provided by this application in conjunction with specific embodiments.

第一方面,如图1所示,本实施例提供了一种人体奔跑的识别方法,包括:In the first aspect, as shown in Figure 1, this embodiment provides a method for identifying human running, including:

S100,获取包括目标行人的至少两帧的目标图像。S100, obtain at least two frames of target images including the target pedestrian.

在一个实施例中,通过具有图像采集或视频采集的设备获取包括目标行人的至少两帧的目标图像,例如,通过移动电子眼等移动终端拍摄包括目标行人的至少2帧的图像,或者从监控摄像头的视频流中获取包括目标行人的至少2帧的图像,其中,目标行人为待进行人体奔跑识别的一个或多个行人,便于通过至少2帧的图像来识别目标行人的奔跑状态,目标图像具体的帧数根据场景需求进行确定,目标图像的帧数越多,人体的奔跑状态识别更准确,但奔跑状态的识别时间也会增加,识别效率会下降。In one embodiment, the target image including at least two frames of the target pedestrian is acquired through a device with image acquisition or video acquisition, for example, by capturing at least 2 frames of the image including the target pedestrian through a mobile terminal such as an electronic eye, or from a surveillance camera. Obtain at least 2 frames of images of the target pedestrian from the video stream, where the target pedestrian is one or more pedestrians to be identified as running human body, so that the running state of the target pedestrian can be identified through at least 2 frames of images, and the target image is specific The number of frames is determined according to the scene requirements. The more frames of the target image, the more accurate the recognition of the running state of the human body, but the recognition time of the running state will also increase and the recognition efficiency will decrease.

S200,基于各目标图像,确定各目标图像对应的人体中心点和人头检测框。S200: Based on each target image, determine the human body center point and head detection frame corresponding to each target image.

在一个实施例中,基于各目标图像,确定各目标图像对应的人体中心点和人头检测框,便于通过各目标图像获取图像之间的间隔时间,便于通过各人体中心点获取行人像素移动距离,便于通过人头检测框获取人头的宽度,以进一步获取人头像素移动速度。In one embodiment, based on each target image, the human body center point and the human head detection frame corresponding to each target image are determined, so that the interval time between images can be obtained through each target image, and the pedestrian pixel movement distance can be obtained through each human body center point. It is convenient to obtain the width of the head through the head detection frame to further obtain the pixel movement speed of the head.

在一个实施例中,各目标图像包括第一帧目标图像和第二帧目标图像,其中,第一帧目标图像和第二帧目标图像均包括目标行人,便于获取目标行人的人体检测框和人头检测框。In one embodiment, each target image includes a first frame of target image and a second frame of target image, wherein both the first frame of target image and the second frame of target image include a target pedestrian, which facilitates obtaining the human body detection frame and head of the target pedestrian. Detection box.

在一个实施例中,如图2所示,基于各目标图像,确定各目标图像对应的人体中心点和人头检测框,包括:In one embodiment, as shown in Figure 2, based on each target image, the human body center point and the head detection frame corresponding to each target image are determined, including:

S211,基于第一帧目标图像和第二帧目标图像,确定第一帧目标图像的第一人体检测框和第二帧目标图像的第二人体检测框。S211. Based on the first frame of the target image and the second frame of the target image, determine the first human body detection frame of the first frame of the target image and the second human body detection frame of the second frame of the target image.

在一个实施例中,如图3所示,基于第一帧目标图像(图中左侧图像)和第二帧目标图像(图中右侧图像),通过已训练好的人体检测模型追踪目标行人,并确定目标行人在第一帧目标图像的第一人体检测框和在第二帧目标图像的第二人体检测框,有利于通过各人体检测框确定目标行人的像素移动距离。In one embodiment, as shown in Figure 3, based on the first frame of the target image (the left image in the figure) and the second frame of the target image (the right image in the figure), the target pedestrian is tracked through the trained human body detection model , and determine the first human body detection frame of the target pedestrian in the first frame of the target image and the second human body detection frame in the second frame of the target image, which is beneficial to determining the pixel movement distance of the target pedestrian through each human body detection frame.

在一个实施例中,人体检测模型包括Yolo目标检测模型或CenterNet网络模型,通过已构建的Yolo(You Only Look Once)目标检测模型或CenterNet网络模型来检测第一帧目标图像和第二帧目标图像是否包括目标行人,并获取目标行人在第一帧目标图像的第一人体检测框和在第二帧目标图像的第二人体检测框。其中,CenterNet网络模型包括主干网络模型及目标检测模型,多个帧的目标图像为对每帧图像的像素值进行归一化处理后的图像。In one embodiment, the human detection model includes a Yolo target detection model or a CenterNet network model, and the first frame target image and the second frame target image are detected through the built Yolo (You Only Look Once) target detection model or CenterNet network model. Whether the target pedestrian is included, and the first human body detection frame of the target pedestrian in the first frame of the target image and the second human body detection frame of the second frame of the target image are obtained. Among them, the CenterNet network model includes a backbone network model and a target detection model. The target images of multiple frames are images after normalizing the pixel values of each frame image.

S212,基于第一人体检测框和第二人体检测框,确定第一人体检测框对应的第一人体中心点和第二人体检测框对应的第二人体中心点。S212: Based on the first human body detection frame and the second human body detection frame, determine the first human body center point corresponding to the first human body detection frame and the second human body center point corresponding to the second human body detection frame.

在一个实施例中,如图3所示,基于第一人体检测框和第二人体检测框,采用第一人体检测框的几何中心作为对应的第一人体中心点,采用第二人体检测框的几何中心作为对应的第二人体中心点,便于快速确认第一人体中心点和第二人体中心点的坐标,提高了人体奔跑识别效率。In one embodiment, as shown in Figure 3, based on the first human body detection frame and the second human body detection frame, the geometric center of the first human body detection frame is used as the corresponding first human body center point, and the second human body detection frame is used as the corresponding first human body center point. The geometric center serves as the corresponding second human body center point, which facilitates quick confirmation of the coordinates of the first human body center point and the second human body center point, and improves the efficiency of human running recognition.

S213,基于第一人体检测框和第二人体检测框,确定与第一人体中心点对应的第一人头检测框和与第二人体中心点对应的第二人头检测框。S213. Based on the first human body detection frame and the second human body detection frame, determine the first human head detection frame corresponding to the first human body center point and the second human head detection frame corresponding to the second human body center point.

在一个实施例中,如图3所示,基于第一人体检测框和第二人体检测框,通过已训练好的人头检测模型确定与第一人体中心点对应的第一人头检测框和与第二人体中心点对应的第二人头检测框;其中,第一人头检测框处于第一人体检测框内,第二人头检测框处于第二人体检测框内,在获取人体检测框后,再从人体检测框中确定目标行人的人头检测框,减少了识别目标行人头部的图像范围,有利于提高人体奔跑识别的运算速度,提高了人体奔跑识别的效率,同时,第一人头检测框与第一人体中心点对应,第二人头检测框与第二人体中心点对应,将人头检测框与对应的人体中心点对应,避免了人头检测框的误识别,提高了人体奔跑识别的准确率。In one embodiment, as shown in Figure 3, based on the first human body detection frame and the second human body detection frame, the first human head detection frame corresponding to the first human body center point and the first human head detection frame and the second human body detection frame are determined through the trained human head detection model. The second head detection frame corresponding to the center point of the second human body; wherein, the first head detection frame is within the first human body detection frame, and the second head detection frame is within the second human body detection frame. After obtaining the human body detection frame, Determining the target pedestrian's head detection frame from the human body detection frame reduces the image range for identifying the target pedestrian's head, which is beneficial to improving the computing speed of human running recognition and improving the efficiency of human running recognition. At the same time, the first head detection frame Corresponding to the first human body center point, the second human head detection frame corresponds to the second human body center point. Corresponding the human head detection frame to the corresponding human body center point avoids misidentification of the human head detection frame and improves the accuracy of human running recognition. .

在一个实施例中,训练人头检测模型包括:获取第一训练集和第一验证集,第一训练集包括已标注的近似于人头的物体和已标注的含有目标行人的目标图像,第一验证集包括未标注的含有目标行人的目标图像;采用第一训练集对人头检测模型进行训练,直到人头检测模型预测第一验证集的人头检测框的准确率大于或者等于预设百分比,且预设预测次数准确率的波动范围小于或者等于预设百分比范围。其中,预设百分比的取值范围为大于或者等于99%,预设百分比范围为0.1%,人头检测模型包括Yolo目标检测模型、CenterNet网络模型或Faster R-CNN中至少一种,由于训练集中包括了近似于人头的物体进行训练,提高了识别目标图像中人头检测框的准确率。In one embodiment, training the head detection model includes: obtaining a first training set and a first verification set. The first training set includes annotated objects similar to human heads and annotated target images containing target pedestrians. The first verification set The set includes unlabeled target images containing target pedestrians; the first training set is used to train the head detection model until the accuracy of the head detection model predicting the head detection frame of the first verification set is greater than or equal to the preset percentage, and the preset The fluctuation range of the prediction accuracy is less than or equal to the preset percentage range. Among them, the value range of the preset percentage is greater than or equal to 99%, and the preset percentage range is 0.1%. The head detection model includes at least one of the Yolo target detection model, CenterNet network model or Faster R-CNN. Since the training set includes The object is similar to the human head for training, which improves the accuracy of identifying the human head detection frame in the target image.

在另一个实施例中,如图4所示,基于各目标图像,确定各目标图像对应的人体中心点和人头检测框,还包括:In another embodiment, as shown in Figure 4, based on each target image, determining the human body center point and head detection frame corresponding to each target image also includes:

S221,基于第一帧目标图像,同步确定第一帧目标图像的第一人体检测框和第一人头检测框。S221. Based on the first frame of the target image, synchronously determine the first human body detection frame and the first head detection frame of the first frame of the target image.

S222,基于第二帧目标图像,同步确定第二帧目标图像的第二人体检测框和第二人头检测框。S222: Based on the target image of the second frame, synchronously determine the second human body detection frame and the second head detection frame of the target image of the second frame.

S223,基于第一人体检测框和第二人体检测框,分别确定第一人体检测框对应的第一人体中心点和第二人体检测框对应的第二人体中心点。S223: Based on the first human body detection frame and the second human body detection frame, respectively determine the first human body center point corresponding to the first human body detection frame and the second human body center point corresponding to the second human body detection frame.

在另一个实施例中,由于直接在第一帧目标图像中通过人体检测模型和人头检测模型同步确定第一帧目标图像的第一人体检测框和第一人头检测框,在第二帧目标图像中通过人体检测模型和人头检测模型同步确定第二帧目标图像的第二人体检测框和第二人头检测框,而无需在第一帧目标图像中先确定第一人体检测框,再确定第一人体检测框内的第一人头检测框,无需在第二帧目标图像中先确定第二人体检测框,再确定第二人体检测框内的第二人头检测框,从而提升了识别人头检测框的速度,提高了人体奔跑识别的效率。In another embodiment, since the first human body detection frame and the first head detection frame of the first frame target image are determined synchronously through the human body detection model and the head detection model directly in the first frame target image, in the second frame target image In the image, the human detection model and the human head detection model are used to simultaneously determine the second human body detection frame and the second human head detection frame of the second frame of the target image, without having to first determine the first human body detection frame in the first frame of the target image, and then determine the second human body detection frame in the first frame of the target image. The first head detection frame within a human body detection frame does not need to first determine the second human body detection frame in the second frame of the target image, and then determine the second head detection frame within the second human body detection frame, thus improving the recognition of head detection. The speed of the frame improves the efficiency of human running recognition.

S300,基于各目标图像以及各目标图像对应的人体中心点和人头检测框,确定目标行人的人头像素移动速度。S300: Determine the head pixel movement speed of the target pedestrian based on each target image and the human body center point and head detection frame corresponding to each target image.

在一个实施例中,基于各目标图像以及各目标图像对应的人体中心点和人头检测框,确定目标行人的人头像素移动速度,而无需映射为目标行人在实际场景中的物理速度,提高了确定目标行人的人头像素移动速度的速度,提高了人体奔跑识别的效率。In one embodiment, based on each target image and the human body center point and head detection frame corresponding to each target image, the head pixel moving speed of the target pedestrian is determined without mapping to the physical speed of the target pedestrian in the actual scene, which improves the determination The speed of the target pedestrian's head pixel movement speed improves the efficiency of human running recognition.

在一个实施例中,各目标图像包括第一帧目标图像和第二帧目标图像,第一帧目标图像对应第一人体中心点和第一人头检测框,第二帧目标图像对应第二人体中心点和第二人头检测框。In one embodiment, each target image includes a first frame target image and a second frame target image. The first frame target image corresponds to the first human body center point and the first head detection frame, and the second frame target image corresponds to the second human body. Center point and second head detection frame.

在一个实施例中,基于各目标图像以及各目标图像对应的人体中心点和人头检测框,确定目标行人的人头像素移动速度,包括:In one embodiment, determining the head pixel movement speed of the target pedestrian based on each target image and the human body center point and head detection frame corresponding to each target image includes:

基于第一人体中心点、第二人体中心点、第一人头检测框、第二人头检测框及第一帧目标图像和第二帧目标图像之间的间隔时间,确定目标行人的人头像素移动速度,由于无需映射为目标行人在实际场景中的物理速度,提高了确定目标行人的人头像素移动速度的速度,提高了人体奔跑识别的效率。Determine the head pixel movement of the target pedestrian based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the interval time between the first frame of the target image and the second frame of the target image. Since the speed does not need to be mapped to the physical speed of the target pedestrian in the actual scene, the speed of determining the head pixel movement speed of the target pedestrian is improved, and the efficiency of human running recognition is improved.

在一个实施例中,如图5所示,基于第一人体中心点、第二人体中心点、第一人头检测框、第二人头检测框及第一帧目标图像和第二帧目标图像之间的间隔时间,确定目标行人的人头像素移动速度,包括:In one embodiment, as shown in Figure 5, based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the first frame target image and the second frame target image. The interval time between the target pedestrian's head and pixel movement speed is determined, including:

S311,基于第一人体中心点的第一人体中心坐标和第二人体中心点的第二人体中心坐标,确定目标行人的人体像素移动距离。S311. Determine the human body pixel movement distance of the target pedestrian based on the first human body center coordinate of the first human body center point and the second human body center coordinate of the second human body center point.

在一个实施例中,由于人体检测模型能将不同时刻的目标行人在图像坐标系中形成一条运动轨迹,如图3所示,将包括目标行人的第一帧目标图像和第二帧目标图像合成在同一图像坐标系中,即相当于将第一帧目标图像和第二帧目标图像在同一图像坐标系中进行重叠而得到的合成目标图像,目标行人的运动轨迹的图像坐标系以合成图像的左上角为原点,沿垂直向下方向为X轴,沿水平向右方向为Y轴,左侧的第一帧目标图像的目标行人的第一人体中心坐标为右侧的第二帧目标图像的目标行人的第二人体中心坐标为/>基于第一人体中心点A0的第一人体中心坐标和第二人体中心点A1的第二人体中心坐标,通过欧式距离计算式确定目标行人的人体像素移动距离L,即人体像素移动距离L为第一人体中心点A0与第二人体中心点A1之间的像素距离。In one embodiment, since the human body detection model can form a motion trajectory of the target pedestrian at different times in the image coordinate system, as shown in Figure 3, the first frame of the target image and the second frame of the target image including the target pedestrian are synthesized. In the same image coordinate system, that is, it is equivalent to a composite target image obtained by overlapping the first frame target image and the second frame target image in the same image coordinate system. The image coordinate system of the target pedestrian's movement trajectory is based on the composite image. The upper left corner is the origin, the vertical downward direction is the X axis, and the horizontal right direction is the Y axis. The first human body center coordinate of the target pedestrian in the first frame of the target image on the left is The second human body center coordinate of the target pedestrian in the second frame of the target image on the right is/> Based on the first human body center coordinates of the first human body center point A0 and the second human body center coordinates of the second human body center point A1, the human body pixel movement distance L of the target pedestrian is determined through the Euclidean distance calculation formula, that is, the human body pixel movement distance L is The pixel distance between the first human body center point A0 and the second human body center point A1.

在一个实施例中,获取人体像素移动距离L1的欧式距离计算式如下:In one embodiment, the Euclidean distance calculation formula for obtaining the human body pixel movement distance L1 is as follows:

S312,基于第一人头检测框的第一角点坐标和第二角点坐标,或者基于第二人头检测框的第三角点坐标和第四角点坐标,确定目标行人的人头像素宽度。S312. Determine the head pixel width of the target pedestrian based on the first corner point coordinates and the second corner point coordinates of the first head detection frame, or based on the third corner point coordinates and the fourth corner point coordinates of the second head detection frame.

在一个实施例中,如图3所示,第一角点坐标对应的第一角点与第二角点坐标对应的第二角点为第一人头检测框的对角点,即第一人头检测框的角点H01与对角点H03;第二角点坐标对应的第三角点与第四角点坐标对应的第四角点为第二人头检测框的对角点,即第二人头检测框的角点H11与对角点H13,有利于矩形的人头检测框的2个对角点坐标确定水平方向或垂直方向目标行人的人头像素宽度。In one embodiment, as shown in Figure 3, the first corner point corresponding to the first corner point coordinates and the second corner point corresponding to the second corner point coordinates are diagonal points of the first head detection frame, that is, the first The corner point H01 and the diagonal point H03 of the head detection frame; the third corner point corresponding to the coordinates of the second corner point and the fourth corner point corresponding to the coordinates of the fourth corner point are the diagonal points of the second head detection frame, that is, the second The corner point H11 and the diagonal point H13 of the head detection frame are conducive to determining the head pixel width of the target pedestrian in the horizontal or vertical direction.

在一个实施例中,如图3所示,基于第一人头检测框的角点H01的第一角点坐标和对角点的第二角点坐标/>或者基于第二人头检测框的第三角点坐标/>和对角点的第四角点坐标/>确定目标行人的人头像素宽度,即人头像素宽度/>或者人头像素宽度 In one embodiment, as shown in Figure 3, based on the first corner point coordinates of the corner point H01 of the first head detection frame and the coordinates of the second corner point of the opposite corner/> Or based on the third corner point coordinates of the second head detection frame/> and the fourth corner coordinate of the opposite corner/> Determine the head pixel width of the target pedestrian, that is, the head pixel width/> Or head pixel width

S313,基于人体像素移动距离、人头像素宽度及间隔时间,确定目标行人的人头像素移动速度。S313: Determine the head pixel moving speed of the target pedestrian based on the human body pixel moving distance, head pixel width and interval time.

在一个实施例中,基于人体像素移动距离L、人头像素宽度W及间隔时间t,通过人头像素移动速度计算式确定目标行人的人头像素移动速度v,由于无需将人头像素移动速度映射为目标行人在实际场景中的物理速度,且只针对一个人头检测框确定人头像素宽度,进一步提高了确定目标行人的人头像素移动速度的速度,进一步提高了人体奔跑识别的效率。In one embodiment, based on the human body pixel movement distance L, the head pixel width and the interval time t, the head pixel movement speed v of the target pedestrian is determined through the head pixel movement speed calculation formula. Since there is no need to map the head pixel movement speed to the target pedestrian The physical speed in the actual scene, and only determining the head pixel width for one head detection frame, further improves the speed of determining the head pixel moving speed of the target pedestrian, and further improves the efficiency of human running recognition.

在一个实施例中,人头像素移动速度计算式为:In one embodiment, the calculation formula of the head pixel movement speed is:

v=L/W/tv=L/W/t

其中,v为人头像素移动速度,L为人体像素移动距离,W为人头像素宽度,t为间隔时间,即间隔时间为第一帧目标图像对应的时刻与第二帧目标图像对应的时刻之间时间段。Among them, v is the moving speed of the human head pixels, L is the moving distance of the human head pixels, W is the pixel width of the human head, and t is the interval time, that is, the interval time is between the moment corresponding to the first frame of the target image and the moment corresponding to the second frame of the target image. period.

在一个实施例中,间隔时间的取值范围为小于或者等于1秒,在本实施例中,间隔时间的具体数值根据不同场景人体奔跑识别的需求进行设置,例如间隔时间还能为0.5秒。In one embodiment, the value range of the interval time is less than or equal to 1 second. In this embodiment, the specific value of the interval time is set according to the needs of human running recognition in different scenarios. For example, the interval time can also be 0.5 seconds.

在另一个实施例中,人头像素移动速度包括沿第一方向的第一人头像素移动速度和沿第二方向的第二人头像素移动速度,其中,第一方向垂直于第二方向,例如,第一方向为水平方向(即图像坐标系Y轴方向),第二方向为垂直方向(即图像坐标系X轴方向)。In another embodiment, the head pixel moving speed includes a first head pixel moving speed along a first direction and a second head pixel moving speed along a second direction, where the first direction is perpendicular to the second direction, for example, The first direction is the horizontal direction (ie, the Y-axis direction of the image coordinate system), and the second direction is the vertical direction (ie, the X-axis direction of the image coordinate system).

在另一个实施例中,如图6所示,基于第一人体中心点、第二人体中心点、第一人头检测框、第二人头检测框及第一帧目标图像和第二帧目标图像之间的间隔时间,确定目标行人的人头像素移动速度,还包括:In another embodiment, as shown in Figure 6, based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame, the first frame target image and the second frame target image The interval time between determines the head pixel movement speed of the target pedestrian, and also includes:

S321,基于第一人体中心点、第二人体中心点、第一人头检测框、第二人头检测框及第一帧目标图像和第二帧目标图像之间的间隔时间,确定第一人头像素移动速度。S321: Determine the first person's avatar based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the interval between the first frame target image and the second frame target image. element movement speed.

在另一个实施例中,基于第一人体中心点、第二人体中心点、第一人头检测框、第二人头检测框及第一帧目标图像和第二帧目标图像之间的间隔时间,确定第一人头像素移动速度,由于计算了水平方向的第一人头像素移动速度,进一步提高了人头像素移动速度的准确率,也进一步提高了人体奔跑识别的准确率。In another embodiment, based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the interval time between the first frame target image and the second frame target image, To determine the moving speed of the first head pixel, since the moving speed of the first head pixel in the horizontal direction is calculated, the accuracy of the moving speed of the head pixel is further improved, and the accuracy of human running recognition is further improved.

在另一个实施例中,如图7所示,基于第一人体中心点、第二人体中心点、第一人头检测框、第二人头检测框及第一帧目标图像和第二帧目标图像之间的间隔时间,确定第一人头像素移动速度,包括:In another embodiment, as shown in Figure 7, based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame, the first frame target image and the second frame target image The interval time between determines the moving speed of the first head pixel, including:

S3211,基于第一人体中心点的第一人体中心坐标和第二人体中心点的第二人体中心坐标,确定目标行人的沿第一方向的第一人体像素移动距离。S3211. Based on the first human body center coordinate of the first human body center point and the second human body center coordinate of the second human body center point, determine the first human body pixel movement distance of the target pedestrian along the first direction.

在另一个实施例中,基于第一帧目标图像的目标行人的第一人体中心坐标为和第二帧目标图像的目标行人的第二人体中心坐标为/> 确定目标行人的沿第一方向的第一人体像素移动距离/> In another embodiment, the first body center coordinate of the target pedestrian based on the first frame of the target image is and the second human body center coordinates of the target pedestrian in the second frame of the target image are/> Determine the movement distance of the first human pixel of the target pedestrian along the first direction/>

S3212,基于第一人头检测框的第一角点坐标和对角点的第二角点坐标以及第二人头检测框的第三角点坐标和对角点的第四角点坐标,确定目标行人的沿第一方向的第一人头像素宽度,S3212: Determine the target pedestrian based on the first corner point coordinates and the second corner point coordinates of the diagonal point of the first head detection frame, and the third corner point coordinates and the fourth corner point coordinates of the diagonal point of the second head detection frame. The width of the first head pixel along the first direction,

在另一个实施例中,第一角点坐标对应的第一角点在第一人头检测框的位置与第三角点坐标对应的第三角点在第二人头检测框的位置相同,例如第一人头检测框的角点H01的位置与第二人头检测框的角点H11的位置相同。In another embodiment, the position of the first corner point corresponding to the first corner point coordinates in the first head detection frame is the same as the position of the third corner point corresponding to the third corner point coordinates in the second head detection frame. For example, the first The position of the corner point H01 of the head detection frame is the same as the position of the corner point H11 of the second head detection frame.

在另一个实施例中,基于第一人头检测框的角点H01的第一角点坐标和对角点H03的第二角点坐标/>以及第二人头检测框的角点H11的第三角点坐标/>和对角点H13的第四角点坐标通过第一人头像素宽度计算式确定目标行人的沿第一方向的第一人头像素宽度,由于通过取第一人头检测框和第二人头检测框在第一方向的人头像素宽度平均值为第一人头像素宽度W1,提高了第一人头像素宽度的准确率,也提高了人体奔跑识别的准确率。In another embodiment, based on the first corner point coordinates of the corner point H01 of the first head detection frame and the second corner point coordinates of the diagonal point H03/> And the third corner point coordinates of the corner point H11 of the second head detection frame/> and the coordinates of the fourth corner point of diagonal point H13 The first head pixel width of the target pedestrian along the first direction is determined by the first head pixel width calculation formula, because by taking the average head pixel width of the first head detection frame and the second head detection frame in the first direction is the first head pixel width W1, which improves the accuracy of the first head pixel width and also improves the accuracy of human running recognition.

在另一个实施例中,第一人头像素宽度计算式为:In another embodiment, the calculation formula of the first head pixel width is:

其中,W1为第一人头像素宽度。Among them, W1 is the pixel width of the first head.

S3213,基于第一人体像素移动距离和第一人头像素宽度,确定目标行人的沿第一方向的第一人头像素移动速度。S3213. Based on the first human body pixel movement distance and the first head pixel width, determine the first head pixel movement speed of the target pedestrian along the first direction.

在另一个实施例中,基于第一人体像素移动距离和第一人头像素宽度,通过第一人头像素移动速度计算式确定目标行人的沿第一方向的第一人头像素移动速度。In another embodiment, based on the first body pixel movement distance and the first head pixel width, the first head pixel movement speed of the target pedestrian along the first direction is determined through a first head pixel movement speed calculation formula.

在另一个实施例中,第一人头像素移动速度计算式为:In another embodiment, the calculation formula of the first head pixel moving speed is:

v1=L1/W1/tv1=L1/W1/t

其中,v1为第一人头像素移动速度,L1为第一人体像素移动距离,W1为第一人头像素宽度,t为间隔时间,即间隔时间为第一帧目标图像对应的时刻与第二帧目标图像对应的时刻之间时间段。Among them, v1 is the moving speed of the first human head pixel, L1 is the moving distance of the first human head pixel, W1 is the pixel width of the first human head, t is the interval time, that is, the interval time is the moment corresponding to the first frame of the target image and the second The time period between the moments corresponding to the frame target image.

S322,基于第一人体中心点、第二人体中心点、第一人头检测框、第二人头检测框及第一帧目标图像和第二帧目标图像之间的间隔时间,确定第二人头像素移动速度。S322: Determine the second head pixel based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the interval between the first frame target image and the second frame target image. Moving speed.

在另一个实施例中,基于第一人体中心点、第二人体中心点、第一人头检测框、第二人头检测框及第一帧目标图像和第二帧目标图像之间的间隔时间,确定第二人头像素移动速度,包括:In another embodiment, based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the interval time between the first frame target image and the second frame target image, Determine the pixel movement speed of the second head, including:

S3211,基于第一人体中心点的第一人体中心坐标和第二人体中心点的第二人体中心坐标,确定目标行人的沿第二方向的第二人体像素移动距离。S3211. Based on the first human body center coordinate of the first human body center point and the second human body center coordinate of the second human body center point, determine the second human body pixel movement distance of the target pedestrian along the second direction.

在另一个实施例中,基于第一帧目标图像的目标行人的第一人体中心坐标为和第二帧目标图像的目标行人的第二人体中心坐标为/> 确定目标行人的沿第二方向的第二人体像素移动距离/> In another embodiment, the first body center coordinate of the target pedestrian based on the first frame of the target image is and the second human body center coordinates of the target pedestrian in the second frame of the target image are/> Determine the movement distance of the second human body pixel of the target pedestrian in the second direction/>

S3212,基于第一人头检测框的第一角点坐标和对角点的第二角点坐标以及第二人头检测框的第三角点坐标和对角点的第四角点坐标,确定目标行人的沿第二方向的第二人头像素宽度。S3212: Determine the target pedestrian based on the first corner point coordinates and the second corner point coordinates of the diagonal point of the first head detection frame, and the third corner point coordinates and the fourth corner point coordinates of the diagonal point of the second head detection frame. The pixel width of the second head along the second direction.

在另一个实施例中,第一角点坐标对应的第一角点在第一人头检测框的位置与第三角点坐标对应的第三角点在第二人头检测框的位置相同,例如第一人头检测框的角点H01的位置与第二人头检测框的角点H11的位置相同。In another embodiment, the position of the first corner point corresponding to the first corner point coordinates in the first head detection frame is the same as the position of the third corner point corresponding to the third corner point coordinates in the second head detection frame. For example, the first The position of the corner point H01 of the head detection frame is the same as the position of the corner point H11 of the second head detection frame.

在另一个实施例中,基于第一人头检测框的角点H01的第一角点坐标和对角点H03的第二角点坐标/>以及第二人头检测框的角点H11的第三角点坐标/>和对角点H13的第四角点坐标通过第二人头像素宽度计算式确定目标行人的沿第二方向的第二人头像素宽度,由于通过取第一人头检测框和第二人头检测框在第二方向的人头像素宽度平均值为第二人头像素宽度W2,提高了第二人头像素宽度的准确率,也提高了人体奔跑识别的准确率。In another embodiment, based on the first corner point coordinates of the corner point H01 of the first head detection frame and the second corner point coordinates of the diagonal point H03/> And the third corner point coordinates of the corner point H11 of the second head detection frame/> and the coordinates of the fourth corner point of diagonal point H13 The second head pixel width of the target pedestrian along the second direction is determined by the second head pixel width calculation formula. Since the average head pixel width of the first head detection frame and the second head detection frame in the second direction is the The pixel width of the second head W2 improves the accuracy of the pixel width of the second head and also improves the accuracy of human running recognition.

在另一个实施例中,第二人头像素宽度计算式为:In another embodiment, the calculation formula of the second head pixel width is:

其中,W2为第二人头像素宽度。Among them, W2 is the pixel width of the second head.

S3213,基于第二人体像素移动距离和第二人头像素宽度,确定目标行人的沿第二方向的第二人头像素移动速度。S3213. Based on the second human body pixel movement distance and the second head pixel width, determine the second head pixel movement speed of the target pedestrian along the second direction.

在另一个实施例中,基于第二人体像素移动距离和第二人头像素宽度,通过第二人头像素移动速度计算式确定目标行人的沿第二方向的第而人头像素移动速度。In another embodiment, based on the second body pixel movement distance and the second head pixel width, the second head pixel movement speed of the target pedestrian along the second direction is determined through a second head pixel movement speed calculation formula.

在另一个实施例中,第二人头像素移动速度计算式为:In another embodiment, the calculation formula of the second head pixel movement speed is:

v2=L2/W2/tv2=L2/W2/t

其中,v2为第二人头像素移动速度,L2为第二人体像素移动距离,W2为第二人头像素宽度,t为间隔时间,即间隔时间为第一帧目标图像对应的时刻与第二帧目标图像对应的时刻之间时间段。Among them, v2 is the pixel moving speed of the second human head, L2 is the moving distance of the second human head pixel, W2 is the pixel width of the second human head, t is the interval time, that is, the interval time is the moment corresponding to the first frame of the target image and the second frame of the target. The time period between the corresponding moments of the image.

S323,基于第一人头像素移动速度和第二人头像素移动速度,确定目标行人的人头像素移动速度。S323: Determine the head pixel moving speed of the target pedestrian based on the first head pixel moving speed and the second head pixel moving speed.

在另一个实施例中,基于第一人头像素移动速度v1和第二人头像素移动速度v2,通过合成人头像素移动速度计算式确定目标行人的人头像素移动速度,由于先确定目标行人的沿第一方向的第一人体像素移动速度,再确定目标行人的沿第二方向的第二人体像素移动速度,然后将第一人体像素移动速度和第二人体像素移动速度合成为人头像素移动速度,进一步提高了人头像素移动速度的准确率,也进一步提高了人体奔跑识别的准确率。In another embodiment, based on the first head pixel moving speed v1 and the second head pixel moving speed v2, the head pixel moving speed of the target pedestrian is determined by synthesizing the head pixel moving speed calculation formula. The moving speed of the first human body pixel in one direction is determined, and then the moving speed of the second human body pixel in the second direction of the target pedestrian is determined, and then the first human body pixel moving speed and the second human body pixel moving speed are synthesized into the head pixel moving speed, and further It improves the accuracy of the pixel movement speed of the human head and further improves the accuracy of human running recognition.

在另一个实施例中,合成人头像素移动速度计算式为:In another embodiment, the calculation formula of the synthetic human head pixel movement speed is:

其中,v为人头像素移动速度,v1为第一人头像素移动速度,v2为第二人头像素移动速度。Among them, v is the pixel movement speed of the head, v1 is the pixel movement speed of the first head, and v2 is the pixel movement speed of the second head.

S400,若人头像素移动速度大于或者等于人头像素移动速度阈值,确定目标行人为奔跑状态。S400: If the head pixel moving speed is greater than or equal to the head pixel moving speed threshold, determine that the target pedestrian is in a running state.

在一个实施例中,若人头像素移动速度大于或者等于人头像素移动速度阈值,确定目标行人为奔跑状态,由于无需将人头像素移动速度映射为场景中目标行人的物理移动速度,降低了人体奔跑识别的运算时间,提高了人体奔跑识别的效率。In one embodiment, if the head pixel movement speed is greater than or equal to the head pixel movement speed threshold, the target pedestrian is determined to be in a running state. Since there is no need to map the head pixel movement speed to the target pedestrian's physical movement speed in the scene, human running recognition is reduced. The computing time improves the efficiency of human running recognition.

在一个实施例中,如图8所示,确定人头像素移动速度阈值,包括:In one embodiment, as shown in Figure 8, determining the head pixel movement speed threshold includes:

S410,获取第一样本数据集、第二样本数据集和预设人头像素移动速度,第一样本数据集包括多个样本行人为奔跑状态的第一像素移动速度,第二样本数据集包括多个样本行人为行走状态的第二像素移动速度。S410: Obtain the first sample data set, the second sample data set and the preset human head pixel moving speed. The first sample data set includes the first pixel moving speed of multiple sample pedestrians in the running state. The second sample data set includes The second pixel movement speed of multiple sample pedestrians in the walking state.

S420,若预设人头像素移动速度小于或者等于第一样本数据集的预设比例数量的第一像素移动速度,且预设人头像素移动速度大于或者等于第二样本数据集的预设比例数量的第二像素移动速度,确定预设人头像素移动速度为人头像素移动速度阈值。S420, if the preset head pixel movement speed is less than or equal to the first pixel movement speed of the preset proportion number of the first sample data set, and the preset head pixel movement speed is greater than or equal to the preset proportion number of the second sample data set The second pixel moving speed is determined to be the preset head pixel moving speed as the head pixel moving speed threshold.

在一个实施例中,预设比例的取值范围为大于或者等于95%,有利于在多个场景中获取更准确的人头像素移动速度阈值,提高了人体奔跑识别在多个场景的准确率。In one embodiment, the value range of the preset ratio is greater than or equal to 95%, which is beneficial to obtaining more accurate human head pixel movement speed thresholds in multiple scenes, and improves the accuracy of human running recognition in multiple scenes.

本申请实施例与现有技术相比存在的有益效果是:Compared with the prior art, the beneficial effects of the embodiments of the present application are:

本申请实施例的第一方面提供的人体奔跑的识别方法,通过获取包括目标行人的至少两帧的目标图像;基于各目标图像,确定各目标图像对应的人体中心点和人头检测框;基于各目标图像以及各目标图像对应的人体中心点和人头检测框,确定目标行人的人头像素移动速度;若人头像素移动速度大于或者等于人头像素移动速度阈值,确定目标行人为奔跑状态,由于能通过包括目标行人的目标图像对应的人体中心点和人头检测框,确定目标行人的人头像素移动速度,并与人头像素移动速度阈值进行比较,即可判定目标行人是否处于奔跑状态,相比于现有技术的人体奔跑的识别方法分类准确率较低或者识别时间比较长的问题,既提高了人体奔跑的识别准确率,也提高了在多个场景的人体奔跑的识别效率。The first aspect of the embodiment of the present application provides a method for identifying human running by acquiring at least two frames of target images including target pedestrians; based on each target image, determining the human body center point and head detection frame corresponding to each target image; based on each target image The target image and the human body center point and head detection frame corresponding to each target image determine the head pixel moving speed of the target pedestrian; if the head pixel moving speed is greater than or equal to the head pixel moving speed threshold, it is determined that the target pedestrian is in a running state. Since it can pass The human body center point and head detection frame corresponding to the target pedestrian's target image are used to determine the head pixel moving speed of the target pedestrian, and compared with the head pixel moving speed threshold, it can be determined whether the target pedestrian is in a running state. Compared with the existing technology This method not only improves the accuracy of recognition of human running, but also improves the recognition efficiency of human running in multiple scenes.

下面结合附图对本申请提供的奔跑识别装置进行示例性的说明。The following is an exemplary description of the running recognition device provided by the present application with reference to the accompanying drawings.

对应于上文实施例所述的奔跑识别方法,第二方面,如图9所示,本申请实施例提供了一种人体奔跑的识别装置100,包括:Corresponding to the running identification method described in the above embodiment, in the second aspect, as shown in Figure 9, an embodiment of the present application provides a human running identification device 100, which includes:

获取模块110,用于获取包括目标行人的至少两帧的目标图像。The acquisition module 110 is configured to acquire at least two frames of target images including the target pedestrian.

第一确定模块120,用于基于各所述目标图像,确定各所述目标图像对应的人体中心点和人头检测框。The first determination module 120 is configured to determine, based on each of the target images, the human body center point and the human head detection frame corresponding to each of the target images.

第二确定模块130,用于基于各所述目标图像以及各所述目标图像对应的所述人体中心点和所述人头检测框,确定所述目标行人的人头像素移动速度。The second determination module 130 is configured to determine the head pixel moving speed of the target pedestrian based on each of the target images and the human body center point and the head detection frame corresponding to each of the target images.

第三确定模块140,用于若所述人头像素移动速度大于或者等于人头像素移动速度阈值,确定所述目标行人为奔跑状态。The third determination module 140 is configured to determine that the target pedestrian is in a running state if the moving speed of the head pixel is greater than or equal to the moving speed threshold of the head pixel.

需要说明的是,上述模块/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information interaction, execution process, etc. between the above-mentioned modules/units are based on the same concept as the method embodiments of this application, and their specific functions and technical effects can be found in the method embodiments section. No further details will be given.

所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above functional units and modules is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs. Module completion means dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be hardware-based. It can also be implemented in the form of software functional units. In addition, the specific names of each functional unit and module are only for the convenience of distinguishing each other and are not used to limit the scope of protection of the present application. For the specific working processes of the units and modules in the above system, please refer to the corresponding processes in the foregoing method embodiments, and will not be described again here.

第三方面,本申请实施例还提供了一种电子设备,包括存储器、处理器902以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器902执行所述计算机程序时实现如上所述的奔跑识别方法的各个步骤。In a third aspect, embodiments of the present application also provide an electronic device, including a memory, a processor 902, and a computer program stored in the memory and executable on the processor. The processor 902 executes the The computer program implements various steps of the run recognition method as described above.

在应用中,电子设备可包括,但不仅限于,处理器以及存储器,电子设备还可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如,输入输出设备、网络接入设备等。输入输出设备可以包括摄像头、音频采集/播放器件、显示屏等。网络接入设备可以包括网络模块,用于与外部设备进行无线网络。In applications, the electronic device may include, but is not limited to, a processor and a memory. The electronic device may also include more or less components than shown, or a combination of certain components, or different components, such as input and output devices. , network access equipment, etc. Input and output devices can include cameras, audio collection/playback devices, displays, etc. The network access device may include a network module for wireless networking with external devices.

在应用中,处理器可以是中央处理单元(Central Processing Unit,CPU),该处理器还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。In an application, the processor can be a central processing unit (CPU), which can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit) , ASIC), Field-Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

在应用中,存储器在一些实施例中可以是电子设备的内部存储单元,例如电子设备的硬盘或内存。存储器在另一些实施例中也可以是电子设备的外部存储设备,例如,电子设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(SecureDigital,SD)卡,闪存卡(Flash Card)等。存储器还可以既包括电子设备的内部存储单元也包括外部存储设备。存储器用于存储操作系统、应用程序、引导装载程序(Boot Loader)、数据以及其他程序等,例如计算机程序的程序代码等。存储器还可以用于暂时存储已经输出或者将要输出的数据。In applications, the memory in some embodiments may be an internal storage unit of the electronic device, such as a hard drive or memory of the electronic device. In other embodiments, the memory may also be an external storage device of the electronic device, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SD) card, or a flash memory equipped on the electronic device. Flash Card, etc. Memory may also include both internal storage units of the electronic device and external storage devices. Memory is used to store operating systems, applications, boot loaders, data, and other programs, such as program codes of computer programs. The memory can also be used to temporarily store data that has been output or will be output.

第四方面,本申请实施例还提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,计算机程序被处理器执行时可实现上述各个方法实施例中的步骤。In a fourth aspect, embodiments of the present application also provide a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps in each of the above method embodiments can be implemented.

本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质至少可以包括:能够将计算机程序代码携带到电子设备的任何实体或设备、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。This application implements all or part of the processes in the above embodiment method, which can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When executed by the processor, the computer program can Implement the steps of each of the above method embodiments. Wherein, the computer program includes computer program code, which may be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device capable of carrying computer program code to an electronic device, recording media, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. For example, U disk, mobile hard disk, magnetic disk or CD, etc.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above embodiments, each embodiment is described with its own emphasis. For parts that are not detailed or documented in a certain embodiment, please refer to the relevant descriptions of other embodiments.

本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的设备及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art will appreciate that the devices and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each specific application, but such implementations should not be considered beyond the scope of this application.

在本申请所提供的实施例中,应该理解到,所揭露的装置/设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed devices/devices and methods can be implemented in other ways. For example, the apparatus/equipment embodiments described above are only illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or units. Components can be combined or can be integrated into another system, or some features can be ignored, or not implemented. On the other hand, the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be in electrical, mechanical or other forms.

所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or they may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-described embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still implement the above-mentioned implementations. The technical solutions described in the examples are modified, or some of the technical features are equivalently replaced; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions in the embodiments of this application, and should be included in within the protection scope of this application.

Claims (10)

1. A method for identifying human running, comprising:
acquiring target images of at least two frames including a target pedestrian;
based on each target image, determining a human body center point and a human head detection frame corresponding to each target image;
Determining the moving speed of the head pixels of the target pedestrian based on each target image and the human body center point and the head detection frame corresponding to each target image;
and if the moving speed of the head pixels is greater than or equal to the threshold value of the moving speed of the head pixels, determining the artificial running state of the target pedestrian.
2. The method of claim 1, wherein each of the target images comprises a first frame target image and a second frame target image;
based on each target image, determining a human body center point and a human head detection frame corresponding to each target image, including:
determining a first human body detection frame of the first frame target image and a second human body detection frame of the second frame target image based on the first frame target image and the second frame target image;
determining a first human body center point corresponding to the first human body detection frame and a second human body center point corresponding to the second human body detection frame based on the first human body detection frame and the second human body detection frame;
based on the first human body detection frame and the second human body detection frame, determining a first human head detection frame corresponding to the first human body center point and a second human head detection frame corresponding to the second human body center point, wherein the first human head detection frame is positioned in the first human body detection frame, and the second human head detection frame is positioned in the second human body detection frame.
3. The method of claim 1, wherein each of the target images comprises a first frame target image and a second frame target image;
based on each target image, determining a human body center point and a human head detection frame corresponding to each target image, and further comprising:
based on the first frame target image, synchronously determining a first human body detection frame and a first human head detection frame of the first frame target image;
synchronously determining a second human body detection frame and a second human head detection frame of the second frame target image based on the second frame target image;
and based on the first human body detection frame and the second human body detection frame, respectively determining a first human body center point corresponding to the first human body detection frame and a second human body center point corresponding to the second human body detection frame.
4. The method of claim 1, wherein each of the target images comprises a first frame of target image and a second frame of target image, the first frame of target image corresponding to a first human body center point and a first human head detection frame, the second frame of target image corresponding to a second human body center point and a second human head detection frame;
based on each of the target images and the human body center point and the human head detection frame corresponding to each of the target images, determining a human head pixel movement speed of the target pedestrian includes:
And determining the moving speed of the head pixels of the target pedestrian based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame and the interval time between the first frame target image and the second frame target image.
5. The method of claim 4, wherein the determining the head pixel movement speed of the target pedestrian based on the first human body center point, the second human body center point, the first human head detection frame, the second human head detection frame, and a spacing time between the first frame target image and the second frame target image comprises:
determining a human body pixel moving distance of the target pedestrian based on the first human body center coordinates of the first human body center point and the second human body center coordinates of the second human body center point;
determining the width of a head pixel of the target pedestrian based on a first corner coordinate and a second corner coordinate of the first head detection frame or based on a third corner coordinate and a fourth corner coordinate of the second head detection frame, wherein a first corner corresponding to the first corner coordinate and a second corner corresponding to the second corner coordinate are diagonal points of the first head detection frame, and a third corner corresponding to the second corner coordinate and a fourth corner corresponding to the fourth corner coordinate are diagonal points of the second head detection frame;
And determining the head pixel moving speed of the target pedestrian based on the human body pixel moving distance, the head pixel width and the interval time.
6. The method of claim 4, wherein the head pixel movement speed comprises a first head pixel movement speed in a first direction and a second head pixel movement speed in a second direction, wherein the first direction is perpendicular to the second direction;
the determining the moving speed of the head pixel of the target pedestrian based on the first human body center point, the second human body center point, the first head detection frame, the second head detection frame, and the interval time between the first frame target image and the second frame target image further includes:
determining the first human head pixel moving speed based on the first human body center point, the second human body center point, the first human head detecting frame, the second human head detecting frame and the interval time between the first frame target image and the second frame target image;
determining the second human head pixel moving speed based on the first human body center point, the second human body center point, the first human head detecting frame, the second human head detecting frame and the interval time between the first frame target image and the second frame target image;
And determining the head pixel moving speed of the target pedestrian based on the first head pixel moving speed and the second head pixel moving speed.
7. The method of claim 1, wherein determining the head pixel movement speed threshold comprises:
acquiring a first sample data set, a second sample data set and a preset head pixel moving speed, wherein the first sample data set comprises a plurality of first pixel moving speeds of sample pedestrians in a human running state, and the second sample data set comprises a plurality of second pixel moving speeds of the sample pedestrians in a walking state;
if the preset head pixel moving speed is smaller than or equal to the first pixel moving speed of the preset proportion number of the first sample data set, and the preset head pixel moving speed is larger than or equal to the second pixel moving speed of the preset proportion number of the second sample data set, determining that the preset head pixel moving speed is the head pixel moving speed threshold.
8. An identification device for running by a human body, comprising:
the acquisition module is used for acquiring target images of at least two frames including a target pedestrian;
The first determining module is used for determining a human body center point and a human head detection frame corresponding to each target image based on each target image;
the second determining module is used for determining the moving speed of the head pixels of the target pedestrian based on the target images, the human body center point corresponding to the target images and the head detection frame;
and the third determining module is used for determining the artificial running state of the target pedestrian if the moving speed of the head pixel is greater than or equal to the threshold value of the moving speed of the head pixel.
9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 7.
CN202311182981.1A 2023-09-13 2023-09-13 Human body running identification method, device, electronic equipment and storage medium Pending CN117392743A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311182981.1A CN117392743A (en) 2023-09-13 2023-09-13 Human body running identification method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311182981.1A CN117392743A (en) 2023-09-13 2023-09-13 Human body running identification method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117392743A true CN117392743A (en) 2024-01-12

Family

ID=89436301

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311182981.1A Pending CN117392743A (en) 2023-09-13 2023-09-13 Human body running identification method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117392743A (en)

Similar Documents

Publication Publication Date Title
CN111259868B (en) Reverse vehicle detection method, system and medium based on convolutional neural network
CN111797657A (en) Vehicle surrounding obstacle detection method, device, storage medium and electronic device
WO2009047366A2 (en) Methods and systems for processing of video data
CN110378243A (en) A kind of pedestrian detection method and device
CN110751206A (en) Multi-target intelligent imaging and identifying device and method
CN112836699B (en) A berth entry and exit event analysis method based on long-term multi-target tracking
Ambardekar Efficient vehicle tracking and classification for an automated traffic surveillance system
CN112037256A (en) Target tracking method and device, terminal equipment and computer readable storage medium
CN113763431B (en) Target tracking method, system, electronic device and storage medium
CN115620090A (en) Model training method, low-illumination target re-identification method and device, and terminal equipment
CN111753601B (en) Image processing method, device and storage medium
CN114463372A (en) Vehicle identification method and device, terminal equipment and computer readable storage medium
CN113052118A (en) Method, system, device, processor and storage medium for realizing scene change video analysis and detection based on high-speed dome camera
CN116734834A (en) Positioning and mapping methods, devices and intelligent equipment applied to dynamic scenes
CN116884065A (en) Face recognition method and computer-readable storage medium
CN114897762B (en) Automatic positioning method and device for coal mining machine on coal mine working face
CN117132648B (en) Visual positioning method, electronic equipment and computer readable storage medium
CN117392743A (en) Human body running identification method, device, electronic equipment and storage medium
CN118823726A (en) Method, device and vehicle for constructing multi-task dataset for automatic parking
CN113705643B (en) Target detection method and device and electronic equipment
CN117115238A (en) A method, electronic device and storage medium for determining posture
WO2023056199A1 (en) A system and method to improve object detection accuracy by focus bracketing
Fleck et al. Low-power traffic surveillance using multiple rgb and event cameras: A survey
CN109493349B (en) Image feature processing module, augmented reality equipment and corner detection method
CN114529587A (en) Video target tracking method and device, electronic equipment and storage medium

Legal Events

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