CN-115272796-B - Behavior recognition method, device, equipment and storage medium
Abstract
The application discloses a behavior recognition method, a device, equipment and a storage medium, which relate to the field of computer vision and comprise the steps of detecting a target video by using a preset detection method to obtain key points, filtering the key points based on a preset filtering rule to obtain reject key points and filtered key points, establishing a linear model based on the reject key points and the filtered key points, carrying out regression prediction on the reject key points by using the linear model to obtain regression key points, correcting the reject key points according to a preset correction rule and the regression key points to obtain corrected key points, and carrying out corresponding analysis recognition operation based on the corrected key points. According to the application, the reject key points are obtained through filtering, the linear model is established based on the reject key points to correct the reject key points, and the accuracy and the robustness of behavior recognition are improved under the condition that the key points are inaccurate to detect.
Inventors
- WANG XIAN
Assignees
- 济南博观智能科技有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20220729
Claims (10)
- 1. A method of behavior recognition, comprising: Detecting the target video by using a preset detection method to obtain key points; filtering the key points based on a preset filtering rule to obtain reject key points and filtered key points, wherein the filtered key points are the key points conforming to the preset filtering rule; Establishing a linear model based on the reject key points and the filtered key points, and carrying out regression prediction on the reject key points by utilizing the linear model to obtain the regressive key points; Correcting the abandoned key points according to a preset correction rule and the regressive key points to obtain corrected key points; and carrying out corresponding analysis and identification operation based on the corrected key points.
- 2. The behavior recognition method according to claim 1, wherein the detecting the target video by using a preset detection method to obtain the key point comprises: And detecting each frame of video frame of the target video by using a preset detection method to obtain a preset number of key points on the video frame of each frame, coordinates of the key points and confidence degrees of the key points.
- 3. The behavior recognition method according to claim 2, wherein the filtering the keypoints based on a preset filtering rule to obtain reject keypoints and filtered keypoints comprises: comparing the confidence degrees of all the key points with a preset confidence threshold; determining the key points corresponding to the confidence degrees of the key points larger than the preset confidence degree threshold value as the filtered key points; And determining the key points corresponding to the confidence degrees of the key points smaller than the preset confidence threshold value as the discarding key points.
- 4. The behavior recognition method of claim 2, wherein after the linear model is built based on the reject keypoints and the filtered keypoints, further comprising: standard key point data are acquired to obtain a standard data set; Normalizing all data in the standard data set to obtain a normalized data set; And performing a preset parameter solving operation based on the linear model and the normalized data set so as to obtain a target formula after calculating unknown parameters in the linear model.
- 5. The behavior recognition method according to claim 4, wherein the performing regression prediction on the discarded key points using the linear model to obtain the post-regression key points includes: calculating based on the target formula and the discarding key points to obtain target key points; And changing the coordinate scale corresponding to the coordinates of the target key points into the original coordinate scale so as to obtain the coordinates of the corresponding regressed key points.
- 6. The behavior recognition method according to claim 5, wherein after correcting the reject key according to a preset correction rule and the post-regression key to obtain a corrected key, further comprising: judging whether the regression coordinate value corresponding to the key point after regression exceeds a preset pixel range or not; if the regression coordinate value exceeds the preset pixel range, carrying out secondary coordinate correction on the corrected coordinates of the key points through a preset centering correction rule so as to obtain centered coordinates; and correcting the confidence coefficient of the reject key point by using a preset confidence coefficient correction formula to obtain a target confidence coefficient.
- 7. The behavior recognition method according to any one of claims 2 to 6, wherein the performing a corresponding analysis recognition operation based on the corrected keypoints includes: forming the filtered key points and the corrected key points into a target key point set; Generating a target matrix based on the coordinates corresponding to the target key point set and the confidence level; And inputting the target matrix into a preset recognition network for training, so that the recognition network after training is used for carrying out corresponding analysis recognition operation on the video.
- 8. A behavior recognition apparatus, comprising: the key point detection module is used for detecting the target video by using a preset detection method so as to obtain key points; The key point filtering module is used for filtering the key points based on a preset filtering rule to obtain abandoned key points and filtered key points, wherein the filtered key points are the key points conforming to the preset filtering rule; the model building module is used for building a linear model based on the reject key points and the filtered key points; the key point regression module is used for carrying out regression prediction on the abandoned key points by utilizing the linear model so as to obtain the key points after regression; The key point correction module is used for correcting the discarded key points according to a preset correction rule and the regressive key points so as to obtain corrected key points; and the analysis and identification module is used for carrying out corresponding analysis and identification operation based on the corrected key points.
- 9. An electronic device, comprising: A memory for storing a computer program; a processor for executing the computer program to implement the steps of the behavior recognition method of any one of claims 1 to 7.
- 10. A computer-readable storage medium, for storing a computer program, wherein the computer program, when executed by a processor, implements the behavior recognition method of any one of claims 1 to 7.
Description
Behavior recognition method, device, equipment and storage medium Technical Field The present invention relates to the field of computer vision, and in particular, to a behavior recognition method, apparatus, device, and storage medium. Background Many scenarios in real life have a wide variety of application requirements for behavior recognition algorithms, such as recognizing fall behaviors, etc. Skeleton-based algorithms are a common solution for behavior recognition, and the method generally extracts coordinates of key points of a human body in a video image through a feature extraction network, wherein the common feature extraction network comprises openpose (environment building), alphapose (human body gesture recognition) and the like, and then learns relations of different key points by using a graph neural network or a convolutional network, so as to finally recognize action behaviors of the human body. The two-stage behavior recognition method generally comprises a feature extraction network and a behavior classification network, and has the advantages that background information irrelevant to a human body in an RGB (Red-Green-Blue) image can be filtered through skeleton feature extraction, but an important problem is faced in practical application, namely the accuracy of the behavior classification network in the second stage is seriously dependent on the feature extraction network in the first stage, and when key points of the human body extracted by the feature extraction network are inaccurate and incomplete, the behavior classification network cannot accurately recognize behavior actions of the human body. However, the real scene often has incomplete pictures or has a shielding problem, and the whole behavior action of the human body can cause inaccurate feature point extraction due to target shielding or poor robustness of a feature extraction network to the complex scene. The key point can be regarded as the characteristic value of the data, and for the problems of the deficiency and the drift of the key point, one common solution in engineering is to use a method for processing the characteristic deficiency value, such as a method for discarding the data, a method for replacing the characteristic average value and the like. Discarding data refers to discarding the data when the key point data is missing, and the method of replacing the characteristic average value is sometimes adopted in practical application, namely replacing the missing value of the skeleton key point by the average value of the key point in all the data when the key point in the key point data is missing. The method has the defects that a large amount of incomplete skeleton data exists due to the fact that actual application scenes are complex and various, when the recognition model is trained due to the fact that data of missing feature points are abandoned, the data utilization rate is greatly reduced, the generalization capability of the model is limited, and when the recognition model reasoning is carried out, the model fails due to the fact that key points regressed in the application scenes are inaccurate. The method of substituting the feature average value for the missing key point ignores the position relation between the missing key point and other key points, so that the key point data is inaccurate, and finally, the performance of the recognition model is affected. Another method adopted in practice is to use a critical edge curve fitting algorithm of the front and back frames to regress the missing key points. The method utilizes a front-back frame relation to the key points with the confidence coefficient smaller than a certain value, and utilizes an adjacent edge curve fitting algorithm to finish the calculation of the coordinates and the confidence coefficient of the key points. The method has the defects that more front and back frame information is needed in application, and the captured single-picture algorithm can not only carry out regression on key points, so that the application range of the algorithm is limited. Critical edge curve fitting must ensure that the key points are in the image range, the key points which are beyond the image range cannot be regressed, and when the adjacent points of the current frame and the subsequent frame are outside the image area, the algorithm fails, so that the algorithm cannot solve the problem of regression correction of the key points of an incomplete human body. Disclosure of Invention In view of the above, the present invention aims to provide a behavior recognition method, apparatus, device and storage medium, which can improve accuracy and robustness of behavior recognition. The specific scheme is as follows: In a first aspect, the application discloses a behavior recognition method, comprising the following steps: Detecting the target video by using a preset detection method to obtain key points; filtering the key points based on a preset filtering rule