Medical image classification method and system based on semi-supervised dynamic fusion matching

By matching view similarity, calibrating pseudo-labels and dynamically adjusting thresholds in medical image classification, the problems of data scarcity and category imbalance are solved, the quality of pseudo-labels and the robustness of the model are improved, and more efficient medical image classification is achieved.

CN120543928APending Publication Date: 2025-08-26UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510628525.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2025-08-26

AI Technical Summary

Technical Problem

The prior art has problems of data scarcity, category imbalance and pseudo-label optimization in medical image classification, especially in semi-supervised learning. High confidence pseudo-label selection methods may lead to the neglect of low confidence or boundary samples, limiting the generalization ability of the model in complex scenarios.

Method used

By matching the similarity between views under different enhancement techniques, pseudo-labels are generated, and calibration and fusion are performed, and pseudo-labels are calibrated in combination with class anchor library and memory library, dynamically adjust thresholds and introduce category balance losses, optimize pseudo-label selection and category learning.

Benefits of technology

It improves the accuracy of pseudo-labels and the robustness of the model, enhances the generalization ability of the model to class imbalance data, and optimizes the performance of medical image classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120543928A_ABST
    Figure CN120543928A_ABST
Patent Text Reader

Abstract

The invention provides a medical image classification method based on semi-supervised dynamic fusion matching, and belongs to the technical field of images, and the method comprises the steps: generating a pseudo label based on a medical image through calculating the correlation of samples under a weak enhancement view and a strong enhancement view, and carrying out the calibration and fusion processing, and generating a fused class pseudo label; dynamically calculating a threshold value at each time step, and based on dynamic adjustment of the threshold value, optimizing selection and category learning of fused category pseudo labels through a consistency loss function; for long-tail distributed medical image data, category balance loss is introduced, and medical images are classified by dynamically adjusting decision boundaries of each category and taking a total loss function as a target. According to the method, the problems of data scarcity, category imbalance and false label optimization in medical image classification are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and in particular relates to a medical image classification method and system based on semi-supervised dynamic fusion matching. Background Art

[0002] Over the past few decades, thanks to the availability of large-scale annotated datasets and the continuous growth of computing resources, deep neural networks (DNNs) have demonstrated their successful applications in various visual tasks. However, the cost of collecting large amounts of labeled data in real-world scenarios is very expensive, especially in medical imaging applications. Therefore, how to use a small amount of labeled data for learning has become a major problem and challenge in the field of computer vision. Among many methods, semi-supervised learning (SSL) has achieved remarkable performance due to its advantages in utilizing a large amount of unlabeled data. Among them, consistency regularization and pseudo-labeling are two extremely effective techniques in utilizing unlabeled data. These methods mainly combine weak and strong augmentation techniques, and use cross-entropy as the consistency regularization criterion. By using labeled samples to train semantic classifiers, the predicted distribution is used as pseudo-labels for unlabeled samples.

[0003] The following are some research status and deficiencies of related work: Semi-supervised learning improves model performance by combining unlabeled and labeled data. Commonly used techniques include consistency regularization and pseudo-labeling. Consistency regularization requires the model to output consistent predictions for different perturbation versions of the same instance. Self-integration mechanisms (such as Temporal Ensembling) achieve consistency by minimizing the mean square error between the probability distributions of predictions from different views to generate consensus predictions. Recent work has further improved pseudo-label generation by enhancing consistency, data augmentation (MixUp) techniques, and distribution alignment strategies. Traditional semi-supervised methods (such as FixMatch) simplify this process, retaining only high-confidence pseudo-labels and achieving advanced performance. However, this method relies too much on high-confidence pseudo-labels, which may lead to the neglect of low-confidence or boundary samples, thereby limiting the generalization ability of the model in some complex scenarios.

[0004] Regarding pseudo-label threshold selection, methods for selecting high-confidence pseudo-labels have been improved, allowing for greater utilization of weak learning classes. Methods such as the soft thresholding method (Soft) and the free thresholding method (Free) improve the efficiency of unlabeled data utilization by weighting or adaptively adjusting thresholds. Curriculum pseudo-labeling methods replace fixed thresholds with dynamic thresholds, better supporting semi-supervised learning. However, how to adaptively select an appropriate dynamic threshold remains a topic worthy of further research.

[0005] Long-tail recognition (LTR) focuses on the imbalanced distribution of classes and strives to improve the recognition accuracy of minority classes. The label distribution-aware marginal loss method (LDAM) improves the generalization ability of tail classes through label distribution-aware marginal loss, and the reduced bias method (RIDE) reduces bias on long-tail data by integrating experts. Long-tail recognition (LTR) methods typically rely on prior knowledge of class distribution or are applied after training, while class-balanced loss does not rely on priors and focuses on addressing the bias problem of pseudo-labels. Class-balanced loss methods do not rely on priors and focus on addressing the bias problem of pseudo-labels, but how to effectively deal with label noise and reduce the negative impact of pseudo-labels remains a challenge that needs to be addressed. Summary of the Invention

[0006] In response to the above-mentioned deficiencies in the prior art, the present invention provides a medical image classification method and system based on semi-supervised dynamic fusion matching. The present invention matches the similarities between views under different enhancement technologies to obtain more in-depth and detailed feature matching, thereby solving the problems of data scarcity, category imbalance and pseudo-label optimization in medical image classification.

[0007] In order to achieve the above objectives, the technical solution adopted by the present invention is: a medical image classification method based on semi-supervised dynamic fusion matching, comprising the following steps:

[0008] S1. Based on medical images, the correlation between samples in weakly enhanced and strongly enhanced views is calculated to generate pseudo labels. The pseudo labels are then calibrated and fused to generate fused category pseudo labels.

[0009] S2. Dynamically calculate the threshold at each time step, and based on the dynamic adjustment of the threshold, optimize the selection of fused category pseudo labels and category learning through the consistency loss function to achieve semi-supervised dynamic fusion matching;

[0010] S3. To address the category imbalance problem in long-tail datasets, we introduce category balance loss to dynamically adjust the decision boundary of each category and use the total loss function as the target to classify medical images.

[0011] The beneficial effect of the present invention is that the present invention obtains a more in-depth and detailed feature matching by matching the similarities between views under different enhancement technologies. Specifically, it first ensures that the views obtained by strong enhancement and weak enhancement remain similar at the category level (category similarity), and also show consistency at the sample feature level (sample similarity). Unlike the previous practice of only using weakly enhanced predictions as pseudo-labels, the present invention establishes a labeled sample memory library and introduces integration and decomposition operations. The integration operation adjusts the category pseudo-label by summarizing the similarity information of the samples to the category, while the decomposition operation refines the category information to the sample, realizing the information interaction and fusion of the category and sample pseudo-labels. In addition, inspired by the learning strategy, the present invention considers the learning status of each category during the training process, and replaces the pre-defined high threshold with a flexible threshold according to the different learning difficulties of each category. The present invention obtains a more in-depth and detailed feature matching by matching the similarities between views under different enhancement technologies, thereby solving the problems of data scarcity, category imbalance and pseudo-label optimization in medical image classification.

[0012] Furthermore, the step S1 includes the following steps:

[0013] S101, mapping the original features of the medical image to a low-dimensional space through a nonlinear projection head;

[0014] S102. Based on the mapping results, generate correlations between samples in the weakly enhanced view and the strongly enhanced view by calculating similarities, and generate pseudo labels. The distribution of correlations is used to measure the degree of matching between medical image samples in two different enhanced views, and a cross-entropy loss function is used to constrain the consistency of the correlation distributions between the weakly enhanced view and the strongly enhanced view.

[0015] S103, calibrating the pseudo labels by combining the class anchor library and the memory library, wherein the class anchor represents the mean of the class feature and the memory library stores the labeled medical image sample information;

[0016] S104: Aggregate the sample correlations of the medical images to the category level based on the calibration results, and perform weighted fusion processing to generate fused category pseudo labels.

[0017] The beneficial effects of the above further scheme are: step S101 performs feature mapping through a nonlinear projection head, which can achieve feature dimensionality reduction and extraction, reduce data complexity and highlight important features; step S102 uses data enhancement to generate the correlation of samples under different views and generate pseudo labels, while increasing data diversity, ensuring feature consistency through the cross-entropy loss function, and improving model stability and robustness; step S103 calibrates pseudo labels with the help of class anchor library and memory library, which can correct pseudo label errors, integrate prior knowledge and reduce error accumulation; step S104 performs category-level aggregation and weighted fusion processing on sample correlation, which can enhance the model's understanding and discrimination ability of categories, make pseudo labels more accurate and reliable, and thus improve the performance of the model in medical image analysis.

[0018] Furthermore, the expression of the cross entropy loss function is as follows:

[0019]

[0020] Among them, L C represents the cross entropy loss function, μ represents the batch size, B represents the number of samples, H represents the cross entropy, C w represents a weakly enhanced view, C s Represents a strongly enhanced view.

[0021] Furthermore, the pseudo labels are calibrated by combining the class anchor library and the memory library, specifically:

[0022] Based on the class anchor library, the low-dimensional embedding of each medical image sample will be assigned a category;

[0023] The calibration process is completed by aligning the category predictions with the category information in the memory bank and regenerating the calibrated category pseudo labels.

[0024] The beneficial effects of the above-mentioned further solution are as follows: the present invention has significant advantages in combining the class anchor library and the memory library to calibrate pseudo-labels. First, it can improve the accuracy of pseudo-labels, accurately assign categories with the help of the class anchor library, and then compare and correct with the memory library information to reduce misjudgment bias; second, it can enhance the generalization ability of the model, using the prior knowledge of the two to help the model learn category differences, avoid overfitting, and make the model stable across different data sets; finally, it effectively improves training efficiency, with rapid matching of the class anchor library and rapid correction of the memory library, accelerating the calibration process, reducing reliance on manual annotation, saving time and resources, and optimizing the medical image analysis process.

[0025] Furthermore, the expression of the threshold in step S2 is as follows:

[0026] T t (c) = γ t (c)·τ

[0027] Among them, T t (c) represents the dynamically adjusted threshold, γ t (c) represents the normalized value of the learning effect of category c at time step t, and τ represents a fixed base threshold.

[0028] The beneficial effect of this further approach is that the base threshold provides a stable reference standard, ensuring that the threshold does not become excessive due to fluctuations in learning performance. Furthermore, the dynamic adjustment of learning performance allows the threshold to flexibly reflect the current learning state of the model. The combination of these two approaches strikes a balance between stability and flexibility, optimizing the model training process.

[0029] Furthermore, the expression of the consistency loss function in step S2 is as follows:

[0030]

[0031] Among them, L u represents the consistency loss function of unlabeled medical image samples, μ represents the batch size, B represents the number of samples, b represents the sample index, and p ω represents the weakly enhanced view prediction probability, p ω (α(U b )) represents the unlabeled medical image sample U b The predicted probability, T t represents the dynamic threshold of category c, H represents the cross entropy, p s represents the strong enhanced view prediction probability, α(U b ) represents the weak enhancement transformation for unlabeled medical images, α represents the weak enhancement transformation, p ω represents the pseudo label, β(U b )) represents the strong enhancement transformation for unlabeled medical images, β represents the strong enhancement transformation, H(p ω ,p s (β(U b ))) represents the pseudo label p w With strong enhanced view p s (β(U b )).

[0032] The beneficial effect of the above further scheme is that the consistency loss function can effectively improve the generalization ability, convergence speed, robustness and accuracy of the model by utilizing unlabeled data, dynamic threshold adjustment, combining pseudo-labels and enhanced views, batch processing and consistency constraints, and adapting to the characteristics of medical imaging data.

[0033] Furthermore, the expression of the total loss function is as follows:

[0034] L=L S +λ u L' u +λ C L C

[0035]

[0036] l=f(β(U i ))

[0037] Among them, L represents the total loss function, L S Represents supervised loss, loss function for labeled images, L C represents the cross entropy loss function, λ u represents the weight parameter, L' u represents the unsupervised training loss function, λ C represents the weight parameter, μ represents the batch size, B represents the number of samples, b represents the sample index, and p ω represents the weakly enhanced view prediction probability, p ω (α(U b )) represents the unlabeled medical image sample U b The predicted probability, T t represents the dynamic threshold of category c, L CBL Denotes H(p in unsupervised loss ω ,p s (β(U b ))), H(p ω ,p s (β(U b ))) represents the pseudo label p ω With strong enhanced view p s (β(U b )), the cross entropy loss between Represents the index of the true category prediction after boundary adjustment, Represents the predicted value of the true label, Δy i represents the adjustment term, C represents the number of categories, k represents the index variable, y i represents the true label, Represents the index of non-real category prediction after boundary adjustment, l k and Δk represent the category outputs other than the true category and their corresponding dynamic boundary adjustment values, respectively. j represents the dynamic decision boundary value of category j, p j represents the probability prediction, λ represents the weight parameter, l represents the logarithmic probability corresponding to the true category, f represents the prediction result, β(U i ) indicates strong enhancement of the sample.

[0038] The beneficial effect of the above further scheme is that the design of the total loss function in the present invention enables the model to comprehensively utilize labeled and unlabeled data. Supervised loss is used to learn known label features, unsupervised loss and cross-entropy loss use unlabeled data to improve generalization ability, unsupervised training loss helps the model learn the intrinsic structure of the data, distinguish sample categories and enhance feature capture capabilities by comparing prediction probabilities and dynamic thresholds and contrastive learning loss, contrastive learning loss allows the model to maintain consistent predictions under different data augmentation methods, enhance robustness and expand data, dynamic thresholds and decision boundaries can be adaptively adjusted to improve convergence speed and stability, and the prediction index after boundary adjustment can optimize the model's classification performance for difficult-to-classify samples. The comprehensive use of multiple information allows the model to comprehensively learn data features, avoid limitations, improve accuracy and robustness, and is suitable for the field of medical imaging.

[0039] The present invention provides a medical image classification system based on semi-supervised dynamic fusion matching, which is used to perform a medical image classification method, including:

[0040] The fusion matching module is used to generate pseudo labels based on medical images by calculating the correlation between samples in weakly enhanced views and strongly enhanced views, and then calibrate and fuse them to generate fused category pseudo labels;

[0041] Dynamic threshold adjustment module, which is used to dynamically calculate the threshold at each time step. Based on the dynamic adjustment of the threshold, the consistency loss function is used to optimize the selection of fused category pseudo labels and category learning to achieve semi-supervised dynamic fusion matching;

[0042] The category balancing module is used to address the category imbalance problem in long-tail datasets. It introduces category balance loss, dynamically adjusts the decision boundary of each category, and classifies medical images with the total loss function as the target.

[0043] The beneficial effect of the present invention is that the present invention obtains a more in-depth and detailed feature matching by matching the similarities between views under different enhancement technologies. Specifically, it first ensures that the views obtained by strong enhancement and weak enhancement remain similar at the category level (category similarity), and also show consistency at the sample feature level (sample similarity). Unlike the previous practice of only using weakly enhanced predictions as pseudo-labels, the present invention establishes a labeled sample memory library and introduces integration and decomposition operations. The integration operation adjusts the category pseudo-label by summarizing the similarity information of the samples to the category, while the decomposition operation refines the category information to the sample, realizing the information interaction and fusion of the category and sample pseudo-labels. In addition, inspired by the curriculum learning strategy, the present invention considers the learning status of each category during the training process, and replaces the pre-defined high threshold with a flexible threshold according to the different learning difficulties of each category. The present invention obtains a more in-depth and detailed feature matching by matching the similarities between views under different enhancement technologies, thereby solving the problems of data scarcity, category imbalance and pseudo-label optimization in medical image classification. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 Flow chart of the method of the present invention.

[0045] Figure 2 Schematic diagram of the medical image classification framework of the present invention.

[0046] Figure 3 Schematic diagram of the system structure of the present invention. DETAILED DESCRIPTION

[0047] The specific embodiments of the present invention are described below to facilitate understanding of the present invention by those skilled in the art. However, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations utilizing the concepts of the present invention are protected.

[0048] Example 1

[0049] This paper optimizes image recognition through semi-supervised learning. The core idea is to fuse labeled data and unlabeled data, ensuring the performance of supervised learning while effectively utilizing unlabeled data through unsupervised methods. In addition, a class balance loss is introduced to further improve the performance of the model for long-tail distribution data, which is one of the characteristics of medical datasets. Figures 1 to 2 As shown, the present invention provides a medical image classification method based on semi-supervised dynamic fusion matching, and its implementation method is as follows:

[0050] S1. Based on medical images, the correlation between samples in weakly enhanced and strongly enhanced views is calculated to generate pseudo labels. Then, calibration and fusion are performed to generate fused category pseudo labels. The implementation method is as follows:

[0051] S101, mapping the original features of the medical image to a low-dimensional space through a nonlinear projection head;

[0052] S102. Based on the mapping results, generate correlations between samples in the weakly enhanced view and the strongly enhanced view by calculating similarities, and generate pseudo labels. The distribution of correlations is used to measure the degree of matching between medical image samples in two different enhanced views, and a cross-entropy loss function is used to constrain the consistency of the correlation distributions between the weakly enhanced view and the strongly enhanced view.

[0053] S103. Calibrate the pseudo labels by combining the class anchor library and the memory library, wherein the class anchor represents the mean value of the class feature and the memory library stores the labeled medical image sample information, which is specifically:

[0054] Based on the class anchor library, the low-dimensional embedding of each medical image sample will be assigned a category;

[0055] The calibration process is completed by aligning the category prediction with the category information in the memory bank and regenerating the calibrated category pseudo-label;

[0056] S104: Aggregate the sample correlations of the medical images to the category level based on the calibration results, and perform weighted fusion processing to generate fused category pseudo labels.

[0057] In this embodiment, the operations of fusing labeled data and unlabeled data in steps S103 and S104 are specifically manifested as: calibration of pseudo labels (combining class anchors and memory) and weighted fusion processing (aggregating correlations and generating class pseudo labels). These two steps process the information of labeled samples and unlabeled samples (through pseudo labels) respectively, and then fuse them to improve overall model performance.

[0058] In this embodiment, the goal of this step is to improve the quality of pseudo-labels by calculating the correlation between samples in the weakly enhanced view and the strongly enhanced view, and through fusion and calibration operations, making the correlation distribution between the two as consistent as possible. The present invention not only relies on the role of the classifier, but also combines the feature information of each sample and uses the similarity between samples to generate and calibrate pseudo-labels. To calculate the correlation of each sample in the weakly enhanced and strongly enhanced views, the original features are first mapped to a low-dimensional space using a nonlinear projection head. Then, the similarity is calculated using the L2 normalized dot product and a softmax layer is used to generate a correlation distribution. These correlation distributions are used to measure the degree of match between samples in the two different enhanced views, ensuring their consistency. Pseudo-label calibration is performed by combining a class anchor library and a memory library. The class anchor represents the mean of the class features, while the memory library stores information about the labeled samples. The low-dimensional embedding of each sample is assigned to a class, further refining the correlation calculation of the weakly enhanced view. By aligning the class prediction with the class information in the memory library, a calibrated class pseudo-label is regenerated, ensuring that the pseudo-labels of the weakly enhanced view are more accurate. By minimizing the correlation difference between the weakly enhanced view and the strongly enhanced view, the present invention uses cross entropy loss to constrain the distribution consistency between the two views. This process is achieved by optimizing the cross entropy loss function L C is implemented, where the cross entropy loss function is based on the weakly enhanced view C w and strongly enhanced view C s The difference between the two is used for training:

[0059]

[0060] Among them, L C represents the cross entropy loss function, μ represents the batch size, B represents the number of samples, H represents the cross entropy, C w represents a weakly enhanced view, C s Represents a strongly enhanced view.

[0061] In addition to matching view relevance, this step further enhances pseudo-label quality by fusing category and sample information. Specifically, sample relevance is aggregated to the category level, and a weighted fusion operation is used to generate fused category pseudo-labels. By balancing category and sample information, the adjusted pseudo-labels incorporate more layers of features, improving model robustness.

[0062] S2. Dynamically calculate the threshold at each time step, and based on the dynamic adjustment of the threshold, optimize the selection of fused category pseudo labels and category learning through the consistency loss function to achieve semi-supervised dynamic fusion matching;

[0063] In this example, a dynamic threshold adjustment strategy is proposed to improve the utilization of unlabeled data and optimize the selection of pseudo-labels. Traditional methods typically use a fixed high threshold τ to select unlabeled samples, but this approach ignores other potentially useful samples and may lead to class imbalance. Dynamically adjusting the threshold addresses this issue, making the learning process for different classes more flexible and efficient.

[0064] Traditional methods usually select a high fixed threshold τ to ensure high pseudo-label quality, but this may lead to the loss of some category data, especially those categories that are difficult to learn. The fixed threshold method ignores the differences in learning status between categories and limits the full learning of different categories. This step dynamically adjusts the threshold of each category to adapt to the learning effect of different categories. The threshold is dynamically calculated at each time step, and the specific adjustment method is to calculate the learning effect σ of the category. t (c) to determine the new threshold. The learning effect of category c is reflected by the model’s prediction results for unlabeled data, σ t (c) is the number of samples predicted to be of this category with a probability exceeding the threshold. In order to make the threshold more flexible, σ t (c) is normalized to the range of 0 to 1 to obtain the adjustment coefficient γ t (c) and dynamically adjust the threshold T based on this t (c)

[0065] T t (c) = γ t (c)·τ

[0066] Among them, T t (c) represents the dynamically adjusted threshold, γ t (c) represents the normalized value of the learning effect of category c at time step t, and τ represents a fixed basic threshold. With the dynamic adjustment of the threshold, the present invention further optimizes pseudo-label selection and category learning through consistency loss. The specific consistency loss calculation formula is as follows:

[0067]

[0068] Among them, L u represents the consistency loss function of unlabeled medical image samples, μ represents the batch size, B represents the number of samples, b represents the sample index, and p ω represents the weakly enhanced view prediction probability, p ω (α(U b )) represents the unlabeled medical image sample U b The predicted probability, T t represents the dynamic threshold of category c, H represents the cross entropy, p s represents the strong enhanced view prediction probability, α(Ub ) represents the weak enhancement transformation for unlabeled medical images, α represents the weak enhancement transformation, p ω represents the pseudo label, β(U b )) represents the strong enhancement transformation for unlabeled medical images, β represents the strong enhancement transformation, H(p ω ,p s (β(U b ))) represents the pseudo label p w With strong enhanced view p s (β(U b )).

[0069] This consistency loss function calculates the relationship between the model's prediction of unlabeled data at time step t and the dynamically adjusted threshold, and optimizes the model's output through cross-entropy loss to ensure a balanced category distribution while improving the utilization of training samples for difficult-to-learn categories.

[0070] S3. To address the category imbalance problem in long-tail datasets, we introduce category balance loss to dynamically adjust the decision boundary of each category and use the total loss function as the target to classify medical images.

[0071] In this embodiment, it should be noted that the consistency loss function involved in step S2 is used to constrain the entire training process, and is a parallel processing process with step S3.

[0072] In this embodiment, when processing long-tail distribution medical data, the main challenge faced by the medical image classification process is the subtle differences between most categories. Generally, these differences are difficult to accurately identify without professional knowledge guidance. In addition, some categories are easily misclassified into categories with a larger number due to the scarcity of samples. This confusion between categories may be a source of pseudo-label bias. In order to alleviate the bias of the model on difficult-to-distinguish categories, the present invention proposes a category balance loss (CBL), which dynamically adjusts the classification boundary for each category by introducing category-specific boundary values ​​to ensure that the model's classification decisions for categories of different difficulty are more accurate and fair. It can be expressed as:

[0073]

[0074] l=f(β(U i ))

[0075] The loss is updated by calculating the boundary adjustment value of each class relative to other classes in the current training state. In more detail, for those classes that are difficult to classify correctly due to the scarcity of samples, L CBLA larger boundary value will be assigned to enable the model to make more accurate predictions on these categories. CBL Instead of H(p ω ,p s (β(U b ))).

[0076] The updated unsupervised training loss is expressed as follows:

[0077]

[0078] Therefore, the overall training objectives of the present invention are:

[0079] L=L S +λ u L' u +λ C L C

[0080] Among them, L represents the total loss function, L S Represents supervised loss, loss function for labeled images, L C represents the cross entropy loss function, λ u represents the weight parameter, L' u represents the unsupervised training loss function, λ C represents the weight parameter, μ represents the batch size, B represents the number of samples, b represents the sample index, the bth sample in the B batch, p ω represents the weakly enhanced view prediction probability, p ω (α(U b )) represents the unlabeled medical image sample U b The predicted probability, T t represents the dynamic threshold of category c, L CBL Denotes H(p in unsupervised loss ω ,p s (β(U b ))), H(p ω ,p s (β(U b ))) represents the pseudo label p ω With strong enhanced view p s (β(U b )) between the cross entropy loss, Represents the index of the true category prediction after boundary adjustment, Represents the predicted value of the true label, Δy i represents the adjustment term, C represents the number of categories, k represents the index variable, y i represents the true label, Represents the index of non-real category prediction after boundary adjustment, lk and Δk represent the category outputs other than the true category and their corresponding dynamic boundary adjustment values, respectively. j represents the dynamic decision boundary value of category j, p j represents the probability prediction, λ represents the weight parameter, l represents the logarithmic probability corresponding to the true category, f represents the prediction result, β(U i ) indicates strong enhancement of the sample.

[0081] The beneficial effects of the present invention are:

[0082] Enhanced pseudo-label quality: This paper improves pseudo-label quality by combining weakly and strongly augmented view similarities through a dynamic fusion matching method. By incorporating sample similarity and category-specific embedding vectors, the model generates more accurate pseudo-labels on unlabeled data, improving unsupervised learning and classification performance on long-tailed data.

[0083] Dynamically adjust the threshold to improve the utilization of unlabeled data: Unlike traditional fixed-threshold methods, this paper proposes a strategy that dynamically adjusts the pseudo-label selection threshold based on the effectiveness of class learning. By adjusting the threshold at each time step, the model can flexibly select more unlabeled data for training based on the class learning state, thus avoiding the premature exclusion of potentially useful samples and effectively improving the utilization of training data.

[0084] Class-Balanced Loss optimizes for hard-to-distinguish classes: To address the class imbalance problem in long-tail datasets, this paper introduces a class-balanced loss. By dynamically adjusting the decision boundary for each class, the model ensures more accurate classification of rare and hard-to-distinguish classes. Class-balanced loss can alleviate class confusion and improve the model's classification accuracy for hard-to-learn classes, effectively addressing the long-tail distribution problem.

[0085] Example 2

[0086] like Figure 3 As shown, the present invention provides a medical image classification system based on semi-supervised dynamic fusion matching, and the medical image classification system is used to execute the medical image classification method in Example 1, including:

[0087] The fusion matching module is used to generate pseudo labels based on medical images by calculating the correlation between samples in weakly enhanced views and strongly enhanced views, and then calibrate and fuse them to generate fused category pseudo labels;

[0088] Dynamic threshold adjustment module, which is used to dynamically calculate the threshold at each time step. Based on the dynamic adjustment of the threshold, the consistency loss function is used to optimize the selection of fused category pseudo labels and category learning to achieve semi-supervised dynamic fusion matching;

[0089] The category balancing module is used to address the category imbalance problem in long-tail datasets. It introduces category balance loss, dynamically adjusts the decision boundary of each category, and classifies medical images with the total loss function as the target.

[0090] like Figure 3 The medical image classification system provided in the illustrated embodiment can implement the technical solution shown in the medical image classification method in the above method embodiment. Its implementation principle and beneficial effects are similar and will not be repeated here.

[0091] In this embodiment, the present application can divide the functional units according to the medical image classification method. For example, each function can be divided into various functional units, or two or more functions can be integrated into one processing unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the present invention is schematic and is only a logical division. In actual implementation, there may be other division methods.

[0092] In this embodiment, the medical image classification system includes hardware structures and / or software modules for performing various functions in order to realize the principles and beneficial effects of the medical image classification method. It should be easily appreciated by those skilled in the art that, in combination with the various schematic units and algorithm steps described in the embodiments disclosed in the present invention, the present invention can be implemented in the form of hardware and / or a combination of hardware and computer software. Whether a function is executed in a hardware- or computer software-driven manner depends on the specific application and design constraints of the technical solution. Different methods can be used for each specific application to implement the described function, but such implementation should not be considered to be beyond the scope of this application.

Claims

1. A medical image classification method based on semi-supervised dynamic fusion matching, characterized in that: The following steps are involved: S1. Based on medical images, the correlation between samples in weakly enhanced and strongly enhanced views is calculated to generate pseudo labels. The pseudo labels are then calibrated and fused to generate fused category pseudo labels. S2. Dynamically calculate the threshold at each time step, and based on the dynamic adjustment of the threshold, optimize the selection of fused category pseudo labels and category learning through the consistency loss function to achieve semi-supervised dynamic fusion matching; S3. To address the category imbalance problem in long-tail datasets, we introduce category balance loss to dynamically adjust the decision boundary of each category and use the total loss function as the target to classify medical images.

2. The medical image classification method based on semi-supervised dynamic fusion matching according to claim 1, characterized in that: The step S1 comprises the following steps: S101, mapping the original features of the medical image to a low-dimensional space through a nonlinear projection head; S102. Based on the mapping results, generate correlations between samples in the weakly enhanced view and the strongly enhanced view by calculating similarities, and generate pseudo labels. The distribution of correlations is used to measure the degree of matching between medical image samples in two different enhanced views, and a cross-entropy loss function is used to constrain the consistency of the correlation distributions between the weakly enhanced view and the strongly enhanced view. S103, calibrating the pseudo labels by combining the class anchor library and the memory library, wherein the class anchor represents the mean of the class feature and the memory library stores the labeled medical image sample information; S104: Aggregate the sample correlations of the medical images to the category level based on the calibration results, and perform weighted fusion processing to generate fused category pseudo labels.

3. The medical image classification method based on semi-supervised dynamic fusion matching according to claim 2, characterized in that: The expression of the cross entropy loss function is as follows: Among them, L C represents the cross entropy loss function, μ represents the batch size, B represents the number of samples, H represents the cross entropy, C w represents a weakly enhanced view, C s Represents a strongly enhanced view.

4. The medical image classification method based on semi-supervised dynamic fusion matching according to claim 2, characterized in that: The pseudo labels are calibrated by combining the class anchor library and the memory library, specifically: Based on the class anchor library, the low-dimensional embedding of each medical image sample will be assigned a category; The calibration process is completed by aligning the category predictions with the category information in the memory bank and regenerating the calibrated category pseudo labels.

5. The medical image classification method based on semi-supervised dynamic fusion matching according to claim 1, characterized in that: The expression of the threshold in step S2 is as follows: T t (c)=γ t (c)·t Among them, T t (c) represents the dynamically adjusted threshold, γ t (c) represents the normalized value of the learning effect of category c at time step t, and τ represents a fixed base threshold.

6. The medical image classification method based on semi-supervised dynamic fusion matching according to claim 1, characterized in that: The expression of the consistency loss function in step S2 is as follows: Among them, L u represents the consistency loss function of unlabeled medical image samples, μ represents the batch size, B represents the number of samples, b represents the sample index, and p ω represents the weakly enhanced view prediction probability, p ω (α(U b )) represents the unlabeled medical image sample U b The predicted probability, T t represents the dynamic threshold of category c, H represents the cross entropy, p s represents the strong enhanced view prediction probability, α(U b ) represents the weak enhancement transformation for unlabeled medical images, α represents the weak enhancement transformation, p ω represents the pseudo label, β(U b )) represents the strong enhancement transformation for unlabeled medical images, β represents the strong enhancement transformation, H(p ω ,p s (β(U b ))) represents the pseudo label p w With strong enhanced view p s (β(U b )).

7. The medical image classification method based on semi-supervised dynamic fusion matching according to claim 1, characterized in that: The expression of the total loss function is as follows: L=L S +λ u The u +λ C L C l=f(β(U i )) Among them, L represents the total loss function, L S Represents supervised loss, loss function for labeled images, L C represents the cross entropy loss function, λ u represents the weight parameter, L' u represents the unsupervised training loss function, λ C represents the weight parameter, μ represents the batch size, B represents the number of samples, b represents the sample index, and p ω represents the weakly enhanced view prediction probability, p ω (α(U b )) represents the unlabeled medical image sample U b The predicted probability, T t represents the dynamic threshold of category c, L CBL Denotes H(p in unsupervised loss ω ,p s (β(U b ))), H(p ω ,p s (β(U b ))) represents the pseudo label p ω With strong enhanced view p s (β(U b )), the cross entropy loss between Represents the index of the true category prediction after boundary adjustment, Represents the predicted value of the true label, Δy i represents the adjustment term, C represents the number of categories, k represents the index variable, y i represents the true label, Represents the index of non-real category prediction after boundary adjustment, l k and Δk represent the category outputs other than the true category and their corresponding dynamic boundary adjustment values, respectively. j represents the dynamic decision boundary value of category j, p j represents the probability prediction, λ represents the weight parameter, l represents the logarithmic probability corresponding to the true category, f represents the prediction result, β(U i ) indicates strong enhancement of the sample.

8. A medical image classification system based on semi-supervised dynamic fusion matching, characterized in that: The medical image classification system is used to perform medical image classification methods, including: The fusion matching module is used to generate pseudo labels based on medical images by calculating the correlation between samples in weakly enhanced views and strongly enhanced views, and then calibrate and fuse them to generate fused category pseudo labels; Dynamic threshold adjustment module, which is used to dynamically calculate the threshold at each time step. Based on the dynamic adjustment of the threshold, the consistency loss function is used to optimize the selection of fused category pseudo labels and category learning to achieve semi-supervised dynamic fusion matching; The category balancing module is used to address the category imbalance problem in long-tail datasets. It introduces category balance loss, dynamically adjusts the decision boundary of each category, and classifies medical images with the total loss function as the target.

Citation Information

Cited By

  • Cross-modal medical image segmentation method and device, equipment and medium

    CN121305096A

  • A cross-modality medical image segmentation method, device, equipment and medium

    CN121305096B

  • Privacy protection medical image semantic segmentation method for dynamic data flow

    CN122090060A

  • Image classification method for worst class performance improvement under long-tail semi-supervised setting, electronic equipment, storage medium and product

    CN122289829A