Edge detection and connectivity enhancement network for retinal vessel segmentation
By introducing edge detection and connectivity enhancement modules into the U-Net network, the problem of edge information loss caused by downsampling in retinal vessel segmentation is solved, improving segmentation accuracy and robustness, especially the ability to segment complex vascular structures.
Patent Information
- Application Number
- CN202410209873.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-26
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-02-26
AI Technical Summary
The existing U-Net network suffers from loss of edge information due to downsampling in retinal vessel segmentation, resulting in unsatisfactory segmentation results.
A segmentation network with a U-shaped structure is proposed, including a feature encoder, a feature decoder, an edge detection module, and a connectivity enhancement module. Edge information is extracted through the edge detection module, and the connectivity of blood vessels is enhanced by using a multi-directional feature pyramid and a connectivity enhancement module. The U-Net network is improved by combining residual skip connections and multiple auxiliary loss functions.
It improves the accuracy of retinal vessel segmentation, especially the ability to segment complex vascular structures, enhances the ability to detect crossing and overlapping vessels, and improves the accuracy and robustness of segmentation.
Smart Images

Figure CN118229969B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image segmentation technology, specifically to an edge detection and connectivity enhancement network for retinal vessel segmentation. Background Technology
[0002] Retinal vessel segmentation plays a crucial role in the screening, diagnosis, treatment, and evaluation of various cardiovascular and ophthalmic diseases, including diabetic retinopathy, hypertension, arteriosclerosis, cardiovascular disease, and stroke. By analyzing the density and distribution of retinal vessels, physicians can effectively determine disease progression and provide appropriate treatment for patients. In the early stages of retinal vessel extraction, manual annotation of fundus images by specialist physicians is required, which is typically a time-consuming and labor-intensive task. Due to varying physician skill levels and the quality of fundus images, the morphology of the extracted retinal vessels is often not highly accurate. Therefore, designing an automated and accurate retinal segmentation model is of profound significance for medical-aided diagnosis.
[0003] In medical image segmentation, there are two main approaches to retinal vessel segmentation: unsupervised learning and supervised learning. Unsupervised learning methods include traditional approaches such as classical mathematical morphology, multi-scale linear detection, clustering analysis (fuzzy c-means and k-means clustering), region iterative growth, scale-space analysis, wavelet transform, matched filters, and Gaussian mixture models (GMMs) to construct a simple segmentation model for finding inherent basic feature properties to extract retinal vessels.
[0004] In recent years, compared with supervised learning methods, many unsupervised learning-based retinal vessel segmentation methods may require more training data and more iterative training to achieve good segmentation results. Supervised learning methods, on the other hand, offer better segmentation performance and robustness compared to unsupervised methods. Supervised learning primarily utilizes the image's ground truth labels to train an image classification model.
[0005] However, the downsampling stage in the encoder-decoder of the U-Net network typically uses pooling, or downsampling, to reduce the size of the feature map. Pooling reduces the resolution of the feature map, meaning that each pixel in the feature map represents information from a large region in the original image. This process inevitably loses edge information containing spatial features of blood vessels, resulting in less than ideal accuracy for retinal vessel segmentation using this network. Summary of the Invention
[0006] To address the technical problem of unsatisfactory accuracy in retinal vessel segmentation using existing networks, this invention aims to provide an edge detection and connectivity enhancement network for retinal vessel segmentation. The specific technical solution adopted is as follows:
[0007] The acquired raw image of retinal vessels is enhanced to obtain a retinal vessel image; the retinal vessel image is then input into a segmentation network to obtain the segmentation result of the retinal vessels; the segmentation network adopts a U-shaped structure, including a feature encoder, a feature decoder, an edge detection module, and a connectivity enhancement module;
[0008] The method for constructing the segmentation network specifically includes:
[0009] The feature encoder includes four downsampling layers. After downsampling at each layer, the edge detection module is used to extract the edge information of the input image to obtain a refined image of the retinal vessels.
[0010] The feature decoder obtains a feature map with the same resolution as the input image through an upsampling layer, and the feature encoder is connected to the corresponding part of the feature decoder via an edge detection module; the last layer of the feature encoder is connected to the feature decoder through a connectivity enhancement module.
[0011] Based on the comparison results between the outputs of the first three feature decoders and the real labels, the loss of each of the first three layers is obtained. Based on the loss of each of the first three layers, the loss function of the segmentation network is obtained.
[0012] Preferably, the step of using the edge detection module to extract edge information from the input image to obtain a refined edge image of retinal vessels specifically includes:
[0013] The edge detection module includes a priori edge detector and a multi-directional feature pyramid;
[0014] The feature map output by the feature encoder is input into the prior edge detector, which uses the Sobel edge detection algorithm to extract the edge information of retinal vessels in four directions to obtain the edge image of retinal vessels.
[0015] The edge image of retinal vessels is input into a multi-directional feature pyramid for edge feature excitation, resulting in a refined edge image of retinal vessels.
[0016] Preferably, the prior edge detector uses the Sobel edge detection algorithm to extract edge information of retinal vessels in four directions to obtain an edge image of retinal vessels, specifically including:
[0017]
[0018]
[0019]
[0020]
[0021]
[0022] Where P represents the feature map of the feature encoder, * is the convolution operator, P′ is the edge image of retinal vessels, and P 0。 P 45。 P 90。 and P 135。 These represent the edge feature maps extracted using the Sobel edge detection operator in the 0°, 45°, 90°, and 135° directions, respectively.
[0023] Preferably, the multi-directional feature pyramid includes a 1×1 convolution, two dilated convolutions of different sizes, and two strip convolutions of different sizes. The five convolutional feature maps of the multi-directional feature pyramid are connected together according to the channel dimension and dimensionality reduction is performed. After regularization, a refined image of the edge of the retinal blood vessels is obtained.
[0024] Preferably, the connectivity enhancement module is implemented in the following ways:
[0025] The feature information of the input image of the feature encoder is extracted by using convolution kernels of different scales to obtain feature maps corresponding to convolution kernels of different scales. The feature maps corresponding to convolution kernels of different scales are fused to obtain a fused feature map.
[0026] For each spatial direction, the fused feature maps are aggregated by applying average pooling operations with different kernels, and each aggregated feature map is encoded in coordinates. The encoded feature maps in each spatial direction are concatenated together, passed through a shared 1×1 convolutional layer, and a non-linear activation function is applied to obtain a spatial information feature map. The spatial information feature map is then superimposed on the input image of the feature encoder to form a residual mechanism.
[0027] The spatial directions include the horizontal and vertical directions.
[0028] Preferably, the step of fusing information from feature maps corresponding to convolutional kernels of different scales to obtain a fused feature map specifically involves:
[0029] X 1234 =Concat[X1, X2, X3, X4]
[0030] Among them, X 1234 To fuse feature maps, X1, X2, X3, and X4 are feature maps corresponding to convolutional kernels of different scales, and Concat is the aggregation function.
[0031] Preferably, the method for obtaining the spatial information feature map is as follows:
[0032] Z h =AvgPool(X 1234 ,(H,1))
[0033] Z w =AvgPool(X 1234 ,(1,W))
[0034] f=δ(F1([Z h Z w ]))
[0035] Among them, Z h Z represents the output of the average pooling operation performed along the horizontal direction for each channel. w This represents the output of the average pooling operation performed along the vertical direction for each channel. AvgPool is the average pooling function, δ is the non-linear activation function, and F1 is a 1×1 convolution. [Z h Z w ] indicates feature fusion, f indicates the fusion of features in [Z h Z w The feature map is obtained by transforming a shared 1×1 convolution with a non-linear activation function;
[0036] ω h =δ(F h (f(h)))
[0037] ω w =δ(F w (f(w)))
[0038] Y 1234 (i,j)=X 1234 (i,j)×ω h (i)×ω w (j)
[0039] Where, ω h For, ω w For, F h and F w For a 1×1 convolution, f(h) and f(w) are independent tensors split by f along two spatial directions, respectively, and Y 1234 This is a spatial information feature map, where i represents the row of the pixel position in the image, and j represents the column of the pixel position in the image.
[0040] Preferably, the loss function of the segmentation network is as follows:
[0041]
[0042]
[0043] Among them, Loss totle Let α be the loss function of the segmentation network. i Let L be the loss weight of the i-th layer. i For the loss of the i-th layer, y represents the actual label of the i-th layer. i Let x represent the output of the i-th layer, x represent a sample, and N represent the total number of samples.
[0044] The embodiments of the present invention have at least the following beneficial effects:
[0045] The network structure in this invention is based on the U-Net encoder-decoder architecture. By introducing an edge detection module, it effectively compensates for the edge blurring problem caused by continuous downsampling. Through connectivity enhancement modules and residual skip connections, it enhances the connectivity of segmented blood vessels, improves the model's ability to segment complex blood vessel structures such as intersections and overlaps, and improves U-Net to better handle image segmentation tasks of retinal blood vessels, thereby improving the segmentation accuracy of complex thin blood vessels. Attached Figure Description
[0046] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a flowchart of a method for constructing an edge detection and connectivity enhancement network for retinal vessel segmentation, provided by an embodiment of the present invention.
[0048] Figure 2 This is a schematic diagram of the network structure provided in an embodiment of the present invention;
[0049] Figure 3 This is a schematic diagram of the edge refinement module structure provided in an embodiment of the present invention;
[0050] Figure 4 This is a schematic diagram of the connectivity enhancement module structure provided in an embodiment of the present invention;
[0051] Figure 5 This is a schematic diagram of the structure of the multiple auxiliary loss function provided in an embodiment of the present invention. Detailed Implementation
[0052] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of an edge detection and connectivity enhancement network for retinal vessel segmentation proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0054] The following description, in conjunction with the accompanying drawings, details a specific scheme provided by the present invention for edge detection and connectivity enhancement networks for retinal vessel segmentation.
[0055] Please see Figure 1 The diagram illustrates a flowchart of a method for constructing an edge detection and connectivity enhancement network for retinal vessel segmentation according to an embodiment of the present invention. The method includes the following steps:
[0056] Step 1: Enhance the acquired raw image of retinal vessels to obtain a retinal vessel image; input the retinal vessel image into a segmentation network to obtain the segmentation result of the retinal vessels; the segmentation network adopts a U-shaped structure, including a feature encoder, a feature decoder, an edge detection module and a connectivity enhancement module.
[0057] First, raw images of retinal vessels are acquired, and these raw images need to be enhanced to prevent overfitting in subsequent segmentation and other operations. Enhancement methods include random horizontal and vertical flipping, random translation, and random cropping. The implementer can choose the method based on the specific implementation scenario. Image enhancement is a well-known technique and will not be discussed further here.
[0058] The acquired raw images of retinal vessels are enhanced to obtain retinal vessel images. These processed images are then input into a segmentation network to obtain segmentation results for the retinal vessels. The segmentation network employs a U-shaped structure and includes a feature encoder, a feature decoder, an edge detection module, and a connectivity enhancement module.
[0059] Specifically, the overall construction method of the segmentation network model includes: adopting a U-shaped encoder-decoder architecture as the overall network architecture; downsampling once after each feature encoding, with the feature map size of each downsampled layer being half that of the previous layer; connecting the feature encoder to the corresponding part of the feature decoder via an edge detection module; connecting the connectivity enhancement module to the feature decoder; and obtaining a feature map with the same resolution as the input image through an upsampling layer. Simultaneously, the outputs of the first three decoder layers are compared with the ground truth labels to obtain the network loss of each of the first three layers. The total loss of the segmentation network is obtained by combining the network losses of the first three layers, and the training process of the network is supervised using this total loss.
[0060] It should be noted that, as Figure 2 As shown, it is a schematic diagram of the segmentation network in an embodiment of the present invention. In steps two to four, this embodiment will describe in detail the specific construction process of the segmentation network.
[0061] Step 2: The feature encoder consists of four downsampling layers. After downsampling at each layer, the edge detection module is used to extract the edge information of the input image to obtain a refined image of the retinal vessels.
[0062] The feature encoder consists of four downsampling layers. It extracts effective features from the input image using two 3×3 convolutional blocks, resulting in a 48×48 effective feature map. The input image is downsampled to 6×6 in the feature encoder section. Downsampling occurs after each feature encoding step, with the feature map size of each downsampled layer being half that of the previous layer. After downsampling at each layer, an edge detection module extracts edge information from the input image to obtain a refined edge image of the retinal vessels. Specifically, as shown... Figure 3 As shown, the edge detection module includes a priori edge detector and a multi-directional feature pyramid.
[0063] First, the feature map output from the feature encoder is input into the prior edge detector. The prior edge detector uses the Sobel edge detection algorithm to extract the edge information of retinal vessels in four directions, obtaining the edge image of the retinal vessels. Specifically, the feature map P∈R obtained by feature extraction from the feature encoder layer is... C×H×W The input is a priori edge detector, where P is the feature map, C represents the number of channels in the feature map, H represents the height of the feature map (the number of pixels in the vertical direction of the image), and W represents the width of the feature map (the number of pixels in the horizontal direction of the image). The priori edge detector uses an improved Sobel edge detection operator to extract detailed edge information of retinal vessels at 0°, 45°, 90°, and 135° angles, effectively enhancing inconspicuous vessel edges and obtaining edge images of the retinal vessels. This can be expressed by the formula:
[0064]
[0065]
[0066]
[0067]
[0068] Where P represents the feature map of the feature encoder, * is the convolution operator, P′ is the edge image of retinal vessels, and P 0。 P 45。 P 90。 and P 135。 These represent the edge feature maps extracted using the Sobel edge detection operator in the 0°, 45°, 90°, and 135° directions, respectively.
[0069] Furthermore, the edge image of the retinal vessels is input into a multi-directional feature pyramid for edge feature activation, resulting in a refined edge image of the retinal vessels. Specifically, the mapping result of the retinal vessel image captured by the prior edge detector, i.e., the edge image of the retinal vessels, is input into the multi-directional feature pyramid for edge feature activation. The multi-directional feature pyramid pool includes five different convolutions: one 1×1 convolution, two dilated convolutions of different sizes, and two strip convolutions of different sizes. These five feature maps are connected together along the channel dimension to form a richer and more comprehensive feature representation r∈R. 5C×H×W It can be expressed by the formula:
[0070] r = Concat[f 3×3 (P′);d rate=2 (P′);s size=5 (P′);d rate=3 (P′);s size=7 (P′)]
[0071] Where r is the feature representation, P′ is the edge image of retinal vessels, Concat[] is the stitching operation, and f 3×3 This represents a convolution operation with a kernel size of 3*3, d rate=2 and d rate=3 These represent dilated convolution operations with dilation rates of 2 and 3, respectively. size =5 and s size=7 These represent strip convolution operations with kernel sizes of 5 and 7, respectively.
[0072] Finally, a 1×1 convolution kernel is used to reduce the dimensionality of the feature representation r, and a Dropout operation (regularization) is added to prevent overfitting, resulting in the final feature representation, which is the edge refinement image of retinal vessels, and can be expressed as P″ = Dropout(conv1×1 (r)), where P″ is the edge refinement image of retinal vessels, Dropout() represents the Dropout function, and conv 1×1 This represents a convolution function with a kernel size of 1×1.
[0073] It should be noted that the key to multi-directional pyramid pool feature excitation is strip convolution, which consists of convolutions in four different directions: horizontal, vertical, left diagonal, and right diagonal, to fully adapt to the strip-like features of retinal vessels.
[0074] Specifically, let e1∈R C×H×W The input to the adaptive strip convolution is denoted as , where H, W, and C represent the height, width, and number of channels, respectively. e1 is fed into four parallel paths, each containing a convolution in one direction. The four paths correspond to four directions: horizontal, vertical, left diagonal, and right diagonal, resulting in four output feature maps.
[0075] Concatenate the four feature maps along the channel dimension to obtain e1′∈R C×H×W Then, after passing through a 1×1 convolution kernel W∈R C The output of the strip convolution, e1″∈R, is obtained. C×H×W It can be expressed by the formula:
[0076]
[0077] Where ω represents a convolution filter of size 2k+1, and the direction of the filter is I=(I H ,I W ), [i,j] represents the spatial position of any pixel, (e1*ω) is the convolution operation, I [i,j] The direction vectors of the convolution are horizontal, vertical, left diagonal, and right diagonal, respectively, with corresponding values of (0,1), (1,0), (1,1), and (-1,1). Any position in the output feature map can be associated with multiple positions in the four directions of the input feature map.
[0078] In summary, the edge image of retinal vessels is input into a multi-directional feature pyramid for edge feature activation. The five convolutional feature maps of the multi-directional feature pyramid are connected together according to the channel dimension and then subjected to dimensionality reduction processing. After regularization, a refined edge image of retinal vessels is obtained.
[0079] Step 3: The feature decoder obtains a feature map with the same resolution as the input image through an upsampling layer, and the feature encoder is connected to the corresponding part of the feature decoder via an edge detection module; the last layer of the feature encoder is connected to the feature decoder through a connectivity enhancement module.
[0080] like Figure 4 The diagram illustrates the structure of the connectivity enhancement module according to an embodiment of the present invention. Specifically, the connectivity enhancement module is implemented as follows: First, feature information of the input image of the feature encoder is extracted using convolutional kernels of different scales to obtain feature maps corresponding to convolutional kernels of different scales. Then, the feature maps corresponding to convolutional kernels of different scales are fused to obtain a fused feature map, which can be expressed by the formula:
[0081] X 1234 =Concat[X1, X2, X3, X4]
[0082] Among them, X 1234 To fuse feature maps, X1, X2, X3, and X4 are feature maps corresponding to convolutional kernels of different scales, and Concat is the aggregation function.
[0083] Then, after obtaining the fused feature map, for each spatial direction, the fused feature map is aggregated by applying average pooling operations with different kernels, and coordinate encoding is performed on each aggregated feature map; the encoded feature maps in each spatial direction are concatenated together, passed through a shared 1×1 convolutional layer, and a non-linear activation function is applied to obtain a spatial information feature map, and the spatial information feature map is superimposed with the input image of the feature encoder to form a residual mechanism; the spatial direction includes the horizontal direction and the vertical direction.
[0084] Specifically, feature perception is achieved through a coordinate attention mechanism, aggregating features along two spatial directions to obtain aggregations in different spatial directions. Average pooling with two different kernels (H, 1) or (1, W) is then used to fuse the feature map X. 1234 Each channel is encoded along both the horizontal and vertical coordinates, thus preserving precise location information while establishing spatial correlation. The feature maps in these two directions are then concatenated and fed into a shared 1×1 convolutional F1 layer and a non-linear activation. This can be expressed as:
[0085] Z h =AvgPool(X 1234 ,(H,1))
[0086] Z w =AvgPool(X 1234 ,(1,W))
[0087] f=δ(F1([Z h Z w ]))
[0088] Among them, Z h Z represents the output of the average pooling operation performed along the horizontal direction for each channel. wThis represents the output of the average pooling operation performed along the vertical direction for each channel. AvgPool is the average pooling function, δ is the non-linear activation function, and F1 is a 1×1 convolution. [Z h Z w ] indicates feature fusion, f indicates the fusion of features in [Z h Z w The feature map is obtained by sharing a 1×1 convolution and transforming it with a non-linear activation function.
[0089] Split f along the spatial dimension into two independent tensors f(h)∈R. R / r×H f(w)∈R C / r×W The resulting tensors f(h) and f(w) are then convolved by two 1×1 convolutions Fh and Fw respectively. h and F w Perform operations with the Sigmoid function and reweight them onto the fused feature map X. 1234 The above can be expressed as a formula:
[0090] ω h =δ(F h (f(h)))
[0091] ω w =δ(F w (f(w)))
[0092] Y 1234 (i,j)=X 1234 (i,j)×ω h (i)×ω w (j)
[0093] Where, ω h For, ω w For, F h and F w For a 1×1 convolution, f(h) and f(w) are independent tensors split by f along two spatial directions, respectively, and Y 1234 This is a spatial information feature map, where i represents the row of the pixel position in the image, and j represents the column of the pixel position in the image.
[0094] Finally, the feature map Y1234, which contains rich long-range spatial interaction location information, is superimposed with the input feature map Xin to form a residual mechanism, improving vascular connectivity while ensuring the effective transmission of global features. The superimposed output image can be represented as X. out =X in +Y 1234 , where X in Represents the input image, X out This indicates the output image.
[0095] Step 4: Based on the comparison results between the outputs of the first three feature decoders and the real labels, obtain the loss of each of the first three layers. Based on the loss of each of the first three layers, obtain the loss function of the segmentation network.
[0096] In this embodiment, the segmentation network is designed with multiple auxiliary loss functions, and the structural diagram of the multiple auxiliary loss functions is shown below. Figure 5 As shown, in the network, the output of each decoder layer is used to participate in the prediction of the final output, so as to make full use of the segmentation results of each decoder layer and fully consider the influence of feature maps at different levels on the segmentation results. In this embodiment of the invention, a hierarchical supervision network is formed by segmenting multiple auxiliary loss branches of the intermediate layer of the network. The loss weights of the first three decoder layers are assigned to 0.6, 0.3 and 0.1 respectively to improve the robustness of the network model. Implementers can set the values according to the specific implementation scenario.
[0097] Specifically, the total loss of the segmented network can be expressed by the formula:
[0098]
[0099]
[0100] Among them, Loss totle Let α be the loss function of the segmentation network. i Let L be the loss weight of the i-th layer. i For the loss of the i-th layer, y represents the actual label of the i-th layer. i Let x represent the output of the i-th layer, x represent a sample, and N represent the total number of samples.
[0101] In summary, this invention uses the Sobel edge detection operator and multi-directional pyramid feature excitation with strip convolution to design an edge detection module, addressing the edge blurring problem caused by continuous downsampling in existing methods. It utilizes multi-scale coordinate attention with a residual mechanism to improve the connectivity of segmented blood vessels, effectively assisting the model in establishing long-range dependencies in spatial directions, accurately capturing and locating intersecting and overlapping vascular structures, thereby improving the problem of low vascular connectivity and enhancing the model's ability to segment complex vascular structures such as intersections and overlaps. Finally, it employs a multi-auxiliary loss function for hierarchical supervision of the model, further improving its performance.
[0102] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. An edge detection and connectivity enhancement network for retinal vessel segmentation, characterized in that, include: The acquired raw image of retinal vessels is enhanced to obtain a retinal vessel image; the retinal vessel image is then input into a segmentation network to obtain the segmentation result of the retinal vessels; the segmentation network adopts a U-shaped structure and includes a feature encoder, a feature decoder, an edge detection module, and a connectivity enhancement module; The method for constructing the segmentation network specifically includes: The feature encoder includes four downsampling layers. After downsampling at each layer, the edge detection module is used to extract the edge information of the input image to obtain a refined image of the retinal vessels. The feature decoder obtains a feature map with the same resolution as the input image through an upsampling layer, and the feature encoder is connected to the corresponding part of the feature decoder via an edge detection module; the last layer of the feature encoder is connected to the feature decoder through a connectivity enhancement module. Based on the comparison results between the outputs of the first three feature decoders and the real labels, the loss of each of the first three layers is obtained. Based on the loss of each of the first three layers, the loss function of the segmentation network is obtained. The step of extracting edge information from the input image using an edge detection module to obtain a refined edge image of retinal vessels specifically includes: The edge detection module includes a priori edge detector and a multi-directional feature pyramid; The feature map output by the feature encoder is input into the prior edge detector, which uses the Sobel edge detection algorithm to extract the edge information of retinal vessels in four directions to obtain the edge image of retinal vessels. The edge image of retinal vessels is input into a multi-directional feature pyramid for edge feature excitation, resulting in a refined edge image of retinal vessels. The prior edge detector uses the Sobel edge detection algorithm to extract edge information of retinal vessels in four directions to obtain an edge image of retinal vessels, specifically including: Where P represents the feature map of the feature encoder, and * represents the convolution operator. Image of the edges of retinal vessels. , , and These represent the edge feature maps extracted using the Sobel edge detection operator in the 0°, 45°, 90°, and 135° directions, respectively.
2. The edge detection and connectivity enhancement network for retinal vessel segmentation according to claim 1, characterized in that, The multi-directional feature pyramid includes a 1×1 convolution, two dilated convolutions of different sizes, and two strip convolutions of different sizes. The five convolutional feature maps of the multi-directional feature pyramid are connected together according to the channel dimension and then subjected to dimensionality reduction processing. After regularization, a refined image of the edge of retinal vessels is obtained.
3. The edge detection and connectivity enhancement network for retinal vessel segmentation according to claim 1, characterized in that, The connectivity enhancement module is implemented in the following ways: The feature information of the input image of the feature encoder is extracted by using convolution kernels of different scales to obtain feature maps corresponding to convolution kernels of different scales. The feature maps corresponding to convolution kernels of different scales are fused to obtain a fused feature map. For each spatial direction, the fused feature maps are aggregated by applying average pooling operations with different kernels, and each aggregated feature map is encoded in coordinates. The encoded feature maps in each spatial direction are concatenated together, passed through a shared 1×1 convolutional layer, and a non-linear activation function is applied to obtain a spatial information feature map. The spatial information feature map is then superimposed on the input image of the feature encoder to form a residual mechanism. The spatial directions include the horizontal and vertical directions.
4. The edge detection and connectivity enhancement network for retinal vessel segmentation according to claim 3, characterized in that, The specific steps for fusing information from feature maps corresponding to convolutional kernels of different scales to obtain a fused feature map are as follows: in, To fuse feature maps, , , and These are the feature maps corresponding to convolution kernels of different scales, and Concat is the aggregation function.
5. The edge detection and connectivity enhancement network for retinal vessel segmentation according to claim 4, characterized in that, The method for obtaining the spatial information feature map is as follows: in, This represents the output of the average pooling operation performed along the horizontal direction for each channel. This represents the output of the average pooling operation performed along the vertical direction for each channel. AvgPool is the average pooling function. It is a non-linear activation function. For 1×1 convolution, This indicates that feature fusion is being performed. Indicates to The feature map is obtained by transformation through a shared 1×1 convolution and a non-linear activation function; in, for, for, and For 1×1 convolution, and For the reason Independent tensors split along two spatial directions respectively. This is a spatial information feature map, where i represents the row of the pixel position in the image, and j represents the column of the pixel position in the image.
6. The edge detection and connectivity enhancement network for retinal vessel segmentation according to claim 1, characterized in that, The loss function of the segmentation network is specifically as follows: in, The loss function for segmenting the network, Let the loss weights be those of the i-th layer. For the loss of the i-th layer, This represents the actual label of the i-th layer. Let x represent the output of the i-th layer, x represent a sample, and N represent the total number of samples.
