Multi-enhancement semi-supervised medical image classification method based on dynamic threshold
Through a multi-enhanced semi-supervised method based on dynamic thresholds, the labeled and unlabeled images of the skin disease image data set are used to optimize the skin lesion image classification model, which solves the problems of large intra-class differences and small inter-class differences in skin lesion image classification, and achieves efficient and stable classification performance.
Patent Information
- Application Number
- CN202510514042.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-08-05
AI Technical Summary
There are problems in the classification of skin lesions with large differences in in-class and small differences between classes. Traditional methods rely on doctor experience and are time-consuming and labor-intensive, and existing deep learning methods face the problems of insufficient data and overfitting.
A multi-enhanced semi-supervised medical image classification method based on dynamic thresholds is adopted to obtain labeled and unlabeled images through the skin disease image data set, and an initial semi-supervised image classification model is established using deep learning, image processing and loss merging are performed, the model is optimized, and performance evaluation and adjustment are performed, including pseudo-label generation, dynamic threshold update and loss function design.
It improves the accuracy and generalization ability of skin lesions image classification, reduces the dependence on large-scale manual annotation data, reduces the labeling cost, and enhances the robustness of the model to the image data distribution changes.
Smart Images

Figure CN120431378A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and particularly relates to a multi-enhanced semi-supervised medical image classification method based on a dynamic threshold. Background Art
[0002] With the continuous development of medical imaging technology, medical image analysis has become an important tool for auxiliary diagnosis. In the field of dermatology, dermoscopic images are widely used for the diagnosis of skin lesions. However, due to the large variety and similar appearance of skin diseases, dermatologists often face the challenges of large intra-class differences and small inter-class differences when dealing with a large number of dermoscopic images, making it very difficult to accurately distinguish the types of lesions. Traditional manual classification methods rely on doctors' professional experience, and the process of visual discrimination is time-consuming and laborious, prone to missed diagnosis or misdiagnosis, which in turn affects the treatment effect of patients.
[0003] In recent years, medical image classification technology based on deep learning has made remarkable progress. Deep learning can perform qualitative and quantitative analysis on medical images, helping doctors discover lesions more quickly, reducing the missed diagnosis rate and misdiagnosis rate, and reducing the cost required for diagnosis. However, medical image datasets are often small in scale and high in annotation cost, which makes traditional supervised learning methods face the challenges of insufficient data and overfitting.
[0004] To solve this problem, semi-supervised learning has gradually become an effective method in medical image analysis. Semi-supervised learning methods can alleviate the problems of insufficient data and overfitting by combining a small amount of labeled data and a large amount of unlabeled data for training. Research shows that semi-supervised learning can significantly improve the classification accuracy of the model, and its effect can even be close to or reach the level of training with a large amount of labeled data. Compared with traditional labeled data, unlabeled medical image data is easier to obtain in a clinical environment and has a lower annotation cost. Therefore, semi-supervised learning has broad application prospects in medical image classification. Summary of the Invention
[0005] The present invention provides a multi-enhanced semi-supervised medical image classification method based on a dynamic threshold to solve the problems raised in the background art.
[0006] A multi-enhanced semi-supervised medical image classification method based on a dynamic threshold includes:
[0007] S1: Obtain labeled images and unlabeled images based on a skin disease image dataset, and establish an initial semi-supervised image classification model using the labeled images and unlabeled images based on deep learning;
[0008] S2: Process the labeled images and unlabeled images respectively, merge the losses, obtain the loss function based on the merged result, and optimize the initial semi-supervised image classification model based on the loss function to obtain the target semi-supervised image classification model;
[0009] S3: Evaluate and adjust the target semi-supervised image classification model based on performance evaluation metrics.
[0010] Preferably, in S1, based on deep learning, an initial semi-supervised image classification model is established using labeled images and unlabeled images, including:
[0011] Adopt three consecutive convolutional layer structures as the feature extraction module, and use WRN-28-2 as the backbone network to construct a wide residual network module;
[0012] Construct a network model based on the feature extraction module and the residual network module;
[0013] Train the network model using labeled images and unlabeled images to obtain the initial semi-supervised image classification model.
[0014] Preferably, in S2, processing the labeled images includes:
[0015] Input the labeled images into the initial semi-supervised image classification model to obtain classification prediction results, compare the classification prediction results with the actual results, and calculate the supervised loss value using the cross-entropy loss function.
[0016] Preferably, in S2, processing the unlabeled images includes:
[0017] Perform weak augmentation once and strong augmentation twice on the unlabeled images respectively to generate weak-augmented images, first strongly-augmented images, and second strongly-augmented images;
[0018] Perform a mixing operation on the weak-augmented images, first strongly-augmented images, and second strongly-augmented images of the unlabeled images, and obtain the mixed loss.
[0019] Preferably, in S2, processing the unlabeled images further includes:
[0020] Input the weak-augmented images into the initial semi-supervised image classification model to obtain the predicted probability distribution of the weak-augmented images, and generate pseudo labels based on the predicted probability distribution;
[0021] Calculate the prediction confidence of each weak-augmented image based on the pseudo label of each weak-augmented image;
[0022] Dynamically update the global threshold in combination with the training progress and class distribution information. Whether a sample adopts a pseudo label is controlled according to the following formula:
[0023]
[0024] Among them, when mask is equal to 1, it means that the sample adopts the pseudo label, when mask is equal to 0, it means that the sample does not adopt the pseudo label, conf represents the prediction confidence of the sample, and τ represents the real-time value of the global threshold.
[0025] Preferably, in S2, processing the unlabeled image further includes:
[0026] Inputting the first strongly enhanced image and the second strongly enhanced image into the initial semi-supervised image classification model, obtaining a predicted probability distribution of the first strongly enhanced image and the second strongly enhanced image, and generating a pseudo label based on the predicted probability distribution;
[0027] The pseudo-label set with the highest prediction probability is obtained when mask = 1, and the logarithmic loss L is introduced on the first and second strongest enhanced images respectively as follows: neg ;
[0028]
[0029] Among them, N μ Indicates the number of pseudo labels in the pseudo label set, represents the probability that the jth pseudo label is predicted to be the true category, ε = 10 -6 ;
[0030] Obtaining prediction results of the first strongly enhanced image and the second strongly enhanced image in the initial semi-supervised image classification model, and performing normalization on the prediction results;
[0031] The mean square error consistency loss of the first strongly enhanced image and the second strongly enhanced image is obtained based on the standardized prediction results.
[0032] Preferably, in S2, processing the unlabeled image further includes:
[0033] The total loss of the unlabeled image is calculated based on the consistency loss, logarithmic loss and hybrid loss, and the total loss is used as the unlabeled loss.
[0034] Preferably, the loss merging of labeled images and unlabeled images includes:
[0035] The loss of labeled images and unlabeled images is combined according to the following formula to obtain the final loss function L:
[0036] L=L X +α*L β
[0037] Among them, L XRepresents the supervised loss value of the labeled image, α represents the adjustment factor, and L β represents the unlabeled loss of the unlabeled image.
[0038] Preferably, in S3, evaluating and adjusting the target semi-supervised image classification model based on performance evaluation metrics includes:
[0039] Determining model problems based on performance evaluation metrics;
[0040] Obtaining an adjustment method matching the model problem;
[0041] Adjusting the target semi-supervised image classification model according to the adjustment method.
[0042] Preferably, dynamically updating the global threshold in combination with the training progress and class distribution information includes:
[0043] Setting a basic threshold adjustment strategy in a way that the global threshold is dynamically increased as the training progress increases, and adjusting the basic threshold adjustment strategy in a way that the global threshold is set larger as the class distribution information of the samples is more concentrated, to obtain an initial threshold adjustment strategy;
[0044] Statistically analyzing the accuracy of pseudo-labels in multiple periods under the initial threshold adjustment strategy to obtain an accuracy trend, subtracting the accuracy trend from the first accuracy threshold and the second accuracy threshold respectively to obtain a first difference trend and a second difference trend;
[0045] When the accuracy trend is gradually rising and the second difference trend is greater than zero, keep the current initial threshold adjustment strategy unchanged;
[0046] When the accuracy trend is gradually rising, the first difference trend is greater than zero, and the second difference trend is not always greater than zero, determining the target adjustment value of the initial threshold adjustment strategy based on the proportion of the second difference trend that is not greater than zero;
[0047] When the accuracy trend is gradually declining, determining the upward adjustment weight of the initial threshold adjustment strategy based on the decline mean, and respectively obtaining the first proportion and the second proportion of the first difference trend and the second difference trend that are not greater than zero, determining a first adjustment value based on the first proportion and the first accuracy threshold, and determining a second adjustment value based on the second proportion and the second accuracy threshold;
[0048] Determining the target adjustment value of the initial threshold adjustment strategy based on the upward adjustment weight, the first adjustment value, and the second adjustment value;
[0049] When the accuracy trend is irregularly rising and falling, determining the target adjustment value of the initial threshold adjustment strategy according to a random rule;
[0050] The dynamic update global threshold is determined by adjusting the initial threshold adjustment strategy based on the target adjustment value.
[0051] Compared with the prior art, the present invention has achieved the following beneficial effects:
[0052] By obtaining labeled images and unlabeled images based on a skin disease image dataset, establishing an initial semi-supervised image classification model using the labeled images and unlabeled images based on deep learning, processing and merging the labeled images and unlabeled images respectively, obtaining a loss function based on the merging result, optimizing the initial semi-supervised image classification model based on the loss function to obtain a target semi-supervised image classification model, and evaluating and adjusting the target semi-supervised image classification model based on performance evaluation metrics, it is possible to fully exploit the potential information in a large number of unlabeled dermoscopic images, improve the accuracy and generalization ability of the skin lesion image classification model, design an effective learning mechanism, reduce the dependence on a large amount of manually labeled data, thereby reducing the labeling cost and improving the training efficiency, enhance the robustness of the model to changes in the image data distribution, and maintain stable and consistent classification performance.
[0053] Other features and advantages of the present invention will be described in the following specification, and some of them will become obvious from the specification or be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in this application document.
[0054] The technical solutions of the present invention will be further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the present invention, and do not constitute a limitation to the present invention. In the accompanying drawings:
[0056] Figure 1 is a flowchart of a multi-enhanced semi-supervised medical image classification method based on a dynamic threshold in an embodiment of the present invention;
[0057] Figure 2 is a flowchart of establishing an initial semi-supervised image classification model in an embodiment of the present invention;
[0058] Figure 3 is a flowchart of evaluating and adjusting a target semi-supervised image classification model in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0059] The following describes the preferred embodiments of the present invention with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0060] Example 1:
[0061] An embodiment of the present invention provides a multi-enhanced semi-supervised medical image classification method based on a dynamic threshold, as Figure 1 shown, including:
[0062] S1: Obtain labeled images and unlabeled images based on a skin disease image dataset, and establish an initial semi-supervised image classification model using the labeled images and unlabeled images based on deep learning;
[0063] S2: Process and merge the losses of the labeled images and unlabeled images respectively, obtain a loss function based on the merged results, and optimize the initial semi-supervised image classification model based on the loss function to obtain a target semi-supervised image classification model;
[0064] S3: Evaluate and adjust the target semi-supervised image classification model based on performance evaluation metrics.
[0065] In this embodiment, the labeled images are used for supervised training, and the unlabeled images are used to generate labels to participate in semi-supervised optimization.
[0066] In this embodiment, the ratio of labeled images to unlabeled images is 2:8.
[0067] In this embodiment, the processing of the labeled images includes supervised training, the processing of the unlabeled images includes multi-view enhancement, the processing of the labeled images includes pseudo-label generation and dynamic screening mechanism, pseudo-negative label construction and consistency regularization.
[0068] In this embodiment, the merging of the labeled images and unlabeled images is the merging of labeled supervision loss and unlabeled loss.
[0069] In this embodiment, the performance evaluation metrics include precision, recall, accuracy, etc.
[0070] The beneficial effects of the above design solution are as follows: By obtaining labeled images and unlabeled images based on a skin disease image dataset, and based on deep learning, an initial semi-supervised image classification model is established using the labeled images and unlabeled images. The labeled images and unlabeled images are processed and merged respectively, a loss function is obtained based on the merged result, the initial semi-supervised image classification model is optimized based on the loss function to obtain a target semi-supervised image classification model, and the target semi-supervised image classification model is evaluated and adjusted based on performance evaluation metrics, so as to fully mine the potential information in a large number of unlabeled dermoscopic images, improve the accuracy and generalization ability of the skin lesion image classification model, reduce the dependence on a large amount of manually labeled data by designing an effective learning mechanism, thereby reducing the labeling cost and improving the training efficiency, enhancing the robustness of the model to changes in the image data distribution, and maintaining stable and consistent classification performance.
[0071] Embodiment 2:
[0072] Based on Embodiment 1, an embodiment of the present invention provides a multi-enhanced semi-supervised medical image classification method based on a dynamic threshold, as Figure 2 shown. In S1, based on deep learning, an initial semi-supervised image classification model is established using labeled images and unlabeled images, including:
[0073] Three consecutive convolutional layer structures are used as a feature extraction module, and WRN-28-2 is used as a backbone network to construct a wide residual network module;
[0074] A network model is constructed based on the feature extraction module and the residual network module;
[0075] The network model is trained using labeled images and unlabeled images to obtain an initial semi-supervised image classification model.
[0076] In this embodiment, WRN-28-2 is the Wide Residual Network. Compared with the traditional ResNet, it adopts a wider channel design instead of a too deep network layer, and effectively solves the problem of gradient disappearance with the help of residual connections.
[0077] The beneficial effects of the above design solution are as follows: Three consecutive convolutional layer structures are used as a feature extraction module, WRN-28-2 is used as a backbone network to construct a wide residual network module, a network model is constructed based on the feature extraction module and the residual network module, and the network model is trained using labeled images and unlabeled images to obtain an initial semi-supervised image classification model, providing a model basis for further optimization of the git model.
[0078] Embodiment 3:
[0079] Based on Embodiment 1, an embodiment of the present invention provides a multi-augmentation semi-supervised medical image classification method based on a dynamic threshold. In S2, the processing of labeled images includes:
[0080] Input the labeled image into the initial semi-supervised image classification model to obtain a classification prediction result. Compare the classification prediction result with the actual result, and use the cross-entropy loss function to calculate the supervised loss value.
[0081] In this embodiment, the supervised loss value L x is calculated as follows:
[0082]
[0083] where N l represents the number of labeled samples, represents the probability that the i-th sample is predicted as its true class.
[0084] The beneficial effect of the above design is that by inputting the labeled image into the initial semi-supervised image classification model to obtain a classification prediction result, comparing the classification prediction result with the actual result, and using the cross-entropy loss function to calculate the supervised loss value, supervised training of the labeled samples is achieved, and the supervised loss value is obtained, providing a basis for model optimization.
[0085] Embodiment 4:
[0086] [[ID=,27]]Based on Embodiment 1, an embodiment of the present invention provides a multi-augmentation semi-supervised medical image classification method based on a dynamic threshold. In S2, the processing of unlabeled images includes:
[0087] Perform one weak augmentation and two strong augmentations on the unlabeled image respectively to generate a weakly augmented image, a first strongly augmented image, and a second strongly augmented image;
[0088] Perform a mixing operation on the weakly augmented image, the first strongly augmented image, and the second strongly augmented image of the unlabeled image, and obtain a mixing loss.
[0089] In this embodiment, weak augmentation uses lightweight image transformation operations such as flipping and cropping, and strong augmentation includes operations such as color perturbation and rotation to simulate input variations.
[0090] In this embodiment, the first strongly augmented image is different from the second strongly augmented image.
[0091] In this embodiment, the specific process of the mixing operation is as follows:
[0092]
[0093] Among them, M represents the random region mask, and λ represents the image mixing ratio.
[0094] The beneficial effects of the above design are as follows: By performing one weak enhancement and two strong enhancements on the unlabeled images respectively, generating weak-enhanced images, first strongly enhanced images, and second strongly enhanced images, performing a mixing operation on the weak-enhanced images, first strongly enhanced images, and second strongly enhanced images of the unlabeled images, and obtaining a mixing loss, it provides a basis for the loss fusion of subsequent images and model optimization.
[0095] Embodiment 5:
[0096] Based on Embodiment 4, an embodiment of the present invention provides a multi-enhancement semi-supervised medical image classification method based on a dynamic threshold. In S2, the processing of the unlabeled images further includes:
[0097] Input the weak-enhanced images into the initial semi-supervised image classification model to obtain the predicted probability distribution of the weak-enhanced images, and generate pseudo labels based on the predicted probability distribution;
[0098] Calculate the prediction confidence of each weak-enhanced image based on the pseudo label of each weak-enhanced image;
[0099] Dynamically update the global threshold in combination with the training progress and class distribution information. Whether a sample adopts a pseudo label is controlled according to the following formula:
[0100]
[0101] Among them, when mask is equal to 1, it means the sample adopts the pseudo label. When mask is equal to 0, it means the sample does not adopt the pseudo label. conf represents the prediction confidence of the sample, and τ represents the real-time value of the global threshold.
[0102] The beneficial effects of the above design are as follows: By inputting the weak-enhanced images into the initial semi-supervised image classification model to obtain the predicted probability distribution of the weak-enhanced images, generating pseudo labels based on the predicted probability distribution, calculating the prediction confidence of each weak-enhanced image based on the pseudo label of each weak-enhanced image, dynamically updating the global threshold in combination with the training progress and class distribution information, and determining whether a sample adopts a pseudo label, it improves the quality of the pseudo labels and reduces the interference of incorrect pseudo labels on the training.
[0103] Embodiment 6:
[0104] Based on Embodiment 5, an embodiment of the present invention provides a multi-enhancement semi-supervised medical image classification method based on a dynamic threshold. In S2, the processing of the unlabeled images further includes:
[0105] Inputting the first strongly enhanced image and the second strongly enhanced image into the initial semi-supervised image classification model, obtaining a predicted probability distribution of the first strongly enhanced image and the second strongly enhanced image, and generating a pseudo label based on the predicted probability distribution;
[0106] The pseudo-label set with the highest prediction probability, that is, mask = 1, is obtained by combining the pseudo-labels. The logarithmic loss L is introduced on the first and second strongest enhanced images respectively as follows: neg ;
[0107]
[0108] Among them, N μ Indicates the number of pseudo labels in the pseudo label set, represents the probability that the jth pseudo label is predicted to be the true category, ε = 10 -6 ;
[0109] Obtaining prediction results of the first strongly enhanced image and the second strongly enhanced image in the initial semi-supervised image classification model, and performing normalization on the prediction results;
[0110] The mean square error consistency loss of the first strongly enhanced image and the second strongly enhanced image is obtained based on the standardized prediction results.
[0111] In this embodiment, ε=10 is introduced -6 Prevent log0 value from being unstable.
[0112] In this example, the filtered pseudo-label samples are further mined for classes with high predicted probabilities but not pseudo-labeled as pseudo-negative labels. These pseudo-negative classes are suppressed in the strongly enhanced image, guiding the model to avoid high-confidence misjudgments. Furthermore, the consistency loss is calculated using the outputs of the two strongly enhanced images, encouraging the model to maintain stable predictions under different perturbations.
[0113] In this embodiment, by inputting the first strongly enhanced image and the second strongly enhanced image into the initial semi-supervised image classification model, the predicted probability distribution of the first strongly enhanced image and the second strongly enhanced image is obtained, and pseudo labels are generated based on the predicted probability distribution, and the logarithmic loss is calculated. The prediction results of the first strongly enhanced image and the second strongly enhanced image in the initial semi-supervised image classification model are obtained, and the prediction results are standardized. The mean square error consistency loss of the first strongly enhanced image and the second strongly enhanced image is obtained based on the standardized prediction results. By obtaining the logarithmic loss and consistency loss, a basis is provided for image loss and model optimization.
[0114] Example 7:
[0115] Based on Embodiment 6, an embodiment of the present invention provides a multi-augmentation semi-supervised medical image classification method based on a dynamic threshold. In S2, the processing of unlabeled images further includes:
[0116] Calculate the total loss of the unlabeled image based on the consistency loss, logarithmic loss, and hybrid loss, and use the total loss as the unlabeled loss.
[0117] In this embodiment, the sum of the product of the consistency loss and its corresponding preset weight, the product of the logarithmic loss and its corresponding preset weight, and the product of the hybrid loss and its corresponding preset weight is used as the total loss of the unlabeled image.
[0118] The beneficial effect of the above design is that by calculating the pseudo-label loss, pseudo-negative label loss, and consistency loss for multiple views of the unlabeled image, and combining these losses with weights, the total loss of the unlabeled part is formed. This part of the loss acts together with the supervised loss during training to guide the model to learn more robust feature representations on the unlabeled data.
[0119] Embodiment 8:
[0120] Based on Embodiment 7, an embodiment of the present invention provides a multi-augmentation semi-supervised medical image classification method based on a dynamic threshold. The loss merging of labeled images and unlabeled images includes:
[0121] Merge the losses of labeled images and unlabeled images according to the following formula to obtain the final loss function L:
[0122] L = L X + α * L β
[0123] where, L X represents the supervised loss value of the labeled image, α represents the adjustment factor, and L β represents the unlabeled loss of the unlabeled image.
[0124] In this embodiment, α, as the adjustment factor, is used for backpropagation to update the model parameters and update the model in each iteration.
[0125] The beneficial effect of the above design is that by merging the losses of labeled images and unlabeled images to obtain the final loss function, and using the final loss function for model optimization, the model accuracy and stability of the obtained target semi-supervised image classification model are guaranteed.
[0126] Embodiment 9:
[0127] Based on Embodiment 1, an embodiment of the present invention provides a multi-augmentation semi-supervised medical image classification method based on a dynamic threshold, asFigure 3 As shown, in S3, evaluating and adjusting the target semi-supervised image classification model based on performance evaluation metrics includes:
[0128] Determining model problems based on performance evaluation metrics;
[0129] Obtaining adjustment methods matching the model problems;
[0130] Adjusting the target semi-supervised image classification model according to the adjustment methods.
[0131] In this embodiment, for example, accuracy is a measure of the overall prediction correctness. When the accuracy is too low, the corresponding adjustment method is to improve the quality of training samples. For example, recall measures the ability of the model to capture positive classes. When the recall is too low, the corresponding adjustment method is to adjust the threshold.
[0132] The beneficial effects of the above design solution are: By determining model problems based on performance evaluation metrics, obtaining adjustment methods matching the model problems, and adjusting the target semi-supervised image classification model according to the adjustment methods, the robustness of the model to changes in the distribution of image data is enhanced, and stable and consistent classification performance is maintained.
[0133] Embodiment 10:
[0134] Based on Embodiment 1, an embodiment of the present invention provides a multi-enhanced semi-supervised medical image classification method based on a dynamic threshold, which dynamically updates the global threshold in combination with the training progress and class distribution information, including:
[0135] Setting a basic threshold adjustment strategy in a way that the global threshold is dynamically increased as the training progress increases, and adjusting the basic threshold adjustment strategy in a way that the global threshold is set larger as the class distribution information of the samples is more concentrated, to obtain an initial threshold adjustment strategy;
[0136] Statistical accuracy of pseudo-labels in multiple periods under the initial threshold adjustment strategy to obtain an accuracy trend, and subtracting the accuracy trend from the first accuracy threshold and the second accuracy threshold respectively to obtain a first difference trend and a second difference trend;
[0137] When the accuracy trend is gradually rising and the second difference trend is greater than zero, keep the current initial threshold adjustment strategy unchanged;
[0138] When the accuracy trend is gradually rising, the first difference trend is greater than zero, and the second difference trend is not greater than zero, determine the target adjustment value of the initial threshold adjustment strategy based on the proportion of the second difference trend that is not greater than zero;
[0139] When the accuracy rate trend shows a gradual decline, determine an upward adjustment weight for the initial threshold adjustment strategy based on the decline mean, and respectively obtain the first ratio and the second ratio that are not greater than zero in the first difference trend and the second difference trend. Determine a first adjustment value based on the first ratio and the first accuracy threshold, and determine a second adjustment value based on the second ratio and the second accuracy threshold;
[0140] Based on the upward adjustment weight, the first adjustment value, and the second adjustment value, determine the target adjustment value for the initial threshold adjustment strategy;
[0141] When the accuracy rate trend is irregular with rises and falls, determine the target adjustment value for the initial threshold adjustment strategy according to random rules;
[0142] Adjust the initial threshold adjustment strategy based on the target adjustment value to determine the dynamically updated global threshold.
[0143] In this embodiment, the first accuracy threshold is the lowest accuracy threshold, and the second accuracy threshold is greater than the first accuracy threshold and is an accuracy threshold for excellent performance.
[0144] In this embodiment, based on the upward adjustment weight, the first adjustment value, and the second adjustment value, determine the target adjustment value for the initial threshold adjustment strategy as the product of the upward adjustment weight and the sum of the first adjustment value and the second adjustment value as the target adjustment value.
[0145] In this embodiment, the larger the ratio, the smaller the first accuracy threshold, and the larger the determined adjustment value.
[0146] In this embodiment, the accuracy rates of the pseudo-labels in multiple periods are to obtain multiple accuracy data by observing for a longer time and then adjust the threshold strategy, providing an accurate basis for the adjustment.
[0147] The beneficial effects of the above design scheme are as follows: By combining the training progress and the class distribution information to design the initial threshold adjustment strategy, after running according to the initial threshold adjustment strategy for a period of time, count the accuracy rates of the pseudo-labels in multiple periods under the initial threshold adjustment strategy, analyze the trend and magnitude of the accuracy rates, and obtain the adjustment value for the strategy according to the analysis results, so as to better match the superior global threshold during the model optimization process, ensure the performance of the model, and finally achieve the optimal state of the global threshold by making indefinite adjustments to the threshold adjustment strategy, thereby achieving a better optimization effect on the model and ensuring the performance of the model.
[0148] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of this application document and its equivalent technologies, the present invention also intends to include these changes and modifications.
Claims
1. A multi-enhancement semi-supervised medical image classification method based on dynamic threshold, characterized by: include: S1: Based on the skin disease image dataset, labeled images and unlabeled images are obtained. Based on deep learning, the initial semi-supervised image classification model is established using the labeled images and unlabeled images. S2: Process the labeled images and unlabeled images separately and merge the losses. Based on the merged results, a loss function is obtained. Based on the loss function, the initial semi-supervised image classification model is optimized to obtain the target semi-supervised image classification model. S3: Evaluate and adjust the target semi-supervised image classification model based on performance evaluation metrics.
2. The method for multi-enhancement semi-supervised medical image classification based on dynamic threshold according to claim 1, characterized in that: In S1, based on deep learning, an initial semi-supervised image classification model is established using labeled images and unlabeled images, including: Three consecutive convolutional layer structures are used as feature extraction modules, and WRN-28-2 is used as the backbone network to construct a wide residual network module; The network model is constructed based on the feature extraction module and the residual network module; The network model is trained using labeled images and unlabeled images to obtain an initial semi-supervised image classification model.
3. The method for multi-enhancement semi-supervised medical image classification based on dynamic threshold according to claim 1, characterized in that: In S2, processing the labeled image includes: The labeled image is input into the initial semi-supervised image classification model to obtain a classification prediction result, the classification prediction result is compared with the actual result, and the supervision loss value is calculated using the cross entropy loss function.
4. The method for multi-enhancement semi-supervised medical image classification based on dynamic threshold according to claim 1, characterized in that: In S2, processing the unlabeled image includes: Performing one weak enhancement and two strong enhancements on the unlabeled image to generate a weakly enhanced image, a first strongly enhanced image, and a second strongly enhanced image; A mixing operation is performed on the weakly enhanced image of the unlabeled image, the first strongly enhanced image, and the second strongly enhanced image, and a mixing loss is obtained.
5. The method for multi-enhancement semi-supervised medical image classification based on dynamic threshold according to claim 4, characterized in that: In S2, processing the unlabeled image includes: Input the weakly enhanced image into the initial semi-supervised image classification model to obtain the predicted probability distribution of the weakly enhanced image, and generate pseudo labels based on the predicted probability distribution; Based on the pseudo label of each weakly enhanced image, calculate the prediction confidence of each weakly enhanced image; The global threshold is dynamically updated based on the training progress and category distribution information. Whether a sample adopts a pseudo label is controlled by the following formula: Among them, when mask is equal to 1, it means that the sample adopts the pseudo label, when mask is equal to 0, it means that the sample does not adopt the pseudo label, conf represents the prediction confidence of the sample, and τ represents the real-time value of the global threshold.
6. The method for multi-enhancement semi-supervised medical image classification based on dynamic threshold according to claim 5, characterized in that: In S2, processing the unlabeled image includes: Inputting the first strongly enhanced image and the second strongly enhanced image into the initial semi-supervised image classification model, obtaining a predicted probability distribution of the first strongly enhanced image and the second strongly enhanced image, and generating a pseudo label based on the predicted probability distribution; The pseudo-label set with the highest prediction probability is obtained when mask = 1, and the logarithmic loss L is introduced on the first and second strongest enhanced images respectively as follows: neg ; Among them, N μ Indicates the number of pseudo labels in the pseudo label set, represents the probability that the jth pseudo label is predicted to be the true category, ε = 10 -6 ; Obtaining prediction results of the first strongly enhanced image and the second strongly enhanced image in the initial semi-supervised image classification model, and performing normalization on the prediction results; The mean square error consistency loss of the first strongly enhanced image and the second strongly enhanced image is obtained based on the standardized prediction results.
7. The method for multi-enhancement semi-supervised medical image classification based on dynamic threshold according to claim 6, characterized in that: In S2, processing the unlabeled image includes: The total loss of the unlabeled image is calculated based on the consistency loss, logarithmic loss and hybrid loss, and the total loss is used as the unlabeled loss.
8. The method for multi-enhancement semi-supervised medical image classification based on dynamic threshold according to claim 7, characterized in that: Merge losses for labeled and unlabeled images, including: The loss of labeled images and unlabeled images is combined according to the following formula to obtain the final loss function L: L=L X +a*L β Among them, L X represents the supervised loss value of the labeled image, α represents the adjustment factor, L β represents the unlabeled loss for unlabeled images.
9. The method for multi-enhancement semi-supervised medical image classification based on dynamic threshold according to claim 1, characterized in that: In S3, the target semi-supervised image classification model is evaluated and adjusted based on the performance evaluation index, including: Identify model issues based on performance evaluation metrics; Get the tuning method that matches the model problem; The target semi-supervised image classification model is adjusted according to the adjustment method.
10. The method for multi-enhancement semi-supervised medical image classification based on dynamic threshold according to claim 1, characterized in that: Dynamically update the global threshold based on training progress and category distribution information, including: A basic threshold adjustment strategy is set by dynamically increasing the global threshold as the training progresses. The basic threshold adjustment strategy is adjusted by setting a larger global threshold as the sample category distribution information becomes more concentrated, thereby obtaining an initial threshold adjustment strategy. Counting the accuracy of pseudo labels in multiple time periods under the initial threshold adjustment strategy to obtain an accuracy trend, and subtracting the accuracy trend from the first accuracy threshold and the second accuracy threshold respectively to obtain a first difference trend and a second difference trend; When the accuracy rate trend is gradually increasing and the second difference trends are all greater than zero, maintaining the current initial threshold adjustment strategy unchanged; When the accuracy rate trend is gradually increasing, and the first difference trends are all greater than zero, and the second difference trends are not all greater than zero, determining a target adjustment value for the initial threshold adjustment strategy based on the proportion of the second difference trends that is not greater than zero; When the accuracy trend is gradually decreasing, determining an upward adjustment weight for the initial threshold adjustment strategy based on the decreasing mean, and respectively obtaining a first ratio and a second ratio of the first difference trend and the second difference trend that are not greater than zero, determining a first adjustment value based on the first ratio and the first accuracy threshold, and determining a second adjustment value based on the second ratio and the second accuracy threshold; determining a target adjustment value for the initial threshold adjustment strategy based on the upward adjustment weight, the first adjustment value, and the second adjustment value; When the accuracy rate trend is irregularly rising and falling, determining a target adjustment value for the initial threshold adjustment strategy according to a random rule; The initial threshold adjustment strategy is adjusted based on the target adjustment value and then the global threshold is dynamically updated.
Citation Information
Cited By
Disease grading method, system and equipment based on shallow supervision and dynamic ordinal number learning, and medium
CN121416048A
Disease grading method, system, device and medium based on shallow supervision and dynamic ordinal learning
CN121416048B