Transform-based retinal vessel segmentation method

By combining the Transformer and UNet++ models, using the Transformer convolution block and the residual CBAM attention mechanism, the problem of insufficient segmentation accuracy in retinal blood vessel segmentation is solved, and higher segmentation precision and accuracy are achieved.

CN118735936APending Publication Date: 2024-10-01GUILIN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310316154.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-28
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing retinal blood vessel segmentation methods have challenges in fine segmentation tasks, especially because the retinal blood vessels have many details and irregular shapes, resulting in insufficient segmentation accuracy.

Method used

Combining the Transformer and UNet++ models, by designing the Transformer convolution block and introducing the residual CBAM attention mechanism, the feature extraction capability of the model is improved, and semantic information and global context information are integrated in the skip connection stage to improve the retinal blood vessel segmentation method.

Benefits of technology

The segmentation effect of small blood vessels has been significantly improved, and the segmentation precision and accuracy have been improved. The model's evaluation indicators on the test set have reached a high level, such as accuracy, sensitivity and F1 value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118735936A_ABST
    Figure CN118735936A_ABST
Patent Text Reader

Abstract

The invention provides a retinal blood vessel segmentation method based on Transform. The method comprises the following steps: acquiring a public data set, dividing the data set into a training set and a test set, and preprocessing and amplifying the data set at the same time; a UNet + + structure is used as a basic segmentation structure, a Transform convolution block is designed, the Transform convolution block is used for replacing a traditional convolution block to improve the capability of model feature extraction, a residual CBAM attention mechanism is introduced in a jump connection stage, and semantic information and global context information are better fused. And establishing a retinal vessel segmentation model through a PyTorch deep learning framework, putting the preprocessed data set into the established retinal vessel segmentation model for training, and storing optimal parameters to segment a test set to obtain a final segmentation image. According to the method, the DRIVE data set is used for verifying the effectiveness of the proposed network on retinal vessel segmentation, and the method has better segmentation performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of medical image processing and deep learning, and in particular to a Transformer-based retinal blood vessel segmentation method. Background Art

[0002] Eyes are one of the most important organs for the human body to receive and perceive external information. They are an important source of information for humans to obtain intuitively. They play an irreplaceable role in people's daily life, study, and work. Therefore, the health of the eyes is of vital importance. The retina is one of the most important components of the eye. Studies have shown that in addition to the lesions caused by retinal diseases themselves, most ophthalmic diseases are accompanied by retinal lesions. At the same time, retinal lesions are closely related to some common diseases such as diabetes and hypertension. Retinal blood vessels are the only blood vessels in the human body that can be directly observed without trauma. Some of their physical characteristics, such as width, length, curvature, and fine blood vessel curvature, are very beneficial for the screening, diagnosis, and treatment of various ophthalmic and cardiovascular and cerebrovascular diseases. Therefore, the study and analysis of the retinal fundus vascular structure is of great significance in helping doctors make clinical diagnoses.

[0003] In recent years, with the continuous rise of artificial intelligence, people have begun to use deep learning technology to replace traditional image processing technology, and have achieved good results. The solutions to many problems have been improved to varying degrees. UNet is a very popular deep learning framework in the field of semantic segmentation for biomedical applications, but it still has certain challenges for fine segmentation tasks such as retinal blood vessels. U-Net++ adds dense jump connections on the basis of UNet, reduces the semantic gap between the encoder and the decoder, and has better performance in the task of retinal blood vessel segmentation. In recent years, many studies have applied Transformer to medical semantic segmentation, and combined Transformer with CNN to obtain better segmentation effects, in which CNN is used to extract shallow information and Transformer is used to extract deep information. Since retinal blood vessels have more details and irregular shapes, in order to improve the segmentation accuracy, the present invention proposes a retinal segmentation model combining Transformer and UNet++. Summary of the invention

[0004] The purpose of the present invention is to provide a Transformer-based retinal blood vessel segmentation method, which can achieve better segmentation effect of small blood vessels by improving the feature extraction capability of deep networks.

[0005] like Figure 1 As shown, in order to achieve the above purpose, the technical solution adopted by the present invention includes the following steps:

[0006] S1. Obtain the public retinal vascular dataset DRIVE dataset.

[0007] S2. Divide the public retinal vascular dataset DRIVE dataset into 20 images as training sets and 20 images as test sets.

[0008] S3. Perform data preprocessing on the DRIVE dataset to improve image contrast and lay the foundation for further retinal vessel segmentation.

[0009] S4. Amplify the preprocessed data set.

[0010] S5. Design the Transformer convolution block and use it to replace the traditional convolution block to improve the model's feature extraction capability.

[0011] S6. Introduce the residual CBAM attention mechanism in the skip connection stage to better integrate semantic information and global context information.

[0012] S7. Use the PyTorch deep learning framework to build a retinal blood vessel segmentation model.

[0013] S8. Put the preprocessed dataset into the constructed retinal vessel segmentation model for training.

[0014] S9. Train the model to obtain the best training parameters, and input the test set into the trained model for training to obtain the final segmentation map.

[0015] S10. By comparing the manually segmented retinal vascular images, a series of evaluation indicators are calculated. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 Flowchart of the embodiment of the present invention

[0017] Figure 2 For DRIVE dataset example

[0018] Figure 3 Schematic diagram of RGB image channel separation of the original dataset

[0019] Figure 4 The CBAM module structure diagram of the present invention is

[0020] Figure 5 This is the residual CBAM attention module structure diagram of the present invention

[0021] Figure 6 is the patch segmentation map of the present invention

[0022] Figure 7 The final segmentation diagram of the present invention DETAILED DESCRIPTION

[0023] The drawings are for illustrative purposes only;

[0024] In order to better illustrate this example, some parts in the drawings may be omitted, enlarged or reduced, and may not represent the size of the actual product.

[0025] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and examples, but the present invention is not limited to these embodiments.

[0026] As attached Figure 1 As shown, the retinal blood vessel segmentation method based on Transformer of the present invention comprises the following steps:

[0027] S1. Obtain the public retinal vascular dataset DRIVE dataset, for example Figure 2 shown.

[0028] S2. Divide the public retinal vascular dataset DRIVE dataset into 20 images as training sets and 20 images as test sets.

[0029] S3. Perform data preprocessing on the DRIVE dataset to improve image contrast and lay the foundation for further retinal blood vessel segmentation. Perform three-channel separation on the original dataset RGB color image. For example, Figure 3 As shown in the figure, by comparison, it is found that the green channel image can most clearly show the blood vessel texture, so the green channel image is selected for later image processing. The green channel image is processed using limited contrast adaptive histogram equalization to enhance the edge clarity of the blood vessels. Local adaptive gamma correction is used to further improve the image effect.

[0030] S4. Amplify the preprocessed data set. Since the DRIVE data set is small in size, the data set is amplified to avoid overfitting. Since the retinal vascular images and the images manually segmented by experts need to be input into the model together, the same data amplification is performed on the two to maintain data consistency. The present invention uses random flipping, translation and other methods to amplify the data set.

[0031] S5. Design the Transformer convolution block and use the Transformer convolution block to replace the traditional convolution block to improve the model's feature extraction capabilities. Combine the W-MSA structure in the Swin Transformer with the convolution block, and add the convolution block after the W-MSA structure. The Transformer structure can be well combined with CNN, making the traditional CNN more effective. W-MSA divides each image into 4*4 patches through the sliding window operation. Figure 4As shown in the figure, 49 patches are grouped into a window, and then MSA is applied to each window. Finally, the results obtained from each window are reassembled into a complete output feature map. The W-MSA structure is connected to the convolution block to form a Transformer convolution block. Not only can the Transformer be used to obtain global features, but also CNN can be used to obtain local features.

[0032] S6. Introduce the residual CBAM attention mechanism in the jump connection stage to better integrate semantic information and global context information. Design the residual block and CBAM attention mechanism to integrate into the jump connection of UNet++. In the decoding stage of UNet++, upsampling is used to restore detail information, but upsampling will cause edge blur and loss of detail information. The residual CBAM attention block can effectively solve this problem. The CBAM module combines the channel attention module (CAM) and the spatial attention module (SAM), such as Figure 5 As shown, feature information is extracted in both the channel and space dimensions, and these two feature information are multiplied with the original input image features to output the final feature map, which greatly enhances the image feature extraction capability and can be used to improve the accuracy of retinal image segmentation. The use of the residual module can deepen the depth of the UNet++ network and extract more features of retinal blood vessels. At the same time, it can also effectively solve the problem of increased training difficulty caused by the deepening of the network depth. As a lightweight module, the CBAM attention module increases the vascular weight coefficient in both the channel and space dimensions, focuses on learning the features of the retinal vascular area, and reduces the learning of the background area. The present invention combines the CBAM module with the residual block, and adds it to each BasicBlock block in a sequential manner, that is, the input feature first passes through the BasicBlock block in the residual block, and the output feature is used as the input feature of the CBAM module. The structure is as follows Figure 6 shown.

[0033] S7. Put the preprocessed data set into the built retinal blood vessel segmentation model for training. The experiment was run on the Pycharm platform, python version 3.8, and the framework used was Pytorch. In the training phase, the learning rate was set to 0.0005, the batch size (batch_size) was set to 64, and the number of epochs was set to 30. In each round of iterative training, 85% of the training set was selected for training, and the remaining 15% was used as a validation set.

[0034] S8. Train the model to obtain the best training parameters, and input the test set into the trained model for training to obtain the final segmentation map.

[0035] S9. Compare the manually segmented retinal vascular images and calculate a series of evaluation indicators. The purpose of retinal vascular segmentation for the DRIVE dataset is to effectively classify the vascular part pixels and non-vascular part pixels of the retina. Among them, the vascular part pixels are called positive classes, and the non-vascular part (background) pixels are called negative classes. By comparing the segmentation results of the model on the test set with the manual segmentation results, the confusion matrix can be obtained as shown in Table 1. The results of correctly predicting the vascular pixels are recorded as true positives (TP, True Positive), and the results of incorrectly predicting the vascular pixels are recorded as false positives (FP, False Positive).

[0036] Table 1 Confusion matrix

[0037]

[0038] Several evaluation indicators commonly used in the field of medical image processing are selected to quantitatively analyze the results of retinal vessel segmentation: Accuracy (Acc), Sensitivity (Se), Specificity (Sp), Precision (Precision), F1-Score (F1) and AUC. The calculation formulas of related indicators are shown in the following formulas (1) to (5):

[0039] Acc=TP+TN / TP+FP+TN+FN (1)

[0040] Se=TP / TP+FN (2)

[0041] Sp=TN / TN+FP (3)

[0042] Pre=TP / TP+FP (4)

[0043] F1=2×Pre×SE / Pre+SE (5)

[0044] The retinal blood vessel segmentation method based on the improved UNet++ network has an Acc of 0.9578, Sp of 0.7980, Se of 0.9756, and F1 value of 0.8152 on the test set. The specific segmentation results are shown in the following example. Figure 7 As shown in the figure, the model has a good segmentation effect and performs well in segmentation accuracy and segmentation details.

[0045] The above is a detailed description of the Transformer-based retinal vessel segmentation method provided by the present invention, but the scope of the present invention is not limited thereto. Various changes to the above examples are within the scope of the present invention without departing from the scope of protection defined by the attached claims.

Claims

1. A Transformer-based retinal vessel segmentation method, characterized in that: The method comprises the following steps: S1. Obtain the public retinal vascular dataset DRIVE dataset; S2. Divide the public retinal vascular dataset DRIVE dataset into 20 images as training set and 20 images as test set at random; S3, preprocess the DRIVE dataset to improve image contrast and lay the foundation for further retinal blood vessel segmentation; S4, amplifying the preprocessed data set; S5. Design the Transformer convolution block and use it to replace the traditional convolution block to improve the model feature extraction capability. S6. Introduce the residual CBAM attention mechanism in the skip connection stage to better integrate semantic information and global context information; S7. Use the PyTorch deep learning framework to build a retinal blood vessel segmentation model; S8. Put the preprocessed data set into the constructed retinal blood vessel segmentation model for training; S9, train the model to obtain the best training parameters, and input the test set into the trained model for training to obtain the final segmentation map; S10. By comparing the manually segmented retinal vascular images, a series of evaluation indicators are calculated.