Medical image segmentation method based on semi-supervised convolutional neural network based on contrastive learning
By adopting a semi-supervised convolutional neural network based on contrast learning in medical image segmentation, the loss is calculated using the difference between negative samples and the original image, and combined with the post-processing method of hole filling and non-connected area elimination, the problem of low segmentation accuracy of medical image under a small amount of labeled data is solved, achieving higher segmentation accuracy and lower annotation dependence.
Patent Information
- Application Number
- CN202111527979.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-14
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-12-14
AI Technical Summary
The prior art is difficult to achieve accurate segmentation of medical images with small amounts of labeled data, especially under semi-supervised learning conditions.
Using a semi-supervised convolutional neural network based on contrast learning, a semi-supervised convolutional neural network segmentation model is constructed, and the unbalanced contrast loss is calculated using the difference between the negative sample and the original image, and added it to the binary cross loss function for gradient descent training. At the same time, a post-processing method of hollow filling and non-connected area elimination is added to generate more accurate pseudo-labels for model retraining.
Improves the accuracy of medical image segmentation in the case of a small number of known labels under semi-supervised, and reduces the dependence on large amounts of manual annotation data.
Smart Images

Figure CN114266739B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a medical image segmentation method of a semi-supervised convolutional neural network based on contrastive learning, and belongs to the field of medical image processing. Background Art
[0002] Image segmentation refers to finding the boundary of the region of interest (ROI) in an image so that the pixels inside and outside the boundary have similar characteristics (intensity, texture, etc.). Medical image segmentation is the basis for other subsequent processing of medical images. Accurate segmentation of the target area in the image is of great significance for computer-aided diagnosis, surgical planning, target three-dimensional reconstruction, and radiotherapy evaluation. In recent decades, with the continuous improvement of medical imaging equipment, medical image segmentation algorithms have emerged in an endless stream, but there is still a lot of room for improvement, and semi-supervised medical image segmentation also has a good development prospect.
[0003] There are many traditional medical image segmentation methods based on different principles. For example, threshold-based image segmentation methods, region-based image segmentation methods including region growing, region splitting and merging, and edge-based image segmentation methods. Later, some image segmentation algorithms combined with specific tools appeared, such as image segmentation methods based on wavelet analysis and wavelet transform, and image segmentation algorithms based on Markov random fields. With the advancement of technology, the application of deep learning technology in the field of medical images has become more and more extensive in recent years. In the field of medical image analysis, medical image segmentation can be used in image-guided interventional diagnosis and treatment, directional radiotherapy, and other processes. At present, many medical image segmentation methods based on deep learning can process various forms of medical images, including X-ray, microscopy, CT, MRI, PET, ultrasound (Ultrasound, US), etc. At the same time, in the processing of medical images, different application directions can be distinguished, medical images can be classified, image segmentation of specific areas can be performed, and target recognition of patients can be performed. With the application of deep learning technology, it has been achieved more efficiently.
[0004] As for the application of deep learning in medical images, there are many different methods to improve the accuracy of segmentation, but the improvement of image segmentation accuracy is still one of the problems that need to be solved now. At the same time, the application of semi-supervised neural networks has also received widespread attention in the medical field. In the field of medical image segmentation, the accuracy of image segmentation containing a large number of labels is very high, but at the same time, a large amount of annotation is also time-consuming and labor-intensive. A highly accurate network model requires a large amount of data for training to obtain a relatively universal model, so a high accuracy requires sacrificing a large amount of data annotation. The accuracy of semi-supervised learning cannot completely exceed that of fully supervised learning to a certain extent, but it can achieve better results. At the same time, its advantage is that it does not require a large number of manually annotated images, but only a part of the annotated images, and the purpose of efficient segmentation is achieved on the basis of not too poor accuracy. But how to ensure accuracy within a reasonable range on a small number of data sets is the problem we are facing now. Summary of the invention
[0005] The purpose of the present invention is to provide a medical image segmentation method of a semi-supervised convolutional neural network based on contrastive learning, which to a certain extent solves the problem in the prior art of accurately segmenting medical images when there is a small amount of labeled data.
[0006] The technical solution of the present invention is as follows: The present invention discloses a medical image segmentation method based on a semi-supervised convolutional neural network based on contrastive learning, comprising the following steps:
[0007] S1. Input medical image data, which includes image data with labels and image data without labels, preprocess the medical image data, extract positive and negative samples, divide the data set, and obtain training set data, validation set data, and test set data;
[0008] S2. Construct a contrastive learning convolutional neural network segmentation model, obtain the features of positive and negative samples and the original image through the contraction path of U-Net, and then calculate the imbalanced contrast loss by comparing the negative samples. Add the imbalanced contrast loss to the binary cross loss function to obtain the total loss function, perform gradient descent, and obtain the training model after iterative training.
[0009] S3, construct a semi-supervised medical image segmentation network model based on contrastive learning, segment the image data without labels of the training model obtained by S2, generate pseudo-label images, eliminate connected regions and fill holes in the pseudo-label images, and then put the processed pseudo-label images and their corresponding original images into the training model for training to obtain a new training model;
[0010] S4: Use the training model obtained in S3 to predict the test set data to obtain the final segmentation prediction image.
[0011] Furthermore, in the above-mentioned medical image segmentation method based on contrastive learning and semi-supervised convolutional neural network, the step S1 specifically includes the following steps:
[0012] S11, input and read data set;
[0013] S12, dividing the images into training set, validation set and test set data according to the proportion, wherein the training set data consists of image data with labels and image data without labels;
[0014] S13. Use the label image to take the foreground as the positive sample and the background as the negative sample. By comparing the label with the original image, determine the area of the negative sample and the area of the positive sample, separate the target from the background, extract positive and negative samples from the image data containing labels in the training set, and output the image.
[0015] Furthermore, in the above-mentioned medical image segmentation method of semi-supervised convolutional neural network based on contrastive learning, the ratio of the number of training set, validation set and test set data in step S12 is 6:2:2, and the ratio of the number of labeled image data to unlabeled image data in the training set is 1:2.
[0016] Furthermore, in the above-mentioned medical image segmentation method based on contrastive learning and semi-supervised convolutional neural network, the step S2 specifically includes the following steps:
[0017] S21. Find the positive and negative samples of the medical image according to the label, and then use the contrast learning method to compare the features of the negative sample with the features of the image to be segmented, find the difference between the two images, calculate the distance between the elements at the same position of the two feature maps, and calculate the imbalanced contrast loss function between the original image and the negative sample. , the formula is as follows
[0018]
[0019]
[0020] in, represents the distance between the negative sample image and the original image, where represents the negative sample matrix, Represents the feature matrix of negative samples after special diagnosis extraction, represents the original image matrix, Represents the feature matrix of the original image after feature extraction, parameter is the normalization parameter of the imbalanced contrast loss;
[0021] S22, then calculate the binary cross entropy between the predicted image and the label Add weights to obtain the imbalanced contrast loss function , the formula is as follows
[0022]
[0023] Among them, the binary cross entropy represents the probability of predicting data, is the label of the data, Represents the weight parameter, the value is 0< ≤1.
[0024] Furthermore, the above-mentioned medical image segmentation method of the semi-supervised convolutional neural network based on contrastive learning, wherein: in the step S2, the contrastive learning negative sample image obtains a negative sample feature map through the contraction network path of the downstream structure of the U-Net structure, and the feature map contraction network includes four layers of downsampling convolution layers and pooling layers that are arranged in layers from top to bottom and have the same structure. The convolution layer is composed of a 3*3 convolution kernel, and the pooling layer is composed of a 2*2 kernel. The input end is composed of the original image and the positive and negative sample images. The image is feature extracted through two layers of 3*3 convolution layers through the ReLU activation function, and then the feature image is compressed through a 2*2 pooling layer to abstract the features. This step is repeated many times to obtain the final compressed negative sample feature map, and the feature maps of the original image and the positive and negative samples are collected at the same time, and the feature maps of the original image and the negative samples are obtained. The unbalanced contrast loss function is calculated for the feature map of the original image and the feature map of the negative sample.
[0025] Furthermore, in the above-mentioned medical image segmentation method based on contrastive learning and semi-supervised convolutional neural network, the step S3 specifically includes the following steps:
[0026] S31, divide the training set data into m batches, and initialize the convolution kernel weights and biases;
[0027] S32, inputting the untrained training set data into the constructed convolutional neural network segmentation model based on contrastive learning in batches;
[0028] S33, after completing the training, predicting the training set images without labels to obtain pseudo labels, and then post-processing the pseudo labels by means of non-connected domain elimination and hole filling to obtain more accurate pseudo label images;
[0029] S34, preprocessing the pseudo-label image obtained after step S33 to extract positive and negative samples;
[0030] S35, putting the pseudo-label image data obtained by S34 and its corresponding original image into the network for training to obtain a new training model.
[0031] Furthermore, in the above-mentioned medical image segmentation method based on contrastive learning and semi-supervised convolutional neural network, the post-processing of pseudo labels by the method of non-connected domain elimination and hole filling in step S33 specifically includes the following steps:
[0032] S331, read image data;
[0033] S332, searching for the contour of the connected region of the image;
[0034] S333, comparing the sizes of connected regions;
[0035] S334, keep the pixel values in the connected region with the largest area unchanged, and assign the remaining pixels to background pixels;
[0036] S335, finding a background pixel point as a starting point;
[0037] S336, assigning the non-maximum connected area where the starting point is located as a background pixel;
[0038] S337, the remaining area is regarded as foreground by default, and is filled with foreground pixels;
[0039] S338. Output the image.
[0040] Compared with the prior art, the present invention adopts the above technical scheme and has the following technical effects: the semi-supervised fully convolutional neural network medical image segmentation method based on contrastive learning of the present invention quantifies the difference in pixels between negative samples and original images to the distance, and re-modifies the loss function loss, so that the network model takes into account factors such as whether it is a region to be segmented when training parameters, and adds post-processing methods of hole filling and non-connected region elimination when realizing the semi-supervised network, so as to obtain better pseudo-labels that are more in line with the expected segmentation results. By bringing the pseudo-labels into the model and retraining the model, the final predicted image is obtained, thereby increasing the accuracy of segmenting medical images with a small number of known labels under semi-supervision. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 It is a flowchart of a medical image segmentation method based on a semi-supervised convolutional neural network with contrastive learning according to an embodiment of the present invention.
[0042] Figure 2 Schematic diagram of a semi-supervised convolutional neural network model based on contrastive learning in an embodiment.
[0043] Figure 3It is a schematic diagram of the algorithm flow of hole filling and non-connected region elimination in a semi-supervised convolutional neural network model based on contrastive learning in an embodiment. DETAILED DESCRIPTION
[0044] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings:
[0045] like Figure 1 and Figure 2 As shown, the present invention proposes a medical image segmentation method based on a semi-supervised convolutional neural network based on contrastive learning, which is mainly aimed at the positioning and segmentation of specific tissue structure images such as MRI images of the left and right ventricles and atria of the heart, liver CT images, and kidney CT images in medical images, and specifically includes the following steps:
[0046] S1. Input medical image data, which includes image data with labels and image data without labels, preprocess the medical image data, extract positive and negative samples, divide the data set, and obtain training set data, validation set data, and test set data;
[0047] S2. Construct a contrast learning convolutional neural network segmentation model, pass the positive and negative samples and the original image through the contraction path of U-Net to obtain the features of the positive and negative sample images and the original image, obtain the imbalanced contrast loss function, calculate the binary cross loss function on the image and label finally output by U-Net, add the imbalanced contrast loss function to the binary cross loss, obtain the total loss function, perform gradient descent training parameters, and obtain a new training model and training model parameters after iterative training. The purpose of designing this loss function is to highlight the role of negative samples in segmentation so as to find the target area more accurately.
[0048] S3. Construct a semi-supervised medical image segmentation network model for contrastive learning, segment the unlabeled training image using the training model constructed by step S2 to generate an image with a pseudo-label, perform connected region elimination and hole filling processing on the image with the pseudo-label to generate a pseudo-label image, and then put the processed pseudo-label image and its corresponding original data image into the training model constructed by S2 for training to obtain a new training model and new training model parameters, thereby realizing semi-supervised learning of image segmentation and obtaining model parameters; use the obtained training model to predict the test set data to obtain the final segmentation prediction image, and then evaluate the model using evaluation indicators such as DICE coefficient, VOE coefficient, RVD coefficient, recall rate and precision.
[0049] Specifically, with respect to step S1, step S1 specifically includes the following steps:
[0050] S11, input and read data set;
[0051] S12, divide the images into training set, validation set and test set data in a ratio of 6:2:2, where the training set data consists of labeled image data and unlabeled image data in a ratio of 1:2. The purpose of this division is to first train the labeled data to build a training model, generate pseudo labels for the unlabeled data through the training model, and then put the pseudo labels and the corresponding image data set into the model for training;
[0052] S13. According to the label image, the foreground is taken as the positive sample and the background is taken as the negative sample. By comparing the label with the original image, the area of the negative sample and the area of the positive sample are determined, and the target is separated from the background. For the image data containing labels in the training set, positive and negative samples are extracted, and the image is output.
[0053] Specifically, for step S2, the specific steps of step S2 are as follows: Figure 2 As shown, Figure 2 The horizontal arrows pointing to the right in the box labeled 1 represent convolution operations with a convolution kernel size of 3*3, the vertical arrows pointing downward in the box labeled 1 represent maximum pooling downsampling operations with a convolution kernel of 2*2, the vertical arrows pointing upward in the box labeled 2 represent maximum pooling upsampling operations with a convolution kernel of 2*2, the horizontal arrows pointing to the right in the box labeled 2 represent deconvolution operations with a convolution kernel size of 3*3, and the line arrows represent processing through certain modules. Specifically, the following steps are included:
[0054] S21. Construct a feature map shrinkage network to extract the semantic features of the image.
[0055] The negative sample image of the contrast learning obtains the negative sample feature map through the contraction network path of the downstream structure of the U-Net structure. The feature map contraction network includes four layers of downsampling convolution layers and pooling layers with the same structure arranged from top to bottom. The convolution layer is composed of 3*3 convolution kernels, and the pooling layer is composed of 2*2 kernels. The input end is composed of the original image and the positive and negative sample images. The image features are extracted through two layers of 3*3 convolution layers through the ReLU activation function, and then the feature image is compressed through a 2*2 pooling layer to abstract the features. This step is repeated four times to obtain the final compressed negative sample feature map. At the same time, the feature maps of the original image and the positive and negative samples are collected. The feature map of the original image and the feature map of the negative sample are obtained to calculate the imbalanced contrast loss function. The Euclidean distance between each pixel point of the feature map of the original image and the feature map of the negative sample is first calculated. , and square the obtained loss matrix and calculate the average value of all values in the matrix as the value of the imbalanced contrast loss function . If the similarity between the negative sample and the original image excluding the target area is very high, that is, the distance should be close to 0, the obtained value should be smaller. At the same time, the distance between the area to be segmented in the original image and the area in the negative sample must be large. Let this value be x. Then, when the value of the feature map is calculated again after changing the model parameters, the imbalanced contrast loss of the same image fluctuates around x. and The calculation formula is as follows,
[0056]
[0057]
[0058] in represents the negative sample matrix, Represents the feature matrix of negative samples after feature extraction, represents the original image matrix, Represents the feature matrix of the original image after feature extraction, parameter It is a normalization parameter for the imbalanced contrast loss function so that its loss range is between 0 and 1.
[0059] S22, construct a feature map expansion path to predict image semantic information,
[0060] The feature map shrinkage network includes four layers of upsampling convolutional layers and pooling layers with the same structure, which are arranged in layers from top to bottom. The convolutional layer is composed of 3*3 convolution kernels, and the pooling layer is composed of 2*2 kernels. The predicted segmented image is obtained, and the predicted segmented image is compared with the image label to calculate the binary cross loss function. The loss vector is calculated and all loss vectors are accumulated. If the similarity between the predicted image and the image label is very high, the value of the binary cross loss will be very low. Among them, represents the probability of predicting data, is the label of the data, and the binary cross loss function formula is as follows:
[0061]
[0062] Finally, the two loss functions need to be added according to certain weights. The loss function designed by the present invention is the total loss function. Composed of and The weighted sum of .
[0063]
[0064] Represents the weight parameter, the value is 0< ≤1, controls the impact ratio of the imbalanced loss function on the overall loss.
[0065] The purpose of the total loss function is to take negative samples into consideration as a comparison basis in the segmentation network, and obtain the difference between the target area and the target area when segmenting the target area. Since the size and position of the area to be segmented are not the same, but the distance between the negative sample and the original image feature map in the same volume image should be kept above a constant value, reducing the loss can reduce the prediction error of the background area and obtain a more accurate binary image of the area to be segmented and the prediction.
[0066] After the training set is trained with the network models of S21 and S22, the learning rate is adjusted through the Dice coefficient, recall rate, precision and loss value output on the validation set, and the number of training rounds and batch training is modified to prevent the network from overfitting or underfitting.
[0067] It should be noted here that the positive sample is the area to be segmented when segmenting the image, while the background part often occupies most of it, that is, the area of the negative sample. Therefore, in the process of processing the loss function, the negative sample is directly selected for comparison and calculation with the original image to be segmented. The motivation of this idea is to make the distance between the same features smaller and the distance between different features larger. It is hoped that the background area represented by the negative sample can be continuously weakened in the original sample, and more attention is paid to the area to be segmented. The effect of adding negative samples on the segmentation result in the prediction probability is that when the distance between the feature map of the negative sample, that is, the background area, and the feature map of the original image is calculated, it must float on a fixed value. Therefore, when the loss function exceeds the floating range of the fixed value, the prediction of the background area is biased. Therefore, the purpose of training is to control the occurrence of errors in the detection of the area to be segmented, reduce the error of background prediction, and improve the segmentation level.
[0068] For the pseudo-label images in step S3, the post-processing method is used to re-enter the model with these pseudo-label images for training. The method used is the method of hole filling and non-connected area elimination. For the pseudo-labels obtained in the first round of segmentation, the images with a DICE coefficient lower than 0.85 are analyzed. Some significant defects of the segmentation results are that the image will produce some non-connected redundant areas. The post-processing algorithm is to compare all areas in the non-connected area and retain the largest connected area. This can ensure the maximum accuracy of the segmented area and no redundant segmentation blocks are generated. At the same time, in the pseudo-labels of some images, there will be some holes or points inside the target. These are common sense situations that will not occur in medical image segmentation. Therefore, for this segmentation result, the background pixel point is first found and used as the starting point. The connected area where the starting point is located is assigned the pixel value size of the background pixel. The remaining areas are considered as foreground by default, and the corresponding foreground pixel values are filled, and then the image is output.
[0069] Step S3 specifically includes the following steps:
[0070] S31, divide the training set data into m batches, and initialize the convolution kernel weights and biases;
[0071] S32, inputting the untrained training set data into the constructed contrastive learning based convolutional neural network segmentation model in batches; wherein Figure 2 As shown, positive and negative samples are also fed into the neural network for feature extraction to generate unbalanced contrast loss.
[0072] S33, after completing the training, predicting the unlabeled training set images to obtain pseudo labels, and then post-processing the pseudo labels by means of non-connected domain elimination and hole filling to obtain more accurate segmented images, so that the confidence of the pseudo labels is improved during training;
[0073] S34, preprocessing the pseudo-label image obtained after step S33 to extract positive and negative samples;
[0074] S35, putting the pseudo-label image data obtained in S34 and its corresponding original image into the training model for training to obtain a new training model.
[0075] Specifically, Figure 3 As shown, the hole filling and disconnected area elimination algorithm process includes the following steps:
[0076] S331, read image data;
[0077] S332, searching for the contour of the connected region of the image;
[0078] S333, comparing the sizes of connected regions;
[0079] S334, keep the pixel values in the connected area with the largest area unchanged, and assign the remaining pixels to background pixels;
[0080] S335, finding a background pixel point as a starting point;
[0081] S336, assigning the non-maximum connected area where the starting point is located as a background pixel;
[0082] S337, the remaining area is regarded as foreground by default, and is filled with foreground pixels;
[0083] S338. Output the image.
[0084] From the above description, it can be seen that the semi-supervised convolutional neural network medical image segmentation method based on contrastive learning of the present invention utilizes the pixel differences between negative samples and original images to quantify the distance, and re-modifies the loss function loss, so that the network model takes into account factors such as whether it is a region to be segmented when training parameters, and adds post-processing methods of hole filling and non-connected region elimination when implementing the semi-supervised network, so as to obtain better pseudo-labels that are more in line with the expected segmentation results. By bringing the pseudo-labels into the model and training the model again, the final predicted image is obtained, thereby increasing the accuracy of segmenting medical images with a small number of known labels under semi-supervision.
Claims
1. A medical image segmentation method based on a semi-supervised convolutional neural network with contrastive learning, characterized in that: The following steps are involved: S1. Input medical image data, which includes image data with labels and image data without labels, preprocess the medical image data, extract positive and negative samples, divide the data set, and obtain training set data, validation set data, and test set data; S2. Construct a contrastive learning convolutional neural network segmentation model, obtain the features of positive and negative samples and the original image through the contraction path of U-Net, and then calculate the imbalanced contrast loss by comparing the negative samples. Add the imbalanced contrast loss to the binary cross loss function to obtain the total loss function, perform gradient descent, and obtain the training model after iterative training. Specifically, the following steps are included: S21. Find the positive and negative samples of the medical image according to the label, and then use the contrast learning method to compare the features of the negative sample with the features of the image to be segmented, find the difference between the two images, calculate the distance between the elements at the same position of the two feature maps, and calculate the imbalanced contrast loss function of the original image and the negative sample; S22, then calculate the binary cross entropy between the predicted image and the label Add weights to obtain the imbalanced contrast loss function; S3, construct a semi-supervised medical image segmentation network model based on contrastive learning, segment the image data without labels of the training model obtained by S2, generate pseudo-label images, eliminate connected regions and fill holes in the pseudo-label images, and then put the processed pseudo-label images and their corresponding original images into the training model for training to obtain a new training model; S4: Use the training model obtained in S3 to predict the test set data to obtain the final segmentation prediction image.
2. The medical image segmentation method based on a semi-supervised convolutional neural network based on contrastive learning according to claim 1, characterized in that: The step S1 specifically includes the following steps: S11, input and read data set; S12, dividing the images into training set, validation set and test set data according to the proportion, wherein the training set data consists of image data with labels and image data without labels; S13. Use the label image to take the foreground as the positive sample and the background as the negative sample. By comparing the label with the original image, determine the area of the negative sample and the area of the positive sample, separate the target from the background, extract positive and negative samples from the image data containing labels in the training set, and output the image.
3. The medical image segmentation method based on a semi-supervised convolutional neural network based on contrastive learning according to claim 2, characterized in that: In step S12, the ratio of the number of training set, validation set and test set data is 6:2:2, wherein the ratio of the number of labeled image data to the number of unlabeled image data in the training set is 1:
2.
4. The medical image segmentation method based on contrastive learning and semi-supervised convolutional neural network according to claim 1, characterized in that: The unbalanced contrast loss function L between the original image and the negative sample in step S21 contrastiveloss , the formula is as follows in, represents the distance between the negative sample image and the original image, where represents the negative sample matrix, Represents the feature matrix of negative samples after special diagnosis extraction, represents the original image matrix, Represents the feature matrix of the original image after feature extraction, parameter α i is the normalization parameter of the imbalanced contrast loss; The imbalanced contrast loss function L in S22 total , the formula is as follows Where x in the binary cross entropy i Represents the probability of predicting data, y i is the label of the data, lamda represents the weight parameter, and its value is 0<lamda≤1.
5. The medical image segmentation method based on contrastive learning and semi-supervised convolutional neural network according to claim 4, characterized in that: In the step S2, the negative sample image is contrastively learned through the contraction network path of the downstream structure of the U-Net structure to obtain a negative sample feature map. The feature map contraction network includes four layers of downsampling convolution layers and pooling layers that are hierarchically arranged from top to bottom and have the same structure. The convolution layer is composed of a 3*3 convolution kernel, and the pooling layer is composed of a 2*2 kernel. The input end is composed of the original image and the positive and negative sample images. The image is feature extracted through two layers of 3*3 convolution layers through a ReLU activation function, and then the feature image is compressed through a 2*2 pooling layer to abstract the features. This step is repeated multiple times to obtain the final compressed negative sample feature map. At the same time, the feature maps of the original image and the positive and negative samples are collected, and the unbalanced contrast loss function is calculated for the obtained feature maps of the original image and the feature maps of the negative samples.
6. The medical image segmentation method based on contrastive learning and semi-supervised convolutional neural network according to claim 1, characterized in that: The step S3 specifically comprises the following steps: S31, divide the training set data into m batches, and initialize the convolution kernel weights and biases; S32, inputting the untrained training set data into the constructed convolutional neural network segmentation model based on contrastive learning in batches; S33, after completing the training, predicting the training set images without labels to obtain pseudo labels, and then post-processing the pseudo labels by means of non-connected domain elimination and hole filling to obtain more accurate pseudo label images; S34, preprocessing the pseudo-label image obtained after step S33 to extract positive and negative samples; S35, putting the pseudo-label image data obtained in S34 and its corresponding original image into the training model for training to obtain a new training model.
7. The medical image segmentation method based on contrastive learning and semi-supervised convolutional neural network according to claim 6, characterized in that: The post-processing of the pseudo labels by the method of eliminating disconnected domains and filling holes in step S33 specifically includes the following steps: S331, read image data; S332, searching for the contour of the connected region of the image; S333, comparing the sizes of connected regions; S334, keep the pixel values in the connected area with the largest area unchanged, and assign the remaining pixels to background pixels; S335, finding a background pixel point as a starting point; S336, assigning the non-maximum connected area where the starting point is located as a background pixel; S337, the remaining area is regarded as foreground by default and filled with foreground pixels; S338. Output the image.
Citation Information
Patent Citations
Image Semantic Segmentation Method Based on Deep Full Convolutional Network and Conditional Random Field
AU2020103901A4
Unsupervised cross-domain self-adaptive medical image segmentation method based on deep adversarial learning
AU2020103905A4