A method, system, electronic device and storage medium for visual continuous action recognition
By sliding the detector and classifier to process skeletal point data, combined with a one-dimensional convolutional neural network, it solves the problem of continuous gesture action recognition in the existing technology, achieves efficient and accurate visual continuous action recognition, and reduces resource requirements and environmental impact.
Patent Information
- Application Number
- CN202411009266.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2044-07-26
AI Technical Summary
Existing gesture action recognition technology is limited to static gesture actions or independent gesture action videos. It is difficult to process continuous gesture actions. It is difficult to extract features from RGB images and is easily affected by environmental factors such as light, leading to recognition errors and repeated recognition phenomena.
By synchronously sliding the detector and classifier, the skeletal point data is used to extract temporal and spatial information, combined with a one-dimensional convolutional neural network for processing, and data filtering and single activation processing are performed to improve recognition accuracy and eliminate repeated recognition.
It achieves accurate recognition of visual continuous actions, reduces storage resources and reasoning time requirements, improves recognition accuracy, and reduces the impact on environmental factors.
Smart Images

Figure CN118553019B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, system, electronic device and storage medium for visual continuous action recognition. Background Art
[0002] Gestures are flexible and have diverse meanings. People can express their ideas through simple gestures. Recognizing gestures can allow computers to understand users' ideas through hand movements, simplifying the way people communicate with computers.
[0003] Related gesture recognition technologies are limited to static gesture images or independent gesture videos. They need to first divide the continuous gesture sequence into multiple independent gestures and then recognize them one by one. This recognition requires a clear transition phase between adjacent actions, which is inconsistent with people's daily gesture habits. Some solutions directly extract gesture features from RGB images, but RGB images are high-dimensional data, and it is more difficult to extract effective information from them. They require longer inference time and inference memory, and are easily affected by background environmental factors such as light. Other solutions are prone to confusion about the start and end stages of gestures during the recognition process, resulting in recognition errors, and an action may be recognized multiple times. Summary of the invention
[0004] To solve at least one of the above problems, the embodiments of the present application propose a visual continuous action recognition method, system, electronic device and storage medium, which can improve the accuracy of visual continuous action recognition, reduce the storage resources and inference time required for recognition, and achieve lightweight real-time recognition.
[0005] To achieve the above object, an embodiment of the present application provides a method for visual continuous action recognition, the method comprising:
[0006] According to a preset step length, the detector and the classifier are synchronously slid along the video to determine the current video frame; wherein the detector is used to detect whether there is a gesture action in the current video frame; and the classifier is used to classify the gesture action;
[0007] During the sliding process, for each of the current video frames, the detector detects the current video frame to obtain a first detection result;
[0008] Performing data filtering processing on the first detection result to obtain a first processing result; wherein the data filtering processing is used to correct the first detection result according to the correlation of adjacent frame detection results;
[0009] When the first processing result is that there is a gesture action in the current video frame, activating the classifier;
[0010] Classifying the skeleton point data of the current video frame by the classifier to obtain a first classification result;
[0011] A single activation process is performed on the first classification result to obtain a continuous gesture action recognition result; wherein the single activation process is used to exclude repeated recognition of the continuous gesture action.
[0012] In some embodiments, the processing step of the detector includes the following steps:
[0013] Obtaining a skeleton point coordinate sequence of the current video frame;
[0014] Calculating the time matrix of the skeleton point coordinate sequence to obtain a first fast motion feature, a joint distance feature and a first slow motion feature;
[0015] Calculating the spatial matrix of the skeleton coordinate point sequence to obtain a second fast motion feature and a second slow motion feature;
[0016] Performing a first processing on the first fast motion feature through a first convolution block to obtain a first feature;
[0017] Performing a second processing on the joint joint distance feature through a second convolution block and a first maximum pooling layer to obtain a second feature;
[0018] Performing a third processing on the first slow motion feature through a third convolution block and a second maximum pooling layer to obtain a third feature;
[0019] Performing a fourth processing on the second fast motion feature through a fourth convolution block and a third maximum pooling layer to obtain a fourth feature;
[0020] Performing a fifth processing on the second slow motion feature through a fifth convolution block and a fourth maximum pooling layer to obtain a fifth feature;
[0021] Connecting the first feature, the second feature, the third feature, the fourth feature and the fifth feature to obtain a sixth feature;
[0022] The sixth feature is processed in a sixth manner through a sixth convolution block, and the result of the sixth processing is globally maximum pooled and fully connected to obtain a first detection result.
[0023] In some embodiments, performing data filtering processing on the first detection result to obtain a first processing result includes the following steps:
[0024] Adding the first test result to a historical test result queue of a preset length;
[0025] Based on a first weight function, a first weighted processing is performed on the data in the historical detection result queue to obtain a first processing result.
[0026] In some embodiments, the expression of the first weight function is:
[0027] ,
[0028] in, represents the weight of the first weighted processing; Indicates the queue size; Indicates the position of an element in the queue.
[0029] In some embodiments, the processing step of the classifier includes the following steps:
[0030] Obtain the relative coordinate information of the skeleton point in the global image to obtain the global coordinate information;
[0031] Calculate local coordinate information based on the global coordinate information;
[0032] Inputting the global coordinate information into a first convolutional network to obtain a first confidence level;
[0033] Inputting the local coordinate information into a second convolutional network to obtain a second confidence level;
[0034] Post-fusion processing is performed on the first confidence level and the second confidence level to obtain a first classification result;
[0035] Wherein, the first convolutional network and the second convolutional network are both one-dimensional convolutional networks.
[0036] In some embodiments, calculating the local coordinate information according to the global coordinate information comprises the following steps:
[0037] Determine the horizontal axis coordinate value of the local coordinate information according to the maximum horizontal axis coordinate value and the minimum horizontal axis coordinate value of the global coordinate information;
[0038] Determine the vertical axis coordinate value of the local coordinate information according to the maximum vertical axis coordinate value and the minimum vertical axis coordinate value of the global coordinate information;
[0039] Using the vertical axis coordinate value of the global coordinate information as the vertical axis coordinate value of the local coordinate information;
[0040] Local coordinate information is determined according to the horizontal axis coordinate value, the vertical axis coordinate value and the vertical axis coordinate value.
[0041] In some embodiments, performing a single activation process on the first classification result to obtain a continuous gesture action recognition result includes the following steps:
[0042] Adding the first classification result to a historical classification result queue of a preset length;
[0043] Based on a second weight function, performing a second weighted processing on the data in the historical classification result queue to obtain a second processing result;
[0044] adjusting the confidence of the classifier according to the second processing result;
[0045] In the process of processing the video, when the confidence of the classifier reaches a preset confidence threshold, the continuous action recognition result is output; or, when the classifier is disabled, the continuous action recognition result is output.
[0046] In some embodiments, the expression of the second weight function is:
[0047] ,
[0048] ,
[0049] in, represents the weight of the second weighted processing; μ is the average duration of the gesture in the video frame dataset; is the step length; represents the queue length; t represents the intermediate parameter.
[0050] To achieve the above purpose, another aspect of the embodiment of the present application provides a visual continuous action recognition system, the system comprising:
[0051] The first module is used to synchronously slide the detector and the classifier along the video according to a preset step length to determine the current video frame; wherein the detector is used to detect whether there is a gesture action in the current video frame; and the classifier is used to classify the gesture action;
[0052] A second module is used for detecting each current video frame by the detector during the sliding process to obtain a first detection result;
[0053] A third module is used to perform data filtering processing on the first detection result to obtain a first processing result; wherein the data filtering processing is used to correct the first detection result according to the correlation of adjacent frame detection results;
[0054] A fourth module is configured to activate the classifier when the first processing result is that there is a gesture action in the current video frame;
[0055] A fifth module is used to classify the skeleton point data of the current video frame through the classifier to obtain a first classification result;
[0056] The sixth module is used to perform a single activation process on the first classification result to obtain a continuous gesture action recognition result; wherein the single activation process is used to exclude repeated recognition of the continuous gesture action.
[0057] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above-mentioned method when executing the computer program.
[0058] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described above is implemented.
[0059] The embodiments of the present application include at least the following beneficial effects: The present application provides a method, system, electronic device and storage medium for visual continuous action recognition. The scheme can accurately recognize visual continuous actions by sliding the detector and classifier synchronously along the video and detecting and classifying the video frames. The skeleton point data is used as the processing object, which eliminates the need for useless data information in the RGB image, reduces the memory requirements for processing, and achieves the effect of more effectively analyzing gesture actions. In addition, by filtering the data through the first detection result and performing a single activation process on the first classification result, the confusion problem of gesture actions can be improved, making the recognition result more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0061] Figure 1 is a flow chart of a visual continuous action recognition method provided by an embodiment of the present application;
[0062] Figure 2 It is a principle framework diagram of the visual continuous action recognition method provided in the embodiment of the present application;
[0063] Figure 3 It is a basic model structure diagram of DD-Net provided in the embodiment of the present application;
[0064] Figure 4 is a model structure diagram of a detector based on an improved DD-Net provided in an embodiment of the present application;
[0065] Figure 5 It is a principle framework diagram of the classifier provided in the embodiment of the present application;
[0066] Figure 6 It is a module schematic diagram of a visual continuous action recognition system provided by an embodiment of the present application;
[0067] Figure 7 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0068] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0069] Although the functional modules are divided in the system schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100", "second / S200", etc. in the specification, claims and the above drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0070] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0071] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0072] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0073] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0074] In the related technology, some solutions directly extract the features of gesture actions from RGB images. Since RGB images are high-dimensional data, it is more difficult to extract effective information from them, requiring longer inference time and inference memory, and are easily affected by light and background environmental factors.
[0075] Gesture recognition technology is limited to static gesture images or needs to divide the continuous gesture sequence into multiple independent gestures before recognizing them one by one. This requires a clear transition phase between adjacent gestures, which is inconsistent with people's daily gesture habits. In daily life, people inevitably need to use multiple gestures in succession.
[0076] In view of this, a visual continuous action recognition method, system, electronic device and storage medium are provided in the embodiments of the present application. The scheme extracts the time information and spatial information of the skeleton points from the skeleton point coordinate sequence as the input of the network. On the one hand, the gesture action information can be analyzed more effectively, and many useless data information in the RGB image are removed; on the other hand, the three-dimensional input data of the network is converted into a one-dimensional input vector, and the designed network structure is composed of a one-dimensional convolutional neural network (One Dimensional Convolutional Network, 1D-CNN), which saves a lot of memory space compared with the three-dimensional network and is more time-effective.
[0077] A visual continuous action recognition method provided in an embodiment of the present application relates to the field of computer technology. A visual continuous action recognition method provided in an embodiment of the present application can be applied to a terminal, can be applied to a server, or can be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. The cloud server, the server can also be a node server in a blockchain network; the software can be an application that implements a visual continuous action recognition method, etc., but is not limited to the above forms.
[0078] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0079] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0080] Figure 1is an optional flowchart of a visual continuous action recognition method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S100 to S600.
[0081] Step S100, according to a preset step size, slide the detector and the classifier synchronously along the video to determine the current video frame; wherein the detector is used to detect whether there is a gesture action in the current video frame; and the classifier is used to classify the gesture action.
[0082] Step S200: During the sliding process, for each current video frame, the detector detects the current video frame to obtain a first detection result.
[0083] Step S300, performing data filtering processing on the first detection result to obtain a first processing result; wherein the data filtering processing is used to correct the first detection result according to the correlation between adjacent frame detection results.
[0084] Step S400: When the first processing result is that there is a gesture action in the current video frame, activating the classifier.
[0085] Step S500: classify the skeleton point data of the current video frame by the classifier to obtain a first classification result.
[0086] Step S600, performing a single activation process on the first classification result to obtain a continuous gesture action recognition result; wherein the single activation process is used to exclude repeated recognition of the continuous gesture action.
[0087] In the steps S100 to S600 shown in the embodiment of the present application, the detector and the classifier are synchronously slid along the video, and the video frames are detected and classified, so that visual continuous actions can be accurately identified, and the skeleton point data is used as the processing object, so that useless data information in the RGB image is not required, the memory requirement for processing is reduced, and the effect of more effectively analyzing gesture actions is achieved. In addition, by filtering the data through the first detection result and performing a single activation processing on the first classification result, the confusion problem of gesture actions can be improved, making the recognition result more accurate.
[0088] In step S200 of some embodiments, the processing steps of the detector include but are not limited to the following steps S201 to S210.
[0089] Step S201, obtaining a skeleton point coordinate sequence of the current video frame.
[0090] Step S202, calculating the time matrix of the skeleton point coordinate sequence to obtain a first fast motion feature, a joint distance feature and a first slow motion feature.
[0091] Step S203, calculating the spatial matrix of the skeleton coordinate point sequence to obtain a second fast motion feature and a second slow motion feature.
[0092] Step S204: performing a first processing on the first fast motion feature through a first convolution block to obtain a first feature.
[0093] Step S205, performing a second processing on the joint joint distance feature through a second convolution block and a first maximum pooling layer to obtain a second feature.
[0094] Step S206: Perform a third process on the first slow motion feature through a third convolution block and a second maximum pooling layer to obtain a third feature.
[0095] Step S207: Perform a fourth process on the second fast motion feature through a fourth convolution block and a third maximum pooling layer to obtain a fourth feature.
[0096] Step S208: Perform a fifth process on the second slow motion feature through a fifth convolution block and a fourth maximum pooling layer to obtain a fifth feature.
[0097] Step S209: connect the first feature, the second feature, the third feature, the fourth feature and the fifth feature to obtain a sixth feature.
[0098] Step S210, performing a sixth processing on the sixth feature through a sixth convolution block, and performing global maximum pooling and full connection on the result of the sixth processing to obtain a first detection result.
[0099] In some embodiments, step S300 includes but is not limited to the following steps S301 to S302.
[0100] Step S301: adding the first detection result to a historical detection result queue of a preset length.
[0101] Step S302: Based on a first weight function, perform a first weighted processing on the data in the historical detection result queue to obtain a first processing result.
[0102] In step S302 of some embodiments, the expression of the first weight function is:
[0103] ,
[0104] in, represents the weight of the first weighted processing; Indicates the queue size; Indicates the position of an element in the queue.
[0105] In step S400 of some embodiments, the processing steps of the classifier include but are not limited to the following steps S401 to S405.
[0106] Step S401, obtaining relative coordinate information of the skeleton point in the global image to obtain global coordinate information.
[0107] Step S402: Calculate local coordinate information based on the global coordinate information.
[0108] Step S403: input the global coordinate information into a first convolutional network to obtain a first confidence level.
[0109] Step S404: input the local coordinate information into a second convolutional network to obtain a second confidence level.
[0110] Step S405: Post-fusion processing is performed on the first confidence level and the second confidence level to obtain a first classification result.
[0111] In steps S403-S404, the first convolutional network and the second convolutional network are both one-dimensional convolutional networks.
[0112] In some embodiments, step S500 includes but is not limited to the following steps S501 to S504.
[0113] Step S501 , determining the horizontal axis coordinate value of the local coordinate information according to the maximum horizontal axis coordinate value and the minimum horizontal axis coordinate value of the global coordinate information.
[0114] Step S502 , determining the vertical axis coordinate value of the local coordinate information according to the maximum vertical axis coordinate value and the minimum vertical axis coordinate value of the global coordinate information.
[0115] Step S503: Using the vertical axis coordinate value of the global coordinate information as the vertical axis coordinate value of the local coordinate information.
[0116] Step S504, determining local coordinate information according to the horizontal axis coordinate value, the vertical axis coordinate value and the vertical axis coordinate value.
[0117] In some embodiments, step S600 includes but is not limited to the following steps S601 to S604.
[0118] Step S601: adding the first classification result to a historical classification result queue of a preset length.
[0119] Step S602: Based on a second weight function, perform a second weighted processing on the data in the historical classification result queue to obtain a second processing result.
[0120] Step S603: adjusting the confidence of the classifier according to the second processing result.
[0121] Step S604, during the process of processing the video, when the confidence of the classifier reaches a preset confidence threshold, outputting a continuous action recognition result; or, when the classifier is disabled, outputting a continuous action recognition result.
[0122] In step S602 of some embodiments, the expression of the second weight function is:
[0123] ,
[0124] ,
[0125] in, represents the weight of the second weighted processing; μ is the average duration of the gesture in the video frame dataset; is the step length; represents the queue length; t represents the intermediate parameter.
[0126] Below, in conjunction with a specific application example of a visual continuous gesture action recognition scenario, the solution of the embodiment of the present application is described in detail and explained:
[0127] In an embodiment of the present application, a visual continuous action recognition method is provided, which can be applied to accurately recognize gesture actions, reduce the storage resources and reasoning time required for recognition, and realize lightweight real-time recognition. Figure 2 , Figure 2 is a principle framework diagram of continuous gesture action recognition in an embodiment of the present application, from Figure 2 It can be seen that the detector and classifier of the present application are respectively composed of queues, which slide along the video according to the step size s. The detector performs action detection in each frame it slides to, and the output detection result is filtered through data to obtain whether there is a gesture action in the current video frame. If no gesture action is detected, the detector continues to slide forward. If a gesture action is detected, the classifier is activated, the skeleton point data of the current video frame is input for classification, and the classification result is processed by a single activation for early recognition or late recognition. After the recognition is completed, the classifier and the detector move forward together and continue the sliding process.
[0128] The hand posture is represented by skeleton points. Each point represents a joint of the hand. The lines between the points represent the skeleton. Any movement that the hand can make can be uniquely represented by a set of graph structures in space: the spatial position of each point and the angle between the lines represent the movement structure of the human body, and the movement speed of the point represents the movement posture of the human body.
[0129] The coordinates of the 3D bone points of the hand can be obtained using Mediapipe. Frames, total The hand bone points, Frame, A bone point can be expressed as: .in, is the 3D coordinate of the i-th bone point in the k-th frame, and is the global relative coordinate of the bone point within the image range, is the depth of the bone point. The skeleton point sequence of a frame is represented as ,in, Represents the skeleton point sequence of the kth frame.
[0130] The following is an introduction to the construction and working steps of the detector of this application: This application uses a double feature double motion net (DD-Net) as the basic model. Figure 3 , Figure 3 is a basic model structure diagram of DD-Net provided in the embodiment of the present application, Figure 3 In the figure, CNN(1,2×filters) indicates a convolutional layer with a kernel size of 1×1 and a channel number of 2×filters, where filters is the number of convolutional kernels; MaxPooling(2) indicates a maximum pooling layer with a step size of 2. DD-Net has three input branches: fast motion feature branch, slow motion feature branch, and joint collection distance (JCD) feature branch. The first two features reflect the speed information of the skeleton points, and the JCD feature reflects the distance information between the skeleton points. The three feature vectors are connected after passing through multiple layers of 1D-CNN, and then convolution operation is performed to obtain the final output result.
[0131] In the embodiment of the present application, the coordinate difference of the skeleton point sequence of two frames of images is used to represent the speed information of the skeleton point movement, and the fast motion feature and slow motion feature of the kth frame can be expressed as:
[0132] ;
[0133] ;
[0134] in, Indicates the fast motion characteristics of the kth frame; Represents the skeleton point sequence of the k+2th frame; Represents the skeleton point sequence of the kth frame; represents the slow motion feature of the kth frame; Represents the skeleton point sequence of the k+1th frame.
[0135] The JCD feature can be represented by the Euclidean distance between skeleton points. In the frame image, Point and The Euclidean distance between points is expressed as After calculating all the Euclidean distances, we can get a , in order to reduce data redundancy, we only take the triangular matrix as the JCD feature matrix, then The JCD feature matrix of a skeleton point can be expressed as:
[0136] ,
[0137] In the original DD-Net network structure, the input of the dual-scale motion feature branch can be represented by a time matrix. A row of this matrix represents the motion information of all the skeleton points in a frame of image. Each time a row of vector is input, the features of the frame are extracted and analyzed. Because the unit of learning features is time, this matrix is called a time matrix.
[0138] In different gestures, the motion information of the same bone point is different. Based on this, the present application introduces a new branch - the spatial matrix. Furthermore, in contrast to the time matrix, a column of the spatial matrix represents a frame of image, and a row represents the information of a bone point in all image frames. By inputting a row of vectors each time, all the motion information of a bone point can be obtained, so that the model can learn the motion state of each bone point in the gesture, and detect the gesture based on this feature. By introducing the spatial matrix, the improved DD-Net recognition model of the embodiment of the present application can learn more feature information of the bone points from multiple dimensions, thereby improving accuracy. The network structure of the improved DD-Net is as follows: Figure 4 shown.
[0139] During a gesture, the hand is very likely to leave the camera range at any time, resulting in some frames failing to detect gestures. The detection results between adjacent frames are correlated. This application proposes a data pre-processing method that can use the correct detection results before the current video frame to correct the current video frame. Specifically, the detector results that the detector has obtained before the current video frame are added to the size of In the historical detection result queue, the data in the queue is pre-processed according to the weight function to obtain the final detection result of the target frame, which improves the accuracy of detection and is conducive to waking up the classifier more accurately. The expression of the above weight function is:
[0140] ,
[0141] in, Represents the weight of the i-th frame in the queue.
[0142] The following describes the construction and working steps of the classifier of this application:
[0143] In some embodiments, Mediapipe can be used to obtain the relative coordinate information of the hand skeleton points in the global image. The global coordinates of the bone points are , The maximum values of , the minimum values are , then the local coordinates of the point are expressed as ,in:
[0144] ;
[0145] .
[0146] Reference Figure 5 , Figure 5 This is a principle framework diagram of the classifier provided in an embodiment of the present application. The obtained coordinate information and local coordinate information are respectively input into two one-dimensional convolutional networks to obtain the confidence of two groups of categories. The two groups of nodes are post-fused to obtain the final classification processing result.
[0147] A gesture action may be recognized multiple times during its duration. In order to make each action recognized only once, the embodiment of the present application performs a single activation process on the classification result. Single activation is implemented by a two-layer control mechanism. Either the classification result is output when the confidence of the classification result of the classifier reaches a threshold before the action ends, which is called early recognition. Or the classification result is output when the classifier is deactivated, which is called late recognition.
[0148] Gestures are divided into three stages: preparation, core, and retraction. The core stage has the most distinct features of tidying up, and the recognition of gestures is most accurate. On the contrary, some gestures have similar parts in the preparation stage, which can easily confuse the classifier. For early recognition, classifying gestures too early in the preparation stage can easily lead to classification errors. It is necessary to rely on the data of the classifier to classify gestures in the core stage as much as possible to ensure that the final classification result is obtained after the core stage ends. The embodiment of the present application proposes to process the data obtained by the classifier, and add the classification result obtained after the classifier is activated to a length of In the historical classification result queue, the data of the queue is weighted according to the following formula:
[0149] ,
[0150] The t is calculated by the following formula:
[0151] ,
[0152] in, represents the weighted weight of the jth frame in the queue; is the average duration of gestures in the dataset, is the step length; t represents the intermediate parameter. The result obtained by multiplying and averaging is more dependent on the core stage, and the confidence of the classification data in the preparation stage will be further reduced, reducing the interference with the final classification result and making the classification and recognition result more accurate.
[0153] In addition, when training the model, a data set with stronger continuity characteristics can be selected to improve the recognition effect of the model. There is no transition state between actions in this data set, and it is impossible to segment them in advance.
[0154] In summary, the embodiments of the present application have at least the following beneficial effects:
[0155] 1. Extract the time and space information of the skeleton points from the skeleton point coordinate sequence as the input of the network. On the one hand, it can more effectively analyze the gesture action information and remove a lot of useless data information in the RGB image; on the other hand, the three-dimensional input data of the network is converted into a one-dimensional input vector. The designed network structure is composed of a one-dimensional convolutional neural network (1D-CNN), which saves a lot of memory space compared to the three-dimensional network and is more time-effective;
[0156] 2. The continuous gesture action recognition framework constructed in this application is composed of a detector and a classifier. The concept of "data filtering" is proposed for the detector, and the concept of "single activation" is proposed for the classifier to improve the accuracy of gesture recognition.
[0157] 3. This application uses a one-dimensional convolutional neural network to train the detector and classifier separately. For the detector, the spatial information and temporal information of the skeleton points are extracted; for the classifier, the local coordinates and global coordinates of the skeleton points are fused. This ensures that both can obtain more effective information.
[0158] 4. The training data set used in this application has the characteristics of strong action continuity, background diversity, large time differences between actions of the same category, and contains multiple natural actions, and has stronger applicability.
[0159] See also Figure 6 The present application also provides a visual continuous action recognition system, which can implement the above-mentioned visual continuous action recognition method. The system includes:
[0160] The first module 101 is used to synchronously slide the detector and the classifier along the video according to a preset step length to determine the current video frame; wherein the detector is used to detect whether there is a gesture action in the current video frame; and the classifier is used to classify the gesture action;
[0161] The second module 102 is used for detecting each current video frame by the detector during the sliding process to obtain a first detection result;
[0162] The third module 103 is used to perform data filtering processing on the first detection result to obtain a first processing result; wherein the data filtering processing is used to correct the first detection result according to the correlation of adjacent frame detection results;
[0163] A fourth module 104 is configured to activate the classifier when the first processing result is that there is a gesture action in the current video frame;
[0164] The fifth module 105 is used to classify the skeleton point data of the current video frame through the classifier to obtain a first classification result;
[0165] The sixth module 106 is used to perform a single activation process on the first classification result to obtain a continuous gesture action recognition result; wherein the single activation process is used to exclude repeated recognition of the continuous gesture action.
[0166] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0167] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned visual continuous action recognition method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.
[0168] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0169] See also Figure 7 , Figure 7 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0170] The processor 201 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0171] The memory 202 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 202 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 202, and the processor 201 calls and executes a visual continuous action recognition method of the embodiment of this application;
[0172] Input / output interface 203, used to implement information input and output;
[0173] Communication interface 204, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0174] Bus 205 , which transmits information between various components of the device (e.g., processor 201 , memory 202 , input / output interface 203 , and communication interface 204 );
[0175] The processor 201 , the memory 202 , the input / output interface 203 and the communication interface 204 are connected to each other in communication within the device via the bus 205 .
[0176] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned visual continuous action recognition method.
[0177] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0178] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0179] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0180] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0181] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0182] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0183] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings 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 of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0184] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0185] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0186] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0187] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0188] 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 application, 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, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0189] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for visual continuous action recognition, characterized in that: The following steps are involved: According to a preset step length, the detector and the classifier are synchronously slid along the video to determine the current video frame; wherein the detector is used to detect whether there is a gesture action in the current video frame; and the classifier is used to classify the gesture action; During the sliding process, for each of the current video frames, the detector detects the current video frame to obtain a first detection result; Performing data filtering processing on the first detection result to obtain a first processing result; wherein the data filtering processing is used to correct the first detection result according to the correlation of adjacent frame detection results; When the first processing result is that there is a gesture action in the current video frame, activating the classifier; Classifying the skeleton point data of the current video frame by the classifier to obtain a first classification result; Performing a single activation process on the first classification result to obtain a continuous gesture action recognition result; wherein the single activation process is used to exclude repeated recognition of the continuous gesture action; The processing steps of the detector include the following steps: Obtaining a skeleton point coordinate sequence of the current video frame; Calculating the time matrix of the skeleton point coordinate sequence to obtain a first fast motion feature, a joint distance feature and a first slow motion feature; wherein each row of the time matrix represents the motion information of all the skeleton points in a frame of image; Calculating the spatial matrix of the skeleton point coordinate sequence to obtain a second fast motion feature and a second slow motion feature; Wherein, each row of the spatial matrix represents the motion information of one of the skeleton points in all image frames; Performing a first processing on the first fast motion feature through a first convolution block to obtain a first feature; Performing a second processing on the joint joint distance feature through a second convolution block and a first maximum pooling layer to obtain a second feature; Performing a third processing on the first slow motion feature through a third convolution block and a second maximum pooling layer to obtain a third feature; Performing a fourth processing on the second fast motion feature through a fourth convolution block and a third maximum pooling layer to obtain a fourth feature; Performing a fifth processing on the second slow motion feature through a fifth convolution block and a fourth maximum pooling layer to obtain a fifth feature; Connecting the first feature, the second feature, the third feature, the fourth feature and the fifth feature to obtain a sixth feature; The sixth feature is processed in a sixth manner through a sixth convolution block, and the result of the sixth processing is globally maximum pooled and fully connected to obtain a first detection result.
2. The method according to claim 1, characterized in that The step of performing data filtering processing on the first detection result to obtain a first processing result comprises the following steps: Adding the first test result to a historical test result queue of a preset length; Based on a first weight function, a first weighted processing is performed on the data in the historical detection result queue to obtain a first processing result.
3. The method according to claim 2, characterized in that The expression of the first weight function is: , in, represents the weight of the first weighted processing; Indicates the queue size; Indicates the position of an element in the queue.
4. The method according to claim 1, characterized in that The processing steps of the classifier include the following steps: Obtain the relative coordinate information of the skeleton point in the global image to obtain the global coordinate information; Calculate local coordinate information based on the global coordinate information; Inputting the global coordinate information into a first convolutional network to obtain a first confidence level; Inputting the local coordinate information into a second convolutional network to obtain a second confidence level; Post-fusion processing is performed on the first confidence level and the second confidence level to obtain a first classification result; Wherein, the first convolutional network and the second convolutional network are both one-dimensional convolutional networks.
5. The method according to claim 4, characterized in that The step of calculating the local coordinate information according to the global coordinate information comprises the following steps: Determine the horizontal axis coordinate value of the local coordinate information according to the maximum horizontal axis coordinate value and the minimum horizontal axis coordinate value of the global coordinate information; Determine the vertical axis coordinate value of the local coordinate information according to the maximum vertical axis coordinate value and the minimum vertical axis coordinate value of the global coordinate information; Using the vertical axis coordinate value of the global coordinate information as the vertical axis coordinate value of the local coordinate information; Local coordinate information is determined according to the horizontal axis coordinate value, the vertical axis coordinate value and the vertical axis coordinate value.
6. The method according to claim 1, characterized in that The step of performing a single activation process on the first classification result to obtain a continuous gesture action recognition result includes the following steps: Adding the first classification result to a historical classification result queue of a preset length; Based on a second weight function, performing a second weighted processing on the data in the historical classification result queue to obtain a second processing result; adjusting the confidence of the classifier according to the second processing result; In the process of processing the video, when the confidence of the classifier reaches a preset confidence threshold, the continuous action recognition result is output; or, when the classifier is disabled, the continuous action recognition result is output.
7. A visual continuous action recognition system, characterized in that: include: The first module is used to synchronously slide the detector and the classifier along the video according to a preset step length to determine the current video frame; wherein the detector is used to detect whether there is a gesture action in the current video frame; and the classifier is used to classify the gesture action; A second module is used for detecting each current video frame by the detector during the sliding process to obtain a first detection result; A third module is used to perform data filtering processing on the first detection result to obtain a first processing result; wherein the data filtering processing is used to correct the first detection result according to the correlation of adjacent frame detection results; A fourth module is configured to activate the classifier when the first processing result is that there is a gesture action in the current video frame; A fifth module is used to classify the skeleton point data of the current video frame through the classifier to obtain a first classification result; A sixth module is used to perform a single activation process on the first classification result to obtain a continuous gesture action recognition result; wherein the single activation process is used to exclude repeated recognition of the continuous gesture action; The processing steps of the detector include the following steps: Obtaining a skeleton point coordinate sequence of the current video frame; Calculate the time matrix of the skeleton point coordinate sequence to obtain a first fast motion feature, a joint distance feature and a first slow motion feature; wherein each row of the time matrix represents the motion information of all the skeleton points in a frame of image; Calculating the spatial matrix of the skeleton coordinate point sequence to obtain a second fast motion feature and a second slow motion feature; Wherein, each row of the spatial matrix represents the motion information of one of the skeleton points in all image frames; Performing a first processing on the first fast motion feature through a first convolution block to obtain a first feature; Performing a second processing on the joint joint distance feature through a second convolution block and a first maximum pooling layer to obtain a second feature; Performing a third processing on the first slow motion feature through a third convolution block and a second maximum pooling layer to obtain a third feature; Performing a fourth processing on the second fast motion feature through a fourth convolution block and a third maximum pooling layer to obtain a fourth feature; Performing a fifth processing on the second slow motion feature through a fifth convolution block and a fourth maximum pooling layer to obtain a fifth feature; Connecting the first feature, the second feature, the third feature, the fourth feature and the fifth feature to obtain a sixth feature; The sixth feature is processed in a sixth manner through a sixth convolution block, and the result of the sixth processing is globally maximum pooled and fully connected to obtain a first detection result.
8. An electronic device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor executes the program to implement the method according to any one of claims 1 to 6.
9. A computer storage medium storing a program executable by a processor, characterized in that: The program executable by the processor is used to implement the method according to any one of claims 1 to 6 when executed by the processor.
Citation Information
Patent Citations
Skeleton-based multi-feature multi-stream real-time action recognition method and device and medium
CN117523659A
Skeleton-based action recognition using bi-directional spatial-temporal transformer
US20220374629A1
