A human pose estimation method based on heatmap gradient constraints
By introducing a heatmap gradient constrained loss function to train the human pose estimation network, the problem of decreased accuracy in predicted coordinates is solved, and the overall accuracy of human pose estimation is improved, especially in difficult samples such as occlusion.
Patent Information
- Application Number
- CN202211443859.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-11-18
AI Technical Summary
Existing heatmap regression-based methods have the problem of decreased accuracy of predicted coordinates when the loss function decreases during training. In particular, the confidence of the predicted heatmap is low on difficult samples such as occlusion, resulting in inaccurate final predicted coordinates.
A heatmap gradient constraint loss function is introduced. By generating target heatmap gradient maps and predicted heatmap gradient maps, a mean square error loss function is established. Combined with the Adam method, the human pose estimation network is trained, focusing on the maximum point and relative shape of the predicted heatmap, which solves the misalignment problem between the training target and the task target.
The prediction accuracy of human pose estimation is improved, especially the prediction accuracy on difficult samples, and is applicable to human pose estimation networks of different architectures, resolutions and depths.
Smart Images

Figure CN115713784B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer vision technology, and in particular to a method for estimating human posture by introducing a heat map gradient constraint. Background Art
[0002] Human pose estimation is an important topic in computer vision, with wide applications in intelligent security, autonomous driving, smart home automation, and animation modeling. The goal is to predict the coordinates of all key points on a human body in an image, such as the wrist and neck.
[0003] Human pose estimation algorithms are mainly divided into two categories based on the representation of the labeled data during training: coordinate regression-based methods and heatmap regression-based algorithms. Coordinate regression-based methods allow the human pose estimation network to directly output keypoint coordinates. The advantage of this method is that it can perform end-to-end backpropagation from the image to the keypoint coordinates. The disadvantage is that the human pose estimation network needs to fit a highly nonlinear objective function, and the spatial information provided by the keypoint coordinates is too sparse, making the training of the human pose estimation network much more difficult, resulting in poor final prediction results.
[0004] The heatmap regression method first constructs the annotated keypoint coordinates into a Gaussian distribution heatmap. The human pose estimation network then uses this Gaussian distribution target heatmap as its prediction target. Finally, the predicted coordinates are obtained from the predicted heatmap through a decoding method. Compared to coordinate regression-based methods, this method reduces the nonlinearity of the objective function, and the Gaussian distribution target heatmap provides more supervision information for the training process, resulting in better results. This method has become the mainstream method for human pose estimation.
[0005] While heatmap regression-based methods have achieved high prediction performance, there remains a misalignment between the mean squared error (MSE) loss function used in current heatmap regression-based methods, as a training objective, and the task objective of achieving the accuracy of the predicted coordinates decoded from the predicted heatmap. Specifically, current heatmap regression-based methods experience a decrease in the accuracy of the predicted coordinates during training, even as the loss function decreases. This problem arises because the task objective of achieving the accuracy of the predicted coordinates decoded from the heatmap requires only that the maximum point in the heatmap—the mean of the Gaussian distribution within the heatmap—be predicted, close to the true keypoint coordinates. However, current heatmap regression-based methods unnecessarily fix the maximum value of the Gaussian distribution when constructing the target heatmap. This results in low confidence in the predicted heatmap for some difficult examples, such as occluded keypoints and knees, resulting in large MSEs with the target heatmap. To reduce the MSE, the predicted heatmaps for these examples generate additional peaks around the true keypoint coordinates, resulting in a decrease in the accuracy of the final predicted coordinates. Summary of the Invention
[0006] In order to overcome the shortcomings of the existing technology, the present invention proposes a human pose estimation method that introduces heat map gradient constraints, in order to predict a heat map that is more conducive to the accuracy recovery process during decoding, thereby improving the prediction accuracy of human pose estimation.
[0007] In order to achieve the above-mentioned object, the present invention adopts the following technical solutions:
[0008] The method for estimating human posture based on heat map gradient constraint is characterized by the following steps:
[0009] Step 1: Preprocess the human body posture estimation database:
[0010] Any A-th sample in the human pose estimation database is composed of an original image I A , a human body frame bbox A and a set of human key points μ A Composition: A set of human body key point coordinates μ of the sample A A Contains K coordinates, denoted as in, represents the coordinates of the i-th key point of the human body, and K represents the number of key points of the human body;
[0011] Use the human body box bbox of sample A A For the original image I A After cropping and scaling to the specified size, the input image I′ is obtained A , and the original image I A The coordinates of the key points of the human body on μ ATransform to input image I′ A The coordinates of the key points of the human body on μ′ A ; by {I′ A ,μ′ A} constitutes a set of human posture data after sample A is preprocessed, thereby obtaining a human posture database D containing N samples after preprocessing p ;
[0012] Step 2: Build a human posture estimation network F based on heat map regression based on HRNet network p :
[0013] The HRNet network includes: an input layer, B feature extraction and fusion stages, and an output layer; wherein the input layer includes: a convolutional layer, a batch normalization layer, and a ReLU activation function; the B feature extraction and fusion stages are composed of B feature extraction modules and B fusion modules, each feature extraction module is composed of a convolutional layer, a batch normalization layer, a ReLU activation function, and a residual connection, and each fusion module is composed of a convolutional layer, a batch normalization layer, and a ReLU activation function; the output layer includes: a deconvolutional layer, a convolutional layer, a batch normalization layer, and a ReLU activation function;
[0014] Use Gaussian distribution to initialize the weights of all convolutional layers, deconvolution layers, and batch normalization layers in the HRNet network;
[0015] Step 3: Use the loss function that introduces the heatmap gradient constraint to train the human pose estimation network F p :
[0016] Step 3.1: Based on the human body posture database D p The human body posture data of sample A in {I′ A ,μ′ A}The coordinates of the key points of the human body μ′ A Generate target heatmap for sample A and target heatmap gradient map in, The target heat map representing the i-th human key point of sample A, Represents the target thermal gradient map of the i-th human key point of sample A;
[0017] Step 3.1.1: Generate the target heat map of the i-th human key point of sample A using formula (1) The pixel value at the upper coordinate (x,y) Thus, the target heat map of the i-th human key point of sample A is obtained Finally, we get the target heat map of K key points of the human body of sample A.
[0018]
[0019] In formula (1), and Represents the coordinates μ of the i-th human key point after preprocessing i ' A The x-axis value and y-axis value of , σa is a fixed hyperparameter, X and Y represent the size of the target heat map respectively;
[0020] Step 3.1.2: Generate the target heat map gradient of the i-th human key point of sample A using formula (2) The pixel value at the upper coordinate (x,y) Thus, the target heat map gradient map of the i-th human key point of sample A is obtained Finally, the target heat map gradient map of K key points of sample A is obtained
[0021]
[0022] In formula (2), and Represents the pixel value of the target heat map gradient map at coordinate (x, y) of the i-th key point in the x-axis and y-axis directions; The target heatmap representing the i-th human key point of sample A The pixel value with the upper coordinate (x+1,y) is The target heatmap representing the i-th human key point of sample A The pixel value with the upper coordinate (x,y+1);
[0023] Step 3.2: The human body posture database D p The human body posture data of sample A in {I′ A ,μ′ A I′ in A Input to the human pose estimation network F p In the example, we get the predicted heat map of sample A. Represents the predicted heat map of the i-th human key point of sample A;
[0024] Use formula (3) to generate the predicted heat map gradient map of the i-th human key point of sample A The pixel value at the upper coordinate (x,y) Thus, the predicted heat map gradient map of the i-th human key point of sample A is obtained Finally, we get the predicted heat map gradient map of K key points of sample A
[0025]
[0026] In formula (3), and Represents the pixel value of the predicted heat map gradient map of the i-th key point in the x-axis and y-axis directions at the coordinate (x, y); Represents the predicted heatmap of the i-th human key point of sample A The pixel value at the upper coordinate (x+1,y), Represents the predicted heatmap of the i-th key point of sample A The pixel value at the upper coordinate (x,y), Represents the predicted heatmap of the i-th human key point of sample A The pixel value at the upper coordinate (x,y+1);
[0027] Step 3.3: Establish a human pose estimation loss function L that introduces heatmap gradient constraints p ;
[0028] Step 3.3.1. Use formula (4) to establish the mean square error loss function L between the predicted heat map and the target heat map H :
[0029]
[0030] In formula (4), N represents the human posture database D p The number of samples in
[0031] Step 3.3.2: Use formula (5) to establish the mean square error loss L between the predicted heatmap gradient map and the target heatmap gradient map G :
[0032]
[0033] In formula (5), N represents the human posture database D p The number of samples in , K represents the number of key points of the human body, X and Y represent the size of the heat map, X-1 and Y represent the size of the heat map gradient map in the x-axis direction, and X and Y-1 represent the size of the heat map gradient map in the y-axis direction;
[0034] Step 3.3.3: Use formula (6) to establish the human pose estimation loss function L with the introduction of heat map gradient constraint. p :
[0035] L p =αL H +βL G (6)
[0036] In formula (6), α and β represent the H and L G Hyperparameters that make trade-offs;
[0037] Step 3.4: Use the Adam method to estimate the human posture network F p Perform training and calculate the loss function L p Used to update network parameters. When the number of training iterations reaches the set number or the loss function is less than the set threshold, the training stops, thus obtaining the trained human posture estimation network.
[0038] Step 4: Trained human pose estimation network predictions;
[0039] Step 4.1: Use the pre-trained human target detection network F D For the image to be tested I test Make predictions and get the predicted human target detection frame in, Represents the human target detection network F D For the image to be tested I test The predicted j-th human target detection box, n represents the human target detection network F D For the image to be tested I test The number of predicted human target detection boxes;
[0040] Step 4.2: Use the j-th human target detection frame For the image to be tested I test The jth preprocessed input image is cropped and scaled to the specified size Thus, we get the input image set
[0041] Step 4.3: the jth preprocessed input image Input to the trained human pose estimation network In the input image Prediction heatmap of the i-th human key point Thus, the input image is obtained Prediction heatmap of
[0042]
[0043] From the input image Prediction heatmap of the i-th human key point Decode the input image The predicted coordinates of the i-th human key point Thus, the input image is obtained The predicted coordinates of K key points of the human body Recorded as
[0044] Step 4.4: the image to be tested Itest The predicted coordinate set of human key points Perform non-maximum suppression to obtain the image to be tested I test The final human key point prediction coordinate set in, Represents the input image The final predicted coordinates of the human key points.
[0045] The present invention provides an electronic device, comprising a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the human body posture estimation method, and the processor is configured to execute the program stored in the memory.
[0046] The present invention provides a computer-readable storage medium having a computer program stored thereon. The computer-readable storage medium is characterized in that the computer program executes the steps of the human body posture estimation method when executed by a processor.
[0047] Compared with the prior art, the beneficial effects of the present invention are embodied in:
[0048] 1. This paper proposes a training loss function that introduces a heatmap gradient constraint, which allows the human pose estimation network to focus more on the maximum point and relative shape of the predicted heatmap during training. This solves the misalignment problem between the mean square error loss function (training objective) and the task objective (coordinate accuracy), thereby achieving human pose estimation with higher prediction accuracy.
[0049] 2. The training loss function proposed in this paper is decoupled from the specific architecture of the human pose estimation network and can be applied to the training of different human pose estimation networks. It can achieve significant improvement in prediction accuracy for human pose estimation networks with different architectures, resolutions, and depths. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 Schematic diagram of the process of the present invention;
[0051] Figure 2 Schematic diagram of the loss function calculation process of the present invention. DETAILED DESCRIPTION
[0052] In this embodiment, a method for human pose estimation that introduces heatmap gradient constraints is to effectively improve the prediction accuracy on difficult samples by allowing the model to focus on the shape constraints of the predicted heatmap, and finally achieve accurate human pose estimation. Specifically, Figure 1 As shown, the steps are as follows:
[0053] Step 1: Preprocess the human body posture estimation database:
[0054] Any A-th sample in the human pose estimation database is composed of an original image I A , a human body frame bbox A and a set of human key points μ A Composition: A set of human key point coordinates μ of sample A A Contains K coordinates, denoted as in, represents the coordinates of the i-th key point of the human body, and K represents the number of key points of the human body;
[0055] Use the human body box bbox of sample A A For the original image I A After cropping and scaling to the specified size, the input image I′ is obtained A , and the original image I A The coordinates of the key points of the human body on μ A Transform to input image I′ A The coordinates of the key points of the human body on μ′ A ; In this embodiment, the specified size of the scaling is 192×256; by {I′ A ,μ′ A} constitutes a set of human posture data after sample A is preprocessed, thereby obtaining a human posture database D containing N samples after preprocessing p ;
[0056] In this embodiment, the COCO human pose estimation database is used, which contains 149,813 samples, and the number of human key points in each sample is 17;
[0057] Step 2: Build a human posture estimation network F based on heat map regression based on HRNet network p :
[0058] The HRNet() network includes: an input layer, B feature extraction and fusion stages, and an output layer; in this embodiment, B is set to 4; wherein, the input layer includes: a convolutional layer, a batch normalization layer, and a ReLU activation function; the B feature extraction and fusion stages are composed of B feature extraction modules and B fusion modules, each feature extraction module is composed of a convolutional layer, a batch normalization layer, a ReLU activation function, and a residual connection, and each fusion module is composed of a convolutional layer, a batch normalization layer, and a ReLU activation function; the output layer includes: a deconvolutional layer, a convolutional layer, a batch normalization layer, and a ReLU activation function;
[0059] Use Gaussian distribution to initialize the weights of all convolutional layers, deconvolution layers, and batch normalization layers in the HRNet network;
[0060] Step 3: Use the loss function that introduces the heatmap gradient constraint to train the human pose estimation network F p :
[0061] Step 3.1: Based on the human body posture database D p The human body posture data of sample A in {I′ A ,μ′ A}The coordinates of the key points of the human body μ′ A Generate target heatmap for sample A and target heatmap gradient map in, The target heat map representing the i-th human key point of sample A, Represents the target thermal gradient map of the i-th human key point of sample A;
[0062] Step 3.1.1: Generate the target heat map of the i-th human key point of sample A using formula (1) The pixel value at the upper coordinate (x,y) Thus, the target heat map of the i-th human key point of sample A is obtained Finally, we get the target heat map of K key points of the human body of sample A.
[0063]
[0064] In formula (1), and Represents the coordinates μ of the i-th human key point after preprocessing i ' A The x-axis value and y-axis value of σ are fixed hyperparameters, and X and Y represent the fixed target heat map size respectively. In this embodiment, σ is set to 4.
[0065] Step 3.1.2: Generate the target heat map gradient of the i-th human key point of sample A using formula (2) The pixel value at the upper coordinate (x,y) Thus, the target heat map gradient map of the i-th human key point of sample A is obtained Finally, the target heat map gradient map of K key points of sample A is obtained
[0066]
[0067] In formula (2), and Represents the pixel value of the target heat map gradient map at coordinate (x, y) of the i-th key point in the x-axis and y-axis directions; The target heatmap representing the i-th human key point of sample A The pixel value with the upper coordinate (x+1,y) is The target heatmap representing the i-th human key point of sample A The pixel value with the upper coordinate (x,y+1);
[0068] Step 3.2: The human body posture database D p The human body posture data of sample A in {I′ A ,μ′ A I′ in A Input to the human pose estimation network F p In the example, we get the predicted heat map of sample A. Represents the predicted heat map of the i-th human key point of sample A;
[0069] Use formula (3) to generate the predicted heat map gradient map of the i-th human key point of sample A The pixel value at the upper coordinate (x,y) Thus, the predicted heat map gradient map of the i-th human key point of sample A is obtained Finally, we get the predicted heat map gradient map of K key points of sample A
[0070]
[0071] In formula (3), and Represents the pixel value of the predicted heat map gradient map of the i-th key point in the x-axis and y-axis directions at the coordinate (x, y); Represents the predicted heatmap of the i-th human key point of sample A The pixel value at the upper coordinate (x+1,y), Represents the predicted heatmap of the i-th key point of sample A The pixel value at the upper coordinate (x,y), Represents the predicted heatmap of the i-th human key point of sample A The pixel value at the upper coordinate (x,y+1);
[0072] Step 3.3: Establish a human pose estimation loss function L that introduces heatmap gradient constraints p ;
[0073] Step 3.3.1. Use formula (4) to establish the mean square error loss function L between the predicted heat map and the target heat map H :
[0074]
[0075] In formula (4), N represents the human posture database D p The number of samples in; the loss function L HThere will be a problem that while the loss decreases, the accuracy of the predicted coordinates decreases instead, that is, the mean square error loss function L H There is a misalignment between this training objective and the task objective of predicting coordinate accuracy.
[0076] Step 3.3.2: Use formula (5) to establish the mean square error loss L between the predicted heatmap gradient map and the target heatmap gradient map G :
[0077]
[0078] In formula (5), N represents the human posture database D p The number of samples in the , K represents the number of key points of the human body, X and Y represent the fixed heat map size, X-1 and Y represent the fixed heat map gradient map size in the x-axis direction, X and Y-1 represent the fixed heat map gradient map size in the y-axis direction; in this embodiment, X and Y are set to 48 and 64 respectively; the mean square error loss L G It allows the human pose estimation network to pay more attention to the maximum point and relative shape of the predicted heat map during training, thereby solving the mean square error loss function L H There is a misalignment between this training objective and the task objective of predicting coordinate accuracy;
[0079] Step 3.3.3, as Figure 2 As shown, the human posture estimation loss function L that introduces the heat map gradient constraint is established using formula (6): p :
[0080] L p =αL H +βL G (6)
[0081] In formula (6), α and β represent the H and L G Hyperparameters for trade-offs; in this example, α and β are set to 1 and 8 respectively;
[0082] Step 3.4: Use the Adam (Adaptive Moment Estimation) method to estimate the human posture network F p Perform training and calculate the loss function L p Used to update network parameters. When the number of training iterations reaches the set number or the loss function is less than the set threshold, the training stops, thus obtaining the trained human posture estimation network. In this example, the number of training iterations is set to 210, the initial learning rate is set to 1e-3, and the learning rate is reduced to 1 / 10 at the 170th and 200th rounds;
[0083] Step 4: Trained human pose estimation network predictions;
[0084] Step 4.1: Use the pre-trained human target detection network F D For the image to be tested I test Make predictions and get the predicted human target detection frame in, Represents the human target detection network F D For the image to be tested I test The predicted j-th human target detection box, n represents the human target detection network F D For the image to be tested I test The number of predicted human target detection boxes;
[0085] Step 4.2: Use the jth human target detection frame For the image to be tested I test The jth preprocessed input image is cropped and scaled to the specified size. Thus, we get the input image set
[0086] Step 4.3: j-th preprocessed input image Input to the trained human pose estimation network In the input image Prediction heatmap of the i-th human key point Thus, the input image is obtained Prediction heatmap of
[0087]
[0088] From the input image Prediction heatmap of the i-th human key point Decode the input image The predicted coordinates of the i-th human key point Thus, the input image is obtained The predicted coordinates of K key points of the human body Recorded as
[0089] Step 4.4: Image I to be tested test The predicted coordinate set of human key points Perform non-maximum suppression to obtain the image to be tested I test The final human key point prediction coordinate set in, Represents the input image The final predicted coordinates of the human key points.
[0090] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above-mentioned human posture estimation method, and the processor is configured to execute the program stored in the memory.
[0091] In this embodiment, a computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned human body posture estimation method are executed.
Claims
1. A method for human pose estimation based on heatmap gradient constraints, characterized by Proceed as follows: Step 1: Preprocess the human body posture estimation database: Any A-th sample in the human pose estimation database is composed of an original image I A , a human body frame bbox A and a set of human key points μ A Composition: A set of human body key point coordinates μ of the sample A A Contains K coordinates, denoted as in, represents the coordinates of the i-th key point of the human body, and K represents the number of key points of the human body; Use the human body box bbox of sample A A For the original image I A After cropping and scaling to the specified size, the input image I′ is obtained A , and the original image I A The coordinates of the key points of the human body on μ A Transform to input image I′ A The coordinates of the key points of the human body on μ′ A ; by {I′ A ,μ′ A } constitutes a set of human posture data after sample A is preprocessed, thereby obtaining a human posture database D containing N samples after preprocessing p ; Step 2: Build a human posture estimation network F based on heat map regression based on HRNet network p : The HRNet network includes: an input layer, B feature extraction and fusion stages, and an output layer; wherein the input layer includes: a convolutional layer, a batch normalization layer, and a ReLU activation function; the B feature extraction and fusion stages are composed of B feature extraction modules and B fusion modules, each feature extraction module is composed of a convolutional layer, a batch normalization layer, a ReLU activation function, and a residual connection, and each fusion module is composed of a convolutional layer, a batch normalization layer, and a ReLU activation function; the output layer includes: a deconvolutional layer, a convolutional layer, a batch normalization layer, and a ReLU activation function; Use Gaussian distribution to initialize the weights of all convolutional layers, deconvolution layers, and batch normalization layers in the HRNet network; Step 3: Use the loss function that introduces the heatmap gradient constraint to train the human pose estimation network F p : Step 3.1: Based on the human body posture database D p The human body posture data of sample A in {I′ A ,μ′ A }The coordinates of the key points of the human body μ′ A Generate target heatmap for sample A and target heatmap gradient map in, The target heat map representing the i-th human key point of sample A, Represents the target thermal gradient map of the i-th human key point of sample A; Step 3.1.1: Generate the target heat map of the i-th human key point of sample A using formula (1) The pixel value at the upper coordinate (x,y) Thus, the target heat map of the i-th human key point of sample A is obtained Finally, we get the target heat map of K key points of the human body of sample A. In formula (1), and Represents the coordinates μ of the i-th human key point after preprocessing i ' A The x-axis value and y-axis value of , σa is a fixed hyperparameter, X and Y represent the size of the target heat map respectively; Step 3.1.2: Generate the target heat map gradient of the i-th human key point of sample A using formula (2) The pixel value at the upper coordinate (x,y) Thus, the target heat map gradient map of the i-th human key point of sample A is obtained Finally, the target heat map gradient map of K key points of sample A is obtained In formula (2), and Represents the pixel value of the target heat map gradient map at coordinate (x, y) of the i-th key point in the x-axis and y-axis directions; The target heatmap representing the i-th human key point of sample A The pixel value with the upper coordinate (x+1,y) is The target heatmap representing the i-th human key point of sample A The pixel value with the upper coordinate (x,y+1); Step 3.2: The human body posture database D p The human body posture data of sample A in {I′ A ,μ′ A I′ in A Input to the human pose estimation network F p In the example, we get the predicted heat map of sample A. Represents the predicted heat map of the i-th human key point of sample A; Use formula (3) to generate the predicted heat map gradient map of the i-th human key point of sample A The pixel value at the upper coordinate (x,y) Thus, the predicted heat map gradient map of the i-th human key point of sample A is obtained Finally, we get the predicted heat map gradient map of K key points of sample A In formula (3), and Represents the pixel value of the predicted heat map gradient map of the i-th key point in the x-axis and y-axis directions at the coordinate (x, y); Represents the predicted heatmap of the i-th human key point of sample A The pixel value at the upper coordinate (x+1,y), Represents the predicted heatmap of the i-th key point of sample A The pixel value at the upper coordinate (x,y), Represents the predicted heatmap of the i-th human key point of sample A The pixel value at the upper coordinate (x,y+1); Step 3.3: Establish a human pose estimation loss function L that introduces heatmap gradient constraints p ; Step 3.3.
1. Use formula (4) to establish the mean square error loss function L between the predicted heat map and the target heat map H : In formula (4), N represents the human posture database D p The number of samples in Step 3.3.2: Use formula (5) to establish the mean square error loss L between the predicted heatmap gradient map and the target heatmap gradient map G : In formula (5), N represents the human posture database D p The number of samples in , K represents the number of key points of the human body, X and Y represent the size of the heat map, X-1 and Y represent the size of the heat map gradient map in the x-axis direction, and X and Y-1 represent the size of the heat map gradient map in the y-axis direction; Step 3.3.3: Use formula (6) to establish the human pose estimation loss function L with the introduction of heat map gradient constraint. p : L p =αL H +βL G (6) In formula (6), α and β represent the H and L G Hyperparameters that make trade-offs; Step 3.4: Use the Adam method to estimate the human posture network F p Perform training and calculate the loss function L p Used to update network parameters. When the number of training iterations reaches the set number or the loss function is less than the set threshold, the training stops, thus obtaining the trained human posture estimation network. Step 4: Trained human pose estimation network predictions; Step 4.1: Use the pre-trained human target detection network F D For the image to be tested I test Make predictions and get the predicted human target detection frame in, Represents the human target detection network F D For the image to be tested I test The predicted j-th human target detection box, n represents the human target detection network F D For the image to be tested I test The number of predicted human target detection boxes; Step 4.2: Use the j-th human target detection frame For the image to be tested I test The jth preprocessed input image is cropped and scaled to the specified size Thus, we get the input image set Step 4.3: the jth preprocessed input image Input to the trained human pose estimation network In the input image Prediction heatmap of the i-th human key point Thus, the input image is obtained Prediction heatmap of From the input image Prediction heatmap of the i-th human key point Decode the input image The predicted coordinates of the i-th human key point Thus, the input image is obtained The predicted coordinates of K key points of the human body Recorded as Step 4.4: the image to be tested I test The predicted coordinate set of human key points Perform non-maximum suppression to obtain the image to be tested I test The final human key point prediction coordinate set in, Represents the input image The final predicted coordinates of the human key points.
2. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the human body posture estimation method according to claim 1, and the processor is configured to execute the program stored in the memory.
3. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the human body posture estimation method according to claim 1 are executed.
Citation Information
Patent Citations
Human body posture estimation method based on dynamic information transmission
CN114299537A
Human body posture estimation method based on two-stage weighted mean square loss function
CN115063890A