A two-dimensional human posture estimation method and device based on self-distillation

By introducing the self-distillation module and DSNT layer into HRNet, the problem of balancing computational efficiency and accuracy of human posture estimation methods on resource-constrained devices is solved, and more accurate key point positioning and efficient posture recognition are achieved.

CN118447539BActive Publication Date: 2024-10-15HUAQIAO UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410899748.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-15
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

Existing human posture estimation methods based on deep convolutional neural networks have limited computing power and storage space on resource-constrained devices, making it difficult to balance accuracy and efficiency. Moreover, coordinate errors of key points generated by Gaussian functions lead to inaccurate positioning.

Method used

Using a two-dimensional human pose estimation method based on self-distillation, by constructing a high-resolution HRNet network, introducing a multi-dimensional scale fusion part and a self-distillation module, the DSNT layer is used to regress key point coordinates to generate a prediction heat map, reduce pixel errors, and A lightweight design is introduced into the network to improve recognition performance.

Benefits of technology

It improves the accuracy of precise positioning of key points, reduces calculation parameters and the number of operations, is suitable for resource-constrained devices, and improves the accuracy of single and multi-person gesture recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118447539B_ABST
    Figure CN118447539B_ABST
Patent Text Reader

Abstract

The present invention discloses a two-dimensional human posture estimation method and device based on self-distillation, which relates to the field of computer vision and includes the following steps: S101, obtaining a data set including two-dimensional human body images; S102, constructing a human posture detection high-resolution network based on HRNet; wherein the human posture detection high-resolution network includes a preprocessing layer, a multi-dimensional scale fusion part, a self-distillation module, a convolution layer and a DSNT layer; S103, using the human posture detection high-resolution network to process the two-dimensional human body images in the data set, obtain a predicted heat map, and complete human posture estimation. The lightweight human posture detection high-resolution network of the present invention introduces a self-distillation module and a DSNT module, realizes the distillation network learning and the precise positioning of key points in human posture detection, has a good recognition accuracy for single-person posture distillation and multi-person posture recognition, and has low calculation parameters and number of operations while improving the accuracy of human posture recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer vision, and in particular to a two-dimensional human body posture estimation method and device based on self-distillation. Background Art

[0002] 2D human posture estimation technology has important application value in many fields, such as human-computer interaction, virtual reality, medical image analysis, etc. In the field of human-computer interaction, 2D human posture estimation technology can help computers better understand human actions and intentions, thereby achieving a more natural and intelligent interaction method; in the field of virtual reality, 2D human posture estimation technology can help achieve a more realistic and immersive virtual environment; in the field of medical image analysis, 2D human posture estimation technology can help doctors diagnose diseases and evaluate treatment effects more accurately.

[0003] In recent years, human posture estimation based on deep convolutional neural networks mostly uses HRNet as the backbone network and has achieved relatively advanced performance. However, as the network depth increases, the corresponding computing time and memory consumption also increase, which makes computing power and storage space still the main problems restricting the deployment of posture recognition models on resource-constrained devices; and the key point coordinates generated by the Gaussian function are mostly integers. Even if the heat map is restored without any error, key point pixel errors will occur, which is not conducive to the precise positioning of key points; in addition, the application scenarios of posture estimation have high real-time requirements, and accuracy and speed are usually difficult to balance. Therefore, it is difficult for current methods to strike a balance between accuracy and efficiency. For example, methods with higher accuracy often have lower speed, while lightweight models that focus on speed improvement have difficulty in achieving high accuracy. Summary of the invention

[0004] In order to overcome the above problems in the prior art, the present invention proposes a two-dimensional human posture estimation method and device based on self-distillation.

[0005] On the one hand, a two-dimensional human posture estimation method based on self-distillation comprises the following steps:

[0006] S101, acquiring a data set including a two-dimensional human body image;

[0007] S102, building a high-resolution network for human posture detection based on HRNet;

[0008] S103, using a high-resolution human posture detection network to process the two-dimensional human body images in the data set, obtain a predicted heat map, and complete human posture estimation;

[0009] The human posture detection high-resolution network includes:

[0010] The preprocessing layer preprocesses the images in the input data set and inputs the preprocessed images into the multi-dimensional scaling fusion part;

[0011] The multi-dimensional scale fusion part includes stage one, stage two, stage three and stage four; among them, stage one includes 1 parallel input branch and 1 multi-resolution module; stage two includes 2 parallel input branches and 1 multi-resolution module; stage three includes 3 parallel input branches and 4 multi-resolution modules; stage four includes 4 parallel input branches and 3 multi-resolution modules;

[0012] Each multi-resolution module consists of four residual blocks and a convolutional layer for multi-dimensional scale fusion; the residual block of the multi-resolution module in stage one is a three-layer residual structure; the residual block of the multi-resolution module in stage two is a two-layer residual structure; the residual block of the multi-resolution module in stage three is a two-layer residual structure; the residual block of the multi-resolution module in stage four is a two-layer residual structure; for stages two and three, the last multi-resolution module in each stage performs strided convolution fusion on the image features of all branches, and convolves the fused results to generate a new branch as the input branch of the next stage; the resolution size of the newly added branch is half of the resolution size of the previous branch, and the number of channels is twice that of the previous branch;

[0013] Each stage of the multi-dimensional scale fusion part outputs feature representation to the self-distillation module, and the image after feature fusion from stage 4 is output to the convolution layer; the self-distillation module constructs the self-distillation loss using the feature representation of the four stages of the multi-dimensional scale fusion part;

[0014] Convolutional layer, which converts the number of channels of the image from the multi-dimensional scale fusion part into the number of key points in the dataset, and outputs the key point set to the DSNT layer;

[0015] The DSNT layer regresses the key point coordinates in the key point set to generate a prediction heat map.

[0016] Preferably, the preprocessing layer of the high-resolution network for human posture detection is as follows:

[0017] The preprocessing layer consists of two convolutional layers and a nonlinear activation layer RELU. After the input image passes through this part, the number of channels changes from the original unknown number of channels C to 64. The preprocessed image is directly input into the multi-dimensional scale fusion part; the convolution operation f(x) of the preprocessing part is expressed as:

[0018] f(x)=σ(f(W2*f(W1*x+B1)+B2))

[0019] Among them, x represents the input image, W1 and W2 represent the weights in the first and second convolution layers, B1 and B2 represent the biases in the first and second convolution layers, and σ represents the RELU activation function.

[0020] Preferably, the multi-dimensional scale fusion part of the human posture detection high-resolution network is implemented as follows:

[0021] The output feature of the residual block in the multi-resolution module is expressed as:

[0022]

[0023] Where i represents the stage, j represents the branch, r represents the sequence number of the residual block, M represents the number of input channels, and N represents the number of output channels;

[0024] Output of the first residual block in stage 1 It is expressed as:

[0025]

[0026] Here, conv represents the convolution operation and σ represents the RELU activation function; therefore, the output of the multi-resolution module in stage 1 is It is expressed as:

[0027]

[0028] Since there is only one branch in stage 1 and no multi-scale fusion is performed, a new branch is generated in stage 1. The operations are:

[0029]

[0030] Among them, ∪ represents the separator, represents the input of the first parallel branch of the multi-resolution module in stage 2, represents the input of the second parallel branch of the multi-resolution module in stage 2;

[0031] The last multi-resolution module in stage 2 performs multi-scale fusion and convolution process to generate new branches It is expressed as:

[0032]

[0033] The convolution operation is performed using a convolution kernel of size 3×3, and upsampling is performed using the nearest neighbor interpolation method with a convolution kernel size of 1×1. represents the input of the first parallel branch of the multi-resolution module in stage 3, represents the input of the second parallel branch of the multi-resolution module in stage 3, represents the input of the third parallel branch of the multi-resolution module in stage three;

[0034] After stacking once in stage 3, the last multi-resolution module performs multi-scale fusion and convolution process to generate new branches It is expressed as:

[0035]

[0036] In stage three, this process is repeated four times. After four times of stacking, the output of the third branch of stage three is passed through a conv structure to obtain a new branch that is downsampled 32 times as the fourth parallel input of stage four.

[0037] After stacking once in stage 4, the last multi-resolution module performs a convolution process of multi-scale fusion. It is expressed as:

[0038]

[0039] Among them, stage 4 repeats this process twice and stacks it as the output of stage 4;

[0040] The feature representation of each stage of the multi-dimensional scaling fusion part is as follows:

[0041]

[0042] in Represents the high-dimensional features of stage one, represents the high-dimensional features of the second stage, Represents the high-dimensional features of the third stage, Represents the high-dimensional features of the fourth stage. The sizes of each high-dimensional feature are (B, 64, 48, 32), where B represents the batch size of the input image data, 64 represents the image feature channel dimension, and 48 and 32 represent the width and height of the image feature, respectively;

[0043] The multi-resolution modules in the multi-dimensional scale fusion part all contain high-dimensional features. The high-dimensional features of the last layer are expressed as High-dimensional features at different stages The dimensions are the same, (B, 64, 48, 32).

[0044] Preferably, the self-distillation module of the high-resolution network for human posture detection is implemented as follows:

[0045] calculate and The L2 norm between completes the first stage of self-distillation, and its calculation formula is as follows:

[0046]

[0047] Among them, ||·||2 represents the L2 norm;

[0048] The calculation formulas for self-distillation in the second, third and fourth stages are as follows:

[0049]

[0050] The total loss of the self-distillation module self The calculation formula is as follows:

[0051]

[0052] Preferably, the convolutional layer and DSNT layer of the high-resolution network for human posture detection are specifically implemented as follows:

[0053] The 1×1 convolutional layer converts the number of channels of the image into the number of key points K in the data set, and then the DSNT module regresses the key point coordinates to generate a heat map;

[0054] The process of key point regression in the DSNT module is as follows:

[0055] Construct matrices X and Y. The matrix construction formula is as follows:

[0056]

[0057] Where a = 1, ..., m, b = 1, ..., n; a represents the number of matrix rows; b represents the number of matrix columns; X a,b represents the element in the ath row and bth column of matrix X; Y a,b represents the element in the ath row and bth column of the matrix Y; m represents the number of matrix rows of the regularized key point coordinate feature map, and n represents the number of matrix columns of the regularized key point coordinate feature map; the set Z represents the K key point sets to be output at the end of the network, and the size of each key point feature map is m×n. The softmax function is used to regularize Z, and the regularized set is represented as in is the feature map of the kth key point coordinates after regularization, represented by a matrix of size m×n;

[0058] The formula for generating heat maps by the DSNT module is as follows:

[0059]

[0060] in, and They respectively represent the coordinates of the key points generated after the F-normal form calculation;

[0061] The overall loss Loss of the two-dimensional posture estimation method based on self-distillation is calculated as follows:

[0062]

[0063] in, is the original network loss, and Represent the heatmaps of the network prediction heatmap and the true value heatmap of the kth key point, represents the mean square error loss function, and α and β represent weight coefficients.

[0064] On the other hand, a two-dimensional human posture estimation device based on self-distillation includes:

[0065] An image acquisition module, used to acquire a data set including a two-dimensional human body image;

[0066] The high-resolution network module for human posture detection is used to build a high-resolution network for human posture detection based on HRNet; the high-resolution network for human posture detection includes a preprocessing layer, a multi-dimensional scale fusion part, a self-distillation module, a convolutional layer, and a DSNT layer;

[0067] The predicted heat map acquisition module is used to process the two-dimensional human images in the data set using a high-resolution human posture detection network to obtain a predicted heat map and complete human posture estimation;

[0068] The human posture detection high-resolution network includes:

[0069] The preprocessing layer preprocesses the images in the input data set and inputs the preprocessed images into the multi-dimensional scaling fusion part;

[0070] The multi-dimensional scale fusion part includes stage one, stage two, stage three and stage four; among them, stage one includes 1 parallel input branch and 1 multi-resolution module; stage two includes 2 parallel input branches and 1 multi-resolution module; stage three includes 3 parallel input branches and 4 multi-resolution modules; stage four includes 4 parallel input branches and 3 multi-resolution modules;

[0071] Each multi-resolution module consists of four residual blocks and a convolutional layer for multi-dimensional scale fusion; the residual block of the multi-resolution module in stage one is a three-layer residual structure; the residual block of the multi-resolution module in stage two is a two-layer residual structure; the residual block of the multi-resolution module in stage three is a two-layer residual structure; the residual block of the multi-resolution module in stage four is a two-layer residual structure; for stages two and three, the last multi-resolution module in each stage performs strided convolution fusion on the image features of all branches, and convolves the fused results to generate a new branch as the input branch of the next stage; the resolution size of the newly added branch is half of the resolution size of the previous branch, and the number of channels is twice that of the previous branch;

[0072] Each stage of the multi-dimensional scale fusion part outputs feature representation to the self-distillation module, and the image after feature fusion from stage 4 is output to the convolution layer;

[0073] The self-distillation module uses the feature representation of the four stages of multi-dimensional fusion to construct the self-distillation loss;

[0074] Convolutional layer, which converts the number of channels of the image from the multi-dimensional scale fusion part into the number of key points in the dataset, and outputs the key point set to the DSNT layer;

[0075] The DSNT layer regresses the key point coordinates in the key point set to generate a prediction heat map.

[0076] Compared with the prior art, the present invention has the following beneficial effects:

[0077] (1) The present invention improves the HRNet network and adds a DSNT module for regressing the key point coordinates to generate a heat map. In the traditional method, the key point coordinates generated by the Gaussian function are mostly integers. Even if the heat map is restored without error, it will cause key point pixel errors, which is not conducive to accurately locating the key points. Compared with the original network that uses the Gaussian function to generate the heat map, in the low-resolution heat map, the effect of the DSNT module of the present invention is better than that of the heat map generated by the Gaussian function. The DSNT module retains the key points of the human body and the overall spatial information while eliminating the pixel errors caused by directly using the Gaussian function to generate the heat map, which is helpful for the learning of the distillation network and the accurate positioning of the key points.

[0078] (2) The present invention includes a lightweight high-resolution network that has lower computational parameters and number of operations while maintaining posture recognition accuracy, and can meet the requirements of running on resource-constrained devices.

[0079] (3) The present invention introduces a self-distillation module, which enables the high-resolution network for human posture detection to have not only a good recognition accuracy for single-person posture distillation, but also a great improvement in the accuracy of multi-person posture recognition, and the recognition performance set recognition accuracy is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] The present invention is further described in detail below in conjunction with the accompanying drawings;

[0081] Figure 1 Flow chart of a two-dimensional human body posture estimation method based on self-distillation according to an embodiment of the present invention;

[0082] Figure 2 A schematic diagram of the structure of a high-resolution network for human posture detection according to an embodiment of the present invention;

[0083] Figure 3 The present invention is a block diagram of a two-dimensional human body posture estimation device based on self-distillation according to an embodiment of the present invention. DETAILED DESCRIPTION

[0084] In order to further explain the technical solution of the present invention, the present invention is described in detail below through specific embodiments.

[0085] The present invention proposes a two-dimensional human posture estimation method based on self-distillation, which improves the model's ability to obtain better feature extraction by refining the feature representation information under different structures of the model and constructing self-distillation loss, thereby improving the accuracy of the model without additionally increasing the model's inference speed.

[0086] like Figure 1 As shown, a two-dimensional human posture estimation method based on self-distillation includes the following steps:

[0087] S101, acquiring a data set including a two-dimensional human body image;

[0088] S102, building a high-resolution network for human posture detection based on HRNet;

[0089] S103, using a high-resolution human posture detection network to process the two-dimensional human body images in the data set, obtain a predicted heat map, and complete human posture estimation.

[0090] like Figure 2As shown, in this embodiment, the structure of the high-resolution network for human posture detection constructed is as follows: first, there is a preprocessing layer, followed by a multi-dimensional scale fusion part. The multi-dimensional scale fusion part consists of four stages and a total of 9 multi-resolution modules. The feature representation at each stage is obtained and input into the self-distillation module to assist the posture detection model in constructing a self-distillation loss to guide the previous stage to obtain a feature extraction capability similar to that of stage four from the feature representation level, thereby improving the overall information extraction capability of the model and enabling the model to obtain more information about key points of the human body during the forward reasoning process.

[0091] Finally, the predicted heat map is output through the convolution layer and the DSNT layer.

[0092] Specifically, the preprocessing layer consists of two convolutional layers and a nonlinear activation layer RELU. After the input two-dimensional human image passes through this part, the number of channels changes from the original C to 64. The preprocessed image can be directly input into the multi-dimensional scale fusion part. The convolution operation f(x) of the preprocessing part can be expressed as:

[0093] f(x)=σ(f(W2*f(W1*x+B1)+B2))

[0094] Among them, x represents the input two-dimensional human image, W1 and W2 represent the weights in the first and second convolution layers, B1 and B2 represent the biases in the first and second convolution layers, and σ represents the RELU activation function.

[0095] Furthermore, the multi-dimensional scale fusion part includes four stages, with a total of 9 multi-resolution modules. Stage 1, stage 2, stage 3, and stage 4 contain 1, 1, 4, and 3 multi-resolution modules respectively, and each multi-resolution module consists of 4 residual blocks and convolution layers for multi-dimensional scale fusion. The residual block of the multi-resolution module in stage 1 is a three-layer residual structure, and the residual blocks in other stages are all two-layer residual structures. Each stage contains 1, 2, 3, and 4 parallel branches respectively; for stage 2 and stage 3, the last multi-resolution module of each stage performs strided convolution fusion on the image features of all branches, and convolves the fused results to generate new branches. The resolution size of the newly added branch is half the resolution size of the previous branch, and the number of channels is twice that of the previous branch. The output features of the residual block in the multi-resolution module are defined as:

[0096]

[0097] Among them, i represents the stage, j represents the branch, r represents the sequence number of the residual block, M represents the number of input channels, and N represents the number of output channels.

[0098] Output of the first residual block in stage 1 It can be expressed as:

[0099]

[0100] Here, conv represents the convolution operation and σ represents the RELU activation function. Therefore, the output of the multi-resolution module in stage 1 is Defined as:

[0101]

[0102] Since there is only one branch in stage 1 and no multi-scale fusion is performed, a new branch is generated in stage 1. The operations are:

[0103]

[0104] Among them, ∪ represents the separator, represents the input of the first parallel branch of the multi-resolution module in stage 2, Represents the input of the second parallel branch of the multi-resolution module in stage 2.

[0105] The last multi-resolution module in stage 2 performs multi-scale fusion and convolution process to generate new branches It can be expressed as:

[0106]

[0107] The convolution operation is performed using a convolution kernel of size 3×3, and upsampling is performed using the nearest neighbor interpolation method with a convolution kernel size of 1×1. represents the input of the first parallel branch of the multi-resolution module in stage 3, represents the input of the second parallel branch of the multi-resolution module in stage 3, Represents the input of the third parallel branch of the multi-resolution module in stage three.

[0108] After stacking once in stage 3, the last multi-resolution module performs multi-scale fusion and convolution process to generate new branches It can be expressed as:

[0109]

[0110] In stage 3, this process is repeated four times. After four times of stacking, the output of the third branch of stage 3 is passed through a conv structure to obtain a new branch that is downsampled by 32 times as the fourth parallel input of stage 4.

[0111] After stacking once in stage 4, the last multi-resolution module performs a convolution process of multi-scale fusion It can be expressed as:

[0112]

[0113] Among them, stage four needs to repeat this process twice and then use it as the output of the fourth stage.

[0114] Furthermore, the features of stage one, stage two, stage three and stage four are represented as follows:

[0115]

[0116] in, represents the high-dimensional features of the first stage, represents the high-dimensional features of the second stage, Represents the high-dimensional features of the third stage, Represents the high-dimensional features of the fourth stage. The sizes of each high-dimensional feature are (B, 64, 48, 32), where B represents the batch size of the input image data, 64 represents the image feature channel dimension, and 48 and 32 represent the width and height of the image feature, respectively.

[0117] The multi-resolution modules in the multi-scale feature fusion part all contain high-dimensional features, and obtain the high-dimensional feature representation of the last layer. At this time and at different stages of high-dimensional features The dimensions are the same, (B, 64, 48, 32).

[0118] calculate and The L2 norm between completes the first stage of self-distillation, and its calculation formula is as follows:

[0119]

[0120] Here, ||·||2 represents the L2 norm.

[0121] The self-distillation in the second, third and fourth stages is the same as that in the first stage, and the calculation formula is as follows:

[0122]

[0123] The total loss of the self-distillation module self , and its calculation formula is as follows:

[0124]

[0125] Furthermore, the 1×1 convolutional layer at the end of the network converts the number of channels of the image into the number of key points K in the dataset, and then regresses the key point coordinates through the DSNT module to generate a heat map.

[0126] The process of key point regression in the DSNT module is as follows:

[0127] Construct matrices X and Y. The matrix construction formula is as follows:

[0128]

[0129] Where a = 1, ..., m, b = 1, ..., n; a represents the number of matrix rows; b represents the number of matrix columns; X a,b represents the element in the ath row and bth column of matrix X; Y a,b represents the element in the ath row and bth column of the matrix Y; m represents the number of matrix rows of the regularized key point coordinate feature map, and n represents the number of matrix columns of the regularized key point coordinate feature map; the set Z represents the K key point sets to be output at the end of the network, and the size of each key point feature map is m×n. The softmax function is used to regularize Z, and the regularized set is represented as in It is the feature map of the kth key point coordinates after regularization, represented by a matrix of size m×n.

[0130] The formula for generating heat maps by the DSNT module is as follows:

[0131]

[0132] in, and They respectively represent the coordinates of the key points generated after F-normal calculation.

[0133] The overall loss Loss of the two-dimensional posture estimation method based on self-distillation is calculated as follows:

[0134]

[0135] in, is the original network loss, and Represent the heatmaps of the network prediction heatmap and the true value heatmap of the kth key point, represents the mean square error loss function. α and β represent weight coefficients.

[0136] like Figure 3 As shown, the present invention also discloses a two-dimensional human body posture estimation device based on self-distillation, comprising:

[0137] The image acquisition module 301 is used to acquire a data set including a two-dimensional human body image.

[0138] The human posture detection high-resolution network module 302 is used to construct a human posture detection high-resolution network based on HRNet; wherein the human posture detection high-resolution network includes a preprocessing layer, a multi-dimensional scale fusion part, a self-distillation module, a convolution layer and a DSNT layer.

[0139] The predicted heat map acquisition module 303 is used to process the two-dimensional human images in the data set using a high-resolution network for human posture detection to obtain a predicted heat map and complete human posture estimation.

[0140] The human posture detection high-resolution network includes:

[0141] The preprocessing layer preprocesses the images in the input data set and inputs the preprocessed images into the multi-dimensional scaling fusion part;

[0142] The multi-dimensional scale fusion part includes stage one, stage two, stage three and stage four; among them, stage one includes 1 parallel input branch and 1 multi-resolution module; stage two includes 2 parallel input branches and 1 multi-resolution module; stage three includes 3 parallel input branches and 4 multi-resolution modules; stage four includes 4 parallel input branches and 3 multi-resolution modules;

[0143] Each multi-resolution module consists of four residual blocks and a convolutional layer for multi-dimensional scale fusion; the residual block of the multi-resolution module in stage one is a three-layer residual structure; the residual block of the multi-resolution module in stage two is a two-layer residual structure; the residual block of the multi-resolution module in stage three is a two-layer residual structure; the residual block of the multi-resolution module in stage four is a two-layer residual structure; for stages two and three, the last multi-resolution module in each stage performs strided convolution fusion on the image features of all branches, and convolves the fused results to generate a new branch as the input branch of the next stage; the resolution size of the newly added branch is half of the resolution size of the previous branch, and the number of channels is twice that of the previous branch;

[0144] Each stage of the multi-dimensional scale fusion part outputs feature representation to the self-distillation module, and the image after feature fusion from stage 4 is output to the convolution layer;

[0145] The self-distillation module uses the feature representation of the four stages of multi-dimensional fusion to construct the self-distillation loss;

[0146] Convolutional layer, which converts the number of channels of the image from the multi-dimensional scale fusion part into the number of key points in the dataset, and outputs the key point set to the DSNT layer;

[0147] The DSNT layer regresses the key point coordinates in the key point set to generate a prediction heat map.

[0148] A specific implementation of a two-dimensional human posture estimation device based on self-distillation. The same two-dimensional human posture estimation method based on self-distillation is not repeated in this embodiment.

[0149] The above is only a specific implementation of the present invention, but the design concept of the present invention is not limited thereto. Any non-substantial changes to the present invention using this concept shall be deemed as an infringement of the protection scope of the present invention.

Claims

1. A two-dimensional human posture estimation method based on self-distillation, characterized in that: The steps include: S101, acquiring a data set including a two-dimensional human body image; S102, building a high-resolution network for human posture detection based on HRNet; S103, using a high-resolution human posture detection network to process the two-dimensional human body images in the data set, obtain a predicted heat map, and complete human posture estimation; The human posture detection high-resolution network includes: The preprocessing layer preprocesses the images in the input data set and inputs the preprocessed images into the multi-dimensional scaling fusion part; The multi-dimensional scale fusion part includes stage one, stage two, stage three and stage four; among them, stage one includes 1 parallel input branch and 1 multi-resolution module; stage two includes 2 parallel input branches and 1 multi-resolution module; stage three includes 3 parallel input branches and 4 multi-resolution modules; stage four includes 4 parallel input branches and 3 multi-resolution modules; Each multi-resolution module consists of four residual blocks and a convolutional layer for multi-dimensional scale fusion; the residual block of the multi-resolution module in stage one is a three-layer residual structure; the residual block of the multi-resolution module in stage two is a two-layer residual structure; the residual block of the multi-resolution module in stage three is a two-layer residual structure; the residual block of the multi-resolution module in stage four is a two-layer residual structure; for stages two and three, the last multi-resolution module in each stage performs strided convolution fusion on the image features of all branches, and convolves the fused results to generate a new branch as the input branch of the next stage; the resolution size of the newly added branch is half of the resolution size of the previous branch, and the number of channels is twice that of the previous branch; Each stage of the multi-dimensional scale fusion part outputs feature representation to the self-distillation module, and the image after feature fusion from stage 4 is output to the convolution layer; The output feature of the residual block in the multi-resolution module is expressed as: Among them, i represents the stage, j represents the branch, r represents the sequence number of the residual block, M represents the number of input channels, and N represents the number of output channels; Output of the first residual block in stage 1 It is expressed as: Here, conv represents the convolution operation and σ represents the RELU activation function; therefore, the output of the multi-resolution module in stage 1 is It is expressed as: Since there is only one branch in stage 1 and no multi-scale fusion is performed, a new branch is generated in stage 1. The operations are: Among them, ∪ represents the separator, represents the input of the first parallel branch of the multi-resolution module in stage 2, represents the input of the second parallel branch of the multi-resolution module in stage 2; The last multi-resolution module in stage 2 performs multi-scale fusion and convolution process to generate new branches It is expressed as: The convolution operation is performed using a convolution kernel of size 3×3, and upsampling is performed using the nearest neighbor interpolation method with a convolution kernel size of 1×1. represents the input of the first parallel branch of the multi-resolution module in stage 3, represents the input of the second parallel branch of the multi-resolution module in stage 3, represents the input of the third parallel branch of the multi-resolution module in stage three; After stacking once in stage 3, the last multi-resolution module performs multi-scale fusion and convolution process to generate new branches It is expressed as: In stage three, this process is repeated four times. After four times of stacking, the output of the third branch of stage three is passed through a conv structure to obtain a new branch that is downsampled 32 times as the fourth parallel input of stage four. After stacking once in stage 4, the last multi-resolution module performs a convolution process of multi-scale fusion. It is expressed as: Among them, stage 4 repeats this process twice and stacks it as the output of stage 4; The feature representation of each stage of the multi-dimensional scaling fusion part is as follows: in, Represents the high-dimensional features of stage one, represents the high-dimensional features of the second stage, Represents the high-dimensional features of the third stage, Represents the high-dimensional features of the fourth stage. The sizes of each high-dimensional feature are (B, 64, 48, 32), where B represents the batch size of the input image data, 64 represents the image feature channel dimension, and 48 and 32 represent the width and height of the image feature, respectively; The multi-resolution modules in the multi-dimensional scale fusion part all contain high-dimensional features. The high-dimensional features of the last layer are expressed as High-dimensional features at different stages The sizes are the same, (B, 64, 48, 32); The self-distillation module uses the feature representation of the four stages of multi-dimensional fusion to construct the self-distillation loss; Convolutional layer, which converts the number of channels of the image from the multi-dimensional scale fusion part into the number of key points in the dataset, and outputs the key point set to the DSNT layer; The DSNT layer regresses the key point coordinates in the key point set to generate a prediction heat map.

2. The two-dimensional human body posture estimation method based on self-distillation according to claim 1, characterized in that: The preprocessing layer of the human posture detection high-resolution network consists of two convolutional layers and a nonlinear activation layer RELU. After the input two-dimensional human image passes through the preprocessing layer, the number of channels changes from the original unknown number of channels C to 64. The preprocessed image is directly input into the multi-dimensional scale fusion part; the convolution operation f(x) of the preprocessing part is expressed as: f(x)=σ(f(W2*f(W1*x+B1)+B2)); Among them, x represents the input two-dimensional human image, W1 and W2 represent the weights in the first and second convolution layers, B1 and B2 represent the biases in the first and second convolution layers, and σ represents the RELU activation function.

3. The two-dimensional human body posture estimation method based on self-distillation according to claim 1, characterized in that: The implementation of the self-distillation module in S102 is specifically as follows: calculate and The L2 norm between completes the first stage of self-distillation, and its calculation formula is as follows: Among them, ||·||2 represents the L2 norm; The calculation formulas for self-distillation in the second, third and fourth stages are as follows: The total loss of the self-distillation module self The calculation formula is as follows:

4. The two-dimensional human body posture estimation method based on self-distillation according to claim 1, characterized in that: The implementation of the convolutional layer and the DSNT layer in S102 is as follows: The 1×1 convolutional layer converts the number of channels of the image into the number of key points K in the data set, and then the DSNT module regresses the key point coordinates to generate a heat map; The process of key point regression in the DSNT module is as follows: Construct matrices X and Y. The matrix construction formula is as follows: Where a = 1, ..., m, b = 1, ..., n; a represents the number of matrix rows; b represents the number of matrix columns; X a,b represents the element in the ath row and bth column of matrix X; Y a,b represents the element in the ath row and bth column of the matrix Y; m represents the number of matrix rows of the regularized key point coordinate feature map, and n represents the number of matrix columns of the regularized key point coordinate feature map; the set Z represents the K key point sets to be output at the end of the network, and the size of each key point feature map is m×n. The softmax function is used to regularize Z, and the regularized set is represented as in is the feature map of the kth key point coordinates after regularization, represented by a matrix of size m×n; The formula for generating heat maps by the DSNT module is as follows: in, and They respectively represent the coordinates of the key points generated after the F-normal form calculation; The overall loss Loss of the two-dimensional posture estimation method based on self-distillation is calculated as follows: in, is the original network loss, and Represent the heatmaps of the network prediction heatmap and the true value heatmap of the kth key point, represents the mean square error loss function, and α and β represent weight coefficients.

5. A two-dimensional human posture estimation device based on self-distillation, comprising the following: An image acquisition module, used to acquire a data set including a two-dimensional human body image; Human posture detection high-resolution network module, used to build a high-resolution network for human posture detection based on HRNet; The high-resolution network for human posture detection includes a preprocessing layer, a multi-dimensional scale fusion part, a self-distillation module, a convolutional layer, and a DSNT layer; The predicted heat map acquisition module is used to process the two-dimensional human images in the data set using a high-resolution human posture detection network to obtain a predicted heat map and complete human posture estimation; The human posture detection high-resolution network includes: The preprocessing layer preprocesses the images in the input data set and inputs the preprocessed images into the multi-dimensional scaling fusion part; The multi-dimensional scale fusion part includes stage one, stage two, stage three and stage four; among them, stage one includes 1 parallel input branch and 1 multi-resolution module; stage two includes 2 parallel input branches and 1 multi-resolution module; stage three includes 3 parallel input branches and 4 multi-resolution modules; stage four includes 4 parallel input branches and 3 multi-resolution modules; Each multi-resolution module consists of four residual blocks and a convolutional layer for multi-dimensional scale fusion; the residual block of the multi-resolution module in stage one is a three-layer residual structure; the residual block of the multi-resolution module in stage two is a two-layer residual structure; the residual block of the multi-resolution module in stage three is a two-layer residual structure; the residual block of the multi-resolution module in stage four is a two-layer residual structure; for stages two and three, the last multi-resolution module in each stage performs strided convolution fusion on the image features of all branches, and convolves the fused results to generate a new branch as the input branch of the next stage; the resolution size of the newly added branch is half of the resolution size of the previous branch, and the number of channels is twice that of the previous branch; Each stage of the multi-dimensional scale fusion part outputs feature representation to the self-distillation module, and the image after feature fusion from stage 4 is output to the convolution layer; The output feature of the residual block in the multi-resolution module is expressed as: Among them, i represents the stage, j represents the branch, r represents the sequence number of the residual block, M represents the number of input channels, and N represents the number of output channels; Output of the first residual block in stage 1 It is expressed as: Here, conv represents the convolution operation and σ represents the RELU activation function; therefore, the output of the multi-resolution module in stage 1 is It is expressed as: Since there is only one branch in stage 1 and no multi-scale fusion is performed, a new branch is generated in stage 1. The operations are: Among them, ∪ represents the separator, represents the input of the first parallel branch of the multi-resolution module in stage 2, represents the input of the second parallel branch of the multi-resolution module in stage 2; The last multi-resolution module in stage 2 performs multi-scale fusion and convolution process to generate new branches It is expressed as: The convolution operation is performed using a convolution kernel of size 3×3, and upsampling is performed using the nearest neighbor interpolation method with a convolution kernel size of 1×1. represents the input of the first parallel branch of the multi-resolution module in stage 3, represents the input of the second parallel branch of the multi-resolution module in stage 3, represents the input of the third parallel branch of the multi-resolution module in stage three; After stacking once in stage 3, the last multi-resolution module performs multi-scale fusion and convolution process to generate new branches It is expressed as: In stage three, this process is repeated four times. After four times of stacking, the output of the third branch of stage three is passed through a conv structure to obtain a new branch that is downsampled 32 times as the fourth parallel input of stage four. After stacking once in stage 4, the last multi-resolution module performs a convolution process of multi-scale fusion. It is expressed as: Among them, stage 4 repeats this process twice and stacks it as the output of stage 4; The feature representation of each stage of the multi-dimensional scaling fusion part is as follows: in, Represents the high-dimensional features of stage one, represents the high-dimensional features of the second stage, Represents the high-dimensional features of the third stage, Represents the high-dimensional features of the fourth stage. The sizes of each high-dimensional feature are (B, 64, 48, 32), where B represents the batch size of the input image data, 64 represents the image feature channel dimension, and 48 and 32 represent the width and height of the image feature, respectively; The multi-resolution modules in the multi-dimensional scale fusion part all contain high-dimensional features. The high-dimensional features of the last layer are expressed as High-dimensional features at different stages The sizes are the same, (B, 64, 48, 32); The self-distillation module uses the feature representation of the four stages of multi-dimensional fusion to construct the self-distillation loss; Convolutional layer, which converts the number of channels of the image from the multi-dimensional scale fusion part into the number of key points in the dataset, and outputs the key point set to the DSNT layer; The DSNT layer regresses the key point coordinates in the key point set to generate a prediction heat map.