Human pose estimation methods, devices, electronic equipment and storage media

By introducing an error penalty term into human pose estimation and improving the loss function, the problem of poor model convergence in existing technologies is solved, resulting in faster training speed and higher prediction accuracy.

CN116758585BActive Publication Date: 2025-10-31PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310686043.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-09
Publication Date
2025-10-31
Estimated Expiration
2043-06-09

AI Technical Summary

Technical Problem

In existing technologies, L1 LOSS and L2 LOSS loss functions only focus on the difference between the predicted and actual positions of human key points in human pose estimation, ignoring the rationality of the predicted pose, resulting in poor model convergence.

Method used

An error penalty term is introduced. By calculating the prior knowledge that the error degree is smaller when the error directions of two nodes in the same joint are the same, the loss function is improved, the constraint on the error direction of two nodes in the same joint is increased, and the training process is optimized.

Benefits of technology

It accelerated the convergence speed of the model, improved the accuracy of the final training effect, and enhanced the prediction accuracy of human pose estimation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116758585B_ABST
    Figure CN116758585B_ABST
Patent Text Reader

Abstract

This invention provides a human pose estimation method, apparatus, electronic device, and storage medium, relating to the field of financial technology. The method includes: constructing an initial detection model; training the initial detection model based on a preset training set and a preset loss function to obtain a modified detection model; wherein the preset training set is a collection of labeled data including human key points, and the preset loss function includes a position loss and an error penalty term; acquiring a target image based on real-time images; and inputting the target image into the modified detection model to obtain a target result image. By simply changing the loss function and introducing error direction constraints on two nodes of the same joint, the convergence speed of training and the accuracy of the final training effect can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of financial technology, and more specifically, to a method, apparatus, electronic device, and storage medium for estimating human posture. Background Technology

[0002] In the financial sector, such as major banks, virtual human customer service representatives are increasingly being used. Human pose estimation is a crucial step in implementing virtual human customer service. Human pose estimation uses machine learning to accurately connect detected human key points in an image, thereby estimating the human pose. These key points typically correspond to joints with a certain degree of freedom on the human body.

[0003] In machine learning, minimum absolute error (L1 LOSS) and mean squared error (L2 LOSS) are commonly used as loss functions to optimize the performance of human pose estimation models. However, both L1 LOSS and L2 LOSS have the problem of focusing only on the difference between the predicted and actual positions of human key points, while ignoring the rationality of the predicted pose. Summary of the Invention

[0004] To address the aforementioned technical problems, embodiments of this application provide a human posture estimation method, apparatus, electronic device, and storage medium.

[0005] In a first aspect, embodiments of this application provide a human pose estimation method, the method comprising:

[0006] An initial detection model is constructed, and the initial detection model is trained based on a preset training set and a preset loss function to obtain a corrected detection model; wherein, the preset training set is a set of labeled data including human key points, and the preset loss function includes position loss and error penalty term;

[0007] The image to be detected is acquired based on real-time image processing.

[0008] The image to be detected is input into the modified detection model to obtain the target result image.

[0009] In one embodiment, the labeled data includes sample images and ground truth labeled results. The step of training the initial detection model based on a preset training set and a preset loss function to obtain a modified detection model includes:

[0010] The sample image is input into the initial detection model to obtain the initial generation result;

[0011] The training loss between the initial generated result and the real labeled result is calculated using a preset loss function;

[0012] Based on the training loss, the parameters and weights of each layer of the initial detection model are adjusted through backpropagation.

[0013] When the training loss is less than the loss threshold, the current initial detection model is saved as the corrected detection model.

[0014] In one embodiment, calculating the training loss between the initial generated result and the real labeled result using a preset loss function includes:

[0015] Through the formula:

[0016] loss = loss direction +MSE;

[0017] Calculate the training loss, where loss direction The initial generated result represents the error penalty term relative to the actual labeled result, and MSE represents the position loss of the initial generated result relative to the actual labeled result.

[0018] In one embodiment, calculating the error penalty term includes:

[0019] Through the formula:

[0020] l1=(x′1-x1, y′1-y1, z′1-z1)

[0021] l2=(x′2-x2, y′2-y2, z′2-z2)

[0022] l2-l1=(x′2-x2-x′1+x1, y′2-y2-y′1+y1, z′2-z2-z′1+z1)

[0023] l diff =|x′2-x2-x′1+x1|+|y′2-y2-y′1+y1|+|z′2-z2-z′1+z1|

[0024]

[0025] Calculate the error penalty term, where l1 is the relative distance between the first endpoint of a joint in the initial generated result and the first endpoint of the real annotation result, l2 is the relative distance between the second endpoint of a joint in the initial generated result and the corresponding endpoint of the real annotation result, (x1, y1, z1) are the coordinates of the first endpoint of the real annotation result, (x′1, y′1, z′1) are the coordinates of the first endpoint of the initial result, (x2, y2, z2) are the coordinates of the second endpoint of the real annotation result, (x′2, y′2, z′2) are the coordinates of the second endpoint of the initial result, and n is the number of human keypoints.

[0026] Secondly, embodiments of this application provide a human posture estimation device, the human posture estimation device comprising:

[0027] A construction module is used to build an initial detection model, and train the initial detection model based on a preset training set and a preset loss function to obtain a corrected detection model; wherein, the preset training set is a set of labeled data including human key points, and the preset loss function includes position loss and error penalty term;

[0028] The acquisition module is used to acquire the image to be detected based on real-time images;

[0029] The input module is used to input the image to be detected into the modified detection model to obtain the target result image.

[0030] In one embodiment, the building module is further configured to:

[0031] The sample image is input into the initial detection model to obtain the initial generation result;

[0032] The training loss between the initial generated result and the real labeled result is calculated using a preset loss function;

[0033] Based on the training loss, the parameters and weights of each layer of the initial detection model are adjusted through backpropagation.

[0034] When the training loss is less than the loss threshold, the current initial detection model is saved as the corrected detection model.

[0035] In one embodiment, the building module is further configured to:

[0036] Through the formula:

[0037] loss = loss direction +MSE;

[0038] Calculate the training loss, where loss directionThe initial generated result represents the error penalty term relative to the actual labeled result, and MSE represents the position loss of the initial generated result relative to the actual labeled result.

[0039] In one embodiment, the building module is further configured to:

[0040] Through the formula:

[0041] l1=(x′1-x1, y′1-y1, z′1-z1)

[0042] l2=(x′2-x2, y′2-y2, z′2-z2)

[0043] l2-l1=(x′2-x2-x′1+x1, y′2-y2-y′1+y1, z′2-z2-z′1+z1)

[0044] l diff =|x′2-x2-x′1+x1|+|y′2-y2-y′1+y1|+|z′2-z2-z′1+z1|

[0045]

[0046] Calculate the error penalty term, where l1 is the relative distance between the first endpoint of a joint in the initial generated result and the first endpoint of the real annotation result, l2 is the relative distance between the second endpoint of a joint in the initial generated result and the corresponding endpoint of the real annotation result, (x1, y1, z1) are the coordinates of the first endpoint of the real annotation result, (x′1, y′1, z′1) are the coordinates of the first endpoint of the initial result, (x2, y2, z2) are the coordinates of the second endpoint of the real annotation result, (x′2, y′2, z′2) are the coordinates of the second endpoint of the initial result, and n is the number of human keypoints.

[0047] Thirdly, embodiments of this application provide an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the computer program executes the human pose estimation method provided in the first aspect when the processor is running.

[0048] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a processor, executes the human pose estimation method provided in the first aspect.

[0049] The human pose estimation method provided in this application introduces constraints beyond the difference between the predicted and actual positions of joints, based on the prior knowledge that the error magnitude is smaller when the error directions of two corresponding joint points of the same joint are the same. By simply changing the loss function and introducing constraints on the error directions of two nodes of the same joint, the convergence speed of training and the accuracy of the final training effect can be improved. Attached Figure Description

[0050] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0051] Figure 1 A flowchart of the human pose estimation method provided in an embodiment of this application is shown;

[0052] Figure 2 A schematic diagram of key human body points provided in an embodiment of this application is shown;

[0053] Figure 3 A schematic diagram of a joint endpoint provided in an embodiment of this application is shown;

[0054] Figure 4 A schematic diagram of the human posture estimation device provided in an embodiment of this application is shown;

[0055] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0057] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0058] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0059] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0060] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0061] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.

[0062] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.

[0063] Example 1

[0064] This disclosure provides a method for estimating human posture.

[0065] For details, see Figure 1 Human pose estimation methods include:

[0066] Step S110: Construct an initial detection model, and train the initial detection model based on a preset training set and a preset loss function to obtain a corrected detection model; wherein, the preset training set is a set of labeled data including human key points, and the preset loss function includes position loss and error penalty term;

[0067] Commonly used loss functions in human pose estimation include L1 loss, L2 loss, and SmoothL1. The L1 loss function, also known as the minimum absolute deviation (LAD) loss, generally minimizes the sum of the absolute differences (S) between the target and estimated values. The advantage of the L1 loss function is its good robustness to outliers, but it also suffers from gradient invariance, which can hinder model convergence. The L2 loss function (MSE) is the most common loss function in pose estimation. The L2 loss function is easy to calculate, and the gradient changes accordingly with the error, resulting in good convergence.

[0068] The conventional approach of using MSE as the loss function to train a human pose estimation model and then deploying it typically involves the following steps:

[0069] Data Preparation: A training dataset for the human pose estimation model needs to be collected. In human pose estimation, the coordinates (x, y, z) of the human skeleton joints are typically used as labels. RGB images or depth images also need to be collected. The joint coordinates and corresponding images should be labeled in the training set.

[0070] Model building: Choose an appropriate neural network architecture, such as Convolutional Neural Network (CNN), Residual Neural Network (ResNet), etc. Build the model architecture.

[0071] Define the loss function: Use the mean squared error (MSE) as the loss function, that is, calculate the loss by calculating the mean squared error between the predicted coordinates and the true coordinates of the neural network.

[0072] Training the model: The training set is input into the network to train the model. The weights and biases in the network are updated by calculating the loss.

[0073] Model evaluation: Validate the model's accuracy and performance using a validation set. More comprehensive evaluation metrics can be used, such as mean joint error and cumulative error distribution.

[0074] Predicted output: Finally, the test set is input into the trained model to achieve the prediction and output of human pose estimation.

[0075] Model deployment: After training is complete, the model is deployed to a real-world application for use.

[0076] However, this scheme only focuses on the difference between the predicted and actual positions of key points, lacking sufficient constraints on the reasonableness of the predicted pose. Therefore, this scheme mainly addresses the problem of existing loss functions having a single focus and not utilizing prior knowledge by adding a penalty term to constrain the directionality of the error. The proposed loss function, based on MSE, adds a penalty representing the difference in error direction between two nodes of the same joint. This aims to accelerate model convergence and improve prediction accuracy.

[0077] Taking a 16-point human skeleton model as an example, such as Figure 2 As shown, hip is the center point. The MSE is calculated by calculating the Euclidean distance between the predicted joint and the GT value, and then calculating the mean square of all differences. However, for joints in a skeleton model, even if two joints have the same Euclidean distance, the degree of error may be different.

[0078] Specifically, for two nodes at both ends of a joint, if the error directions of the two nodes are the same, the degree of error will be lower than that of two nodes with the same error distance but different error directions corresponding to the joint.

[0079] Therefore, we initially considered incorporating the joint length constraint into the loss function. However, since joint lengths vary significantly among different individuals, this approach is not suitable for designing a loss function that incorporates it. Therefore, we considered directly using the error direction information of two joints within the same joint as a penalty term, adding it directly to the original MSE loss function, thus obtaining an improved loss function.

[0080] In one embodiment, the labeled data includes sample images and ground truth labeled results. The step of training the initial detection model based on a preset training set and a preset loss function to obtain a modified detection model includes:

[0081] The sample image is input into the initial detection model to obtain the initial generated result; the training loss between the initial generated result and the real labeled result is calculated using a preset loss function; based on the training loss, the parameters and weights of each layer of the initial detection model are adjusted through backpropagation.

[0082] When the training loss is less than the loss threshold, the current initial detection model is saved as the corrected detection model.

[0083] In one embodiment, calculating the training loss between the initial generated result and the real labeled result using a preset loss function includes:

[0084] Through formula 1:

[0085] loss = lossdirection +MSE;

[0086] Calculate the training loss, where loss direction The initial generated result represents the error penalty term relative to the actual labeled result, and MSE represents the position loss of the initial generated result relative to the actual labeled result.

[0087] In one embodiment, calculating the error penalty term includes:

[0088] Through formula 2:

[0089] l1=(x′1-x1, y′1-y1, z′1-z1)

[0090] l2=(x′2-x2, y′2-y2, z′2-z2)

[0091] l2-l1=(x′2-x2-x′1+x1, y′2-y2-y′1+y1, z′2-z2-z′1+z1)

[0092] l diff =|x′2-x2-x′1+x1|+|y′2-y2-y′1+y1|+|z′2-z2-z′1+z1|

[0093]

[0094] Calculate the error penalty term, where l1 is the relative distance between the first endpoint of a joint in the initial generated result and the first endpoint of the real annotation result, l2 is the relative distance between the second endpoint of a joint in the initial generated result and the corresponding endpoint of the real annotation result, (x1, y1, z1) are the coordinates of the first endpoint of the real annotation result, (x′1, y′1, z′1) are the coordinates of the first endpoint of the initial result, (x2, y2, z2) are the coordinates of the second endpoint of the real annotation result, (x′2, y′2, z′2) are the coordinates of the second endpoint of the initial result, and n is the number of human keypoints.

[0095] Please see Figure 3 Firstly, we considered incorporating the joint length constraint into the loss function. However, since joint lengths vary significantly among different individuals, this is not conducive to designing a loss function that incorporates it. Therefore, we considered directly using the error direction information of two joints within the same joint as a penalty term, directly adding it to the original MSE loss function, thus obtaining an improved loss function. Therefore, the loss... direction The direction of error change is used to characterize the loss function and is added as a penalty.

[0096] Penalty lossdirection The vector difference of the error directions at the two ends of the same joint was calculated. The addition of the loss function forces the predictions of the two ends of the same joint to have the same error direction. This constraint utilizes the prior knowledge that the error magnitude is smaller when the error directions of the two corresponding joint points of the same joint are the same. At this point, the loss function... direction The value is 0. This improved loss function strategy can accelerate model convergence and improve the accuracy of final keypoint prediction.

[0097] Step S120: Obtain the image to be detected based on the real-time image;

[0098] This step allows the revised detection model to be deployed in practical applications. Taking virtual customer service as an example: in the process of banks interacting with users, the image of the customer service representative can be set as a virtual human to avoid the problem of excessive workload and insufficient supply of human customer service representatives. Real-time images of human customer service representatives can be used to obtain the images to be detected. For example, frame-by-frame extraction of videos including human customer service representative actions can yield a large number of coherent images to be detected.

[0099] Step S130: Input the image to be detected into the modified detection model to obtain the target result image.

[0100] With constraints added, more accurate predictions and outputs can be obtained.

[0101] The human pose estimation method provided in this embodiment introduces constraints beyond the difference between the predicted and actual positions of joints, based on the prior knowledge that the error magnitude is smaller when the error directions of two corresponding joint points of the same joint are the same. By simply changing the loss function and introducing constraints on the error directions of two nodes of the same joint, the convergence speed of training and the accuracy of the final training effect can be improved. Since the change of the loss function is relatively simple, it can be easily extended to other fields related to pose estimation. No other modifications are required for the same joint point model, making it highly portable.

[0102] Example 2

[0103] Furthermore, embodiments of this disclosure provide a human posture estimation device.

[0104] Specifically, such as Figure 4 As shown, the human posture estimation device 400 includes:

[0105] The construction module 410 is used to construct an initial detection model, and to train the initial detection model based on a preset training set and a preset loss function to obtain a corrected detection model; wherein, the preset training set is a set of labeled data including human key points, and the preset loss function includes position loss and error penalty term;

[0106] The acquisition module 420 is used to acquire the image to be detected based on real-time images;

[0107] The input module 430 is used to input the image to be detected into the modified detection model to obtain the target result image.

[0108] In one embodiment, the construction module 410 is further configured to:

[0109] The sample image is input into the initial detection model to obtain the initial generation result;

[0110] The training loss between the initial generated result and the real labeled result is calculated using a preset loss function;

[0111] Based on the training loss, the parameters and weights of each layer of the initial detection model are adjusted through backpropagation.

[0112] When the training loss is less than the loss threshold, the current initial detection model is saved as the corrected detection model.

[0113] In one embodiment, the building module is further configured to:

[0114] Through the formula:

[0115] loss = loss direction +MSE;

[0116] Calculate the training loss, where loss direction The initial generated result represents the error penalty term relative to the actual labeled result, and MSE represents the position loss of the initial generated result relative to the actual labeled result.

[0117] In one embodiment, the building module is further configured to:

[0118] Through the formula:

[0119] l1=(x′1-x1, y′1-y1, z′1-z1)

[0120] l2=(x′2-x2, y′2-y2, z′2-z2)

[0121] l2-l1=(x′2-x2-x′1+x1, y′2-y2-y′1+y1, z′2-z2-z′1+z1)

[0122] l diff =|x′2-x2-x′1+x1|+|y′2-y2-y′1+y1|+|z′2-z2-z′1+z1|

[0123]

[0124] Calculate the error penalty term, where l1 is the relative distance between the first endpoint of a joint in the initial generated result and the first endpoint of the real annotation result, l2 is the relative distance between the second endpoint of a joint in the initial generated result and the corresponding endpoint of the real annotation result, (x1, y1, z1) are the coordinates of the first endpoint of the real annotation result, (x′1, y′1, z′1) are the coordinates of the first endpoint of the initial result, (x2, y2, z2) are the coordinates of the second endpoint of the real annotation result, (x′2, y′2, z′2) are the coordinates of the second endpoint of the initial result, and n is the number of human keypoints.

[0125] The human posture estimation device 400 provided in this embodiment can realize the human posture estimation method provided in Embodiment 1 and has the same technical effect. To avoid repetition, it will not be described again here.

[0126] Example 3

[0127] Furthermore, this disclosure provides an electronic device including a memory and a processor. The memory stores a computer program, which, when run on the processor, executes the human pose estimation method provided in Embodiment 1.

[0128] For details, see Figure 5 The electronic device 500 includes: a transceiver 501, a bus interface, and a processor 502. The processor 502 is used to: construct an initial detection model, train the initial detection model based on a preset training set and a preset loss function, and obtain a corrected detection model; wherein, the preset training set is a set of labeled data including human key points, and the preset loss function includes position loss and error penalty terms.

[0129] The image to be detected is acquired based on real-time image processing.

[0130] The image to be detected is input into the modified detection model to obtain the target result image.

[0131] Optionally, the processor 502 is further configured to:

[0132] The sample image is input into the initial detection model to obtain the initial generation result;

[0133] The training loss between the initial generated result and the real labeled result is calculated using a preset loss function;

[0134] Based on the training loss, the parameters and weights of each layer of the initial detection model are adjusted through backpropagation.

[0135] When the training loss is less than the loss threshold, the current initial detection model is saved as the corrected detection model.

[0136] The processor 502 is also used for:

[0137] Through the formula:

[0138] loss = loss direction +MSE;

[0139] Calculate the training loss, where loss direction The initial generated result represents the error penalty term relative to the actual labeled result, and MSE represents the position loss of the initial generated result relative to the actual labeled result.

[0140] The processor 502 is also used for:

[0141] The calculation of the error penalty term includes:

[0142] Through the formula:

[0143] l1=(x′1-x1, y′1-y1, z′1-z1)

[0144] l2=(x′2-x2, y′2-y2, z′2-z2)

[0145] l2-l1=(x′2-x2-x′1+x1, y′2-y2-y′1+y1, z′2-z2-z′1+z1)

[0146] l diff =|x′2-x2-x′1+x1|+|y′2-y2-y′1+y1|+|z′2-z2-z′1+z1|

[0147]

[0148] Calculate the error penalty term, where l1 is the relative distance between the first endpoint of a joint in the initial generated result and the first endpoint of the real annotation result, l2 is the relative distance between the second endpoint of a joint in the initial generated result and the corresponding endpoint of the real annotation result, (x1, y1, z1) are the coordinates of the first endpoint of the real annotation result, (x′1, y′1, z′1) are the coordinates of the first endpoint of the initial result, (x2, y2, z2) are the coordinates of the second endpoint of the real annotation result, (x′2, y′2, z′2) are the coordinates of the second endpoint of the initial result, and n is the number of human keypoints.

[0149] In this embodiment of the invention, the electronic device 500 further includes a memory 503. Figure 5 In this context, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits together, represented by one or more processors (processor 502) and memory (memory 503). The bus architecture can also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. The bus interface provides an interface. The transceiver 501 can be multiple elements, including transmitters and receivers, providing a unit for communicating with various other devices over a transmission medium. The processor 502 is responsible for managing the bus architecture and general processing, and the memory 503 can store data used by the processor 502 during operation.

[0150] The electronic device 500 provided in this embodiment of the invention can implement the human posture estimation method described in Embodiment 1 and has the same technical effect. To avoid repetition, it will not be described again here.

[0151] Example 4

[0152] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the human pose estimation method provided in Embodiment 1.

[0153] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.

[0154] The computer-readable storage medium provided in this embodiment can implement the human pose estimation method provided in Embodiment 1. To avoid repetition, it will not be described again here.

[0155] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.

[0156] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0157] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of protection of this application, and all of these forms are within the protection scope of this application.

Claims

1. A method for estimating human pose, characterized in that, The method includes: An initial detection model is constructed, and the initial detection model is trained based on a preset training set and a preset loss function to obtain a corrected detection model; wherein, the preset training set is a set of labeled data including human key points, and the preset loss function includes position loss and error penalty terms; the labeled data includes sample images and real labeled results, and the sample images are input into the initial detection model to obtain the initial generated results; The image to be detected is acquired based on real-time image processing. The image to be detected is input into the modified detection model to obtain the target result image; The calculation of the error penalty term includes: Through the formula: ; Calculate the error penalty term, where, The relative distance between the first endpoint of a joint in the initial generated result and the first endpoint of the actual labeled result. The relative distance between the second endpoint of a joint in the initial generated result and the corresponding endpoint in the actual labeled result. ) represents the coordinates of the first endpoint of the actual annotation result. ) represents the coordinates of the first endpoint of the initial generated result. ) represents the coordinates of the second endpoint of the actual annotation result. ) represents the coordinates of the second endpoint of the initial generated result, and n represents the number of key points on the human body.

2. The human posture estimation method according to claim 1, characterized in that, The step of training the initial detection model based on a preset training set and a preset loss function to obtain a corrected detection model includes: The training loss between the initial generated result and the real labeled result is calculated using a preset loss function; Based on the training loss, the parameters and weights of each layer of the initial detection model are adjusted through backpropagation. When the training loss is less than the loss threshold, the current initial detection model is saved as the corrected detection model.

3. The human posture estimation method according to claim 2, characterized in that, The step of calculating the training loss between the initial generated result and the real labeled result using a preset loss function includes: Through the formula: ; Calculate the training loss, where, This represents the error penalty term of the initial generated result relative to the actual labeled result. This represents the positional loss of the initial generated result relative to the actual labeled result.

4. A human posture estimation device, characterized in that, The device includes: A construction module is used to build an initial detection model, which is trained based on a preset training set and a preset loss function to obtain a corrected detection model. The preset training set is a collection of labeled data including human key points, and the preset loss function includes position loss and error penalty terms. The labeled data includes sample images and real labeled results. The sample images are input into the initial detection model to obtain the initial generated results. The acquisition module is used to acquire the image to be detected based on real-time images; The input module is used to input the image to be detected into the modified detection model to obtain the target result image; The building module is also used for: Through the formula: Calculate the error penalty term, where, The relative distance between the first endpoint of a joint in the initial generated result and the first endpoint of the actual labeled result. The relative distance between the second endpoint of a joint in the initial generated result and the corresponding endpoint in the actual labeled result. ) represents the coordinates of the first endpoint of the actual annotation result. ) represents the coordinates of the first endpoint of the initial generated result. ) represents the coordinates of the second endpoint of the actual annotation result. ) represents the coordinates of the second endpoint of the initial generated result, and n represents the number of key points on the human body.

5. The human posture estimation device according to claim 4, characterized in that, The building module is also used for: The training loss between the initial generated result and the real labeled result is calculated using a preset loss function; Based on the training loss, the parameters and weights of each layer of the initial detection model are adjusted through backpropagation. When the training loss is less than the loss threshold, the current initial detection model is saved as the corrected detection model.

6. The human posture estimation device according to claim 5, characterized in that, The building module is also used for: Through the formula: ; Calculate the training loss, where, This represents the error penalty term of the initial generated result relative to the actual labeled result. This represents the positional loss of the initial generated result relative to the actual labeled result.

7. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program that executes the human pose estimation method according to any one of claims 1 to 3 when the processor is running.

8. A computer-readable storage medium, characterized in that, It stores a computer program that, when run on a processor, executes the human pose estimation method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Human body posture estimation method and device, electronic equipment and storage medium

    CN115346239A

  • Three-dimensional model reconstruction method and device based on deep learning

    CN115908710A