A facial acne grading method based on collaborative mapping multi-scale self-distillation
By using a collaborative mapping-based multi-scale self-distillation method, the problems of neighborhood similarity and uneven feature distribution in acne images are solved, the accuracy and efficiency of facial acne grading are improved, and the training overhead is reduced.
Patent Information
- Application Number
- CN202411669145.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-09-30
- Estimated Expiration
- 2044-11-21
AI Technical Summary
Existing facial acne grading methods fail to effectively consider the neighborhood similarity and uneven feature distribution of acne images, resulting in low model learning efficiency and poor grading accuracy.
A collaborative mapping-based multi-scale self-distillation method is adopted. Through multiple mappers and multi-scale feature capture modules, combined with the self-distillation architecture, a feature extraction module is designed to improve the model's feature extraction and learning capabilities for acne images.
The model improves the accuracy of acne image classification, reduces training overhead, enhances the ability to distinguish acne images of adjacent grades, and can better handle the problem of uneven feature distribution.
Smart Images

Figure CN119599992B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of computers, and in particular relates to a facial acne severity grading technology. Background Art
[0002] Facial acne is a common skin condition that affects not only adolescents but also adults. Statistics show that approximately 80% of adolescents experience facial acne, and 3% of males and 12% of females continue to experience it even in adulthood. The scars left by facial acne can affect patients' self-confidence and disrupt their daily lives. Therefore, appropriate diagnosis and treatment of facial acne is essential.
[0003] A key step in facial acne diagnosis and treatment is grading its severity. Doctors prescribe medication based on the severity of the acne and customize a personalized treatment plan. Therefore, accurate acne grading results can significantly accelerate the patient's acne recovery cycle. In the past, acne severity was often graded manually by doctors, and the accuracy of the grading was highly dependent on the doctor's experience. Furthermore, the grading task itself is complex and time-consuming, which can easily drain doctors' experience and prolong the diagnosis and treatment cycle.
[0004] Due to these shortcomings, computer-assisted diagnosis and treatment (CAD) has become the mainstream approach for facial acne grading. This process requires experienced physicians to apply their expertise to each image and then make a diagnosis based on the grading results. This not only requires physicians to possess solid dermatological knowledge but also involves significant labor costs. Crucially, the physician's expertise directly impacts the effectiveness of the diagnosis, and the limited number of qualified physicians makes it difficult to meet the growing patient demand. Therefore, computer-assisted grading models have emerged, using computer technology to assist physicians in acne grading. These models can, to a certain extent, help physicians make more accurate judgments and develop more appropriate treatment plans. Self-distillation architectures can further improve the model's grading accuracy through self-distillation, but existing self-distillation models fail to account for the specific characteristics of acne images, resulting in limited performance improvements.
[0005] Existing acne-assisted diagnosis and treatment technologies primarily rely on convolutional neural networks (CNNs) to extract features from acne images and use these features for grade assessment. However, due to limitations in model size, data size, and processing time, single, naive CNN models (such as ResNet) often struggle to achieve both rapid processing speed and satisfactory results.
[0006] The knowledge distillation architecture is primarily used to address the aforementioned contradiction between speed and performance. It uses a large, high-performance model with a large number of parameters as a teacher model, transferring its predictions or intermediate features as knowledge to a smaller model with fewer parameters to guide the training of the smaller model. The goal is to achieve the same excellent performance as the large model on the faster model. However, this architecture incurs additional computational overhead and increases storage costs. Furthermore, different teacher-student combinations can affect the final results, making training inconvenient.
[0007] The self-distillation architecture is based on knowledge distillation and eliminates the need for a separate teacher model, relegating it to a single model. This model acts as both teacher and student. Compared to traditional knowledge distillation, self-distillation not only reduces training overhead but also significantly accelerates training, adapting to diverse datasets without requiring a dedicated teacher model for each specific dataset. While also a single network model, the self-distillation architecture often outperforms naive CNNs by distilling itself through methods like adding bypasses, allowing for deeper extraction of image features.
[0008] When it comes to facial acne severity grading, existing self-distillation architectures fail to account for the following unique issues with acne images: 1. Features of adjacent classes in acne images are similar; 2. Features in acne images are unevenly distributed. Consequently, existing self-distillation methods are unable to fully extract and learn features from acne images, impacting the network's overall grading performance.
[0009] Accurately grading facial acne can provide powerful guidance for prescribing treatment plans. Deep learning-based computer-assisted automatic acne grading algorithms can greatly facilitate diagnosis and treatment, while minimizing the risk of misjudgment of acne severity. However, neither machine learning methods based on handcrafted feature extractors nor the widely used naive convolutional neural network approach have achieved satisfactory results. Furthermore, acne images exhibit the following characteristics: 1. Neighborhood similarity in acne images. Acne images with similar severity levels often exhibit significant similarity, which can confuse the model, weaken its learning, affect model training, and ultimately lead to inaccurate predictions. 2. Uneven feature distribution in acne images. Acne location uncertainty leads to uneven feature distribution. When acne is dispersed, the model may focus on features in one part of the image while ignoring others, leading to misjudgment of acne severity. These characteristics often significantly impact the learning efficiency of self-distillation models for acne grading, resulting in poor performance on acne images.Figure 1 Images of acne of varying severity are shown.
[0010] In summary, the shortcomings of the existing methods and the solutions provided by the present invention are:
[0011] 1) The features extracted by the manual feature extractor are shallow features with poor effect;
[0012] 2) The traditional CNN model does not learn the extracted features well enough, and the model cannot fully learn from the extracted features, resulting in poor final classification results;
[0013] 3) Other methods ignore the similarity of acne images, resulting in the model lacking a specific module to distinguish acne images of adjacent severity levels, which weakens its ability to learn similar acne images of different severity levels;
[0014] 4) Other methods ignore the uneven distribution of features in acne images, resulting in the model focusing on only one or two areas when acne is dispersed, ignoring other areas, which weakens the model's learning of acne images. Summary of the Invention
[0015] To solve the above technical problems, the present invention proposes a facial acne grading method based on collaborative mapping multi-scale self-distillation, and designs a series of novel feature extraction modules, so that the model can better perceive the feature areas that have a greater impact on the final grading results, thereby improving the model's predictive performance.
[0016] The technical solution adopted by the present invention is: a facial acne grading method based on collaborative mapping multi-scale self-distillation, comprising:
[0017] S1. Preprocessing the acne image data and dividing the preprocessed acne image data into a training set and a test set;
[0018] S2. Construct a self-distillation model; the self-distillation model includes: a CNN module, a bottleneck module, a multi-mapper feature extraction module, a normalization module, a multi-scale feature capture module and 4 fully connected layers; the CNN module includes: a first CNN layer, a second CNN layer, a third CNN layer and a fourth CNN layer; the bottleneck module includes: a first bottleneck layer, a second bottleneck layer and a third bottleneck layer; the multi-mapper feature extraction module includes a first multi-mapper feature extraction layer, a second multi-mapper feature extraction layer and a third multi-mapper feature extraction layer; the normalization module includes a first feature normalization layer, a second feature normalization layer, a third feature normalization layer and a fourth feature normalization layer; the multi-scale feature capture module includes a first multi-scale feature capture layer, a second multi-scale feature capture layer, a third multi-scale feature capture layer and a fourth multi-scale feature capture layer; the fully connected layer module includes a first fully connected layer, a second fully connected layer
[0019] The output of the first CNN module is used as the input of the second CNN module, the output of the second CNN module is used as the input of the third CNN module, and the output of the third CNN module is used as the input of the fourth CNN module;
[0020] The output result of the first CNN module is also used as the input of the first bottleneck module, the output result of the second CNN module is also used as the input of the second bottleneck module, and the output result of the third CNN module is also used as the input of the third bottleneck module; the output result of the first bottleneck module is used as the input of the first multi-mapper feature extraction module, the output result of the second bottleneck module is used as the input of the second multi-mapper feature extraction module, and the output result of the third bottleneck module is used as the input of the third multi-mapper feature extraction module; the output of the first multi-mapper feature extraction module is used as the input of the first feature normalization module, the output of the second multi-mapper feature extraction module is used as the input of the third feature normalization module, the output of the third multi-mapper feature extraction module is used as the input of the third feature normalization module, and the output result of the fourth CNN module is also used as the input of the fourth feature normalization module;
[0021] The output of the fourth feature normalization module is used as the label of the normalization layer, and the loss is calculated with the output of the first feature normalization module, the second feature normalization module, and the third feature normalization module respectively; and the loss of the normalization layer is obtained by summing the losses of the first feature normalization module, the second feature normalization module, and the third feature normalization module;
[0022] The output of the first feature normalization module is processed by the first fully connected layer and serves as the input of the first multi-scale feature capture module. The output of the second feature normalization module is processed by the first fully connected layer and serves as the input of the second multi-scale feature capture module. The output of the third feature normalization module is processed by the third fully connected layer and serves as the input of the third multi-scale feature capture module. The output of the fourth feature normalization module is processed by the fourth fully connected layer and serves as the input of the fourth multi-scale feature capture module.
[0023] The output of the fourth multi-scale feature capture module is used as the label of the multi-scale feature capture layer, and the loss is calculated with the outputs of the first multi-scale feature capture module, the second multi-scale feature capture module, and the third multi-scale feature capture module respectively. The losses of the first multi-scale feature capture module, the second multi-scale feature capture module, and the third multi-scale feature capture module are summed to obtain the loss of the multi-scale feature capture layer;
[0024] The outputs of the first multi-scale feature capture module, the second multi-scale feature capture module, the third multi-scale feature capture module, and the fourth multi-scale feature capture module are respectively scale-mean processed and then the corresponding prediction results are output;
[0025] The image label is calculated with the four prediction results respectively, and the loss of the image label is obtained by summing the losses of the four prediction results;
[0026] S3, using the training set in step S1 to train the self-distillation model constructed in step S2;
[0027] S4. Input the test set into the self-distillation model trained in step S3 to obtain the prediction result.
[0028] Beneficial effects of the present invention: The method of the present invention takes into account the feature similarity of adjacent acne. In previous acne grading models, acne was only treated as a natural image, ignoring its adjacent similarity characteristics, resulting in unsatisfactory results of previous models. The present invention uses CNN as a framework, which can extract the features of acne images at a deeper level; the present invention also introduces a self-distillation structure based on CNN, which can enable the model to better learn image features; the method of the present invention uses a collaborative multi-mapping module to enable the model to make correct decisions when predicting stickiness at adjacent levels, so that the model learns correct knowledge; the method of the present invention divides the image features into different scales and trains the model at different scales, ensuring that the model can fully learn the image from the whole to the part; the method of the present invention has the following advantages:
[0029] 1. By jointly using multiple mappers to map acne features multiple times and aggregating all the mapping results, the phenomenon of misjudgment of neighboring classes that is prone to occur in the case of a single mapper can be effectively prevented. Analysis shows that the use of multiple mappers can always have a positive effect on the prediction bias, promoting the model to learn acne images with similar features, enabling better identification.
[0030] 2. The method of the present invention takes into account the uneven distribution of acne features. Since the location and size of facial acne vary, when there are acne in several areas, the model tends to learn areas with more obvious acne features, thereby ignoring the feature information of other areas and reducing the model's learning of samples. The method of the present invention splits the sample features according to different scales, allowing the model to focus on learning each small area and simultaneously utilize each area with obvious features, thereby strengthening the model's learning and making the model more sensitive to acne features that are more likely to affect the final classification results.
[0031] 3. This invention significantly reduces training overhead compared to previous distillation methods. Traditional distillation methods rely on multiple models, requiring simultaneous training of multiple models. This invention uses only a single model, significantly reducing training speed and memory usage. Furthermore, the plug-and-play components proposed in this article improve model performance while ensuring sufficient training overhead. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 Examples of facial acne images with different severity levels;
[0033] Among them, (a) is the schematic diagram of level 1, (b) is the schematic diagram of level 2, (c) is the schematic diagram of level 3, and (d) is the schematic diagram of level 4.
[0034] Figure 2 Flow chart of the method of the present invention.
[0035] Figure 3 This is a model structure diagram of the present invention.
[0036] Figure 4 To visualize the results. DETAILED DESCRIPTION
[0037] To facilitate those skilled in the art to understand the technical content of the present invention, the present invention is further explained below with reference to the accompanying drawings.
[0038] The computer-assisted acne grading method of the present invention comprises four parts: 1. data preparation, 2. model design, 3. model training, and 4. model testing. The overall structural relationship diagram is shown in the figure below. Figure 2 As shown:
[0039] The four modules together constitute the overall structure of the method of the present invention, wherein each module also contains certain submodules, and the general functions of each large module are as follows:
[0040] 1. Data preparation
[0041] This part is mainly responsible for collecting the acne images required for model training and pre-processing the data before starting model training to ensure that the data meets the requirements of model training. Afterwards, the collected acne images will be divided into training and test sets according to a certain ratio. The training set is used to train the model, and the test set is used to test the final performance of the model after training.
[0042] 11. Get data and labels
[0043] The facial acne datasets used in this method include two: the publicly available ACNE04 dataset, which includes 1,457 facial acne images and their corresponding severity level labels; and the ACNEHX dataset, collected by partner hospitals, which includes 1,189 facial acne images and their corresponding severity level labels. The difference is that while ANCE04 categorizes facial acne into four severity levels, ACNEHX further refines this classification, dividing each level in ACNE04 into two levels, for a total of eight severity levels.
[0044] 12. Data Preprocessing
[0045] Data preprocessing primarily involves pre-processing the image data in the dataset before model training to ensure it meets the requirements of model training. In the present method, all data in ACNE04 and ACNEHX is formatted in 3D (number of channels × image length × image width) and resized to 3×224×224 before being used in the model.
[0046] 13. Dataset Partitioning
[0047] Dataset partitioning aims to divide a dataset into a training set and a test set according to a certain ratio, which are used to train and test the model respectively. In the present method, ACNE04 and ACNEHX both divide the training set and the test set into a ratio of 4:1.
[0048] 2. Model design:
[0049] This section, which is the key protected portion of the present invention, includes the self-distillation architecture design, an inter-class similarity discrimination module for addressing the similarity problem between acne classes, and a dispersed feature recognition module for addressing the dispersion of acne features. The actual training process includes how to encode acne images through the network, how to use multiple mappers to coordinate and assist the model in strengthening the learning of inter-class similarity between acne classes, assisting the model in making accurate judgments, and how to capture and fuse small features at different scales to enable the model to learn dispersed features.
[0050] 21. Framework design
[0051] The framework of the entire model adopts a self-distillation learning framework. Compared with the traditional knowledge distillation framework, this framework only contains a single network, and the training process relies only on the data and the network itself without the introduction of additional external networks. Specifically, the last layer of the network will become the teacher of other layers, guiding the learning of other layers. The guidance of the last layer to other layers is divided into guidance in the feature part and guidance in the prediction part. In the guidance of the feature part, the feature map of each layer except the last layer is expected to be aligned with the feature map of the last layer; in the guidance of the prediction part, each layer except the last layer is expected to learn the relationship between the predictions of the last layer rather than the specific numerical values. In order to ensure the convergence of training, the labels corresponding to the acne images are also used to guide each layer at the same time, forming the third part of the training objective of the network.
[0052] For dataset D, suppose there are N data, X represents the entire sample set, Y represents its corresponding label set, (x, y) represents the sample label batch, and the batch number for each training is represented as B. (x i ,y i) represents the i-th sample label pair, where i∈[1,B], y i ∈[0,V], V represents the total number of levels. The model design diagram of the entire method is as follows Figure 3 shown
[0053] in, represents the kth mapper of the lth layer, Standardization represents feature standardization, patchK represents the prediction graph at different scales, and θ represents the network parameter weight. Then the optimization goal of the entire model is:
[0054] L model (X,θ,Y)=αL Pro +βL Pat +λL Cro
[0055] Among them L Pro The distance between feature maps representing the combined results of multiple mappers, L Pat Indicates the predicted distance under the combination of multiple scales, L Cro Represents the distance between each layer’s prediction and the actual label. α, β, and λ are hyperparameter weights introduced to balance the three losses.
[0056] 22. Multi-mapper collaborative discrimination
[0057] In the following, for simplicity of description, the present invention describes the output features of the last layer of the network as T and the output features of the remaining layers as S l , l∈[1,L-1], where L is the total number of network layers. For each S l , the present invention will pass through additional modules, namely through Figure 3 The bottleneck layer shown in FIG1 extracts its features again. The present invention extracts S l The output feature after feature extraction is expressed as B(S l ), B(S l ) will pass through multiple mappers to perform multi-mapping of features, and take the average of the multi-mapping results as the final mapping result G l , that is
[0058]
[0059] Where K represents the number of mappers at each layer. The purpose of using multiple mappers is to address the similarities between adjacent levels in acne images. Therefore, when the feature distribution mapped by a single mapper deviates from the correct expected feature distribution, the deviation tends to manifest as a gap between adjacent levels, and the deviation at adjacent levels is not large. Therefore, when using multiple mappers, their collaborative mapping can smooth the deviation between the mapped feature distribution and the expected feature distribution. When most mappers map correctly, the overall feature distribution can be mapped correctly; when most mappers map incorrectly, the overall feature distribution can be made more inclined towards the correct distribution than the feature distribution obtained by a single mapper.
[0060] Afterwards, G l Normalize the sample dimension to get the standardized feature distribution F l , G l The component in the i-th channel is recorded as Then F l It can be calculated as:
[0061]
[0062] Among them, ε is the disturbance parameter, which is a small positive value and is used to deal with the case where the standard deviation is 0, and C is the number of channels. T Represents the result after T is standardized. At this time, the loss used to measure the distance between the feature map of each layer of the network and the feature map of the last layer is:
[0063]
[0064] 23. Multi-scale feature capture
[0065] After normalizing the feature maps of each layer, the feature maps are first split according to different scales. l , its features at scale m can be calculated as:
[0066] D m =AAP m (F l )
[0067] where m∈2 [0,M] , M is the total number of scales for splitting. AAP m Represents the adaptive pooling operation, which is responsible for aggregating the adjacent features of the feature map and outputting a feature map of size m×m. Intuitively, AAP m The input image is split into m×m regions. The full-scale feature D of the lth layer is represented as a linked combination of features of different scales, that is:
[0068] D=Cat(Dm )
[0069] where m∈2 [0,M] , D∈R B×C×∑m After initially obtaining the combination of different scale features, it is also necessary to obtain the grade score of each level pats based on these combined features l , that is:
[0070] pats l =Reshape(FC l (D),(B,V,∑ m ))
[0071] FC l Represents the linear mapping layer of the first layer, and Reshape represents the reshaping operation. l (m) represents the grade score corresponding to scale m, pats l (m) can be expressed as:
[0072]
[0073] pats l (m)∈R B×V . Among them pats l [:,:,:] means in pats l The slice on the last layer. After the above processing, the standardized feature FT of the last layer can be obtained as pats T , the prediction loss at scale m can be expressed as pats at all scales T with pats l The distance, that is:
[0074]
[0075] where l∈[1,L-1], m∈2 [0,M] KL stands for KL divergence, which measures the difference between two distributions. By dividing the feature map into different scales, the model can perform more refined learning by region. Compared to the traditional method of simply processing the entire input, this can effectively enable the model to perceive acne lesions in different locations, avoiding focusing on one area while ignoring others.
[0076] 24. Multi-scale hierarchical aggregation
[0077] After getting the grading score pats of the first layer l After that, the final prediction of the lth layer is the mean of all scale predictions, that is, the prediction calculation of the lth layer is:
[0078]
[0079] Where l∈[1,L], then pats T with pats L The meaning is the same, both are the classification scores of the last layer of the model, and I represents the accumulation operation on the corresponding prediction level. l For the level prediction of each layer for the sample, the present invention uses cross entropy loss to measure the distance between the prediction of each layer and the true label at this time, that is:
[0080]
[0081] This part of the loss is used to make the output of each layer as close to the true label as possible, while ensuring the stability of model training convergence.
[0082] (3) Model Testing: This section is responsible for testing the model's performance, including testing the model on a partitioned test set and summarizing various performance indicators. In this paper, the prediction probability of the Lth layer is used as the model's prediction probability, and the model's prediction results are obtained based on this.
[0083] 31. Number of mappers
[0084] As mentioned above, the purpose of multiple mappers is to correct the prediction error of a single mapper by stacking the mappings of multiple mappers, thereby reversing the error and obtaining the correct result. However, the number of mappers must be carefully selected. When there are too few mappers, the model's tolerance for deviation will be weakened. When a mapper maps incorrectly, the remaining insufficient mappers with correct mapping cannot effectively reverse the deviation. When there are too many mappers, the probability of mapping errors increases, affecting the superposition mapping results. Therefore, the number of mappers should be selected to an appropriate value to balance the above disadvantages of too many or too few mappers. In practical use, it is recommended to set the number of mappers to between [3, 5].
[0085] 32. Number of Split Scales
[0086] The number of split scales can be thought of as the degree to which the model refines its learning of the sample. When the split scale is 2, the original sample is split into 2×2, or four smaller parts, which are then learned independently. However, it's important to note that more split scales is not necessarily better. Too few scales can miss many fine features in small regions. Excessive scales can also lead to a loss of connectivity between regions, preventing the model from integrating features from adjacent regions and hindering training. Therefore, it's recommended to choose a different number of split scales based on the sample's specific needs. For acne images, it's recommended to limit the number of split scales to no more than 8.
[0087] 33. Model hyperparameter setting
[0088] The method of the present invention uses three parts of loss during the training process, and uses hyperparameters α, β, and λ as weights to control the impact of each part of the loss. In the implementation of the method of the present invention, the combination of α=0.1, β=0.1, and λ=0.8 is used.
[0089] 34. Error Back Propagation
[0090] The back propagation error process describes how the model is trained. When given an input, the model generates a predicted output. By calculating the difference between this predicted output and the actual value, the present invention can obtain the prediction error. This error is then backpropagated through the network, allowing the weights in the entire network to be adjusted. Next, a learning rate is applied to the weights of each point in the network to fine-tune these weights. In this article, the learning rate is set to 0.01 and decays at a rate of 0.5 every 20 rounds of training. The entire training process uses the SGD optimizer for training, and its weight decay weight is set to 0.0001. The batch size during training is set to 64, including 64 acne images and their corresponding labels.
[0091] 35. Algorithm pseudocode
[0092] The pseudo code for model training is as follows:
[0093]
[0094] 4. Model testing
[0095] The model testing phase primarily involves testing the trained model to verify its predictive performance. This testing included the publicly available ACNE04 dataset and the ACNEHX dataset collected by the hospital. The test results on the ACNE04 dataset are shown in Table 1:
[0096] Table 1 Test results of the method of the present invention on the ACNE04 dataset
[0097] Model Name Accuracy (%) Accuracy (%) Sensitivity (%) Specificity (%) Youden Index (%) Baseline 79.38 76.43 78.54 93.45 71.99 KD 83.29 80.56 79.54 93.52 73.06 LSKD 83.51 79.43 81.23 93.54 74.77 PSKD 82.24 78.53 78.11 92.54 70.65 BYOT 82.49 79.21 80.79 93.26 74.05 MixSKD 83.04 81.26 81.32 93.89 75.21 Method of the present invention 84.75 83.10 82.64 94.01 76.65
[0098] The meanings of the five indicators are as follows:
[0099] 1) Accuracy: measures the model’s classification prediction accuracy, the higher the better.
[0100] 2) Precision: The ratio of the number of positive examples detected to the total number of positive examples. The higher the precision, the better.
[0101] 3) Sensitivity: The ratio of detected positive examples to all true positive examples. The higher the better.
[0102] 4) Specificity: The ratio of detected negative examples to all true negative examples. The higher the better.
[0103] 5) Youden Index: measures the overall capability of the model, the higher the better.
[0104] As shown in Table 1, the proposed method achieves the best performance across all metrics compared to existing methods. Furthermore, compared to other self-distillation methods, such as BYOT and MixSKD, the addition of multi-mappers and multi-scale feature analysis significantly improves model performance. We also conducted experiments on the hospital dataset ACNEHX, with the results shown in Table 2.
[0105] Table 2 Test results of the method of the present invention on the dataset ACNEHX
[0106] Model Name Accuracy (%) Accuracy (%) Sensitivity (%) Specificity (%) Youden Index (%) Baseline 57.91 54.55 40.97 92.35 33.33 KD 57.50 46.59 40.91 92.16 33.07 LSKD 57.91 54.46 41.78 92.06 33.84 PSKD 57.74 54.12 40.98 92.79 33.77 BYOT 58.14 52.29 42.12 92.57 34.69 MixSKD 58.48 52.40 42.27 92.62 34.89 Method of the present invention 60.88 59.51 45.06 93.64 38.70
[0107] It can also be seen that the method of the present invention still achieves the most advanced performance on the hospital data, which illustrates the effectiveness and versatility of the method of the present invention.
[0108] In addition, the present invention also conducts a visual test on the method of the present invention. By drawing the category attention map of the model, the attention area of the model can be seen. The results are as follows: Figure 4 shown; in Figure 4 In the figure, each row represents the test results of a case, and each column represents the test results of a model on different test cases. The red areas represent the input features that the model focuses on. As can be seen, the proposed model can more accurately perceive acne. It not only more accurately locates acne features, but also detects feature areas that may be overlooked by other methods, demonstrating superior performance.
[0109] Those skilled in the art will appreciate that the embodiments described herein are intended to aid the reader in understanding the principles of the present invention, and it should be understood that the scope of the present invention is not limited to such specific descriptions and embodiments. Various modifications and variations are readily apparent to those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims.
Claims
1. A facial acne grading method based on collaborative mapping multi-scale self-distillation, characterized in that: include: S1. Preprocessing the acne image data and dividing the preprocessed acne image data into a training set and a test set; S2. Build a self-distillation model; the self-distillation model includes: a CNN module, a bottleneck module, a multi-mapper feature extraction module, a normalization module, a multi-scale feature capture module, and a fully connected layer module; the CNN module includes multiple CNN layers, the multi-mapper feature extraction module includes multiple multi-mapper feature extraction layers, the normalization module includes multiple feature normalization layers, the multi-scale feature capture module includes multiple multi-scale feature capture layers, and the fully connected layer module includes multiple fully connected layers; Among them, the number of layers of the CNN module, the normalization module, the multi-scale feature capture module and the fully connected layer module is the same; the number of layers of the bottleneck module and the multi-mapper feature extraction module is the same, and the number of layers is one less than that of the CNN module, the normalization module and the multi-scale feature capture module; the output of the previous CNN layer in the CNN module serves as the input of the next CNN layer, and except for the last CNN layer, each CNN layer corresponds to a bottleneck layer, and the output of each of these CNN layers serves as the input of its corresponding bottleneck layer; each bottleneck layer corresponds to a multi-mapper feature extraction layer, and the output of each bottleneck layer serves as the input of its corresponding multi-mapper feature extraction layer; Except for the last normalization layer, each normalization module corresponds to a multi-mapper feature extraction layer. The input of each normalization layer is the output of the corresponding multi-mapper feature extraction layer. The input of the last normalization layer of the normalization module is the output of the last CNN layer of the CNN module. The output of the last layer of the normalization module is used as the label of the normalization module. The label of the normalization module is calculated with the output of each previous normalization layer respectively. The loss of the normalization module is obtained by summing the losses of the previous normalization layers. Each normalization layer in the normalization module corresponds to a fully connected layer; the output of each normalization layer is processed by the corresponding fully connected layer and serves as the input of the corresponding multi-scale feature capture layer; The output of the last multi-scale feature capture layer of the multi-scale feature capture module is used as the label of the multi-scale feature capture module. The loss of the multi-scale feature capture module is calculated by adding the loss of the previous multi-scale feature capture layers to the label of the multi-scale feature capture module. The output of each multi-scale feature capture layer is processed by scale mean and then the corresponding prediction result is output; the image label is calculated with each prediction result respectively, and the loss of the image label is obtained by summing them up; S3, using the training set in step S1 to train the self-distillation model constructed in step S2; S4. Input the test set into the self-distillation model trained in step S3 to obtain the prediction result.
2. The facial acne grading method based on collaborative mapping multi-scale self-distillation according to claim 1, characterized in that: The loss function used in step S3 during training is: L model (X,θ,Y)=αL Pro +βL Pat +λL Cro Among them, X represents the training set, Y represents the label set corresponding to X, and L Pro represents the loss of the normalization layer, L Pat represents the loss of the multi-scale feature capture layer, L Cro Represents the loss of image labels, and α, β, and λ are hyperparameter weights introduced to balance the three losses.
3. The facial acne grading method based on collaborative mapping multi-scale self-distillation according to claim 2, characterized in that: L Pro The calculation formula is: Among them, L1 represents the number of normalization layers in the normalization module, represents the output of the l1th normalization layer, F T Represents the output of the last normalization layer, C is the number of channels, Indicates the square of the L2 norm.
4. The facial acne grading method based on collaborative mapping multi-scale self-distillation according to claim 3, characterized in that: L Pat The calculation formula is: in, represents the grade score corresponding to scale m in the l2th multi-scale feature capture layer except the last multi-scale feature capture layer, pats T (m) represents the grade score corresponding to scale m in the last multi-scale feature capture layer.
5. The facial acne grading method based on collaborative mapping multi-scale self-distillation according to claim 4, characterized in that: L Cro The calculation formula is: Among them, L CE represents the cross entropy loss, represents the l3th scale mean output result, and y represents the image label.
6. The facial acne grading method based on collaborative mapping multi-scale self-distillation according to claim 5, characterized in that: The number of mappers in each multi-mapper feature extraction layer is set between [3, 5].
7. The facial acne grading method based on collaborative mapping multi-scale self-distillation according to claim 6, characterized in that: The splitting scale of each multi-scale feature capture layer is greater than or equal to 2 and less than or equal to 8.
Citation Information
Patent Citations
HRNet self-distillation target segmentation method based on multi-scale pooling pyramid
CN114187308A
Target detection model for evaluating acne curative effect of face image
CN115862112A