Improved human body posture estimation algorithm based on YOLOv8n-Pose

By improving the YOLOv8n-Pose algorithm and enhancing feature extraction and multi-scale target recognition, the problem that human posture estimation technology cannot provide real-time warnings of fall risk has been solved, thus achieving accuracy in personalized health management and posture analysis.

CN119049116AInactive Publication Date: 2024-11-29NORTHEAST FORESTRY UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410520211.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-28
Publication Date
2024-11-29
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing human posture estimation technologies cannot provide real-time warnings of potential fall risks and cannot meet the needs of personalized health management. Traditional methods have slowed down the health process.

Method used

We adopt a human pose estimation algorithm based on YOLOv8n-Pose, which enhances feature extraction and multi-scale target recognition capabilities and improves key point localization by introducing an EMA attention module at the end of the backbone network, using a novel C2f-EMSC module and an improved EIOU loss function.

Benefits of technology

It improves the real-time performance and accuracy of human posture estimation, enabling the provision of personalized health management solutions, reducing the risk of falls, and improving quality of life.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119049116A_ABST
    Figure CN119049116A_ABST
Patent Text Reader

Abstract

The invention discloses an improved human body posture estimation algorithm based on YOLOv8n-Pose, and the algorithm comprises the following steps: YOLOv8n-Pose-EMSC: introducing an EMA attention module at the tail end of a backbone network, so as to enhance the feature extraction capability of a network model; a brand-new C2f-EMSC module is adopted, so that the recognition and detection capability of a multi-scale target is enhanced; a loss function is improved by adopting EIOU, so that the positioning effect of the key points of the human body is improved; ablation and contrast tests are carried out in a self-made COCO 2017mini data set, the improved algorithm provided by verification can further improve the overall performance of the YOLOv8n-Pose algorithm in the aspects of calculation amount and detection precision, the method helps medical institutions and rehabilitation centers to provide personalized treatment schemes, rehabilitation and health management are promoted, and the method is suitable for clinical application. Posture problems and chronic pain possibly caused in daily life are reduced, so that the life quality is improved, and wide market prospects are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a human body posture estimation algorithm based on an improvement of YOLOv8n-Pose. Background Art

[0002] With the rapid development of global science and technology and the deepening of digital transformation, human posture estimation technology, as an important branch of artificial intelligence, has gradually shown its great application potential in health services and elderly care services. As early as 1973, psychologists first proposed and experimented with posture estimation of human movement by installing light-emitting bodies on various joints of the human body, opening the precedent for research on human posture estimation. In the following decades, with the advancement of computer technology and artificial intelligence algorithms, human posture estimation technology has experienced rapid development from initial exploration to deep learning applications. Especially since 2013, the introduction of a series of innovative models such as DeepPose, CNN, and Flow Convnet has greatly promoted the accuracy and practicality of single-person posture estimation and multi-person posture estimation, making human posture estimation technology widely used in health monitoring, sports training, telemedicine and other fields; posture estimation is an important task in computer vision, and it is also an indispensable part of computer understanding of human movements and behaviors;

[0003] The current human posture estimation technology cannot provide real-time warning of potential fall risks due to individual differences and diversity of physical conditions. Traditional health management methods have been unable to meet personalized needs and reduce health progress. Summary of the invention

[0004] In this embodiment, a human posture estimation algorithm based on the improvement of YOLOv8n-Pose is provided to solve the problem that the current human posture estimation technology in the prior art cannot warn of potential fall risks in real time due to individual differences and diversity of physical conditions. Traditional health management methods have been difficult to meet personalized needs and reduce the problem of health progress.

[0005] The present invention achieves the above-mentioned object through the following technical scheme, a human body posture estimation algorithm based on YOLOv8n-Pose improvement, the human body posture estimation algorithm based on YOLOv8n-Pose improvement comprises the following steps:

[0006] S1, YOLOv8n-Pose-EMSC: Introducing the EMA attention module at the end of the backbone network to enhance the feature extraction capability of the network model;

[0007] S2, adopts the new C2f-EMSC module to enhance the recognition and detection capabilities of multi-scale targets;

[0008] S3, using EIOU to improve the loss function, so as to improve the positioning effect of key points of the human body;

[0009] S4. Ablation and comparative experiments are carried out in the self-made COCO 2017mini dataset to verify that the proposed improved algorithm can further improve the overall performance of the YOLOv8n-Pose algorithm in terms of computational complexity and detection accuracy.

[0010] Preferably, the YOLOv8 is a model that takes both speed and accuracy into consideration in a single-stage target detection algorithm, and is known for its high-speed and accurate target detection. According to the scale and complexity of the model, the smallest version of YOLOv8, i.e., YOLOv8n, has a network structure that mainly includes an input terminal, a feature extractor, a feature fusion device, and a detector; the YOLOv8 structure generally follows the YOLOv5 model, and introduces the currently popular anchor-free prediction structure, a feature extraction structure of a part of the stacked convolution, and a weighted loss calculation method on its basis. The entire model is mainly divided into four parts: an input terminal, a backbone network, a neck network, and a prediction head. The input image first undergoes a mosaic data enhancement operation at the input terminal to increase data complexity, and then gradually extracts features through the backbone part to obtain feature maps of different scales, and then the feature maps of different scales are fused by the neck module, and finally the head module adjusts the feature map size according to the task requirements and outputs the prediction result.

[0011] Preferably, the backbone part uses a new feature extraction module C2F to replace the C3 module in the YOLOv5 model backbone; the C2F module includes a slicing operation, two 1×1 convolution operations, n bottleneck operations and a splicing operation. The first 1×1 convolution realizes the cross-channel information interaction of the input feature map. The slicing operation divides the feature map into two in the channel dimension. Half of the feature map is stacked through n bottleneck operations in sequence, and then the result of each bottleneck operation is spliced ​​with the feature map after the first convolution; finally, the second 1×1 convolution operation is used to compress the number of channels of the spliced ​​feature map to the input feature map. Figure 1 This ensures that the model is lightweight while obtaining richer gradient information.

[0012] Preferably, in the head part, the YOLOv8 model changes from the coupled head in the YOLOv5 model to the current mainstream decoupled head, separates the classification and positioning prediction heads, and discards the object branch. Therefore, the model also changes from an anchor-based prediction method to an anchor-free method, omitting the design process of the priori box, saving the time required to remove redundant boxes in the model prediction process. When calculating the loss, the YOLOv8 model adopts the positive and negative sample matching strategy in TOOD (task aligned one-stage object detection):

[0013] t=s α +u β

[0014] Where: s is the classification prediction score, u is the intersection-over-union ratio of the predicted box and the true box, and α and β are weighted hyperparameters.

[0015] Preferably, when calculating the regression loss, a distribution focal loss (DFL)

[22] is added to the original C-intersection over union (CIOU) loss. The DFL loss enables the network to focus on the vicinity of the target location. The calculation method is as follows:

[0016] DFL(S i , S i+1 )=-(y i+1 -y i )lg(S i )+(y-yi)lg(S i+1 )

[0017] Where y is the true label, yi and yi+1 are the two quality labels adjacent to the true label, and Si and Si+1 are the model sigmoid outputs corresponding to the quality labels;

[0018] In YOLOX-s, the position regression loss function uses the intersection over union (IoU) between the predicted box and the true box as the loss calculation, which only considers the overlapping area between the predicted box and the true box, and cannot optimize the predicted box that does not intersect with the true box, and ignores the position information of the predicted box. In view of the characteristics of garbage targets such as various shapes and concentrated stacking, the EIoU loss function proposed by Zhang is introduced, which comprehensively considers three geometric factors, namely the overlap between the predicted box and the true box, the center point distance, and the length and width difference; its calculation formula is defined as:

[0019]

[0020] Where bgt, wgt, hgt and b, w, h are the center point, side width and side length of the real box and the predicted box respectively; c, C2w, Ch2 are the diagonal, side width and side length of the minimum circumscribed rectangle of the real box and the predicted box respectively; EIoU loss is just a simple superposition of overlap loss, center distance loss and width and height loss; at different stages of training, the center distance loss and width and height loss have different degrees of importance to the position and size between the predicted box and the real box. On this basis, a weighted EIoU loss function is proposed, and its calculation formula is as follows:

[0021]

[0022] Where λ is the weighting coefficient, λ∈[]0,1; when λ is 0, the weighted EIoU loss degenerates into DIoU loss

[22] ; however, manually adjusting the loss weight requires multiple experiments to confirm the optimal λ, which is not very practical; the IoU value between the predicted box and the true box gradually changes with the training iterations, so λ is set to the IoU value. In the early stage of training, the IoU value between the predicted box and the true box is small, and the center distance loss dominates, which makes the predicted box close to the true box; after training to a certain extent, the IoU value between the predicted box and the true box is a large value, and the height-width loss dominates, which makes the predicted box closer to the true box; from formula (4), we can get

[0023]

[0024] In summary, the weighted IoU-EIoU loss is used to replace the IoU loss in the YOLOX-s algorithm, and the improved total loss function is:

[0025] L loss =L cls +L obj +γ1L loU -EIoU(bbox, bbox gt )+γ2L loU-EIoU (bbox refine , bbox gt );

[0026] Preferably, the method for predicting human key points includes a method based on coordinate regression, a method based on heat map, and a classification-based method proposed in recent years; the fundamental difference between these methods lies in the expression form of the key point position coordinates; after the cropped human image is subjected to feature extraction by a convolutional network, the obtained features will be predicted through a convolution or fully connected layer, the method based on coordinate regression directly calculates the coordinates of the key points through the fully connected layer, the method based on heat map converts the key point coordinates into the expression form of a heat map, and indirectly predicts the position of the key points through a layer of convolution, and the method based on classification predicts the horizontal and vertical coordinates of the key points respectively through two fully connected layers.

[0027] Preferably, the coordinate regression-based method directly uses the key point coordinates as the supervisory signal for network learning, which is the most intuitive expression of key point prediction. The DeepPose algorithm is a classic method based on coordinate regression. The deep features extracted by the convolutional neural network are directly regressed to the coordinate points through the fully connected network to obtain the final output. In the training stage, the L2 optimization loss is used.

[0028]

[0029] The coordinate regression method can directly output coordinates and has a fast training speed.

[0030] Preferably, the input end mainly preprocesses the data, that is, resets all input images to 640x640, and then uses Mosaic for subsequent feature extraction. The main task of the feature extractor is to extract features from the input image and provide feature maps of different levels for the feature fusion.

[0031] Preferably, the key task of the feature fuser in target detection is to effectively fuse multi-scale feature maps to construct a feature pyramid, which helps the model better understand targets of different sizes and complexities.

[0032] Preferably, the detector (Head) as the last part of the model adopts a decoupled head structure, which includes two parallel branches for extracting target category features and position features respectively, and each branch uses a 1x1 convolution layer to perform classification and positioning tasks.

[0033] The beneficial effects of the present invention are as follows: the human posture estimation algorithm based on the improvement of YOLOv8n-Pose in the present invention introduces an EMA attention module at the end of the backbone network to enhance the feature extraction capability of the network model; adopts a new C2f-EMSC module to enhance the recognition and detection capabilities of multi-scale targets; adopts an EIOU improved loss function to improve the positioning effect of key points of the human body, and helps medical institutions and rehabilitation centers to provide personalized treatment plans by accurately evaluating and monitoring the user's motion posture, promote rehabilitation and health management, reduce posture problems and chronic pain that may be caused in daily life, thereby improving the quality of life, and has broad market prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a flow chart of the human body posture estimation algorithm of the present invention;

[0035] Figure 2 This is a flow chart of the camera calibration method of the present invention;

[0036] Figure 3 It is the human body posture estimation graph of the present invention. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] Embodiment 1:

[0039] A human body posture estimation algorithm based on YOLOv8n-Pose improvement, the human body posture estimation algorithm based on YOLOv8n-Pose improvement comprises the following steps:

[0040] S1, YOLOv8n-Pose-EMSC: Introducing the EMA attention module at the end of the backbone network to enhance the feature extraction capability of the network model;

[0041] S2, adopts the new C2f-EMSC module to enhance the recognition and detection capabilities of multi-scale targets;

[0042] S3, using EIOU to improve the loss function, so as to improve the positioning effect of key points of the human body;

[0043] S4. Ablation and comparative experiments are carried out in the self-made COCO 2017mini dataset to verify that the proposed improved algorithm can further improve the overall performance of the YOLOv8n-Pose algorithm in terms of computational complexity and detection accuracy.

[0044] Preferably, the YOLOv8 is a model that takes both speed and accuracy into consideration in a single-stage target detection algorithm, and is known for its high-speed and accurate target detection. According to the scale and complexity of the model, the smallest version of YOLOv8, i.e., YOLOv8n, has a network structure that mainly includes an input terminal, a feature extractor, a feature fusion device, and a detector; the YOLOv8 structure generally follows the YOLOv5 model, and introduces the currently popular anchor-free prediction structure, a feature extraction structure of a part of the stacked convolution, and a weighted loss calculation method on its basis. The entire model is mainly divided into four parts: an input terminal, a backbone network, a neck network, and a prediction head. The input image first undergoes a mosaic data enhancement operation at the input terminal to increase data complexity, and then gradually extracts features through the backbone part to obtain feature maps of different scales, and then the feature maps of different scales are fused by the neck module, and finally the head module adjusts the feature map size according to the task requirements and outputs the prediction result.

[0045] Preferably, the backbone part uses a new feature extraction module C2F to replace the C3 module in the YOLOv5 model backbone; the C2F module includes a slicing operation, two 1×1 convolution operations, n bottleneck operations and a splicing operation. The first 1×1 convolution realizes the cross-channel information interaction of the input feature map. The slicing operation divides the feature map into two in the channel dimension. Half of the feature map is stacked through n bottleneck operations in sequence, and then the result of each bottleneck operation is spliced ​​with the feature map after the first convolution; finally, the second 1×1 convolution operation is used to compress the number of channels of the spliced ​​feature map to the input feature map. Figure 1 This ensures that the model is lightweight while obtaining richer gradient information.

[0046] Preferably, in the head part, the YOLOv8 model changes from the coupled head in the YOLOv5 model to the current mainstream decoupled head, separates the classification and positioning prediction heads, and discards the object branch. Therefore, the model also changes from an anchor-based prediction method to an anchor-free method, omitting the design process of the priori box, saving the time required to remove redundant boxes in the model prediction process. When calculating the loss, the YOLOv8 model adopts the positive and negative sample matching strategy in TOOD (task aligned one-stage object detection):

[0047] t=s α +u β

[0048] Where: s is the classification prediction score, u is the intersection-over-union ratio of the predicted box and the true box, and α and β are weighted hyperparameters.

[0049] Preferably, when calculating the regression loss, a distribution focal loss (DFL)

[22] is added to the original C-intersection over union (CIOU) loss. The DFL loss enables the network to focus on the vicinity of the target location. The calculation method is as follows:

[0050] DFL(S i , S i+1 )=-(y i+1 -y i )lg(S i )+(yy i )lg(S i+1 )

[0051] Where y is the true label, yi and yi+1 are the two quality labels adjacent to the true label, and Si and Si+1 are the model sigmoid outputs corresponding to the quality labels;

[0052] In YOLOX-s, the position regression loss function uses the intersection over union (IoU) between the predicted box and the true box as the loss calculation, which only considers the overlapping area between the predicted box and the true box, and cannot optimize the predicted box that does not intersect with the true box, and ignores the position information of the predicted box. In view of the characteristics of garbage targets such as various shapes and concentrated stacking, the EIoU loss function proposed by Zhang is introduced, which comprehensively considers three geometric factors, namely the overlap between the predicted box and the true box, the center point distance, and the length and width difference; its calculation formula is defined as:

[0053]

[0054] Where bgt, wgt, hgt and b, w, h are the center point, side width and side length of the real box and the predicted box respectively; c, C2w, Ch2 are the diagonal, side width and side length of the minimum circumscribed rectangle of the real box and the predicted box respectively; EIoU loss is just a simple superposition of overlap loss, center distance loss and width and height loss; at different stages of training, the center distance loss and width and height loss have different degrees of importance to the position and size between the predicted box and the real box. On this basis, a weighted EIoU loss function is proposed, and its calculation formula is as follows:

[0055]

[0056] Where λ is the weighting coefficient, λ∈[]0,1; when λ is 0, the weighted EIoU loss degenerates into DIoU loss

[22] ; however, manually adjusting the loss weight requires multiple experiments to confirm the optimal λ, which is not very practical; the IoU value between the predicted box and the true box gradually changes with the training iterations, so λ is set to the IoU value. In the early stage of training, the IoU value between the predicted box and the true box is small, and the center distance loss dominates, which makes the predicted box close to the true box; after training to a certain extent, the IoU value between the predicted box and the true box is a large value, and the height-width loss dominates, which makes the predicted box closer to the true box; from formula (4), we can get

[0057]

[0058] In summary, the weighted IoU-EIoU loss is used to replace the IoU loss in the YOLOX-s algorithm, and the improved total loss function is:

[0059] L loss =L cls +L obj +γ1L IoU-EIoU (bbox, bbox gt )+γ2L IoU-EIoU (bbox refine , bbox gt );

[0060] Preferably, the method for predicting human key points includes a method based on coordinate regression, a method based on heat map, and a classification-based method proposed in recent years; the fundamental difference between these methods lies in the expression form of the key point position coordinates; after the cropped human image is subjected to feature extraction by a convolutional network, the obtained features will be predicted through a convolution or fully connected layer, the method based on coordinate regression directly calculates the coordinates of the key points through the fully connected layer, the method based on heat map converts the key point coordinates into the expression form of a heat map, and indirectly predicts the position of the key points through a layer of convolution, and the method based on classification predicts the horizontal and vertical coordinates of the key points respectively through two fully connected layers.

[0061] Preferably, the coordinate regression-based method directly uses the key point coordinates as the supervisory signal for network learning, which is the most intuitive expression of key point prediction. The DeepPose algorithm is a classic method based on coordinate regression. The deep features extracted by the convolutional neural network are directly regressed to the coordinate points through the fully connected network to obtain the final output. In the training stage, the L2 optimization loss is used.

[0062]

[0063] The coordinate regression method can directly output coordinates and has a fast training speed.

[0064] Preferably, the input end mainly preprocesses the data, that is, resets all input images to 640x640, and then uses Mosaic for subsequent feature extraction. The main task of the feature extractor is to extract features from the input image and provide feature maps of different levels for the feature fusion.

[0065] Preferably, the key task of the feature fuser in target detection is to effectively fuse multi-scale feature maps to construct a feature pyramid, which helps the model better understand targets of different sizes and complexities.

[0066] Preferably, the detector (Head) as the last part of the model adopts a decoupled head structure, which includes two parallel branches for extracting target category features and position features respectively, and each branch uses a 1x1 convolution layer to perform classification and positioning tasks.

[0067] Among them, the Zhang Zhengyou calibration method was used to calibrate the three cameras to obtain the internal and external parameters and distortion coefficients of the cameras; the least squares method based on the weight optimization of the YOLOv8n-Pose-EMSC algorithm and the traditional least squares method were used to conduct three-dimensional reconstruction experiments on human postures, and compared and verified with the actual limb measurements. The results show that compared with the least squares method, the least squares weight optimization algorithm based on YOLOv8n-Pose-EMSC has significant advantages, and the MAPE error value is reduced by 21% to 6%, and the average reduction is 15.95%, which effectively improves the accuracy of three-dimensional reconstruction of human postures.

[0068] The formula is the expression of the ray li from camera i to target point P in the world coordinate system. From the geometric relationship, it can be seen that the 3D reconstruction process of multi-view vision is actually the process of solving the intersection of multiple rays emitted by the camera. However, there is inevitable noise in the data, which causes the calculated rays to deviate from the real rays, resulting in multiple rays not intersecting at one point. There is no analytical solution, so it is necessary to estimate the spatial position of the target point. When estimating the target point, the traditional least squares algorithm ignores the confidence of the pixel point, resulting in low accuracy in capturing 3D motion data. Therefore, this study combines the confidence parameter of OpenPose and proposes a multi-view reconstruction optimization algorithm based on weight optimization. This method takes the spatial point with the minimum distance to multiple straight lines in space as the intersection of multiple rays.

[0069] After the target coordinate system is established, the target object is moved to a random new position in the binocular vision system, and the target coordinate system noa no longer overlaps with the visual coordinate system XYZ of the vision system. The orientation of the coordinate system noa in the coordinate system XYZ will be used to represent the position and posture of the target object. Solving the position and posture of the target object is to calculate the transformation relationship between the two coordinate systems. Suppose coordinate system A represents the target coordinate system and coordinate system B represents the world coordinate system. The coordinate values ​​of the point set {P1, P2, …, Pn} in coordinate system A are {P1A, P2A, …, PnA}, and the coordinate values ​​in coordinate system B are {P1B, P2B, …, PnB}. BAP is the position and posture of the target coordinate system in the world coordinate system of the vision system, BAR is the rotation matrix, and BAT is the displacement vector. We have:

[0070]

[0071]

[0072] It can be further expressed as

[0073]

[0074] The solution is obtained by singular value decomposition (SVD). The goal of the solution is to minimize the residual root mean square (least squares estimation), that is, to minimize the value.

[0075]

[0076] When the residual root mean square between all points in two sets of point sets is the smallest, the residual between the centroid points of the two sets of point sets is zero, and the following formula is obtained:

[0077]

[0078]

[0079]

[0080] According to the imaging principle of the camera, the imaging of a three-dimensional space point on the camera can be represented by a pinhole imaging model, which is expressed as follows:

[0081]

[0082] Where: u, v are the projected pixel coordinates of the spatial point on the imaging plane; fx and fy are the horizontal and vertical focal lengths of the camera respectively; u0, v0 are the pixel coordinates of the intersection of the camera optical axis and the imaging plane; fx, fy, u0, v0 are the internal parameters of the camera; R, T are the rotation matrix and translation matrix from the world coordinate system to the camera coordinate system, which are called the external parameters of the camera; xw, yw, zw are the three-dimensional coordinates of a certain joint point; zc is an arbitrary scale factor. If Ri, Ti are the rotation matrix and translation matrix from the world coordinate system to the camera i coordinate system respectively, let Mi = []Ri Ti, then the mapping relationship between the three-dimensional point coordinates P (Xw, Yw, Zw) and the pixel coordinates of the image of the point in a certain camera can be deduced from the formula, as shown:

[0083]

[0084] Where: (ui vi) is the pixel coordinate of the projection point of the joint point P in the i-th camera; αi, βi, γi are the internal parameters of camera i. If the transformation matrix of the world coordinate system converted to the i-th camera is mi, then the expression of mi is:

[0085]

[0086]

[0087] Expand to get

[0088]

[0089]

[0090] The above-mentioned improved human pose estimation algorithm based on YOLOv8n-Pose uses Zhang Zhengyou's calibration method to calibrate the three cameras to obtain the internal and external parameters and distortion coefficients of the cameras; the least squares method based on the weight optimization of the YOLOv8n-Pose-EMSC algorithm and the traditional least squares method are used to conduct three-dimensional reconstruction experiments on human poses, and compared and verified with the actual limb measurement values. The results show that compared with the least squares method, the least squares weight optimization algorithm based on YOLOv8n-Pose-EMSC has significant advantages, and the MAPE error value is reduced by 21% to 6%, and the average reduction is 15.95%, which effectively improves the accuracy of three-dimensional reconstruction of human poses.

[0091] Fitness field application

[0092] Fitness guidance and movement correction: By real-time monitoring and analyzing the user's posture during fitness, the technology can provide users with instant feedback, point out the deficiencies in their movements, and provide suggestions for improvement. It's like having a virtual senior fitness coach by your side, helping users avoid incorrect exercise postures, reduce the risk of injury, and improve the efficiency and effectiveness of exercise.

[0093] Personalized fitness plan generation: Automatically generate a personalized fitness plan based on the user's physical condition and posture analysis results. This can help users perform more scientific and reasonable exercises based on their physical condition and fitness goals.

[0094] Medical field applications

[0095] Body shaping: Through precise body posture analysis, the technology can provide customized body shaping solutions for those seeking beauty, and help people shape their ideal body shape through scientific exercise and posture correction. At the same time, it can also be used to evaluate and display changes in body posture before and after body shaping surgery, providing more reference information for doctors and patients.

[0096] Medical physical examination: In terms of physical examination and health assessment, this technology can provide accurate body measurement data such as height, arm span, weight distribution, etc. through 3D posture reconstruction. These data are crucial for assessing individual health status and formulating rehabilitation plans.

[0097] Foot and spine rehabilitation: For patients with spinal problems and foot diseases, accurate posture analysis can help doctors diagnose the condition, evaluate the efficacy, and provide targeted rehabilitation training guidance. For example, patients with scoliosis can monitor the progress of correction and rehabilitation through regular posture analysis.

[0098] Surgical planning and evaluation: In some surgeries that require precise manipulation, such as orthopedic surgery, this technology can provide accurate body posture and bone structure analysis of the patient, helping doctors to develop surgical plans and evaluate recovery after surgery.

[0099] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.

[0100] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. An improved human pose estimation algorithm based on YOLOv8n-Pose, Features: The improved human posture estimation algorithm based on YOLOv8n-Pose includes the following steps: S1, YOLOv8n-Pose-EMSC: Introducing the EMA attention module at the end of the backbone network to enhance the feature extraction capability of the network model; S2, adopts the new C2f-EMSC module to enhance the recognition and detection capabilities of multi-scale targets; S3, using EIOU to improve the loss function, so as to improve the positioning effect of key points of the human body; S4. Ablation and comparative experiments are carried out in the self-made COCO 2017mini dataset to verify that the proposed improved algorithm can further improve the overall performance of the YOLOv8n-Pose algorithm in terms of computational complexity and detection accuracy.

2. According to the improved human posture estimation algorithm based on YOLOv8n-Pose according to claim 1, Features: The YOLOv8 is a model that takes both speed and accuracy into consideration in a single-stage target detection algorithm. It is known for its high-speed and accurate target detection. According to the scale and complexity of the model, the smallest version of YOLOv8 is YOLOv8n. The network structure of YOLOv8n mainly includes an input end, a feature extractor, a feature fusion device, and a detector. The YOLOv8 structure roughly follows the YOLOv5 model, and introduces the currently popular anchor-free prediction structure, a feature extraction structure of partial stacked convolution, and a weighted loss calculation method on its basis. The entire model is mainly divided into four parts: an input end, a backbone network, a neck network, and a prediction head. The input image first undergoes a mosaic data enhancement operation at the input end to increase the data complexity, and then gradually extracts features through the backbone part to obtain feature maps of different scales, and then the feature maps of different scales are fused by the neck module. Finally, the head module adjusts the size of the feature map according to the task requirements and outputs the prediction result.

3. According to the improved human posture estimation algorithm based on YOLOv8n-Pose according to claim 2, Features: In the backbone part, a new feature extraction module C2F is used to replace the C3 module in the YOLOv5 model backbone; the C2F module includes a slicing operation, two 1×1 convolution operations, n bottleneck operations and a splicing operation. The first 1×1 convolution realizes the cross-channel information interaction of the input feature map. The slicing operation divides the feature map into two in the channel dimension. Half of the feature map is stacked through n bottleneck operations in sequence, and then the result of each bottleneck operation is spliced ​​with the feature map after the first convolution; finally, the second 1×1 convolution operation is used to compress the number of channels of the spliced ​​feature map to the same number of channels as the input feature map, which ensures the lightweight of the model while obtaining richer gradient information.

4. According to the improved human posture estimation algorithm based on YOLOv8n-Pose according to claim 2, Features: In the head part, the YOLOv8 model changes from the coupled head in the YOLOv5 model to the current mainstream decoupled head, separating the classification and positioning prediction heads, and discarding the object branch. Therefore, the model also changes from the prediction method based on the prior box (anchor-based) to the anchor-free method, omitting the design process of the prior box, saving the time required to remove redundant boxes in the model prediction process. When calculating the loss, the YOLOv8 model adopts the positive and negative sample matching strategy in TOOD (task aligned one-stage object detection): t=s α +u β Where: s is the classification prediction score, u is the intersection-over-union ratio of the predicted box and the true box, and α and β are weighted hyperparameters.

5. According to the improved human posture estimation algorithm based on YOLOv8n-Pose according to claim 1, Features: When calculating the regression loss, the distribution focal loss (DFL) [22] is added to the original C-intersection over union (CIOU) loss. The DFL loss makes the network focus on the neighborhood of the target location. The calculation method is as follows: DFL(S i ,S i+1 )=-(y i+1 -y i )lg(S i )+(y-y i )lg(S i+1 ) Where y is the true label, yi and yi+1 are the two quality labels adjacent to the true label, and Si and Si+1 are the model sigmoid outputs corresponding to the quality labels; In YOLOX-s, the position regression loss function uses the intersection over union (IoU) between the predicted box and the true box as the loss calculation, which only considers the overlapping area between the predicted box and the true box, and cannot optimize the predicted box that does not intersect with the true box, and ignores the position information of the predicted box. In view of the characteristics of garbage objects such as various shapes and concentrated stacking, the EIoU loss function proposed by Zhang is introduced, which comprehensively considers three geometric factors, namely the overlap between the predicted box and the true box, the center point distance, and the length and width difference. Its calculation formula is defined as: Where bgt, wgt, hgt and b, w, h are the center point, side width and side length of the real box and the predicted box respectively; c, C2w, Ch2 are the diagonal, side width and side length of the minimum circumscribed rectangle of the real box and the predicted box respectively; EIoU loss is just a simple superposition of overlap loss, center distance loss and width and height loss; at different stages of training, the center distance loss and width and height loss have different degrees of importance to the position and size between the predicted box and the real box. On this basis, a weighted EIoU loss function is proposed, and its calculation formula is as follows: Where λ is the weighting coefficient, λ∈[]0,1; when λ is 0, the weighted EIoU loss degenerates into DIoU loss[22]; however, manually adjusting the loss weight requires multiple experiments to confirm the optimal λ, which is not very practical; the IoU value between the predicted box and the true box gradually changes with the training iterations, so λ is set to the IoU value. In the early stage of training, the IoU value between the predicted box and the true box is small, and the center distance loss dominates, which makes the predicted box close to the true box; after training to a certain extent, the IoU value between the predicted box and the true box is a large value, and the height-width loss dominates, which makes the predicted box closer to the true box; from formula (4), we can get In summary, the weighted IoU-EIoU loss is used to replace the IoU loss in the YOLOX-s algorithm, and the improved total loss function is: L loss =L cls +L obj +γ 1 L IoU -AND IoU (bbox,bbox gt )+γ 2 L IoU-EIoU (bbox refine ,bbox gt )。 6. The human body posture estimation algorithm based on YOLOv8n-Pose improvement according to claim 1, Features: The methods for predicting human key points include methods based on coordinate regression, methods based on heat maps, and methods based on classification proposed in recent years; the fundamental difference between these methods lies in the expression form of the key point position coordinates; after the cropped human image is subjected to feature extraction by a convolutional network, the obtained features will be predicted through a convolution or fully connected layer, the method based on coordinate regression directly calculates the coordinates of the key points through a fully connected layer, the method based on heat maps converts the key point coordinates into the expression form of a heat map, and indirectly predicts the position of the key points through a layer of convolution, and the method based on classification predicts the horizontal and vertical coordinates of the key points respectively through two fully connected layers.

7. The human body posture estimation algorithm based on YOLOv8n-Pose improvement according to claim 6, Features: The coordinate regression-based method directly uses the key point coordinates as the supervision signal for network learning, which is the most intuitive expression of key point prediction. The DeepPose algorithm is a classic method based on coordinate regression. The deep features extracted by the convolutional neural network are directly regressed to the coordinate points through the fully connected network to obtain the final output. In the training stage, the L2 optimization loss is used. The coordinate regression method can directly output coordinates and has a fast training speed.

8. According to the improved human posture estimation algorithm based on YOLOv8n-Pose according to claim 2, Features: The input end mainly performs data preprocessing, that is, resetting all input images to 640x640, and then using Mosaic for subsequent feature extraction. The main task of the feature extractor is to extract features from the input image and provide feature maps of different levels for the feature fusion.

9. The human body posture estimation algorithm based on YOLOv8n-Pose improvement according to claim 2, Features: The key task of the feature fuser in target detection is to effectively fuse multi-scale feature maps to construct a feature pyramid, which helps the model better understand targets of different sizes and complexities.

10. The human body posture estimation algorithm based on YOLOv8n-Pose improvement according to claim 2, Features: The detector (Head) as the last part of the model adopts a decoupled head structure, which includes two parallel branches for extracting target category features and position features respectively. Each branch uses a 1x1 convolutional layer to perform classification and positioning tasks.