Optimization method, system, device and medium for semi-supervised medical image classification

By employing a dual-branch student-teacher network architecture and a pseudo-label selection strategy, the problems of insufficient labeled samples and class imbalance in medical images were solved, thereby improving the performance of minority class recognition and the model's generalization ability.

CN122156720APending Publication Date: 2026-06-05SHANDONG JIANZHU UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANDONG JIANZHU UNIV
Filing Date
2026-01-28
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In medical imaging diagnosis, labeled images are difficult to obtain and disease categories are imbalanced. Existing semi-supervised learning methods are unable to effectively alleviate the problems of insufficient labeled samples and unstable pseudo-label quality, resulting in insufficient minority class recognition performance.

Method used

A semi-supervised medical image classification model is constructed by adopting a dual-branch student network and teacher network architecture, combining multi-loss collaboration, class prototype dynamic updating, and high-quality pseudo-label screening. The teacher network parameters are updated by exponential moving average, and pseudo-labels are screened using class adaptive threshold and class quota strategies.

Benefits of technology

It improves the recognition ability of minority class samples and the overall classification performance, effectively alleviates the class imbalance problem in medical images, and improves the generalization ability of the model and the reliability of pseudo-label discrimination.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122156720A_ABST
    Figure CN122156720A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of semi-supervised medical image classification optimization method, system, equipment and medium, belong to medical image processing and artificial intelligence field.The method comprises: obtaining the medical image dataset comprising labeled image data and unlabeled image data;Medical image classification model of student-teacher network architecture is constructed;Using student network, the class probability of medical image dataset is output;Class confidence distribution is obtained using teacher network;Based on the class probability output by student network and the class confidence distribution output by teacher network, candidate pseudo-label is obtained, and class adaptive threshold and class quota strategy are applied to screen candidate pseudo-label, to obtain target pseudo-label.Combining double-branch student network and teacher network, through multi-loss cooperation, class prototype dynamic updating and high-quality pseudo-label screening, the recognition ability of minority class and overall classification performance are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of medical image processing and artificial intelligence technology, specifically to an optimization method, system, device, and medium for semi-supervised medical image classification. Background Technology

[0002] In medical imaging diagnosis, deep learning-based classification methods have become an important tool for clinical auxiliary diagnosis. However, there are two major challenges in practical application: first, it is difficult to obtain labeled images and the labeling cost is high; second, disease categories are usually highly imbalanced and minority class samples are scarce, making it difficult for traditional supervised learning to guarantee minority class recognition performance.

[0003] Most research in the field of semi-supervised learning focuses on addressing the problem of insufficient labeled samples using label permeation and data distribution models. Label permeation algorithms utilize pre-trained labeled data to obtain a learner, and then train the model by continuously optimizing this learner and labeling unlabeled samples, such as S3VM and Tri-Training. Existing data distribution algorithms assume that the samples follow a certain distribution and determine the model parameters using both labeled and unlabeled samples. However, in practical applications, obtaining noise-free data is difficult, and existing semi-supervised methods often employ simple augmentation or fixed-weight fusion strategies, which have common shortcomings including: augmented samples may lose class semantics, lack of semantic enhancement mechanisms designed for medical image modalities, ineffective mitigation of class imbalance, and unstable pseudo-label quality. Summary of the Invention

[0004] The purpose of this invention is to provide an optimized method, system device, and medium for semi-supervised medical image classification. By combining a dual-branch student network and a teacher network, and through multi-loss collaboration, dynamic updating of class prototypes, and high-quality pseudo-label screening, the minority class recognition capability and overall classification performance are improved.

[0005] To achieve the above objectives, embodiments of the present invention provide an optimization method for semi-supervised medical image classification, comprising: Obtain a medical image dataset containing both labeled and unlabeled image data; A medical image classification model with a student-teacher network architecture is constructed, wherein the student network includes a clean head for supervised learning of labeled image data and a pseudo-label head for pseudo-label learning of unlabeled image data; the teacher network is obtained by updating the encoder parameters of the student network through an exponential moving average. Using the student network, the class probabilities of the medical image dataset are output; using the teacher network, the features of the unlabeled image data are extracted, and the cosine similarity is calculated with the class prototypes in the support library to generate a heatmap. The heatmap is then processed with Top-K averaging and temperature softmax to obtain the class confidence distribution. Based on the class probability of student network output and the class confidence distribution of teacher network output, candidate pseudo-labels are obtained. Then, a class adaptive threshold and class quota strategy are applied to filter the candidate pseudo-labels and obtain the target pseudo-label.

[0006] Optionally, the optimization method for semi-supervised medical image classification further includes: constructing a hierarchical variational autoencoder to enhance the sample set, specifically including: The latent variables of the hierarchical variational autoencoder are decomposed into appearance latent variables, category-related latent variables, and style latent variables. The hierarchical variational autoencoder is pre-trained using the labeled image data and then unsupervised reconstructive training is performed using unlabeled image data to initialize its generation capability. Based on the trained hierarchical variational autoencoder, class-conditional sampling is performed on the category-related latent variables to generate candidate augmentation samples; For the candidate augmented samples, calculate their classification confidence and cosine similarity of perceptual features with the real samples, and include samples that exceed a preset threshold into the augmented sample set.

[0007] Optionally, a self-calibrating semantic learning mechanism is introduced during the training of the student network, using feature consistency loss to constrain the semantic consistency of the same sample under different augmented samples; wherein the feature consistency loss function is as follows:

[0008] In the formula, M is the total number of samples. Let represent the semantic features extracted by the student network for the i-th sample under two different augmented views, and let cos(·,·) be the cosine similarity.

[0009] Optionally, the teacher network is obtained by updating the encoder parameters of the student network through an exponential moving average, and the update formula is:

[0010] In the formula, The momentum coefficient is the exponential moving average. For student network parameters, For teacher network parameters.

[0011] Optionally, the optimization method for semi-supervised medical image classification further includes initializing and dynamically updating the category prototypes in the support library, specifically including: For each known category, all its labeled image data are collected. The mean of the feature vectors processed by the shared encoder F(·) of the hierarchical variational autoencoder and the lightweight semantic projector φ(·) is used as the initial prototype. :

[0012] In the formula, Given category j, For the i labeled image data corresponding to category j, The total number of known category j; In training epoch t, ​​the prototype is updated using the feature mean of the current batch of labeled image data:

[0013] In the formula, α is the moving average coefficient.

[0014] Optionally, the heatmap is processed using Top-K averaging and temperature softmax to obtain the category confidence distribution, including:

[0015] In the formula, This indicates selecting the K largest values ​​from the vector, where K is a preset positive integer and T is the temperature coefficient. Let C be the confidence score of candidate pseudo-labels for sample x belonging to category j, and C be the total number of categories.

[0016] Optionally, the category-adaptive dynamic confidence threshold is related to class prior and follows the principles below:

[0017] In the formula, Based on the threshold, For the number of samples N of category j j A monotonically decreasing function. This is the fusion coefficient.

[0018] Secondly, the present invention also provides an optimization system for semi-supervised medical image classification, comprising: The data acquisition unit is used to acquire medical image datasets that include labeled and unlabeled image data. A classification model building unit is used to construct a medical image classification model with a student-teacher network architecture. The student network includes a clean head for supervised learning of labeled image data and a pseudo-label head for pseudo-label learning of unlabeled image data. The teacher network is obtained by updating the encoder parameters of the student network through an exponential moving average. The model recognition unit is used to output the category probability of the medical image dataset using the student network; extract the features of the unlabeled image data using the teacher network, calculate the cosine similarity with the category prototypes in the support library, generate a heatmap, and perform Top-K averaging and temperature softmax processing on the heatmap to obtain the category confidence distribution. The label filtering unit is used to obtain candidate pseudo-labels based on the class probability of student network output and the class confidence distribution of teacher network output, and to filter candidate pseudo-labels using a class adaptive threshold and class quota strategy to obtain the target pseudo-label.

[0019] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the aforementioned optimization method for semi-supervised medical image classification.

[0020] Fourthly, the present invention also provides a storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described optimization method for semi-supervised medical image classification.

[0021] The above technical solution ensures the stability of feature extraction by utilizing the exponential moving average update mechanism of the teacher network, and enhances the reliability of pseudo-label discrimination by combining cosine similarity calculation with class prototypes, Top-K averaging, and temperature softmax processing. Simultaneously, the introduction of class adaptive thresholds and class quota strategies effectively alleviates the common class imbalance problem in medical imaging, ensuring that minority class samples also receive sufficient training attention. This improves the generalization ability and minority class recognition accuracy of medical image classification models under a semi-supervised learning framework, providing technical support for clinical auxiliary diagnosis in scenarios with scarce labels.

[0022] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0023] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1This is a flowchart of an optimization method for semi-supervised medical image classification provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of an optimization system for semi-supervised medical image classification provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0024] Various embodiments of this disclosure will be described more fully in the following detailed description. This disclosure may have various embodiments, and adjustments and changes may be made therein. However, it should be understood that there is no intention to limit the various embodiments of this disclosure to the specific embodiments disclosed herein, but rather this disclosure should be understood to cover all adjustments, equivalents, and / or alternatives falling within the spirit and scope of the various embodiments of this disclosure.

[0025] In the following, the terms “comprising” or “may include”, which may be used in various embodiments of this disclosure, indicate the presence of the disclosed functions or operations and do not limit the addition of one or more functions or operations. Furthermore, as used in various embodiments of this disclosure, the terms “comprising,” “having,” and their cognates are intended only to indicate a specific feature, number, step, operation, or combination of the foregoing and should not be construed as primarily excluding the presence of one or more other features, numbers, steps, operations, or combinations of the foregoing, or the possibility of adding one or more features, numbers, steps, operations, or combinations of the foregoing.

[0026] In various embodiments of this disclosure, the expression "or" or "at least one of A and / or B" includes any combination or all combinations of the words listed simultaneously. For example, the expression "A or B" or "at least one of A and / or B" may include A, may include B, or may include both A and B.

[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0028] See Figure 1 The diagram shows a flowchart of a semi-supervised medical image classification optimization method in a specific embodiment, including the following execution steps: Step 100: Obtain a medical image dataset containing labeled and unlabeled image data.

[0029] Specifically, the dataset includes labeled image data Dlab and unlabeled image data Dunlab, and all data belong to a pre-defined set of known categories. The images in the medical image dataset undergo standardization preprocessing to obtain preprocessed image data. The standardization preprocessing includes denoising and normalization. The denoising process preferably uses a combination of Gaussian filtering and median filtering or nonlocal mean filtering—first, Gaussian filtering removes Gaussian noise, then median filtering or nonlocal mean filtering reduces impulse noise. The normalization process optionally uses Z-score normalization or Min–Max normalization. For 16-bit CT / MRI, window width / window level transformation is performed first, followed by Min–Max normalization to map pixel values ​​to [0,1], ensuring consistency between different devices and acquisition settings.

[0030] In one specific implementation, after step 100 is executed, a step of constructing a hierarchical variational autoencoder to enhance the sample set is also executed, which specifically includes the following sub-steps: S1: Decompose the latent variables of the hierarchical variational autoencoder into appearance latent variables, category-related latent variables, and style latent variables.

[0031] For example, the HVAE encoder contains three independent sub-network branches, each used to extract three feature representations of the input medical image: Appearance latent variables (z_a): capture anatomical features unrelated to disease category, such as organ anatomy and tissue morphology; Category-related latent variables (z_c): specifically encode discriminative features directly related to disease diagnosis; Style latent variables (z_s): characterize non-biological differences such as imaging equipment, acquisition parameters, and artifacts. The decoder receives the concatenated vector of these three latent variables and is responsible for reconstructing the original image. Then, phased training is performed: Phase 1: Basic Reconstruction Training: Using all available data (including labeled and unlabeled images), the encoder-decoder's basic reconstruction capability is trained to ensure that the latent variables fully preserve image information. Phase 2: Supervised Guided Decomposition: Labeled data is introduced, and an auxiliary classification loss function enforces that z_c must contain sufficient category information to accurately predict disease labels using a simple classifier. Simultaneously, decoupling constraints are added to reduce the correlation between z_c and z_a and z_s. Phase 3: Specialization Refinement: For z_a: Enhance its robustness to appearance changes through data augmentation (such as simulating different anatomical variations); For z_s: Train it using cross-device and cross-center image data to better capture acquisition differences; For z_c: Employ contrastive learning to increase the distance between z_c samples of different categories and reduce the distance between samples of the same category.

[0032] S2: Supervised pre-training of the hierarchical variational autoencoder is performed using the labeled image data, and unsupervised reconstruction training is performed using unlabeled image data to initialize its generation capability.

[0033] For example, pre-training includes: Supervised pre-training based on labeled data (establishing semantic associations): Training is performed using only labeled datasets, with the goal of initially establishing the association between the latent variable structure and image content, and ensuring that z_c can capture the core semantics related to the category label. Input and encoding: The labeled image x and its corresponding category label y are input into the encoder. The encoder outputs the posterior distribution parameters of z_a, z_c, and z_s through different network branches. The sampled [z_a, z_c, z_s] are fed into the decoder to reconstruct the original image, and the reconstruction loss is calculated. A lightweight classification network head is used, with z_c as input, and trained to accurately predict the category label y of the image. The corresponding classification loss (such as cross-entropy loss) is backpropagated and directly affects the learning path of z_c, forcing z_c to encode discriminative information related to the disease category. KL divergence loss is used to constrain the distribution of each latent variable to be close to the standard normal prior, in order to encourage compact encoding and a certain degree of decoupling.

[0034] S3: Based on the trained hierarchical variational autoencoder, class-conditional sampling is performed on the category-related latent variables to generate candidate augmented samples.

[0035] S4: For the candidate augmented samples, calculate their classification confidence and cosine similarity of perceptual features with the real samples, and include samples that exceed a preset threshold into the augmented sample set.

[0036] Specifically, the formula for calculating the cosine similarity of perceptual features is as follows:

[0037] In the formula, This represents the actual number of samples. Let φ be the set of true samples for category y. ) is a pre-trained feature extractor.

[0038] For example, the hierarchical variational autoencoder (HVAE) includes a shared encoder and an independent decoder. The shared encoder preferably adopts the first four layers of DenseNet-121 (which can be initialized with ImageNet pre-trained weights). The latent variables of HVAE are decomposed into appearance latent variable Z_a, class-related latent variable Z_c, and style latent variable Z_s. The training strategy of HVAE is to first perform conditional reconstruction pre-training with labeled data Dlab to initialize the generation capability, and can be supplemented by unsupervised reconstruction with unlabeled data Dunlab to enhance diversity. After completing the pre-training and passing the quality discriminator and perceptual similarity screening, the enhanced sample set Dgen is generated by class-conditional sampling based on Z_c using HVAE. The quality control of the generated samples adopts a multi-index joint criterion, including: class head confidence, perceptual feature cosine similarity, and discriminator / human review sampling. The similarity threshold is set in the range of [0.75, 0.9] by default and supports posterior adjustment.

[0039] In one specific implementation, the online intermittent update strategy of the HVAE is as follows: in the early stage of training, warmup is performed with the discriminative loss as the main focus (without or with weakened generation regularization). After the student discriminator stabilizes, the HVAE is refreshed online every n epochs to restore generation capability. The selectable range of n can be 20–100 (set according to the data scale and computing budget). The inclusion rule of the augmented sample Dgen is to first screen it through generation quality metrics, and then merge it with the real samples into the labeled training set with low weight or proportionally. Before merging, the channels / resolution are consistent to ensure the stability of the DataLoader.

[0040] Step 101: Construct a medical image classification model with a student-teacher network architecture.

[0041] The student network includes a clean head for supervised learning of labeled image data and a pseudo-label head for pseudo-label learning of unlabeled image data; the teacher network is obtained by updating the encoder parameters of the student network through an exponential moving average.

[0042] Specifically, a self-calibrating semantic learning mechanism is introduced during the training process of the student network, using feature consistency loss to constrain the semantic consistency of the same sample under different augmented samples; wherein the feature consistency loss function is as follows:

[0043] In the formula, M is the total number of samples. Let represent the semantic features extracted by the student network for the i-th sample under two different augmented views, and let cos(·,·) be the cosine similarity.

[0044] In one specific implementation, the teacher network is obtained by updating the encoder parameters of the student network through an exponential moving average, and the update formula is as follows:

[0045] In the formula, The momentum coefficient is the exponential moving average. For student network parameters, For teacher network parameters.

[0046] In one specific implementation, the training process of the medical image classification model includes the following steps: SA: Utilize the teacher network to extract features from unlabeled image data.

[0047] SB: Calculate the cosine similarity between the extracted features and the pre-built prototypes of each category in the support library to generate an initial similarity heatmap.

[0048] SC: The heatmap is averaged using Top-K values ​​and then normalized using a softmax function with an adjustable temperature coefficient to obtain the confidence distribution of candidate pseudo-labels.

[0049] SD: The prediction results of the student network are validated, and a class-adaptive dynamic confidence threshold and class quota strategy are applied to select highly reliable pseudo-labels from the candidate results.

[0050] SE: Using the labeled data, augmented samples, and unlabeled data with filtered pseudo-labels, the student network is trained collaboratively, and the teacher network and category prototype are dynamically updated.

[0051] SF: Repeat steps SA to SE for iterative optimization until the model converges and the final medical image classification model is obtained.

[0052] In one specific implementation, the iterative training and termination conditions include: alternately / jointly optimizing Student_clean, Student_pseudo, and teacher network parameters in each training round, and monitoring metrics on the validation set to determine early stopping; the training termination condition is: the key metrics on the validation set (e.g., macro F1 or classification accuracy) do not improve within T_patience epochs (e.g., 5 epochs), or the maximum number of iterations (e.g., 200 epochs) is reached; optimization uses the Adam or AdamW optimizer, and the initial learning rate can be set to 1e. 4. And decay according to the scheduling strategy (such as CosineAnnealing or stepdecay) or every certain number of epochs (e.g., 50); teacher network parameters are updated via EMA: (For example, m=0.99).

[0053] Step 102: Using the student network, output the category probabilities of the medical image dataset; using the teacher network, extract the features of the unlabeled image data, calculate the cosine similarity with the category prototypes in the support library, generate a heatmap, and perform Top-K averaging and temperature softmax processing on the heatmap to obtain the category confidence distribution.

[0054] Input medical image x (labeled image data, enhanced samples, unlabeled image data) is encoded by the shared encoder F(·) of the student network to extract high-level semantic feature maps or feature vectors h of the image: .

[0055] The extracted general features h may be fed into a lightweight projection head or bottleneck layer. To further refine discriminative features Z suitable for classification tasks. c : The features are adapted to the classification space and aligned with the features affected by the feature consistency constraints in self-supervised learning.

[0056] Clean head receiving characteristic Z c Output the raw score for each category. : Each s value reflects the strength of the original evidence that the model believes the input x belongs to the k-th class. To obtain standardized, interpretable probabilities, logits s are normalized by inputting them into a softmax function. The standard softmax function is defined as follows:

[0057] In the formula, It is the probability that the model predicts that the input x belongs to class k. This refers to the temperature parameter.

[0058] For each sample, two different data augmentations are used to generate two augmented samples. The semantic features z_{i1} and z_{i2} of the two samples are extracted through the student network, and feature consistency loss is applied.

[0059] This loss is used as a regularization term in the optimization of the total loss of the student network, thereby indirectly constraining and improving the extracted feature Z. c The quality and robustness of the output, and thus the class probability of the final output. It is more stable and reliable with different enhancements.

[0060] In one specific implementation, the total loss function of the student network includes class-balanced cross-entropy loss. Similarity to features or prototype loss Weighted combination: ; The class-balanced cross-entropy loss is defined as follows:

[0061] in, For class weights, the commonly used value is... = N / N j Or the inverse frequency after smoothing / truncating, where N is the total number of samples. j The number of samples in class j is used to avoid instability caused by extreme weights; the feature consistency loss To constrain the consistency of similar feature distributions across multiple viewpoints / enhanced views, the following methods can be used:

[0062] Or, based on contrastive learning in the form of InfoNCE, where M is the number of viewpoints. Let μ be the feature representation of class j from the m-th viewpoint, and μ be the reference vector (such as class center or global mean).

[0063] In one specific implementation, the initialization and dynamic updating of category prototypes in the support library specifically includes: For each known category, all its labeled image data are collected. The mean of the feature vectors processed by the shared encoder F(·) of the hierarchical variational autoencoder and the lightweight semantic projector φ(·) is used as the initial prototype. :

[0064] In the formula, Given category j, For the i labeled image data corresponding to category j, The total number of known category j; In training epoch t, ​​the prototype is updated using the feature mean of the current batch of labeled image data:

[0065] In the formula, α is the moving average coefficient.

[0066] Prototype supervision constraints: Comparing losses through prototypes Prototype development and feature learning work together, typically in the form of contrastive loss or negative log probability based on softmax.

[0067] Where z_i = φ(F(x_i)), and τ is the temperature coefficient (e.g., 0.07); to alleviate class imbalance, a weighted average can be introduced for the update of prototypes of a minority class, and the weight w_j can be inversely correlated with the class prior p(c_j) (and the weight is smoothed and truncated to avoid extreme values).

[0068] In one specific implementation, the heatmap is processed using Top-K averaging and temperature softmax to obtain a category confidence distribution, including:

[0069] In the formula, This indicates selecting the K largest values ​​from the vector, where K is a preset positive integer and T is the temperature coefficient. Let C be the confidence score of candidate pseudo-labels for sample x belonging to category j, and C be the total number of categories.

[0070] For example, the teacher network extracts features from unlabeled samples and calculates cosine similarity with class prototypes in the support library to generate a heatmap; the heatmap is then subjected to Top-K averaging (K can be 3–10) and processed by temperature softmax (temperature coefficient T can be adjusted in the range of 0.5–1.5) to obtain the confidence of candidate pseudo-labels; subsequently, a class adaptive threshold (which can be relaxed based on class prior) and a class quota strategy are applied to filter pseudo-labels. The default confidence threshold can be set to 0.5–0.95, and a lower threshold is used in the early stages of training to start the pseudo-label mechanism; further, the candidate pseudo-labels are verified by self-calibrating semantic consistency (L_sc), and pseudo-label samples with inconsistent features are eliminated to improve the quality of pseudo-labels.

[0071] Step 103: Based on the class probability of the student network output and the class confidence distribution of the teacher network output, candidate pseudo-labels are obtained, and the class adaptive threshold and class quota strategy are applied to filter the candidate pseudo-labels to obtain the target pseudo-label.

[0072] Specifically, the adaptive dynamic confidence threshold for the category is related to the class prior and follows the principles below:

[0073] In the formula, Based on the threshold, For the number of samples N of category j j A monotonically decreasing function. This is the fusion coefficient.

[0074] In one specific implementation, the method is applicable to closed-set hypotheses, and the medical image data types include, but are not limited to, CT, MRI, ultrasound, and color skin images. When using the method, appropriate preprocessing and enhancement schemes should be selected according to the image modality (window width / window level and intensity normalization are preferred for single-channel 16-bit medical images, while color perturbation and channel normalization are used for color images). The disease types within the closed set should be a predefined set, and the classification result output is the disease category name and the corresponding classification confidence.

[0075] In this embodiment, the minority class recognition performance can be effectively improved under the conditions of label scarcity and class imbalance: HVAE generates high-quality augmented samples to supplement the minority class under class conditions, student-teacher and self-calibration semantic constraints improve feature consistency, dynamic class prototype and class balance loss synergistically improve inter-class discrimination, and high-quality pseudo-label screening strategy reduces unlabeled noise, thereby improving classification accuracy, sensitivity, specificity and AUC.

[0076] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0077] like Figure 2 As shown, the following are embodiments of the semi-supervised medical image classification optimization system provided in this disclosure. It belongs to the same inventive concept as the semi-supervised medical image classification optimization method in the above embodiments. For details not described in detail in the embodiments of the semi-supervised medical image classification optimization system, please refer to the embodiments of the semi-supervised medical image classification optimization method described above.

[0078] An optimized system for semi-supervised medical image classification includes: The data acquisition unit is used to acquire medical image datasets that include labeled and unlabeled image data. A classification model building unit is used to construct a medical image classification model with a student-teacher network architecture. The student network includes a clean head for supervised learning of labeled image data and a pseudo-label head for pseudo-label learning of unlabeled image data. The teacher network is obtained by updating the encoder parameters of the student network through an exponential moving average. The model recognition unit is used to output the category probability of the medical image dataset using the student network; extract the features of the unlabeled image data using the teacher network, calculate the cosine similarity with the category prototypes in the support library, generate a heatmap, and perform Top-K averaging and temperature softmax processing on the heatmap to obtain the category confidence distribution. The label filtering unit is used to obtain candidate pseudo-labels based on the class probability of student network output and the class confidence distribution of teacher network output, and to filter candidate pseudo-labels using a class adaptive threshold and class quota strategy to obtain the target pseudo-label.

[0079] Figure 3 This is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present invention.

[0080] The semi-supervised medical image classification optimization method provided in this application can be applied to electronic devices. Those skilled in the art will understand that the electronic device structure involved in the embodiments of this invention does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the electronic device includes, but is not limited to, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments of this application described and / or claimed herein.

[0081] Electronic devices may include processors, external memory interfaces, internal memory, universal serial bus (USB) interfaces, charging management modules, power management modules, batteries, wireless communication modules, audio modules, speakers, microphones, sensor modules, buttons, cameras, displays, and SIM card interfaces, etc.

[0082] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device. In other embodiments of this application, the electronic device may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0083] A processor may include one or more processing units, such as: a central processing unit (CPU), an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors.

[0084] The processor can serve as the nerve center and command center of an electronic device. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.

[0085] The processor may also include memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that the processor has just used or that are used repeatedly. If the processor needs to use the instruction or data again, it can retrieve it directly from this memory. This avoids repeated accesses, reduces processor latency, and thus improves system efficiency.

[0086] An external storage interface (ESI) can be used to connect external memory cards, such as microSD cards, to expand the storage capacity of electronic devices. The external memory card communicates with the processor through the ESI to perform data storage functions, such as saving music and video files on the external memory card.

[0087] Internal memory can be used to store computer executable program code, which includes instructions. The processor executes various functional applications and data processing of electronic devices by running the instructions stored in internal memory. Internal memory can include a program storage area and a data storage area. Internal memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.

[0088] Wireless communication functionality in electronic devices can be achieved through antennas, wireless communication modules, modem processors, and baseband processors.

[0089] Wireless communication modules can provide solutions for wireless communication applications in electronic devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies.

[0090] Electronic devices can implement audio functions through audio modules, speakers, receivers, microphones, headphone jacks, and application processors.

[0091] Electronic devices can achieve shooting functions through ISPs, cameras, video codecs, GPUs, displays, and application processors.

[0092] Electronic devices can achieve display functions through GPUs, displays, and application processors.

[0093] A GPU is a microprocessor for image processing, connected to the display screen and application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.

[0094] A display screen is used to display images, videos, etc. A display screen includes a display panel.

[0095] The storage medium provided in this application stores a program product capable of implementing an optimized method for semi-supervised medical image classification.

[0096] An optimization method for semi-supervised medical image classification includes: acquiring a medical image dataset containing labeled and unlabeled image data; constructing a medical image classification model with a student-teacher network architecture, wherein the student network includes a clean head for supervised learning of labeled image data and a pseudo-label head for pseudo-label learning of unlabeled image data; the teacher network is updated by the encoder parameters of the student network through exponential moving average; using the student network, outputting the class probabilities of the medical image dataset; using the teacher network to extract features of the unlabeled image data, calculating cosine similarity with class prototypes in the support library, generating a heatmap, and performing Top-K averaging and temperature softmax processing on the heatmap to obtain the class confidence distribution; based on the class probabilities output by the student network and the class confidence distribution output by the teacher network, obtaining candidate pseudo-labels, and applying a class adaptive threshold and class quota strategy to filter candidate pseudo-labels to obtain the target pseudo-label.

[0097] In some possible implementations, the subject matter of this disclosure, namely, the method and system for optimizing semi-supervised medical image classification, can be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.

[0098] The storage medium disclosed herein may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0099] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. An optimization method for semi-supervised medical image classification, characterized in that, include: Obtain a medical image dataset containing both labeled and unlabeled image data; A medical image classification model with a student-teacher network architecture is constructed, wherein the student network includes a clean head for supervised learning of labeled image data and a pseudo-label head for pseudo-label learning of unlabeled image data; the teacher network is obtained by updating the encoder parameters of the student network through exponential moving average. Using the student network, the class probabilities of the medical image dataset are output; using the teacher network, the features of the unlabeled image data are extracted, and the cosine similarity is calculated with the class prototypes in the support library to generate a heatmap. The heatmap is then processed with Top-K averaging and temperature softmax to obtain the class confidence distribution. Based on the class probability of student network output and the class confidence distribution of teacher network output, candidate pseudo-labels are obtained. Then, a class adaptive threshold and class quota strategy are applied to filter the candidate pseudo-labels and obtain the target pseudo-label.

2. The optimization method for semi-supervised medical image classification according to claim 1, characterized in that, The optimization method for semi-supervised medical image classification further includes: constructing a hierarchical variational autoencoder to enhance the sample set, specifically including: The latent variables of the hierarchical variational autoencoder are decomposed into appearance latent variables, category-related latent variables, and style latent variables. The hierarchical variational autoencoder is pre-trained using the labeled image data and then unsupervised reconstructive training is performed using unlabeled image data to initialize its generation capability. Based on the trained hierarchical variational autoencoder, class-conditional sampling is performed on the category-related latent variables to generate candidate augmentation samples; For the candidate augmented samples, calculate their classification confidence and cosine similarity of perceptual features with the real samples, and include samples that exceed a preset threshold into the augmented sample set.

3. The optimization method for semi-supervised medical image classification according to claim 2, characterized in that, A self-calibrating semantic learning mechanism is introduced during the training of the student network, using feature consistency loss to constrain the semantic consistency of the same sample under different augmented samples; the feature consistency loss function is as follows: In the formula, M is the total number of samples. Let represent the semantic features extracted by the student network for the i-th sample under two different augmented views, and let cos(·,·) be the cosine similarity.

4. The optimization method for semi-supervised medical image classification according to claim 1, characterized in that, The teacher network is obtained by updating the encoder parameters of the student network through an exponential moving average, and the update formula is as follows: In the formula, The momentum coefficient is the exponential moving average. For student network parameters, For teacher network parameters.

5. The optimization method for semi-supervised medical image classification according to claim 2, characterized in that, The optimization method for semi-supervised medical image classification also includes initializing and dynamically updating the category prototypes in the support library, specifically including: For each known category, all its labeled image data are collected. The mean of the feature vectors processed by the shared encoder F(·) of the hierarchical variational autoencoder and the lightweight semantic projector φ(·) is used as the initial prototype. : In the formula, Given category j, For the i labeled image data corresponding to category j, The total number of known category j; In training epoch t, ​​the prototype is updated using the feature mean of the current batch of labeled image data: In the formula, α is the moving average coefficient.

6. The optimization method for semi-supervised medical image classification according to claim 1, characterized in that, The heatmap is processed using Top-K averaging and temperature softmax to obtain the category confidence distribution, including: In the formula, This indicates selecting the K largest values ​​from the vector, where K is a preset positive integer and T is the temperature coefficient. Let C be the confidence score of candidate pseudo-labels for sample x belonging to category j, and C be the total number of categories.

7. The optimization method for semi-supervised medical image classification according to claim 1, characterized in that, The category-adaptive dynamic confidence threshold is related to class priors and follows the principles below: In the formula, Based on the threshold, For the number of samples N of category j j A monotonically decreasing function. This is the fusion coefficient.

8. An optimization system for semi-supervised medical image classification, characterized in that, include: The data acquisition unit is used to acquire medical image datasets that include labeled and unlabeled image data. A classification model building unit is used to construct a medical image classification model with a student-teacher network architecture. The student network includes a clean head for supervised learning of labeled image data and a pseudo-label head for pseudo-label learning of unlabeled image data. The teacher network is obtained by updating the encoder parameters of the student network through an exponential moving average. The model recognition unit is used to output the category probability of the medical image dataset using the student network; extract the features of the unlabeled image data using the teacher network, calculate the cosine similarity with the category prototypes in the support library, generate a heatmap, and perform Top-K averaging and temperature softmax processing on the heatmap to obtain the category confidence distribution. The label filtering unit is used to obtain candidate pseudo-labels based on the class probability of student network output and the class confidence distribution of teacher network output, and to filter candidate pseudo-labels using a class adaptive threshold and class quota strategy to obtain the target pseudo-label.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the optimization method for semi-supervised medical image classification as described in any one of claims 1 to 7.

10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the optimization method for semi-supervised medical image classification as described in any one of claims 1 to 7.