Three-dimensional human body posture estimation method and system based on machine learning

By adopting two-stage enhanced generative adversarial networks, neural network parameter optimization for fusion phenomena, sparse self-expression layer and reverse reinforcement learning mechanisms in three-dimensional human posture estimation, data detail quality and noise, gradient disappearance, overfitting and future are solved. The problem of information utilization improves the stability of the model and prediction accuracy.

CN119296166APending Publication Date: 2025-01-10HUZHOU UNIVERSITY
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411334899.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2025-01-10

AI Technical Summary

Technical Problem

The existing three-dimensional human posture estimation method has data details quality and noise problems, gradient disappearance or explosion problems, overfitting problems, and failure to make full use of future information optimization prediction strategies, affecting the training efficiency and accuracy of the model. sex.

Method used

Using a three-dimensional human pose estimation method based on machine learning, including data augmentation and feature extraction, neural network parameter optimization based on fusion phenomenon, sparse self-expression layer and reverse reinforcement learning mechanism, the generative adversarial network and neural network fusion phenomenon enhanced by two-stage enhancement Network parameter optimization, sparse self-expression layer, and reverse reinforcement learning mechanisms to improve model performance.

Benefits of technology

It improves data quality and generalization capabilities of the model, avoids gradient disappearance or explosion problems, reduces feature correlation, and significantly improves prediction accuracy and model stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119296166A_ABST
    Figure CN119296166A_ABST
Patent Text Reader

Abstract

The invention discloses a three-dimensional human body posture estimation method and system based on machine learning. The method comprises the following steps: constructing a posture estimation data set; training and optimizing network parameters of the feature extraction model, the feature dimension reduction model and the regression model; and extracting a feature vector of the target image by using the feature extraction model, performing feature dimension reduction by using the feature dimension reduction model, and finally inputting the feature vector after dimension reduction into the regression model to predict the three-dimensional coordinates of each key point of the human body. According to the method, the generative adversarial network based on two-stage enhancement is used for data expansion, so that the generalization ability of the model can be improved; network parameters of the feature extraction model are optimized by adopting a neural network parameter optimization algorithm based on a fusion phenomenon, so that the problem of gradient disappearance or explosion is avoided; a sparse self-expression layer is introduced between an encoder and a decoder, so that the correlation between features is reduced; and the prediction strategy of the regression model is adjusted by adopting a reverse reinforcement learning mechanism, so that the prediction accuracy is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision technology, and in particular relates to a three-dimensional human body posture estimation method and system based on machine learning. Background Art

[0002] In the field of artificial intelligence and computer vision, 3D human pose estimation is an important research direction. However, data collection for 3D human pose estimation often relies on high-cost equipment such as depth cameras or multi-view camera systems. Although these devices can provide rich 3D information, they are limited by the layout and cost of the equipment in practical applications. In addition, most of the existing 3D pose estimation methods are based on traditional machine learning techniques or primary deep learning models, which often show shortcomings when dealing with complex human body dynamics. Moreover, regarding the training and optimization of network models, although deep neural networks perform well in image recognition and feature learning, there are still problems with gradient vanishing or exploding during training, especially in complex network structures or deep networks. These problems not only hinder the efficiency of model training, but also limit the model's ability to generalize on new data.

[0003] The invention patent with application number CN2023117602515 proposes a method for human posture estimation based on the fusion of scale features and hierarchical features, including the following steps: Step 1, use a high-resolution network to perform preliminary feature extraction on the input image to obtain different hierarchical features after multi-scale fusion; Step 2, perform multi-level feature purification and aggregation on the different hierarchical features through the combination module of expectation maximization attention and weighted bidirectional feature pyramid network to obtain output features; Step 3, complete the final fusion of output features through the key point detection head based on the residual structure to obtain the heat map of different key points of the human body; Step 4, decode the coordinates of the heat map of the key points of the human body to obtain the position coordinates of the corresponding joints, and perform human posture estimation. This invention can capture the posture information of the human body more comprehensively from details to the whole, thereby improving the accuracy of human posture estimation in complex situations.

[0004] The invention patent with application number CN2021108119131 proposes a joint learning system for posture estimation and human body parsing based on parameter hard sharing. The system is divided into four parts: multi-scale feature extraction module, joint learning module, human body parsing branch and posture estimation branch. The input image first passes through the multi-scale feature extraction module to obtain image features at different scales, and performs cross-scale feature fusion; then the features of each scale are sent to the joint learning module respectively to obtain the joint features of posture estimation and human body parsing; finally, the joint features of posture estimation and human body parsing are sent to the posture estimation branch and the human body parsing branch respectively to obtain the results of posture estimation and human body parsing. The invention proposes a multi-task joint learning system for posture estimation and human body parsing, and the proposed system performs well in posture estimation and human body parsing tasks.

[0005] The invention patent with application number CN2023115724607 proposes a human posture estimation method based on progressive filtering fusion. First, data is collected through two Azure Kinect DK cameras, and the initial data is determined. Then, data filtering and fusion processing is performed, and the initial data of the two Azure Kinect DK cameras are classified and processed using the Mahalanobis distance. The measurement information of the Azure Kinect DK camera that is greatly affected by visual occlusion is screened and discarded. For the measurement information of an Azure Kinect DK camera that is determined to be less affected by visual occlusion, the measurement information of the Azure Kinect DK camera is guided by the measurement information of another Azure Kinect DK camera to perform progressive filtering fusion, thereby achieving the effect of implicit compensation. Finally, global fusion is performed to further improve the accuracy of human posture estimation. The advantage is that it has both low cost and high precision, and does not require the tester to wear joint point markers, which will not cause inconvenience to the tester.

[0006] Although the above technical solution has certain beneficial effects, there are still the following problems that need to be further solved:

[0007] 1. Traditional data augmentation techniques cannot effectively handle the detail quality and noise issues of generated images, limiting the availability and quality of training data.

[0008] 2. Existing methods such as gradient descent may encounter gradient-related problems in some deep network structures, affecting training efficiency and model stability.

[0009] 3. Traditional autoencoders may encounter overfitting problems when processing highly correlated data features.

[0010] 4. Existing regression models fail to make full use of future information to optimize current prediction strategies when dealing with time series prediction problems. Summary of the invention

[0011] In order to solve the above technical problems, the present invention provides a 3D human posture estimation method and system based on machine learning. The specific technical solutions are as follows:

[0012] A three-dimensional human body posture estimation method based on machine learning comprises the following steps:

[0013] S1, collect human action image data and build a human posture estimation dataset;

[0014] S2. Build a feature extraction model, train and optimize the network parameters of the feature extraction model;

[0015] S3. Build a feature dimensionality reduction model, train and optimize the network parameters of the feature dimensionality reduction model;

[0016] S4. Build a regression model, train and optimize the network parameters of the regression model;

[0017] S5. Use the feature extraction model to extract the feature vector of the target human body image, input the feature vector into the feature dimensionality reduction model for dimensionality reduction, and input the reduced feature vector into the regression model to predict the three-dimensional coordinates of each key point of the human body.

[0018] Furthermore, in step S1, a two-stage enhanced generative adversarial network is used to perform data enhancement and expansion on the collected image data; the two-stage enhanced generative adversarial network is: on the basis of a traditional generative adversarial network, an enhancement network is added between the output of the generator and the input of the discriminator, and the enhancement network is used to perform detail enhancement and noise suppression on the output of the generator to improve the quality of image generation.

[0019] Furthermore, the training steps of the two-stage enhanced generative adversarial network include:

[0020] S101, initialize the network parameters of the generator and the discriminator;

[0021] S102, pre-training the discriminator using the collected real image data;

[0022] S103, the generator generates an image according to the current network parameters, and then performs the second stage enhancement processing through the enhancement network to generate the final image data and minimize the following generator loss function:

[0023]

[0024] Among them, m is the number of samples generated, z j is a random noise vector, G(z j ) is the generator according to z jGenerated data;

[0025] Then the losses of the generator and discriminator are calculated, and the network parameters of the generator and discriminator are adjusted and updated according to the loss results, which are expressed as:

[0026]

[0027] Among them, θ g and θ d are the network parameters of the generator and the discriminator, α b are the learning rates of the generator and the discriminator, is the gradient of the generator loss with respect to its parameters, is the gradient of the discriminator loss with respect to its parameters;

[0028] S104, after each training iteration cycle, the parameters of the enhanced network are adjusted according to the feedback of the discriminator, and the parameters θ of the enhanced network are e and its update is expressed as:

[0029]

[0030] in, To enhance network loss E The gradient of its parameters, K is the data dimension, E k is the output of the enhanced network for the k-th dimension feature, x jk is the real sample x j The k-th dimension feature of

[0031] S105, repeat the above steps until a preset stop iteration condition is met.

[0032] Furthermore, in step S2, the feature extraction model includes an input layer, a first hidden layer, a second hidden layer and an output layer connected in sequence, wherein the output layer is only used for category supervision in the training stage, and the output of the second hidden layer is the extracted feature vector; the feature extraction model adopts a neural network parameter optimization method based on the fusion phenomenon, including the steps of:

[0033] S201, initialize the network parameters of the feature extraction model and define the energy state function E(w,b):

[0034]

[0035] Among them, x i Represents input data, y i is the corresponding target output, N is the number of samples in the data set, K is the number of feature scales, w is the network weight, and b is the network bias; a k(t) is the adaptive weight of the kth scale;

[0036] S202, for each pair of parameters w j and b k Evaluate whether the system energy can be reduced through fusion:

[0037] ΔE=E(w′ j ,b′ k )-E(w j ,b k ),

[0038] And, the fusion behavior of the parameters is expressed as:

[0039] w′ j =w j +δ tr

[0040] b′ k =b k +ε tr ,

[0041] Among them, w′ j and b′ k are the updated network parameters respectively. If ΔE<Θ(t), the new parameter w′ is accepted. j and b′ k , otherwise keep the original parameters unchanged; Θ(t) is the energy threshold of the current iteration; weight adjustment δ tr and the offset adjustment ε tr They are:

[0042]

[0043] in, and are the gradients of the current energy with respect to weight and bias, σ to and η to is the sensitivity and scaling factor of fusion adjustment; the energy function E is expressed as:

[0044]

[0045] In the formula, σ std Represents the standard deviation of the output data, logp(y i |x i ; w, b) means that given the input x i and parameters w, b, output y i probability;

[0046] S203, detect whether the energy of the network parameters reaches a dynamic equilibrium state, if it reaches equilibrium, continue the optimization process, otherwise, perform parameter re-fusion processing, and the equilibrium judgment condition is: Var(E)<ε mr , Var(E) is the variance of energy E, ε mr is the preset threshold;

[0047] S204: Determine whether to update the current parameter configuration according to the energy optimization principle:

[0048]

[0049] Among them, β rate is the updated learning rate; μ ea is the momentum coefficient, Δw prev and Δb prev are the weight and bias updates of the previous iteration respectively; is the fusion adjustment factor, and:

[0050]

[0051] In the formula, is the difference between the current weight and the weight of the previous iteration, is the standard deviation of the weight change of the current layer, E1 is the error rate of the current layer, tanh is the hyperbolic tangent function; ρ yt and λ yt are adjustment coefficients, which are used to control the influence intensity of weight change rate and error rate respectively;

[0052] S205, after multiple consecutive iterations, determine whether the model training has converged. If it has converged, the final optimized parameters are used as the network parameters of the feature extraction model. Otherwise, continue to iterate. The judgment condition for model convergence is: E old and E new are the energies before and after parameter update, γ ew is the convergence threshold.

[0053] Further, in step S201, a k (t) Dynamically update at each iteration, the update method is:

[0054]

[0055] Among them, E k (t) is the loss value of the kth scale at time t, β k is the importance adjustment coefficient of the kth scale, and e is the base of the natural logarithm.

[0056] Furthermore, in step S202, Θ(t) is updated at each iteration, by monitoring the energy changes during the training process in real time and dynamically adjusting the energy threshold accordingly to control the sensitivity and frequency of parameter updates:

[0057]

[0058] Among them, Θ(t) and Θ(t+1) are the energy thresholds of the current and next iterations, respectively, and v eo is the learning rate of threshold adjustment, which is used to control the speed of adjustment; E(t) is the current average energy, E target is the target energy set according to the task requirements, σ E is the standard deviation of the energy variation, and tanh is the hyperbolic tangent function.

[0059] Furthermore, in step S3, the feature dimensionality reduction model includes an encoder and a decoder, and a sparse self-expression layer arranged between the encoder and the decoder; the encoder is responsible for converting high-dimensional input features into low-dimensional hidden representations, and the decoder attempts to restore the original high-dimensional data from the low hidden dimensional representations, and the sparse self-expression layer is used to encourage the model to learn to represent data with only a few activation units to improve the robustness of the features.

[0060] Furthermore, the training of the feature dimensionality reduction model includes the following steps:

[0061] S301, randomly initialize the weights and bias functions of the encoder and decoder;

[0062] S302, the input feature vector x is converted into a low-dimensional hidden representation h through the encoder: h = Sig (W pe x+b pe ); further, the decoding process attempts to reconstruct the input: Among them, W pe and b pe are the weight and bias of the encoder, W pd and b pd are the weight and bias of the decoder respectively, Sig(·) is the Sigmoid activation function, is the reconstructed input after decoding;

[0063] S303, calculate the reconstruction error L:

[0064] S304, using L1 regularization technology to constrain the weight of the sparse self-expression layer, applying decoupling technology to adjust h, and adding regularization terms in the loss function to achieve: Among them, λp is the decoupling regularization strength;

[0065] S305, calculating the gradient of each layer parameter by back propagation algorithm according to the reconstruction error, and updating the parameters of the encoder and decoder to minimize the reconstruction error;

[0066] S306: Repeat the above steps until a preset stop iteration condition is met.

[0067] Furthermore, in step S4, the regression model adopts a long short-term memory network model and an inverse reinforcement learning mechanism to adjust the prediction strategy by maximizing the expected future reward to optimize the prediction accuracy of the model; the training of the regression model includes:

[0068] S401, initializing the weight and bias function of the long short-term memory network model;

[0069] S402, formatting the feature vector output by the feature dimensionality reduction model into an input sequence required by the long short-term memory network;

[0070] S403, inputting the input sequence into the long short-term memory network in batches for training;

[0071] S404, adopt the inverse reinforcement learning strategy in the output layer of the long short-term memory network, adjust the network parameters according to the difference between the predicted posture and the actual posture to maximize the future expected reward R q , the reward R at time t qt It is expressed as:

[0072]

[0073] Where Y q is the discount factor for future rewards; r is the reward function used to measure the prediction y qk With the true value The degree of match between them is:

[0074] S405, calculate the loss function and perform back propagation to update the network parameters, the loss function L q Use mean error to enhance learning adjustment, which is specifically expressed as:

[0075]

[0076] In the formula, a q It is a reinforcement learning adjustment hyperparameter, which is used to adjust the weight of the inverse reinforcement learning effect; the inverse reinforcement learning adjustment term a q R qt Representing the expected future reward R qt The linear combination of is expressed as:

[0077] S406: Repeat the above steps until a preset stop iteration condition is met.

[0078] A 3D human posture estimation system based on the above method includes the following modules:

[0079] The data augmentation module is used to automatically generate relevant image data based on the collected real image data to expand the human action image data to build a data set;

[0080] A feature extraction module is used to construct and train a feature extraction model, wherein the feature extraction model is used to extract features of input data and output a feature vector;

[0081] A feature dimension reduction module is used to construct and train a feature dimension reduction model, wherein the feature dimension reduction model is used to reduce the dimension of an input feature vector and output the feature vector after dimension reduction;

[0082] A regression prediction module is used to construct and train a regression model, wherein the regression model is used to output predicted coordinates of key points of a human body according to an input feature vector;

[0083] The input-output module is used to input the image data to be predicted and output the prediction results.

[0084] Compared with the prior art, the present invention has at least the following beneficial effects:

[0085] 1. The present invention adopts a generative adversarial network algorithm based on two-stage enhancement for data expansion. The generated data is of higher quality, richer details, and less noise, which helps to improve the generalization ability of the model.

[0086] 2. The present invention adopts a neural network parameter optimization algorithm based on the fusion phenomenon, which does not rely on gradient information, avoids the problem of gradient disappearance or explosion, and improves the training stability and model performance.

[0087] 3. The present invention introduces a sparse self-expression layer between the encoder and the decoder to reduce the correlation between features.

[0088] 4. The present invention adopts the inverse reinforcement learning mechanism to adjust the prediction strategy of the long short-term memory neural network model, which significantly improves the accuracy of the prediction by maximizing the expected future rewards. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.

[0090] Figure 1It is a schematic flow chart of a method for estimating a human body posture provided by an embodiment of the present invention;

[0091] Figure 2 It is a flowchart of a neural network parameter optimization algorithm provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0092] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, other embodiments obtained by ordinary technicians in this field without making creative work are all within the scope of protection of the present invention.

[0093] This embodiment provides a 3D human body posture estimation method based on machine learning. Figure 1 As shown, it mainly includes the following steps:

[0094] S1. Data collection and annotation

[0095] The data for three-dimensional human posture estimation in this embodiment comes from a multi-angle camera system, which can capture human movements from different angles and generate three-dimensional image data. The data is stored in a three-dimensional matrix, in which the matrix elements represent the depth information of the corresponding pixel points and the RGB color coding information.

[0096] Assuming that a certain image data represents the posture of a person walking, the corresponding data annotation includes the coordinate position of the head, the coordinate position of the shoulder, the coordinate position of the wrist, the coordinate position of the knee, and the coordinate position of the ankle. The data annotation is manually annotated, and the specific data annotation content may include but is not limited to key points such as the head, shoulders, wrists, knees, and ankles.

[0097] S2. Data enhancement and expansion

[0098] It is understandable that in the task of human posture estimation, the collection, acquisition, labeling and preprocessing of training data are time-consuming and laborious, and insufficient training samples can easily lead to poor generalization ability of the model and affect the accuracy of the model. This embodiment adopts a generative adversarial network algorithm based on two-stage enhancement to enhance and expand the image data collected in step S1, and the generated data is of higher quality, richer details and less noise, which helps to improve the generalization ability of the model.

[0099] The traditional generative adversarial network consists of two parts: a generator and a discriminator. The generator is responsible for generating visually credible human posture images, while the discriminator is used to determine whether the input image is a real image or generated by the generator. This embodiment provides a generative adversarial network based on two-stage enhancement, in which an enhancement network is added between the output of the generator and the input of the discriminator. The enhancement network further enhances the details and suppresses noise of the output of the generator, so that the final generated image is richer in details.

[0100] Specifically, the training process of the generative adversarial network based on the two-stage enhancement is as follows:

[0101] S201, initialize the network parameters of the generator and the discriminator, set the parameters of the generator and the discriminator to random initial values, and define the initial parameters of the adaptive loss function and its update rule as: Among them, λ b1 is the weight of the loss function, γ b is the learning rate, is the loss value of the discriminator in the tth round of training. Learning rate γ b As the iterative training rounds are dynamically adjusted, it can be expressed as: Among them, γ bo is the initial learning rate, K b is the decay constant used to control the decay speed of the learning rate, and e is the base of the natural logarithm. In this embodiment, the initial learning rate γ bo Set it to 0.05 and set the decay constant K b Set to 0.01.

[0102] S202, pre-train the discriminator using the real data collected in step S1 to achieve a basic discrimination capability and minimize the following discriminator loss function:

[0103]

[0104] Among them, x i represents the i-th data sample, n is the number of samples, D(x i ) represents the probability that the discriminator outputs the i-th data sample as the real data.

[0105] S203, the generator generates an image according to the current network parameters, and then performs the second stage enhancement processing through the enhancement network to generate the final image data and minimize the following generator loss function:

[0106]

[0107] Among them, m is the number of samples generated, z jis a random noise vector, G(z j ) is the generator according to z j Generated data.

[0108] Then, the losses of the generator and discriminator are calculated according to the adaptive loss function, and the weights of both parties are adjusted according to the loss results to update the network parameters of the generator and discriminator, which can be expressed as:

[0109]

[0110] Among them, θ g and θ d are the network parameters of the generator and the discriminator, α b are the learning rates of the generator and the discriminator, is the gradient of the generator loss with respect to its parameters, is the gradient of the discriminator loss with respect to its parameters. In this embodiment, α b is set to 0.002.

[0111] S204, after each training cycle, adjust the parameters of the enhancement network according to the feedback of the discriminator to improve the quality and effect of image enhancement. e and its update can be expressed as:

[0112]

[0113] in, To enhance network loss E Regarding the gradient of its parameters, E(·) is the output of the enhanced network (i.e., the enhanced result), and ||·||2 represents the Euclidean distance. ||E(G(z j ))-x j ||2 2 It can be converted into the following calculation form: Among them, K is the data dimension, E k is the output of the enhanced network for the k-th dimension feature, x jk is the real sample x j The k-th dimension feature of .

[0114] S205, repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed. In some embodiments, the preset stop iteration condition is to reach a certain number of iterations, such as 1000 times.

[0115] S3. Feature extraction and model training

[0116] The expanded training data set is used for feature extraction and model training. This embodiment uses a three-layer fully connected neural network for feature extraction. In existing neural network models, especially deep networks, there are often problems of gradient vanishing, gradient explosion or falling into local optimal solutions during training, which affects the stability of training and model performance. To this end, inspired by the fusion phenomenon in nature (lighter atomic nuclei merge under high temperature and high pressure to form more stable heavy atomic nuclei, while releasing huge energy), this embodiment uses a neural network parameter optimization algorithm based on the fusion phenomenon, which optimizes the weights and biases of the network by simulating the fusion process, and regards the weights and biases of the network as atomic nuclei, and its merging and transformation process is designed to achieve the optimal state of the loss function. Unlike the traditional optimization algorithm based on gradient descent, the neural network parameter optimization algorithm based on the fusion phenomenon does not rely on gradient information, thereby avoiding the problem of gradient vanishing or gradient explosion.

[0117] Specifically, Figure 2 As shown in the figure, the neural network parameter optimization process based on the fusion phenomenon mainly includes:

[0118] S301. First, define the structure of the neural network. The three-layer fully connected neural network used includes an input layer and two hidden layers, and a layer of output layer is preset for category supervision training. The specific settings are as follows:

[0119] Input layer: has d neurons, corresponding to the d elements in the input vector;

[0120] Hidden layer: Both hidden layers have 128 neurons and use ReLU activation function;

[0121] Output layer: The output layer uses the softmax activation function.

[0122] Then the neural network parameters are initialized and given a random energy state. Specifically, the weights w and biases b of the neural network are given initial values, and the energy state function E(w,b) is defined to describe the potential optimization ability of the parameters:

[0123]

[0124] Among them, x i Represents input data, y i is the corresponding target output, N is the number of samples in the dataset, and K is the number of feature scales; a k (t) is the adaptive weight of the kth scale, which depends on the training time t and the current performance state of the network, ensuring that the focus of the loss function is adjusted at different stages of training.

[0125] Furthermore, a k(t) is dynamically updated at each iteration, which allows focusing on different feature levels at different training stages, thereby more effectively learning the multi-level structure of complex data. Specifically, the weight a of each scale k The update of (t) depends on the effect of the current training state. The update method of adaptive weights can be expressed as:

[0126]

[0127] Among them, E k (t) is the loss value of the kth scale at time t, β k It is the importance adjustment coefficient of the kth scale, which can be preset artificially according to the characteristics of the scale.

[0128] It should be noted that the output layer is only used to supervise the energy state during training, and the output of the feature extraction model is the output of the second hidden layer of the neural network, that is, the feature vector after feature extraction.

[0129] S302, perform nuclear synthesis cycle operation, perform fusion candidate check on each pair of parameters (weight and bias), if the synthesis of two parameters can reduce the overall system energy, then allow fusion (update), otherwise keep independent (unchanged). Specifically, for each pair of parameters w j and b k An assessment is made to determine whether the total energy of the system can be reduced through fusion, which can be expressed as:

[0130] ΔE=E(w′ j ,b′ k )-E(w j ,b k ),

[0131] And, the fusion behavior of the parameters can be expressed as:

[0132]

[0133] Among them, w′ j and b′ k are the updated neural network parameters respectively. If ΔE<Θ(t), the new parameter w′ is accepted. j and b′ k , otherwise the original parameters remain unchanged. Θ(t) is the energy threshold of the current iteration. Θ(t) is updated at each iteration. The energy changes during the training process are monitored in real time, and the energy threshold is dynamically adjusted accordingly to control the sensitivity and frequency of parameter updates. Specifically,

[0134]

[0135] Among them, Θ(t) and Θ(t+1) are the energy thresholds of the current and next iterations, respectively, and v eo is the learning rate of threshold adjustment, which is used to control the speed of adjustment; E(t) is the current average energy, E target is the target energy that can be set according to the task requirements, σ E is the standard deviation of energy change, and tanh is the hyperbolic tangent function. In this embodiment, v eo Set to 0.01 and set E target Set to 0.1.

[0136] Furthermore, the weight adjustment amount δ tr and the offset adjustment ε tr They are:

[0137]

[0138] in, and are the gradients of the current energy with respect to weight and bias respectively; σ to and η to are the sensitivity and scaling factor of the fusion adjustment, which are set to 0.1 and 0.3 respectively in this embodiment.

[0139] S303, perform energy evaluation on the new parameter set after fusion, update the parameter state, and push the parameter group in the high energy state to the low energy state to achieve the stability of the system state. Specifically, re-evaluate the parameter set after fusion through the energy function E to ensure the minimum energy. The energy function E can be expressed as:

[0140]

[0141] In the formula, σ std Represents the standard deviation of the output data, logp(y i |x i ; w, b) means that given the input x i and parameters w, b, output y i probability.

[0142] S304. Adjust the nuclear reaction temperature according to the current network performance and stability, simulate the temperature control in physical fusion, and adjust the fusion temperature T, which can be expressed as:

[0143] Among them, T new and T old are the temperatures before and after adjustment, △E is the energy change; a te is the temperature adjustment factor, a te Dynamic adjustment based on energy changes, the calculation method is: Here, K te is a preset adjustment coefficient, |△E| is the absolute energy change, E avg is the average value of all current parameter energies.

[0144] S305: Check whether the energy of the network parameters has reached a dynamic equilibrium state. If it has reached equilibrium, continue the optimization process. Otherwise, perform parameter re-fusion processing. The equilibrium judgment condition is: Var(E)<ε mr , Var(E) is the variance of energy E, ε mr Set to 10 -5 .

[0145] S306: Determine whether to update the current parameter configuration according to the energy optimization principle, which can be expressed as:

[0146]

[0147] Among them, β rate To update the learning rate, set it to 0.01; μ ea is the momentum coefficient, Δw prev and Δb prev are the weight and bias updates of the previous iteration respectively; The fusion adjustment factor is dynamically set according to the historical changes of the weights and the error rate of the current layer, which can be expressed as:

[0148]

[0149] In the formula, is the difference between the current weight and the weight of the previous iteration, is the standard deviation of the weight change of the current layer, E1 is the error rate of the current layer, tanh is the hyperbolic tangent function; ρ yt and λ yt are adjustment coefficients, which are used to control the influence intensity of the weight change rate and the error rate, and are set to 0.3 and 0.5 respectively in this embodiment.

[0150] S307, judging whether the model training has converged by the change amplitude of the parameter energy after multiple consecutive iterations, if converged, outputting the final optimized parameters, otherwise continuing iteration. The specific method of convergence judgment can be expressed as: E old and E new are the energies before and after parameter update, γ ew is the convergence threshold, which is set to 10 in this example. -6 .

[0151] S4. Feature dimensionality reduction model training

[0152] The feature vector output by the feature extraction model is input into the feature dimensionality reduction model for feature dimensionality reduction. The feature dimensionality reduction model adopted in this embodiment is based on the autoencoder algorithm. The traditional autoencoder algorithm is divided into two parts: the encoder and the decoder. The encoder is responsible for converting the high-dimensional input features into low-dimensional hidden layer representations, and the decoder attempts to restore the original high-dimensional data from this low-dimensional representation. Based on the traditional autoencoder, this embodiment adds a sparse self-expression layer between the encoder and the decoder. This layer encourages the model to learn to represent data with only a few activation units, which helps to extract more robust features and prevent overfitting.

[0153] Specifically, the training process of the feature dimensionality reduction model is as follows:

[0154] S401, randomly initialize the weights and bias functions of the encoder and decoder, assuming that the encoder and decoder are represented by the weight matrix W p and the bias vector b p Indicates that the initialization process can be expressed as:

[0155]

[0156] Among them, W p (0) is the initial weight matrix, with a mean of 0 and a variance of σ 2 Normal distribution of p (0) is the initial bias vector, initialized to 0.

[0157] S402: The input feature vector x is converted into a low-dimensional hidden representation h through the encoder, that is, h = Sig(W pe x+b pe ); further, the decoding process attempts to reconstruct the input, namely: Among them, W pe and b pe are the weight and bias of the encoder, W pd and b pd are the weight and bias of the decoder respectively, Sig(·) is the Sigmoid activation function, is the reconstructed input after decoding.

[0158] S403, the low-dimensional hidden representation attempts to reconstruct the original input data through the decoder, and calculates the reconstruction error L, that is, the difference between the input data and the reconstructed data, which can be expressed as:

[0159] Furthermore, this embodiment sets a sparse self-expressive layer between the encoder and the decoder, and adjusts the representation of the encoded features in each iteration to reduce the correlation between the features. Specifically, the weight of the self-expressive layer is constrained by L1 regularization technology, and h is adjusted by applying decoupling technology, which is achieved by adding a regularization term in the loss function, which can be expressed as: Among them, λ p is the decoupling regularization strength, which is set to 0.3 in this embodiment.

[0160] S404: Calculate the gradient of each layer parameter through the back propagation algorithm according to the reconstruction error, and update the parameters of the encoder and decoder to minimize the reconstruction error. decoupled The gradient calculation methods for encoder and decoder parameters can be expressed as:

[0161]

[0162] Where the superscript T represents transposition, and Sig′(·) is the derivative of the Sigmoid activation function.

[0163] S405, repeat the above steps until the preset stop iteration condition is met, which means the model training is completed. The stop iteration condition may be reaching a preset maximum number of iterations, such as 1000 times.

[0164] S5. Regression model training

[0165] The reduced-dimensional data features are input into the regression model to train the regression model. This embodiment uses a long short-term memory network regression model based on inverse reinforcement learning to process and predict three-dimensional human posture. On the basis of the traditional long short-term memory network regression model, this embodiment uses an inverse reinforcement learning mechanism, that is, by maximizing the expected future rewards to adjust the prediction strategy and optimize the prediction accuracy of the model.

[0166] Specifically, the training process of the regression model is as follows:

[0167] S501, initialize the weight and bias function of the long short-term memory network model, set W ql and b ql Respectively represent the weights and biases of the long short-term memory network model. The initialization process can be expressed as:

[0168]

[0169] Among them, W ql (0) is the initial weight matrix, with a mean of 0 and a variance of σ q 2 Normal distribution of ql(0) is the initial bias vector, initialized to 0.

[0170] S502: The three-dimensional feature vector x q Formatted as the input sequence X required by the long short-term memory network qseq , which can be expressed as: X qseq =[x q1 ,x q2 ,…,x qt ].

[0171] S503, input the data into the long short-term memory network in batches, each batch contains a certain number of sequences, each sequence corresponds to a complete posture action cycle, and the long short-term memory network forward propagation processes the time series data through the following recursive formula:

[0172]

[0173] In the formula, h qt is the hidden state at time t, U q is the weight matrix input to the hidden state, W qy is the weight matrix from hidden state to output, b qy is the output bias, f and g are the activation functions of the hidden layer and the output layer respectively.

[0174] S504, adopt the inverse reinforcement learning strategy in the output layer, adjust the network parameters according to the difference between the predicted posture and the actual posture to maximize the future expected reward R q , then the reward R at time t qt It can be expressed as:

[0175]

[0176] Where Y q is the discount factor for future rewards, which is set to 0.7 in this embodiment; r is the reward function used to measure the prediction y qk With the true value The specific expression of the reward function is:

[0177] S505, calculate the loss function and perform back propagation to update the network parameters, the loss function L q Use mean error to enhance learning adjustment, which is specifically expressed as:

[0178]

[0179] In the formula, a qis a reinforcement learning adjustment hyperparameter used to adjust the weight of the inverse reinforcement learning effect. In this embodiment, it is set to 0.3. q R qt Representing the expected future reward R qt The linear combination of can be expressed as:

[0180] S506: Repeat the above steps until the preset stop iteration condition is met, which means that the model training is completed.

[0181] S6. 3D Human Pose Estimation

[0182] The newly collected data samples are processed using the trained model to achieve the estimation of 3D human posture. That is, first, the newly collected data is passed through the feature extraction model to extract the feature vector containing key information; then, the extracted feature vector is subsequently input into the data dimensionality reduction model to reduce the computing resources and time required for processing; then, the reduced feature vector is sent to the trained regression model, and the long short-term memory network is used to predict the 3D coordinates of each key point of the human body based on the input feature vector.

[0183] Based on the above method, this embodiment also provides a 3D human posture estimation system, which mainly includes:

[0184] The data augmentation module is used to automatically generate relevant image data based on the collected real image data to expand the human action image data to build a data set;

[0185] A feature extraction module is used to construct and train a feature extraction model, wherein the feature extraction model is used to extract features of input data and output a feature vector;

[0186] A feature dimension reduction module is used to construct and train a feature dimension reduction model, wherein the feature dimension reduction model is used to reduce the dimension of an input feature vector and output the feature vector after dimension reduction;

[0187] A regression prediction module is used to construct and train a regression model, wherein the regression model is used to output predicted coordinates of key points of a human body according to an input feature vector;

[0188] The input-output module is used to input the image data to be predicted and output the prediction results.

[0189] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them. Under the concept of the present invention, the technical features in the above embodiments or different embodiments may also be combined, the steps may be implemented in any order, and there are many other changes in different aspects of the present invention as described above, which are not provided in detail for the sake of simplicity. Although the present invention has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A three-dimensional human posture estimation method based on machine learning, characterized in that: The following steps are involved: S1, collect human action image data and build a human posture estimation dataset; S2. Build a feature extraction model, train and optimize the network parameters of the feature extraction model; S3. Build a feature dimensionality reduction model, train and optimize the network parameters of the feature dimensionality reduction model; S4. Build a regression model, train and optimize the network parameters of the regression model; S5. Use the feature extraction model to extract the feature vector of the target human body image, input the feature vector into the feature dimensionality reduction model for dimensionality reduction, and input the reduced feature vector into the regression model to predict the three-dimensional coordinates of each key point of the human body.

2. The three-dimensional human body posture estimation method according to claim 1, characterized in that: In step S1, a two-stage enhanced generative adversarial network is used to perform data enhancement and expansion on the collected image data; the two-stage enhanced generative adversarial network is: on the basis of a traditional generative adversarial network, an enhancement network is added between the output of the generator and the input of the discriminator, and the enhancement network is used to perform detail enhancement and noise suppression on the output of the generator to improve the quality of image generation.

3. The three-dimensional human body posture estimation method according to claim 2, characterized in that: The training steps of the two-stage enhanced generative adversarial network include: S101, initialize the network parameters of the generator and the discriminator; S102, pre-training the discriminator using the collected real image data; S103, the generator generates an image according to the current network parameters, and then performs the second stage enhancement processing through the enhancement network to generate the final image data and minimize the following generator loss function: Among them, m is the number of samples generated, z j is a random noise vector, G(z j ) is the generator according to z j Generated data; Then the losses of the generator and discriminator are calculated, and the network parameters of the generator and discriminator are adjusted and updated according to the loss results, which are expressed as: Among them, θ g and θ d are the network parameters of the generator and the discriminator, α b are the learning rates of the generator and the discriminator, is the gradient of the generator loss with respect to its parameters, is the gradient of the discriminator loss with respect to its parameters; S104, after each training iteration cycle, the parameters of the enhanced network are adjusted according to the feedback of the discriminator, and the parameters θ of the enhanced network are e and its update is expressed as: in, To enhance network loss E The gradient of its parameters, K is the data dimension, E k is the output of the enhanced network for the k-th dimension feature, x jk is the real sample x j The k-th dimension feature of S105, repeat the above steps until a preset stop iteration condition is met.

4. The three-dimensional human body posture estimation method according to claim 1, characterized in that: In step S2, the feature extraction model includes an input layer, a first hidden layer, a second hidden layer and an output layer connected in sequence, wherein the output layer is only used for category supervision in the training stage, and the output of the second hidden layer is the extracted feature vector; the feature extraction model adopts a neural network parameter optimization method based on the fusion phenomenon, including the steps of: S201, initialize the network parameters of the feature extraction model and define the energy state function E(w,b): Among them, x i Represents the input data, y i is the corresponding target output, N is the number of samples in the data set, K is the number of feature scales, w is the network weight, and b is the network bias; a k (t) is the adaptive weight of the kth scale; S202, for each pair of parameters w j and b k Evaluate whether the system energy can be reduced through fusion: ΔE=E(w′ j ,b k ′)-E(w j ,b k ), And, the fusion behavior of the parameters is expressed as: w′ j =w j +δ tr b k ′=b k +e tr Among them, w′ j and b k ′ are the updated network parameters respectively. If ΔE<Θ(t), the new parameter w′ is accepted. j and b k ′, otherwise keep the original parameters unchanged; Θ(t) is the energy threshold of the current iteration; weight adjustment δ tr and the offset adjustment ε tr They are: in, and are the gradients of the current energy with respect to weight and bias, σ to and η to is the sensitivity and scaling factor of fusion adjustment; the energy function E is expressed as: In the formula, σ std Represents the standard deviation of the output data, logp(y i |x i ; w, b) means that given the input x i and parameters w, b, output y i The probability of S203, detect whether the energy of the network parameters reaches a dynamic equilibrium state, if it reaches equilibrium, continue the optimization process, otherwise, perform parameter re-fusion processing, and the equilibrium judgment condition is: Var(E)<ε mr , Var(E) is the variance of energy E, ε mr is the preset threshold; S204: Determine whether to update the current parameter configuration according to the energy optimization principle: b new =b k ′+β rate Δb, Among them, β rate is the updated learning rate; μ ea is the momentum coefficient, Δw prev and Δb prev are the weight and bias updates of the previous iteration respectively; is the fusion adjustment factor, and: In the formula, is the difference between the current weight and the weight of the previous iteration, is the standard deviation of the weight change of the current layer, E1 is the error rate of the current layer, tanh is the hyperbolic tangent function; ρ yt and λ yt are adjustment coefficients, which are used to control the influence intensity of weight change rate and error rate respectively; S205, after multiple consecutive iterations, determine whether the model training has converged. If it has converged, the final optimized parameters are used as the network parameters of the feature extraction model. Otherwise, continue to iterate. The judgment condition for model convergence is: E old and E new are the energies before and after parameter update, γ ew is the convergence threshold.

5. The three-dimensional human body posture estimation method according to claim 4, characterized in that: In step S201, a k (t) Dynamically update at each iteration, the update method is: Among them, E k (t) is the loss value of the kth scale at time t, β k is the importance adjustment coefficient of the kth scale, and e is the base of the natural logarithm.

6. The three-dimensional human body posture estimation method according to claim 4, characterized in that: In step S202, Θ(t) is updated at each iteration by monitoring the energy changes during the training process in real time and dynamically adjusting the energy threshold to control the sensitivity and frequency of parameter updates: Among them, Θ(t) and Θ(t+1) are the energy thresholds of the current and next iterations, respectively, and v eo is the learning rate of threshold adjustment, which is used to control the speed of adjustment; E(t) is the current average energy, E target is the target energy set according to the task requirements, σ E is the standard deviation of the energy variation, and tanh is the hyperbolic tangent function.

7. The three-dimensional human body posture estimation method according to claim 1, characterized in that: In step S3, the feature dimensionality reduction model includes an encoder and a decoder, and a sparse self-expression layer arranged between the encoder and the decoder; the encoder is responsible for converting high-dimensional input features into low-dimensional hidden representations, and the decoder attempts to restore the original high-dimensional data from the low hidden dimensional representations. The sparse self-expression layer is used to encourage the model to learn to represent data with only a few activation units to improve the robustness of the features.

8. The three-dimensional human body posture estimation method according to claim 7, characterized in that: The training of the feature dimensionality reduction model includes the following steps: S301, randomly initialize the weights and bias functions of the encoder and decoder; S302, the input feature vector x is converted into a low-dimensional hidden representation h through the encoder: h = Sig (W pe x+b pe ); further, the decoding process attempts to reconstruct the input: Among them, W pe and b pe are the weight and bias of the encoder, W pd and b pd are the weight and bias of the decoder respectively, Sig(·) is the Sigmoid activation function, is the reconstructed input after decoding; S303, calculate the reconstruction error L: S304, using L1 regularization technology to constrain the weight of the sparse self-expression layer, applying decoupling technology to adjust h, and adding regularization terms in the loss function to achieve: Among them, λ p is the decoupling regularization strength; S305, calculating the gradient of each layer parameter by back propagation algorithm according to the reconstruction error, and updating the parameters of the encoder and decoder to minimize the reconstruction error; S306: Repeat the above steps until a preset stop iteration condition is met.

9. The three-dimensional human body posture estimation method according to claim 1, characterized in that: In step S4, the regression model adopts a long short-term memory network model and an inverse reinforcement learning mechanism to adjust the prediction strategy by maximizing expected future rewards to optimize the prediction accuracy of the model; The training of the regression model includes: S401, initializing the weight and bias function of the long short-term memory network model; S402, formatting the feature vector output by the feature dimensionality reduction model into an input sequence required by the long short-term memory network; S403, inputting the input sequence into the long short-term memory network in batches for training; S404, adopt the inverse reinforcement learning strategy in the output layer of the long short-term memory network, adjust the network parameters according to the difference between the predicted posture and the actual posture to maximize the future expected reward R q , the reward R at time t qt It is expressed as: Where Y q is the discount factor for future rewards; r is the reward function used to measure the prediction y qk With the true value The degree of match between them is: S405, calculate the loss function and perform back propagation to update the network parameters, the loss function L q Use mean error to enhance learning adjustment, which is specifically expressed as: In the formula, a q It is a reinforcement learning adjustment hyperparameter, which is used to adjust the weight of the inverse reinforcement learning effect; the inverse reinforcement learning adjustment term a q R qt Representing the expected future reward R qt The linear combination of is expressed as: S406: Repeat the above steps until a preset stop iteration condition is met.

10. A 3D human body posture estimation system based on the method according to any one of claims 2 to 9, characterized in that: Includes the following modules: The data augmentation module is used to automatically generate relevant image data based on the collected real image data to expand the human action image data to build a data set; A feature extraction module is used to construct and train a feature extraction model, wherein the feature extraction model is used to extract features of input data and output a feature vector; A feature dimension reduction module is used to construct and train a feature dimension reduction model, wherein the feature dimension reduction model is used to reduce the dimension of an input feature vector and output the feature vector after dimension reduction; A regression prediction module is used to construct and train a regression model, wherein the regression model is used to output predicted coordinates of key points of a human body according to an input feature vector; The input-output module is used to input the image data to be predicted and output the prediction results.

Citation Information

Cited By

  • Method and system for optimizing high-dimensional parameters of klystron

    CN120850801A

  • Method and system for optimizing high-dimensional parameters of a klystron

    CN120850801B

  • Pesticide production control system and method

    CN120909389A