WO2022116829A1 - Human behavior recognition method and apparatus, computer device and readable storage medium - Google Patents
Human behavior recognition method and apparatus, computer device and readable storage medium Download PDFInfo
- Publication number
- WO2022116829A1 WO2022116829A1 PCT/CN2021/131200 CN2021131200W WO2022116829A1 WO 2022116829 A1 WO2022116829 A1 WO 2022116829A1 CN 2021131200 W CN2021131200 W CN 2021131200W WO 2022116829 A1 WO2022116829 A1 WO 2022116829A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- human body
- behavior
- key points
- body key
- sample
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 63
- 230000008569 process Effects 0.000 claims abstract description 21
- 238000007405 data analysis Methods 0.000 claims abstract description 9
- 230000006399 behavior Effects 0.000 claims description 264
- 238000012545 processing Methods 0.000 claims description 27
- 238000012549 training Methods 0.000 claims description 26
- 238000010606 normalization Methods 0.000 claims description 25
- 238000001514 detection method Methods 0.000 claims description 13
- 238000004590 computer program Methods 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 claims description 7
- 230000003542 behavioural effect Effects 0.000 claims description 5
- 230000009471 action Effects 0.000 claims description 4
- 238000004458 analytical method Methods 0.000 abstract description 7
- 238000010586 diagram Methods 0.000 description 16
- 230000000694 effects Effects 0.000 description 15
- 238000004891 communication Methods 0.000 description 11
- 230000006870 function Effects 0.000 description 11
- 239000000203 mixture Substances 0.000 description 9
- 238000005516 engineering process Methods 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 210000003423 ankle Anatomy 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 210000003127 knee Anatomy 0.000 description 2
- 238000012706 support-vector machine Methods 0.000 description 2
- 210000000707 wrist Anatomy 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 210000004247 hand Anatomy 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000010801 machine learning Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000013598 vector Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V40/00—Recognition of biometric, human-related or animal-related patterns in image or video data
- G06V40/20—Movements or behaviour, e.g. gesture recognition
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
- G06F18/241—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
- G06F18/2411—Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on the proximity to a decision surface, e.g. support vector machines
Definitions
- Behavior analysis technology can identify the specific types of human behavior, and correspondingly analyze the specific intention of human behavior in the application field of the behavior analysis technology, so as to effectively improve the service effect of electronic equipment.
- behavior analysis technology the specific efficiency and accuracy of human behavior recognition are important factors that affect the final effect of behavior analysis.
- FIG. 5 is a schematic flowchart of the sub-steps included in step S230 in FIG. 2;
- FIG. 1 is only a schematic diagram of the composition of the computer device 10, and the computer device 10 may further include more or less components than those shown in FIG. 1 shows different configurations. Each component shown in FIG. 1 may be implemented in hardware, software, or a combination thereof.
- the embodiment of the present application provides human behavior recognition The method achieves the aforementioned objects.
- the human action recognition method provided by the present application will be described in detail below.
- the preset probability threshold is used to verify the recognition reliability of the SVM behavior classifier, and the target person calculated by the SVM behavior classifier is classified into different identifiable behavior categories.
- the maximum probability value among the probability values is used to represent the maximum possibility that the human behavior of the target person is effectively recognized.
- the computer device 10 determines whether the target person can be effectively identified by comparing the maximum probability value with the preset probability threshold.
- N samples can be selected to collect objects, and n people are taken as a batch, and the same behavior can be collected during each batch of N/n batches.
- Category of behavioral image data in which each batch takes the same amount of time to collect behavioral image data.
- the sample collection object may be required to have a small range of motion changes (for example, body tilt and head swing, etc.) , but the overall human behavior category needs to be consistent, so that the final number of sample characters for different behavior categories is equal to the value of the corresponding behavior image frames multiplied by n.
- the normalization processing module 120 performs normalization processing on the position information of multiple human body key points of each sample person in the corresponding sample image, and obtains the relationship between the sample person and the multiple human body key points in the sample image.
- the relative positional relationship can be expressed as follows:
- the functions are implemented in the form of software function modules and sold or used as independent products, they may be stored in a readable storage medium.
- the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a readable storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
- the aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other various programs that can store program codes medium.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Data Mining & Analysis (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Evolutionary Computation (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Biology (AREA)
- General Health & Medical Sciences (AREA)
- Psychiatry (AREA)
- Social Psychology (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Image Analysis (AREA)
Abstract
The present application relates to the technical field of behavior analysis, and provides a human behavior recognition method and apparatus, a computer device and a readable storage medium,. The present application comprises: obtaining a relative position relationship between multiple human body key points by means of obtaining position information and degrees of confidence respective to the multiple human body key points of a target character in an image to be recognized and then normalizing the position information respective to the multiple human body key points; then, calling a pre-stored SVM behavior classifier to perform data analysis on the degrees of confidence respective to the multiple human body key points and the relative position relationship between the multiple human body key points to obtain a corresponding human behavior category of the target character in the image. In the foregoing manner, the accuracy of human behavior recognition is improved by means of combining the position information and degrees of confidence of the human body key points in the process of human behavior category recognition, and the efficiency of human behavior recognition is increased by means of the high operating efficiency of the SVM classifier.
Description
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2020年12月1日提交中国专利局的申请号为202011388513.6、名称为“人体行为识别方法、装置、计算机设备及可读存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202011388513.6 and entitled "Human Behavior Recognition Method, Device, Computer Equipment and Readable Storage Medium" filed with the China Patent Office on December 1, 2020, the entire content of which is approved by Reference is incorporated in this application.
本申请涉及行为分析技术领域,具体而言,涉及一种人体行为识别方法、装置、计算机设备及可读存储介质。The present application relates to the technical field of behavior analysis, and in particular, to a method, device, computer equipment and readable storage medium for identifying human behavior.
随着硬件计算能力的提升和人工智能的兴起,计算机视觉技术的应用越发广泛,其中行为分析技术是当前计算机视觉技术的一项重要分支。行为分析技术能够对人体行为的具体种类进行识别,并相应地解析出人体行为在该行为分析技术所在应用领域中的具体意图,以便于有效提升电子设备服务效果。而对于行为分析技术来说,人体行为识别的具体效率及精准度,便是影响行为分析的最终效果的重要因素。With the improvement of hardware computing power and the rise of artificial intelligence, the application of computer vision technology is more and more extensive, among which behavior analysis technology is an important branch of current computer vision technology. Behavior analysis technology can identify the specific types of human behavior, and correspondingly analyze the specific intention of human behavior in the application field of the behavior analysis technology, so as to effectively improve the service effect of electronic equipment. For behavior analysis technology, the specific efficiency and accuracy of human behavior recognition are important factors that affect the final effect of behavior analysis.
申请内容Application content
有鉴于此,本申请的目的包括提供一种人体行为识别方法、装置、计算机设备及可读存储介质,能够在提升人体行为识别精准度的同时,提升人体行为识别效率。In view of this, the purpose of the present application includes providing a human behavior recognition method, device, computer equipment and readable storage medium, which can improve the human behavior recognition accuracy while improving the human behavior recognition efficiency.
为了实现上述目的,本申请实施例采用的技术方案如下:In order to achieve the above purpose, the technical solutions adopted in the embodiments of the present application are as follows:
第一方面,本申请提供一种人体行为识别方法,所述方法包括:In a first aspect, the present application provides a method for recognizing human behavior, the method comprising:
获取待识别图像,并对所述待识别图像进行人体关键点检测,得到所述待识别图像中目标人物所对应的多个人体关键点各自的位置信息及置信度;Obtaining an image to be recognized, and performing human body key point detection on the image to be recognized, to obtain respective position information and confidence levels of multiple human key points corresponding to the target person in the image to be recognized;
对所述目标人物所对应的多个人体关键点各自的位置信息进行归一化处理,得到所述目标人物所对应的多个人体关键点之间的相对位置关系;Normalizing the respective position information of the multiple human body key points corresponding to the target person, to obtain the relative positional relationship between the multiple human body key points corresponding to the target person;
调用预存的SVM行为分类器对所述多个人体关键点各自的置信度及所述多个人体关键点之间的相对位置关系进行数据分析,得到所述目标人物在所述待识别图像中的人体行为类别。Call the pre-stored SVM behavior classifier to perform data analysis on the respective confidence levels of the multiple human body key points and the relative positional relationship between the multiple human body key points, and obtain the target person in the to-be-recognized image. Human behavior category.
在可选的实施方式中,所述SVM行为分类器对应有多个可识别行为类别,所述调用预存的SVM行为分类器对所述多个人体关键点各自的置信度及所述多个人体关键点之间的相对位置关系进行数据分析,得到所述目标人物在所述待识别图像中的人体行为类别的步骤,包括:In an optional implementation manner, the SVM behavior classifier corresponds to a plurality of identifiable behavior categories, and the pre-stored SVM behavior classifier is called for the respective confidence levels of the multiple human body key points and the multiple human body key points. The steps of performing data analysis on the relative positional relationship between the key points to obtain the human behavior category of the target person in the to-be-recognized image, including:
根据所述多个人体关键点各自的置信度及所述多个人体关键点之间的相对位置关系,调用所述SVM行为分类器计算所述目标人物被划分到各可识别行为类别下的概率值;According to the respective confidence levels of the multiple human body key points and the relative positional relationship between the multiple human body key points, the SVM behavior classifier is invoked to calculate the probability that the target person is classified into each identifiable behavior category value;
从计算出的各可识别行为类别的概率值中提取最大概率数值,并将所述最大概率数值与预设概率阈值进行比较;Extract the maximum probability value from the calculated probability values of each identifiable behavior category, and compare the maximum probability value with a preset probability threshold;
若所述最大概率数值等于或大于所述预设概率阈值,则将所述最大概率数值所对应的可识别行为类别作为所述目标人物的人体行为类别。If the maximum probability value is equal to or greater than the preset probability threshold, the identifiable behavior category corresponding to the maximum probability value is used as the human behavior category of the target person.
在可选的实施方式中,所述方法还包括:In an optional embodiment, the method further includes:
获取不同行为类别各自的样本行为数据集,其中所述样本行为数据集包括被划分到相同行为类别下的多个样本人物各自在对应样本图像中的多个人体关键点的位置信息及置信度,不同行为类别各自对应的样本人物数目相同;Obtaining respective sample behavior data sets of different behavior categories, wherein the sample behavior data sets include position information and confidence levels of multiple human body key points in the corresponding sample images of multiple sample characters divided into the same behavior category, The number of sample characters corresponding to different behavior categories is the same;
对每个样本人物在对应样本图像中的多个人体关键点的位置信息进行归一化处理,得到所述样本人物在所述样本图像中的多个人体关键点之间的相对位置关系;Normalizing the position information of a plurality of human body key points in the corresponding sample image for each sample character, to obtain the relative positional relationship between the multiple human body key points of the sample character in the sample image;
根据不同行为类别各自对应的多个样本人物在对应样本图像中的多个人体关键点的置信度以及所述多个人体关键点之间的相对位置关系,对初始SVM分类器进行模型训练,得到所述SVM行为分类器。According to the confidence of multiple human body key points in the corresponding sample images of multiple sample characters corresponding to different behavior categories and the relative positional relationship between the multiple human body key points, the initial SVM classifier is model trained to obtain The SVM behavioral classifier.
在可选的实施方式中,针对目标人物或样本人物,对该人物在对应图像中的多个人体关键点的位置信息进行归一化处理,得到所述多个人体关键点之间的相对位置关系的步骤,包括:In an optional embodiment, for a target person or a sample person, the position information of multiple human body key points in the corresponding image is normalized to obtain the relative positions of the multiple human body key points. Relationship steps, including:
根据所述多个人体关键点各自在对应图像中的原图横纵坐标值,确定所述多个人体关键点的最小外接矩形区域的区域高度及区域宽度,以及对应人体参照点的原图横纵坐标值;Determine the area height and area width of the minimum circumscribed rectangular area of the multiple human body key points according to the horizontal and vertical coordinates of the original image in the corresponding images of the multiple human body key points, and determine the horizontal and vertical coordinates of the original image corresponding to the human body reference points. ordinate value;
针对每个人体关键点,将该人体关键点的原图横坐标值和所述人体参照点的原图横 坐标值之间的差值,与所述区域宽度进行除法运算,得到该人体关键点的归一化横坐标值;For each human body key point, the difference between the original image abscissa value of the human body key point and the original image abscissa value of the human body reference point is divided by the area width to obtain the human body key point The normalized abscissa value of ;
针对每个人体关键点,将该人体关键点的原图纵坐标值和所述人体参照点的原图纵坐标值之间的差值,与所述区域高度进行除法运算,得到该人体关键点的归一化纵坐标值。For each key point of the human body, the difference between the ordinate value of the original image of the key point of the human body and the ordinate value of the original image of the human body reference point is divided by the height of the region to obtain the key point of the human body The normalized ordinate value of .
第二方面,本申请提供一种人体行为识别装置,所述装置包括:In a second aspect, the present application provides a human behavior recognition device, the device comprising:
人体检测模块,用于获取待识别图像,并对所述待识别图像进行人体关键点检测,得到所述待识别图像中目标人物所对应的多个人体关键点各自的位置信息及置信度;a human body detection module, configured to obtain an image to be recognized, and perform human body key point detection on the image to be recognized, to obtain respective position information and confidence levels of multiple human key points corresponding to the target person in the to-be-recognized image;
归一化处理模块,用于对所述目标人物所对应的多个人体关键点各自的位置信息进行归一化处理,得到所述目标人物所对应的多个人体关键点之间的相对位置关系;The normalization processing module is used to normalize the respective position information of the multiple human body key points corresponding to the target person, so as to obtain the relative positional relationship between the multiple human body key points corresponding to the target person ;
行为识别模块,用于调用预存的SVM行为分类器对所述多个人体关键点各自的置信度及所述多个人体关键点之间的相对位置关系进行数据分析,得到所述目标人物在所述待识别图像中的人体行为类别。The behavior recognition module is used to call the pre-stored SVM behavior classifier to perform data analysis on the respective confidence levels of the multiple human body key points and the relative positional relationship between the multiple human body key points, and obtain the target person at the location. Describe the human behavior category in the image to be recognized.
在可选的实施方式中,所述SVM行为分类器对应有多个可识别行为类别,所述行为识别模块包括:In an optional implementation manner, the SVM behavior classifier corresponds to a plurality of identifiable behavior categories, and the behavior identification module includes:
概率计算子模块,用于根据所述多个人体关键点各自的置信度及所述多个人体关键点之间的相对位置关系,调用所述SVM行为分类器计算所述目标人物被划分到各可识别行为类别下的概率值;The probability calculation sub-module is used to call the SVM behavior classifier to calculate that the target person is divided into different positions according to the respective confidence levels of the multiple human key points and the relative positional relationship between the multiple human key points. Probability values under identifiable behavior categories;
概率比较子模块,用于从计算出的各可识别行为类别的概率值中提取最大概率数值,并将所述最大概率数值与预设概率阈值进行比较;a probability comparison submodule, used for extracting the maximum probability value from the calculated probability values of each identifiable behavior category, and comparing the maximum probability value with a preset probability threshold;
类别输出子模块,用于若所述最大概率数值等于或大于所述预设概率阈值,则将所述最大概率数值所对应的可识别行为类别作为所述目标人物的人体行为类别。A category output sub-module, configured to use the identifiable behavior category corresponding to the maximum probability value as the human behavior category of the target person if the maximum probability value is equal to or greater than the preset probability threshold.
在可选的实施方式中,所述装置还包括:In an optional embodiment, the device further comprises:
样本获取模块,用于获取不同行为类别各自的样本行为数据集,其中所述样本行为数据集包括被划分到相同行为类别下的多个样本人物各自在对应样本图像中的多个人体关键点的位置信息及置信度,不同行为类别各自对应的样本人物数目相同;The sample acquisition module is used to acquire respective sample behavior data sets of different behavior categories, wherein the sample behavior data sets include the data of the multiple human body key points in the corresponding sample images of the multiple sample characters that are divided into the same behavior category. Location information and confidence, the number of sample characters corresponding to different behavior categories is the same;
所述归一化处理模块,还用于对每个样本人物在对应样本图像中的多个人体关键点的位置信息进行归一化处理,得到所述样本人物在所述样本图像中的多个人体关键点之间的相对位置关系;The normalization processing module is further configured to perform normalization processing on the position information of multiple human body key points of each sample person in the corresponding sample image, so as to obtain a plurality of people of the sample person in the sample image. The relative positional relationship between the key points of the body;
分类器训练模块,用于根据不同行为类别各自对应的多个样本人物在对应样本图像中的多个人体关键点的置信度以及所述多个人体关键点之间的相对位置关系,对初始SVM分类器进行模型训练,得到所述SVM行为分类器。The classifier training module is used for, according to the confidence of the multiple human body key points in the corresponding sample images and the relative positional relationship between the multiple human key points corresponding to the multiple sample characters corresponding to different behavior categories, for the initial SVM The classifier performs model training to obtain the SVM behavior classifier.
在可选的实施方式中,所述归一化处理模块针对目标人物或样本人物,对该人物在对应图像中的多个人体关键点的位置信息进行归一化处理,得到所述多个人体关键点之间的相对位置关系的方式,包括:In an optional embodiment, the normalization processing module performs normalization processing on the position information of multiple human body key points in the corresponding image for the target person or the sample person, and obtains the multiple human bodies Ways of relative positional relationship between key points, including:
根据所述多个人体关键点各自在对应图像中的原图横纵坐标值,确定所述多个人体关键点的最小外接矩形区域的区域高度及区域宽度,以及对应人体参照点的原图横纵坐标值;Determine the area height and area width of the minimum circumscribed rectangular area of the multiple human body key points according to the horizontal and vertical coordinates of the original image in the corresponding images of the multiple human body key points, and determine the horizontal and vertical coordinates of the original image corresponding to the human body reference points. ordinate value;
针对每个人体关键点,将该人体关键点的原图横坐标值和所述人体参照点的原图横坐标值之间的差值,与所述区域宽度进行除法运算,得到该人体关键点的归一化横坐标值;For each human body key point, the difference between the original image abscissa value of the human body key point and the original image abscissa value of the human body reference point is divided by the area width to obtain the human body key point The normalized abscissa value of ;
针对每个人体关键点,将该人体关键点的原图纵坐标值和所述人体参照点的原图纵坐标值之间的差值,与所述区域高度进行除法运算,得到该人体关键点的归一化纵坐标值。For each key point of the human body, the difference between the ordinate value of the original image of the key point of the human body and the ordinate value of the original image of the human body reference point is divided by the height of the region to obtain the key point of the human body The normalized ordinate value of .
第三方面,本申请提供一种计算机设备,所述计算机设备包括处理器和存储器,所述存储器存储有能够被所述处理器执行的计算机程序,所述处理器可执行所述计算机程序,以实现前述实施方式中任意一项所述的人体行为识别方法。In a third aspect, the present application provides a computer device, the computer device includes a processor and a memory, the memory stores a computer program executable by the processor, and the processor can execute the computer program to The method for recognizing human behavior described in any one of the foregoing embodiments is implemented.
第四方面,本申请提供一种可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现前述实施方式中任意一项所述的人体行为识别方法。In a fourth aspect, the present application provides a readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the method for recognizing human behavior described in any one of the foregoing embodiments.
本申请实施例的有益效果包括如下内容:The beneficial effects of the embodiments of the present application include the following:
本申请通过获取待识别图像中目标人物的多个人体关键点各自的位置信息及置信度,而后对多个人体关键点各自的位置信息进行归一化处理,得到这多个人体关键点之间的相对位置关系,进而调用预存的SVM行为分类器对这多个人体关键点各自的置信 度及这多个人体关键点之间的相对位置关系进行数据分析,得到该目标人物在待识别图像中对应的人体行为类别,由此通过将人体关键点的位置信息及置信度结合到人体行为类别识别过程中,提升人体行为识别精准度,并通过SVM分类器具有的运行高效性,提升人体行为识别效率。The present application obtains the respective position information and confidence of multiple human body key points of the target person in the image to be recognized, and then normalizes the respective position information of the multiple human body key points to obtain the relationship between the multiple human body key points. Then call the pre-stored SVM behavior classifier to analyze the confidence of the multiple human key points and the relative position relationship between the multiple human key points, and obtain the target person in the image to be recognized. Corresponding human behavior category, thus improving the accuracy of human behavior recognition by combining the position information and confidence of human key points into the human behavior category recognition process, and improving human behavior recognition through the operating efficiency of the SVM classifier. efficiency.
为使本申请的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the preferred embodiments are exemplified below, and are described in detail as follows in conjunction with the accompanying drawings.
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present application more clearly, the following drawings will briefly introduce the drawings that need to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore do not It should be regarded as a limitation of the scope, and for those of ordinary skill in the art, other related drawings can also be obtained according to these drawings without any creative effort.
图1为本申请实施例提供的计算机设备的组成示意图;1 is a schematic diagram of the composition of a computer device provided by an embodiment of the present application;
图2为本申请实施例提供的人体行为识别方法的流程示意图之一;FIG. 2 is one of the schematic flow charts of the method for recognizing human behavior provided by an embodiment of the present application;
图3为本申请实施例提供的同一人物所对应的多个人体关键点在人物图像中的位置信息示意表;3 is a schematic table of position information of multiple human body key points corresponding to the same person in a person image provided by an embodiment of the present application;
图4为图3所示的多个人体关键点之间的相对位置关系示意表;FIG. 4 is a schematic diagram of the relative positional relationship between a plurality of human body key points shown in FIG. 3;
图5为图2中的步骤S230包括的子步骤的流程示意图;FIG. 5 is a schematic flowchart of the sub-steps included in step S230 in FIG. 2;
图6为本申请实施例提供的人体行为识别方法的流程示意图之二;FIG. 6 is the second schematic flowchart of the method for recognizing human behavior provided by the embodiment of the present application;
图7为本申请实施例提供的人体行为识别装置的组成示意图之一;FIG. 7 is one of the schematic diagrams of the composition of the human behavior recognition device provided by the embodiment of the present application;
图8为图7中的行为识别模块的组成示意图;Fig. 8 is the composition schematic diagram of the behavior recognition module in Fig. 7;
图9为本申请实施例提供的人体行为识别装置的组成示意图之二。FIG. 9 is the second schematic diagram of the composition of the apparatus for recognizing human behavior provided by the embodiment of the present application.
图标:10-计算机设备;11-存储器;12-处理器;13-通信单元;100-人体行为识别装置;110-人体检测模块;120-归一化处理模块;130-行为识别模块;131-概率计算子模块;132-概率比较子模块;133-类别输出子模块;140-样本获取模块;150-分类器训练模块。Icon: 10-computer equipment; 11-memory; 12-processor; 13-communication unit; 100-human behavior recognition device; 110-human detection module; 120-normalization processing module; 130-action recognition module; 131- Probability calculation sub-module; 132-probability comparison sub-module; 133-category output sub-module; 140-sample acquisition module; 150-classifier training module.
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本申请实施例的组件可以以各种不同的配置来布置和设计。In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments It is a part of the embodiments of the present application, but not all of the embodiments. The components of the embodiments of the present application generally described and illustrated in the drawings herein may be arranged and designed in a variety of different configurations.
因此,以下对在附图中提供的本申请的实施例的详细描述并非旨在限制要求保护的本申请的范围,而是仅仅表示本申请的选定实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。Thus, the following detailed description of the embodiments of the application provided in the accompanying drawings is not intended to limit the scope of the application as claimed, but is merely representative of selected embodiments of the application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。It should be noted that like numerals and letters refer to like items in the following figures, so once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.
在本申请的描述中,需要理解的是,术语“第一”和“第二”等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。In the description of this application, it is to be understood that relational terms such as the terms "first" and "second" etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require Or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood in specific situations.
申请人通过辛苦调研发现,现有的人体行为识别方案通常采用两种思路实现,第一种思路是使用光流算法来预测行为发生的趋势,第二种思路则是利用卷积神经网络类进行人体行为识别。其中,第一种思路在实现时需要耗费大量时间提取光流,并且在具体识别过程中易受到环境中的噪声干扰,因此该思路在实际环境中受到较大的限制,一旦环境出现盖板,这种思路的识别效果就会急剧下降。而第二种思路在实现时需要收集庞大的样本图像数据进行模型训练,整个训练过程复杂,训练出的模型不易收敛且识别效率低下,训练出的模型通常需要进行模型裁剪等简化操作以便于模型落地部署,导致部署的模型的识别精度下降,同时当待识别图像与样本图像数据之间的场景差异度较高时,模型识别效果也将急剧下降,整体的鲁棒性较差。Through painstaking research, the applicant found that the existing human behavior recognition solutions are usually implemented in two ways. The first way is to use the optical flow algorithm to predict the trend of behavior, and the second way is to use the convolutional neural network class to carry out. Human behavior recognition. Among them, the first idea takes a lot of time to extract the optical flow when it is implemented, and is easily interfered by the noise in the environment during the specific identification process. Therefore, this idea is greatly limited in the actual environment. Once the cover plate appears in the environment, The recognition effect of this kind of thinking will drop sharply. The second way of thinking needs to collect huge sample image data for model training. The whole training process is complicated, the trained model is not easy to converge and the recognition efficiency is low. Land deployment will lead to a decrease in the recognition accuracy of the deployed model. At the same time, when the scene difference between the image to be recognized and the sample image data is high, the recognition effect of the model will also drop sharply, and the overall robustness will be poor.
在此情况下,为降低图像背景变化对人体行为识别效果的干扰,提升人体行为识别精准度,并同步提升人体行为识别效率,本申请实施例通过提供一种人体行为识别方法、装置、计算机设备及可读存储介质实现前述效果。In this case, in order to reduce the interference of image background changes on the effect of human behavior recognition, improve the accuracy of human behavior recognition, and simultaneously improve the efficiency of human behavior recognition, the embodiments of the present application provide a method, device, and computer equipment for human behavior recognition. and a readable storage medium to achieve the aforementioned effects.
下面结合附图,对本申请的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互结合。Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments and features of the embodiments may be combined with each other without conflict.
请参照图1,图1是本申请实施例提供的计算机设备10的组成示意图。在本申请实施例中,所述计算机设备10能够有效降低待识别人物图像中的图像背景对人体行为识别过程的干扰,并对待识别人物图像中的人物行为进行快速且精准地识别。其中,所述计算机设备10可以是,但不限于,智能手机、平板电脑、个人计算机、服务器及具有图像采集功能的机器人等。Please refer to FIG. 1 , which is a schematic diagram of the composition of a computer device 10 provided by an embodiment of the present application. In the embodiment of the present application, the computer device 10 can effectively reduce the interference of the image background in the image of the person to be recognized to the human behavior recognition process, and quickly and accurately recognize the behavior of the person in the image of the person to be recognized. The computer device 10 may be, but not limited to, a smart phone, a tablet computer, a personal computer, a server, a robot with an image acquisition function, and the like.
在本实施例中,所述计算机设备10可以包括存储器11、处理器12、通信单元13及人体行为识别装置100。其中,所述存储器11、所述处理器12及所述通信单元13各个元件相互之间接或间接地电性连接,以实现数据的传输或交互。例如,所述存储器11、所述处理器12及所述通信单元13这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。In this embodiment, the computer device 10 may include a memory 11 , a processor 12 , a communication unit 13 and a human behavior recognition apparatus 100 . Wherein, the elements of the memory 11 , the processor 12 and the communication unit 13 are electrically connected to each other or indirectly to realize data transmission or interaction. For example, the elements of the memory 11 , the processor 12 and the communication unit 13 can be electrically connected to each other through one or more communication buses or signal lines.
在本实施例中,所述存储器11可以是,但不限于,随机存取存储器(Random Access Memory,RAM),只读存储器(Read Only Memory,ROM),可编程只读存储器(Programmable Read-Only Memory,PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,EEPROM)等。其中,所述存储器11用于存储计算机程序,所述处理器12在接收到执行指令后,可相应地执行所述计算机程序。In this embodiment, the memory 11 may be, but not limited to, a random access memory (Random Access Memory, RAM), a read only memory (Read Only Memory, ROM), a programmable read only memory (Programmable Read-Only Memory) Memory, PROM), Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Read-Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. Wherein, the memory 11 is used for storing a computer program, and the processor 12 can execute the computer program correspondingly after receiving the execution instruction.
其中,所述存储器11还用于存储SVM行为分类器,所述SVM行为分类器为SVM(Support Vector Machine,支持向量机)分类器基于人体关键点的相关信息训练得到的分类器模型,所述SVM行为分类器用于对人体行为类别进行识别。所述SVM行为分类器对应有多个可识别行为类别,所述可识别行为类别可以是,但不限于,端坐、站立、平躺、举手及蹲下等。其中,所述人体关键点的数目通常为18个,其包括对应人体的鼻子、脖子、右肩、右肘、右腕、左肩、左肘、左腕、右髋、右膝、右踝、左髋、左膝、左踝、左眼、右眼、左耳及右耳,而所述人体关键点的相关信息包括对应人体关键点在 人物图像中的位置信息及置信度,所述置信度用于表示对应提取出的人体关键点在人物图像中的位置可靠性,所述位置信息可采用对应人体关键点在人物图像中的原图横纵坐标进行表示。Wherein, the memory 11 is also used to store an SVM behavior classifier, and the SVM behavior classifier is a classifier model obtained by an SVM (Support Vector Machine, Support Vector Machine) classifier based on the relevant information of human key points trained. The SVM behavior classifier is used to identify human behavior categories. The SVM behavior classifier corresponds to a plurality of identifiable behavior categories, and the identifiable behavior categories may be, but are not limited to, sitting, standing, lying down, raising hands, and squatting. Wherein, the number of the human body key points is usually 18, which includes the nose, neck, right shoulder, right elbow, right wrist, left shoulder, left elbow, left wrist, right hip, right knee, right ankle, left hip, The left knee, left ankle, left eye, right eye, left ear and right ear, and the relevant information of the human body key points includes the position information and confidence level of the corresponding human body key points in the human image, and the confidence level is used to indicate Corresponding to the position reliability of the extracted human body key points in the person image, the position information may be represented by the horizontal and vertical coordinates of the original image corresponding to the human body key points in the person image.
在本实施例中,所述处理器12可以是一种具有信号的处理能力的集成电路芯片。所述处理器12可以是通用处理器,包括中央处理器(Central Processing Unit,CPU)、图形处理器(Graphics Processing Unit,GPU)及网络处理器(Network Processor,NP)、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件中的至少一种。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。In this embodiment, the processor 12 may be an integrated circuit chip with signal processing capability. The processor 12 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU), a network processor (Network Processor, NP), a digital signal processor (DSP) ), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, at least one of a discrete gate or transistor logic device, a discrete hardware component. The general-purpose processor may be a microprocessor, or the processor may also be any conventional processor, etc., and may implement or execute the methods, steps, and logical block diagrams disclosed in the embodiments of this application.
在本实施例中,所述通信单元13用于通过网络建立所述计算机设备10与其他电子设备之间的通信连接,并通过所述网络收发数据,其中所述网络包括有线通信网络及无线通信网络。例如,所述计算机设备10可通过所述通信单元13从其他电子设备处获取需要进行人体行为识别的待识别图像。In this embodiment, the communication unit 13 is configured to establish a communication connection between the computer device 10 and other electronic devices through a network, and to send and receive data through the network, wherein the network includes a wired communication network and wireless communication network. For example, the computer device 10 may acquire images to be recognized that need to be recognized by human behavior from other electronic devices through the communication unit 13 .
在本实施例中,所述人体行为识别装置100包括至少一个能够以软件或固件的形式存储于所述存储器11中或固化在所述计算机设备10的操作系统中的软件功能模块。所述处理器12可用于执行所述存储器11存储的可执行模块,例如所述人体行为识别装置100所包括的软件功能模块及计算机程序等。所述计算机设备10通过所述人体行为识别装置100降低待识别人物图像中的图像背景对人体行为识别过程的干扰,并对待识别人物图像中的人物行为进行快速且精准地识别,从而提升人体行为识别效果。In this embodiment, the human behavior recognition apparatus 100 includes at least one software function module that can be stored in the memory 11 or fixed in the operating system of the computer device 10 in the form of software or firmware. The processor 12 may be configured to execute executable modules stored in the memory 11 , such as software function modules and computer programs included in the human behavior recognition device 100 . The computer equipment 10 reduces the interference of the image background in the image of the person to be recognized to the human behavior recognition process through the human behavior recognition device 100, and quickly and accurately recognizes the behavior of the person in the image of the person to be recognized, thereby improving human behavior. Identify the effect.
可以理解的是,图1所示的框图仅为所述计算机设备10的一种组成示意图,所述计算机设备10还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。图1中所示的各组件可以采用硬件、软件或其组合实现。It can be understood that the block diagram shown in FIG. 1 is only a schematic diagram of the composition of the computer device 10, and the computer device 10 may further include more or less components than those shown in FIG. 1 shows different configurations. Each component shown in FIG. 1 may be implemented in hardware, software, or a combination thereof.
在本申请中,为确保所述计算机设备10能够对待识别图像进行精准且快速的人体行为识别操作,达到提升人体行为识别精准度及人体行为识别效率的效果,本申请实施例通过提供人体行为识别方法实现前述目的。下面对本申请提供的人体行为识别方法进行详细描述。In the present application, in order to ensure that the computer device 10 can perform an accurate and fast human behavior recognition operation on the image to be recognized, so as to achieve the effect of improving the accuracy of human behavior recognition and the efficiency of human behavior recognition, the embodiment of the present application provides human behavior recognition The method achieves the aforementioned objects. The human action recognition method provided by the present application will be described in detail below.
可选地,请参照图2,图2是本申请实施例提供的人体行为识别方法的流程示意图 之一。在本申请实施例中,图2所示的人体行为识别方法的具体流程和具体步骤如下文所示。Optionally, please refer to FIG. 2, which is one of the schematic flowcharts of the method for recognizing human behavior provided by the embodiment of the present application. In the embodiment of the present application, the specific flow and specific steps of the method for recognizing human behavior shown in FIG. 2 are as follows.
步骤S210,获取待识别图像,并对待识别图像进行人体关键点检测,得到待识别图像中目标人物所对应的多个人体关键点各自的位置信息及置信度。In step S210, an image to be recognized is acquired, and human body key point detection is performed on the image to be recognized, so as to obtain respective position information and confidence levels of multiple human key points corresponding to the target person in the image to be recognized.
在本实施例中,所述待识别图像可由所述计算机设备10通过通信单元13从其他电子设备处获取,也可由所述计算机设备10额外包括的摄像头采集得到。所述计算机设备10在获取到待识别图像后,可采用人体姿态估计(Human Pose Estimation,HPE)算法对该待识别图像进行人体关键点检测,以将该待识别图像中的每个人物作为一个目标人物,并得到该目标人物所对应的多个人体关键点各自在该待识别图像中的位置信息,以及每个人体关键点在该待识别图像中对应的置信度。其中,所述目标人物所对应的每个人体关键点的位置信息可采用该人体关键点在所述待识别图像中的原图横纵坐标进行表示。在本实施例的一种实施方式中,所述计算机设备10可采用AlphaPose算法进行人体关键点检测。In this embodiment, the to-be-recognized image may be acquired by the computer device 10 from other electronic devices through the communication unit 13 , or may be acquired by a camera additionally included in the computer device 10 . After the computer device 10 acquires the to-be-recognized image, it can use the Human Pose Estimation (HPE) algorithm to perform human key point detection on the to-be-recognized image, so that each character in the to-be-recognized image is used as a The target person is obtained, and the position information of the multiple human body key points corresponding to the target person in the to-be-recognized image, and the corresponding confidence level of each human-body key point in the to-be-recognized image are obtained. The position information of each human body key point corresponding to the target person may be represented by the horizontal and vertical coordinates of the original image of the human body key point in the to-be-recognized image. In an implementation manner of this embodiment, the computer device 10 may use the AlphaPose algorithm to detect human body key points.
步骤S220,对所述目标人物所对应的多个人体关键点各自的位置信息进行归一化处理,得到所述目标人物所对应的多个人体关键点之间的相对位置关系。Step S220, normalizing the respective position information of the multiple human body key points corresponding to the target person, to obtain the relative positional relationship between the multiple human body key points corresponding to the target person.
在本实施例中,所述计算机设备10在从一张人物图像中确定出某个人物所对应的多个人体关键点各自的位置信息后,会对该人物在对应图像中的多个人体关键点的位置信息进行归一化处理,得到该人物在对应图像中的多个人体关键点之间的相对位置关系,从而使该人物所对应的各人体关键点不被该人物在对应图像中的位置所影响,以便于维持后续人体行为识别过程的识别精准度。In this embodiment, after determining the respective position information of multiple human body key points corresponding to a certain person from a person image, the computer device 10 will determine the multiple human body key points of the person in the corresponding image. The position information of the point is normalized to obtain the relative positional relationship between the key points of the human body in the corresponding image, so that the key points of the human body corresponding to the person are not affected by the key points of the human body in the corresponding image. In order to maintain the recognition accuracy of the subsequent human behavior recognition process.
其中,在本实施例的一种实施方式中,所述相对位置信息可以表达为对应图像中同一人物的各人体关键点相对于一个人体参照点的位置关系被归一化到0~1的区间范围内的具体坐标数值。其中,所述人体参照点可以是同一人物的各人体关键点中的任意一个;也可以是取各人体关键点的最小原图横坐标值及最小原图纵坐标值组合形成的坐标点,还可以是同一人物的各人体关键点之间的坐标平均点;所述坐标平均点的横坐标值即为对应的所有人体关键点的原图横坐标值之间的平均值,所述坐标平均点的纵坐标值即为对应的所有人体关键点的原图纵坐标值之间的平均值;具体的人体参照点可根据归一化处理需求进行配置。Wherein, in an implementation of this embodiment, the relative position information may be expressed as the positional relationship of each human body key point of the same person in the corresponding image relative to a human body reference point is normalized to an interval of 0 to 1 The specific coordinate value within the range. Wherein, the human body reference point may be any one of the key points of the human body of the same person; it may also be a coordinate point formed by taking the minimum abscissa value of the original image and the minimum ordinate value of the original image of each key point of the human body. It can be the coordinate average point between the human body key points of the same person; the abscissa value of the coordinate average point is the average value between the original image abscissa values of all the corresponding human body key points, and the coordinate average point The ordinate value of is the average value between the ordinate values of the original image of all the corresponding human body key points; the specific human body reference point can be configured according to the normalization processing requirements.
此时,所述计算机设备10在对该人物在对应图像中的多个人体关键点的位置信息进行归一化处理,得到该人物在对应图像中的多个人体关键点之间的相对位置关系的步骤,可以包括:At this time, the computer device 10 normalizes the position information of the multiple human body key points of the character in the corresponding image to obtain the relative positional relationship between the multiple human body key points of the character in the corresponding image steps that can include:
根据所述多个人体关键点各自在对应图像中的原图横纵坐标值,确定所述多个人体关键点的最小外接矩形区域的区域高度及区域宽度,以及对应人体参照点的原图横纵坐标值;Determine the area height and area width of the minimum circumscribed rectangular area of the multiple human body key points according to the horizontal and vertical coordinates of the original image in the corresponding images of the multiple human body key points, and determine the horizontal and vertical coordinates of the original image corresponding to the human body reference points. ordinate value;
针对每个人体关键点,将该人体关键点的原图横坐标值和所述人体参照点的原图横坐标值之间的差值,与所述区域宽度进行除法运算,得到该人体关键点的归一化横坐标值;For each human body key point, the difference between the original image abscissa value of the human body key point and the original image abscissa value of the human body reference point is divided by the area width to obtain the human body key point The normalized abscissa value of ;
针对每个人体关键点,将该人体关键点的原图纵坐标值和所述人体参照点的原图纵坐标值之间的差值,与所述区域高度进行除法运算,得到该人体关键点的归一化纵坐标值。For each key point of the human body, the difference between the ordinate value of the original image of the key point of the human body and the ordinate value of the original image of the human body reference point is divided by the height of the region to obtain the key point of the human body The normalized ordinate value of .
在此过程中,所述多个人体关键点的最小外接矩形区域的区域高度与区域宽度可采用如下式子进行计算:In this process, the area height and area width of the minimum circumscribed rectangular area of the multiple human body key points can be calculated using the following formulas:
H=Y
max-Y
min,W=X
max-X
min
H= Ymax - Ymin , W= Xmax - Xmin
其中,H和W分别表示该人物的多个人体关键点所对应的最小外接矩形区域的区域高度及区域宽度,Y
max和Y
min分别表示该人物的多个人体关键点中最大原图纵坐标值及最小原图纵坐标值,X
max和X
min分别表示该人物的多个人体关键点中最大原图横坐标值及最小原图横坐标值。以图3为例,图3中的Y
max和Y
min分别为180及10,X
max和X
min分别为180及10,则图3所对应的最小外接矩形区域的区域高度及区域宽度均为170。
Among them, H and W respectively represent the area height and area width of the minimum circumscribed rectangular area corresponding to the multiple human body key points of the character, and Y max and Y min respectively represent the largest ordinate of the original image among the multiple human body key points of the character value and the minimum ordinate value of the original image, X max and X min respectively represent the maximum abscissa value of the original image and the minimum abscissa value of the original image among the multiple key points of the human body of the character. Taking Fig. 3 as an example, Y max and Y min in Fig. 3 are 180 and 10 respectively, and X max and X min are 180 and 10 respectively, then the area height and area width of the minimum circumscribed rectangular area corresponding to Fig. 3 are both. 170.
同时,针对某个人体关键点,可采用如下式子计算该人体关键点的归一化横坐标值及归一化纵坐标值:At the same time, for a certain human body key point, the following formulas can be used to calculate the normalized abscissa value and normalized ordinate value of the human body key point:
X
ni=(X
i-X
T)/W,Y
ni=(Y
i-Y
T)/H
X ni =(X i -X T )/W, Y ni =(Y i -Y T )/H
其中,X
i用于表示该人物的第i个人体关键点的原图横坐标值,Y
i用于表示该人物的第i个人体关键点的原图纵坐标值,X
ni用于表示该人物的第i个人体关键点的归一化横坐标值,Y
ni用于表示该人物的第i个人体关键点的归一化纵坐标值,X
T用于表示该 人物的人体参照点的原图横坐标值,Y
T用于表示该人物的人体参照点的原图纵坐标值。以图3为例,可将该人物的最小原图横坐标值X
min作为人体参照点的原图横坐标值X
T,并将该人物的最小原图纵坐标值Y
min作为人体参照点的原图纵坐标值Y
T,进而通过上述式子计算得到图4所示的各人体关键点之间的相对位置关系内容。
Among them, X i is used to represent the abscissa value of the original image of the key point of the ith person of the character, Y i is used to represent the ordinate value of the original image of the key point of the ith person of the character, and X ni is used to represent the value of the original image. The normalized abscissa value of the ith human body key point of the character, Y ni is used to represent the normalized ordinate value of the ith human body key point of the character, and X T is used to represent the human body reference point of the character. The abscissa value of the original image, Y T is used to represent the ordinate value of the original image of the human body reference point of the character. Taking Fig. 3 as an example, the minimum original image abscissa value X min of the character can be used as the original image abscissa value X T of the human body reference point, and the minimum original image ordinate value Y min of the character can be used as the human body reference point. The ordinate value Y T of the original image is further calculated by the above formula to obtain the content of the relative positional relationship between the key points of the human body shown in FIG. 4 .
由此,当所述计算机设备10从待识别图像中确定出某个目标人物所对应的多个人体关键点各自的位置信息后,会对该目标人物在该待识别图像中的多个人体关键点的位置信息进行归一化处理,得到该目标人物在该待识别图像中的多个人体关键点之间的相对位置关系。此时,所述对该目标人物在该待识别图像中的多个人体关键点的位置信息进行归一化处理,得到该目标人物在该待识别图像中的多个人体关键点之间的相对位置关系的步骤,可以包括:Therefore, after the computer device 10 determines the respective position information of a plurality of human body key points corresponding to a certain target person from the to-be-recognized image, it will determine the plurality of human body key points of the target person in the to-be-recognized image. The position information of the point is normalized to obtain the relative positional relationship between the target person and the key points of the human body in the to-be-recognized image. At this time, the normalization processing is performed on the position information of the multiple human body key points of the target person in the to-be-recognized image, and the relative relationship between the multiple human-body key points of the target person in the to-be-recognized image is obtained. The steps of the positional relationship can include:
根据该目标人物在该待识别图像中的多个人体关键点的原图横纵坐标值,确定所述多个人体关键点的最小外接矩形区域的区域高度及区域宽度,以及对应人体参照点的原图横纵坐标值;Determine the area height and area width of the minimum circumscribed rectangular area of the multiple human body key points according to the original image horizontal and vertical coordinate values of the target person's multiple human body key points in the to-be-recognized image, as well as the corresponding human body reference point. The horizontal and vertical coordinates of the original image;
针对每个人体关键点,将该人体关键点的原图横坐标值和所述人体参照点的原图横坐标值之间的差值,与所述区域宽度进行除法运算,得到该人体关键点的归一化横坐标值;For each human body key point, the difference between the original image abscissa value of the human body key point and the original image abscissa value of the human body reference point is divided by the area width to obtain the human body key point The normalized abscissa value of ;
针对每个人体关键点,将该人体关键点的原图纵坐标值和所述人体参照点的原图纵坐标值之间的差值,与所述区域高度进行除法运算,得到该人体关键点的归一化纵坐标值。For each key point of the human body, the difference between the ordinate value of the original image of the key point of the human body and the ordinate value of the original image of the human body reference point is divided by the height of the region to obtain the key point of the human body The normalized ordinate value of .
步骤S230,调用预存的SVM行为分类器对多个人体关键点各自的置信度及多个人体关键点之间的相对位置关系进行数据分析,得到目标人物在待识别图像中的人体行为类别。Step S230, calling the pre-stored SVM behavior classifier to perform data analysis on the respective confidence levels of the multiple human body key points and the relative positional relationship between the multiple human body key points, and obtain the human behavior category of the target person in the image to be recognized.
在本实施例中,所述SVM行为分类器为SVM分类器基于不同人物所对应的多个人体关键点的置信度及相对位置信息训练得到。该SVM行为分类器具有较好的容错性,能够解决高维问题,且运行速度快,无需庞大的训练数据量,从而得以通过该SVM行为分类器提升人体行为识别效率。同时,本申请通过提取人体关键点来表征对应人物的具体行为,无需受到人物图像中的背景噪声带来的干扰,能够更好地突出人体行为,进而通过将人体关键点的位置信息及置信度结合到人体行为类别识别过程中,降低图像背 景变化对人体行为识别效果的干扰,提升人体行为识别精准度。In this embodiment, the SVM behavior classifier is obtained by training the SVM classifier based on the confidence and relative position information of multiple human body key points corresponding to different characters. The SVM behavior classifier has good fault tolerance, can solve high-dimensional problems, and runs fast without a huge amount of training data, so that the human behavior recognition efficiency can be improved through the SVM behavior classifier. At the same time, the present application characterizes the specific behavior of the corresponding person by extracting key points of the human body, without being disturbed by the background noise in the image of the person, and can better highlight the behavior of the human body. Combined with the process of human behavior category recognition, the interference of image background changes on the human behavior recognition effect is reduced, and the accuracy of human behavior recognition is improved.
其中,SVM行为分类器由于引入了松弛变量,使其具备一定的容错性,可以忽略一些不合群的噪声点干扰,因此模型的泛化能力比较好,识别能力强。而该SVM行为分类器可以通过核函数(Kernel Function)将线性不可分的问题映射到高维空间,从而找到一个分隔平面,使问题变得线性可分和更易求解,因此SVM无需考虑样本维数,能处理高维的问题,拟合效果好。同时,该SVM行为分类器属于机器学习算法,不需要搭建复杂的神经网络结构,只需学习支持向量,基于少量的低维张量进行运算,因此训练和推断速度十分快,由此与神经网络需要庞大的数据进行训练才能得到鲁棒性较好的模型不同,该SVM行为分类器仅需提供少量的数据就能很好地拟合关系。因此,本申请中的SVM行为分类器通过对人体关键点特征(包括人物图像中某个人物所对应的多个人体关键点的置信度及相对位置信息)进行表征学习,降低了模型训练的复杂度和计算量,同时减少了训练所需的数据量,提高了模型的识别准确率和鲁棒性。Among them, the SVM behavior classifier has a certain fault tolerance due to the introduction of slack variables, and can ignore the interference of some ungrouped noise points, so the generalization ability of the model is better and the recognition ability is strong. The SVM behavior classifier can map the linearly inseparable problem to a high-dimensional space through the kernel function, so as to find a separation plane, so that the problem becomes linearly separable and easier to solve, so the SVM does not need to consider the sample dimension, It can handle high-dimensional problems, and the fitting effect is good. At the same time, the SVM behavior classifier is a machine learning algorithm, which does not need to build a complex neural network structure. It only needs to learn support vectors and perform operations based on a small number of low-dimensional tensors. Therefore, the training and inference speed is very fast, which is similar to the neural network. Unlike a model that requires a large amount of data for training to obtain a more robust model, this SVM behavioral classifier only needs to provide a small amount of data to fit the relationship well. Therefore, the SVM behavior classifier in this application reduces the complexity of model training by performing representation learning on the features of human body key points (including the confidence and relative position information of multiple human body key points corresponding to a certain person in the human image). At the same time, the amount of data required for training is reduced, and the recognition accuracy and robustness of the model are improved.
在本实施例中,当所述计算机设备10从待识别图像中确定出某个目标人物所对应的多个人体关键点各自的归一化横坐标值、归一化纵坐标值及置信度后,会将这多个人体关键点各自的归一化横坐标值、归一化纵坐标值及置信度作为同一目标人物的多维度特征,并将该多维度特征输入到所述SVM行为分类器中,由所述SVM行为分类器对该多维度特征进行数据分析,以确定该多维度特征所对应的人体行为是否属于所述SVM行为分类器所对应的多个可识别行为类别中的哪一个。In this embodiment, when the computer device 10 determines the respective normalized abscissa values, normalized ordinate values and confidence levels of multiple human body key points corresponding to a certain target person from the image to be recognized , the normalized abscissa value, normalized ordinate value and confidence of these multiple human body key points will be regarded as the multi-dimensional feature of the same target person, and the multi-dimensional feature will be input into the SVM behavior classifier. In, the multi-dimensional feature is analyzed by the SVM behavior classifier to determine whether the human behavior corresponding to the multi-dimensional feature belongs to which of the multiple identifiable behavior categories corresponding to the SVM behavior classifier .
由此,本申请得以通过将人体关键点的位置信息及置信度结合到人体行为类别识别过程中,降低图像背景变化对人体行为识别效果的干扰,提升人体行为识别精准度,并通过SVM分类器具有的运行高效性,提升人体行为识别效率,从而提升人体行为识别效果。在本实施例的一种实施方式中,若同一人物对应有18个人体关键点,则该人物的多维度特征将为54维度特征,该54维度特征包括对应人物的18个人体关键点各自的归一化横坐标值、归一化纵坐标值及置信度。Therefore, the present application can reduce the interference of image background changes on the recognition effect of human behavior by combining the position information and confidence of key points of the human body into the process of identifying human behavior categories, improve the accuracy of human behavior recognition, and pass the SVM classifier. It has high operating efficiency and improves the efficiency of human behavior recognition, thereby improving the effect of human behavior recognition. In an implementation of this embodiment, if there are 18 human body key points corresponding to the same character, the multi-dimensional feature of the character will be a 54-dimensional feature, and the 54-dimensional feature includes each of the 18 human body key points of the corresponding character. Normalized abscissa value, normalized ordinate value and confidence.
在此过程中,请参照图5,图5是图2中的步骤S230包括的子步骤的流程示意图。在本实施例中,所述SVM行为分类器对应有多个可识别行为类别,所述步骤S230可以包括子步骤S231~子步骤S233。In this process, please refer to FIG. 5 , which is a schematic flowchart of the sub-steps included in step S230 in FIG. 2 . In this embodiment, the SVM behavior classifier corresponds to a plurality of identifiable behavior categories, and the step S230 may include sub-steps S231 to S233.
子步骤S231,根据多个人体关键点各自的置信度及多个人体关键点之间的相对位 置关系,调用SVM行为分类器计算目标人物被划分到各可识别行为类别下的概率值。Sub-step S231, according to the respective confidence levels of the multiple human body key points and the relative positional relationship between the multiple human body key points, call the SVM behavior classifier to calculate the probability value that the target person is divided into each identifiable behavior category.
在本实施例中,当所述计算机设备10从待识别图像中确定出某个目标人物所对应的多个人体关键点各自的归一化横坐标值、归一化纵坐标值及置信度后,会将这多个人体关键点各自的归一化横坐标值、归一化纵坐标值及置信度作为同一目标人物的多维度特征,并将该多维度特征输入到所述SVM行为分类器中。由所述SVM行为分类器根据该目标人物的多维度特征计算该目标人物被划分到该SVM行为分类器所对应的每个可识别行为类别下的概率值。In this embodiment, when the computer device 10 determines the respective normalized abscissa values, normalized ordinate values and confidence levels of multiple human body key points corresponding to a certain target person from the image to be recognized , the normalized abscissa value, normalized ordinate value and confidence of these multiple human body key points will be regarded as the multi-dimensional feature of the same target person, and the multi-dimensional feature will be input into the SVM behavior classifier. middle. The SVM behavior classifier calculates the probability value that the target person is classified into each identifiable behavior category corresponding to the SVM behavior classifier according to the multi-dimensional features of the target person.
子步骤S232,从计算出的各可识别行为类别的概率值中提取最大概率数值,并将最大概率数值与预设概率阈值进行比较。Sub-step S232: Extract the maximum probability value from the calculated probability values of each identifiable behavior category, and compare the maximum probability value with a preset probability threshold.
在本实施例中,所述预设概率阈值用于校验所述SVM行为分类器的识别可靠性,而经所述SVM行为分类器计算出的目标人物被划分到不同可识别行为类别下的概率值中的最大概率值,用于表示该目标人物的人体行为被有效识别的最大可能性。所述计算机设备10通过将所述最大概率值与所述预设概率阈值进行比较的方式,确定该目标人物是否能够被有效识别。In this embodiment, the preset probability threshold is used to verify the recognition reliability of the SVM behavior classifier, and the target person calculated by the SVM behavior classifier is classified into different identifiable behavior categories. The maximum probability value among the probability values is used to represent the maximum possibility that the human behavior of the target person is effectively recognized. The computer device 10 determines whether the target person can be effectively identified by comparing the maximum probability value with the preset probability threshold.
其中,若所述最大概率数值小于所述预设概率阈值,则表明当前SVM行为分类器所涉及到的各可识别行为类别无法与该目标人物当前人体行为相匹配,当前SVM行为分类器无法对该目标人物当前人体行为进行有效识别;若所述最大概率数值大于或等于所述预设概率阈值,则表明当前SVM行为分类器能够对该目标人物当前人体行为进行有效识别。在本实施例的一种实施方式中,所述预设概率阈值的数值可以是,但不限于50%、55%及60%中的任意一种。Wherein, if the maximum probability value is less than the preset probability threshold, it indicates that each identifiable behavior category involved in the current SVM behavior classifier cannot match the current human behavior of the target person, and the current SVM behavior classifier cannot The current human behavior of the target person is effectively identified; if the maximum probability value is greater than or equal to the preset probability threshold, it indicates that the current SVM behavior classifier can effectively identify the current human behavior of the target person. In an implementation manner of this embodiment, the value of the preset probability threshold may be, but not limited to, any one of 50%, 55%, and 60%.
子步骤S233,若最大概率数值等于或大于预设概率阈值,则将最大概率数值所对应的可识别行为类别作为目标人物的人体行为类别。Sub-step S233, if the maximum probability value is equal to or greater than the preset probability threshold, the identifiable behavior category corresponding to the maximum probability value is used as the human behavior category of the target person.
在本实施例中,当计算出的目标人物被划分到不同可识别行为类别下的概率值中的最大概率值大于或等于所述预设概率阈值时,则表明该当前SVM行为分类器可以对该目标人物当前人体行为进行有效识别,此时即可将所述最大概率值所对应的可识别行为类别,作为所述目标人物在所述待识别图像中的人体行为类别。In this embodiment, when the calculated maximum probability value among the probability values that the target person is classified into different identifiable behavior categories is greater than or equal to the preset probability threshold, it indicates that the current SVM behavior classifier can The current human behavior of the target person is effectively recognized, and at this time, the recognizable behavior category corresponding to the maximum probability value can be used as the human behavior category of the target person in the to-be-recognized image.
由此,本申请得以通过执行上述子步骤S231~子步骤S233,利用SVM行为分类器对待识别图像中目标人物的多维度特征进行有效分析,以识别出该目标人物在待识别图 像中最可能的人体行为类别,尽可能提升人体行为识别精准度。As a result, the present application can effectively analyze the multi-dimensional features of the target person in the image to be recognized by performing the above sub-steps S231 to S233 by using the SVM behavior classifier, so as to identify the most likely target person in the to-be-recognized image. Human behavior category, improve the accuracy of human behavior recognition as much as possible.
同时,本申请通过执行上述步骤S210~步骤S230,将人体关键点的位置信息及置信度结合到人体行为类别识别过程中,降低图像背景变化对人体行为识别效果的干扰,提升人体行为识别精准度,并通过SVM分类器具有的运行高效性,提升人体行为识别效率,从而提升人体行为识别效果。At the same time, by performing the above steps S210 to S230, the present application combines the position information and confidence of key points of the human body into the process of identifying human behavior categories, reducing the interference of image background changes on the effect of identifying human behavior, and improving the accuracy of human behavior recognition. , and through the operating efficiency of the SVM classifier, the efficiency of human behavior recognition is improved, thereby improving the effect of human behavior recognition.
可选地,请参照图6,图6是本申请实施例提供的人体行为识别方法的流程示意图之二。在本申请实施例中,图6所示的人体行为识别方法与图2所示的人体行为识别方法相比,图6所示的人体行为识别方法还可以包括步骤S240~步骤S260,并可通过执行所述步骤S240~步骤S260的方式,利用较少的人体关键点特征样本数据便能完成对SVM行为分类器的训练操作,降低了模型训练的复杂度和计算量,同时减少了训练所需的数据量,提高了模型的识别准确率和鲁棒性。Optionally, please refer to FIG. 6 . FIG. 6 is the second schematic flowchart of the method for recognizing human behavior provided by the embodiment of the present application. In the embodiment of the present application, the human behavior recognition method shown in FIG. 6 is compared with the human behavior recognition method shown in FIG. 2 . The human behavior recognition method shown in FIG. By performing the method of steps S240 to S260, the training operation of the SVM behavior classifier can be completed by using less human body key point feature sample data, which reduces the complexity and calculation amount of model training, and reduces the training requirements. The amount of data improves the recognition accuracy and robustness of the model.
步骤S240,获取不同行为类别各自的样本行为数据集,其中样本行为数据集包括被划分到相同行为类别下的多个样本人物各自在对应样本图像中的多个人体关键点的位置信息及置信度,不同行为类别各自对应的样本人物数目相同。Step S240, obtaining respective sample behavior data sets of different behavior categories, wherein the sample behavior data sets include position information and confidence levels of multiple human body key points in the corresponding sample images of multiple sample characters classified into the same behavior category. , the number of sample characters corresponding to different behavior categories is the same.
在本实施例中,同一样本行为数据集所对应的多个样本人物各自在对应样本图像中被标注为同一行为类别,不同样本行为数据集各自对应的样本人物数目相同,每个样本行为数据集对应一种行为类别。In this embodiment, multiple sample characters corresponding to the same sample behavior data set are each marked as the same behavior category in the corresponding sample images, the number of sample characters corresponding to different sample behavior data sets is the same, and each sample behavior data set has the same number of sample characters. Corresponds to a behavior category.
在本实施例的一种实施方式中,针对每种行为类别,可通过选取N名样本采集对象,以n人为一批次,在N/n个批次的每个批次过程中采集相同行为类别的行为图像数据,其中每个批次对应采集行为图像数据的耗时相同,在每个批次过程中可要求样本采集对象有小幅度的动作变化(例如,身体倾斜和头部摆动等),但整体人体行为类别需保持一致,从而使最终得到不同行为类别各自的样本人物数目等于对应行为图像帧数乘以n的值。In an implementation of this embodiment, for each behavior category, N samples can be selected to collect objects, and n people are taken as a batch, and the same behavior can be collected during each batch of N/n batches. Category of behavioral image data, in which each batch takes the same amount of time to collect behavioral image data. During each batch, the sample collection object may be required to have a small range of motion changes (for example, body tilt and head swing, etc.) , but the overall human behavior category needs to be consistent, so that the final number of sample characters for different behavior categories is equal to the value of the corresponding behavior image frames multiplied by n.
而后,通过对每个行为图像帧进行人体关键点检测,确定该行为图像帧中每个样本人物所对应的多个人体关键点的位置信息及置信度,接着将同一行为类别所对应的各样本人物所对应的多个人体关键点的位置信息及置信度集成在一起,从而得到不同行为类别各自的样本行为数据集,使每个样本行为数据集包括被划分到相同行为类别下的多个样本人物各自在对应样本图像中的多个人体关键点的位置信息及置信度。Then, by performing human body key point detection on each behavior image frame, the position information and confidence of multiple human body key points corresponding to each sample person in the behavior image frame are determined, and then each sample corresponding to the same behavior category is determined. The position information and confidence of multiple key points of the human body corresponding to the characters are integrated to obtain the respective sample behavior data sets of different behavior categories, so that each sample behavior data set includes multiple samples classified into the same behavior category. The position information and confidence level of the multiple human body key points in the corresponding sample image for each person.
步骤S250,对每个样本人物在对应样本图像中的多个人体关键点的位置信息进行归一化处理,得到样本人物在样本图像中的多个人体关键点之间的相对位置关系。Step S250, normalize the position information of multiple human body key points in the corresponding sample image for each sample person to obtain the relative positional relationship between the multiple human body key points of the sample person in the sample image.
在本实施例中,所述步骤S250的具体执行过程与上文中步骤S220的具体执行过程类似,因此所述步骤S250可以包括如下内容:In this embodiment, the specific execution process of the step S250 is similar to the specific execution process of the above step S220, so the step S250 may include the following content:
针对每个样本人物,根据该样本人物在对应样本图像中的多个人体关键点的原图横纵坐标值,确定所述多个人体关键点的最小外接矩形区域的区域高度及区域宽度,以及对应人体参照点的原图横纵坐标值;For each sample person, according to the abscissa and vertical coordinate values of the original image of the plurality of human body key points in the corresponding sample image, the area height and area width of the minimum circumscribed rectangular area of the plurality of human body key points are determined, and The horizontal and vertical coordinates of the original image corresponding to the reference point of the human body;
针对每个人体关键点,将该人体关键点的原图横坐标值和所述人体参照点的原图横坐标值之间的差值,与所述区域宽度进行除法运算,得到该人体关键点的归一化横坐标值;For each human body key point, the difference between the original image abscissa value of the human body key point and the original image abscissa value of the human body reference point is divided by the area width to obtain the human body key point The normalized abscissa value of ;
针对每个人体关键点,将该人体关键点的原图纵坐标值和所述人体参照点的原图纵坐标值之间的差值,与所述区域高度进行除法运算,得到该人体关键点的归一化纵坐标值。For each key point of the human body, the difference between the ordinate value of the original image of the key point of the human body and the ordinate value of the original image of the human body reference point is divided by the height of the region to obtain the key point of the human body The normalized ordinate value of .
其中,所述人体参照点可以是同一人物的各人体关键点中的任意一个;也可以是取各人体关键点的最小原图横坐标值及最小原图纵坐标值组合形成的坐标点,还可以是同一人物的各人体关键点之间的坐标平均点;所述坐标平均点的横坐标值即为对应的所有人体关键点的原图横坐标值之间的平均值,所述坐标平均点的纵坐标值即为对应的所有人体关键点的原图纵坐标值之间的平均值;具体的人体参照点可根据归一化处理需求进行配置。所述步骤S250的具体执行过程可参照上文对步骤S220的具体执行过程的详细描述,在此不再一一赘述。Wherein, the human body reference point may be any one of the key points of the human body of the same person; it may also be a coordinate point formed by taking the minimum abscissa value of the original image and the minimum ordinate value of the original image of each key point of the human body. It can be the coordinate average point between the human body key points of the same person; the abscissa value of the coordinate average point is the average value between the original image abscissa values of all the corresponding human body key points, and the coordinate average point The ordinate value of is the average value between the ordinate values of the original image of all the corresponding human body key points; the specific human body reference point can be configured according to the normalization processing requirements. For the specific execution process of the step S250, reference may be made to the detailed description of the specific execution process of the step S220 above, which will not be repeated here.
步骤S260,根据不同行为类别各自对应的多个样本人物在对应样本图像中的多个人体关键点的置信度以及多个人体关键点之间的相对位置关系,对初始SVM分类器进行模型训练,得到SVM行为分类器。Step S260, according to the confidence of the multiple human body key points in the corresponding sample images and the relative positional relationship between the multiple human body key points of the multiple sample characters corresponding to different behavior categories, perform model training on the initial SVM classifier, Get the SVM behavior classifier.
在本实施例中,当得到不同行为类别各自对应的多个样本人物在对应样本图像中的多个人体关键点的置信度以及多个人体关键点之间的相对位置关系后,会将同一样本人物所对应的多个人体关键点的置信度、归一化横坐标值及归一化纵坐标值综合为该样本人物的多维度特征,而后将不同行为类别的多个样本人物各自的多维度特征作为SVM分类器的模型训练数据集,并将该SVM分类器的模型训练数据集输入到初始SVM分 类器中进行模型训练,由该初始SVM分类器对不同行为类别各自对应的人体行为特征进行拟合学习,从而得到能够对模型训练数据集所涉及到的各行为类别进行有效识别的SVM行为分类器。In this embodiment, after obtaining the confidence levels of the multiple human body key points in the corresponding sample images and the relative positional relationship between the multiple human body key points of the multiple sample characters corresponding to different behavior categories, the same sample The confidence level, normalized abscissa value and normalized ordinate value of multiple human body key points corresponding to the character are integrated into the multi-dimensional characteristics of the sample character, and then the respective multi-dimensional characteristics of multiple sample characters of different behavior categories are combined. The features are used as the model training data set of the SVM classifier, and the model training data set of the SVM classifier is input into the initial SVM classifier for model training. By fitting and learning, an SVM behavior classifier that can effectively identify each behavior category involved in the model training data set is obtained.
由此,本申请得以通过执行上述步骤S240~步骤S260,利用较少的人体关键点特征样本数据便能完成对SVM行为分类器的训练操作,降低了模型训练的复杂度和计算量,同时减少了训练所需的数据量,提高了模型的识别准确率和鲁棒性,确保训练出的SVM行为分类器能够在实际使用过程中具有良好的人体行为识别精准度及人体行为识别效率。Therefore, the present application can complete the training operation of the SVM behavior classifier by performing the above-mentioned steps S240 to S260 by using less human body key point feature sample data, which reduces the complexity and calculation amount of model training, and reduces the It reduces the amount of data required for training, improves the recognition accuracy and robustness of the model, and ensures that the trained SVM behavior classifier can have good human behavior recognition accuracy and human behavior recognition efficiency in actual use.
在本申请中,为确保所述计算机设备10能够通过所述人体行为识别装置100执行上述人体行为识别方法,本申请通过对所述人体行为识别装置100进行功能模块划分的方式实现前述功能。下面对本申请提供的人体行为识别装置100的具体组成进行相应描述。In this application, in order to ensure that the computer equipment 10 can execute the above-mentioned human behavior recognition method through the human behavior recognition apparatus 100 , the application implements the aforementioned functions by dividing the human behavior recognition apparatus 100 into functional modules. The specific components of the human behavior recognition apparatus 100 provided by the present application will be described below accordingly.
可选地,请参照图7,图7是本申请实施例提供的人体行为识别装置100的组成示意图之一。在本申请实施例中,所述人体行为识别装置100可以包括人体检测模块110、归一化处理模块120及行为识别模块130。Optionally, please refer to FIG. 7 . FIG. 7 is one of the schematic diagrams of the composition of the human behavior recognition apparatus 100 provided by the embodiment of the present application. In this embodiment of the present application, the human behavior recognition device 100 may include a human body detection module 110 , a normalization processing module 120 and a behavior recognition module 130 .
人体检测模块110,用于获取待识别图像,并对待识别图像进行人体关键点检测,得到待识别图像中目标人物所对应的多个人体关键点各自的位置信息及置信度。The human body detection module 110 is used for acquiring the image to be recognized, and performing human body key point detection on the image to be recognized, so as to obtain respective position information and confidence levels of multiple human key points corresponding to the target person in the image to be recognized.
归一化处理模块120,用于对目标人物所对应的多个人体关键点各自的位置信息进行归一化处理,得到目标人物所对应的多个人体关键点之间的相对位置关系。The normalization processing module 120 is used for normalizing the respective position information of the multiple human body key points corresponding to the target person, so as to obtain the relative positional relationship between the multiple human body key points corresponding to the target person.
行为识别模块130,用于调用预存的SVM行为分类器对多个人体关键点各自的置信度及多个人体关键点之间的相对位置关系进行数据分析,得到目标人物在待识别图像中的人体行为类别。The behavior recognition module 130 is used to call the pre-stored SVM behavior classifier to perform data analysis on the respective confidence levels of multiple human body key points and the relative positional relationship between multiple human body key points, and obtain the human body of the target person in the image to be recognized. behavior category.
可选地,请参照图8,图8是图7中的行为识别模块130的组成示意图。在本实施例中,所述行为识别模块130可以包括概率计算子模块131、概率比较子模块132及类别输出子模块133。Optionally, please refer to FIG. 8 , which is a schematic diagram of the composition of the behavior recognition module 130 in FIG. 7 . In this embodiment, the behavior recognition module 130 may include a probability calculation sub-module 131 , a probability comparison sub-module 132 and a category output sub-module 133 .
概率计算子模块131,用于根据多个人体关键点各自的置信度及多个人体关键点之间的相对位置关系,调用SVM行为分类器计算目标人物被划分到各可识别行为类别下 的概率值。The probability calculation sub-module 131 is used to call the SVM behavior classifier to calculate the probability that the target person is divided into each identifiable behavior category according to the respective confidence degrees of the multiple human body key points and the relative positional relationship between the multiple human body key points value.
概率比较子模块132,用于从计算出的各可识别行为类别的概率值中提取最大概率数值,并将最大概率数值与预设概率阈值进行比较。The probability comparison sub-module 132 is configured to extract the maximum probability value from the calculated probability values of each identifiable behavior category, and compare the maximum probability value with a preset probability threshold.
类别输出子模块133,用于若最大概率数值等于或大于预设概率阈值,则将最大概率数值所对应的可识别行为类别作为目标人物的人体行为类别。The category output sub-module 133 is configured to use the identifiable behavior category corresponding to the maximum probability value as the human behavior category of the target person if the maximum probability value is equal to or greater than the preset probability threshold.
可选地,请参照图9,图9是本申请实施例提供的人体行为识别装置100的组成示意图之二。在本申请实施例中,所述人体行为识别装置100还可以包括样本获取模块140及分类器训练模块150。Optionally, please refer to FIG. 9 . FIG. 9 is the second schematic diagram of the composition of the human behavior recognition apparatus 100 provided by the embodiment of the present application. In this embodiment of the present application, the human behavior recognition apparatus 100 may further include a sample acquisition module 140 and a classifier training module 150 .
样本获取模块140,用于获取不同行为类别各自的样本行为数据集,其中样本行为数据集包括被划分到相同行为类别下的多个样本人物各自在对应样本图像中的多个人体关键点的位置信息及置信度,不同行为类别各自对应的样本人物数目相同。The sample acquisition module 140 is configured to acquire respective sample behavior data sets of different behavior categories, wherein the sample behavior data sets include the positions of multiple human body key points in the corresponding sample images of multiple sample characters divided into the same behavior category. Information and confidence, the number of sample characters corresponding to different behavior categories is the same.
所述归一化处理模块120,还用于对每个样本人物在对应样本图像中的多个人体关键点的位置信息进行归一化处理,得到样本人物在样本图像中的多个人体关键点之间的相对位置关系。The normalization processing module 120 is further configured to perform normalization processing on the position information of multiple human body key points of each sample person in the corresponding sample image, so as to obtain multiple human body key points of the sample person in the sample image. relative positional relationship between them.
分类器训练模块150,用于根据不同行为类别各自对应的多个样本人物在对应样本图像中的多个人体关键点的置信度以及多个人体关键点之间的相对位置关系,对初始SVM分类器进行模型训练,得到SVM行为分类器。The classifier training module 150 is used to classify the initial SVM according to the confidence of the multiple human body key points in the corresponding sample images and the relative positional relationship between the multiple human body key points corresponding to the multiple sample characters corresponding to different behavior categories. The model is trained by the classifier to obtain the SVM behavior classifier.
其中,所述归一化处理模块120针对目标人物或样本人物,对该人物在对应图像中的多个人体关键点的位置信息进行归一化处理,得到多个人体关键点之间的相对位置关系的方式,包括:Wherein, the normalization processing module 120 performs normalization processing on the position information of the multiple human body key points in the corresponding image for the target person or the sample person, and obtains the relative positions between the multiple human body key points relationship, including:
根据多个人体关键点各自在对应图像中的原图横纵坐标值,确定多个人体关键点的最小外接矩形区域的区域高度及区域宽度,以及对应人体参照点的原图横纵坐标值;Determine the area height and area width of the minimum circumscribed rectangular area of the multiple human body key points according to the respective abscissa and ordinate values of the original image in the corresponding images of the multiple human body key points, and the original image abscissa value corresponding to the human body reference point;
针对每个人体关键点,将该人体关键点的原图横坐标值和人体参照点的原图横坐标值之间的差值,与区域宽度进行除法运算,得到该人体关键点的归一化横坐标值;For each key point of the human body, the difference between the abscissa value of the original image of the key point of the human body and the abscissa value of the original image of the human body reference point is divided by the area width to obtain the normalization of the key point of the human body. abscissa value;
针对每个人体关键点,将该人体关键点的原图纵坐标值和人体参照点的原图纵坐标值之间的差值,与区域高度进行除法运算,得到该人体关键点的归一化纵坐标值。For each key point of the human body, the difference between the ordinate value of the original image of the key point of the human body and the ordinate value of the original image of the human body reference point is divided by the area height to obtain the normalization of the key point of the human body. Ordinate value.
因此,所述归一化处理模块120对目标人物所对应的多个人体关键点各自的位置信 息进行归一化处理,得到目标人物所对应的多个人体关键点之间的相对位置关系的方式,可以表达为如下内容:Therefore, the normalization processing module 120 normalizes the respective position information of the multiple human body key points corresponding to the target person, so as to obtain the relative positional relationship between the multiple human body key points corresponding to the target person. , which can be expressed as the following:
根据该目标人物在该待识别图像中的多个人体关键点的原图横纵坐标值,确定所述多个人体关键点的最小外接矩形区域的区域高度及区域宽度,以及对应人体参照点的原图横纵坐标值;Determine the area height and area width of the minimum circumscribed rectangular area of the multiple human body key points according to the original image horizontal and vertical coordinate values of the target person's multiple human body key points in the to-be-recognized image, as well as the corresponding human body reference point. The horizontal and vertical coordinates of the original image;
针对每个人体关键点,将该人体关键点的原图横坐标值和所述人体参照点的原图横坐标值之间的差值,与所述区域宽度进行除法运算,得到该人体关键点的归一化横坐标值;For each human body key point, the difference between the original image abscissa value of the human body key point and the original image abscissa value of the human body reference point is divided by the area width to obtain the human body key point The normalized abscissa value of ;
针对每个人体关键点,将该人体关键点的原图纵坐标值和所述人体参照点的原图纵坐标值之间的差值,与所述区域高度进行除法运算,得到该人体关键点的归一化纵坐标值。For each key point of the human body, the difference between the ordinate value of the original image of the key point of the human body and the ordinate value of the original image of the human body reference point is divided by the height of the region to obtain the key point of the human body The normalized ordinate value of .
而所述归一化处理模块120对每个样本人物在对应样本图像中的多个人体关键点的位置信息进行归一化处理,得到样本人物在样本图像中的多个人体关键点之间的相对位置关系的方式,可以表达为如下内容:The normalization processing module 120 performs normalization processing on the position information of multiple human body key points of each sample person in the corresponding sample image, and obtains the relationship between the sample person and the multiple human body key points in the sample image. The relative positional relationship can be expressed as follows:
针对每个样本人物,根据该样本人物在对应样本图像中的多个人体关键点的原图横纵坐标值,确定所述多个人体关键点的最小外接矩形区域的区域高度及区域宽度,以及对应人体参照点的原图横纵坐标值;For each sample person, according to the abscissa and vertical coordinate values of the original image of the plurality of human body key points in the corresponding sample image, the area height and area width of the minimum circumscribed rectangular area of the plurality of human body key points are determined, and The horizontal and vertical coordinates of the original image corresponding to the reference point of the human body;
针对每个人体关键点,将该人体关键点的原图横坐标值和所述人体参照点的原图横坐标值之间的差值,与所述区域宽度进行除法运算,得到该人体关键点的归一化横坐标值;For each human body key point, the difference between the original image abscissa value of the human body key point and the original image abscissa value of the human body reference point is divided by the area width to obtain the human body key point The normalized abscissa value of ;
针对每个人体关键点,将该人体关键点的原图纵坐标值和所述人体参照点的原图纵坐标值之间的差值,与所述区域高度进行除法运算,得到该人体关键点的归一化纵坐标值。For each key point of the human body, the difference between the ordinate value of the original image of the key point of the human body and the ordinate value of the original image of the human body reference point is divided by the height of the region to obtain the key point of the human body The normalized ordinate value of .
其中,需要说明的是,本申请实施例所提供的人体行为识别装置100,其基本原理及产生的技术效果与前述的人体行为识别方法相同,为简要描述,本实施例部分未提及之处,可参考上述的针对人体行为识别方法的描述内容。It should be noted that the basic principle and the technical effect of the human behavior recognition device 100 provided by the embodiment of the present application are the same as the aforementioned human behavior recognition method. For the sake of brief description, the parts not mentioned in this embodiment are not mentioned. , you can refer to the above description of the human action recognition method.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,也可以通过其它 的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本申请的实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。In the embodiments provided in this application, it should be understood that the disclosed apparatus and method may also be implemented in other manners. The apparatus embodiments described above are merely illustrative, eg, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality and operation of possible implementations of apparatuses, methods and computer program products according to embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。In addition, each functional module in each embodiment of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个可读存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个可读存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的可读存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are implemented in the form of software function modules and sold or used as independent products, they may be stored in a readable storage medium. Based on such understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution, and the computer software product is stored in a readable storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disk and other various programs that can store program codes medium.
综上所述,在本申请提供的一种人体行为识别方法、装置、计算机设备及可读存储介质中,本申请通过获取待识别图像中目标人物的多个人体关键点各自的位置信息及置信度,而后对多个人体关键点各自的位置信息进行归一化处理,得到这多个人体关键点之间的相对位置关系,进而调用预存的SVM行为分类器对这多个人体关键点各自的置信度及这多个人体关键点之间的相对位置关系进行数据分析,得到该目标人物在待识别图像中对应的人体行为类别,由此通过将人体关键点的位置信息及置信度结合到人体行为类别识别过程中,提升人体行为识别精准度,并通过SVM分类器具有的运行高效性,提升人体行为识别效率。To sum up, in a human behavior recognition method, device, computer equipment and readable storage medium provided by the present application, the present application obtains the respective position information and confidence of multiple human key points of the target person in the image to be recognized. degree, and then normalize the respective position information of multiple human body key points to obtain the relative positional relationship between these multiple human body key points, and then call the pre-stored SVM behavior classifier to analyze the respective position information of these multiple human body key points. Confidence and the relative positional relationship between these key points of the human body are analyzed to obtain the corresponding human behavior category of the target person in the image to be recognized. In the process of behavior category recognition, the accuracy of human behavior recognition is improved, and the efficiency of human behavior recognition is improved through the operating efficiency of the SVM classifier.
以上所述,仅为本申请的各种实施方式,但本申请的保护范围并不局限于此,任何 熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应当以权利要求的保护范围为准。The above are only various embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present application, All should be covered within the scope of protection of this application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims (10)
- 一种人体行为识别方法,其特征在于,所述方法包括:A method for human behavior recognition, characterized in that the method comprises:获取待识别图像,并对所述待识别图像进行人体关键点检测,得到所述待识别图像中目标人物所对应的多个人体关键点各自的位置信息及置信度;Obtaining an image to be recognized, and performing human body key point detection on the image to be recognized, to obtain respective position information and confidence levels of multiple human key points corresponding to the target person in the image to be recognized;对所述目标人物所对应的多个人体关键点各自的位置信息进行归一化处理,得到所述目标人物所对应的多个人体关键点之间的相对位置关系;Normalizing the respective position information of the multiple human body key points corresponding to the target person, to obtain the relative positional relationship between the multiple human body key points corresponding to the target person;调用预存的SVM行为分类器对所述多个人体关键点各自的置信度及所述多个人体关键点之间的相对位置关系进行数据分析,得到所述目标人物在所述待识别图像中的人体行为类别。Call the pre-stored SVM behavior classifier to perform data analysis on the respective confidence levels of the multiple human body key points and the relative positional relationship between the multiple human body key points, and obtain the target person in the to-be-recognized image. Human behavior category.
- 根据权利要求1所述的方法,其特征在于,所述SVM行为分类器对应有多个可识别行为类别,所述调用预存的SVM行为分类器对所述多个人体关键点各自的置信度及所述多个人体关键点之间的相对位置关系进行数据分析,得到所述目标人物在所述待识别图像中的人体行为类别的步骤,包括:The method according to claim 1, wherein the SVM behavior classifier corresponds to a plurality of identifiable behavior categories, and the calling pre-stored SVM behavior classifier has respective confidence and The steps of performing data analysis on the relative positional relationship between the multiple human body key points to obtain the human behavior category of the target person in the to-be-recognized image include:根据所述多个人体关键点各自的置信度及所述多个人体关键点之间的相对位置关系,调用所述SVM行为分类器计算所述目标人物被划分到各可识别行为类别下的概率值;According to the respective confidence levels of the multiple human body key points and the relative positional relationship between the multiple human body key points, the SVM behavior classifier is invoked to calculate the probability that the target person is classified into each identifiable behavior category value;从计算出的各可识别行为类别的概率值中提取最大概率数值,并将所述最大概率数值与预设概率阈值进行比较;Extract the maximum probability value from the calculated probability values of each identifiable behavior category, and compare the maximum probability value with a preset probability threshold;若所述最大概率数值等于或大于所述预设概率阈值,则将所述最大概率数值所对应的可识别行为类别作为所述目标人物的人体行为类别。If the maximum probability value is equal to or greater than the preset probability threshold, the identifiable behavior category corresponding to the maximum probability value is used as the human behavior category of the target person.
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:获取不同行为类别各自的样本行为数据集,其中所述样本行为数据集包括被划分到相同行为类别下的多个样本人物各自在对应样本图像中的多个人体关键点的位置信息及置信度,不同行为类别各自对应的样本人物数目相同;Obtaining respective sample behavior data sets of different behavior categories, wherein the sample behavior data sets include position information and confidence levels of multiple human body key points in the corresponding sample images of multiple sample characters divided into the same behavior category, The number of sample characters corresponding to different behavior categories is the same;对每个样本人物在对应样本图像中的多个人体关键点的位置信息进行归一化处理,得到所述样本人物在所述样本图像中的多个人体关键点之间的相对位置关系;Normalizing the position information of a plurality of human body key points in the corresponding sample image for each sample character, to obtain the relative positional relationship between the multiple human body key points of the sample character in the sample image;根据不同行为类别各自对应的多个样本人物在对应样本图像中的多个人体关键点的置信度以及所述多个人体关键点之间的相对位置关系,对初始SVM分类器进行模型训练,得到所述SVM行为分类器。According to the confidence of multiple human body key points in the corresponding sample images of multiple sample characters corresponding to different behavior categories and the relative positional relationship between the multiple human body key points, the initial SVM classifier is model trained to obtain The SVM behavioral classifier.
- 根据权利要求1-3中任意一项所述的方法,其特征在于,针对目标人物或样本人物,对该人物在对应图像中的多个人体关键点的位置信息进行归一化处理,得到所述多个人体关键点之间的相对位置关系的步骤,包括:The method according to any one of claims 1-3, characterized in that, for the target person or the sample person, normalizing the position information of multiple human body key points of the person in the corresponding image to obtain the The steps of describing the relative positional relationship between multiple human body key points include:根据所述多个人体关键点各自在对应图像中的原图横纵坐标值,确定所述多个人体关键点的最小外接矩形区域的区域高度及区域宽度,以及对应人体参照点的原图横纵坐标值;Determine the area height and area width of the minimum circumscribed rectangular area of the multiple human body key points according to the horizontal and vertical coordinates of the original image in the corresponding images of the multiple human body key points, and determine the horizontal and vertical coordinates of the original image corresponding to the human body reference points. ordinate value;针对每个人体关键点,将该人体关键点的原图横坐标值和所述人体参照点的原图横坐标值之间的差值,与所述区域宽度进行除法运算,得到该人体关键点的归一化横坐标值;For each human body key point, the difference between the original image abscissa value of the human body key point and the original image abscissa value of the human body reference point is divided by the area width to obtain the human body key point The normalized abscissa value of ;针对每个人体关键点,将该人体关键点的原图纵坐标值和所述人体参照点的原图纵坐标值之间的差值,与所述区域高度进行除法运算,得到该人体关键点的归一化纵坐标值。For each key point of the human body, the difference between the ordinate value of the original image of the key point of the human body and the ordinate value of the original image of the human body reference point is divided by the height of the region to obtain the key point of the human body The normalized ordinate value of .
- 一种人体行为识别装置,其特征在于,所述装置包括:A human behavior recognition device, characterized in that the device comprises:人体检测模块,用于获取待识别图像,并对所述待识别图像进行人体关键点检测,得到所述待识别图像中目标人物所对应的多个人体关键点各自的位置信息及置信度;a human body detection module, configured to obtain an image to be recognized, and perform human body key point detection on the image to be recognized, to obtain respective position information and confidence levels of multiple human key points corresponding to the target person in the to-be-recognized image;归一化处理模块,用于对所述目标人物所对应的多个人体关键点各自的位置信息进行归一化处理,得到所述目标人物所对应的多个人体关键点之间的相对位置关系;The normalization processing module is used to normalize the respective position information of the multiple human body key points corresponding to the target person, so as to obtain the relative positional relationship between the multiple human body key points corresponding to the target person ;行为识别模块,用于调用预存的SVM行为分类器对所述多个人体关键点各自的置信度及所述多个人体关键点之间的相对位置关系进行数据分析,得到所述目标人物在所述待识别图像中的人体行为类别。The behavior recognition module is used to call the pre-stored SVM behavior classifier to perform data analysis on the respective confidence levels of the multiple human body key points and the relative positional relationship between the multiple human body key points, and obtain the target person at the location. Describe the human behavior category in the image to be recognized.
- 根据权利要求5所述的装置,其特征在于,所述SVM行为分类器对应有多个可识别行为类别,所述行为识别模块包括:The device according to claim 5, wherein the SVM behavior classifier corresponds to a plurality of identifiable behavior categories, and the behavior identification module comprises:概率计算子模块,用于根据所述多个人体关键点各自的置信度及所述多个人体关键点之间的相对位置关系,调用所述SVM行为分类器计算所述目标人物被划分到各可识 别行为类别下的概率值;The probability calculation sub-module is used to call the SVM behavior classifier to calculate that the target person is divided into different positions according to the respective confidence levels of the multiple human key points and the relative positional relationship between the multiple human key points. Probability values under identifiable behavior categories;概率比较子模块,用于从计算出的各可识别行为类别的概率值中提取最大概率数值,并将所述最大概率数值与预设概率阈值进行比较;a probability comparison submodule, used for extracting the maximum probability value from the calculated probability values of each identifiable behavior category, and comparing the maximum probability value with a preset probability threshold;类别输出子模块,用于若所述最大概率数值等于或大于所述预设概率阈值,则将所述最大概率数值所对应的可识别行为类别作为所述目标人物的人体行为类别。A category output sub-module, configured to use the identifiable behavior category corresponding to the maximum probability value as the human behavior category of the target person if the maximum probability value is equal to or greater than the preset probability threshold.
- 根据权利要求5所述的装置,其特征在于,所述装置还包括:The device according to claim 5, wherein the device further comprises:样本获取模块,用于获取不同行为类别各自的样本行为数据集,其中所述样本行为数据集包括被划分到相同行为类别下的多个样本人物各自在对应样本图像中的多个人体关键点的位置信息及置信度,不同行为类别各自对应的样本人物数目相同;The sample acquisition module is used to acquire respective sample behavior data sets of different behavior categories, wherein the sample behavior data sets include the data of the multiple human body key points in the corresponding sample images of the multiple sample characters that are divided into the same behavior category. Location information and confidence, the number of sample characters corresponding to different behavior categories is the same;所述归一化处理模块,还用于对每个样本人物在对应样本图像中的多个人体关键点的位置信息进行归一化处理,得到所述样本人物在所述样本图像中的多个人体关键点之间的相对位置关系;The normalization processing module is further configured to perform normalization processing on the position information of multiple human body key points of each sample person in the corresponding sample image, so as to obtain a plurality of people of the sample person in the sample image. The relative positional relationship between the key points of the body;分类器训练模块,用于根据不同行为类别各自对应的多个样本人物在对应样本图像中的多个人体关键点的置信度以及所述多个人体关键点之间的相对位置关系,对初始SVM分类器进行模型训练,得到所述SVM行为分类器。The classifier training module is used for, according to the confidence of the multiple human body key points in the corresponding sample images and the relative positional relationship between the multiple human key points corresponding to the multiple sample characters corresponding to different behavior categories, for the initial SVM The classifier performs model training to obtain the SVM behavior classifier.
- 根据权利要求5-7中任意一项所述的装置,其特征在于,所述归一化处理模块针对目标人物或样本人物,对该人物在对应图像中的多个人体关键点的位置信息进行归一化处理,得到所述多个人体关键点之间的相对位置关系的方式,包括:The device according to any one of claims 5-7, wherein the normalization processing module, for the target person or the sample person, performs the position information of the multiple human body key points of the person in the corresponding image. The normalization process to obtain the relative positional relationship between the multiple human body key points includes:根据所述多个人体关键点各自在对应图像中的原图横纵坐标值,确定所述多个人体关键点的最小外接矩形区域的区域高度及区域宽度,以及对应人体参照点的原图横纵坐标值;Determine the area height and area width of the minimum circumscribed rectangular area of the multiple human body key points according to the horizontal and vertical coordinates of the original image in the corresponding images of the multiple human body key points, and determine the horizontal and vertical coordinates of the original image corresponding to the human body reference points. ordinate value;针对每个人体关键点,将该人体关键点的原图横坐标值和所述人体参照点的原图横坐标值之间的差值,与所述区域宽度进行除法运算,得到该人体关键点的归一化横坐标值;For each human body key point, the difference between the original image abscissa value of the human body key point and the original image abscissa value of the human body reference point is divided by the area width to obtain the human body key point The normalized abscissa value of ;针对每个人体关键点,将该人体关键点的原图纵坐标值和所述人体参照点的原图纵坐标值之间的差值,与所述区域高度进行除法运算,得到该人体关键点的归一化纵坐标值。For each key point of the human body, the difference between the ordinate value of the original image of the key point of the human body and the ordinate value of the original image of the human body reference point is divided by the height of the region to obtain the key point of the human body The normalized ordinate value of .
- 一种计算机设备,其特征在于,所述计算机设备包括处理器和存储器,所述存储器存储有能够被所述处理器执行的计算机程序,所述处理器可执行所述计算机程序,以实现权利要求1-4中任意一项所述的人体行为识别方法。A computer device, characterized in that the computer device comprises a processor and a memory, the memory stores a computer program that can be executed by the processor, and the processor can execute the computer program to realize the claims The human action recognition method described in any one of 1-4.
- 一种可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时,实现权利要求1-4中任意一项所述的人体行为识别方法。A readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the method for recognizing human behavior according to any one of claims 1-4 is implemented.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011388513.6 | 2020-12-01 | ||
CN202011388513.6A CN112418135A (en) | 2020-12-01 | 2020-12-01 | Human behavior recognition method and device, computer equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022116829A1 true WO2022116829A1 (en) | 2022-06-09 |
Family
ID=74829517
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/131200 WO2022116829A1 (en) | 2020-12-01 | 2021-11-17 | Human behavior recognition method and apparatus, computer device and readable storage medium |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112418135A (en) |
WO (1) | WO2022116829A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115601505A (en) * | 2022-11-07 | 2023-01-13 | 广州趣丸网络科技有限公司(Cn) | Human body three-dimensional posture restoration method and device, electronic equipment and storage medium |
CN116612298A (en) * | 2023-07-18 | 2023-08-18 | 西华大学 | Pedestrian feature mask generation method based on local key points |
CN118116076A (en) * | 2024-03-04 | 2024-05-31 | 重庆理工大学 | Behavior recognition method and system based on human-object interaction relationship |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112418135A (en) * | 2020-12-01 | 2021-02-26 | 深圳市优必选科技股份有限公司 | Human behavior recognition method and device, computer equipment and readable storage medium |
CN113194292A (en) * | 2021-04-30 | 2021-07-30 | 招商局金融科技有限公司 | Coordination management method, device, equipment and storage medium for intelligent equipment |
CN113673459B (en) * | 2021-08-26 | 2024-05-14 | 中国科学院自动化研究所 | Video-based production and construction site safety inspection method, system and equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108052896A (en) * | 2017-12-12 | 2018-05-18 | 广东省智能制造研究所 | Human bodys' response method based on convolutional neural networks and support vector machines |
CN108229355A (en) * | 2017-12-22 | 2018-06-29 | 北京市商汤科技开发有限公司 | Activity recognition method and apparatus, electronic equipment, computer storage media, program |
US20190073560A1 (en) * | 2017-09-01 | 2019-03-07 | Sri International | Machine learning system for generating classification data and part localization data for objects depicted in images |
CN111639632A (en) * | 2020-07-31 | 2020-09-08 | 南京浦和数据有限公司 | Subway driver action sequence identification method based on support vector machine |
CN112418135A (en) * | 2020-12-01 | 2021-02-26 | 深圳市优必选科技股份有限公司 | Human behavior recognition method and device, computer equipment and readable storage medium |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110502986B (en) * | 2019-07-12 | 2024-09-17 | 平安科技(深圳)有限公司 | Method, device, computer equipment and storage medium for identifying positions of persons in image |
-
2020
- 2020-12-01 CN CN202011388513.6A patent/CN112418135A/en active Pending
-
2021
- 2021-11-17 WO PCT/CN2021/131200 patent/WO2022116829A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20190073560A1 (en) * | 2017-09-01 | 2019-03-07 | Sri International | Machine learning system for generating classification data and part localization data for objects depicted in images |
CN108052896A (en) * | 2017-12-12 | 2018-05-18 | 广东省智能制造研究所 | Human bodys' response method based on convolutional neural networks and support vector machines |
CN108229355A (en) * | 2017-12-22 | 2018-06-29 | 北京市商汤科技开发有限公司 | Activity recognition method and apparatus, electronic equipment, computer storage media, program |
CN111639632A (en) * | 2020-07-31 | 2020-09-08 | 南京浦和数据有限公司 | Subway driver action sequence identification method based on support vector machine |
CN112418135A (en) * | 2020-12-01 | 2021-02-26 | 深圳市优必选科技股份有限公司 | Human behavior recognition method and device, computer equipment and readable storage medium |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115601505A (en) * | 2022-11-07 | 2023-01-13 | 广州趣丸网络科技有限公司(Cn) | Human body three-dimensional posture restoration method and device, electronic equipment and storage medium |
CN115601505B (en) * | 2022-11-07 | 2023-03-14 | 广州趣丸网络科技有限公司 | Human body three-dimensional posture restoration method and device, electronic equipment and storage medium |
CN116612298A (en) * | 2023-07-18 | 2023-08-18 | 西华大学 | Pedestrian feature mask generation method based on local key points |
CN116612298B (en) * | 2023-07-18 | 2023-10-13 | 西华大学 | Pedestrian feature mask generation method based on local key points |
CN118116076A (en) * | 2024-03-04 | 2024-05-31 | 重庆理工大学 | Behavior recognition method and system based on human-object interaction relationship |
Also Published As
Publication number | Publication date |
---|---|
CN112418135A (en) | 2021-02-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2022116829A1 (en) | Human behavior recognition method and apparatus, computer device and readable storage medium | |
CN107633207B (en) | AU characteristic recognition methods, device and storage medium | |
US20210248355A1 (en) | Face key point detection method and apparatus, storage medium, and electronic device | |
US20200334830A1 (en) | Method, apparatus, and storage medium for processing video image | |
US8805018B2 (en) | Method of detecting facial attributes | |
US10534957B2 (en) | Eyeball movement analysis method and device, and storage medium | |
WO2020199480A1 (en) | Body movement recognition method and device | |
US10318797B2 (en) | Image processing apparatus and image processing method | |
CN111461165A (en) | Image recognition method, recognition model training method, related device and equipment | |
US7912253B2 (en) | Object recognition method and apparatus therefor | |
US8792722B2 (en) | Hand gesture detection | |
US8750573B2 (en) | Hand gesture detection | |
Zhou et al. | Semi-supervised salient object detection using a linear feedback control system model | |
CN106570480B (en) | A kind of human action classification method based on gesture recognition | |
Ishikura et al. | Saliency detection based on multiscale extrema of local perceptual color differences | |
CN111695462B (en) | Face recognition method, device, storage medium and server | |
US10489636B2 (en) | Lip movement capturing method and device, and storage medium | |
CN104049760B (en) | The acquisition methods and system of a kind of man-machine interaction order | |
CN109145837A (en) | Face emotion identification method, device, terminal device and storage medium | |
WO2022088176A1 (en) | Actional-structural self-attention graph convolutional network for action recognition | |
Kalas | Real time face detection and tracking using OpenCV | |
Liu et al. | Real-time facial expression recognition based on cnn | |
Zhao et al. | Applying contrast-limited adaptive histogram equalization and integral projection for facial feature enhancement and detection | |
Zhou et al. | Recognizing fall actions from videos using reconstruction error of variational autoencoder | |
Lahiani et al. | Hand pose estimation system based on Viola-Jones algorithm for android devices |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21899863 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21899863 Country of ref document: EP Kind code of ref document: A1 |