Action recognition methods, devices, storage media, and electronic devices
By extracting the sequence of human key points from video images and combining it with spatiotemporal feature fusion, the problem of the failure to effectively utilize global video information in existing technologies is solved, and more accurate and faster video action classification is achieved.
Patent Information
- Application Number
- CN202210056552.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-18
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2042-01-18
AI Technical Summary
Existing video action recognition methods based on graph convolutional neural networks fail to effectively utilize the global spatial and temporal information of videos, resulting in limited action classification performance.
The sequence of human body key points is extracted from video images. The temporal and spatial features of the action are obtained through the first feature extraction model and combined with the second feature extraction model to obtain the spatiotemporal features of the action. The fused features are then used for video action classification.
It improves the accuracy and speed of action classification, especially significantly enhancing recognition accuracy and efficiency in sign language recognition and dynamic gesture recognition scenarios.
Smart Images

Figure CN116524532B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer vision application technology, and more specifically, to an action recognition method, apparatus, storage medium, and electronic device. Background Technology
[0002] Video-based action recognition has always been an important research direction in computer vision. Related technologies generally rely on graph convolutional neural networks (GCNNs) for video action classification. In GCNNs, each human keypoint has an equal impact on the final classification result. However, for different actions, different human keypoints should be considered at different stages of the action's development. Therefore, the lack of utilization of the global spatial and temporal information contained in the video in related technologies limits the performance of video action classification. Summary of the Invention
[0003] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect, this disclosure provides an action recognition method, including:
[0005] For each frame of video image in the video to be identified, human key points of the video image are extracted to obtain a target key point sequence, wherein the target key point sequence includes human key points of each frame of the video image;
[0006] The target key point sequence is used as input to the first feature extraction model to obtain a first feature representation, wherein the first feature representation includes action temporal features and action spatial features.
[0007] The target key point sequence is used as input to the second feature extraction model to obtain action spatiotemporal features;
[0008] By fusing the first feature representation and the spatiotemporal features of the action, a second feature representation is obtained;
[0009] Based on the second feature representation, video action classification is performed to obtain the action recognition result corresponding to the video to be identified.
[0010] Secondly, this disclosure provides an action recognition device, comprising:
[0011] The key point extraction module is configured to extract human key points from each frame of video image in the video to be identified, and obtain a target key point sequence, wherein the target key point sequence includes human key points of each frame of the video image.
[0012] The first feature extraction module is configured to take the target key point sequence as input to the first feature extraction model to obtain a first feature representation, wherein the first feature representation includes action temporal features and action spatial features.
[0013] The second feature extraction module is configured to use the target key point sequence as input to the second feature extraction model to obtain action spatiotemporal features;
[0014] The fusion module is configured to fuse the first feature representation and the action spatiotemporal domain features to obtain a second feature representation;
[0015] The recognition module is configured to perform video action classification based on the second feature representation to obtain the action recognition result corresponding to the video to be recognized.
[0016] Thirdly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the action recognition method described in the first aspect.
[0017] Fourthly, this disclosure provides an electronic device, comprising:
[0018] A storage device on which computer programs are stored;
[0019] A processing device for executing the computer program in the storage device to implement the steps of the action recognition method described in the first aspect.
[0020] Based on the above technical solution, a target keypoint sequence, including human keypoints for each frame of the video to be identified, is extracted from the target keypoint sequence. Then, spatiotemporal features of the action and a first feature representation containing both spatiotemporal and spatial features are extracted from the target keypoint sequence. The first feature representation is then fused with the spatiotemporal features to obtain a second feature representation, which is then used for video action classification. Therefore, by using a second feature representation containing spatiotemporal, temporal, and spatial features of the action, video action classification can focus on the features of the action to be identified in both the global spatial and global temporal domains, resulting in a more accurate final action classification result.
[0021] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0022] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale. In the drawings:
[0023] Figure 1 This is a flowchart of an action recognition method proposed according to an exemplary embodiment;
[0024] Figure 2 This is a flowchart illustrating the process of obtaining a sequence of target key points according to an exemplary embodiment;
[0025] Figure 3 This is a schematic diagram of spatial attention weights proposed according to an exemplary embodiment;
[0026] Figure 4 This is a schematic diagram of the structural connections of a model for action recognition proposed according to an exemplary embodiment;
[0027] Figure 5 This is a schematic diagram of the module connections of an action recognition device according to an exemplary embodiment;
[0028] Figure 6 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment. Detailed Implementation
[0029] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0030] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0031] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below.
[0032] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0033] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0034] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0035] In related technologies, motion recognition algorithms based on human key points generally use graph convolutional neural networks (GNNs) as feature extraction networks. When using GNNs for feature extraction, it is necessary to manually define some meaningful edges, where an edge is defined as a connection between adjacent human key points. For example, from the wrist to the elbow, or from the elbow to the shoulder. When performing matrix operations, the GNN fuses human key points at different distances into features from different channels, and then uses the convolutional neural network to extract these features.
[0036] However, many human keypoints for actions are not physically adjacent. For example, the action of "shh" requires the coordination of hand and mouth keypoints. However, hand and mouth keypoints are not connected according to the definition of an edge, and even finding K nearest neighbors cannot establish an edge relationship between them. Furthermore, because graph convolutional neural networks fuse human keypoints at distances from 1 to 8 (K=8), the number of input channels increases rapidly. Since the initial layer of the network has a relatively high resolution in the temporal dimension, this results in a large computational burden for action classification, leading to slow classification speed. Moreover, current convolutional neural network models treat all video frames and all human keypoints as having equal influence on the final action classification result during training, which does not match real-world scenarios.
[0037] Based on the aforementioned technical problems, this disclosure proposes an action recognition method. This method directly extracts a target keypoint sequence, including human keypoints for each frame of the video to be recognized. Then, it extracts spatiotemporal features of the action and a first feature representation containing both spatiotemporal and temporal features from the target keypoint sequence. The first feature representation is then fused with the spatiotemporal features to obtain a second feature representation, which is then used for video action classification. Therefore, by using a second feature representation with spatiotemporal, temporal, and spatial features for video action classification, the method can focus on the features of the action to be recognized in both the global spatial and global temporal domains during the classification process, resulting in a more accurate final action classification result.
[0038] The action recognition method proposed in the embodiments of this disclosure will be described in detail below with reference to the accompanying drawings.
[0039] Figure 1 This is a flowchart of an action recognition method according to an exemplary embodiment. Figure 1 As shown, the action recognition method proposed in this disclosure can be executed by an electronic device, specifically by an action recognition device. This device can be implemented in software and / or hardware and configured within the electronic device. Figure 1 As shown, the action recognition method may include the following steps.
[0040] In step 110, for each frame of video image in the video to be identified, human key points of the video image are extracted to obtain a target key point sequence, wherein the target key point sequence includes human key points of each frame of the video image.
[0041] Here, the video to be identified can be a recorded video, such as a short video or a long video. Of course, the video to be identified can also be a live stream. The video to be identified can be a complete video, such as a short video, or a video segment obtained by dividing a complete video, such as a video segmented from a long video. It can be configured according to the hardware performance of the electronic device. When the hardware performance of the electronic device is good enough, a complete long video can be used as input for action recognition. It is worth noting that the video to be identified can also be multiple image frames extracted from the original video. For example, the original video can be divided into several segments, and then several video frames can be extracted from each segment to form the video to be identified, thus avoiding inputting the entire video and reducing the computational load on the model.
[0042] The video to be identified includes several video frames, which are arranged in chronological order to form a video image sequence. For each video frame in the video to be identified, human body key points are extracted from that frame. These human body key points refer to key body parts that constitute the human body, such as the head, neck, shoulders, and hands. In this embodiment, there can be 59 human body key points, including 17 torso points and 42 hand points. It should be understood that the number of human body key points can be set according to actual needs.
[0043] By extracting human key points from each frame of the video image to be identified, a sequence of target key points for the human body is obtained, including the key points of the human body in each frame of the video image. It should be understood that the human key points of each frame of the video image are treated as one element in the target key point sequence, and the elements corresponding to multiple frames of the video image are arranged in the temporal order of the video images.
[0044] In some implementations, video images can be used as input to a keypoint extraction model to obtain human keypoints from the video images. This keypoint extraction model can be obtained by training a machine learning model using historical video images marked with the locations of human keypoints. The machine learning model can be a convolutional neural network model, etc.
[0045] In step 120, the target key point sequence is used as input to the first feature extraction model to obtain a first feature representation, wherein the first feature representation includes action temporal features and action spatial features.
[0046] Here, after obtaining the target keypoint sequence, the target keypoint sequence is used as input to the first feature extraction model to obtain a first feature representation including action temporal features and action spatial features. The first feature extraction model may include two sub-feature extraction networks: one sub-feature extraction network is used to extract action temporal features from the target keypoint sequence, and the other sub-feature extraction network is used to extract action spatial features from the target keypoint sequence.
[0047] It should be understood that action temporal features refer to the features extracted by the first feature extraction model based on the temporal attention mechanism, while action spatial features refer to the features extracted by the first feature extraction model based on the spatial attention mechanism.
[0048] In step 130, the target key point sequence is used as input to the second feature extraction model to obtain action spatiotemporal features.
[0049] Here, after obtaining the target keypoint sequence, the target keypoint sequence is used as input to the second feature extraction model to obtain action spatiotemporal features. This second feature extraction model can be based on a spatiotemporal attention mechanism to extract action spatiotemporal features from the target keypoint sequence.
[0050] Among them, the spatiotemporal features of the action actually include the global temporal features and the global spatial features of the action.
[0051] It is worth noting that steps 120 and 130 can be performed simultaneously, that is, the target key point sequence can be used as input to both the first feature extraction model and the second feature extraction model at the same time.
[0052] In step 140, the first feature representation and the action spatiotemporal domain features are fused to obtain the second feature representation.
[0053] Here, the fusion of the first feature representation and the action spatiotemporal domain features can be based on feature concatenation to obtain the second feature representation. For example, for the first feature representation and the action spatiotemporal domain features corresponding to the same frame of video image, they are concatenated, and the concatenated feature is used as the second feature representation corresponding to that frame of video image.
[0054] In step 150, video action classification is performed based on the second feature representation to obtain the action recognition result corresponding to the video to be identified.
[0055] Here, the second feature representation can be used as input to the classification model to obtain the action recognition result corresponding to the video to be recognized. The action recognition result can include the categories of all actions included in the video to be recognized. The video to be recognized may include multiple different actions; during the recognition process, the model can distinguish between two different actions based on their continuity.
[0056] It should be understood that video action classification based on this second feature representation can focus on keyframes of the action to be identified in the video in the temporal domain, and on important human body key points of the action in the spatial domain. For example, for the action to be identified, "shh," which is composed of hand key points and mouth key points, based on the second feature representation, we can focus on the time when the hand key points appear on the mouth key points in the temporal domain, and on the hand key points and mouth key points in the spatial domain.
[0057] Therefore, by fusing a first feature representation containing both temporal and spatial features of the action with the spatiotemporal features of the action to obtain a second feature representation, and then performing video action classification based on this second feature representation, the video action classification results can be made more accurate. In particular, for video-based sign language recognition and dynamic gesture recognition scenarios, the action recognition method proposed in this disclosure can greatly improve the accuracy and speed of action recognition.
[0058] Figure 2 This is a flowchart illustrating the process of obtaining a sequence of target key points according to an exemplary embodiment. For example... Figure 2 As shown, in some feasible implementations, step 110, for each frame of video image in the video to be identified, extracts the human body key points of the video image to obtain the target key point sequence, which may include the following steps.
[0059] In step 111, for each frame of the video image to be identified, the human body key points of the video image are extracted to obtain an initial key point sequence.
[0060] Here, video images can be used as input to a keypoint extraction model to obtain human keypoints from the video images. The human keypoints extracted from all video images are then arranged in chronological order to obtain an initial keypoint sequence. This keypoint extraction model can be obtained by training a machine learning model using historical video images marked with the locations of human keypoints. This machine learning model can be a convolutional neural network model, etc.
[0061] It is worth noting that each element in the initial keypoint sequence is an unrelated human keypoint without any manually defined relationships between the various human keypoints.
[0062] In step 112, a nonlinear transformation operation is performed on the initial keypoint sequence to obtain the target keypoint sequence, wherein the transformation parameters in the nonlinear transformation operation are updated by backpropagation of the action recognition results.
[0063] Here, performing nonlinear transformation on the initial keypoint sequence is to transform unrelated human keypoints in the initial keypoint sequence into a preset feature space through nonlinear transformation, thereby obtaining the target keypoint sequence.
[0064] In this process, the transformation parameters in the nonlinear transformation operation are learnable, specifically updated through backpropagation of the action recognition results. For example, the transformation parameters in the nonlinear transformation operation can be corrected using the action recognition results to make them more suitable for the action recognition scenario.
[0065] It should be understood that by performing nonlinear transformation operations on the initial keypoint sequence, the relationship between each human body keypoint can be avoided by manually defining it. Instead, the model learns the relationships between each human body keypoint, resulting in a more comprehensive understanding of these relationships. For example, for the action of "shh," nonlinear transformation operations can learn the relationship between the keypoints of the hand and the keypoints of the mouth, thus obtaining more accurate classification results in subsequent action classification.
[0066] It is worth noting that during the training process of the model, the key point sequence with action category labels can be used as the input of the model, and then the transformation parameters of the model can be corrected in reverse according to the video classification results, so that the model can continuously learn the relationship between human key points between different actions.
[0067] In some implementations, the initial keypoint sequence can be subjected to a nonlinear transformation operation based on a preset calculation formula to obtain the target keypoint sequence, wherein the preset calculation formula is:
[0068] (w*x+b)
[0069] Where x is the initial keypoint sequence, Let w and b be the target key point sequence, and w and b be the transformation parameters.
[0070] Therefore, through learnable nonlinear transformation operations, the model can learn the relationships between various key points on the human body, making the learned relationships between key points more comprehensive and thus improving the accuracy of action recognition results. Furthermore, since there is no need to manually define the relationships between individual key points, the computational load on the model can be reduced during the feature extraction stage, thereby improving the efficiency of action recognition.
[0071] In some feasible implementations, the first feature extraction module may include a spatial attention model and a temporal attention model. In this case, the target key point sequence can be used as the input of the spatial attention model, and the features extracted by the spatial attention model can be entered into the temporal attention model to obtain the first feature representation.
[0072] Among them, the spatial attention model is used to assign different spatial attention weights to each human keypoint in the target keypoint sequence in the spatial dimension to extract action spatial features, and the temporal attention model is used to assign different temporal attention weights to each video image in the target keypoint sequence in the temporal dimension to extract action temporal features.
[0073] Here, we assume the target keypoint sequence X is X: N x C1 x T x V, where N represents N videos to be identified, C1 represents the feature of each human keypoint at the current time, T represents time, and V represents the number of human keypoints. For the spatial attention model, the target keypoint sequence X: N x C1 x T x V is used as the input to the spatial attention model. The spatial attention model processes the target keypoint sequence into a one-dimensional vector through convolutional layers, and then performs a dot product operation between the Vth human keypoint and the (V-1)th human keypoint to obtain the similarity between the Vth keypoint and the (V-1)th keypoint. Based on the similarity, different spatial attention weights are assigned to each human keypoint to obtain the action spatial feature X1: N x C3 x T x V. Specifically, the greater the similarity of the human keypoint, the greater the assigned spatial attention weight.
[0074] It should be understood that the spatial attention model uses an attention mechanism in the spatial dimension to capture human key points that are highly correlated with the action to be identified, so that these human key points can dominate the final decision in video action classification. Figure 3 This is a schematic diagram of spatial attention weights proposed according to an exemplary embodiment. For example... Figure 3 As shown, in Figure 3 In the hand-raising action shown, key points A and B are highly correlated with the action. Therefore, the spatial attention weight of key points A and B is greater than that of other key points. Figure 3 The larger the area of the human body key points, the greater the spatial attention weight.
[0075] For the temporal attention model, X: N x C1 x T x V serves as the input. The convolutional layer of the temporal attention model merges V and C1 into a one-dimensional vector, then performs a dot product between the T-th and T-1-th video images to calculate their similarity. Based on the similarity, different temporal attention weights are assigned to each video image to obtain the action temporal feature X2: N x C4 x T x V. Specifically, for video images with greater similarity, a larger temporal attention weight is assigned.
[0076] It should be understood that the temporal attention model uses an attention mechanism in the time dimension to capture video images that are highly correlated with the action to be identified.
[0077] It is worth noting that the spatial attention model and the temporal attention model are sequential within a network block, and the input of the temporal attention model is connected to the output of the spatial attention model.
[0078] In some feasible implementations, the target keypoint sequence can be used as input to a spatiotemporal attention model to obtain spatiotemporal features of the action. The spatiotemporal attention model is used to assign different spatiotemporal attention weights to each human keypoint in the target keypoint sequence along the spatiotemporal dimension, in order to determine keyframes of the action to be identified in different video images and to determine the target human keypoints of the action to be identified within those keyframes.
[0079] Here, assuming the target keypoint sequence X is X: N x C1 x T x V, the spatiotemporal attention model treats T and V as a two-dimensional matrix, which is equivalent to having a total of T*V human keypoints in the target keypoint sequence. Then, it calculates the similarity between the Kth human keypoint in the Mth frame video image and the human keypoint in the M-1th frame video image, and then assigns spatiotemporal attention weights based on the similarity.
[0080] It should be understood that the spatiotemporal attention model essentially identifies key human body points highly correlated with the action to be recognized across the entire temporal and spatial dimensions. For a complete action, the relevant key human body points may differ at the beginning and end of the action. For example, for the action of "shh," the relevant key human body points at the initial hand-raising phase are the hand and arm key points; when the hand moves to the mouth, the hand and mouth key points need to be considered; and when the "shh" action ends, the hand and arm key points need to be considered. Therefore, the spatiotemporal attention model can identify keyframes related to the action to be recognized and the target key points related to the action on those keyframes in different video images. For example, for the action of "shh," the spatiotemporal attention model can assign higher attention weights to the video frames where the hand moves to the mouth, and at the same time, it can assign higher attention weights to the hand and mouth key points in these video frames compared to other key human body points.
[0081] It's worth noting that the spatiotemporal features of action obtained by the spatiotemporal attention model are not simply a fusion of temporal and spatial features, but rather features extracted across the entire time and spatial dimensions. During the fusion phase, these spatiotemporal features can be used as a benchmark to fuse temporal and spatial features with each other, resulting in a more accurate feature representation.
[0082] In some feasible implementations, the second feature representation can be used as input to a classification model to obtain the action recognition result corresponding to the video to be recognized. The classification model includes a global average pooling layer and a fully connected layer connected in sequence. The pooling layer is used to reduce the dimensionality of the second feature representation, and the fully connected layer is used to determine the action recognition result corresponding to the video to be recognized based on a normalized exponential function.
[0083] The following is in conjunction with the appendix Figure 4 The above-described embodiments will be described in detail.
[0084] Figure 4 This is a schematic diagram of the structural connections of a model for action recognition proposed according to an exemplary embodiment. For example... Figure 4 As shown, the model for action recognition includes a key point extraction model 40, a feature transformation layer 41, a feature extraction layer 42, a pooling layer 43, and a fully connected layer 44 connected in sequence.
[0085] The keypoint extraction model 40 is used to extract human keypoints from video images in the video to be identified, obtaining an initial keypoint sequence. The initial keypoint sequence extracted by the keypoint extraction model 40 serves as the input to the feature transformation layer 41, which... The relationship (w*x+b) maps the initial keypoint sequence x to the feature space, obtaining the target keypoint sequence.
[0086] The target keypoint sequence output by feature transformation layer 41 serves as the input to feature extraction layer 42. Feature extraction layer 42 includes a spatial attention model 421, a temporal attention model 422, and a spatiotemporal attention model 423. The output of spatial attention model 421 is concatenated with the input of temporal attention model 422. The target keypoint sequence serves as the input to both spatial attention model 421 and spatiotemporal attention model 423. The outputs of temporal attention model 422 and spatiotemporal attention model 423 are fused to obtain a second feature representation.
[0087] It should be understood that the spatial attention model 421, the temporal attention model 422, and the spatiotemporal attention model 423 can include multiple models. For example, in the network block of the feature extraction layer 42, the spatial attention model 421, the temporal attention model 422, and the spatiotemporal attention model 423 can each include four network blocks. By repeating network blocks, each element in the target keypoint sequence can obtain a feature representation of a fixed dimension.
[0088] The second feature representation serves as the input to the pooling layer. This pooling layer can be a global average pooling layer, used to reduce the dimensionality of the second feature representation.
[0089] The features, after dimensionality reduction by the pooling layer, enter the fully connected layer. The normalized exponential function (Softmax) is used in the fully connected layer to obtain the action recognition result of the video to be recognized. The fully connected layer essentially acts as a classifier.
[0090] Figure 5 This is a schematic diagram of the module connections of an action recognition device according to an exemplary embodiment. Figure 5 As shown, this disclosure provides an action recognition device 500, which includes:
[0091] The key point extraction module 501 is configured to extract human key points from each frame of video image in the video to be identified, and obtain a target key point sequence, wherein the target key point sequence includes human key points of each frame of the video image.
[0092] The first feature extraction module 502 is configured to take the target key point sequence as input to the first feature extraction model to obtain a first feature representation, wherein the first feature representation includes action temporal features and action spatial features.
[0093] The second feature extraction module 503 is configured to use the target key point sequence as input to the second feature extraction model to obtain action spatiotemporal features;
[0094] The fusion module 504 is configured to fuse the first feature representation and the action spatiotemporal domain features to obtain a second feature representation;
[0095] The recognition module 505 is configured to perform video action classification based on the second feature representation to obtain the action recognition result corresponding to the video to be recognized.
[0096] Optionally, the key point extraction module 501 includes:
[0097] The extraction unit is configured to extract human key points from each frame of the video image to be identified, and obtain an initial key point sequence.
[0098] The transformation unit is configured to perform a nonlinear transformation operation on the initial keypoint sequence to obtain the target keypoint sequence, wherein the transformation parameters in the nonlinear transformation operation are updated through backpropagation of the action recognition results.
[0099] Optionally, the conversion unit is specifically configured as follows:
[0100] The initial keypoint sequence is subjected to a nonlinear transformation operation based on a preset calculation formula to obtain the target keypoint sequence, wherein the preset calculation formula is:
[0101] (w*x+b)
[0102] Where x is the initial keypoint sequence, Let w and b be the target key point sequence, and w and b be the transformation parameters.
[0103] Optionally, the first feature extraction module 502 is specifically configured as follows:
[0104] The target key point sequence is used as input to the spatial attention model, and the features extracted by the spatial attention model are entered into the temporal attention model to obtain the first feature representation.
[0105] The spatial attention model is used to assign different spatial attention weights to each human body key point in the target key point sequence in the spatial dimension to extract the action spatial features, and the temporal attention model is used to assign different temporal attention weights to each frame of the video image in the target key point sequence in the temporal dimension to extract the action temporal features.
[0106] Optionally, the second feature extraction module 503 is specifically configured as follows:
[0107] The target key point sequence is used as input to a spatiotemporal attention model to obtain the spatiotemporal features of the action.
[0108] The spatiotemporal attention model is used to assign different spatiotemporal attention weights to each human body key point in the target key point sequence in the spatiotemporal dimension, so as to determine the key frames of the action to be identified in different video images and to determine the target human body key points of the action to be identified in the key frames.
[0109] Optionally, the identification module 505 is specifically configured as follows:
[0110] The second feature representation is used as input to the classification model to obtain the action recognition result corresponding to the video to be recognized. The classification model includes a global average pooling layer and a fully connected layer connected in sequence. The pooling layer is used to reduce the dimensionality of the second feature representation, and the fully connected layer is used to determine the action recognition result corresponding to the video to be recognized based on the normalized exponential function.
[0111] The following is for reference. Figure 6This diagram illustrates a structural schematic of an electronic device 600 suitable for implementing embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0112] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0113] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0114] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0115] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0116] In some implementations, electronic devices can communicate using any currently known or future-developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0117] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0118] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: extract human key points from each frame of a video image in a video to be identified, obtaining a target key point sequence, wherein the target key point sequence includes human key points in each frame of the video image; use the target key point sequence as input to a first feature extraction model to obtain a first feature representation, wherein the first feature representation includes action temporal features and action spatial features; use the target key point sequence as input to a second feature extraction model to obtain action spatiotemporal features; fuse the first feature representation and the action spatiotemporal features to obtain a second feature representation; and perform video action classification based on the second feature representation to obtain an action recognition result corresponding to the video to be identified.
[0119] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0120] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0121] The modules described in the embodiments of this disclosure can be implemented in software or hardware. The names of the modules are not, in some cases, intended to limit the functionality of the module itself.
[0122] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0123] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0124] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0125] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0126] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.
Claims
1. An action recognition method, characterized in that, include: For each frame of video image in the video to be identified, human key points of the video image are extracted to obtain a target key point sequence, wherein the target key point sequence includes human key points of each frame of the video image; The target key point sequence is used as input to the first feature extraction model to obtain a first feature representation, wherein the first feature representation includes action temporal features and action spatial features. The target key point sequence is used as input to the second feature extraction model to obtain action spatiotemporal features; By fusing the first feature representation and the spatiotemporal features of the action, a second feature representation is obtained; Based on the second feature representation, video action classification is performed to obtain the action recognition result corresponding to the video to be identified; The step of using the target keypoint sequence as input to the first feature extraction model to obtain the first feature representation includes: The target key point sequence is used as input to the spatial attention model, and the features extracted by the spatial attention model are entered into the temporal attention model to obtain the first feature representation. The step of using the target keypoint sequence as input to the second feature extraction model to obtain action spatiotemporal features includes: The target key point sequence is used as input to a spatiotemporal attention model to obtain the spatiotemporal features of the action.
2. The action recognition method according to claim 1, characterized in that, For each frame of the video image to be identified, the human body key points of that video image are extracted to obtain the target key point sequence, including: For each frame of the video image to be identified, extract the human body key points of the video image to obtain an initial key point sequence; The initial keypoint sequence is subjected to a nonlinear transformation operation to obtain the target keypoint sequence, wherein the transformation parameters in the nonlinear transformation operation are updated by backpropagation of the action recognition results.
3. The action recognition method according to claim 2, characterized in that, The step of performing a nonlinear transformation operation on the initial keypoint sequence to obtain the target keypoint sequence includes: The initial keypoint sequence is input into the feature transformation layer to obtain the target keypoint sequence. The feature transformation layer is used to map the initial keypoint sequence into the feature space through nonlinear transformation operations to obtain the target keypoint sequence.
4. The action recognition method according to any one of claims 1 to 3, characterized in that, The spatial attention model is used to assign different spatial attention weights to each human body key point in the target key point sequence in the spatial dimension to extract the action spatial features. The temporal attention model is used to assign different temporal attention weights to each frame of the video image in the target key point sequence in the temporal dimension to extract the action temporal features.
5. The action recognition method according to any one of claims 1 to 3, characterized in that, The spatiotemporal attention model is used to assign different spatiotemporal attention weights to each of the human body key points in the target key point sequence in the spatiotemporal dimension, so as to determine the key frames of the action to be identified in different video images and to determine the target human body key points of the action to be identified in the key frames.
6. The action recognition method according to any one of claims 1 to 3, characterized in that, Based on the second feature representation, video action classification is performed to obtain the action recognition result corresponding to the video to be identified, including: The second feature representation is used as input to the classification model to obtain the action recognition result corresponding to the video to be recognized. The classification model includes a global average pooling layer and a fully connected layer connected in sequence. The pooling layer is used to reduce the dimensionality of the second feature representation, and the fully connected layer is used to determine the action recognition result corresponding to the video to be recognized based on the normalized exponential function.
7. A motion recognition device, characterized in that, include: The key point extraction module is configured to extract human key points from each frame of video image in the video to be identified, and obtain a target key point sequence, wherein the target key point sequence includes human key points of each frame of the video image. The first feature extraction module is configured to take the target key point sequence as input to the first feature extraction model to obtain a first feature representation, wherein the first feature representation includes action temporal features and action spatial features. The second feature extraction module is configured to use the target key point sequence as input to the second feature extraction model to obtain action spatiotemporal features; The fusion module is configured to fuse the first feature representation and the action spatiotemporal domain features to obtain a second feature representation; The recognition module is configured to perform video action classification based on the second feature representation to obtain the action recognition result corresponding to the video to be recognized. The first feature extraction module is specifically configured as follows: The target key point sequence is used as input to the spatial attention model, and the features extracted by the spatial attention model are entered into the temporal attention model to obtain the first feature representation. The second feature extraction module is specifically configured as follows: The target key point sequence is used as input to a spatiotemporal attention model to obtain the spatiotemporal features of the action.
8. The motion recognition device according to claim 7, characterized in that, The key point extraction module includes: The acquisition module is configured to extract human key points from each frame of the video image to be identified, and obtain an initial key point sequence. The transformation module is configured to perform a nonlinear transformation operation on the initial keypoint sequence to obtain the target keypoint sequence, wherein the transformation parameters in the nonlinear transformation operation are updated by backpropagation of the action recognition results.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processing device, it implements the steps of the action recognition method according to any one of claims 1-6.
10. An electronic device, characterized in that, include: A storage device on which computer programs are stored; A processing device for executing the computer program in the storage device to implement the steps of the action recognition method according to any one of claims 1-6.
Citation Information
Patent Citations
Human motion recognition system and method
CN111460928A
Human body action evaluation method based on spatial-temporal feature combination regression
CN113239897A