A semi-supervised medical image classification method and system based on a generative adversarial network
By using an improved Deep Convolutional Generative Adversarial Network (DCGAN) and a dynamic semi-supervised training strategy, combined with multimodal data augmentation techniques, the problems of high cost of labeled data, insufficient quality of generated images, and low efficiency of semi-supervised learning in medical image classification are solved, achieving efficient classification results with limited labeled samples.
Patent Information
- Application Number
- CN202510688314.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies in medical image classification suffer from problems such as high cost of labeled data, insufficient performance with small samples, insufficient image quality generated by generative adversarial networks, and low efficiency of semi-supervised learning. In particular, in medical image generation, pattern collapse and image blurring are prone to occur, and existing methods do not make full use of the distribution information of generated samples.
An improved Deep Convolutional Generative Adversarial Network (DCGAN) structure is adopted, combined with a dynamic semi-supervised training strategy and multimodal data augmentation technology. By fusing multi-level features of the generator and discriminator through a channel attention mechanism, the training ratio is dynamically adjusted to improve the realism of image details and classification accuracy.
With limited labeled samples, it improves the accuracy and robustness of medical image classification. In particular, when the number of training samples is small, the classification accuracy is about 10% higher than that of traditional methods, and it has good generalization ability.
Smart Images

Figure CN123181885A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of medical image processing and artificial intelligence, and in particular to a semi-supervised medical image classification method and system based on generative adversarial networks. Background Technology
[0002] Currently, technologies such as X-ray imaging, computed tomography (CT), magnetic resonance imaging (MRI), positron emission tomography (PET / CT), and ultrasound imaging are widely used in clinical practice. The key to achieving accurate diagnosis and treatment lies in the accurate interpretation of medical images; however, image interpretation is highly dependent on the subjective judgment of physicians, and physicians of different skill levels may interpret the same image with significant discrepancies. In recent years, with the emergence of large amounts of labeled natural image datasets and breakthroughs in deep learning in computer vision, technologies such as image classification, object detection, and image segmentation have been significantly improved. Efficient classification of medical images is crucial for early disease diagnosis and treatment planning. However, existing technologies face the following key challenges:
[0003] Data annotation is costly: Medical image annotation requires the participation of professional doctors, and the process is time-consuming and extremely expensive. For example, annotating a tumor area in a brain CT image may require tens of minutes of meticulous work by a radiologist.
[0004] Limited performance with small sample sizes: Traditional convolutional neural networks (CNNs) rely on a large amount of labeled data (usually tens of thousands of images) to achieve ideal classification performance. When there are insufficient labeled samples (such as only a few hundred images), the model is prone to overfitting, and the accuracy on the test set drops significantly.
[0005] Limitations of Generative Adversarial Networks (GANs): Traditional GANs suffer from mode collapse and image blurring issues in medical image generation. For example, the generator may repeatedly generate images of the same type of lesion, or fail to accurately simulate complex anatomical structures (such as the morphology of brain ventricles).
[0006] Semi-supervised learning is inefficient: Existing semi-supervised methods (such as self-training and consistency regularization) do not make full use of the distribution information of generated samples, resulting in low efficiency in utilizing unlabeled data.
[0007] To address the above challenges, the following specific existing technologies are currently under research:
[0008] In 2014, Goodfellow et al. proposed using Generative Adversarial Networks (GANs) to generate realistic samples through adversarial training between a generator (G) and a discriminator (D). However, traditional GANs are prone to generating noisy images (such as artifacts and structural distortions) in medical image generation. Secondly, Radford et al. improved GANs (Convolutional Generative Adversarial Networks) by introducing convolutional layers in 2016, generating higher resolution images. However, its application in the medical field is limited by training instability in small sample scenarios. Springenberg et al. (2015) proposed a semi-supervised image classification technique that improves classification performance using unlabeled data, but without incorporating a generative adversarial mechanism, feature learning is insufficient.
[0009] The above techniques all have shortcomings. First, the quality of the generated images is insufficient. Medical images generated using traditional GANs lack detail realism (e.g., blurred tumor edges), failing to effectively expand training data. Second, the network structure is not optimized enough; existing DCGANs do not design dedicated convolutional kernels or attention mechanisms for the multi-scale features of medical images (e.g., minute lesions, texture heterogeneity). Third, the training strategy is too simplistic; existing methods do not dynamically adjust the training weights of labeled and generated data, leading to convergence difficulties when labeled data is scarce. Therefore, a medical image classification method that can solve these problems is needed. Summary of the Invention
[0010] The purpose of this invention is to overcome the shortcomings of the existing technology and provide a semi-supervised medical image classification method and system based on generative adversarial networks.
[0011] The objective of this invention can be achieved through the following technical solutions:
[0012] As a first aspect of the present invention, a semi-supervised medical image classification method based on generative adversarial networks is provided, the method comprising the following steps:
[0013] Preprocess the raw medical images;
[0014] The preprocessed image is input into the discriminator of the adversarial generative network trained in a dynamic semi-supervised manner to extract high-level semantic features, and the generator of the adversarial generative network generates low-level edge information.
[0015] A channel attention mechanism is used to fuse the low-level edge information generated by the generator with the high-level semantic features extracted by the discriminator to obtain a fused feature map.
[0016] Image classification is performed based on fused feature maps to obtain class probabilities.
[0017] As a preferred technical solution, the preprocessing includes normalization, data augmentation, and annotation consistency verification;
[0018] The normalization includes: adjusting the image size to 128×128 pixels using bicubic interpolation, and standardizing the pixels;
[0019] The data enhancements include spatial transformation, grayscale transformation, and elastic deformation.
[0020] As a preferred technical solution, the network structure of the generator in the adversarial generative network is as follows:
[0021] The generator's input layer receives a multidimensional Gaussian noise vector, which is then mapped to a feature map by a fully connected layer.
[0022] The feature map is upsampled to the target size by performing n transposed convolution operations sequentially through transposed convolution layers;
[0023] The activation function for the fully connected layers and the first n-1 transposed convolutions is ReLU, and the activation function for the last transposed convolution is Tanh.
[0024] As a preferred technical solution, the network structure of the discriminator in the adversarial generative network is as follows:
[0025] The discriminator's input layer receives medical image input and performs multiple stride convolutions sequentially through stride convolution layers to gradually reduce the feature map size to a set size. The LeakyReLU activation function is used after each stride convolution layer.
[0026] As a preferred technical solution, the image classification process yields the following specific category probabilities:
[0027] The fused feature map is mapped to class probabilities through global average pooling and fully connected layers, and then output through Softmax.
[0028] As a preferred technical solution, the dynamic semi-supervised training is divided into discriminator training and generator training in sequence. The generator is updated after every four discriminator training iterations, and the training ratio is dynamically adjusted.
[0029] The discriminator is trained as follows: sample real images and generate synthetic images; mix the synthetic images with real images and input them into the discriminator; calculate the adversarial loss and classification loss, and update the discriminator parameters through backpropagation.
[0030] The generator is trained as follows: 100-dimensional Gaussian noise is input into the generator, which generates a synthetic image. The synthetic image is then mixed with a real image and input into a discriminator to calculate the adversarial loss. The generator's parameters are then updated through backpropagation.
[0031] As a preferred technical solution, the total loss of the semi-supervised training is:
[0032]
[0033] In the formula, λ1 and λ2 are the adversarial losses, respectively. With classification loss Loss weights;
[0034] The calculation of the adversarial loss is as follows:
[0035]
[0036] In the formula, D represents the expected value of the discriminator D's judgment on the true sample x; D adv (x) represents the discriminant's judgment result on the real sample x; D represents the expected ability of the discriminator to distinguish between generated samples; adv (G(z)) represents the discriminant's judgment result on the generated sample;
[0037] The classification loss is calculated as follows:
[0038]
[0039] In the formula, N labeled Indicates the total number of labeled data; y i,c D represents the predicted probability; class (x i ) c This represents the discrimination result of the real sample x.
[0040] As a preferred technical solution, the dynamic adjustment of the training ratio is specifically as follows:
[0041] At the beginning of each training cycle, the current percentage of labeled data is calculated, and the amount of labeled data and generated data in each batch is dynamically set according to the percentage. The smaller the percentage of labeled data, the larger the ratio of labeled data to generated data.
[0042] As a second aspect of the present invention, a semi-supervised medical image classification system based on generative adversarial networks is provided, the system performing the classification method described above, including...
[0043] The data preprocessing module performs normalization, enhancement, and annotation consistency verification on medical images;
[0044] A generative adversarial network module, containing an improved generator and discriminator, generates high-resolution medical images through adversarial training;
[0045] The feature fusion module integrates low-level edge information and high-level semantic features from the generator and discriminator, and obtains a fused feature map through a channel attention mechanism.
[0046] The classification reasoning module outputs classification results in real time based on the fused feature map.
[0047] As a preferred technical solution, in the generative adversarial network module:
[0048] The generator's input layer receives a multidimensional Gaussian noise vector, which is then mapped to a feature map by a fully connected layer.
[0049] The feature map is upsampled to the target size by performing n transposed convolution operations sequentially through transposed convolution layers;
[0050] The activation function for the fully connected layers and the first n-1 transposed convolutions is ReLU, and the activation function for the last transposed convolution is Tanh.
[0051] The discriminator's input layer receives medical image input and performs multiple stride convolutions sequentially through stride convolution layers to gradually reduce the feature map size to a set size. The LeakyReLU activation function is used after each stride convolution layer.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] 1) This invention proposes a semi-supervised medical image classification method and system based on generative adversarial networks.
[0054] By designing an improved Deep Convolutional Generative Adversarial Network (DCGAN) structure, this method enhances the detail realism of generated medical images. A dynamic semi-supervised training strategy is proposed, consisting of discriminator training, generator training, and a dynamic adjustment strategy, which efficiently integrates feature information from labeled and generated data. This method effectively combines labeled and unlabeled sample data, improving classification performance even with limited labeled samples. The decision surface alleviates the problem of scarce labeled samples.
[0055] 2) This invention introduces multimodal data augmentation technology, which integrates multi-level features of the generator and discriminator, such as low-level edge information and high-level semantic features, and enhances classification discriminability through channel attention mechanism, thereby enhancing the robustness of the model to complex changes in medical images.
[0056] 3) The deep convolutional adversarial neural network proposed in this invention was used to classify CT images of the brain, chest, and cervical spinal cord. The overall classification accuracy and Kappa coefficient of different classification methods under different sample numbers were analyzed. The results show that the overall classification accuracy and Kappa coefficient increase with the increase of the number of training samples. Especially when the number of training samples is small, compared with traditional classification methods and other deep neural networks, the improved adversarial neural network proposed in this invention has a classification accuracy that is about 10% higher than other neural networks and traditional classification methods, and has better generalization ability. Attached Figure Description
[0057] Figure 1 This is a flowchart of a semi-supervised medical image classification method based on generative adversarial networks according to the present invention.
[0058] Figure 2 This is an architecture diagram of a semi-supervised medical image classification system based on generative adversarial networks according to the present invention.
[0059] Figure 3 This is a diagram of the generator network structure of the present invention, with transposed convolutional layers, batch normalization layers, and activation functions labeled.
[0060] Figure 4 This is a diagram of the discriminator network structure of the present invention, illustrating the stride convolution and global average pooling design;
[0061] Figure 5 This is a diagram of the SIFT feature electrical matching process of the present invention. Detailed Implementation
[0062] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.
[0063] Example 1
[0064] A semi-supervised medical image classification method and system based on generative adversarial networks (GANs) is proposed. First, an improved Deep Convolutional Generative Adversarial Network (DCGAN) structure is designed to enhance the detail realism of generated medical images. Second, a dynamic semi-supervised training strategy is proposed to efficiently fuse feature information from labeled and generated data. Finally, multimodal data augmentation techniques are incorporated to enhance the model's robustness to complex variations in medical images. Figure 1 As shown, the specific steps of the method are as follows:
[0065] S1. Preprocess the original medical images, including normalization, enhancement, and annotation consistency verification;
[0066] S2. Input the preprocessed image into the discriminator of the adversarial generative network trained by dynamic semi-supervised method to extract high-level semantic features; and generate low-level edge information by the generator of the adversarial generative network.
[0067] S3. The multi-level features (low-level edge information and high-level semantic features) of the intermediate features generated by the generator and discriminator are fused through the channel attention mechanism to obtain a fused feature map to enhance the classification discriminativeness.
[0068] S4. The fused feature map is input into the fully connected layer after global average pooling. Then, the class probability is output through the Softmax function, and a heat map is generated to show the probability distribution of the lesion area, which helps doctors to locate the lesion and visualize the results.
[0069] In step 1, the data preprocessing and enhancement are as follows: During the data normalization process, the image size is adjusted, and bicubic interpolation is used to convert the image to 128×128 pixels. The pixels are then standardized. Data augmentation employs spatial transformation, grayscale transformation, and elastic deformation. Spatial transformation includes random horizontal flipping (50% probability), rotation (range ±15°, interpolation method: bilinear), and translation (range ±10%, fill mode: edge fill). Grayscale transformation uses brightness adjustment (proportion ±20%) and contrast adjustment (proportion ±15%). Elastic deformation uses a Gaussian kernel σ=5 and a displacement amplitude of ±10 pixels.
[0070] The structure of the generative adversarial network in this invention is improved compared to the traditional one. For example... Figure 3 The generator designed in this invention is shown. The generator's input layer receives a 100-dimensional Gaussian noise vector, which is mapped to a 4×4×1024 feature map through a fully connected layer. Then, it undergoes four transposed convolution operations (kernel size 4×4, stride 2) sequentially, upsampling to 128×128 pixels with channels of 512, 256, 128, and 3 respectively. The first four activation functions use ReLU, and the last layer uses Tanh, with the output normalized to [-1, 1]. Batch normalization (BatchNorm) is added after each transposed convolution layer to accelerate training convergence.
[0071] like Figure 4 As shown, the discriminator's input layer accepts a 128×128×3 medical image as input. Four stride convolutions (kernel size 4×4, stride 2) are performed sequentially through stride convolutional layers, gradually reducing the feature map size to 4×4×512, with the number of channels decreasing to 64, 128, 256, and 512 respectively. LeakyReLU (α=0.2) is used as the activation function after each stride convolutional layer to prevent gradient vanishing.
[0072] Feature fusion: Channel attention mechanism is used to dynamically fuse multi-level features from the generator and discriminator to enhance classification discriminative power. The process of fusing the generator and discriminator to generate multi-level features is expressed by the following formula:
[0073] F fused =α G ⊙Conv 1×1 (AvgPool(F G ))+α D ⊙F D
[0074] In the formula, F G For the generated intermediate feature map, F D This is a high-level feature map of the discriminator. α G Let α be the weight parameter of the generator. D The weight parameters of the discriminator are AvgPool(·), which means average pooling operation and is used to downsample the feature map of the generator.
[0075] Classification output: The 512-channel feature map is mapped to class probabilities through global average pooling and fully connected layers, and then output through Softmax.
[0076] The dynamic semi-supervised training process of this invention is divided into discriminator training, generator training, and dynamic strategy adjustment in sequence. First, the network and parameters are initialized. Then, discriminator training is performed to improve its ability to distinguish between real and generated images and to correctly classify and label data. The specific steps include sampling real data, generating fake data, calculating adversarial loss and classification loss, and backpropagating to update the discriminator. Next, generator training is performed to generate realistic images to deceive the discriminator, causing it to misclassify them as real data. The generator training process is as follows: first, 100-dimensional Gaussian noise is input and passed through a fully connected layer to generate an initial feature map. Then, four layers of transposed convolution are used to progressively upsample to a resolution of 128×128×3 to generate a synthetic image. Next, the generated image is mixed with a real image and input into the discriminator to calculate the adversarial loss. Finally, the generator parameters are updated through backpropagation. After every four training iterations of the discriminator, the generator is trained and updated once to prevent the discriminator from becoming too powerful and causing the generator to fail to converge.
[0077] The loss function design for semi-supervised training mainly includes adversarial loss, classification loss, and total loss. The adversarial loss uses:
[0078]
[0079] In the formula, D represents the expected value of the discriminator D's judgment on the true sample x; D adv(x) represents the discriminant's judgment result on the real sample x; D represents the expected ability of the discriminator to distinguish between generated samples; adv (G(z)) represents the discriminant's judgment result on the generated sample.
[0080] Classification loss is adopted as follows:
[0081]
[0082] In the formula, N labeled Indicates the total number of labeled data; y i,c D represents the predicted probability; class (x i ) c This represents the discrimination result of the real sample x.
[0083] The total loss of semi-supervised training is:
[0084]
[0085] In the formula, λ1 and λ2 are the loss weights of adversarial loss and classification loss, respectively.
[0086] Finally, the training ratio is dynamically adjusted. At the beginning of each training epoch, the current percentage of labeled data is calculated, and the amount of labeled data and generated data in each batch is dynamically set according to the ratio.
[0087] A dynamic sampling strategy is adopted to adjust the batch ratio of generated data to labeled data based on the proportion of labeled data. The proportion of labeled data in the dynamic sampling strategy is:
[0088]
[0089] In the formula, ρ is; N labeled For; N total for.
[0090] The batch ratio of labeled data to generated data is:
[0091]
[0092] For the classification inference process, the test image in the input preprocessing is first adjusted to 128×128 pixels using bicubic interpolation and normalized to the range [-1,1]. The preprocessed image is then input into the discriminator, where high-level semantic features are extracted through stride convolution for feature processing, and fused with features generated by the generator using a channel attention mechanism. During classification, the fused features are input into a fully connected layer after global average pooling, and then the class probability is output through the Softmax function. A heatmap is generated to display the probability distribution of lesion areas, visualizing the results to assist doctors in locating lesions.
[0093] To verify this invention, we used 12,000 CT images of the brain, chest, and cervical spine collected from a hospital. These images covered five common lesions (including glioma, pneumonia nodules, and cervical disc herniation) as well as normal samples. The annotation process involved three radiologists independently annotating each lesion sample, and only samples with an annotation consistency rate of 95% or higher were included in the training set. The dataset was divided as follows: the training set contained 8,400 images (70%), the validation set contained 1,200 images (10%), and the test set contained 2,400 images (20%). Annotated data comprised 5% to 30% of the training set to simulate different annotation resource scenarios. In this embodiment, the hyperparameters were set as follows: batch size was 32, training epochs were 200, and the learning rates for the generator and discriminator were 0.0002 and 0.0001, respectively. The loss weights were set to λ1 = 1 and λ1 = 2.
[0094] A comparison of the proposed method with existing methods reveals that the method described in this embodiment exhibits superior classification accuracy, Kappa consistency coefficient, peak signal-to-noise ratio (PSNR) of generated images, and single-image inference latency. The classification accuracy of this method for brain CT images reaches 99.57% (±0.23%), significantly higher than the 95.20% (±0.45%) for chest CT. The Kappa coefficient for brain CT analysis is 0.98 (95% CI: 0.97–0.99), while that for chest CT is 0.91 (95% CI: 0.89–0.93). A Kappa coefficient exceeding 0.81 is considered extremely strong consistency, indicating that both modalities meet clinically usable standards. However, the classification decision for brain CT demonstrates higher physician annotation consistency, especially exhibiting stronger robustness in the identification of small lesions (<5mm). Generative Adversarial Networks (GANs) achieved a PSNR of 28.5 dB in brain CT image reconstruction, a 0.7 dB improvement over the 27.8 dB of chest CT. Combined with Structural Similarity Index (SSIM) analysis, the reconstruction error at the gray-white matter boundary (MSE = 3.2) in brain CT-generated images was 28.9% lower than the lung texture detail reconstruction error (MSE = 4.5) in chest CT, confirming superior pixel-level fidelity in brain image generation tasks.
[0095] This invention proposes a semi-supervised medical image classification method based on generative adversarial networks (GANs). This method effectively combines labeled and unlabeled sample data, improving classification performance even with limited labeled samples. The decision surface alleviates the problem of scarce labeled samples. Deep convolutional adversarial neural networks (DANs) are used to classify CT images of the brain, chest, and cervical spinal cord. The overall classification accuracy and Kappa coefficient of different classification methods under different sample numbers are analyzed. The results show that the overall classification accuracy and Kappa coefficient increase with the increase in the number of training samples. Especially when the number of training samples is small, the classification accuracy of the adversarial neural network is about 10% higher than that of other neural networks and traditional classification methods, and it also has better generalization ability.
[0096] Example 2
[0097] A semi-supervised medical image classification method and system based on generative adversarial networks is proposed. The overall architecture of the system is as follows: Figure 2 As shown, it mainly includes a data preprocessing module, a generative adversarial network module, a feature fusion module, and a classification inference module.
[0098] The data preprocessing module normalizes, enhances, and verifies the consistency of annotations in medical images. The generative adversarial network (GAN) module contains an improved generator (G) and discriminator (D), generating high-resolution medical images and performing classification through adversarial training. The feature fusion module integrates multi-level features from the generator and discriminator (such as low-level edge information and high-level semantic features), enhancing classification discriminative power through a channel attention mechanism. The classification inference module outputs classification results in real time and provides a visual heatmap of the lesion region.
[0099] The generative adversarial network module employs an improved deep convolutional generative adversarial network (DCGAN) structure and is trained using a dynamic semi-supervised training strategy.
[0100] The generator's input layer receives a multidimensional Gaussian noise vector, which is mapped to a feature map by a fully connected layer. A transposed convolutional layer performs n transposed convolution operations sequentially to upsample the feature map to the target size. The fully connected layer and the first n-1 transposed convolutions use ReLU activation, while the last transposed convolution uses Tanh activation. The discriminator's input layer receives a medical image input and performs multiple stride convolutions sequentially by a stride convolutional layer, progressively reducing the feature map size to a set size. Each stride convolution is followed by a LeakyReLU activation function.
[0101] The training process is divided into discriminator training, generator training, and dynamic adjustment strategy. First, the network and parameters are initialized. Then, discriminator training is performed to improve its ability to distinguish between real and generated images and correctly classify labeled data. Each iteration trains the discriminator four times, specifically by sampling real data, generating fake data, calculating the discriminator loss, and backpropagating to update the discriminator. Next, the generator is trained to generate realistic images to deceive the discriminator into misclassifying them as real data. After every four discriminator training iterations, the generator is trained once. Finally, the training ratio is dynamically adjusted. This is done by calculating the current percentage of labeled data at the beginning of each training epoch and dynamically setting the amount of labeled and generated data in each batch based on this ratio.
[0102] The aforementioned system was used to classify CT images of the brain, chest, and cervical spinal cord. The overall classification accuracy and Kappa coefficient of different classification methods under different sample sizes were analyzed. The results show that the overall classification accuracy and Kappa coefficient increase with the increase of the number of training samples. Especially when the number of training samples is small, compared with traditional classification methods and other deep neural networks, the classification accuracy of adversarial neural networks is about 10% higher than that of other neural networks and traditional classification methods, and it also has better generalization ability.
[0103] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A semi-supervised medical image classification method based on generative adversarial networks, characterized in that, The method steps include: Preprocess the raw medical images; The preprocessed image is input into the discriminator of the adversarial generative network trained in a dynamic semi-supervised manner to extract high-level semantic features, and the generator of the adversarial generative network generates low-level edge information. A channel attention mechanism is used to fuse the low-level edge information generated by the generator with the high-level semantic features extracted by the discriminator to obtain a fused feature map. Image classification is performed based on fused feature maps to obtain class probabilities.
2. The semi-supervised medical image classification method based on generative adversarial networks according to claim 1, characterized in that, The preprocessing includes normalization, data augmentation, and label consistency verification; The normalization includes: adjusting the image size to 128×128 pixels using bicubic interpolation, and standardizing the pixels; The data enhancements include spatial transformation, grayscale transformation, and elastic deformation.
3. The semi-supervised medical image classification method based on generative adversarial networks according to claim 1, characterized in that, The network structure of the generator in the adversarial generative network is as follows: The generator's input layer receives a multidimensional Gaussian noise vector, which is then mapped to a feature map by a fully connected layer. The feature map is upsampled to the target size by performing n transposed convolution operations sequentially through transposed convolution layers; The activation function for the fully connected layers and the first n-1 transposed convolutions is ReLU, and the activation function for the last transposed convolution is Tanh.
4. The semi-supervised medical image classification method based on generative adversarial networks according to claim 1, characterized in that, The specific network structure of the discriminator in the adversarial generative network is as follows: The discriminator's input layer receives medical image input and performs multiple stride convolutions sequentially through stride convolution layers to gradually reduce the feature map size to a set size. The LeakyReLU activation function is used after each stride convolution layer.
5. The semi-supervised medical image classification method based on generative adversarial networks according to claim 1, characterized in that, The image classification process yields the following specific category probabilities: The fused feature map is mapped to class probabilities through global average pooling and fully connected layers, and then output through Softmax.
6. The semi-supervised medical image classification method based on generative adversarial networks according to claim 1, characterized in that, The dynamic semi-supervised training is divided into discriminator training and generator training in sequence. The generator is updated after every four discriminator training iterations, and the training ratio is dynamically adjusted. The discriminator is trained as follows: sample real images and generate synthetic images; mix the synthetic images with real images and input them into the discriminator; calculate the adversarial loss and classification loss, and update the discriminator parameters through backpropagation. The generator is trained as follows: 100-dimensional Gaussian noise is input into the generator, which generates a synthetic image. The synthetic image is then mixed with a real image and input into a discriminator to calculate the adversarial loss. The generator's parameters are then updated through backpropagation.
7. A semi-supervised medical image classification method based on generative adversarial networks according to claim 6, characterized in that, The total loss of the semi-supervised training is: In the formula, λ1 and λ2 are the adversarial losses, respectively. With classification loss Loss weights; The countermeasure loss is calculated as follows: In the formula, D represents the expected value of the discriminator D's judgment on the true sample x; D adv (x) represents the discriminant's judgment result on the real sample x; D represents the expected ability of the discriminator to distinguish between generated samples; adv (G(z)) represents the discriminant's judgment result on the generated sample; The classification loss is calculated as follows: In the formula, N labeled Indicates the total number of labeled data; y i,c D represents the predicted probability; class (x i ) c This represents the discrimination result of the real sample x.
8. The semi-supervised medical image classification method based on generative adversarial networks according to claim 6, characterized in that, The dynamic adjustment of the training ratio is as follows: At the beginning of each training cycle, the current percentage of labeled data is calculated, and the amount of labeled data and generated data in each batch is dynamically set according to the percentage. The smaller the percentage of labeled data, the larger the ratio of labeled data to generated data.
9. A semi-supervised medical image classification system based on generative adversarial networks, characterized in that, The system performs the classification method as described in any one of claims 1-8, including The data preprocessing module performs normalization, enhancement, and annotation consistency verification on medical images; A generative adversarial network module, containing an improved generator and discriminator, generates high-resolution medical images through adversarial training; The feature fusion module integrates low-level edge information and high-level semantic features from the generator and discriminator, and obtains a fused feature map through a channel attention mechanism. The classification reasoning module outputs classification results in real time based on the fused feature map.
10. A semi-supervised medical image classification system based on generative adversarial networks according to claim 9, characterized in that, In the generative adversarial network module: The generator's input layer receives a multidimensional Gaussian noise vector, which is then mapped to a feature map by a fully connected layer. The feature map is upsampled to the target size by performing n transposed convolution operations sequentially through transposed convolution layers; The activation function for the fully connected layers and the first n-1 transposed convolutions is ReLU, and the activation function for the last transposed convolution is Tanh. The discriminator's input layer receives medical image input and performs multiple stride convolutions sequentially through stride convolution layers to gradually reduce the feature map size to a set size. The LeakyReLU activation function is used after each stride convolution layer.
