A retinal blood vessel image segmentation method, device, storage medium and equipment
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF INFORMATION SCI & TECH
- Filing Date
- 2026-04-07
- Publication Date
- 2026-07-03
AI Technical Summary
Existing retinal vessel segmentation methods cannot effectively model the topological structure of blood vessels, resulting in vessel discontinuities and missed detections, and they cannot simultaneously extract vascular features at different scales.
Employing an encoder and decoder structure, and combining topological feature optimization, local and global feature optimization, and multi-scale feature fusion, this approach enhances the accuracy of vascular topological feature extraction and segmentation by using a residual multi-directional convolutional attention enhancement module and a multi-view adaptive Inception module, along with a multi-scale attention fusion module and a dual attention collaborative fusion module.
It improves the modeling effect of vascular topology, reduces the risk of vascular discontinuity and missed detection in segmentation results, and achieves accurate extraction of vascular details at different scales.
Smart Images

Figure CN122335877A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method, apparatus, storage medium, and device for retinal vessel image segmentation, belonging to the field of image segmentation technology. Background Technology
[0002] The morphological characteristics of retinal vessels, such as diameter, curvature, and width, have become important diagnostic criteria for chronic diseases like diabetes and hypertension. Early identification of vascular structural changes is crucial for the intervention and treatment of these diseases. Traditionally, vascular structural changes are assessed manually by physicians through segmentation. However, this process is time-consuming, highly dependent on the physician's expertise and clinical experience, and inherently subjective. The accuracy of the annotation results can affect disease diagnosis and subsequent treatment.
[0003] In recent years, deep learning has driven the rapid development of retinal vessel segmentation. Among them, U-Net, with its excellent performance, has been widely used in retinal vessel segmentation tasks. With continuous development, many researchers have built more complex or more targeted variant networks based on U-Net. Retinal vessel structures exhibit arbitrary bending, bifurcation, and interweaving characteristics, with significant directional continuity. However, the U-Net encoder uses traditional convolutional kernels, such as the standard 3×3 convolution, to extract vessel information. It homogenizes vessels with different orientations, such as horizontal, vertical, and inclined vessels. This isotropic feature extraction method ignores the continuous spatial distribution of vessels along specific directions, resulting in different segments of the same vessel structure being modeled in isolation. This fragments the originally connected vascular network, breaking the trunk and branches, and truncating long vessels, thus disrupting the global topology of the vessels, leading to disconnected vessels and missed detections. In addition, due to blurred vessel edges and low local contrast, the model easily ignores key structural information. To address this challenge, many studies have introduced multi-scale mechanisms to capture multi-level semantic features using convolutional kernels of different sizes, thereby enhancing the perception of both main and small blood vessels. For example, Liu et al. proposed a lightweight retinal vessel segmentation network, Wave-Net, which introduces a lightweight multi-scale feature fusion module. By weighted fusion of feature maps from different levels of the decoder, it effectively integrates detailed high-resolution features with semantically stronger low-resolution features and improves skip connections. It employs a dual-path structure of detail enhancement and feature denoising to achieve accurate segmentation of vessels of different thicknesses and improve the detection capability of small blood vessels. Shi et al. proposed a multi-scale dense network, MD-Net, which introduces a residual void spatial pyramid pooling structure in the encoder to extract vascular features at multiple scales. It uses a dense multi-level fusion mechanism to enhance and reconstruct skip connections and introduces an SE attention mechanism to improve feature representation, effectively achieving the extraction of small blood vessels. Fine-grained features can be obtained through multi-scale methods, but traditional methods usually extract multi-scale features on a single-resolution input by adjusting the kernel size and hole rate. The signal-to-noise ratio of thick and thin blood vessels is different, but the extraction method is the same, which cannot effectively extract thick and thin blood vessels at the same time, resulting in the rupture of thick blood vessels and the missed detection of thin blood vessels.
[0004] In summary, current retinal vessel segmentation methods still suffer from problems such as the inability to effectively model the vessel topology and the inability to simultaneously extract vessels of different scales, leading to vessel discontinuities and missed detections. Summary of the Invention
[0005] The purpose of this invention is to provide a method, apparatus, storage medium, and device for retinal vessel image segmentation, which solves the problems of poor vascular topology modeling, discontinuous vessels, and missed detections in the segmentation results when segmenting retinal vessel images in the prior art.
[0006] To achieve the above objectives, the present invention employs the following technical solution: In a first aspect, the present invention provides a method for retinal vessel image segmentation, comprising: Acquire retinal vessel images; The retinal vessel image is input into a trained retinal vessel segmentation model, which includes an encoder, a bottleneck layer, and a decoder. The encoder comprises a first encoding unit, a second encoding unit, a third encoding unit, and a fourth encoding unit connected in sequence: The first coding unit is used to extract features, optimize topological features, and compress space in retinal vascular images to obtain a first feature map; The second encoding unit is used to perform feature extraction, topological feature optimization, and spatial compression on the first feature map to obtain the second feature map. The third coding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the second feature map to obtain the third feature map. The fourth encoding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the third feature map to obtain the fourth feature map; The bottleneck layer is used to extract features and optimize topological features from the fourth feature map and then transmit them to the decoder. The decoder includes a first decoding unit, a second decoding unit, a third decoding unit, and a fourth decoding unit connected in sequence. The decoder realizes the step-by-step feature recovery and fusion of the fourth feature map through each decoding unit to obtain the retinal vessel segmentation map.
[0007] Furthermore, the topological feature optimization is achieved through a residual multi-directional convolutional attention enhancement module, which enhances the input feature map. Perform the following operations to achieve topology feature optimization: Input feature map Channel transformation and compression are performed using 1×1 convolution to obtain the compressed feature map. ; The compressed feature map By performing strip convolutions in multiple directions, a corresponding number of directional feature maps are obtained; All directional feature maps are concatenated along the channel dimension to obtain a concatenated feature map. The concatenated feature map is input into a 3×3 depth separable convolution to obtain a separable feature map; The separable feature map is input into the ECA attention module to obtain the ECA feature map; The ECA feature map is input into the SA attention module to obtain the SA feature map; The SA feature map is then processed through a 1×1 convolution to restore the number of channels to the same level as the input feature map. The same number of samples are processed using batch normalization and ReLU activation to obtain the transformed feature maps. ; Input feature map and the transformed feature map Perform residual connections to obtain feature maps and output them.
[0008] This invention processes the input feature map through the first convolutional block. The processing can reduce the computational cost of subsequent multi-directional strip convolution; the design of multi-directional strip convolution to adapt to the multi-directionality of blood vessels, taking into account the continuous distribution of blood vessels in space along specific directions, can improve the accuracy of blood vessel topology feature extraction; by learning spatial relationships in the directional dimension through separable convolution, channel importance and spatial saliency are captured sequentially through ECA attention module and SA attention module, and finally residual connection is used to prevent the loss of detail information, thereby improving the accuracy of blood vessel topology feature extraction.
[0009] Furthermore, the compressed feature map By performing strip convolutions in multiple directions, a corresponding number of directional feature maps are obtained, using the following formula: ; ; in, This indicates that the angle between the horizontal and the vertical directions is... The directional feature map output after strip convolution in the direction is located at... The value, It is the row index along the vertical axis. It is the column index in the horizontal direction. The angle between the strip convolution and the horizontal direction is . The offset steps when sampling in the direction of , express The preset upper limit, x This represents the pixel value at the corresponding coordinate in the feature map. This represents the rounding function. Indicates the direction vector at The amount, Indicates the scaling factor. This represents the component of the direction vector along the column dimension. This represents the learnable one-dimensional convolutional kernel weights. ∣∣ represents taking the maximum value, and ∣∣ represents taking the absolute value.
[0010] This invention designs strip convolutions in multiple directions to adapt to the multidirectional nature of blood vessels, taking into account the continuous spatial distribution of blood vessels along specific directions, thereby improving the accuracy of extracting vascular topological features.
[0011] Furthermore, the local and global feature optimization includes parallel local and global feature optimization, as well as a fusion step for combining the results of local and global feature optimization. Through parallel local and global feature optimization, and the fusion step, thick and thin blood vessels and their local information can be effectively extracted, reducing the risk of discontinuities and missed detections in the segmentation results.
[0012] Furthermore, the local feature optimization is achieved through a multi-view adaptive Inception module, which outputs feature maps to the residual multi-directional convolutional attention enhancement module. Perform the following operations to achieve local feature optimization: The feature map output by the residual multi-directional convolutional attention enhancement module Magnify and reduce the size by a factor of 2 to obtain magnified and reduced feature maps, respectively. The residual multi-directional convolutional attention enhancement module outputs the feature map. The magnified and reduced feature maps are respectively input into the multi-scale attention fusion module to obtain the original multi-scale feature map, the magnified multi-scale feature map, and the reduced multi-scale feature map. The multi-scale attention fusion module is obtained by improving the Inception V1 module as follows: the 5×5 convolution is improved into a 3×3 dilated convolution, and after the concatenation operation, a 1×1 convolution, an ECA attention module, and a residual connection are added in sequence. The original multi-scale feature map is processed by restoring the number of channels and spatial size to obtain the feature map with the original size. The number of channels and spatial size of the enlarged multi-scale feature map are restored to obtain the enlarged feature map. The number of channels and spatial size of the reduced multi-scale feature map are restored to obtain the reduced-size feature map. ; Feature map after processing of original size After performing global average pooling and global max pooling respectively, concatenation, 1×1 convolution, and... The activation function is used to obtain the original channel weights; Feature map after enlargement After performing global average pooling and global max pooling respectively, concatenation, 1×1 convolution, and... The activation function is used to process the amplification channel weights. Feature map after size reduction After performing global average pooling and global max pooling respectively, concatenation, 1×1 convolution, and... The activation function is used to reduce the channel weights. The reduced channel weights, original channel weights, and amplified channel weights are concatenated to obtain the superimposed weights. These superimposed weights are then normalized and redistributed to obtain the processed reduced channel weights. Processed original channel weights and the weights of the amplified channels after processing ; Reduced channel weights after processing and the feature map after size reduction Processed original channel weights Feature maps after processing the original size and the processed amplified channel weights and the feature map after enlargement. The three feature maps are multiplied separately, summed, and then convolved with the residual multi-directional convolution attention enhancement module to output the feature map. Perform residual connections to obtain the output feature map.
[0013] This invention enhances the output feature map of the residual multi-directional convolutional attention module. Feature maps were obtained from three perspectives by magnifying and reducing the image by a factor of 2. Magnifying the feature map enlarges the edges of blurred fine blood vessels, making them easier for the model to focus on, thus improving the model's ability to distinguish fine blood vessels. Reducing the feature map improves the contrast of thick blood vessels in the whole image, which is more conducive to extracting the overall structure of thick blood vessels. The original perspective feature maps are used to preserve the original information. Feature enhancement is achieved by fusing the features using a multi-scale attention fusion module based on the Inception V1 module. The number of channels and spatial size are restored to facilitate subsequent operations. After global average pooling and global max pooling, the features are concatenated, followed by 1×1 convolution and... The activation function is used to process the three weights, which are then concatenated and redistributed. The redistributed weights are then multiplied with the corresponding feature maps to achieve channel-selective enhancement. Through the above series of adaptive weighted fusion mechanisms, multi-scale information from different perspectives can be effectively fused. In summary, the multi-view adaptive Inception module can be used to specifically capture local information of blood vessels of different sizes.
[0014] Furthermore, the fusion of local feature optimization results and global feature optimization results is achieved through a dual-attention collaborative fusion module; The local feature optimization result is the feature map output by the multi-view adaptive Inception module. The global feature optimization result is the feature map output by the VSS Block module. The VSS Block module is used to implement the global feature optimization; The dual-attention collaborative fusion module outputs feature maps to the multi-view adaptive Inception module. and the VSS Block module output feature map Perform the following operations to fuse the results of local feature optimization and global feature optimization: The feature map output by the multi-view adaptive Inception module and the VSS Block module output feature map By concatenating the features along the channel dimension, a joint feature map is obtained. ; joint feature map Global average pooling, 1×1 convolution, and so on are performed sequentially. Activation function processing, 1×1 convolution and Activation function processing yields channel attention weights. ; Channel attention weights joint feature map Weighting is performed to obtain the channel attention feature map. ; Channel attention feature maps in the channel dimension It is split into feature maps after processing the feature maps output by the multi-view adaptive Inception module. and the feature map after processing the output feature map of the VSS Block module. Calculate the feature map after processing the feature map output by the multi-view adaptive Inception module. and the feature map after processing the output feature map of the VSS Block module. Difference feature diagram between ; Differential feature map Perform 3×3 convolution, batch normalization, Activation function processing, 1×1 convolution and Activation function processing yields spatial attention weights. ; Spatial attention weights Differential feature map Weighting is performed to obtain the spatial attention feature map. ; Spatial attention feature map Perform 3×3 convolution, batch normalization, and... The activation function is used to process the fused feature map, which is then output.
[0015] This invention captures long-distance dependencies through the VSS Block module and uses a dual-attention collaborative fusion module to fuse local feature optimization results and global feature optimization results, achieving complementary fusion of these two results. This enables both local and global feature optimization, resulting in more accurate segmentation results.
[0016] Furthermore, the expression for the loss function used during training of the retinal vessel segmentation model is as follows: ; ; ; ; in, Indicates the total loss. This indicates Dice's loss. Indicates the first weighted adjustment factor. Indicates the weighted average loss (Bce). This represents the second weighted adjustment factor. Indicates Focal loss. This represents the number of pixels in the image input to the retinal vessel segmentation model. Indicates the weight of blood vessel categories. Indicates the first The actual value of each pixel. Represents the logarithmic function with base 10. Indicates the first The predicted value of each pixel. Indicates the background category weight. Indicates the number of background pixels. This indicates the number of pixels in the blood vessel.
[0017] This invention alleviates the severe imbalance between foreground and background by introducing a weighted Bce loss. By assigning higher weights to blood vessel pixels, it calculates the difference between the predicted probability and the ground truth label, thereby improving the learning effect of blood vessel pixels and enhancing the accuracy of pixel-by-pixel prediction. The invention also introduces Dice loss to measure the overlap between the predicted and ground truth regions, evaluating their similarity in overall structure and effectively compensating for the shortcomings of binary cross-entropy loss, which only focuses on single-pixel prediction, significantly improving the ability to capture blood vessel morphology and structure. Finally, the invention introduces Focal loss to focus on hard-to-classify samples, improving the segmentation accuracy of small blood vessels and boundary regions. The combination of these three losses takes into account both global and local features, effectively improving the model's performance in retinal vessel segmentation tasks.
[0018] In a second aspect, the present invention provides a retinal vessel image segmentation apparatus, comprising: The image acquisition module is configured to acquire retinal vessel images; The image segmentation module is configured to input retinal vessel images into a trained retinal vessel segmentation model, which includes an encoder, a bottleneck layer, and a decoder. The encoder comprises a first encoding unit, a second encoding unit, a third encoding unit, and a fourth encoding unit connected in sequence: The first coding unit is used to extract features, optimize topological features, and compress space in retinal vascular images to obtain a first feature map; The second encoding unit is used to perform feature extraction, topological feature optimization, and spatial compression on the first feature map to obtain the second feature map. The third coding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the second feature map to obtain the third feature map. The fourth encoding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the third feature map to obtain the fourth feature map; The bottleneck layer is used to extract features and optimize topological features from the fourth feature map and then transmit them to the decoder. The decoder includes a first decoding unit, a second decoding unit, a third decoding unit, and a fourth decoding unit connected in sequence. The decoder realizes the step-by-step feature recovery and fusion of the fourth feature map through each decoding unit to obtain the retinal vessel segmentation map.
[0019] Thirdly, the present invention provides a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the retinal vessel image segmentation method described in any one of the first aspects.
[0020] Fourthly, the present invention provides a computer device, comprising: Memory, used to store computer programs / instructions; A processor for executing the computer program / instructions to implement the steps of the retinal vessel image segmentation method described in any one of the first aspects.
[0021] Compared with the prior art, the beneficial effects achieved by the present invention are: This invention provides a retinal vessel image segmentation method, apparatus, storage medium, and device. By introducing topological feature optimization into the encoder, the modeling effect of the vessel topology is improved. By introducing local and global feature optimization into the encoder, the accurate extraction of vessel details at different scales to the global scale is achieved, reducing the risk of vessel discontinuity and missed detection in the segmentation results. Attached Figure Description
[0022] Figure 1 This is a flowchart of the retinal vessel segmentation model provided by the present invention for processing retinal vessel images. Figure 2 This is a schematic diagram of the construction of the retinal vessel segmentation model provided by the present invention; Figure 3 This is a schematic diagram of the structure of the VSS Block module provided by the present invention; Figure 4 This is a schematic diagram of the structure of the residual multi-directional convolutional attention enhancement module provided by the present invention; Figure 5 This is a schematic diagram of the structure of the multi-scale attention fusion module provided by the present invention; Figure 6 This is a schematic diagram of the construction of the multi-view adaptive Inception module provided by the present invention; Figure 7 This is a schematic diagram of the construction of the dual attention collaborative fusion module provided by the present invention. Detailed Implementation
[0023] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to illustrate the technical solution of the present invention more clearly, and should not be used to limit the scope of protection of the present invention.
[0024] Example 1
[0025] This embodiment provides a method for retinal vessel image segmentation, including: Acquire retinal vessel images; The retinal vessel image is input into a trained retinal vessel segmentation model, which includes an encoder, a bottleneck layer, and a decoder. The encoder comprises a first encoding unit, a second encoding unit, a third encoding unit, and a fourth encoding unit connected in sequence: The first coding unit is used to extract features, optimize topological features, and compress space in retinal vascular images to obtain a first feature map; The second encoding unit is used to perform feature extraction, topological feature optimization, and spatial compression on the first feature map to obtain the second feature map. The third coding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the second feature map to obtain the third feature map. The fourth encoding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the third feature map to obtain the fourth feature map; The bottleneck layer is used to extract features and optimize topological features from the fourth feature map and then transmit them to the decoder. The decoder includes a first decoding unit, a second decoding unit, a third decoding unit, and a fourth decoding unit connected in sequence. The decoder realizes the step-by-step feature recovery and fusion of the fourth feature map through each decoding unit to obtain the retinal vessel segmentation map.
[0026] This invention improves the modeling effect of vascular topology by introducing topological feature optimization into the encoder. By introducing local and global feature optimization into the encoder, it achieves accurate extraction of vascular details at different scales to the global level, reducing the risk of vascular discontinuity and missed detection in the segmentation results.
[0027] Example 2
[0028] This embodiment provides a method for retinal vessel image segmentation, including the following steps S1 and S2.
[0029] Step S1: Acquire retinal vessel images and perform preprocessing.
[0030] In this embodiment, the preprocessing includes grayscale processing, normalization processing, and contrast enhancement.
[0031] Grayscale processing specifically involves converting a color retinal vessel image into a grayscale retinal vessel image to enhance the contrast between the vessels and the background.
[0032] The normalization process involves normalizing the grayscale retinal vascular images to reduce the impact of differences in brightness and contrast.
[0033] The contrast enhancement specifically involves using contrast-limited adaptive histogram equalization to improve the local contrast between blood vessels and the background, and combining this with gamma correction to further improve the brightness of retinal vascular images, thereby enhancing the visibility of vascular structures.
[0034] Step S2: Input the retinal vessel image into the trained retinal vessel segmentation model to perform vessel segmentation and obtain the retinal vessel segmentation map.
[0035] The training strategy for the retinal vessel segmentation model is as follows: Obtain four datasets: DRIVE, STARE, CHASE_DB1, and HRF, and randomly split the datasets. For the DRIVE dataset, take 20 images for the training set and 20 images for the test set. For the STARE dataset, take 10 images for the training set and 10 images for the test set. For the CHASE_DB1 dataset, take 14 images for the training set and 14 images for the test set. For the HRF dataset, take 30 images for the training set and 15 images for the test set. The images in the training and test sets are preprocessed using the same method and step S1. To alleviate memory pressure, a patching strategy was adopted, randomly cropping several 64×64 pixel small patches from the preprocessed training images as training samples to train the retinal vessel segmentation model. The Adam optimizer was used to optimize the loss function, and an early stopping mechanism was adopted during training. If no optimal weights were saved for 10 consecutive rounds, training was stopped. The number of iteration rounds was set to 150, the initial learning rate was set to 0.0001, and the batch size for training was set to 16.
[0036] The expression for the loss function is: ; ; ; ; in, Indicates the total loss. This indicates Dice's loss. Indicates the first weighted adjustment factor. Indicates the weighted average loss (Bce). This represents the second weighted adjustment factor. Indicates Focal loss. This represents the number of pixels in the image input to the retinal vessel segmentation model. Indicates the weight of blood vessel categories. Indicates the first The actual value of each pixel. Represents the logarithmic function with base 10. Indicates the first The predicted value of each pixel. Indicates the background category weight. Indicates the number of background pixels. This indicates the number of pixels in the blood vessel.
[0037] like Figure 2As shown, after the retinal vessel image is input into the trained retinal vessel segmentation model, it undergoes a series of processing steps by the various modules in the retinal vessel segmentation model to output a retinal vessel segmentation map.
[0038] The retinal vessel segmentation model includes an encoder, a bottleneck layer, and a decoder: The encoder comprises a first encoding unit, a second encoding unit, a third encoding unit, and a fourth encoding unit connected in sequence: The first coding unit is used to extract features, optimize topological features, and compress space in retinal vascular images to obtain a first feature map; The second encoding unit is used to perform feature extraction, topological feature optimization, and spatial compression on the first feature map to obtain the second feature map. The third coding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the second feature map to obtain the third feature map. The fourth encoding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the third feature map to obtain the fourth feature map; The bottleneck layer is used to extract features and optimize topological features from the fourth feature map and then transmit them to the decoder. The decoder includes a first decoding unit, a second decoding unit, a third decoding unit, and a fourth decoding unit connected in sequence. The decoder realizes the step-by-step feature recovery and fusion of the fourth feature map through each decoding unit to obtain the retinal vessel segmentation map.
[0039] The preprocessed retinal vessel image is first input into the first coding unit, where feature extraction is performed by the convolutional block.
[0040] To achieve precise extraction of vascular topology, the feature map extracted from the first convolutional block of the first coding unit is input into the residual multi-directional convolutional attention enhancement module, whose architecture is as follows: Figure 4 As shown, the residual multi-directional convolutional attention enhancement module enhances the input feature map. Perform the following operations to achieve topology feature optimization: Step A01: Input feature map The input is fed into a 1×1 convolution, and the input feature map is processed by the 1×1 convolution. Channel transformation and compression are performed to reduce the computational cost of subsequent multi-directional strip convolution, resulting in a compressed feature map. ; Step A02: To accommodate the multidirectional nature of blood vessels, the compressed feature map is... Eight feature maps are obtained through strip convolution in eight directions; the angle between any two consecutive directions is 22.5°. On the discrete pixel grid, 22.5°, 67.5°, 112.5° and 157.5° cannot be accurately represented. A set of integer direction vectors is used to approximate these angles. (0,1), (1,2), (1,1), (2,1), (1,0), (2,-1), (1,-1), (1,-2) are used as direction vectors with angles of 0°, 22.5°, 45°, 67.5°, 90°, 112.5°, 135° and 157.5° with respect to the horizontal direction, respectively. The approximation error of 22.5°, 67.5°, 112.5° and 157.5° is 4.07°. Step A03: Concatenate the 8 directional feature maps along the channel dimension to obtain the concatenated feature map; Step A04: Input the stitched feature map into a 3×3 depthwise separable convolution to learn spatial relationships in the orientation dimension and obtain a separable feature map; Step A05: Input the separable feature map into the ECA attention module to capture channel importance and obtain the ECA feature map; Step A06: Input the ECA feature map into the SA attention module to capture spatial saliency and obtain the SA feature map; Step A07: Input the SA feature map into a 1×1 convolution to restore the number of channels to the sum of the feature map. The same number of samples are processed using batch normalization and ReLU activation to obtain the transformed feature maps. ; Step A08: Input feature map and the transformed feature map Perform residual connections to prevent the loss of detailed information, obtain feature maps, and output them.
[0041] Steps A03 to A08 can be represented by the following formula: ; ; in, Represents separable feature maps. This represents a 3×3 separable convolution. This indicates a splicing operation. This indicates that the angle between the horizontal direction and the horizontal direction is... The directional feature map is output after strip convolution in the direction of the directional area. This indicates that the angle between the horizontal direction and the horizontal direction is... The directional feature map is output after strip convolution in the direction of the directional area. This indicates that the angle between the horizontal direction and the horizontal direction is... The directional feature map is output after strip convolution in the direction of the directional area. This indicates that the angle between the horizontal direction and the horizontal direction is... The directional feature map is output after strip convolution in the direction of the directional area. This indicates that the angle between the horizontal direction and the horizontal direction is... The directional feature map is output after strip convolution in the direction of the directional area. This indicates that the angle between the horizontal direction and the horizontal direction is... The directional feature map is output after strip convolution in the direction of the directional area. This indicates that the angle between the horizontal direction and the horizontal direction is... The directional feature map is output after strip convolution in the direction of the directional area. This indicates that the angle between the horizontal direction and the horizontal direction is... The directional feature map is output after strip convolution in the direction of the directional area. This represents the output feature map of the residual multi-directional convolutional attention enhancement module. express Activation function Indicates batch normalization. Represents a 1×1 convolution. This indicates the SA attention module. This indicates the ECA attention module.
[0042] Among them, the compressed feature map Eight feature maps are obtained by strip convolution in eight directions, using the following formula: ; ; in, This indicates that the angle between the horizontal and the vertical directions is... The directional feature map output after strip convolution in the direction is located at... The value, It is the row index along the vertical axis. It is the column index in the horizontal direction. The angle between the strip convolution and the horizontal direction is . The offset steps when sampling in the direction of , express The preset upper limit, x This represents the pixel value at the corresponding coordinate in the feature map. This represents the rounding function. This represents the component of the direction vector in the row dimension. Indicates the scaling factor. This represents the component of the direction vector along the column dimension. This represents the learnable one-dimensional convolutional kernel weights. ∣∣ represents taking the maximum value, and ∣∣ represents taking the absolute value.
[0043] In the first encoding unit, the output feature map of the residual multi-directional convolutional attention enhancement module is downsampled to achieve spatial compression and obtain the first feature map.
[0044] The residual multi-directional convolutional attention enhancement module outputs a feature map that is also passed to an attention gating module. The gating module reweights the feature map to generate a skip connection feature map, which is then passed to the convolutional block of the fourth decoding unit in the decoder.
[0045] After obtaining the first feature map, it is input into the second encoding unit. The architecture of the second encoding unit is the same as that of the first encoding unit. In the second encoding unit, the first feature map is processed by performing the same operation on the input retinal blood vessel image as the first encoding unit, and the second feature map is output. Furthermore, the feature map output by the residual multi-directional convolutional attention enhancement module in the second encoding unit is also reweighted through an attention gate to generate a skip connection feature map, which is then transmitted to the convolutional block of the third decoding unit in the decoder.
[0046] After obtaining the second feature map, it is input into the third encoding unit. To effectively extract both thick and thin blood vessels and their local information simultaneously, a multi-view adaptive Inception module parallel to the VSS Block module is introduced into the third encoding unit. A dual-attention collaborative fusion module is also introduced to fuse the local feature optimization results and the global feature optimization results. The architecture of the VSS Block module is as follows: Figure 3 As shown.
[0047] In the third encoding unit, features are first extracted from the first feature map through convolutional blocks. The extracted feature map is then input into the residual multi-directional convolutional attention enhancement module, and a topological feature optimization is performed. The feature map output from the residual multi-directional convolutional attention enhancement module is then input into the parallel multi-view adaptive Inception module and VSSBlock module, respectively, for local and global feature optimization. The results of the local and global feature optimization are then input into the dual attention collaborative fusion module to obtain the fused feature map. Finally, spatial compression is achieved through downsampling to obtain the third feature map.
[0048] In the third coding unit, the output feature map of the residual multi-directional convolutional attention enhancement module is also reweighted through an attention gate to obtain a skip connection feature map, which is then transmitted to the convolutional block of the second decoding unit in the decoder.
[0049] like Figure 6As shown, the multi-view adaptive Inception module outputs feature maps to the residual multi-directional convolutional attention enhancement module. Perform the following operations to achieve local feature optimization: Step B01: Output feature maps from the residual multi-directional convolutional attention enhancement module. The magnified and reduced feature maps are obtained by magnifying and shrinking the feature map by a factor of 2. The magnified feature map can make the edges of the blurred fine blood vessels larger, making it easier for the model to pay attention to them, thereby improving the model's ability to distinguish fine blood vessels. The reduced feature map can improve the contrast of the thick blood vessels in the whole image, which is more conducive to extracting the overall structure of the thick blood vessels. The original view feature map is to preserve the original information. Step B02: Output feature map from the residual multi-directional convolutional attention enhancement module The magnified and reduced feature maps are respectively input into, for example,... Figure 5 The multi-scale attention fusion module shown yields the original multi-scale feature map, the magnified multi-scale feature map, and the reduced multi-scale feature map. The multi-scale attention fusion module is an improvement on the Inception V1 module as follows: the 5×5 convolution is improved to a 3×3 dilated convolution, reducing the number of parameters while maintaining the same receptive field. After the concatenation operation, a 1×1 convolution and an ECA attention module are added sequentially. The number of channels is changed through the 1×1 convolution, and the features are enhanced through the ECA attention module. Residual connections are used to prevent the loss of feature information. Step B03: To facilitate subsequent operations, restore the number of channels and spatial dimensions of the original multi-scale feature map to obtain the feature map after processing the original dimensions. The number of channels and spatial size of the enlarged multi-scale feature map are restored to obtain the enlarged feature map. The number of channels and spatial size of the reduced multi-scale feature map are restored to obtain the reduced-size feature map. This ensures that the number of channels and the size of the recovered feature map are consistent with those of the input feature map; Step B04: To effectively fuse multi-scale information from different perspectives, an adaptive weighted fusion mechanism was designed to process the feature map after processing the original size. After performing global average pooling and global max pooling respectively, concatenation, 1×1 convolution, and... The activation function is used to obtain the original channel weights; Step B05: To effectively fuse multi-scale information from different perspectives, an adaptive weighted fusion mechanism was designed to process the enlarged feature map. After performing global average pooling and global max pooling respectively, concatenation, 1×1 convolution, and... The activation function is used to process the amplification channel weights. Step B06: To effectively fuse multi-scale information from different perspectives, an adaptive weighted fusion mechanism was designed to process the reduced-size feature maps. After performing global average pooling and global max pooling respectively, concatenation, 1×1 convolution, and... The activation function is used to reduce the channel weights. Step B07: Concatenate the reduced channel weights, original channel weights, and amplified channel weights to obtain the superimposed weights. Normalize the superimposed weights using Softmax, and redistribute the weights to obtain the processed reduced channel weights. Processed original channel weights and the weights of the amplified channels after processing ; Step B08: Reduce the processed channel weights and the feature map after size reduction Processed original channel weights Feature maps after processing the original size and the processed amplified channel weights and the feature map after enlargement. The three feature maps are multiplied separately to achieve channel-selective enhancement. Then, the three feature maps obtained by multiplication are added together and a 1×1 convolution is performed to enhance the features. Stability is improved by residual connection to prevent information loss, and the output feature map is obtained.
[0050] Step B04 can be performed using the following formula: ; in, Indicates the original channel weights. express Activation function Represents a 1×1 convolution. This indicates a splicing operation. Indicates global average pooling. This indicates global max pooling.
[0051] Step B05 can be performed using the following formula: ; in, This indicates the weight of the amplified channel.
[0052] Step B06 can be performed using the following formula: ; in, This indicates reducing the channel weight. express Activation function Represents a 1×1 convolution. This indicates a splicing operation. Indicates global average pooling. This indicates global max pooling.
[0053] Step B07 can be performed using the following formula: .
[0054] in, , , These represent the processed reduced channel weights, the processed original channel weights, and the processed amplified channel weights, respectively. Softmax ()express Softmax Activation function This represents the feature map after being scaled down. Indicates the original channel weights. This represents the feature map after processing the original dimensions. This indicates the amplification of channel weights. This represents the feature map after being enlarged.
[0055] Step B08 can be performed using the following formula: ; in, This represents the feature map output by the multi-view adaptive Inception module. This represents the feature map output by the residual multi-directional convolutional attention enhancement module.
[0056] The multi-view adaptive Inception module can capture local information of blood vessels of different sizes, but it is insufficient in modeling long-distance dependencies, which can easily lead to the separation of branches from the main trunk. While the VSS Block can capture long-distance dependencies, it is insufficient in capturing detailed information. Therefore, in this embodiment, the multi-view adaptive Inception module is used as a parallel branch of the VSS Block, and a dual attention collaborative fusion module is used to perform complementary fusion of the two features.
[0057] like Figure 7 As shown, in the dual-attention collaborative fusion module, the feature map output by the VSS Block module is... and the feature map output by the multi-view adaptive Inception module The features are concatenated along the channel dimension to form a joint feature map. The importance of different feature channels is dynamically adjusted through a channel attention mechanism. This channel attention mechanism uses global average pooling to obtain a global semantic description, first passing through two 1×1 convolutional layers for dimensionality reduction and then dimensionality increase, and then... SigmoidGenerate channel attention weights Finally, channel weights are used to... Weighted summaries yield channel attention feature maps. The above steps can be performed using the following formula: ; ; .
[0058] in, This indicates a splicing operation. express Activation function Represents a 1×1 convolution. express Activation function.
[0059] like Figure 7 As shown, the channel attention feature map is divided into channels in the channel dimension. It is split into feature maps after processing the feature maps output by the multi-view adaptive Inception module. and the feature map after processing the output feature map of the VSS Block module. Calculate the feature map after processing the feature map output by the multi-view adaptive Inception module. and the feature map after processing the output feature map of the VSS Block module. Difference feature diagram between To highlight regions with inconsistent features, such as edges and low-contrast areas, and to further refine the fusion in the spatial dimension, spatial attention is achieved using differential features. Local contextual information of the differential features is extracted through 3×3 convolution, analyzing the spatial differences between the two features. Channel compression is then performed through 1×1 convolution to generate a single-channel spatial weight map. Sigmoid Obtain spatial attention weights Spatial attention weights We obtain the spatial attention feature map by weighting the difference feature map. The above process can be performed using the following formula: ; ; ; in, This represents the absolute value operation. Indicates batch normalization. This represents a 3×3 convolution.
[0060] like Figure 7As shown, to remove noise introduced by feature mismatch and obtain more robust and discriminative spatial features, a feature refinement module was designed. This module uses 3×3 convolution to extract local spatial context information, capture the detailed relationships between adjacent pixels, smooth noise during the fusion process, and further enhance the blood vessel edges and texture structure. Batch normalization improves the model's convergence speed and generalization ability. The ReLU activation function retains the positive responses of significant features and suppresses irrelevant regions, thereby enhancing the network's response to key blood vessel regions. The above process can be performed using the following formula: ; in, This represents the feature map output by the dual-attention collaborative fusion module. express Activation function Indicates batch normalization. This represents a 3×3 convolution. This is a spatial attention feature map.
[0061] After further downsampling, the third feature map is obtained.
[0062] After obtaining the third feature map, it is input into the fourth coding unit. The architecture of the fourth coding unit is the same as that of the third coding unit. In the fourth coding unit, the operation performed by the third coding unit on the input second feature map is performed on the third feature map, and the fourth feature map is output. Furthermore, the feature map output by the residual multi-directional convolutional attention enhancement module in the fourth coding unit is also reweighted through an attention gate to generate a skip connection feature map, which is then transmitted to the convolutional block of the first decoding unit in the decoder.
[0063] After obtaining the fourth feature map, it is fed into the bottleneck layer, where features are extracted through convolutional blocks. Topological feature optimization is performed through the residual multi-directional convolutional attention enhancement module. Then, the processed fourth feature map is upsampled and fed into the convolutional block of the first decoding unit of the decoder.
[0064] In the decoder, the spatial resolution is restored layer by layer by using bilinear interpolation to obtain upsampled feature maps through each level of decoding units. Attention gating is used to filter important regions in the corresponding level of coding units to obtain skip connection feature maps. Convolutional blocks are used to refine and fuse the upsampled feature maps and skip connection feature maps to extract higher-level semantic information, thereby realizing step-by-step feature restoration and fusion to obtain the final retinal vessel segmentation map.
[0065] To verify the beneficial effects of the present invention, comprehensive experiments were conducted on three retinal vessel segmentation datasets: DRIVE, STARE, and CHASE_DB1.
[0066] The DRIVE dataset, from a diabetic retinopathy screening project, contains 40 color retinal images, 20 for training and 20 for testing. Seven images show early diabetic lesions, and 33 are normal fundus images. The image resolution is 565×584 pixels. The test set of this dataset contains a gold standard annotation by two experts. This invention uniformly uses the annotation result of the first expert as the benchmark for evaluating model performance to ensure consistency in evaluation criteria. The STARE dataset contains 20 color retinal images, half of which show diabetic lesions. The image resolution is 700×605 pixels. The CHASE_DB1 dataset, from the eyes of 14 children, contains 28 color retinal images with a resolution of 999×960 pixels, the same as the DRIVE dataset. Each image in this dataset has two annotations; this invention uses the first annotation as the label. Half of each dataset is randomly selected as the training set and half as the test set.
[0067] This invention was conducted in a Linux operating system environment, using the Python programming language and the PyTorch framework to build the model. The main hardware configuration included an Intel(R) Xeon(R) Gold 6430 processor and an NVIDIA GeForce RTX 4090 graphics card. The algorithm of this invention is based on the PyTorch framework and built using the Python programming language. The experimental model was trained and tested on the VSCode platform. The experiment used the Adam optimizer to optimize the loss function. An early stopping mechanism was employed during training; if no optimal weights were saved for 10 consecutive epochs, training was stopped. The number of iterations was set to 150, the initial learning rate was set to 0.0001, and the batch size was set to 16.
[0068] To quantitatively analyze and evaluate the method of this invention, the present invention uses accuracy (ACC), sensitivity (SE), specificity (SP), F1 score (F1), and receiver operating characteristic (ROC) curve (AUC) to objectively evaluate the segmentation performance of retinal vessels. Accuracy represents the proportion of correctly classified pixels out of all pixels; sensitivity represents the proportion of correctly classified vessel pixels; specificity represents the proportion of correctly classified non-vessel pixels; the F1 score is a comprehensive indicator that considers recall and accuracy in imbalanced binary segmentation tasks, providing an overall assessment of model performance, with a value between 0 and 1. The ROC curve quantifies the model's ability to distinguish categories and is represented by the area under the ROC curve. This curve plots the true positive rate versus the false positive rate; the closer the AUC value is to 1, the better the model's segmentation performance. The ROC curve is the receiver operating characteristic curve.
[0069] To verify the effectiveness of the proposed method, it was compared with methods using various classic segmentation models, including UNet, UNet++, AttUNet, and DUNet. Experiments were conducted on three public datasets: DRIVE, STARE, and CHASE_DB1, and the performance of the proposed method was evaluated using the five evaluation metrics mentioned above. Tables 1, 2, and 3 show the performance comparison of each method on the DRIVE, STARE, and CHASE_DB1 datasets. Among these five models, the proposed method achieved optimal values for all five metrics on the DRIVE and CHASE_DB1 datasets. While DUNet had the best SP value on STARE, the proposed method improved its ACC, SE, F1, and AUC from 0.9627 / 0.7311 / 0.7973 / 0.9821 to 0.9728 / 0.8495 / 0.8542 / 0.9912. In summary, the proposed method outperforms other methods on these three datasets, validating its effectiveness in retinal vessel segmentation.
[0070] Table 1 - Comparison of experimental data on the DRIVE dataset
[0071] Table 2 - Comparison of experimental data on the STARE dataset
[0072] Table 3 - Comparison of experimental data on dataset CHASE_DB1
[0073] To verify the effectiveness of the proposed residual multi-directional convolutional attention enhancement module, multi-view adaptive Inception module, and dual attention collaborative fusion module, ablation experiments were conducted on the DRIVE dataset. The results are shown in Table 4. AttUNet and VSS Block were combined as the baseline network to evaluate the contribution of each module to the performance improvement.
[0074] Table 4 - Performance Comparison of Ablation Modules on the DRIVE Dataset
[0075] In Table 4, RMDCA is the residual multi-directional convolutional attention enhancement module, MVAI is the multi-view adaptive Inception module, and DACF is the dual attention collaborative fusion module.
[0076] Effectiveness of RMDCA: After adding RMDCA to the baseline, the SE index significantly improved from 79.85% to 82.35%. This indicates that RMDCA enhances the perception of vascular topology through multi-directional strip convolution, effectively capturing small vascular bifurcations in any direction and compensating for the feature loss caused by the isotropic nature of traditional convolution.
[0077] Effectiveness of MVAI: Adding MVAI to the "Baseline+RMDCA" model, this module further enhances the model's ability to capture features at different scales through multi-view attention ensemble. Experimental results show that both ACC and AUC steadily increase, demonstrating that MVAI enhances the model's discrimination accuracy for vascular signals in complex pathological backgrounds while maintaining background suppression.
[0078] Effectiveness of the DACF module: By incorporating DACF into the "Baseline+RMDCA+MVAI" model, the module acts as a hub connecting the global attention features extracted by MVAI and the deep spatial features extracted by the VSS Block module. Utilizing a squared difference perception mechanism, it accurately captures the information differences between the two types of features, achieving efficient integration. Experimental results show that, through DACF-guided feature fusion, the F1 score is ultimately improved to 84.55%, and the AUC reaches 98.86%. This strongly demonstrates that DACF can guide the model to keenly capture subtle differences in vessel edges during the fusion process, significantly enhancing the accuracy and topological coherence of the segmentation results.
[0079] Example 3
[0080] This embodiment provides a retinal vessel image segmentation device, including: The image acquisition module is configured to acquire retinal vessel images; The image segmentation module is configured to input retinal vessel images into a trained retinal vessel segmentation model, which includes an encoder, a bottleneck layer, and a decoder. The encoder comprises a first encoding unit, a second encoding unit, a third encoding unit, and a fourth encoding unit connected in sequence: The first coding unit is used to extract features, optimize topological features, and compress space in retinal vascular images to obtain a first feature map; The second encoding unit is used to perform feature extraction, topological feature optimization, and spatial compression on the first feature map to obtain the second feature map. The third coding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the second feature map to obtain the third feature map. The fourth encoding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the third feature map to obtain the fourth feature map; The bottleneck layer is used to extract features and optimize topological features from the fourth feature map and then transmit them to the decoder. The decoder includes a first decoding unit, a second decoding unit, a third decoding unit, and a fourth decoding unit connected in sequence. The decoder realizes the step-by-step feature recovery and fusion of the fourth feature map through each decoding unit to obtain the retinal vessel segmentation map.
[0081] Example 4
[0082] This embodiment provides a computer-readable storage medium storing a computer program / instructions thereon, characterized in that, when the computer program / instructions are executed by a processor, they implement the steps of the retinal vessel image segmentation method provided in Embodiment 1: Acquire retinal vessel images; The retinal vessel image is input into a trained retinal vessel segmentation model, which includes an encoder, a bottleneck layer, and a decoder. The encoder comprises a first encoding unit, a second encoding unit, a third encoding unit, and a fourth encoding unit connected in sequence: The first coding unit is used to extract features, optimize topological features, and compress space in retinal vascular images to obtain a first feature map; The second encoding unit is used to perform feature extraction, topological feature optimization, and spatial compression on the first feature map to obtain the second feature map. The third coding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the second feature map to obtain the third feature map. The fourth encoding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the third feature map to obtain the fourth feature map; The bottleneck layer is used to extract features and optimize topological features from the fourth feature map and then transmit them to the decoder. The decoder includes a first decoding unit, a second decoding unit, a third decoding unit, and a fourth decoding unit connected in sequence. The decoder realizes the step-by-step feature recovery and fusion of the fourth feature map through each decoding unit to obtain the retinal vessel segmentation map.
[0083] Example 5
[0084] This embodiment provides a computer device, including: Memory, used to store computer programs / instructions; A processor is configured to execute the computer program / instructions to implement the steps of the retinal vessel image segmentation method provided in Embodiment 1: Acquire retinal vessel images; The retinal vessel image is input into a trained retinal vessel segmentation model, which includes an encoder, a bottleneck layer, and a decoder. The encoder comprises a first encoding unit, a second encoding unit, a third encoding unit, and a fourth encoding unit connected in sequence: The first coding unit is used to extract features, optimize topological features, and compress space in retinal vascular images to obtain a first feature map; The second encoding unit is used to perform feature extraction, topological feature optimization, and spatial compression on the first feature map to obtain the second feature map. The third coding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the second feature map to obtain the third feature map. The fourth encoding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the third feature map to obtain the fourth feature map; The bottleneck layer is used to extract features and optimize topological features from the fourth feature map and then transmit them to the decoder. The decoder includes a first decoding unit, a second decoding unit, a third decoding unit, and a fourth decoding unit connected in sequence. The decoder realizes the step-by-step feature recovery and fusion of the fourth feature map through each decoding unit to obtain the retinal vessel segmentation map.
[0085] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0086] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0087] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0088] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0089] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A method for segmenting retinal blood vessel images, characterized in that, include: Acquire retinal vessel images; The retinal vessel image is input into a trained retinal vessel segmentation model, which includes an encoder, a bottleneck layer, and a decoder. The encoder comprises a first encoding unit, a second encoding unit, a third encoding unit, and a fourth encoding unit connected in sequence: The first coding unit is used to extract features, optimize topological features, and compress space in retinal vascular images to obtain a first feature map; The second encoding unit is used to perform feature extraction, topological feature optimization, and spatial compression on the first feature map to obtain the second feature map. The third coding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the second feature map to obtain the third feature map. The fourth encoding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the third feature map to obtain the fourth feature map; The bottleneck layer is used to extract features and optimize topological features from the fourth feature map and then transmit them to the decoder. The decoder includes a first decoding unit, a second decoding unit, a third decoding unit, and a fourth decoding unit connected in sequence. The decoder realizes the step-by-step feature recovery and fusion of the fourth feature map through each decoding unit to obtain the retinal vessel segmentation map.
2. The retinal vessel image segmentation method according to claim 1, characterized in that, The topological feature optimization is achieved through a residual multi-directional convolutional attention enhancement module, which enhances the input feature map. Perform the following operations to achieve topology feature optimization: Input feature map Channel transformation and compression are performed using 1×1 convolution to obtain the compressed feature map. ; The compressed feature map By performing strip convolutions in multiple directions, a corresponding number of directional feature maps are obtained; All directional feature maps are concatenated along the channel dimension to obtain a concatenated feature map. The concatenated feature map is input into a 3×3 depth separable convolution to obtain a separable feature map; The separable feature map is input into the ECA attention module to obtain the ECA feature map; The ECA feature map is input into the SA attention module to obtain the SA feature map; The SA feature map is then processed through a 1×1 convolution to restore the number of channels to the same level as the input feature map. The same number of samples are processed using batch normalization and ReLU activation to obtain the transformed feature maps. ; Input feature map and the transformed feature map Perform residual connections to obtain feature maps and output them.
3. The retinal vessel image segmentation method according to claim 2, characterized in that, The compressed feature map By performing strip convolutions in multiple directions, a corresponding number of directional feature maps are obtained, using the following formula: ; ; in, This indicates that the angle between the horizontal and the vertical directions is... The directional feature map output after strip convolution in the direction is located at... The value, It is the row index along the vertical axis. It is the column index in the horizontal direction. The angle between the strip convolution and the horizontal direction is . The offset steps when sampling in the direction of , express The preset upper limit, x This represents the pixel value at the corresponding coordinate in the feature map. This represents the rounding function. This represents the component of the direction vector in the row dimension. Indicates the scaling factor. This represents the component of the direction vector along the column dimension. This represents the learnable one-dimensional convolutional kernel weights. ∣∣ represents taking the maximum value, and ∣∣ represents taking the absolute value.
4. The retinal vessel image segmentation method according to claim 1, characterized in that, The local and global feature optimization includes parallel local feature optimization and global feature optimization, and also includes a fusion step for fusing the results of local feature optimization and global feature optimization.
5. The retinal vessel image segmentation method according to claim 4, characterized in that, The local feature optimization is achieved through a multi-view adaptive Inception module, which outputs feature maps to the residual multi-directional convolutional attention enhancement module. Perform the following operations to achieve local feature optimization: right The residual multi-directional convolutional attention enhancement module outputs feature maps. Magnify and reduce the size by a factor of 2 to obtain magnified and reduced feature maps, respectively. The residual multi-directional convolutional attention enhancement module outputs the feature map. The magnified and reduced feature maps are respectively input into the multi-scale attention fusion module to obtain the original multi-scale feature map, the magnified multi-scale feature map, and the reduced multi-scale feature map. The multi-scale attention fusion module is obtained by improving the Inception V1 module as follows: the 5×5 convolution is improved into a 3×3 dilated convolution, and after the concatenation operation, a 1×1 convolution, an ECA attention module, and a residual connection are added in sequence. The original multi-scale feature map is processed by restoring the number of channels and spatial size to obtain the feature map with the original size. The number of channels and spatial size of the enlarged multi-scale feature map are restored to obtain the enlarged feature map. The number of channels and spatial size of the reduced multi-scale feature map are restored to obtain the reduced-size feature map. ; Feature map after processing the original size After performing global average pooling and global max pooling respectively, concatenation, 1×1 convolution, and... The activation function is used to obtain the original channel weights; Feature map after enlargement After performing global average pooling and global max pooling respectively, concatenation, 1×1 convolution, and... The activation function is used to obtain the weights of the amplification channel; Feature map after size reduction After performing global average pooling and global max pooling respectively, concatenation, 1×1 convolution, and... The activation function is used to reduce the channel weights. The reduced channel weights, original channel weights, and amplified channel weights are concatenated to obtain the superimposed weights. These superimposed weights are then normalized and redistributed to obtain the processed reduced channel weights. Processed original channel weights and the weights of the amplified channels after processing ; Reduced channel weights after processing and the feature map after size reduction Processed original channel weights Feature maps after processing the original size and the processed amplified channel weights and the feature map after enlargement. The three feature maps are multiplied separately, summed, and then convolved with the residual multi-directional convolution attention enhancement module to output the feature map. Perform residual connections to obtain the output feature map.
6. The retinal vessel image segmentation method according to claim 5, characterized in that, The fusion of local feature optimization results and global feature optimization results is achieved through a dual-attention collaborative fusion module. The local feature optimization result is the feature map output by the multi-view adaptive Inception module. The global feature optimization result is the feature map output by the VSS Block module. The VSS Block module is used to implement the global feature optimization; The dual-attention collaborative fusion module outputs feature maps to the multi-view adaptive Inception module. and the feature map output by the VSSBlock module Perform the following operations to fuse the results of local feature optimization and global feature optimization: The feature map output by the multi-view adaptive Inception module and VSS Block module output feature map By concatenating the features along the channel dimension, a joint feature map is obtained. ; joint feature map Global average pooling, 1×1 convolution, and so on are performed sequentially. Activation function processing, 1×1 convolution and Activation function processing yields channel attention weights. ; Channel attention weights joint feature map Weighting is performed to obtain the channel attention feature map. ; Channel attention feature maps in the channel dimension It is split into feature maps after processing the feature maps output by the multi-view adaptive Inception module. and the feature map after processing the output feature map of the VSS Block module. Calculate the feature map after processing the feature map output by the multi-view adaptive Inception module. and the feature map after processing the output feature map of the VSS Block module. Difference feature diagram between ; Differential feature map Perform 3×3 convolution, batch normalization, Activation function processing, 1×1 convolution and Activation function processing yields spatial attention weights. ; Spatial attention weights Differential feature map Weighting is performed to obtain the spatial attention feature map. ; Spatial attention feature map Perform 3×3 convolution, batch normalization, and... The activation function is used to process the fused feature map, which is then output.
7. The retinal vessel image segmentation method according to claim 1, characterized in that, The expression for the loss function used during training of the retinal vessel segmentation model is as follows: ; ; ; ; in, Indicates the total loss. This indicates Dice's loss. Indicates the first weighted adjustment factor. Indicates the weighted average loss (Bce). This represents the second weighted adjustment factor. Indicates Focal loss. This represents the number of pixels in the image input to the retinal vessel segmentation model. Indicates the weight of blood vessel categories. Indicates the first The actual value of each pixel. Represents the logarithmic function with base 10. Indicates the first The predicted value of each pixel. Indicates the background category weight. Indicates the number of background pixels. This indicates the number of pixels in the blood vessel.
8. A retinal vessel image segmentation device, characterized in that, include: The image acquisition module is configured to acquire retinal vessel images; The image segmentation module is configured to input retinal vessel images into a trained retinal vessel segmentation model, the retinal vessel segmentation model including an encoder, a bottleneck layer, and a decoder. The encoder comprises a first encoding unit, a second encoding unit, a third encoding unit, and a fourth encoding unit connected in sequence: The first coding unit is used to extract features, optimize topological features, and compress space in retinal vascular images to obtain a first feature map; The second encoding unit is used to perform feature extraction, topological feature optimization, and spatial compression on the first feature map to obtain the second feature map. The third coding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the second feature map to obtain the third feature map. The fourth encoding unit is used to perform feature extraction, topological feature optimization, local and global feature optimization, and spatial compression on the third feature map to obtain the fourth feature map; The bottleneck layer is used to extract features and optimize topological features from the fourth feature map and then transmit them to the decoder. The decoder includes a first decoding unit, a second decoding unit, a third decoding unit, and a fourth decoding unit connected in sequence. The decoder realizes the step-by-step feature recovery and fusion of the fourth feature map through each decoding unit to obtain the retinal vessel segmentation map.
9. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the retinal vessel image segmentation method according to any one of claims 1 to 7.
10. A computer device, characterized in that, include: Memory, used to store computer programs / instructions; A processor for executing the computer program / instructions to implement the steps of the retinal vessel image segmentation method according to any one of claims 1 to 7.