Semi-supervised medical image segmentation method based on convolutional neural network
By building a semi-supervised convolutional neural network, using a small amount of labeled data and a large amount of labeled data to train, efficient segmentation of medical images is achieved, solving the problems of large amounts of labeling and poor adaptability in the existing technology, and improving the accuracy and adaptability of segmentation results.
Patent Information
- Application Number
- CN202310219146.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-03-09
- Filing Date
- 2023-03-07
- Publication Date
- 2025-08-12
AI Technical Summary
Existing medical image segmentation methods require a large amount of labeled data, and have poor adaptability to specific images, so they cannot effectively utilize labelless data.
A semi-supervised convolutional neural network is adopted to train a small amount of labeled data and a large amount of labelless data to build a semi-supervised convolutional neural network composed of segmentation and reconstruction networks. The feature extraction encoder, segmentation decoder and reconstruction decoder are used for image segmentation and reconstruction, and image segmentation is realized through alternating training.
It reduces the workload of expert labeling, improves the accuracy and adaptability of image segmentation, and can process a variety of medical images.
Smart Images

Figure CN120471932A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an image processing method, and in particular to a semi-supervised medical image segmentation method based on convolutional neural network. Background Art
[0002] Medical images provide accurate data support for accurate disease diagnosis. However, obtaining accurate medical images has become a technical challenge. In existing technologies, neural networks are commonly used to segment medical images. However, existing neural network segmentation methods have the following drawbacks:
[0003] When segmenting images, a large number of medical images need to be obtained for image annotation to form labeled sample images, and then these labeled sample images are input into the neural network for training. This method requires a large amount of image annotation in advance, that is, experts manually segment the medical images and then input them into the neural network for learning and training. Unlabeled images are difficult to learn and train, which increases the workload in the early stage.
[0004] Moreover, the neural network intelligence of the existing technology can only segment specific medical images, but cannot segment non-specific images. This is because it cannot learn and train unlabeled data, and thus has poor adaptability.
[0005] Therefore, in order to solve the above technical problems, it is urgent to propose a new technical means. Summary of the Invention
[0006] In view of this, the purpose of the present invention is to provide a semi-supervised medical image segmentation method based on convolutional neural network. When segmenting medical images, only a small amount of unlabeled data and a large amount of unlabeled data are needed to train the network, thereby effectively reducing the workload of experts, and having strong adaptability, and the final recognition result is highly accurate.
[0007] The present invention provides a semi-supervised medical image segmentation method based on convolutional neural network, comprising the following steps:
[0008] S1. Preprocessing the sample medical image: Correcting the sample medical image from different resolutions to the same set resolution;
[0009] S2. Construct a semi-supervised convolutional neural network, where the semi-supervised convolutional neural network consists of a segmentation network and a reconstruction network. The segmentation network consists of a feature extraction encoder with coordinate and attention mechanisms and a segmentation decoder. The reconstruction network consists of a feature extraction encoder with coordinate and attention mechanisms, a reconstruction decoder, and a sharpening module. The segmentation network and the reconstruction network share the same feature extraction encoder with coordinate and attention mechanisms.
[0010] S3. The feature extraction encoder performs feature extraction on the preprocessed medical image and outputs a feature map;
[0011] S4. The segmentation decoder performs segmentation processing on the feature map to obtain segmented image information consistent with the resolution of the preprocessed medical image;
[0012] S5. The reconstruction decoder reconstructs the feature map to obtain reconstructed image information consistent with the resolution of the preprocessed medical image, and the sharpening module sharpens the reconstructed image information;
[0013] S6. Alternately train the segmentation network and the reconstruction network until the training is completed;
[0014] S7. Process the medical image acquired in real time through steps S1-S3 and output the final medical segmentation image.
[0015] Furthermore, in step S2, feature map extraction specifically includes:
[0016] S31. The preprocessed medical image is processed by convolution, batch normalization and ReLU activation function, and then global average pooling is performed to obtain image data D1;
[0017] S32. The image data D1 is subjected to the operation of step S31 again to obtain image data D2;
[0018] S33. The image data D2 is input into the feature extraction encoder to obtain a feature map C1;
[0019] S34. The feature map C1 is processed in step S31 to obtain the feature map C2, and the feature map C2 is processed in step S31 to obtain the feature map C3;
[0020] S35. Execute the process of step S31 on the feature map C3, and then perform bilinear interpolation upsampling to obtain the feature map C4;
[0021] S36. Perform step S35 three times on the feature map C4 to obtain a feature map C5;
[0022] S37. Process the feature map C5 through the Sigmoid function to obtain the final feature map.
[0023] Furthermore, in step S4, the sharpening module performs sharpening in the following manner:
[0024]
[0025] Where: R uis the output of the reconstruction decoder, h, w, c represent the length, height and color channel of the reconstructed image respectively, T is a set constant, and K represents the number of channels of the reconstruction network.
[0026] Furthermore, the alternating training of the segmentation network and the reconstruction network specifically includes:
[0027] Divide sample medical images into labeled images and unlabeled images;
[0028] Labeled images and unlabeled images are alternately input into the semi-supervised convolutional neural network and the semi-supervised convolutional neural network is trained.
[0029] Furthermore, the segmentation network is trained using the following loss function:
[0030] L S =λL Dice +(1-λ)L BCE Among them, L S is the loss of the segmentation network, λ is the setting coefficient;
[0031]
[0032] Where: N is the total number of samples, y represents the true label, Represents the output of the segmentation network after processing the labeled image.
[0033] Furthermore, the reconstruction network is trained using the following loss function:
[0034]
[0035] L R is the loss of the reconstruction network, x is the input unlabeled image, represents the unlabeled data output of the segmentation network, represents the output of the reconstruction network, and ⊙ is the Hadamard product.
[0036] Beneficial effects of the present invention: Through the present invention, when segmenting medical images, only a small amount of unlabeled data and a large amount of unlabeled data are needed to train the network, thereby effectively reducing the workload of experts, and having strong adaptability, and the final recognition result is highly accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:
[0038] Figure 1 Flowchart of the present invention.
[0039] Figure 2 Schematic diagram of the semi-supervised neural network structure of the present invention. DETAILED DESCRIPTION
[0040] The present invention is further described in detail below:
[0041] The present invention provides a semi-supervised medical image segmentation method based on convolutional neural network, comprising the following steps:
[0042] S1. Preprocessing the sample medical image: Correcting the sample medical image from different resolutions to the same set resolution;
[0043] S2. Construct a semi-supervised convolutional neural network, wherein the semi-supervised convolutional neural network consists of a segmentation network and a reconstruction network. The segmentation network consists of a feature extraction encoder with coordinate and attention mechanisms and a segmentation decoder. The reconstruction network consists of a feature extraction encoder with coordinate and attention mechanisms, a reconstruction decoder, and a sharpening module. The segmentation network and the reconstruction network share the same feature extraction encoder with coordinate and attention mechanisms. The above modules can adopt existing structures.
[0044] S3. The feature extraction encoder performs feature extraction on the preprocessed medical image and outputs a feature map;
[0045] S4. The segmentation decoder performs segmentation processing on the feature map to obtain segmented image information consistent with the resolution of the preprocessed medical image;
[0046] S5. The reconstruction decoder reconstructs the feature map to obtain reconstructed image information consistent with the resolution of the preprocessed medical image, and the sharpening module sharpens the reconstructed image information;
[0047] S6. Alternately train the segmentation network and the reconstruction network until the training is completed;
[0048] S7. The medical image acquired in real time is processed through steps S1-S3 to output the final medical segmentation image. Through the above method, when segmenting the medical image, only a small amount of unlabeled data and a large amount of unlabeled data are needed to train the network, thereby effectively reducing the workload of experts, and having strong adaptability, and the final recognition result is highly accurate.
[0049] In this embodiment, in step S2, feature map extraction specifically includes:
[0050] S31. The preprocessed medical image is processed by convolution, batch normalization and ReLU activation function, and then global average pooling is performed to obtain image data D1;
[0051] S32. The image data D1 is subjected to the operation of step S31 again to obtain image data D2;
[0052] S33. The image data D2 is input into the feature extraction encoder to obtain a feature map C1;
[0053] S34. The feature map C1 is processed in step S31 to obtain the feature map C2, and the feature map C2 is processed in step S31 to obtain the feature map C3;
[0054] S35. Execute the process of step S31 on the feature map C3, and then perform bilinear interpolation upsampling to obtain the feature map C4;
[0055] S36. Perform step S35 three times on the feature map C4 to obtain a feature map C5;
[0056] S37. Process the feature map C5 through the Sigmoid function to obtain the final feature map. Through the above processing, an accurate feature map can be obtained, thereby ensuring the accuracy of the final segmentation result.
[0057] In this embodiment, in step S4, the sharpening module performs sharpening in the following manner:
[0058]
[0059] Where: R u is the output of the reconstruction decoder, h, w, c represent the length, height and color channel of the reconstructed image respectively, T is a set constant, and K represents the number of channels of the reconstruction network.
[0060] In this embodiment, alternately training the segmentation network and the reconstruction network specifically includes:
[0061] Divide sample medical images into labeled images and unlabeled images;
[0062] The labeled images and unlabeled images are alternately input into the semi-supervised convolutional neural network and the semi-supervised convolutional neural network is trained. During the first training, the labeled images are input first. During the next training, the unlabeled data are input, and the labeled data are input the next time. This process is repeated until the set number of training times is reached and the training is completed.
[0063] Among them: The segmentation network is trained using the following loss function:
[0064] L S =λL Dice +(1-λ)L BCE Among them, L S is the loss of the segmentation network, λ is the setting coefficient;
[0065]
[0066] Where: N is the total number of samples, y represents the true label, Represents the output of the segmentation network after processing the labeled image.
[0067] The reconstruction network is trained using the following loss function:
[0068]
[0069] L R is the loss of the reconstruction network, x is the input unlabeled image, represents the unlabeled data output of the segmentation network, represents the output of the reconstruction network, and ⊙ is the Hadamard product. Figure 2 From the structure given in , it can be seen that the reconstruction network supervises the segmentation network for training, and simultaneously updates the parameters of the reconstruction network and the segmentation network until the training is completed, thereby effectively ensuring the accuracy of the final segmentation result.
[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not limiting. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the purpose and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A semi-supervised medical image segmentation method based on convolutional neural network, characterized by: The following steps are involved: S1. Preprocessing the sample medical image: Correcting the sample medical image from different resolutions to the same set resolution; S2. Construct a semi-supervised convolutional neural network, where the semi-supervised convolutional neural network consists of a segmentation network and a reconstruction network. The segmentation network consists of a feature extraction encoder with coordinate and attention mechanisms and a segmentation decoder. The reconstruction network consists of a feature extraction encoder with coordinate and attention mechanisms, a reconstruction decoder, and a sharpening module. The segmentation network and the reconstruction network share the same feature extraction encoder with coordinate and attention mechanisms. S3. The feature extraction encoder performs feature extraction on the preprocessed medical image and outputs a feature map; S4. The segmentation decoder performs segmentation processing on the feature map to obtain segmented image information consistent with the resolution of the preprocessed medical image; S5. The reconstruction decoder reconstructs the feature map to obtain reconstructed image information consistent with the resolution of the preprocessed medical image, and the sharpening module sharpens the reconstructed image information; S6. Alternately train the segmentation network and the reconstruction network until the training is completed; S7. Process the medical image acquired in real time through steps S1-S3 and output the final medical segmentation image.
2. The semi-supervised medical image segmentation method based on convolutional neural network according to claim 1, characterized in that: In step S2, feature map extraction specifically includes: S31. The preprocessed medical image is processed by convolution, batch normalization and ReLU activation function, and then global average pooling is performed to obtain image data D1; S32. The image data D1 is subjected to the operation of step S31 again to obtain image data D2; S33. The image data D2 is input into the feature extraction encoder to obtain a feature map C1; S34. Execute the process of step S31 on the feature map C1 to obtain the feature map C2, and execute the process of step S31 on the feature map C2 to obtain the feature map C3; S35. Execute the process of step S31 on the feature map C3, and then perform bilinear interpolation upsampling to obtain the feature map C4; S36. Perform step S35 three times on the feature map C4 to obtain a feature map C5; S37. Process the feature map C5 through the Sigmoid function to obtain the final feature map.
3. The semi-supervised medical image segmentation method based on convolutional neural network according to claim 1, characterized in that: In step S4, the sharpening module performs sharpening in the following manner: w∈[1:W],T∈(0,1) Where: R u is the output of the reconstruction decoder, h, w, c represent the length, height and color channel of the reconstructed image respectively, T is a set constant, and K represents the number of channels of the reconstruction network.
4. The semi-supervised medical image segmentation method based on convolutional neural network according to claim 1, characterized in that: The alternating training of the segmentation network and the reconstruction network specifically includes: Divide sample medical images into labeled images and unlabeled images; Labeled images and unlabeled images are alternately input into the semi-supervised convolutional neural network and the semi-supervised convolutional neural network is trained.
5. The semi-supervised medical image segmentation method based on convolutional neural network according to claim 4, characterized in that: The segmentation network is trained using the following loss function: L S =λL Dice +(1-λ)L BCE Among them, L S is the loss of the segmentation network, λ is the setting coefficient; Where: N is the total number of samples, y represents the true label, Represents the output of the segmentation network after processing the labeled image.
6. The semi-supervised medical image segmentation method based on convolutional neural network according to claim 5, characterized in that: The reconstruction network is trained using the following loss function: L R is the loss of the reconstruction network, x is the input unlabeled image, represents the unlabeled data output of the segmentation network, represents the output of the reconstruction network, and ⊙ is the Hadamard product.