A dance movement key point capture method based on transformer fusion openpose
By combining the Transformer model and OpenPose, dynamically adjusting the convolutional layer and learning rate, introducing a self-attention mechanism and dynamic position coding, the accuracy problem of OpenPose under complex backgrounds and fast movements is solved, and the accuracy and accuracy of dance motion capture are improved. Real-time performance.
Patent Information
- Application Number
- CN202410932523.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Existing motion capture technology, especially OpenPose, has shortcomings in real-time performance and node prediction accuracy. It is especially prone to noise interference in complex backgrounds or fast motion situations, and prediction accuracy decreases in complex joint connections or occlusion situations. , it is difficult to capture the details of dance movements in real time and accurately.
Using a method based on the combination of the Transformer model and OpenPose, the key points extracted by OpenPose are input into the pre-trained Transformer model for prediction and parameter adjustment, the convolution layer and learning rate are dynamically adjusted, the self-attention mechanism and dynamic position coding are introduced, and the key points are optimized Points are extracted, and fuzzy algorithms are used to reduce noise and prediction errors.
It significantly improves the accuracy and real-time performance of dance motion capture, reduces posture estimation errors, and improves robustness and real-time response capabilities in complex scenes.
Smart Images

Figure CN118470805B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of motion capture, and in particular relates to a method for capturing key points of dance movements based on transformer fusion and openpose. Background Art
[0002] With the rapid development of virtual reality and augmented reality technologies, motion capture technology is increasingly used in entertainment, medical care, sports and other fields. Existing motion capture technologies mainly rely on deep learning and computer vision technologies, among which OpenPose is a widely used open source pose estimation framework. However, there is still room for improvement in OpenPose's real-time performance and the accuracy of node prediction. In terms of real-time performance, OpenPose is based on a multi-level convolutional neural network. Although the complex network architecture improves the detection accuracy, it may also increase the computational burden and affect the real-time processing speed. At the same time, the complex network architecture may also lead to inflexible and inefficient allocation and utilization of computing resources when hardware resources are limited. In terms of node prediction, OpenPose is easily affected by noise in complex backgrounds or fast movements, resulting in inaccurate key point detection. In addition, although OpenPose can extract human key points, the prediction accuracy may decrease in the case of complex joint connections or occlusion, and it may be difficult for OpenPose to capture all details in real time and accurately for fast-changing or complex human movements. Summary of the invention
[0003] The purpose of the present invention is to provide a dance motion key point capture method based on transformer fusion openpose in view of the deficiencies in the prior art. By combining the powerful prediction ability of the transformer model and the flexibility of openpose, the accuracy and real-time performance of dance motion capture are significantly improved, and the method has broad application prospects.
[0004] In order to achieve the above technical objectives, the present invention adopts the following technical solutions.
[0005] A dance movement key point capture method based on transformer fusion openpose, comprising the following steps:
[0006] Step S1, obtaining dance video frames: using a video acquisition device with a deep high frame rate (60fps or above) and real-time acquisition of dance action videos in a well-lit environment, and decomposing the dance video frames frame by frame;
[0007] Step S2, initializing OpenPose: configuring and starting OpenPose, processing dance video frames, and extracting human body key points and hand key points;
[0008] Step S3, Transformer model integration and parameter optimization: Input the key points extracted by OpenPose into the pre-trained Transformer model for prediction and parameter adjustment. Based on the output of Transformer, dynamically adjust the convolutional layer and learning rate of OpenPose, the number of heads of the attention mechanism, and the rotation angle of the video frame to optimize the key point extraction;
[0009] Step S4, key point fuzzy processing: Use a fuzzy algorithm to process the output of the Transformer to reduce noise and prediction errors and output smooth key point data.
[0010] Specifically, the content of extracting the key points of the human body and the key points of the hand by OpenPose in step S2 is as follows:
[0011] OpenPose consists of a multi-level convolutional neural network to extract key points of the human body, and its loss function is expressed as:
[0012] ;
[0013] In the above formula, is the loss of the keypoint heatmap; It is the loss of the partial affinity field. PAF refers to the partial affinity field, which is a vector field used to describe the association between different body parts. Each vector represents the direction and intensity from one key point to another key point, which is used to determine whether two key points belong to the same limb.
[0014] Specifically, in step S3, the key points extracted by OpenPose are input into the pre-trained Transformer model for prediction and parameter adjustment, as follows:
[0015] The Transformer model is used for sequence prediction and parameter optimization, and adopts a self-attention mechanism, which is expressed as follows:
[0016] ;
[0017] In the above formula, , , Respectively represent queries Matrix, Key Matrix and Values matrix; is the dimension of the key vector.
[0018] Specifically, in step S3, based on the output of Transformer, the convolution layer and learning rate of OpenPose, the number of heads of the attention mechanism, and the rotation angle of the video frame are dynamically adjusted to optimize the key point extraction. The optimization contents include:
[0019] Step S31: Parameter adjustment and optimization
[0020] a. Convolutional layer parameter optimization: Input the key point data extracted by OpenPose into the Transformer model, and dynamically adjust the hyperparameters of the OpenPose convolutional layer according to the output of the Transformer model. The specific formula is as follows:
[0021] ;
[0022] In the above formula, and Represented as learnable weight and bias parameters respectively; is the convolution kernel size;
[0023] The key point data include heat map and PAF;
[0024] b. Loss function adjustment: Based on the output of Transformer, adjust the weight parameters in the OpenPose loss function to optimize the accuracy of key point extraction;
[0025] For heatmap loss:
[0026] ;
[0027] In the above formula, The weights predicted by the Transformer model; is the predicted heat map; is the real heat map;
[0028] For PAF loss:
[0029] ;
[0030] In the above formula, The weights predicted by the Transformer model; is the predicted PAF; is the real PAF;
[0031] Step S32: Optimization of multi-head attention mechanism
[0032] The key point data extracted by OpenPose is input into the optimized Transformer model, and the attention weights between different key points are calculated using the multi-head attention mechanism. An adaptive weight adjustment mechanism is introduced, and the calculation formula is as follows:
[0033] ;
[0034] ;
[0035] In the above formula, It is a weight parameter that is dynamically adjusted according to key point data; is the weight matrix of the query vector Q, used to convert the query vector Q into a new query vector; is the weight matrix of the key vector K, used to convert the key vector K into a new key vector; is the weight matrix of the value vector V, which is used to transform the key vector V into a new value vector;
[0036] Step S33: Optimization of position coding
[0037] Dynamic Position Encoding Optimization: Dynamic position encoding (DPE) is introduced into the Transformer model to solve the position sensitivity problem in complex sequence data processing. The optimization content includes:
[0038] S331, Environmental Perception Initialization Phase
[0039] Assume that the original input sequence is ,in Representative The word embedding environment-aware network at each position preprocesses X and outputs the context vector :
[0040] ;
[0041] S332, Dynamic Code Generation Network
[0042] For each position in the sequence , the dynamic encoding network generates the position index and context vector C To generate dynamic position codes , expressed as:
[0043] ;
[0044] In the above formula, is the position index i The basic positional encoding is Traditional static coding of function generation; Represents a vector concatenation operation; represents a multilayer perceptron; parameters Responsible for learning how to use context Adjust the encoding of each position;
[0045] S333, Fusion Strategy
[0046] Dynamic Position Encoding With word embedding The enhanced input representation is formed by adding the fusion operation , ;
[0047] S334, end-to-end training loss function
[0048] The overall goal of the Transformer model is to minimize the loss function L , so the average value over all samples is used to optimize all parameters including dynamic position encoding:
[0049] ;
[0050] In the above formula, Represents the dataset The input-output pairs sampled from It is the Transformer model after the introduction of dynamic position encoding; Contains all learnable parameters; Represents the original input sequence The processed form, i.e., the enhanced input representation obtained by the fusion strategy in step S333;
[0051] Multi-dimensional position encoding optimization: By introducing multi-dimensional position encoding in the spatial dimension, the Transformer model can simultaneously consider the position changes of key points in space and time. The optimization contents are as follows:
[0052] For a two-dimensional structure, the position of each pixel or image block in the image can be encoded using two-dimensional sine and cosine wave functions to encode the horizontal coordinate x and the vertical coordinate y. The original position encoding in the Transformer model is extended to two dimensions, and the definition of each position encoding (x, y) is:
[0053] ;
[0054] ;
[0055] In the above formula, is the dimension of the positional encoding, which is usually the embedding dimension of the Transformer model divided by 2 to ensure that the dimension of the positional encoding matches the embedding dimension of the model; Indicates the current time step number.
[0056] Step S34: Dynamically adjust OpenPose parameter strategy optimization
[0057] Heatmap loss function weight adjustment strategy optimization:
[0058] Heatmap is the core method of representing the position of key points of the human body in OpenPose, and its loss function weight The dynamic adjustment uses the gradient descent method, according to the current heat map loss Weight To update:
[0059] ;
[0060] In the above formula, Represents the learning rate, which controls the update step size and ensures that each iteration can adjust the weight in the direction of reducing the heat map loss; Indicates the current time step;
[0061] PAF loss function weight adjustment strategy optimization:
[0062] PAF is a vector field connecting different key points of the human body, and its loss function weights The dynamic adjustment strategy is as follows:
[0063] ;
[0064] Through monitoring changes, adjust accordingly , the OpenPose model can focus more on learning the correct connection relationship between joints, reduce limb structure mismatch, and improve the continuity and stability of posture estimation;
[0065] Adjustment and optimization of convolution layer parameters:
[0066] For the convolutional layer parameters Use the global loss function-guided method for adjustment and optimization:
[0067] ;
[0068] In the above formula, It is a learning rate specifically set for the convolutional layer parameters.
[0069] Specifically, the fuzzy algorithm is used to process the output of the Transformer in step S4, and the process is as follows:
[0070] In order to reduce noise and prediction errors, a fuzzy algorithm is used to process the output of the Transformer model to generate smooth key point data:
[0071] ;
[0072] In the above formula, Indicates the key point data after blurring.
[0073] Compared with the prior art, the present invention has the following beneficial effects:
[0074] 1. The method of the present invention significantly improves the accuracy of key point detection in dance motion capture and reduces the error of posture estimation by combining the powerful prediction ability of the Transformer model and the flexibility of OpenPose.
[0075] 2. The present invention improves the real-time response capability under the premise of high frame rate by combining the efficient processing capability of Transformer with the fast posture detection of OpenPose.
[0076] 3. The present invention improves the robustness of the model in complex scenarios by introducing dynamic position coding and multi-dimensional position coding. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present disclosure and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying creative work.
[0078] Figure 1 This is a flow chart of the MIIDCAT method based on transformer fusion and openpose of the present invention. DETAILED DESCRIPTION
[0079] In order to facilitate those of ordinary skill in the art to understand and implement the present invention, the following detailed description is given to each step of the method proposed by the present invention, and it should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. In addition, it should be understood that after reading the content taught by the present invention, those skilled in the art can make various changes or modifications to the present invention, and these equivalent forms also fall within the scope defined by the appended claims of the present application.
[0080] Example
[0081] like Figure 1As shown, a dance motion key point capture method based on transformer fusion openpose includes the following steps:
[0082] Step S1, obtaining dance video frames: using a video acquisition device with a deep high frame rate (60fps or above) and real-time acquisition of dance action videos in a well-lit environment, and decomposing the dance video frames frame by frame;
[0083] Step S2, initializing OpenPose: configuring and starting OpenPose, processing dance video frames, and extracting human body key points and hand key points;
[0084] Step S3, Transformer model integration and parameter optimization: Input the key points extracted by OpenPose into the pre-trained Transformer model for prediction and parameter adjustment. Based on the output of Transformer, dynamically adjust the convolution layer of OpenPose, the learning rate, the number of heads of the attention mechanism, and the rotation angle of the video frame to optimize the key point extraction;
[0085] Step S4, key point fuzzy processing: Use a fuzzy algorithm to process the output of the Transformer to reduce noise and prediction errors and output smooth key point data.
[0086] Specifically, the content of extracting the key points of the human body and the key points of the hand by OpenPose in step S2 is as follows:
[0087] OpenPose consists of a multi-level convolutional neural network to extract key points of the human body, and its loss function is expressed as:
[0088] ;
[0089] In the above formula, is the loss of the keypoint heatmap; It is the loss of the partial affinity field. PAF refers to the partial affinity field, which is a vector field used to describe the association between different body parts. Each vector represents the direction and intensity from one key point to another key point, which is used to determine whether two key points belong to the same limb.
[0090] Specifically, in step S3, the key points extracted by OpenPose are input into the pre-trained Transformer model for prediction and parameter adjustment, as follows:
[0091] The Transformer model is used for sequence prediction and parameter optimization, and adopts a self-attention mechanism, which is expressed as follows:
[0092] ;
[0093] In the above formula, , , Respectively represent queries Matrix, Key Matrix and Values matrix; is the dimension of the key vector.
[0094] Specifically, in step S3, based on the output of Transformer, the convolution layer and learning rate of OpenPose, the number of heads of the attention mechanism, and the rotation angle of the video frame are dynamically adjusted to optimize the key point extraction. The optimization contents include:
[0095] Step S31: Parameter adjustment and optimization
[0096] a. Convolutional layer parameter optimization: Input the key point data extracted by OpenPose into the Transformer model, and dynamically adjust the hyperparameters of the OpenPose convolutional layer according to the output of the Transformer model. The specific formula is as follows:
[0097] ;
[0098] In the above formula, and Represented as learnable weight and bias parameters respectively; is the convolution kernel size;
[0099] The key point data include heat map and PAF;
[0100] b. Loss function adjustment: Based on the output of Transformer, adjust the weight parameters in the OpenPose loss function to optimize the accuracy of key point extraction;
[0101] For heatmap loss:
[0102] ;
[0103] In the above formula, The weights predicted by the Transformer model; is the predicted heat map; is the real heat map;
[0104] For PAF loss:
[0105] ;
[0106] In the above formula, The weights predicted by the Transformer model; is the predicted PAF; is the real PAF;
[0107] Step S32: Optimization of multi-head attention mechanism
[0108] The key point data extracted by OpenPose is input into the optimized Transformer model, and the attention weights between different key points are calculated using the multi-head attention mechanism. An adaptive weight adjustment mechanism is introduced, and the calculation formula is as follows:
[0109] ;
[0110] ;
[0111] In the above formula, It is a weight parameter that is dynamically adjusted according to key point data; is the weight matrix of the query vector Q, used to convert the query vector Q into a new query vector; is the weight matrix of the key vector K, used to convert the key vector K into a new key vector; is the weight matrix of the value vector V, which is used to transform the key vector V into a new value vector;
[0112] Step S33: Optimization of position coding
[0113] Dynamic Position Encoding Optimization: Dynamic Position Encoding (DPE) is introduced into the Transformer model to solve the position sensitivity problem in complex sequence data processing. The core idea of DPE is to adaptively generate position encoding vectors based on the real-time characteristics of the input sequence to enhance the model's ability to capture the position relationship of elements in the sequence. It is especially suitable for variable-length sequences and language tasks with complex structures. The specific optimization contents include:
[0114] S331, Environmental Perception Initialization Phase
[0115] Assume that the original input sequence is ,in Representative The word embedding environment-aware network at each position preprocesses X and outputs the context vector :
[0116] ;
[0117] This vector is used to guide the subsequent dynamic position encoding generation;
[0118] S332, Dynamic Code Generation Network
[0119] For each position in the sequence , the dynamic encoding network generates the position index and context vector C To generate dynamic position codes , expressed as:
[0120] ;
[0121] In the above formula, is the basic position code of position index i, such as Traditional static coding of function generation; Represents a vector concatenation operation; represents a multilayer perceptron; parameters Responsible for learning how to use context Adjust the encoding of each position;
[0122] S333, Fusion Strategy
[0123] Dynamic Position Encoding With word embedding The enhanced input representation is formed by adding the fusion operation , ;
[0124] S334, end-to-end training loss function
[0125] The overall goal of the Transformer model is to minimize the loss function L , so the average value over all samples is used to optimize all parameters including dynamic position encoding:
[0126] ;
[0127] In the above formula, Represents the dataset The input-output pairs sampled from It is the Transformer model after the introduction of dynamic position encoding; Contains all learnable parameters; Represents the original input sequence The processed form, i.e., the enhanced input representation obtained by the fusion strategy in step S333;
[0128] Multi-dimensional position encoding optimization: By introducing multi-dimensional position encoding in the spatial dimension, the Transformer model can simultaneously consider the position changes of key points in space and time. The optimization contents are as follows:
[0129] For a two-dimensional structure, the position of each pixel or image block in the image can be encoded using two-dimensional sine and cosine wave functions to encode the horizontal coordinate x and the vertical coordinate y. The original position encoding in the Transformer model is extended to two dimensions, and the definition of each position encoding (x, y) is:
[0130] ;
[0131] ;
[0132] In the above formula, is the dimension of the positional encoding, which is usually the embedding dimension of the Transformer model divided by 2 to ensure that the dimension of the positional encoding matches the embedding dimension of the model; Indicates the current time step;
[0133] In this embodiment, usually and Using different scaling factors to distinguish the importance of different dimensions helps the model learn more complex spatial correlations;
[0134] Step S34: Dynamically adjust OpenPose parameter strategy optimization
[0135] In the process of optimizing the OpenPose human posture estimation framework, dynamic adjustment of key parameters is the key to improving model performance and ensuring an efficient learning process. Therefore, in this embodiment, the weights of the heat map loss function, the weights of the PAF (Part Affinity Fields) loss function, and the convolution layer parameters are adaptively and dynamically adjusted to further enhance the model's prediction accuracy for human joints and limb structures through a detailed parameter fine-tuning strategy. Specifically:
[0136] Heatmap loss function weight adjustment strategy optimization:
[0137] Heatmap is the core method of representing the position of key points of the human body in OpenPose, and its loss function weight The dynamic adjustment uses the gradient descent method, according to the current heat map loss Weight To update:
[0138] ;
[0139] In the above formula, Represents the learning rate, which controls the update step size and ensures that each iteration can adjust the weight in the direction of reducing the heat map loss; Current time step;
[0140] This dynamic adjustment mechanism enables the model to focus on optimizing the difficult points in the training data, thereby improving the accuracy of key point positioning.
[0141] PAF loss function weight adjustment strategy optimization:
[0142] PAF is a vector field connecting different key points of the human body, and its loss function weights The dynamic adjustment strategy is as follows:
[0143] ;
[0144] Through monitoring changes, adjust accordingly , the OpenPose model can focus more on learning the correct connection relationship between joints, reduce limb structure mismatch, and improve the continuity and stability of posture estimation;
[0145] The adjusted model can focus more on learning the correct connection relationship between joints, reduce limb structure mismatch, and improve the continuity and stability of posture estimation;
[0146] Adjustment and optimization of convolution layer parameters:
[0147] For the convolutional layer parameters Use the global loss function-guided method for adjustment and optimization:
[0148] ;
[0149] In the above formula, It is a learning rate specifically set for the convolutional layer parameters.
[0150] The optimization of the convolutional layer parameters aims to balance the global optimization requirements and the fineness of local feature extraction. L )’s gradient feedback continuously fine-tunes the convolution kernel parameters, which helps the model capture high-level semantic features while taking into account low-level detail information, thereby accurately identifying individual postures even in complex backgrounds.
[0151] Specifically, the fuzzy algorithm is used to process the output of the Transformer in step S4, and the process is as follows:
[0152] In order to reduce noise and prediction errors, a fuzzy algorithm is used to process the output of the Transformer model to generate smooth key point data:
[0153] ;
[0154] In the above formula, Indicates the key point data after blurring.
[0155] Specifically, the fuzzy algorithm implementation process of the above steps is as follows:
[0156] 1) Define a set (F) that contains all possible output values and their corresponding membership functions.
[0157] 2) Build rules, by building a rule base to evaluate the output of the Transformer model and make adjustments. For example, if the output value is too high or too low, the rules will trigger the corresponding adjustment.
[0158] 3) Design a controller that, after obtaining the original output (K) of the transformer, evaluates and adjusts (K) according to the rules, and then outputs the adjusted key point data ( )
[0159] 4) Parameter selection and optimization: Select appropriate membership functions and rule parameters, and determine the optimal controller parameters through experiments.
[0160] The algorithm pseudo code is as follows:
[0161] FOR each output K from the Transformer model DO
[0162] Evaluate K using the fuzzy rules R
[0163] IF K is too high THEN
[0164] Decrease K based on the corresponding fuzzy rule
[0165] ELSIF K is too low THEN
[0166] Increase K based on the corresponding fuzzy rule
[0167] ENDIF
[0168] Update K_smooth with the adjusted value of K
[0169] END FOR
[0170] The experimental results in the following table show that the accuracy of the model was 84% before algorithm processing, but it was as high as 92% after algorithm processing.
[0171] Table 1. Comparison of model accuracy before and after algorithm processing
[0172]
[0173] In summary, the method of the present invention significantly improves the accuracy of key point detection in dance motion capture, reduces the error of posture estimation, and improves the real-time response capability under the premise of high frame rate by combining the powerful prediction ability of the Transformer model and the flexibility of OpenPose; and improves the robustness of the model in complex scenes by introducing dynamic position coding and multi-dimensional position coding.
[0174] The above is only a preferred embodiment of the present invention, and does not limit the present invention in other forms. Any technician familiar with the profession may use the above disclosed technical content to change or modify it into an equivalent embodiment with equivalent changes. However, any simple modification, equivalent change and modification made to the above embodiment according to the technical essence of the present invention without departing from the technical solution of the present invention still belongs to the protection scope of the technical solution of the present invention.
Claims
1. A dance movement key point capture method based on transformer fusion openpose, characterized in that: The following steps are involved: Step S1, obtaining dance video frames: using a deep high frame rate video acquisition device to acquire dance action videos in real time in a well-lit environment, and decomposing the dance video frames frame by frame; Step S2, initializing OpenPose: configuring and starting OpenPose, processing dance video frames, and extracting human body key points and hand key points; Step S3, Transformer model integration and parameter optimization: input the key points extracted by OpenPose into the pre-trained Transformer model for prediction and parameter adjustment; The Transformer model adopts a self-attention mechanism, which is expressed as follows: ; In the above formula, , , Respectively represent queries Matrix, Key Matrix and Values matrix; is the dimension of the key vector; Based on the output of Transformer, the convolution layer and learning rate of OpenPose, the number of heads of the attention mechanism, and the rotation angle of the video frame are dynamically adjusted to optimize the key point extraction. The optimization contents include: Step S31: Parameter adjustment and optimization a. Convolutional layer parameter optimization: Input the key point data extracted by OpenPose into the Transformer model, and dynamically adjust the hyperparameters of the OpenPose convolutional layer according to the output of the Transformer model. The specific formula is as follows: ; In the above formula, and Represented as learnable weight and bias parameters respectively; is the convolution kernel size; The key point data include heat map and PAF; b. Loss function adjustment: Based on the output of Transformer, adjust the weight parameters in the OpenPose loss function to optimize the accuracy of key point extraction; For heatmap loss: ; In the above formula, The weights predicted by the Transformer model; is the predicted heat map; is the real heat map; For PAF loss: ; In the above formula, The weights predicted by the Transformer model; is the predicted PAF; is the real PAF; Step S32: Optimization of multi-head attention mechanism The key point data extracted by OpenPose is input into the optimized Transformer model, and the attention weights between different key points are calculated using the multi-head attention mechanism. An adaptive weight adjustment mechanism is introduced, and the calculation formula is as follows: ; ; In the above formula, It is a weight parameter that is dynamically adjusted according to key point data; is the weight matrix of the query vector Q, used to convert the query vector Q into a new query vector; is the weight matrix of the key vector K, used to convert the key vector K into a new key vector; is the weight matrix of the value vector V, which is used to transform the key vector V into a new value vector; Step S33: Optimization of position coding Including dynamic position coding optimization and multi-dimensional position coding optimization; Step S34: Dynamically adjust OpenPose parameter strategy optimization Including optimization of heat map loss function weight adjustment strategy, PAF loss function weight adjustment strategy optimization and convolution layer parameter adjustment optimization; Step S4, key point fuzzy processing: Use a fuzzy algorithm to process the output of the Transformer to reduce noise and prediction errors and output smooth key point data.
2. According to claim 1, a dance movement key point capture method based on transformer fusion openpose is characterized in that: The specific contents of extracting the key points of the human body and the key points of the hand by OpenPose in step S2 are as follows: OpenPose consists of a multi-level convolutional neural network to extract key points of the human body, and its loss function is expressed as: ; In the above formula, is the loss of the keypoint heatmap; It is the loss of the partial affinity field. PAF refers to the partial affinity field, which is a vector field used to describe the association between different body parts. Each vector represents the direction and intensity from one key point to another key point, which is used to determine whether two key points belong to the same limb.
3. According to claim 1, a dance movement key point capture method based on transformer fusion openpose is characterized in that: The dynamic position encoding optimization in step S33 introduces dynamic position encoding DPE into the Transformer model to solve the position sensitivity problem in complex sequence data processing. The specific contents include: S331, Environmental Perception Initialization Phase Assume that the original input sequence is ,in Representative The word embedding environment-aware network at each position preprocesses X and outputs the context vector : ; S332, Dynamic Code Generation Network For each position in the sequence , the dynamic encoding network generates the position index and context vector C To generate dynamic position codes , expressed as: ; In the above formula, is the position index i The basic positional encoding of Traditional static coding of function generation; Represents a vector concatenation operation; represents a multilayer perceptron; parameters Responsible for learning how to use context Adjust the encoding of each position; S333, Fusion Strategy Dynamic Position Encoding With word embedding The enhanced input representation is formed by adding the fusion operation , ; S334, end-to-end training loss function The overall goal of the Transformer model is to minimize the loss function L , so the average value over all samples is used to optimize all parameters including dynamic position encoding: ; In the above formula, Represents the dataset The input-output pairs sampled from It is the Transformer model after the introduction of dynamic position encoding; Contains all learnable parameters; Represents the original input sequence The processed form is the enhanced input representation obtained by the fusion strategy in step S333.
4. The method for capturing key points of dance movements based on transformer fusion and openpose according to claim 1, characterized in that: The multi-dimensional position encoding optimization in step S33 enables the Transformer model to consider the position changes of key points in space and time at the same time by introducing multi-dimensional position encoding of the spatial dimension. The specific contents are as follows: For a two-dimensional structure, the position of each pixel or image block in the image can be encoded using two-dimensional sine and cosine wave functions to encode the horizontal coordinate x and the vertical coordinate y. The original position encoding in the Transformer model is extended to two dimensions, and the definition of each position encoding (x, y) is: ; ; In the above formula, is the dimension of the positional encoding, which is usually the embedding dimension of the Transformer model divided by 2 to ensure that the dimension of the positional encoding matches the embedding dimension of the model; Indicates the current time step number.
5. The method for capturing key points of dance movements based on transformer fusion and openpose according to claim 1, characterized in that: The optimization process of the heat map loss function weight adjustment strategy in step S34 is as follows: Heatmap is the core method of representing the position of key points of the human body in OpenPose, and its loss function weight The dynamic adjustment uses the gradient descent method, according to the current heat map loss Weight To update: ; In the above formula, Represents the learning rate, which controls the update step size and ensures that each iteration can adjust the weight in the direction of reducing the heat map loss; Indicates the current time step number.
6. The method for capturing key points of dance movements based on transformer fusion and openpose according to claim 1, characterized in that: The PAF loss function weight adjustment strategy in step S34 is optimized. PAF is a vector field connecting different key points of the human body, and its loss function weight is The dynamic adjustment strategy is as follows: ; Through monitoring changes, adjust accordingly , the OpenPose model can focus more on learning the correct connection relationship between joints, reduce limb structure mismatch, and improve the continuity and stability of posture estimation.
7. The method for capturing key points of dance movements based on transformer fusion and openpose according to claim 1, characterized in that: The convolution layer parameters in step S34 are adjusted and optimized. Use the global loss function-guided method for adjustment and optimization: ; In the above formula, It is a learning rate specifically set for the convolutional layer parameters.
8. The method for capturing key points of dance movements based on transformer fusion and openpose according to claim 1, characterized in that: The fuzzy algorithm is used to process the output of the Transformer in step S4. The specific process is as follows: In order to reduce noise and prediction errors, a fuzzy algorithm is used to process the output of the Transformer model to generate smooth key point data: ; In the above formula, Indicates the key point data after blurring.
