Method, device, equipment and storage medium for motion recognition based on video images

By adopting an action recognition method based on video images in the home monitoring system and using deep learning graph convolution network for human action recognition, the problems of low action recognition accuracy and expensive and complex equipment in the existing technology are solved, and an efficient, Economical health motion detection.

CN114511931BActive Publication Date: 2024-10-25PING AN TECH (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210163170.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-22
Publication Date
2024-10-25
Estimated Expiration
2042-02-22

AI Technical Summary

Technical Problem

The accuracy of human movement recognition in existing home monitoring systems is low and requires expensive dedicated RGB-D cameras and complex operations, making it difficult to popularize it in home smart monitoring systems.

Method used

An action recognition method based on video images is used to collect video streams for human body detection and skeletal data extraction. The deep learning graph convolution network is used to extract features and action recognition of key skeletal points to improve the accuracy of action recognition.

Benefits of technology

It achieves high-accuracy health action detection in ordinary home intelligent monitoring systems, reduces equipment costs and operational complexity, and is suitable for the needs of home intelligent health monitoring systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114511931B_ABST
    Figure CN114511931B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image recognition technology, and discloses a method, device, equipment and storage medium for action recognition based on video images. The method comprises: performing human body detection on at least two frames of image data collected within the monitoring range to obtain a corresponding human body region image; extracting human body bone data in the human body region image, and obtaining two-dimensional coordinates of key bone points contained in the human body region image according to the bone data; performing feature extraction on the human body region image according to the two-dimensional coordinates, and inputting the obtained feature vector into an action recognition model to recognize human body actions in the image, and obtaining action classification results; matching the action classification results with preset action categories, and returning the matching results to a preset client. The present invention can recognize actions based on a single bone point through a graph convolutional network-related algorithm of deep learning, thereby improving the accuracy of action recognition and solving the technical problem of low accuracy of human body action recognition in home monitoring.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image recognition technology, and in particular to a method, device, equipment and storage medium for action recognition based on video images. Background Art

[0002] Home-based elderly care is the mainstream elderly care mode in the future, and the construction of hard supporting facilities and soft supporting services are important links in building a home-based elderly care system. The home intelligent health monitoring system is a health monitoring mode that serves the family scene, and it is expected to be widely and deeply applied in the home-based elderly care scene in the future. According to the data compiled by Shell Research Institute, the emergency call system has become one of the most urgent needs of the elderly at home, and the detection of health-related movements at home is one of the important input sources for the emergency call system and the health management system.

[0003] The existing health monitoring systems based on motion detection have relatively simple functions and require the help of wearable devices. They are mainly used for fall detection and early warning, and health monitoring for other health-related actions is still in its infancy. With the continuous development of computer vision, camera-based health action recognition has also been applied, but the hardware devices used are dedicated RGB-D cameras based on kinect, which are expensive, complicated to operate, and not suitable for home use. With the popularization of home intelligent monitoring systems, the need to design a health action detection system that can directly monitor ordinary home intelligent monitoring is imminent. Summary of the invention

[0004] The main purpose of the present invention is to provide a method, device, equipment and storage medium for motion recognition based on video images to solve the technical problem of low accuracy of human motion recognition in existing home monitoring.

[0005] The first aspect of the present invention provides a method for action recognition based on video images, comprising: collecting a video stream within a preset monitoring range based on a preset video acquisition device, and sampling from the video stream to obtain at least two frames of target image data; performing human body detection on the target image data, and extracting a corresponding human body area image from the target image data; extracting human body skeleton data in the human body area image, and performing skeleton key point detection on the human body area image based on the skeleton data to obtain the two-dimensional coordinates of the skeleton key points contained in the human body area image; performing feature extraction on the human body area image based on the two-dimensional coordinates of the skeleton key points to obtain a feature vector of the human body area image; inputting the feature vector into a preset action recognition model, identifying human body actions in the human body area image through the action recognition model, determining the real-time activity posture of the human target in the human body area image, and obtaining an action classification result; obtaining an action classification result based on the real-time activity posture, and matching the action classification result with a preset action category, and returning the matching result to a preset client.

[0006] Optionally, in a first implementation method of the first aspect of the present invention, extracting the skeleton data of a human body in the human body region image includes: obtaining pixel points of the human body region image and extracting depth information of the pixel points; segmenting the human body region image into a human body image and a background image according to the depth information of the pixel points; comparing the human body image with preset standard human body image data to obtain the skeleton data of the human body in the human body region image.

[0007] Optionally, in a second implementation method of the first aspect of the present invention, performing skeleton key point detection on the human body area image according to the skeleton data to obtain the two-dimensional coordinates of the skeleton key points contained in the human body area image includes: inputting the human body area image into a preset image association model, and associating each human body area image corresponding to the same human body in the target area image to obtain the association relationship between the human body and the human body area image; inputting the human body area image into a preset human body key point recognition model, and performing key point recognition on the human body area image according to the association relationship between the human body area images to obtain the two-dimensional coordinates of the skeleton key points contained in the human body area image.

[0008] Optionally, in a third implementation manner of the first aspect of the present invention, the feature extraction of the human body area image according to the two-dimensional coordinates of the skeleton key points to obtain the feature vector of the human body area image includes: determining the speed information of the skeleton key points according to the time of the human body area image corresponding to the video frame; inputting the speed information into a preset neural network model, and performing feature extraction on the speed information through the neural network model to obtain a first feature vector of the target image data; inputting the two-dimensional coordinates of the human body area image and the skeleton key points into the neural network model, and performing feature extraction on the two-dimensional coordinates of the human body area image and the skeleton key points through the neural network model to obtain a second feature vector of the target image data; and performing vector splicing on the first feature vector and the second feature vector to obtain the feature vector of the human body area image.

[0009] Optionally, in a fourth implementation method of the first aspect of the present invention, before inputting the feature vector into a preset action recognition model, identifying human actions in the human body area image through the action recognition model, determining the real-time activity posture of the human target in the human body area image, and obtaining the action classification result, it also includes: acquiring multiple frames of human action recognition images, wherein the human action recognition images include multiple human action images; building an ST-G3D graph convolutional neural network framework, performing human action detection on the human action recognition images through the ST-G3D graph convolutional neural network, and obtaining multiple frames of human feature images; inputting the human feature image into the ST-G3D graph convolutional neural network to train the ST-G3D graph convolutional neural network to obtain an action recognition model.

[0010] Optionally, in a fifth implementation manner of the first aspect of the present invention, the ST-G3D graph convolutional neural network framework is constructed, and human motion detection is performed on the human motion recognition image through the ST-G3D graph convolutional neural network to obtain multiple frames of human feature images, including: scaling the human motion recognition image and constructing an image pyramid; performing feature extraction and border calibration on the image pyramid through the ST-G3D graph convolutional neural network to obtain a first feature map; filtering the border marked by the first feature map to obtain a second feature map, and obtaining a human feature image based on the second feature map.

[0011] Optionally, in a sixth implementation method of the first aspect of the present invention, the inputting the human feature image into the ST-G3D graph convolutional neural network to train the ST-G3D graph convolutional neural network to obtain an action recognition model includes: initializing the network parameters of the ST-G3D graph convolutional neural network; batch inputting the human feature images into the ST-G3D graph convolutional neural network, and training based on a preset first learning rate to obtain a gradient value of the ST-G3D graph convolutional neural network; extracting the first label and the second label in the human feature image, and calculating the cross entropy loss function of the first label and the second label; calling a preset gradient descent algorithm to calculate the weight attenuation coefficient of the ST-G3D graph convolutional neural network through the cross entropy loss function and the gradient value, and updating the parameters of the ST-G3D graph convolutional neural network through the weight attenuation coefficient to obtain an action recognition model.

[0012] The second aspect of the present invention provides a motion recognition device based on video images, comprising: an acquisition module, which is used to acquire a video stream within a preset monitoring range based on a preset video acquisition device, and sample from the video stream to obtain at least two frames of target image data; a first extraction module, which is used to perform human body detection on the target image data, and extract the corresponding human body region image from the target image data; a detection module, which is used to extract the skeleton data of the human body in the human body region image, and perform skeleton key point detection on the human body region image according to the skeleton data to obtain the two-dimensional coordinates of the skeleton key points contained in the human body region image; a second extraction module, which is used to perform feature extraction on the human body region image according to the two-dimensional coordinates of the skeleton key points to obtain a feature vector of the human body region image; a recognition module, which is used to input the feature vector into a preset motion recognition model, recognize the human body motion in the human body region image through the motion recognition model, determine the real-time activity posture of the human body target in the human body region image, and obtain a motion classification result; a matching module, which is used to obtain a motion classification result according to the real-time activity posture, match the motion classification result with a preset motion category, and return the matching result to a preset client.

[0013] Optionally, in a first implementation method of the second aspect of the present invention, the detection module is specifically used to: obtain pixel points of the human body area image and extract depth information of the pixel points; segment the human body area image into a human body image and a background image according to the depth information of the pixel points; compare the human body image with preset standard human body image data to obtain bone data of the human body in the human body area image.

[0014] Optionally, in a second implementation method of the second aspect of the present invention, the detection module is specifically used to: input the human body area image into a preset image association model, and associate each human body area image corresponding to the same human body in the target area image to obtain an association relationship between the human body and the human body area image; input the human body area image into a preset human body key point recognition model, and perform key point recognition on the human body area image according to the association relationship between the human body area images to obtain the two-dimensional coordinates of the bone key points contained in the human body area image.

[0015] Optionally, in a third implementation manner of the second aspect of the present invention, the second extraction module includes: a determination unit, used to determine the speed information of the skeleton key points according to the time of the video frame corresponding to the human body area image; a feature extraction unit, used to input the speed information into a preset neural network model, and perform feature extraction on the speed information through the neural network model to obtain a first feature vector of the target image data; input the two-dimensional coordinates of the human body area image and the skeleton key points into the neural network model, and perform feature extraction on the two-dimensional coordinates of the human body area image and the skeleton key points through the neural network model to obtain a second feature vector of the target image data; a vector splicing unit, used to perform vector splicing on the first feature vector and the second feature vector to obtain a feature vector of the human body area image.

[0016] Optionally, in a fourth implementation method of the second aspect of the present invention, the video image-based action recognition device also includes: an acquisition module, used to acquire multiple frames of human action recognition images, wherein the human action recognition images include multiple human action images; a building module, used to build an ST-G3D graph convolutional neural network framework, and perform human action detection on the human action recognition images through the ST-G3D graph convolutional neural network to obtain multiple frames of human feature images; a training module, used to input the human feature images into the ST-G3D graph convolutional neural network to train the ST-G3D graph convolutional neural network to obtain an action recognition model.

[0017] Optionally, in a fifth implementation manner of the second aspect of the present invention, the building module is specifically used to: scale the human action recognition image and construct an image pyramid; perform feature extraction and border calibration on the image pyramid through the ST-G3D graph convolutional neural network to obtain a first feature map; filter the border marked by the first feature map to obtain a second feature map, and obtain a human feature image based on the second feature map.

[0018] Optionally, in a sixth implementation method of the second aspect of the present invention, the training module is specifically used to: initialize the network parameters of the ST-G3D graph convolutional neural network; batch input the human feature images into the ST-G3D graph convolutional neural network, and train based on a preset first learning rate to obtain a gradient value of the ST-G3D graph convolutional neural network; extract the first label and the second label in the human feature image, and calculate the cross entropy loss function of the first label and the second label; through the cross entropy loss function and the gradient value, call the preset gradient descent algorithm to calculate the weight attenuation coefficient of the ST-G3D graph convolutional neural network, and update the parameters of the ST-G3D graph convolutional neural network through the weight attenuation coefficient to obtain an action recognition model.

[0019] A third aspect of the present invention provides a video image-based action recognition device, comprising: a memory and at least one processor, wherein instructions are stored in the memory, and the memory and the at least one processor are interconnected via a line;

[0020] The at least one processor calls the instructions in the memory to enable the video image-based action recognition device to perform the steps of the video image-based action recognition method.

[0021] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the steps of the above-mentioned method for action recognition based on video images.

[0022] In the technical solution provided by the present invention, at least two frames of image data within a preset monitoring range are collected; human body detection is performed on the image data to obtain a corresponding human body region image; human body bone data in the human body region image is extracted, and two-dimensional coordinates of key bone points contained in the human body region image are obtained based on the bone data; feature extraction is performed on the human body region image based on the two-dimensional coordinates, and the obtained feature vector is input into the action recognition model to identify the human body action in the image to obtain an action classification result; the action classification result is matched with the preset action category, and the matching result is returned to the preset client. The present invention can identify actions based on a single bone point through a graph convolutional network-related algorithm of deep learning, improve the accuracy of action recognition, and solve the technical problem of low accuracy of human action recognition in home monitoring. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of a first embodiment of a method for action recognition based on video images provided by the present invention;

[0024] Figure 2A schematic diagram of a second embodiment of the method for action recognition based on video images provided by the present invention;

[0025] Figure 3 A schematic diagram of a third embodiment of the method for action recognition based on video images provided by the present invention;

[0026] Figure 4 A schematic diagram of a fourth embodiment of the method for action recognition based on video images provided by the present invention;

[0027] Figure 5 A schematic diagram of a fifth embodiment of the method for action recognition based on video images provided by the present invention;

[0028] Figure 6 A schematic diagram of a first embodiment of a video image-based action recognition device provided by the present invention;

[0029] Figure 7 A schematic diagram of a second embodiment of the video image-based motion recognition device provided by the present invention;

[0030] Figure 8 A schematic diagram of an embodiment of a video image-based action recognition device provided by the present invention. DETAILED DESCRIPTION

[0031] The video image-based action recognition method, device, equipment and storage medium provided by the embodiments of the present invention first collect at least two frames of image data within a preset monitoring range; perform human body detection on the image data to obtain a corresponding human body region image; extract the human body's skeletal data in the human body region image, and obtain the two-dimensional coordinates of the skeletal key points contained in the human body region image based on the skeletal data; perform feature extraction on the human body region image based on the two-dimensional coordinates, and input the obtained feature vector into the action recognition model to recognize the human body action in the image to obtain an action classification result; match the action classification result with the preset action category, and return the matching result to the preset client. The present invention can recognize actions based on a single skeletal point through a deep learning graph convolutional network-related algorithm, improve the accuracy of action recognition, and solve the technical problem of low accuracy of human action recognition in home monitoring.

[0032] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned appendix are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0033] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 , a first embodiment of the method for action recognition based on video images in an embodiment of the present invention includes:

[0034] 101. Collect a video stream within a preset monitoring range based on a preset video acquisition device, and sample from the video stream to obtain at least two frames of target image data;

[0035] In this embodiment, a video stream within a preset monitoring range is collected based on a preset video acquisition device, and sampling is performed from the video stream to obtain at least two frames of target image data. Since the video stream is composed of multiple continuous video frames, after receiving the video stream transmitted by the camera, starting from the first video frame of the video stream, the trained human body detection network is used to perform human body detection on each video frame in turn to determine whether each video frame contains a human body.

[0036] Specifically, in actual applications, users can collect video streams within a preset monitoring range based on preset video acquisition equipment, and sample from the video stream to obtain at least two frames of target image data. For example, an ordinary home camera series can be used, whose basic features are that it contains an RGB camera module for image acquisition and communication modules such as Bluetooth and WiFi for the transmission of image and other data. Some more intelligent home cameras also have functions such as viewing angle rotation and pedestrian tracking, and can be linked to an intelligent transmission processing terminal to transmit the 200w pixels captured by the camera. The real-time picture of the 16:9 frame is transmitted to the intelligent processing terminal, and the human behavior in the video is identified and monitored to further ensure the safety of the monitored personnel and play a role in monitoring the health of the elderly. Among them, 10 common household health actions can be identified, namely: taking medicine, smoking, falling down, sitting / lying down for a long time, sneezing / coughing, headache, back pain, neck pain, nausea / vomiting, and blowing nose. It can be divided into two categories according to the type of danger urgency:

[0037] 1. Danger and emergency: falling, sitting / lying for a long time, nausea and vomiting

[0038] 2. Health behaviors: taking medicine, smoking, sneezing / coughing, headache, back pain, cervical pain, and blowing the nose.

[0039] In this embodiment, an action recognition model can be pre-trained. The action recognition model can integrate local action information and global action information to predict the target action appearing in the video data. When the training of the action recognition model is completed, the parameters and structure of the action recognition model can be saved. When executing the video content review process, the action recognition model can be directly loaded to complete the target action recognition in the video data without retraining the action recognition model.

[0040] 102. Perform human body detection on the target image data, and extract a corresponding human body region image from the target image data;

[0041] In this embodiment, if it is determined that a human body is detected in a certain video frame of the video stream frame, the video frame containing the human body is marked. In this way, it can be known that a human body is detected in the video frame based on the mark of the video frame. Then, the position of the human body in the video frame is marked by a boundary rectangular box to obtain a human body area image, and the position data of the human body area image on the video frame is determined, wherein the human body is contained in the human body area image.

[0042] Specifically, after obtaining the position data of the human body region image on the video frame, in each video frame of the video stream, the human body in each video frame is tracked according to the determined position data, and the human body region image corresponding to the human body in the tracked video frame is determined. When tracking the human body, it can be achieved by optical flow neural network (FlowNet).

[0043] 103. Extracting human skeleton data from the human body region image, and performing skeleton key point detection on the human body region image according to the skeleton data to obtain two-dimensional coordinates of the skeleton key points contained in the human body region image;

[0044] In this embodiment, the human body region image of the human body to be identified is obtained, and the human body region image is perspective processed, and the skeleton data of the human body in the human body region image is extracted according to the perspective processing result. Wherein, the skeleton data mainly includes the skeleton data of key nodes (or important joint points) of the human body, for example, it can be head joint point data, shoulder joint center data, left shoulder joint data, right shoulder joint data, left elbow joint data, right elbow joint data, left wrist joint data, right wrist joint data, left hand data, right hand data, spine data, hip joint center data, left hip joint data, right hip joint data, left knee joint data, right knee joint data, left ankle joint data, right ankle joint data, left foot data and right foot data, etc.

[0045] In this step, the skeleton data of each joint point is not required. It is only necessary to extract the skeleton data of several key nodes of the human body, which can greatly reduce the amount of calculation and effectively improve the recognition accuracy.

[0046] For each video frame, human body key point detection is performed on the human body area image in any video frame to obtain the two-dimensional key point coordinates corresponding to each human body key point contained in the human body area image, and each two-dimensional key point coordinate is converted into a three-dimensional key point coordinate by a preset coordinate conversion method.

[0047] In this embodiment, for each video frame, human key point detection is performed on the human body region image in any video frame to obtain human key point information corresponding to each human body key point in the human body region image, and the obtained human body key point information at least includes the two-dimensional key point coordinates of each human body key point

[0048] 104. Extract features of the human body region image according to the two-dimensional coordinates of the skeleton key points to obtain a feature vector of the human body region image;

[0049] In this embodiment, based on the trained three-dimensional neural network model, the speed information is used as an input parameter to extract features of the speed information and determine the first feature vector of the human body region image. The three-dimensional neural network model is obtained by iterative training based on a speed information sample set containing the first feature vector.

[0050] In this embodiment, a three-dimensional neural network model is first trained. The three-dimensional neural network model is obtained by iterative training based on a speed information sample set containing a first eigenvector. The speed information sample set contains a plurality of speed information samples and corresponding first eigenvector samples, as well as an association relationship between the speed information samples and the corresponding first eigenvector samples. The speed information of the human body region image is input into the trained three-dimensional neural network model, and the speed information is feature extracted. Finally, the first eigenvector of the human body region image is obtained. The first eigenvector can be, for example, a 156-dimensional vector.

[0051] Furthermore, based on the trained two-dimensional neural network model, the coordinates of each two-dimensional key point and the corresponding human body region image are used as input parameters, and feature extraction is performed on each two-dimensional key point coordinate and the corresponding human body region image to determine the second feature vector of the human body region image. The two-dimensional neural network model is obtained by iterative training based on the sample set of two-dimensional key point coordinates and the sample set of corresponding human body region images.

[0052] In this embodiment, first, a two-dimensional neural network model is trained. When the two-dimensional neural network model is trained, it is obtained by iterative training based on a two-dimensional key point coordinate sample set and a corresponding human body region image sample set, wherein the two-dimensional key point coordinate sample set includes a plurality of two-dimensional key point coordinate samples, and the human body region image sample set includes a plurality of human body region image samples, and each human body region image sample corresponds to a set of two-dimensional key point coordinate samples of human body key points.

[0053] After obtaining the trained two-dimensional neural network model, the coordinates of each two-dimensional key point corresponding to the human body region image and the corresponding human body region image are input into the trained two-dimensional neural network model, and feature extraction is performed on the coordinates of each two-dimensional key point corresponding to the human body region image, and feature extraction is performed on the human body region image to obtain a second feature vector of the human body region image. The second feature vector may be, for example, a 156-dimensional vector.

[0054] Finally, the first eigenvector and the second eigenvector are merged to obtain the eigenvector of the human body region image. After obtaining the first eigenvector and the second eigenvector of the human body region image, the first eigenvector and the second eigenvector are dimensionally merged to obtain the eigenvector of the human body region image. For example, assuming that the first eigenvector is a 156-dimensional vector and the second eigenvector is a 156-dimensional vector, a 318-dimensional eigenvector of the human body region image is obtained.

[0055] 105. Input the feature vector into a preset action recognition model, recognize the human action in the human region image through the action recognition model, determine the real-time activity posture of the human target in the human region image, and obtain the action classification result;

[0056] In this embodiment, the feature vector is input into a preset action recognition model, and the human body action in the human body region image is recognized by the action recognition model to determine the real-time activity posture of the human body target in the human body region image to obtain an action classification result.

[0057] Wherein, the active posture mainly reflects what kind of posture or action the human target is currently in, and does not mean that the human target must be in an active state at present. The posture when the human target is in an inactive posture is also an active posture, and the posture when for example sleeping is also a kind of active posture. In the present invention, the active posture includes but is not limited to sitting posture, standing posture, sleeping posture, walking posture, squatting posture, going to the toilet, etc. Under different active postures, the real-time relative position relationship of each skeleton key point of the human target will be different, therefore according to the real-time position of each skeleton key point of the human target detected by the skeleton key point detection module 32, the real-time relative position relationship of each skeleton key point of the human target (for example the relative position height of each skeleton key point) is calculated to determine the real-time active posture of the human target. The corresponding relationship data between the various active postures of human body and the relative position relationship of the skeleton key point can be pre-stored, then the real-time relative position relationship of each skeleton key point of the human target is detected, and then the real-time active posture of the human target is determined according to the pre-stored corresponding relationship. The activity posture of the human target can be recorded in real time according to the timeline. From the moment when the activity posture of the human target is recorded, the activity posture of the human target at each moment can be recorded in real time. In this way, the activity posture of the human target at any moment can be obtained, so that the activity posture data of the human target in the past period of time can be obtained.

[0058] 106. Obtain action classification results according to the real-time activity posture, match the action classification results with preset action categories, and return the matching results to the preset client.

[0059] In this embodiment, the action recognition model is trained and evaluated through the public human skeletal action recognition data set, the obtained optimal model is integrated with the monitoring video interface, and the action estimation algorithm is introduced at the interface to transform the video data to eliminate the impact of background changes caused by rotating the monitoring camera. The human skeletal motion sequence is then preprocessed and input into the trained model after conversion feature representation, and the recognition result is output and compared with the set dangerous action category to determine whether there is a dangerous action, and the comparison result is returned to the monitoring personnel for processing.

[0060] Since different surveillance cameras have different resolutions and coordinate systems, after motion estimation, the skeletal motion data needs to be standardized and decentralized to eliminate the effects of scale and coordinates.

[0061] Specifically, the embodiment of the present invention can identify 10 common household health actions, and the [innovative points] are: taking medicine, smoking, falling down, sitting / lying down, sneezing / coughing, headache, back pain, neck pain, nausea / vomiting, and blowing nose. It can be divided into two categories according to the type of danger urgency:

[0062] 1. Danger and emergency: falling, sitting / lying for a long time, nausea and vomiting

[0063] 2. Health behaviors: taking medicine, smoking, sneezing / coughing, headache, back pain, cervical pain, and blowing the nose.

[0064] One implementation scheme based on the above action recognition requirements is to use the above action categories in the public data sets: NTU GTB+D

[10] , ETRI-Activity3D

[11] , and actual sample combinations to train the deep learning model. When training the model, a desirable parameter setting value is: epoch is 60, the initial value of the learning rate is 0.01 and the weight decay is increased, the optimizer can select the common Adam optimizer, and batch_size is selected according to the server performance. In this embodiment, it can be set to 256.

[0065] Another implementation scheme based on the above recognition action requirements is to first convert the data format of the input data, convert the bone point data of all .csv files, generate two sets of tensor data of joints and bones in .npy format, and then send the two sets of data to two channel streams for feature extraction operations. The basic unit of feature extraction is the A-STGC module. The number of modules can be determined according to actual performance, and can be set to 2 in this embodiment.

[0066] Another solution based on the above action recognition requirements is to use global pooling to fuse the data after extracting the two streams separately, and only retain important information. Considering that skeletal actions and joint point actions are related, and not all information plays a decisive role in action recognition, global pooling is performed to retain important node information.

[0067] Another experimental scheme based on the above-mentioned action recognition requirements is to normalize the globally pooled fusion feature information through a fully connected layer and a softmax function, and output the weight ratio of each action.

[0068] In an embodiment of the present invention, at least two frames of image data within a preset monitoring range are collected; human body detection is performed on the image data to obtain a corresponding human body region image; human body bone data in the human body region image is extracted, and two-dimensional coordinates of key bone points contained in the human body region image are obtained based on the bone data; feature extraction is performed on the human body region image based on the two-dimensional coordinates, and the obtained feature vector is input into an action recognition model to identify human body actions in the image to obtain an action classification result; the action classification result is matched with a preset action category, and the matching result is returned to a preset client. The present invention can identify actions based on a single bone point through a graph convolutional network-related algorithm of deep learning, thereby improving the accuracy of action recognition and solving the technical problem of low accuracy of human action recognition in home monitoring.

[0069] See also Figure 2 , a second embodiment of the method for action recognition based on video images in the embodiment of the present invention includes:

[0070] 201. Collect a video stream within a preset monitoring range based on a preset video acquisition device, and sample from the video stream to obtain at least two frames of target image data;

[0071] 202. Perform human body detection on the target image data, and extract a corresponding human body region image from the target image data;

[0072] 203. Obtain pixel points of the human body region image and extract depth information of the pixel points;

[0073] In this embodiment, the foreground and background in the depth image are segmented according to the depth information of the pixel points, and the foreground is compared with the standard human body model as a candidate object of the human body to obtain skeleton data that may include twenty joint point data, and the twenty joint point data include: head joint point data, shoulder joint center data, left shoulder joint data, right shoulder joint data, left elbow joint data, right elbow joint data, left wrist joint data, right wrist joint data, left hand data, right hand data, spine data, hip joint center data, left hip joint data, right hip joint data, left knee joint data, right knee joint data, left ankle joint data, right ankle joint data, left foot data and right foot data.

[0074] 204. Segment the human body region image into a human body image and a background image according to the depth information of the pixel points;

[0075] In this embodiment, it is assumed that the threshold is a grayscale value of 0-255. Threshold processing is to compare the grayscale value of pixels in the image with the threshold. Pixels falling within the range are called foreground, and the remaining pixels are called background. Generally, black and white are used to represent the foreground and background. In this way, the image is a binary image with only black and white colors.

[0076] In this embodiment, according to the depth information of the pixel points, the foreground / background segmentation algorithm based on the mixed Gaussian model is called to use K (K = 3 or 5) Gaussian distribution mixtures to model the background pixels. A simpler understanding is: the foreground is the object you are interested in, but the background is not. For example, there is a screw on the conveyor belt, and you want to detect whether it has defects. Then the screw is the foreground in the image, and the conveyor belt is the background in the image. During machine vision inspection, the screw must be segmented as the foreground and the conveyor belt as the background, and then the segmented foreground (image) containing the screw is inspected to determine whether the screw has defects.

[0077] 205. Compare the human body image with preset standard human body image data to obtain human body skeleton data in the human body region image;

[0078] In this embodiment, 15 bone points are set for each human body, and the 15 bone points are: the center of the head, the center of the neck (for example, the spinal center of the neck), the center of the trunk (for example, the spinal center of the trunk), the left shoulder joint, the left elbow joint, the left wrist joint, the right shoulder joint, the right elbow joint, the right wrist joint, the left hip joint, the left knee joint, the left ankle joint, the right hip joint, the right knee joint, and the right ankle joint.

[0079] In this case, the 15 bone points are divided into five body parts with 3 bone points as units: trunk, left arm, right arm, left leg and right leg. Among them, vectors are formed between the bone points in each body part, and angles are formed between the vectors. The human body image is compared with the preset standard human body image data to obtain the human body bone data in the human body area image.

[0080] 206. Input the human body region image into a preset image association model, and associate the human body region images corresponding to the same human body in the target region image to obtain an association relationship between the human body and the human body region images;

[0081] In this embodiment, the video stream is a video shot by multiple cameras, that is, the video stream can be a video shot of a human body or multiple human bodies from different angles. Therefore, each video frame of the video stream contains video images shot by multiple cameras, and each video frame also contains multiple human body area images of the same human body, and each camera corresponds to a video image. Since each video image may contain multiple human bodies, in the same video frame, the human body area images in each video image corresponding to the same human body need to be associated. Therefore, in an embodiment of the present application, an image association model is trained, and based on the trained image association model, the human body area images shot by each camera in any video frame are used as input parameters to associate the human body area images corresponding to the same human body, and an association relationship between the human body and each human body area image is established.

[0082] Among them, the image association model can be, for example, a re-identification (Re-identification, ReID) model, which is not limited in the embodiments of the present application. Among them, each human body region image is a human body region image at different angles at the same time point. For example, assuming that there are 3 cameras shooting videos at the same time, and shooting the front, back and side of each human body respectively, the human body region image contains the video transmitted by 3 cameras. The following is an example of the first video frame. Since there are 3 cameras shooting at the same time, the first video frame contains 3 video images. Assuming that each video image contains 2 human bodies, A and B, respectively, after human body detection is performed on each video image, a total of 6 human body region images are obtained, and these six human body region images are respectively input into the trained image association model, and the human body region images of human body A are associated, that is, there are 3 human body region images associated with human body A, and the human body region images of human body B are associated, that is, there are 3 human body region images associated with human body B, so each human body region image associated with each human body is obtained. It is shot by different cameras and is about the same human body.

[0083] 207. Input the human body region image into a preset human body key point recognition model, and perform key point recognition on the human body region image according to the association relationship between the human body region images to obtain the two-dimensional coordinates of the skeleton key points contained in the human body region image;

[0084] In this embodiment, first, a human body key point recognition model is trained. When training the human body key point recognition model, it is obtained by iterative training of a human body region image sample set and a corresponding two-dimensional key point coordinate sample set. The human body region image sample set includes multiple human body region image samples, and each human body region image sample corresponds to a two-dimensional key point coordinate sample of each human body key point.

[0085] Then, the trained human key point recognition model is obtained, and each associated human region image in any video frame is input into the trained human key point recognition model, and the following operations are performed on each associated human region image: human key point detection is performed on the human region image, each human key point of the human region image is obtained, and the position information of each human key point in the human region image is obtained, and the two-dimensional key point coordinates of each human key point are determined. In addition, when the human key point detection is performed on the human region image, the attribute information corresponding to each human key point is also detected. Among them, the attribute information is visible or invisible, and the attribute information is visible, which indicates that the human key point is not blocked, and the attribute information is invisible, which indicates that the human key point is blocked externally or blocked by the human body.

[0086] For example, assuming that the human body area images associated with human body A are A1, A2, and A3 respectively, then the human body area images are input into the trained human body key point recognition model, and human body key point detection is performed on A1 to determine the two-dimensional key point coordinates corresponding to each human body key point contained in A1, as well as the attribute information corresponding to each human body key point. Human body key point detection is performed on A2 to determine the two-dimensional key point coordinates corresponding to each human body key point contained in A2, as well as the attribute information corresponding to each human body key point. Human body key point detection is performed on A3 to determine the two-dimensional key point coordinates corresponding to each human body key point contained in A3, as well as the attribute information corresponding to each human body key point.

[0087] Then, after obtaining the two-dimensional key point coordinates of each human key point of each associated human region image, for each human region image, the two-dimensional key point coordinates of the human region image are converted into a key point heat map through a preset conversion method, and the depth map of the human region image is obtained by determining the image depth of the human region image, and based on the trained coordinate conversion model, the key point heat map, depth map and each two-dimensional key point coordinate of the human region image are used as input parameters to determine the three-dimensional key point coordinates of the human region image. Among them, the attribute information is visible or invisible.

[0088] 208. Extract features of the human body region image according to the two-dimensional coordinates of the skeleton key points to obtain a feature vector of the human body region image;

[0089] 209. Input the feature vector into a preset action recognition model, recognize the human action in the human region image through the action recognition model, determine the real-time activity posture of the human target in the human region image, and obtain an action classification result;

[0090] 210. Obtain action classification results according to the real-time activity posture, match the action classification results with preset action categories, and return the matching results to the preset client.

[0091] Steps 201 - 202 and 208 - 210 in this embodiment are similar to steps 101 - 102 and 104 - 106 in the first embodiment, and are not described again here.

[0092] In an embodiment of the present invention, at least two frames of image data within a preset monitoring range are collected; human body detection is performed on the image data to obtain a corresponding human body region image; human body bone data in the human body region image is extracted, and two-dimensional coordinates of key bone points contained in the human body region image are obtained based on the bone data; feature extraction is performed on the human body region image based on the two-dimensional coordinates, and the obtained feature vector is input into an action recognition model to identify human body actions in the image to obtain an action classification result; the action classification result is matched with a preset action category, and the matching result is returned to a preset client. The present invention can identify actions based on a single bone point through a graph convolutional network-related algorithm of deep learning, thereby improving the accuracy of action recognition and solving the technical problem of low accuracy of human action recognition in home monitoring.

[0093] See also Figure 3 , a third embodiment of the method for action recognition based on video images in the embodiment of the present invention includes:

[0094] 301. Collect a video stream within a preset monitoring range based on a preset video acquisition device, and sample from the video stream to obtain at least two frames of target image data;

[0095] 302. Perform human body detection on the target image data, and extract a corresponding human body region image from the target image data;

[0096] 303. Extracting human skeleton data from the human body region image, and performing skeleton key point detection on the human body region image according to the skeleton data to obtain two-dimensional coordinates of the skeleton key points contained in the human body region image;

[0097] 304. Determine the speed information of the skeleton key points according to the time of the human body region image corresponding to the video frame;

[0098] In this embodiment, the speed information of each human key point in the human region image is determined by dividing the difference between the 3D key point heat map corresponding to the human region image in each video frame and the 3D key point heat map corresponding to the human region image in the previous video frame by the time value between each video frame. The speed information can also be called speed optical flow.

[0099] 305. Input the speed information into a preset neural network model, perform feature extraction on the speed information through the neural network model, and obtain a first feature vector of the target image data;

[0100] In this embodiment, a neural network model is first trained. The neural network model is obtained by iterative training based on a speed information sample set containing a first eigenvector. The speed information sample set contains multiple speed information samples and corresponding first eigenvector samples, as well as an association relationship between the speed information samples and the corresponding first eigenvector samples.

[0101] After obtaining the trained neural network model, the speed information of the human body region image is input into the trained neural network model, and the speed information is subjected to feature extraction, and finally, the first feature vector of the human body region image is obtained. The first feature vector may be, for example, a 156-dimensional vector. The neural network model is obtained by iterative training based on a speed information sample set containing the first feature vector.

[0102] 306. Input the two-dimensional coordinates of the human body region image and the skeleton key points into the neural network model, perform feature extraction on the two-dimensional coordinates of the human body region image and the skeleton key points through the neural network model, and obtain a second feature vector of the target image data;

[0103] In this embodiment, first, a neural network model is trained, and the neural network model is a two-dimensional neural network model. When the two-dimensional neural network model is trained, it is obtained by iterative training based on a two-dimensional key point coordinate sample set and a corresponding human body region image sample set, wherein the two-dimensional key point coordinate sample set includes a plurality of two-dimensional key point coordinate samples, and the human body region image sample set includes a plurality of human body region image samples, and each human body region image sample corresponds to a set of two-dimensional key point coordinate samples of human body key points.

[0104] After obtaining the trained two-dimensional neural network model, the coordinates of each two-dimensional key point corresponding to the human body region image and the corresponding human body region image are input into the trained two-dimensional neural network model, and feature extraction is performed on the coordinates of each two-dimensional key point corresponding to the human body region image, and feature extraction is performed on the human body region image to obtain a second feature vector of the human body region image. The second feature vector may be, for example, a 156-dimensional vector.

[0105] 307. Concatenate the first eigenvector and the second eigenvector to obtain a eigenvector of the human body region image;

[0106] In this embodiment, after obtaining the first eigenvector and the second eigenvector of the human body region image, the first eigenvector and the second eigenvector are dimensionally merged to obtain the eigenvector of the human body region image. For example, assuming that the first eigenvector is a 156-dimensional vector and the second eigenvector is a 156-dimensional vector, a 318-dimensional eigenvector of the human body region image is obtained.

[0107] 308. Input the feature vector into a preset action recognition model, recognize the human action in the human region image through the action recognition model, determine the real-time activity posture of the human target in the human region image, and obtain an action classification result;

[0108] 309. Obtain action classification results according to the real-time activity posture, match the action classification results with preset action categories, and return the matching results to the preset client.

[0109] Steps 301 - 303 and 308 - 309 in this embodiment are similar to steps 101 - 103 and 105 - 106 in the first embodiment, and are not described again here.

[0110] In an embodiment of the present invention, at least two frames of image data within a preset monitoring range are collected; human body detection is performed on the image data to obtain a corresponding human body region image; human body bone data in the human body region image is extracted, and two-dimensional coordinates of key bone points contained in the human body region image are obtained based on the bone data; feature extraction is performed on the human body region image based on the two-dimensional coordinates, and the obtained feature vector is input into an action recognition model to identify human body actions in the image to obtain an action classification result; the action classification result is matched with a preset action category, and the matching result is returned to a preset client. The present invention can identify actions based on a single bone point through a graph convolutional network-related algorithm of deep learning, thereby improving the accuracy of action recognition and solving the technical problem of low accuracy of human action recognition in home monitoring.

[0111] See also Figure 4 , a fourth embodiment of the method for action recognition based on video images in the embodiments of the present invention includes:

[0112] 401. Collect a video stream within a preset monitoring range based on a preset video acquisition device, and sample from the video stream to obtain at least two frames of target image data;

[0113] 402. Perform human body detection on the target image data, and extract a corresponding human body region image from the target image data;

[0114] 403. Extracting human skeleton data from the human body region image, and performing skeleton key point detection on the human body region image according to the skeleton data to obtain two-dimensional coordinates of the skeleton key points contained in the human body region image;

[0115] 404. Extract features of the human body region image according to the two-dimensional coordinates of the skeleton key points to obtain a feature vector of the human body region image;

[0116] 405. Acquire multiple frames of human action recognition images, wherein the human action recognition images include multiple human action images;

[0117] In this embodiment, multiple frames of human motion recognition images are acquired, wherein the human motion recognition images include multiple types of human motion images.

[0118] 406. Build the ST-G3D graph convolutional neural network framework, perform human action detection on human action recognition images through the ST-G3D graph convolutional neural network, and obtain multiple frames of human feature images;

[0119] In this embodiment, an ST-G3D graph convolutional neural network framework is built, and human motion detection is performed on human motion recognition images through the ST-G3D graph convolutional neural network. Taking 0.2s as the standard, if the interval between the two frames exceeds 0.5s, they are regarded as two frame sequences. If the interval between the two frames is less than 0.5s, they are regarded as a whole frame sequence for processing.

[0120] For a single frame sequence input, the value of T is set to 30, that is, 30 frames are used as an input sequence. For a sequence with a single input of less than 30 frames, the sequence with 0 content is supplemented to 30 frames and input into the deep network. For a sequence with a single input of more than 30 frames, it is split into 30 frames, cut into multiple segments and input into the network for recognition. If the last segment has less than 30 frames, it is processed as a sequence with less than 30 frames.

[0121] The processed frame sequence with fixed specifications is input into the ST-G3D network for action recognition. The graph convolutional neural network can recognize and classify the input actions and give different feedback based on the network recognition results.

[0122] Graph Convolutional Network (GCN), as the name implies, uses convolution operations on graphs, uses Fourier transforms on graphs, and then uses the convolution theorem, so that the convolution operation can be represented by the product of two Fourier transforms. Suppose there is a graph that needs to be classified. The traditional method requires manual extraction of some features, such as texture, color, or some more advanced features. Then these features are put into classifiers such as random forests, and an output label is given to tell which category it is. Deep learning, on the other hand, inputs a graph, passes it through a neural network, and directly outputs a label. Feature extraction and classification are done in one step, avoiding manual feature extraction or artificial rules, and automatically extracting features from raw data. It is an end-to-end learning. Compared with traditional methods, deep learning can learn more efficient features and patterns.

[0123] 407. Inputting the human body feature image into the ST-G3D graph convolutional neural network to train the ST-G3D graph convolutional neural network to obtain an action recognition model;

[0124] In this embodiment, the human feature images in the training image set are input into the ST-G3D graph convolutional neural network in batches. First, the first batch of human feature images are selected from the training image set in batches and input into the ST-G3D graph convolutional neural network. The feature layer in the ST-G3D graph convolutional neural network is based on the second learning rate, and the classification layer is based on the first learning rate. The human feature images are forward propagated to obtain the corresponding output value. The ST-G3D graph convolutional neural network calculates the loss value of this training according to the preset loss function and the corresponding output value, and performs back propagation based on the loss value to obtain the gradient value of each network parameter, and the network parameters are updated according to the obtained gradient value. Then, the next batch of human feature images are input into the ST-G3D graph convolutional neural network after the network parameters are updated, and the classification layer in the ST-G3D graph convolutional neural network is also based on the first learning rate, and the feature layer is also based on the second learning rate, and retraining is performed. That is, the second batch of human feature images are input to the ST-G3D graph convolutional neural network with updated network parameters. The feature layer in the ST-G3D graph convolutional neural network is based on the second learning rate, and the classification layer is based on the first learning rate. The input human feature images are forward propagated again, and the corresponding output values ​​are obtained and the loss values ​​are calculated. Then, the network parameters are updated again by back propagation. Repeat the above steps for iterative training until the loss function converges, and the ST-G3D graph convolutional neural network obtained after the loss function converges is used as the initial human action recognition model.

[0125] Further, after the initial human motion recognition model is obtained, the second stage of training is performed. That is, the human feature images in the training image set are input into the initial human motion recognition model in batches again, and the feature layer and the fully connected layer in the initial human motion recognition model both forward propagate the human feature images based on the second learning rate to obtain the corresponding output value. The initial human motion recognition model calculates the loss value of this training according to the preset loss function and the corresponding output value, and performs back propagation based on the loss value to obtain the gradient value of each network parameter, and updates the network parameters in the initial human motion recognition model according to the obtained gradient value. Similarly, the next batch of human feature images are input into the initial human motion recognition model after the network parameters are updated, and the feature layer and the classification layer in the initial human motion recognition model are retrained based on the second learning rate. That is, the second batch of human feature images are input into the initial human motion recognition model with updated network parameters, and the feature layer and the classification layer in the initial human motion recognition model forward propagate the input human feature images again based on the second learning rate, and the corresponding output value is also obtained and the loss value is calculated, and then back propagation is performed to update the network parameters of the initial human motion recognition model again. Repeat the above steps for iterative training until the loss function of the initial human action recognition model converges, and use the initial human action recognition model obtained after the loss function converges as the final human action recognition model. In this embodiment, due to the small amount of training data for traditional facial action training, it usually leads to overfitting and slow convergence during model training. This example migrates the network parameters of the feature layer from InsightFace, and the feature layer and the classification layer use different learning rates, which not only makes the parameters of the model feature extraction layer tend to face recognition parameters, but also speeds up the convergence of the classification layer.

[0126] 408. Input the feature vector into a preset action recognition model, recognize the human action in the human region image through the action recognition model, determine the real-time activity posture of the human target in the human region image, and obtain an action classification result;

[0127] 409. Obtain action classification results according to the real-time activity posture, match the action classification results with preset action categories, and return the matching results to the preset client.

[0128] Steps 401-404, 408-409 in this embodiment are similar to steps 101-104, 105-106 in the first embodiment, and are not described again here.

[0129] In an embodiment of the present invention, at least two frames of image data within a preset monitoring range are collected; human body detection is performed on the image data to obtain a corresponding human body region image; human body bone data in the human body region image is extracted, and two-dimensional coordinates of key bone points contained in the human body region image are obtained based on the bone data; feature extraction is performed on the human body region image based on the two-dimensional coordinates, and the obtained feature vector is input into an action recognition model to identify human body actions in the image to obtain an action classification result; the action classification result is matched with a preset action category, and the matching result is returned to a preset client. The present invention can identify actions based on a single bone point through a graph convolutional network-related algorithm of deep learning, thereby improving the accuracy of action recognition and solving the technical problem of low accuracy of human action recognition in home monitoring.

[0130] See also Figure 5 The fifth embodiment of the method for action recognition based on video images in the embodiment of the present invention includes:

[0131] 501. Collect a video stream within a preset monitoring range based on a preset video acquisition device, and sample from the video stream to obtain at least two frames of target image data;

[0132] 502. Perform human body detection on the target image data, and extract a corresponding human body region image from the target image data;

[0133] 503. Extracting human skeleton data from the human body region image, and performing skeleton key point detection on the human body region image according to the skeleton data to obtain two-dimensional coordinates of the skeleton key points contained in the human body region image;

[0134] 504. Extract features of the human body region image according to the two-dimensional coordinates of the skeleton key points to obtain a feature vector of the human body region image;

[0135] 505. Acquire multiple frames of human action recognition images, wherein the human action recognition images include multiple human action images;

[0136] 506. Scaling the human action recognition image and constructing an image pyramid;

[0137] In this embodiment, the image pyramid refers to a pyramid constructed by images of different sizes. It can be understood that the size of the image at the bottom layer is the largest, and the size of the image at the top layer is the smallest, that is, the size of each image is larger than the size of the image at the previous layer and smaller than the size of the image at the next layer, thereby constructing an image pyramid.

[0138] Specifically, the human action recognition image is scaled, that is, reduced or enlarged, to obtain a human action recognition image of inconsistent size corresponding to the human action recognition image. The human feature images of inconsistent sizes are stacked and sorted from large to small according to size to obtain a corresponding image pyramid. Each human action recognition image in the facial action recognition data set is scaled to obtain a corresponding image pyramid. It can be understood that each human action recognition image has a corresponding image pyramid.

[0139] 507. Perform feature extraction and border calibration on the image pyramid through the ST-G3D graph convolutional neural network to obtain a first feature map;

[0140] In this embodiment, the P-Net in the ST-G3D graph convolutional neural network is used to perform preliminary feature extraction and border calibration on the image pyramid to obtain a feature map including multiple calibrated borders. The first feature image is obtained by adjusting the borders by performing Bounding-Box Regression (border regression vector) on the feature map and filtering most of the borders using NMS (non-maximum suppression), that is, merging overlapping borders. Among them, the role of Bounding-Box Regression is to fine-tune the borders predicted by the network to make them close to the true value. NMS is to suppress elements that are not maximum values. This method can quickly remove borders with high overlap and relatively inaccurate calibration.

[0141] 508. Filter the border marked by the first feature map to obtain a second feature map, and obtain a human body feature image according to the second feature map;

[0142] In this embodiment, after the human feature image passes through P-Net, the first feature map that will be output still leaves many prediction windows. Therefore, the first feature map is input into R-Net, and most of the borders of the first feature map are filtered by R-Net to determine the candidate borders. Similarly, the candidate borders are further adjusted by Bounding-Box Regression (border regression) and NMS (non-maximum suppression) to obtain a second feature map including only one border. In other words, R-Net is used to further optimize the prediction results. Finally, the second feature map output by R-Net is input into O-Net, and O-Net is used to further extract features from the second feature map including only one border, and finally output a human feature image including five feature points of face calibration. Among them, the five feature points are left eye, eye, nose, left corner of mouth and right corner of mouth. In this embodiment, a human feature image including feature points is obtained by detecting through a multi-task convolutional neural network, without manual annotation of feature points.

[0143] 509. Initialize the network parameters of the ST-G3D graph convolutional neural network;

[0144] In this embodiment, the network parameters of the classification layer in the ST-G3D graph convolutional neural network in this embodiment are initialized using the Xavier initialization method. It can be understood that the fully connected layer of the ST-G3D graph convolutional neural network uses the Xavier initialization method to initialize the network parameters, and the network parameters of other layers are initialized to the parameters of the InsightFace pre-trained model, that is, the parameters of the InsightFace pre-trained model are migrated to the ST-G3D graph convolutional neural network. After the network parameters of the ST-G3D graph convolutional neural network are initialized, the training image set is input into the ST-G3D graph convolutional neural network in batches. That is, the human feature images are input into the neural network in batches according to batches. In this embodiment, the batch is preferably 128. It can be understood that 128 human feature images are input into the ST-G3D graph convolutional neural network after the network parameters are initialized. The network to be trained is trained in stages based on the preset first learning rate and second learning rate. The first learning rate is 0.001 and the second learning rate is 0.0001. Among them, in this embodiment, the network structure of the ST-G3D graph convolutional neural network is also optimized ResNet50 model, that is, the last fully connected layer of the traditional ResNet50 model is replaced with a fully connected layer with an output channel of 12. The optimizer also uses the adam optimizer, and the loss function is preferably the binary cross entropy loss function.

[0145] 510. Input the human feature images in batches into the ST-G3D graph convolutional neural network, and perform training based on a preset first learning rate to obtain a gradient value of the ST-G3D graph convolutional neural network;

[0146] In this embodiment, it can be understood that 128 human feature images are input as a batch into the ST-G3D graph convolutional neural network after the network parameters are initialized, and the feature layer and classification layer in the ST-G3D graph convolutional neural network forward propagate the input human feature image based on the preset first learning rate to obtain the corresponding output value. Among them, the first learning rate is pre-set, and the first learning rate is fixed to 0.001. It can be understood that the feature layer and classification layer in the ST-G3D graph convolutional neural network both use the first learning rate.

[0147] 511. Extract the first label and the second label from the human feature image, and calculate the cross entropy loss function of the first label and the second label;

[0148] In this embodiment, the ST-G3D graph convolutional neural network calculates the loss value of this training according to the preset loss function and the corresponding output value, performs backpropagation based on the loss value, thereby obtaining the gradient value of each network parameter, and updates the network parameters according to the obtained gradient value.

[0149] Then, the next batch of human feature images are input into the ST-G3D graph convolutional neural network after the network parameters are updated, and the ST-G3D graph convolutional neural network is also retrained based on the first learning rate. That is, the second batch of human feature images are input, and the ST-G3D graph convolutional neural network is based on the first learning rate, and the input human feature images are forward propagated again, and the corresponding output values ​​are obtained and the loss values ​​are calculated, and then the network parameters are updated again by back propagation. Repeat the above steps for iterative training until the loss function converges. It can be understood that if the loss function has not converged, it means that the various network parameters of the neural network have not reached the optimal value, that is, training is still needed, and if the loss function converges, it means that the neural network has reached the optimal value, and the neural network can be put into use as a human action recognition model.

[0150] That is to say, after the training of the second batch of human feature images is completed, if the loss function has not converged, the third batch of human feature images can be input again after the network parameters are updated for the second time, until the loss function converges. The convergence of the loss function can be understood as the loss value calculated by the loss function tends to 0, and tending to 0 means that the predicted value and the expected value of the neural network are closer, indicating that the neural network training is completed. Among them, the network structure of the preset ST-G3D graph convolutional neural network is an optimized ResNet50 model, and the difference from the traditional ResNet50 model is that the last layer of the fully connected layer is replaced with a fully connected layer with 12 output channels. The output value includes the predicted value and the true label, and the loss value is calculated based on the predicted value and the true label, and the loss function. In this embodiment, the loss function is preferably a binary cross entropy loss (binary cross entropy loss) function, and the optimizer used for training is the adam optimizer.

[0151] 512. Using the cross entropy loss function and the gradient value, a preset gradient descent algorithm is called to calculate the weight attenuation coefficient of the ST-G3D graph convolutional neural network, and the parameters of the ST-G3D graph convolutional neural network are updated by the weight attenuation coefficient to obtain an action recognition model.

[0152] In this embodiment, after the initial human motion recognition model is obtained, the second stage of training is performed. That is, the human feature images are re-input into the initial human motion recognition model in batches, and the feature layer and the fully connected layer in the initial human motion recognition model forward propagate the human feature images based on the second learning rate to obtain corresponding output values. The initial human motion recognition model calculates the loss value of this training based on the preset loss function and the corresponding output value, and performs back propagation based on the loss value to obtain the gradient value of each network parameter, and the network parameters in the initial human motion recognition model are updated according to the obtained gradient value. Similarly, the next batch of human feature images are input into the initial human motion recognition model after the network parameters are updated, and the feature layer and the classification layer in the initial human motion recognition model are re-trained based on the second learning rate.

[0153] Specifically, the second batch of human feature images are input to the initial human action recognition model with updated network parameters. The feature layer and classification layer in the initial human action recognition model forward propagate the input human feature images again based on the second learning rate, and the corresponding output values ​​are obtained and the loss values ​​are calculated, and then the network parameters of the initial human action recognition model are updated again by back propagation. Repeat the above steps for iterative training until the loss function of the initial human action recognition model converges, and the initial human action recognition model obtained after the loss function converges is used as the final human action recognition model. In this embodiment, due to the small amount of training data for traditional facial action training, it usually leads to overfitting and slow convergence during model training. This example migrates the network parameters of the feature layer from InsightFace, and the feature layer and the classification layer use different learning rates, which not only makes the parameters of the model feature extraction layer tend to face recognition parameters, but also speeds up the convergence of the classification layer.

[0154] 513. Input the feature vector into a preset action recognition model, recognize the human action in the human region image through the action recognition model, determine the real-time activity posture of the human target in the human region image, and obtain the action classification result;

[0155] 514. Obtain action classification results according to the real-time activity posture, match the action classification results with preset action categories, and return the matching results to the preset client.

[0156] Steps 501-503 and 513-514 in this embodiment are similar to steps 101-103 and 104-105 in the first embodiment, and are not described again here.

[0157] In an embodiment of the present invention, at least two frames of image data within a preset monitoring range are collected; human body detection is performed on the image data to obtain a corresponding human body region image; human body bone data in the human body region image is extracted, and two-dimensional coordinates of key bone points contained in the human body region image are obtained based on the bone data; feature extraction is performed on the human body region image based on the two-dimensional coordinates, and the obtained feature vector is input into an action recognition model to identify human body actions in the image to obtain an action classification result; the action classification result is matched with a preset action category, and the matching result is returned to a preset client. The present invention can identify actions based on a single bone point through a graph convolutional network-related algorithm of deep learning, thereby improving the accuracy of action recognition and solving the technical problem of low accuracy of human action recognition in home monitoring.

[0158] The above describes the method for motion recognition based on video images in the embodiment of the present invention. The following describes the device for motion recognition based on video images in the embodiment of the present invention. Figure 6 The first embodiment of the video image-based action recognition device in the embodiment of the present invention includes:

[0159] The acquisition module 601 is used to acquire a video stream within a preset monitoring range based on a preset video acquisition device, and to sample from the video stream to obtain at least two frames of target image data;

[0160] A first extraction module 602, configured to perform human body detection on the target image data and extract a corresponding human body region image from the target image data;

[0161] The detection module 603 is used to extract the skeleton data of the human body in the human body region image, and perform skeleton key point detection on the human body region image according to the skeleton data to obtain the two-dimensional coordinates of the skeleton key points contained in the human body region image;

[0162] A second extraction module 604 is used to extract features of the human body region image according to the two-dimensional coordinates of the skeleton key points to obtain a feature vector of the human body region image;

[0163] The recognition module 605 is used to input the feature vector into a preset action recognition model, recognize the human action in the human region image through the action recognition model, determine the real-time activity posture of the human target in the human region image, and obtain an action classification result;

[0164] The matching module 606 is used to obtain an action classification result according to the real-time activity posture, match the action classification result with a preset action category, and return the matching result to a preset client.

[0165] In an embodiment of the present invention, at least two frames of image data within a preset monitoring range are collected; human body detection is performed on the image data to obtain a corresponding human body region image; human body bone data in the human body region image is extracted, and two-dimensional coordinates of key bone points contained in the human body region image are obtained based on the bone data; feature extraction is performed on the human body region image based on the two-dimensional coordinates, and the obtained feature vector is input into an action recognition model to identify human body actions in the image to obtain an action classification result; the action classification result is matched with a preset action category, and the matching result is returned to a preset client. The present invention can identify actions based on a single bone point through a graph convolutional network-related algorithm of deep learning, thereby improving the accuracy of action recognition and solving the technical problem of low accuracy of human action recognition in home monitoring.

[0166] See also Figure 7 , a second embodiment of the video image-based action recognition device in the embodiment of the present invention, the video image-based action recognition device specifically comprises:

[0167] The acquisition module 601 is used to acquire a video stream within a preset monitoring range based on a preset video acquisition device, and to sample from the video stream to obtain at least two frames of target image data;

[0168] A first extraction module 602, configured to perform human body detection on the target image data and extract a corresponding human body region image from the target image data;

[0169] The detection module 603 is used to extract the skeleton data of the human body in the human body region image, and perform skeleton key point detection on the human body region image according to the skeleton data to obtain the two-dimensional coordinates of the skeleton key points contained in the human body region image;

[0170] A second extraction module 604 is used to extract features of the human body region image according to the two-dimensional coordinates of the skeleton key points to obtain a feature vector of the human body region image;

[0171] The recognition module 605 is used to input the feature vector into a preset action recognition model, recognize the human action in the human region image through the action recognition model, determine the real-time activity posture of the human target in the human region image, and obtain an action classification result;

[0172] The matching module 606 is used to obtain an action classification result according to the real-time activity posture, match the action classification result with a preset action category, and return the matching result to a preset client.

[0173] In this embodiment, the detection module 603 is specifically used for:

[0174] Acquire pixel points of the human body region image, and extract depth information of the pixel points;

[0175] According to the depth information of the pixel points, the human body region image is divided into a human body image and a background image;

[0176] The human body image is compared with preset standard human body image data to obtain the skeleton data of the human body in the human body region image.

[0177] In this embodiment, the detection module 603 is further used for:

[0178] Inputting the human body region image into a preset image association model, and associating various human body region images corresponding to the same human body in the target region image to obtain an association relationship between the human body and the human body region images;

[0179] The human body region image is input into a preset human body key point recognition model, and key point recognition is performed on the human body region image according to the association relationship between the human body region images to obtain the two-dimensional coordinates of the bone key points contained in the human body region image.

[0180] In this embodiment, the second extraction module 604 includes:

[0181] A determination unit 6041 is used to determine the speed information of the skeleton key point according to the time when the human body region image corresponds to the video frame;

[0182] The extraction unit 6042 is used to input the speed information into a preset neural network model, perform feature extraction on the speed information through the neural network model, and obtain a first feature vector of the target image data; input the two-dimensional coordinates of the human body region image and the skeleton key points into the neural network model, perform feature extraction on the two-dimensional coordinates of the human body region image and the skeleton key points through the neural network model, and obtain a second feature vector of the target image data;

[0183] The vector concatenation unit 6043 is used to concatenate the first feature vector and the second feature vector to obtain a feature vector of the human body region image.

[0184] In this embodiment, the video image-based action recognition device further includes:

[0185] An acquisition module 607 is used to acquire multiple frames of human action recognition images, wherein the human action recognition images include multiple human action images;

[0186] A building module 608 is used to build an ST-G3D graph convolutional neural network framework, and perform human motion detection on the human motion recognition image through the ST-G3D graph convolutional neural network to obtain multiple frames of human feature images;

[0187] The training module 609 is used to input the human feature image into the ST-G3D graph convolutional neural network to train the ST-G3D graph convolutional neural network to obtain an action recognition model.

[0188] In this embodiment, the building module 608 is specifically used for:

[0189] Scaling the human action recognition image and constructing an image pyramid;

[0190] Performing feature extraction and border calibration on the image pyramid through the ST-G3D graph convolutional neural network to obtain a first feature map;

[0191] The border marked by the first feature map is filtered to obtain a second feature map, and a human body feature image is obtained according to the second feature map.

[0192] In this embodiment, the training module 609 is specifically used for:

[0193] Initializing the network parameters of the ST-G3D graph convolutional neural network; inputting the human feature images into the ST-G3D graph convolutional neural network in batches, and training based on a preset first learning rate to obtain a gradient value of the ST-G3D graph convolutional neural network;

[0194] Extracting a first label and a second label from the human feature image, and calculating a cross entropy loss function of the first label and the second label;

[0195] Through the cross entropy loss function and the gradient value, the preset gradient descent algorithm is called to calculate the weight attenuation coefficient of the ST-G3D graph convolutional neural network, and the parameters of the ST-G3D graph convolutional neural network are updated through the weight attenuation coefficient to obtain the action recognition model.

[0196] In an embodiment of the present invention, at least two frames of image data within a preset monitoring range are collected; human body detection is performed on the image data to obtain a corresponding human body region image; human body bone data in the human body region image is extracted, and two-dimensional coordinates of key bone points contained in the human body region image are obtained based on the bone data; feature extraction is performed on the human body region image based on the two-dimensional coordinates, and the obtained feature vector is input into an action recognition model to identify human body actions in the image to obtain an action classification result; the action classification result is matched with a preset action category, and the matching result is returned to a preset client. The present invention can identify actions based on a single bone point through a graph convolutional network-related algorithm of deep learning, thereby improving the accuracy of action recognition and solving the technical problem of low accuracy of human action recognition in home monitoring.

[0197] above Figure 6 and Figure 7 The video image-based action recognition device in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The video image-based action recognition device in the embodiment of the present invention is described in detail from the perspective of hardware processing.

[0198] Figure 8 8 is a schematic diagram of the structure of the video-based action recognition device provided by an embodiment of the present invention. The video-based action recognition device 800 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 810 (for example, one or more processors) and a memory 820, and one or more storage media 830 (for example, one or more mass storage devices) storing application programs 833 or data 832. Among them, the memory 820 and the storage medium 830 can be short-term storage or permanent storage. The program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the video-based action recognition device 800. Further, the processor 810 may be configured to communicate with the storage medium 830, and execute a series of instruction operations in the storage medium 830 on the video-based action recognition device 800 to implement the steps of the video-based action recognition method provided by the above-mentioned various method embodiments.

[0199] The video image-based motion recognition device 800 may also include one or more power supplies 840, one or more wired or wireless network interfaces 850, one or more input and output interfaces 860, and / or one or more operating systems 831, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will appreciate that Figure 8The structure of the video image-based motion recognition device shown does not constitute a limitation on the video image-based motion recognition device provided by the present application, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.

[0200] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the above-mentioned video image-based action recognition method.

[0201] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0202] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program codes.

[0203] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for action recognition based on video images, characterized in that: The video image-based action recognition method comprises: Collecting a video stream within a preset monitoring range based on a preset video acquisition device, and sampling from the video stream to obtain at least two frames of target image data; Performing human body detection on the target image data, and extracting a corresponding human body region image from the target image data; Extracting human skeleton data from the human body region image, and performing skeleton key point detection on the human body region image according to the skeleton data to obtain two-dimensional coordinates of the skeleton key points contained in the human body region image; According to the two-dimensional coordinates of the skeleton key points, feature extraction is performed on the human body region image to obtain a feature vector of the human body region image; The feature vector is input into a preset action recognition model, and the human action in the human body region image is recognized by the action recognition model, so as to determine the real-time activity posture of the human body target in the human body region image and obtain an action classification result; According to the real-time activity posture, an action classification result is obtained, and the action classification result is matched with a preset action category, and the matching result is returned to a preset client; The method of performing skeleton key point detection on the human body region image according to the skeleton data to obtain the two-dimensional coordinates of the skeleton key points contained in the human body region image comprises: inputting the human body region image into a preset image association model, and associating various human body region images corresponding to the same human body in the target region image to obtain the association relationship between the human body and the human body region image; inputting the human body region image into a preset human body key point recognition model, and performing key point recognition on the human body region image according to the association relationship between the human body region images to obtain the two-dimensional coordinates of the skeleton key points contained in the human body region image; The method of extracting features from the human body region image according to the two-dimensional coordinates of the skeleton key points to obtain a feature vector of the human body region image includes: determining speed information of the skeleton key points according to the time of the human body region image corresponding to the video frame; inputting the speed information into a preset neural network model, and extracting features from the speed information through the neural network model to obtain a first feature vector of the target image data; inputting the two-dimensional coordinates of the human body region image and the skeleton key points into the neural network model, and extracting features from the two-dimensional coordinates of the human body region image and the skeleton key points through the neural network model to obtain a second feature vector of the target image data; and performing vector splicing on the first feature vector and the second feature vector to obtain a feature vector of the human body region image.

2. The method for action recognition based on video images according to claim 1, characterized in that: The step of extracting skeleton data of a human body in the human body region image comprises: Acquire pixel points of the human body region image, and extract depth information of the pixel points; According to the depth information of the pixel points, the human body region image is divided into a human body image and a background image; The human body image is compared with preset standard human body image data to obtain the skeleton data of the human body in the human body region image.

3. The method for action recognition based on video images according to claim 1, characterized in that: Before inputting the feature vector into a preset action recognition model, recognizing the human action in the human region image through the action recognition model, determining the real-time activity posture of the human target in the human region image, and obtaining the action classification result, the method further includes: Acquire multiple frames of human action recognition images, wherein the human action recognition images include multiple human action images; Building a graph convolutional neural network framework, performing human action detection on the human action recognition image through the graph convolutional neural network, and obtaining multiple frames of human feature images; The human body feature image is input into the graph convolutional neural network to train the graph convolutional neural network to obtain an action recognition model.

4. The method for video image-based action recognition according to claim 3, characterized in that: The building of a graph convolutional neural network framework, performing human motion detection on the human motion recognition image through the graph convolutional neural network, and obtaining multiple frames of human feature images includes: Scaling the human action recognition image and constructing an image pyramid; Performing feature extraction and border calibration on the image pyramid through the graph convolutional neural network to obtain a first feature map; The border marked by the first feature map is filtered to obtain a second feature map, and a human body feature image is obtained according to the second feature map.

5. The method for action recognition based on video images according to claim 3, characterized in that: The step of inputting the human feature image into the graph convolutional neural network to train the graph convolutional neural network to obtain an action recognition model includes: Initializing network parameters of the graph convolutional neural network; Inputting the human feature images in batches into the graph convolutional neural network, and performing training based on a preset first learning rate to obtain a gradient value of the graph convolutional neural network; Extracting a first label and a second label from the human feature image, and calculating a cross entropy loss function of the first label and the second label; Through the cross entropy loss function and the gradient value, a preset gradient descent algorithm is called to calculate the weight attenuation coefficient of the graph convolutional neural network, and the parameters of the graph convolutional neural network are updated through the weight attenuation coefficient to obtain an action recognition model.

6. A motion recognition device based on video images, characterized in that: The video image-based action recognition device comprises: An acquisition module, used for acquiring a video stream within a preset monitoring range based on a preset video acquisition device, and sampling from the video stream to obtain at least two frames of target image data; A first extraction module, used for performing human body detection on the target image data and extracting a corresponding human body region image from the target image data; A detection module, used for extracting skeleton data of a human body in the human body region image, and performing skeleton key point detection on the human body region image according to the skeleton data, to obtain two-dimensional coordinates of the skeleton key points contained in the human body region image; A second extraction module is used to extract features of the human body region image according to the two-dimensional coordinates of the skeleton key points to obtain a feature vector of the human body region image; A recognition module, used for inputting the feature vector into a preset action recognition model, recognizing the human action in the human region image through the action recognition model, determining the real-time activity posture of the human target in the human region image, and obtaining an action classification result; A matching module, used to obtain an action classification result according to the real-time activity posture, match the action classification result with a preset action category, and return the matching result to a preset client; The detection module is also specifically used to: input the human body region image into a preset image association model, and associate the human body region images corresponding to the same human body in the target region image to obtain the association relationship between the human body and the human body region image; input the human body region image into a preset human body key point recognition model, and perform key point recognition on the human body region image according to the association relationship between the human body region images to obtain the two-dimensional coordinates of the bone key points contained in the human body region image; The second extraction module includes: a determination unit, used to determine the speed information of the skeleton key points according to the time of the human body area image corresponding to the video frame; a feature extraction unit, used to input the speed information into a preset neural network model, perform feature extraction on the speed information through the neural network model, and obtain a first feature vector of the target image data; input the two-dimensional coordinates of the human body area image and the skeleton key points into the neural network model, perform feature extraction on the two-dimensional coordinates of the human body area image and the skeleton key points through the neural network model, and obtain a second feature vector of the target image data; a vector splicing unit, used to perform vector splicing on the first feature vector and the second feature vector to obtain a feature vector of the human body area image.

7. A motion recognition device based on video images, characterized in that: The video image-based action recognition device comprises: a memory and at least one processor, the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor calls the instructions in the memory to enable the video image-based action recognition device to perform the steps of the video image-based action recognition method according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for action recognition based on video images as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Fall detection method based on skeleton points and a fall detection device thereof

    CN109492612A

  • Group behavior identification method based on pseudo 3D convolutional neural network

    CN110378281A

  • Behavior recognition method and device, storage medium and electronic equipment

    CN113887501A