A retinal blood vessel segmentation method based on frequency domain enhancement

By employing a multi-level encoder-decoder architecture and a cross-domain routing attention module, combined with dynamic frequency domain enhancement processing, the problems of low accuracy in retinal vessel segmentation and difficulty in detecting small vessels are solved, achieving high-precision and efficient vessel segmentation results.

CN122175997APending Publication Date: 2026-06-09SHENYANG UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENYANG UNIVERSITY OF TECHNOLOGY
Filing Date
2026-03-10
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing retinal vessel segmentation methods are insufficient in terms of accuracy and detection of small vessels, making it difficult to effectively distinguish between lesion areas and vessels, and the fusion of frequency domain and spatial domain features is not effective.

Method used

A multi-level encoder-decoder architecture is adopted, which combines dynamic frequency domain enhancement processing and cross-domain routing attention module. Adaptive frequency domain masks are generated by learnable Gaussian parameters and complex Fourier basis to enhance high-frequency information of blood vessel edges and suppress background noise. The cross-domain routing attention module is used to fuse spatial domain and frequency domain features.

Benefits of technology

It improves the detection capability of small blood vessels, enhances segmentation accuracy and robustness, effectively distinguishes blood vessels from the background, adapts to different image qualities, reduces computational burden, and achieves efficient retinal vessel segmentation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122175997A_ABST
    Figure CN122175997A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on frequency domain enhancement's retinal blood vessel segmentation method, it is related to retinal blood vessel segmentation technical field, the method includes: the input retinal image is preprocessed to enhance blood vessel structure information;The spatial domain feature of image is extracted by multilevel encoder;Dynamic frequency domain enhancement processing is carried out to spatial domain feature, including using learnable Gaussian high-pass filter and K groups learnable complex Fourier base weighted fusion to generate adaptive frequency domain mask to enhance blood vessel edge high-frequency component;Frequency domain enhancement feature and spatial domain feature are input into cross-domain routing attention module and are fused;Key feature position is filtered using double-layer routing mechanism and sparse attention is calculated;Blood vessel segmentation result is output by the decoder upsampling fusion feature and output blood vessel segmentation result.The application is enhanced by learnable Gaussian high-pass filter adaptive blood vessel edge frequency domain feature, combined with spatial domain feature to carry out cross-domain routing attention fusion, realizes high-precision, high-efficiency blood vessel segmentation under the improvement U-Net architecture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of retinal vessel segmentation technology, and in particular to a retinal vessel segmentation method based on frequency domain enhancement. Background Technology

[0002] In the medical field, retinal vessel segmentation is crucial for the diagnosis of eye diseases such as diabetic retinopathy and glaucoma. The morphology and structure of retinal vessels are important bases for doctors to judge eye diseases and assess their condition. Accurate segmentation of retinal vessels can provide reliable reference for disease diagnosis and treatment, and is a key step in diagnosing such eye diseases.

[0003] Currently, retinal vessel segmentation methods are mainly divided into three categories: 1. Traditional image processing methods: These typically include thresholding segmentation and morphological operations. Thresholding segmentation separates blood vessel regions by classifying pixels according to a threshold; morphological operations use operations such as dilation and erosion to process the image shape and structure to assist in segmentation. However, these methods are sensitive to image quality; noise, uneven lighting, or complex backgrounds can severely affect the segmentation results, making it difficult to accurately isolate blood vessels and significantly reducing accuracy.

[0004] 2. Deep learning-based methods: Represented by U-Net and its variants, these methods extract image features for segmentation through an encoder-decoder structure. However, they primarily rely on spatial domain features, neglecting frequency domain information. While frequency domain information is advantageous for identifying fine structures, this can lead to incomplete segmentation and blurred edges when segmenting small blood vessels, thus affecting the segmentation quality.

[0005] 3. Frequency Domain Methods: A few studies have attempted to process retinal vessels using fixed filters. Filters can select and adjust the frequency components of the image to highlight vascular features. However, fixed filters cannot adapt to different image characteristics. Different retinal images vary greatly in terms of vascular morphology and background complexity, resulting in unsatisfactory segmentation effects when using fixed filters.

[0006] In addition, there are some problems in actual segmentation: small blood vessels have low contrast with the background, and all methods are prone to missing detection, affecting disease judgment; the pixel features of lesion areas (bleeding, exudation, etc.) are similar to those of blood vessels, interfering with segmentation, and existing methods have difficulty distinguishing lesion areas from blood vessels, affecting accuracy; traditional methods have limited spatial domain processing capabilities, and the fusion effect of frequency domain and spatial domain features is not good, which limits the improvement of segmentation results. Summary of the Invention

[0007] In view of this, the present invention proposes a retinal vessel segmentation method based on frequency domain enhancement to solve the problems of low retinal vessel segmentation accuracy and difficulty in detecting small vessels in the prior art.

[0008] The specific technical solution of this invention is as follows: A method for segmenting retinal vessels, comprising: Preprocess the input retinal image; Spatial domain features of images are extracted using a multi-level encoder-decoder architecture; Dynamic frequency domain enhancement processing is performed on spatial domain features. The processing transforms spatial domain features to the frequency domain through fast Fourier transform. Based on learnable Gaussian parameters σ and complex Fourier basis, a content-adaptive frequency domain mask is generated to enhance high-frequency components of blood vessel edges and suppress low-frequency background noise in the frequency domain. Frequency domain enhancement features and spatial domain features are input into the cross-domain routing attention module and fused. Spatial domain features generate query vectors and frequency domain enhancement features generate key value vectors. A two-layer routing mechanism is used to filter key feature locations and calculate sparse attention. The decoder upsamples and fuses features to output the blood vessel segmentation result.

[0009] Specifically, the preprocessing includes: performing weighted grayscale processing on the color retinal image and assigning weight coefficients according to the contribution of vascular information in the color channels; performing contrast-limited adaptive histogram equalization on the grayscale image; adjusting the image brightness distribution through Gamma correction; and normalizing the image size to unify the resolution.

[0010] Specifically, dynamic frequency domain enhancement processing includes: The spatial domain features are subjected to global mean pooling along the channel dimension to obtain the global context vector; The global context vector is input into the multilayer perceptron to generate K-dimensional dynamic routing coefficients, which are then normalized by Softmax. The learnable Gaussian parameter σ and the K sets of complex Fourier basis are independently defined trainable parameters. σ is a learnable scalar that controls the intensity of the Gaussian high-pass filter, and the complex Fourier basis is a trainable complex tensor used for frequency domain enhancement. A complex frequency domain representation is obtained by performing a fast Fourier transform on the spatial domain features. A Gaussian distance grid matching the frequency domain size is constructed, and a dynamic high-pass mask is generated with a learnable parameter σ to suppress low-frequency background through complex point-by-point multiplication. K sets of learnable complex Fourier bases are introduced, and the K sets of bases are weighted and fused using dynamic routing coefficients to obtain an adaptive frequency domain mask. The vascular edge direction information is then enhanced by complex point-by-point multiplication. Spatial features are recovered by inverse fast Fourier transform, and channel dimensions are adjusted by 1×1 convolution to output frequency domain enhanced features.

[0011] Specifically, the dynamic high-pass mask is generated according to the following formula: ; Where d² is the squared grid distance between the center of the frequency domain, and ε is a small constant to prevent division by zero.

[0012] Specifically, the cross-domain routing attention module executes: The spatial domain features are used to generate a query vector through 1×1 convolution and depthwise separable convolution. The frequency domain enhanced features are convolved with 1×1 to double the channels and then segmented to generate key value vectors; The three-dimensional feature map is converted into a two-dimensional sequence through feature serialization operations; A two-layer routing mechanism is used to filter key feature locations and calculate sparse attention.

[0013] Specifically, the two-layer routing mechanism includes: Calculate the similarity between the spatial domain global query and the frequency domain global key; The top k most similar key-value pairs are selected to generate a routing index; Perform soft-weight fusion on the key-value vectors based on the routing index; Calculate attention weights at selected locations using sparse multi-head attention.

[0014] Specifically, the similarity calculation uses cosine similarity or dot product similarity, with k being 4 or a dynamically adaptive value.

[0015] Specifically, the multi-level encoder-decoder architecture adopts an improved U-Net architecture, in which each encoder level contains an independent spatial feature extraction branch and a frequency domain processing branch, and the fused features output from each level are directly passed to the corresponding level's decoder through skip connections.

[0016] Specifically, the skip connection mechanism is as follows: Establish a feature buffer channel at the output of each stage of the encoder; The dual-stream information, which includes spatial domain features and frequency domain fusion features, is directly injected into the corresponding layer of the decoder; Upsampled features and skip features are integrated by channel splicing.

[0017] Specifically, dynamic frequency domain enhancement processing includes frequency domain transformation and dimension alignment operations: After performing tensor dimension ordering on the spatial domain features, a fast Fourier transform is called to generate a complex frequency domain representation; After completing high-pass filtering and adaptive masking dual modulation, spatial features are recovered through inverse fast Fourier transform; A 1×1 convolutional layer is used to adjust the channel dimension of the recovered features to match the number of channels required by the skip connections or decoder. The beneficial effects of this invention are: (1) Dynamic frequency domain enhancement technology dynamically adjusts the filtering intensity through learnable parameters, adaptively enhances the high-frequency information of blood vessel edges, and suppresses low-frequency background noise, thereby improving the detection capability of small blood vessels; (2) The cross-domain routing attention mechanism adopts a cross-domain design that generates queries from spatial domain features and generates key values ​​from frequency domain features. It achieves efficient sparse computation through two-layer routing, significantly reduces the computational burden, and balances computational efficiency with feature fusion quality. (3) The multi-level integrated architecture embeds innovative modules into each layer of the encoder to achieve spatial frequency domain dual-stream processing and multi-scale fusion, gradually extracts multi-level semantic features, and constructs a feature pyramid to capture multi-scale vascular information; (4) The skip connection mechanism directly passes the fused features of each level of the encoder to the corresponding decoder level through feature caching and transmission channels, preventing the loss of downsampling information, preserving spatial details, and thus generating high-resolution blood vessel segmentation results; (5) Image preprocessing effectively preserves vascular structure information, reduces irrelevant interference, optimizes image quality to highlight vascular details, and unifies image size to enhance network robustness through weighted grayscale, CLAHE enhancement, Gamma correction and size normalization. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic flowchart of the frequency domain enhancement-based retinal vessel segmentation method of the present invention; Figure 2 This is a schematic diagram of the structure of the i-th stage encoder of the present invention; Figure 3 This is a schematic diagram of the frequency domain processing flow of the present invention; Figure 4 This is a flowchart illustrating the cross-domain routing attention mechanism of the present invention. Detailed Implementation

[0020] To make the technical problems to be solved, the technical solutions, and the beneficial effects of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and are not intended to limit the present invention.

[0021] This invention proposes a retinal vessel segmentation method based on frequency domain enhancement. It adaptively enhances the frequency domain features of vessel edges using a learnable Gaussian high-pass filter, combines this with spatial domain features for cross-domain routing attention fusion, and employs an improved U-Net architecture to achieve high-precision and high-efficiency vessel segmentation. This method comprises three core innovations: dynamic frequency domain enhancement technology, a cross-domain routing attention mechanism, and a multi-level integrated architecture. The dynamic frequency domain enhancement technology proposes a learnable Gaussian high-pass filter that adaptively adjusts the filter intensity according to image content, accurately preserving high-frequency information at vessel edges. The cross-domain routing attention mechanism is the first to use spatial domain features as the query source and frequency domain features as the key source for cross-domain attention design, achieving efficient sparse computation through two-layer routing. The multi-level integrated architecture embeds these innovative modules into each layer of the U-Net encoder, forming a complete segmentation system with spatial-frequency domain dual-stream processing and multi-scale fusion.

[0022] The specific steps are as follows: First, retinal image preprocessing is performed. After acquiring the retinal fundus image, weighted grayscale conversion, CLAHE enhancement, Gamma correction, and size normalization are performed. Weighted grayscale conversion analyzes the differences in the contribution of different color channels to vascular information, determining that the green channel contains more vascular structure information, while the red and blue channels are more susceptible to interference. Different weight coefficients are then assigned to each channel, converting the color image to a grayscale image to preserve vascular structure information to the greatest extent and reduce interference from irrelevant information. CLAHE enhancement divides the image into multiple small regions, performing histogram equalization within each region to limit the degree of contrast enhancement and avoid excessive enhancement that could lead to noise amplification and image distortion. Gamma correction, based on the non-linear characteristics of human eye brightness perception, performs a non-linear transformation on the image pixel values ​​to adjust the overall brightness distribution. An appropriate Gamma value is selected: when the Gamma value is greater than 1, the overall brightness is reduced; when the Gamma value is less than 1, the overall brightness is increased, optimizing image quality and highlighting vascular details. Size normalization employs bilinear interpolation and bicubic interpolation to uniformly adjust images of different resolutions to a fixed size. Bilinear interpolation uses the gray values ​​of the surrounding four pixels for linear interpolation to calculate the new pixel value, while bicubic interpolation uses the gray values ​​of the surrounding 16 pixels for cubic polynomial interpolation. After preprocessing, data augmentation operations such as random flipping, rotation, and brightness adjustment can be performed to improve the robustness of subsequent networks.

[0023] Next, multi-scale spatial feature extraction is performed. The preprocessed image is fed into the improved U-Net encoder, which has four downsampling levels. Each layer sequentially extracts spatial domain features through convolutional blocks, which consist of multiple convolutional layers, batch normalization layers, and activation function layers: the convolutional layers use 3×3 and 5×5 convolutional kernels in parallel to extract multi-scale features, the batch normalization layers accelerate training and stabilize the model, and the StarReLU activation function introduces non-linearity. By progressively downsampling through convolutional operations with a stride of 2, the receptive field is expanded and the resolution is compressed, constructing a feature pyramid from low to high levels, thereby capturing multi-level semantic information of the vascular tree.

[0024] Then, dynamic frequency domain enhancement processing is performed. At the end of each coding level, the following operations are performed on the spatial domain features of shape (B, H, W, C): Feature input and global context extraction: After receiving the spatial features, global mean pooling is performed along the channel dimension to obtain a channel-level global statistics vector, capturing long-range context information. Spatial-frequency domain transformation: After performing tensor dimension adjustment on the spatial features, a Fast Fourier Transform (FFT) is called to generate a complex frequency domain representation. Freq = FFT(X); Learnable Gaussian high-pass filtering: During the model forward pass, a centrally symmetric Gaussian distance-squared grid is dynamically constructed based on the current feature map size. ; Where d 2 H is the square of the distance; H is the total number of rows in the image; W is the total number of columns in the image; i is the row number from 0 to... ;j represents the column number from 0 to .

[0025] Using the learnable parameter σ, a dynamic high-pass mask is calculated in real time according to hp_mask. After the mask is expanded to the same shape as the complex frequency domain, a complex point-by-point multiplication Freq_filtered = Freq ⊙ hp_mask is performed to suppress low-frequency background noise.

[0026] ; Where, d 2 σ is the square of the distance; σ is a trainable parameter; exp is the natural exponential function ex; ε is a decimal to prevent division by zero.

[0027] Adaptive Frequency Domain Basis Fusion: A pre-registered learnable complex Fourier basis is weighted and summed using the K-dimensional routing coefficients to obtain a content-adaptive frequency domain mask, Mask_adaptive. Freq_filtered and Mask_adaptive are then multiplied point-by-point using complex numbers to enhance the vascular edge orientation information. Frequency Domain-Spatial Recovery: The spatial feature X_filtered is recovered using Inverse Fast Fourier Transform (IFFT), and finally, a 1×1 convolutional layer is used to adjust the channel dimensions to align with the skip connection branches, outputting the enhanced frequency domain feature.

[0028] Next, cross-domain routing attention fusion is performed. At each encoding level, spatial domain features and frequency domain enhancement features are input into the cross-domain routing attention module. First, spatial domain features generate query vectors, and frequency domain features generate key-value vectors, realizing cross-domain feature projection. Then, a two-layer routing mechanism is implemented to perform global route selection and calculate the spatial domain global query Q. win =Mean(Q) and frequency domain global key K win The similarity of Mean(K) is measured using methods such as cosine similarity or dot product similarity. The top - k most important key positions are selected, and the routing weight R is output. weight and routing index R idx : ; According to R idx Extract the corresponding token from the KV tensor, then R weight Multiply once to obtain the top-k key-value pairs that each query Q position actually needs to see; then perform sparse multi-head attention calculation, reshaping the query into (B, M, N, d) format, where M is the number of heads and d = C / M. Select the key Ksel and value Vsel and reshape them into (B, M, k, d) format, where k is the number of top - k (usually k = 4). After performing sparse attention calculation, merge the multi-head outputs and reshape them back into (B, C, H, W) format. ; Finally, the output projection is processed through a 1×1 convolutional layer to perform final feature adjustment and output fused features.

[0029] Next, the decoder and blood vessel segmentation output are performed. In the decoding stage, bilinear interpolation or transposed convolution is used to upsample step by step to restore the resolution. At each layer, the upsampled features are concatenated with the fusion features of the corresponding coding layer, and the fusion features are directly injected into the decoding path through skip connections. The skip connection mechanism directly transmits the fusion features of each level of the encoder to the corresponding decoder level through feature buffering and transmission channels, that is, "Encoder i-th level fusion feature Ff → Decoder i-th level input", which prevents information loss during downsampling, preserves spatial details, and finally generates high-resolution blood vessel segmentation results.

[0030] The functions of each main module in this method are as follows: like Figure 1 As shown, the encoder as a whole is responsible for multi-scale feature extraction and downsampling, and gradually extracts semantic features from low to high levels. Its internal structure consists of four cascaded encoder stages, each stage containing dual-branch processing and cross-domain fusion. The stages are connected in series, and the output of the previous stage is used as the input of the next stage to construct a feature pyramid and extract multi-scale vascular information. like Figure 2 As shown, the spatial feature extraction module in a single stage of the encoder receives input features and extracts the spatial structure information of the input features, including texture, shape, and edges, through two identical convolutional modules (which can share weights), and outputs spatial features Fs and Fs', providing a basic spatial representation for subsequent processing; like Figure 3 As shown, the internal processing flow of the frequency domain enhancement module is as follows: The real-number fast Fourier transform (rfft2) unit receives spatial features Fs' of shape (B, H, W, C), performs a real-number FFT along the spatial dimension (H, W), and outputs complex frequency domain features Freq ∈ c^(B, H, W / / 2+1, C), transforming spatial convolution into point-by-point multiplication in the frequency domain, providing a prerequisite for subsequent frequency domain processing.

[0031] The dynamic parameter generation unit takes the global statistics g ∈ R^(B, C) obtained by global mean pooling of Fs' and feeds them in parallel into two independent branches: the first branch is an MLP network used to generate K-dimensional routing coefficients ∈ R^(B, K), which are then normalized by Softmax to obtain the weight distribution of each frequency domain basis; the second branch is an independently defined learnable Gaussian parameter σ, which serves as a trainable scalar to control the intensity of the high-pass filter, with an initial value of 1.0. The parameters of the two branches are independent of each other and are optimized synchronously through backpropagation.

[0032] Both outputs share the underlying feature extraction capabilities of the MLP, but each has its own independent projection head, allowing σ and routing weights to adapt to changes in image content.

[0033] The learnable Gaussian high-pass filter unit is constructed based on the current feature map size (H, W / / 2+1), creating a centrally symmetric Gaussian distance squared grid d²(i,j) = (iH / 2)² + (jW / 2)². This is combined with σ to generate a dynamic high-pass mask hp_mask = 1 - exp(-d² / (2σ²+ε)). After expanding the mask to be identical to Freq, complex point-by-point multiplication is performed to obtain Freq_filtered, initially suppressing low-frequency background noise.

[0034] Adaptive Frequency Domain Basis Fusion Unit: A pre-registered learnable complex Fourier basis Base ∈ c^(H, W / / 2+1, K,2) is used to generate a content-adaptive frequency domain mask Mask_adaptive by weighted summation using the K-dimensional routing coefficients. Mask_adaptive is then multiplied point-by-point with the high-pass filtered Freq to explicitly enhance the vascular edge orientation information.

[0035] Inverse Real Fast Fourier Transform (irfft2) Unit: Receives the frequency domain features after double modulation, performs the inverse rfft2 transform, and outputs the recovered spatial features ∈R^(B, H, W, C), completing the frequency domain processing loop.

[0036] Channel restoration unit: Adjusts the channel dimension of the restored feature through a 1×1 convolutional layer to ensure that the number of channels is consistent with the input spatial feature Fs', and outputs the final frequency domain enhanced feature Fh, ensuring dimensionality compatibility with skip connection branches.

[0037] like Figure 4 As shown, the query generation module (cross-domain attention part) receives spatial features Fs through the internal structure of "1×1 convolution + depthwise separable convolution", generates attention query vectors from spatial features Fs, generates query representations representing spatial structure intent, and outputs query vector Q to guide the fusion of frequency domain features. The key-value generation module (cross-domain attention part) receives the frequency domain feature Fh and generates the attention key vector K and value vector V from the frequency domain feature Fh through the internal structure of "1×1 convolution to 2C channels + depthwise separable convolution + channel segmentation". This generates a key-value representation containing detailed information in the frequency domain, providing specific feature information for attention calculation. The feature serialization module receives the query Q and key-value pairs K / V, reshapes the internal structure by dimension, converts the three-dimensional feature map into a two-dimensional sequence, adapts to attention calculation, unifies the feature representation, and outputs serialized features to facilitate similarity calculation. A two-layer routing mechanism receives serialized Q and K, dynamically selects important feature positions, and outputs selected key-value pairs and routing weights to achieve sparse attention computation, significantly reducing computational complexity. The sparse attention computation module receives a query Q and selected key values ​​K_sel and V_sel. Through a multi-head attention mechanism, it only computes the attention between the query and the k selected keys, computes efficient attention at the selected positions, outputs attention features, realizes intelligent feature fusion, and balances computational efficiency with feature fusion quality. The output projection module receives the attention output, performs final adjustment and optimization on the attention output through a 1×1 convolutional layer, and outputs the fusion feature Ff to optimize the feature representation and enhance the fusion effect. The downsampling module receives the fused feature Ff, downsamples it through 2×2 max pooling or convolution, and outputs the downsampled feature to the next level encoder to reduce the feature map size, expand the receptive field range, and extract higher-level semantic features.

[0038] The bottleneck layer has a similar structure to the encoder single-stage, but without downsampling. It connects the encoder and decoder, contains the most abstract feature representation, and conveys high-level semantic information. The decoder as a whole is responsible for feature upsampling and segmentation, gradually restoring spatial resolution. Its internal structure consists of four cascaded decoder single-stages, each containing upsampling and feature fusion. The stages are concatenated, with the output of the previous stage serving as the input of the next stage, reconstructing detailed segmentation results from abstract features. Each decoder single-stage receives the output of the decoder above and the corresponding encoder skip connection features. Through an internal structure of "upsampling + feature concatenation + convolution processing," it performs feature fusion and upsampling, gradually restoring the feature map size, and combining encoder details for accurate segmentation.

[0039] The output layer receives the decoder output and outputs a blood vessel segmentation mask through an internal structure of "1×1 convolution + Sigmoid activation" to generate the final segmentation probability map, thus converting the feature representation into the final segmentation result.

[0040] Quantitative Comparison: To objectively evaluate the technical effectiveness of this invention, verification experiments were conducted on the publicly available standard datasets DRIVE and CHASE_DB1, and a comprehensive comparison was made with existing patented technologies. The evaluation metrics strictly adhered to medical image segmentation standards: Accuracy (ACC) measured overall pixel classification precision, Sensitivity (SE) evaluated blood vessel detection capability, Specificity (SP) reflected the level of background suppression, F1 score (F1) combined precision and recall, and Mean Intersection over Union (mIoU) quantified the degree of region overlap.

[0041] Performance on the DRIVE dataset: This invention achieves leading performance on this dataset with ACC 95.6%, SE 83.1%, SP 97.4%, F1 82.7%, and mIoU 82.7%. Compared to patents CN115641340A (SE 79.72%) and CN120673061A (SE 82.44%), this invention improves the vessel detection rate (SE) by 3.38 and 0.66 percentage points, respectively, and achieves best-in-class F1 and mIoU scores, demonstrating the advantage of learnable frequency domain masks in capturing weak vessel edges.

[0042] Generalization ability on the CHASE_DB1 dataset: On the CHASE_DB1 dataset, which has a higher proportion of lesion samples, this invention achieves excellent performance with ACC 97.7%, SE 84.1%, SP 98.8%, F1 84.1%, and mIoU 85.1%. This dataset has more complex vascular structures and stronger lesion interference; the SE of this invention still consistently reaches 84.1%, an improvement of 1.7-4.4 percentage points compared to existing technologies, demonstrating outstanding cross-dataset generalization ability.

[0043] The beneficial effects of this invention are as follows: (1) High segmentation accuracy: The frequency domain enhancement module effectively extracts high-frequency details of the blood vessel edges; the cross-domain fusion mechanism makes full use of complementary information in the spatial and frequency domains. The frequency domain enhancement module explicitly models blood vessel characteristics through dual-branch frequency domain enhancement, and can learn a Gaussian high-pass filter to dynamically suppress low-frequency background noise while retaining high-frequency components at the edges; the K-group can learn complex Fourier basis routing coefficients for weighted fusion, adaptively enhancing multi-directional slender blood vessel structures. In the cross-domain routing attention mechanism, spatial domain features are used as query guides for frequency domain feature fusion, realizing structure-guided details, avoiding information loss caused by simple splicing, and intelligently fusing spatial structure and frequency domain details; (2) Strong robustness: It has good robustness to changes in illumination and interference from lesion areas, and is suitable for retinal images of different qualities; (3) Optimization of computational efficiency: The learnable parameters in the dynamic frequency domain enhancement adaptively adjust the filtering intensity to avoid overfitting. The U-Net architecture ensures multi-scale information transmission while controlling computational complexity. (4) Good medical applicability: It is specially designed for the structural characteristics of retinal blood vessels and can effectively distinguish blood vessels from the background and lesion areas.

[0044] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for segmenting retinal vessels, characterized in that, include: Preprocess the input retinal image; Spatial domain features of images are extracted using a multi-level encoder-decoder architecture; Dynamic frequency domain enhancement processing is performed on the spatial domain features. The processing transforms the spatial domain features to the frequency domain through fast Fourier transform and generates a content-adaptive frequency domain mask based on learnable Gaussian parameters σ and complex Fourier basis to enhance the high-frequency components of the blood vessel edge and suppress low-frequency background noise in the frequency domain. Frequency domain enhancement features and spatial domain features are input into the cross-domain routing attention module and fused. Spatial domain features generate query vectors and frequency domain enhancement features generate key value vectors. A two-layer routing mechanism is used to filter key feature locations and calculate sparse attention. The decoder upsamples and fuses features to output the blood vessel segmentation result.

2. The retinal vessel segmentation method based on frequency domain enhancement as described in claim 1, characterized in that, The preprocessing includes: performing weighted grayscale processing on the color retinal image and assigning weight coefficients according to the contribution of vascular information in the color channels; performing contrast-limited adaptive histogram equalization on the grayscale image; adjusting the image brightness distribution through Gamma correction; and normalizing the image size to unify the resolution.

3. The method according to claim 1, characterized in that, The dynamic frequency domain enhancement processing specifically includes: The spatial domain features are subjected to global mean pooling along the channel dimension to obtain the global context vector; The global context vector is input into a multilayer perceptron to generate K-dimensional dynamic routing coefficients, which are then normalized by Softmax. The learnable Gaussian parameter σ and the K sets of complex Fourier basis are independently defined trainable parameters. σ is a learnable scalar that controls the intensity of the Gaussian high-pass filter, and the complex Fourier basis is a trainable complex tensor used for frequency domain enhancement. A complex frequency domain representation is obtained by performing a fast Fourier transform on the spatial domain features. A Gaussian distance grid matching the frequency domain size is constructed, and a dynamic high-pass mask is generated with the learnable parameter σ to suppress low-frequency background through complex point-by-point multiplication. K sets of learnable complex Fourier bases are introduced, and the K sets of bases are weighted and fused using the dynamic routing coefficients to obtain the adaptive frequency domain mask. The vascular edge direction information is then enhanced by complex point-by-point multiplication. Spatial features are recovered by inverse fast Fourier transform, and channel dimensions are adjusted by 1×1 convolution to output frequency domain enhanced features.

4. The method according to claim 3, characterized in that, The dynamic high-pass mask is generated according to the following formula: ; Where d² is the squared grid distance between the center of the frequency domain, and ε is a small constant to prevent division by zero.

5. The method according to claim 1, characterized in that, The cross-domain routing attention module executes: The spatial domain features are used to generate a query vector through 1×1 convolution and depthwise separable convolution. The frequency domain enhanced features are convolved with 1×1 to double the channels and then segmented to generate key value vectors; The three-dimensional feature map is converted into a two-dimensional sequence through feature serialization operations; A two-layer routing mechanism is used to filter key feature locations and calculate sparse attention.

6. The method according to claim 5, characterized in that, The two-layer routing mechanism includes: Calculate the similarity between the spatial domain global query and the frequency domain global key; The top k most similar key-value pairs are selected to generate a routing index; Perform soft-weight fusion on the key-value vectors based on the routing index; Calculate attention weights at selected locations using sparse multi-head attention.

7. The method according to claim 6, characterized in that, The similarity calculation uses cosine similarity or dot product similarity, and the value of k is 4 or a dynamic adaptive value.

8. The method according to claim 1, characterized in that, The multi-level encoder-decoder architecture adopts an improved U-Net architecture, in which each encoder level contains an independent spatial feature extraction branch and a frequency domain processing branch, and the fused features output by each level are directly passed to the corresponding level decoder through skip connections.

9. The method according to claim 8, characterized in that, The skip connection mechanism is specifically as follows: Establish a feature buffer channel at the output of each stage of the encoder; The dual-stream information, which includes spatial domain features and frequency domain fusion features, is directly injected into the corresponding layer of the decoder; Upsampled features and skip features are integrated by channel splicing.

10. The method according to claim 1, characterized in that, The dynamic frequency domain enhancement process includes frequency domain transformation and dimension alignment operations: After performing tensor dimension ordering on the spatial domain features, a fast Fourier transform is called to generate a complex frequency domain representation; After completing high-pass filtering and adaptive masking dual modulation, spatial features are recovered through inverse fast Fourier transform; The channel dimension of the recovered features is adjusted using a 1×1 convolutional layer to match the number of channels required by the skip connections or decoder.