A real-time robust two-stage attitude estimation method

Through the two-stage pose estimation method and the RFCS-YOLOV3 model based on cost-sensitive learning, combined with the spatiotemporal attention mechanism, the positioning accuracy problem in human pose estimation in the presence of multiple people and occlusion is solved, and the detection performance and robustness are improved. sex.

CN114842389BActive Publication Date: 2024-09-17INSPUR QILU SOFTWARE IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210506957.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-11
Publication Date
2024-09-17
Estimated Expiration
2042-05-11

AI Technical Summary

Technical Problem

In human posture estimation, the occlusion of multiple people and body parts in the scene leads to information loss. It is difficult for the model to distinguish whether the occluded parts belong to the same person, which increases the false detection rate and reduces the anti-interference and robustness of the model.

Method used

Adopting a real-time two-stage pose estimation method, using the YOLOV3 target detection model and Fast Pose pose detection model, combined with the RFCS-YOLOV3 model and spatiotemporal attention mechanism based on cost-sensitive learning, to improve key point positioning through affine transformation and data enhancement technology accuracy and reduce the impact of sample class imbalance.

Benefits of technology

It improves the accuracy and stability of human body key point positioning, improves the detection performance of the posture detection model, and reduces the negative effects of the model under the condition of unbalanced sample classes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114842389B
    Figure CN114842389B
Patent Text Reader

Abstract

The present invention discloses a real-time robust two-stage posture estimation method, which belongs to the field of deep learning computer vision technology. The implementation process of the method is as follows: an acquisition device captures a target human image in an external video stream; the target human image is input into a YOLOV3 target detection model in a posture estimation model, the target human position in each frame image is detected and a detection frame is marked to obtain characteristic information of the target human body; the characteristic information of the target human body is passed to a posture detection model Fast Pose to obtain Heat Map data information of key points of the human body in the detection frame; the Heat Map data information obtained is mapped to the original image through an affine transformation operation to obtain an image with human key point annotation information. The present invention can improve the accuracy and stability of positioning key points of the human body and improve the detection performance of the posture detection model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning computer vision technology, and in particular to a real-time robust two-stage posture estimation method. Background Art

[0002] Human posture estimation refers to locating the position of the human body in the scene and detecting the position of the key points of the human posture annotation through the human posture estimation model. The scene here includes a picture or a video stream. When there are many people in the scene and a large number of body parts are blocked, the information of some parts of the body is lost. It is difficult for the human posture estimation model to distinguish whether the blocked body parts belong to the same person, which increases the probability of false detection of the algorithm model, and the anti-interference and robustness of the human posture estimation model will be significantly reduced. Summary of the invention

[0003] The technical task of the present invention is to provide a real-time robust two-stage posture estimation method, which can improve the accuracy and stability of human body key point positioning and improve the detection performance of the posture detection model.

[0004] The technical solution adopted by the present invention to solve its technical problem is:

[0005] A real-time robust two-stage attitude estimation method is implemented as follows:

[0006] 1) The acquisition device captures the target human body image in the external video stream;

[0007] 2) Input the above target human image into the YOLOV3 target detection model in the posture estimation model, detect the position of the target human in each frame image and mark the detection frame to obtain the characteristic information of the target human;

[0008] 3) Pass the characteristic information of the target human body to the posture detection model Fast Pose to obtain the Heat Map data information of the key points of the human body in the detection frame;

[0009] 4) Map the above-obtained Heat Map data information to the original image through affine transformation operation to obtain an image with human body key point annotation information;

[0010] Among them, the YOLOV3 target detection model is modified by the RFCS algorithm based on cost-sensitive learning, that is, the RFCS-YOLOV3 target detection model.

[0011] The camera selected by the acquisition device is a monocular 2D camera. First, the monocular camera is calibrated to eliminate the distortion around the edges of the characters in the photographs and obtain the internal and external parameter matrix.

[0012] Before the video stream enters the YOLOV3 target detection model, it is divided into single frames, and then the characters in each frame are detected.

[0013] Furthermore, the RFCS-YOLOV3 target detection model is trained using the public dataset MSCOCO 2017:

[0014] First, the image enhancement technology is used to preprocess the MSCOCO 2017 dataset, and DarkNet-53 is used to extract the features of the processed images;

[0015] The obtained features are fed into the YOLOV3 detector for detection to obtain a feature map with human body detection frame marking information;

[0016] Since there is an imbalance between positive and negative samples in the data set, the performance of the target detection model will be degraded. In order to reduce the negative impact of the imbalance between different classes of data, this method proposes a cost-sensitive learning-based method to reduce the negative impact caused by the difference in the number of positive and negative samples.

[0017] Furthermore, during the model training process, there will be an imbalance between different classes of data. When the number of negative classes is greater than the number of positive classes, the learning ability of the model will decrease, which will indirectly lead to a decrease in detection performance. The method based on cost-sensitive learning is as follows: different classes are assigned different weights, and different sensitivity factors are set for the loss function during the back propagation of model training, so that the model pays more attention to the wrongly classified sample classes, and the loss of each class is reduced through continuous iteration of the model to improve the detector performance.

[0018] Furthermore, sampling without replacement is performed on the MSCOCO 2017 dataset according to the specified ratio, and occlusion, rotation, and distortion transformation operations are performed on the sampled images. The processed images are spliced ​​and cropped to form a diverse dataset and this dataset is randomly filled in the MSCOCO 2017 dataset.

[0019] Preferably, the proportions of occlusion, rotation, and distortion in the MSCOCO2017 dataset are set to 3%, 3%, and 7%, respectively.

[0020] Preferably, the sampled image is resampled according to a specified ratio, and the pixel values ​​of the obtained image are set to 0 according to a random probability to form a mask; the position of the current mask is recorded, and the pixel values ​​of the image are set to 0 using a random probability for the next mask filling, and the mask position is recorded; if the mask position is repeated, the mask filling is no longer performed, and if the mask position is crossed, the difference set is taken; each mask filling forms a new image;

[0021] Rotate each sampled image with a rotation angle of [0, 45, 90, 135, 180, 225, 270, 315], and form a new image each time;

[0022] Perform elastic distortion affine transformation on the sampled image, and select different elastic factors to distort the image to different degrees; different elastic factors have different distortion degrees on the image, and the selection of elastic factors depends on the standard deviation σ of the selected Gaussian convolution function. If the value of σ is small or large, the randomness is large during the normalization process, which will lead to poor regularity of the generated distorted image. The intermediate σ value has different degrees of directionality and distortion.

[0023] The occluded, rotated, and distorted images are stitched together according to the rotation angles [0, 45, 90, 135, 180, 225, 270, 315], and the stitched images are cropped into a new image according to the specified ratio. The new image has the same width and height as the original image.

[0024] Furthermore, a lightweight posture distillation algorithm model is used to improve the algorithm's reasoning performance, and a spatiotemporal attention mechanism is introduced into the Fast Pose posture detection model to locate the target object in the image.

[0025] Before extracting image features, the teacher model and student model in Fast Pose first use 1×1 convolution to increase the dimension of the image, then connect a 3×3 convolution block, and then connect a 1×1 convolution block to smooth the features; use the hourglass network to train a large teacher network human body estimation model, and the knowledge learned by the teacher model is used to train the target student model. The student model uses a lightweight hourglass network; during the training process, the teacher network provides soft labels for the student network. During testing, the teacher network model is removed and the student network model is directly used for posture estimation;

[0026] The Heat Map data information output by the Fast Pose posture detection model is converted into the original image using a mapping function, and the pixel offset that occurs during the conversion process is corrected using bilinear interpolation.

[0027] Preferably, the cost-sensitive learning method is a weight-sensitive learning method based on Gaussian penalty, using the Hellinger distance to calculate the distance between two continuous distributions (truth boxes) in the space. , prediction box ) distance measure between them;

[0028] First, the Hellinger distance formula for discrete data distribution is introduced, as shown in Formula 1:

[0029] Formula 1

[0030] Further simplifying formula 1, we get formula 2:

[0031] Formula 2

[0032] Then, for two continuous data distributions, a third probability measure is introduced , they are absolutely continuous, as shown in formula 3:

[0033] Formula 3

[0034] Further simplifying formula 4:

[0035] Formula 4

[0036] In formula 3, Defined as the Lebesgue metric, we get formula 5:

[0037] Formula 5

[0038] According to the Cauchy-Schwarz Inequality, the threshold of Formula 5 is Formula 6:

[0039] Formula 6

[0040] The weighted Gaussian penalty function is shown in Formula 7:

[0041] Formula 7

[0042] The regression loss of the traditional YOLOV3 detection frame is further improved, as shown in Formula 8:

[0043] Formula 8.

[0044] The present invention also claims a real-time robust two-stage posture estimation device, at least one 512GB memory, at least one 8-core CPU processor and at least one graphics card of model GTX1080TI or above;

[0045] The at least one 512 GB memory is used to store machine-readable programs;

[0046] The at least one processor is used to call the machine-readable program to execute the above-mentioned real-time robust two-stage posture estimation method;

[0047] The at least one graphics card of GTX1080TI or above is used to accelerate the feature extraction and reasoning speed of each image and execute the above-mentioned real-time robust two-stage posture estimation method.

[0048] The present invention also claims protection for a computer-readable medium having computer instructions stored thereon, which, when executed by a processor, causes the processor to perform the above-mentioned real-time robust two-stage attitude estimation method.

[0049] Compared with the prior art, the real-time robust two-stage posture estimation method of the present invention has the following beneficial effects:

[0050] This method provides a new method for predicting human posture, which can further improve the accuracy and stability of human key point positioning;

[0051] This method provides a new weight adjustment method, which can reduce the negative effects of model post-processing under the condition of sample class imbalance and improve the prediction accuracy of the model;

[0052] This method also provides a new detection box regression loss function to improve the detection box positioning performance of the YOLOv3 object detection model. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 This is a flowchart of a real-time robust two-stage posture estimation method provided by an embodiment of the present invention;

[0054] Figure 2 is a flowchart of the preprocessing of the MSCOCO 2017 dataset provided by an embodiment of the present invention;

[0055] Figure 3 It is a framework diagram of the RFCS-YOLOV3 target detection algorithm provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0056] The present invention will be further described below in conjunction with specific embodiments.

[0057] When training a posture estimation model, in order to enhance the robustness of the posture model, data enhancement methods are usually used to improve the model's anti-interference ability and avoid overfitting during the training process. Common data enhancement methods include: translation, horizontal flipping, cropping, smoothing noise reduction, brightness adjustment, etc. of a single image. However, these data enhancement methods cannot simulate the changes in human posture in real scenes very well. Even with these data enhancement methods, the human posture estimation model cannot detect the position of key body points under conditions such as human body curling up and body part occlusion.

[0058] To address this problem, an embodiment of the present invention provides a real-time robust two-stage posture estimation method, the implementation process of which is as follows:

[0059] 1) The acquisition device captures the target human body image in the external video stream;

[0060] 2) Input the above target human image into the YOLOV3 target detection model in the posture estimation model, detect the position of the target human in each frame image and mark the detection frame to obtain the characteristic information of the target human;

[0061] 3) Pass the characteristic information of the target human body to the posture detection model Fast Pose to obtain the Heat Map data information of the key points of the human body in the detection frame;

[0062] 4) Map the above-obtained Heat Map data information to the original image through affine transformation operation to obtain an image with human body key point annotation information;

[0063] Among them, the acquisition device is used to capture the target human body image in the external video stream. The camera selected is a monocular 2D camera. The monocular camera is first calibrated to eliminate the distortion at the edges around the characters in the photographs and obtain the internal and external parameter matrix.

[0064] The video stream is divided into single pictures before entering the YOLOV3 target detection model, and then the characters in each frame are detected. The YOLOV3 target detection model is modified by the RFCS algorithm based on cost-sensitive learning to become the RFCS-YOLOV3 target detection model.

[0065] The RFCS-YOLOV3 target detection model is trained using the public dataset MSCOCO 2017:

[0066] First, the image enhancement technology is used to preprocess the MSCOCO 2017 dataset, and DarkNet-53 is used to extract the features of the processed images;

[0067] The obtained features are fed into the YOLOV3 detector for detection to obtain a feature map with human body detection frame marking information;

[0068] Since there is an imbalance between positive and negative samples in the data set, the performance of the target detection model will be degraded. In order to reduce the negative impact of the imbalance between different classes of data, this method proposes a cost-sensitive learning-based method to reduce the negative impact caused by the difference in the number of positive and negative samples.

[0069] During the model training process, there will be an imbalance between different classes of data. When the number of negative classes is greater than that of positive classes, the learning ability of the model will decrease, which will indirectly lead to a decrease in detection performance. The method based on cost-sensitive learning is as follows: different classes are assigned different weights, and different sensitivity factors are set for the loss function during the back propagation of model training, so that the model pays more attention to the wrongly classified sample classes, and the loss of each class is reduced through continuous iteration of the model to improve the detector performance.

[0070] Sampling without replacement is performed on the MSCOCO 2017 dataset according to a certain ratio, and occlusion, rotation, and distortion transformation operations are performed on the sampled images. The processed images are spliced ​​and cropped to form a diverse dataset and this dataset is randomly filled in the MSCOCO 2017 dataset.

[0071] The sampled image is resampled at a certain ratio, and the pixel values ​​of the obtained image are set to 0 according to random probability to form a mask; the current mask position is recorded, and the next mask filling continues to use random probability to set the pixel values ​​of the image to 0, and the mask position is recorded; if the mask position is repeated, the mask filling is no longer performed, and if the mask position is crossed, the difference set is taken; each mask filling forms a new image;

[0072] Rotate each sampled image with a rotation angle of [0, 45, 90, 135, 180, 225, 270, 315], and form a new image each time;

[0073] Perform elastic distortion affine transformation on the sampled image, and select different elastic factors to distort the image to different degrees; different elastic factors have different distortion degrees on the image, and the selection of elastic factors depends on the standard deviation σ of the selected Gaussian convolution function. If the value of σ is small or large, the randomness is large during the normalization process, which will lead to poor regularity of the generated distorted image. The intermediate σ value has different degrees of directionality and distortion.

[0074] The occluded, rotated, and distorted images are stitched together according to the rotation angles [0, 45, 90, 135, 180, 225, 270, 315], and the stitched images are cropped into a new image according to the specified ratio. The new image has the same width and height as the original image.

[0075] A lightweight posture distillation algorithm model is used to improve the algorithm's reasoning performance. A spatiotemporal attention mechanism is introduced into the Fast Pose posture detection model to locate the target object in the image.

[0076] The Heat Map data information output by the Fast Pose posture detection model is converted into the original image using a mapping function, and the pixel offset that occurs during the conversion process is corrected using bilinear interpolation.

[0077] First, the target detector is used to obtain the position of the person in the image and mark the bounding box, and then the key points of the human body are detected in each bounding box; the two-stage pose estimation algorithm is very sensitive to the accuracy of bounding box positioning in the target detection model. In this method, the target detection model adopts the YOLOV3 (You Only Look Once) one-stage target detector, and the pose detection model adopts the lightweight Fast Pose model based on knowledge distillation; in view of the long-tail distribution phenomenon of samples that is prone to occur in the post-processing of the target detection model, this method proposes the RFCS (Rethinking Feature Cost-Sensitive Learning) algorithm based on cost-sensitive learning to reduce the impact of inaccurate target positioning caused by uneven sample distribution.

[0078] Experiments have shown that the RFCS algorithm proposed in this patent improves the detection performance of the YOLOV3 target detector for small targets, and further improves the detection performance of the posture detection model.

[0079] The following is a detailed description of this embodiment with reference to the accompanying drawings:

[0080] The human posture prediction algorithm model framework includes the acquisition of external video stream (or the input of a single image), the target detection module, and the human posture prediction module.

[0081] The acquisition of external video stream or picture uses an external camera of the terminal device in this method, but is not limited to an external camera, and can also be a handheld home terminal device such as a mobile phone, a tablet computer, a camera, etc. The external camera can choose a wired connection or a wireless connection to transmit data remotely to a storage device of a cloud server. The human body image in the acquired video stream is the human body posture data to be detected. The human body in the video stream here can be a spliced ​​clip of multiple pictures or a synthetic image.

[0082] Before inputting the acquired video stream into the detection model, the width and height of the video stream need to be scaled proportionally according to the image size that the model can process. The processed image enters the target detection model of the human posture detection model to extract image features and detect whether there is a target human body in the image. If so, the detection frame is marked for the target human body, otherwise it is not marked.

[0083] The result output by the target detection model is passed to the Fast Pose human posture detection model. The human posture detection model analyzes the feature data transmitted by the target detection model and extracts the human body information with the target detection frame in the feature data. The human body information includes the outer contour information of the target human body and the position information of the target human body relative to the whole picture. The target human body contour information has strong semantic information. When there are many target human bodies in the image and there are body parts occlusion, the target human body contour information can be used to more accurately locate each target human body part information. The human posture detection model detects the human body key points of the target human body in the detection frame. In this method, 17 key points are used to mark the target human body. These 17 key points include: the target human body's nose, left eye, right eye, left ear, right ear, left shoulder, right shoulder, left elbow, right elbow, left wrist, right wrist, left hip, right hip, left knee, right knee, left ankle, and right ankle. A key point is marked at each human joint.

[0084] Figure 2 This is the data flow diagram of the MSCOCO 2017 dataset. The proportions of α, β, and γ in the flowchart are set to 3%, 3%, and 7% of the MSCOCO2017 dataset, respectively.

[0085] Figure 3 The figure shows the processing flow chart of the RFCS-YOLOV3 target detection model. The traditional YOLOV3 target detection model has a fast inference speed and good detection effect for medium and large objects (medium target scale: (32x32, 96x96), large target scale: >96x96), but the detection accuracy of small objects (target scale: <32x32) still needs to be improved. We propose a method based on cost-sensitive learning of loss function called RFCS.

[0086] When an image is processed in a neural network, the shallow neural network has good object entity information, including object contours, colors and other texture information. It is conducive to detecting small target objects; the deep neural network contains relatively less small object information, and retains more entity information of medium and large objects. Therefore, the deep neural network is suitable for detecting medium and large objects, and has good semantic information in the deep neural network, but is not conducive to the detection of small target objects. Therefore, the detection accuracy of the target detection model for small target objects will decrease and the loss will increase. For the hard examples in model detection (Hard Example, which refers to the samples with large errors from the true value label during prediction), the cost-sensitive learning method is introduced to improve the performance of hard example mining. Give greater weights to the samples that are misclassified in the target detection network, and give smaller weights to the samples that are correctly detected. It should be noted that if the weight value is too large during the reverse transmission of the neural network, it is easy to cause gradient explosion, which will cause the loss function to fail to converge, and the neural network will not learn new knowledge, further leading to poor detection performance. Common weight control methods include clipping. Weight clipping will lead to uneven weight distribution. The weights will be concentrated at the edge of the clipping threshold, which will lead to a decrease in the convergence of the neural network and make it difficult to train the network model. In order to solve the above problem, a weight-sensitive learning method based on Gaussian penalty is introduced. The Hellinger Distance (HD) is used to calculate the distance between two continuous distributions in the space ( :Bounding Box, : The distance measure between prediction boxes (PredictionBox). First, the Hellinger distance formula when the data is discretely distributed is introduced, as shown in Formula 1:

[0087] Formula 1

[0088] Further simplifying formula 1, we get formula 2:

[0089] Formula 2

[0090] Next, for two continuous data distributions, a third probability measure λ is introduced, which is absolutely continuous between them, as shown in Formula 3:

[0091] Formula 3

[0092] Further simplifying formula 4:

[0093] Formula 4

[0094] Defining λ in Formula 3 as the Lebesgue metric yields Formula 5:

[0095] Formula 5

[0096] According to the Cauchy-Schwarz Inequality, the threshold of Formula 5 is Formula 6:

[0097] Formula 6

[0098] The weighted Gaussian penalty function is shown in Formula 7:

[0099] Formula 7

[0100] The regression loss of the traditional YOLOV3 detection frame is further improved, as shown in Formula 8, where λ is the weight coefficient. In this embodiment, the value of λ is 2:

[0101] Formula 8.

[0102] The proposed RFCS-YOLOV3 can adaptively adjust the weights of the classified incorrect samples according to the fluctuation of the incorrect samples. The improvement of the regression loss of the detection frame of the traditional YOLOV3 target detector improves the accuracy and stability of the detection frame positioning in the YOLOV3 detection stage, and further improves the accuracy of the key point annotation of the human posture detection model.

[0103] In the Fast Pose process of the human pose detection model, Fast Pose uses knowledge distillation technology, and the data makes the model lighter and the inference speed faster. Before extracting image features, the teacher model and student model in Fast Pose first use 1×1 convolution to increase the dimension of the image, then connect a 3×3 convolution block, and then connect a 1×1 convolution block to smooth the features. Use the hourglass network to train a large teacher (Teacher Network) human body estimation model, and the knowledge learned by the teacher model is used to train the target student model. The student model uses a lightweight hourglass network. During the training process, the teacher network provides soft labels for the student network. During testing, the teacher network model is removed, and the student network model is directly used for pose estimation.

[0104] The posture estimation result in the previous step is transformed into the original image through an affine function to obtain an image with human key points marked. In this transformation process, the information loss caused by image scaling is prone to inaccurate target positioning. Bilinear interpolation is used to calculate a new position through linear weighted average of the original image position and the four adjacent pixel values ​​around it. This new position is the transformed mapping position. Since the error between the new position and the target position in the original image is the smallest, the use of bilinear interpolation can further improve the detection accuracy of the posture estimation model.

[0105] Model deployment: Quantify the trained model and deploy it on a domestic AI accelerator card. Input a human image or video stream, use the model for prediction, and return the key point detection results of the predicted target person.

[0106] The embodiment of the present invention also provides a real-time robust two-stage posture estimation device, comprising: at least one 512GB memory, at least one 8-core CPU processor and at least one graphics card of model GTX1080TI or above;

[0107] The at least one 512 GB memory is used to store machine-readable programs;

[0108] The at least one processor is used to call the machine-readable program to execute the real-time robust two-stage posture estimation method described in the above embodiment;

[0109] The at least one graphics card of GTX1080TI or above is used to accelerate the feature extraction and reasoning speed of each image, and execute the real-time robust two-stage posture estimation method described in the above embodiment.

[0110] The embodiment of the present invention further provides a computer-readable medium, on which computer instructions are stored, and when the computer instructions are executed by a processor, the processor executes the real-time robust two-stage posture estimation method described in the above embodiment. Specifically, a system or device equipped with a storage medium can be provided, on which a software program code for implementing the functions of any of the above embodiments is stored, and a computer (or CPU or GPU) of the system or device reads and executes the program code stored in the storage medium.

[0111] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute a part of the present invention.

[0112] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer via a communication network.

[0113] In addition, it should be clear that the functions of any of the above embodiments can be implemented not only by executing the program code read by the computer, but also by enabling an operating system operating on the computer to complete part or all of the actual operations based on instructions from the program code.

[0114] In addition, it can be understood that the program code read from the storage medium is written to a memory provided in an expansion board inserted into the computer or written to a memory provided in an expansion unit connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or the expansion unit is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above-mentioned embodiments.

[0115] The present invention is shown and described in detail above through the accompanying drawings and preferred embodiments. However, the present invention is not limited to these disclosed embodiments. Based on the above multiple embodiments, those skilled in the art can know that the code review methods in the above different embodiments can be combined to obtain more embodiments of the present invention, and these embodiments are also within the protection scope of the present invention.

Claims

1. A real-time robust two-stage attitude estimation method, characterized in that The implementation process of this method is as follows: 1) The acquisition device captures the target human body image in the external video stream; 2) Input the above target human image into the YOLOV3 target detection model in the posture estimation model, detect the position of the target human in each frame image and mark the detection frame to obtain the characteristic information of the target human; 3) Pass the characteristic information of the target human body to the posture detection model Fast Pose to obtain the Heat Map data information of the key points of the human body in the detection frame; 4) Map the above-obtained Heat Map data information to the original image through affine transformation operation to obtain an image with human body key point annotation information; The YOLOV3 target detection model is modified by the RFCS algorithm based on cost-sensitive learning, that is, the RFCS-YOLOV3 target detection model; Sampling without replacement is performed on the MSCOCO 2017 dataset according to a given ratio, and the sampled image is resampled according to the specified ratio. The pixel values ​​of the obtained image are set to 0 according to random probability to form a mask; the current mask position is recorded, and the next mask filling continues to use random probability to set the pixel values ​​of the image to 0, and the mask position is recorded; if the mask position is repeated, the mask filling is no longer performed, and if the mask position is crossed, the difference set is taken; each mask filling forms a new image; Rotate each sampled image with a rotation angle of [0, 45, 90, 135, 180, 225, 270, 315], and form a new image each time; Perform elastic distortion affine transformation on the sampled image, and select different elastic factors to distort the image to different degrees; The occluded, rotated, and distorted images are stitched together according to the rotation angles [0, 45, 90, 135, 180, 225, 270, 315], and the stitched images are cropped into a new image according to the specified ratio. The new image has the same width and height as the original image.

2. A real-time robust two-stage attitude estimation method according to claim 1, characterized in that The RFCS-YOLOV3 target detection model is trained using the public dataset MSCOCO 2017: First, the image enhancement technology is used to preprocess the MSCOCO 2017 dataset, and DarkNet-53 is used to extract the features of the processed images; The obtained features are fed into the YOLOV3 detector for detection to obtain a feature map with human body detection frame annotation information; The cost-sensitive learning-based method reduces the negative impact of the difference in the number of positive and negative samples on the detection performance of the model.

3. A real-time robust two-stage attitude estimation method according to claim 2, characterized in that The method based on cost-sensitive learning is as follows: different weights are assigned to different classes, and different sensitivity factors are set for the loss function during the back propagation of model training, so that the model pays more attention to the misclassified sample classes, and the loss of each class is reduced through continuous iteration of the model to improve the detector performance.

4. A real-time robust two-stage attitude estimation method according to claim 2, characterized in that Sampling without replacement is performed on the MSCOCO 2017 dataset according to the specified ratio, and occlusion, rotation, and distortion transformation operations are performed on the sampled images. The processed images are spliced ​​and cropped to form a diverse dataset and this dataset is randomly filled in the MSCOCO 2017 dataset.

5. A real-time robust two-stage attitude estimation method according to claim 4, characterized in that The proportions of occlusion, rotation, and distortion in the MSCOCO2017 dataset are set to 3%, 3%, and 7%, respectively.

6. A real-time robust two-stage attitude estimation method according to claim 1, characterized in that A lightweight posture distillation algorithm model is used to improve the algorithm's reasoning performance. A spatiotemporal attention mechanism is introduced into the Fast Pose posture detection model to locate the target object in the image. Before extracting image features, the teacher model and student model in Fast Pose first use 1×1 convolution to increase the dimension of the image, then connect a 3×3 convolution block, and then connect a 1×1 convolution block to smooth the features; use the hourglass network to train a large teacher human body estimation model, and the knowledge learned by the teacher model is used to train the target student model. The student model uses a lightweight hourglass network; during the training process, the teacher network provides soft labels for the student network. During testing, the teacher network model is removed and the student network model is directly used for posture estimation; The Heat Map data information output by the Fast Pose posture detection model is converted into the original image using a mapping function, and the pixel offset that occurs during the conversion process is corrected using bilinear interpolation.

7. A real-time robust two-stage attitude estimation method according to claim 3, characterized in that The cost-sensitive learning method is a weight-sensitive learning method based on Gaussian penalty, which uses the Hellinger distance to calculate two continuous distributions (truth boxes) in the space. , prediction box ) distance measure between them; First, the Hellinger distance formula for discrete data distribution is introduced, as shown in Formula 1: Formula 1 Further simplifying formula 1, we get formula 2: Formula 2 Then, for two continuous data distributions, a third probability measure is introduced: , they are absolutely continuous, and the Hellinger distance is shown in formula 3: Formula 3 Further simplifying formula 4: Equation 4 In formula 3, Defined as the Lebesgue metric, we get Formula 5: Formula 5 According to Cauchy–Schwarz Inequality, the threshold of Formula 5 is Formula 6: Formula 6 The weighted Gaussian penalty function is shown in Formula 7: Formula 7 The regression loss of the traditional YOLOV3 detection frame is further improved, as shown in Formula 8: Formula 8.

8. A real-time robust two-stage attitude estimation device, characterized in that include: At least one 512GB memory, at least one 8-core CPU processor and at least one graphics card of GTX1080TI or above; The at least one 512 GB memory is used to store machine-readable programs; The at least one processor is configured to call the machine-readable program to execute the method according to any one of claims 1 to 7; The at least one graphics card of model GTX1080TI or above is used to accelerate the feature extraction and reasoning speed of each image, and execute any method described in claims 1 to 7.

9. A computer-readable medium, characterized in that The computer readable medium stores computer instructions, which, when executed by a processor, cause the processor to execute the method according to any one of claims 1 to 7.