A retinal blood vessel segmentation method based on direction perception structure guidance and related equipment

CN122550618APending Publication Date: 2026-08-11GUANGZHOU UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-22
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

现有方法往往只能针对部分血管类型进行优化,例如通过增加卷积层或多尺度输入改善微血管识别,但在整体结构一致性和方向敏感性上仍显不足

Benefits of technology

[0015]本申请实施例还公开了一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器可以从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行前面的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122550618A_ABST
    Figure CN122550618A_ABST
Patent Text Reader

Abstract

This application discloses a direction-aware structure-guided retinal vessel segmentation method and related equipment. The proposed method utilizes a direction-aware structure-guided network (DSG-Net) to achieve joint learning of long- and short-range information sensitive to vessel direction through three core modules. First, an axial structure extraction module actively captures the directional features of vessels, enhancing the continuity of long-range vessels. Second, a direction-aware skip attention module selectively emphasizes important information along the vessel direction during cross-layer feature transfer between the encoder and decoder, achieving fine fusion of long- and short-range vessels. Finally, a global confidence prior module introduces an overall structural prior to globally modulate the segmentation results, improving microvessel recognition accuracy while maintaining consistency between the main vessels and the overall structure. This approach can be widely applied in the field of artificial intelligence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a method and related equipment for retinal vessel segmentation based on orientation-aware structure guidance. Background Technology

[0002] Retinal vessel segmentation is a crucial foundation for early diagnosis and treatment decisions in ophthalmology, and its accuracy directly impacts the detection and disease assessment of conditions such as diabetic retinopathy, hypertensive retinopathy, and glaucoma. Retinal vessels exhibit a complex tree-like structure, including crisscrossing long-range trunk vessels and densely distributed, morphologically diverse short-range capillaries. Long-range vessels carry the primary blood flow information and form the skeleton of the overall vascular network; their continuity is essential for understanding the vascular tree structure. Short-range capillaries, on the other hand, are important markers of early disease development; their small diameter, complex tortuous nature, and susceptibility to background noise make them difficult to detect. For vessel segmentation methods, simultaneously capturing the continuity of long-range vessels and the details of short-range vessels is the core challenge for achieving high-precision segmentation.

[0003] Traditional convolutional neural networks rely primarily on local receptive fields during feature extraction, making it difficult to model the global dependence of long-range blood vessels. This can easily lead to main vessel breaks or structural discontinuities, while short-range capillaries, due to their small size and low contrast, are often misclassified as background or blurred, resulting in incomplete segmentation results. While existing improved methods using multi-scale convolution, residual connections, or attention mechanisms have enhanced feature representation capabilities to some extent, most methods lack systematic modeling of the directional information of blood vessels, making it difficult to effectively capture microvascular details while ensuring the continuity of the main vessels.

[0004] Furthermore, retinal images are significantly affected by illumination, noise, and other anatomical structures, making vessel segmentation even more challenging. In real-world clinical scenarios, the rupture of long-range vessels or the omission of short-range microvessels directly impacts lesion localization, vessel density calculation, and disease risk assessment. Existing methods often only offer optimization for specific vessel types, such as improving microvessel recognition by adding convolutional layers or multi-scale inputs, but they remain insufficient in terms of overall structural consistency and directional sensitivity. Summary of the Invention

[0005] The main objective of this application is to propose a retinal vessel segmentation method and related equipment based on orientation-aware structure guidance, which can maintain the continuity of long-range main vessels and accurately identify short-range capillaries, thereby achieving retinal vessel segmentation with structural integrity, high precision, and strong robustness.

[0006] To achieve the above objectives, one aspect of this application proposes a method for retinal vessel segmentation based on orientation-aware structure guidance, comprising: Based on the obtained retinal vessel segmentation dataset, training set, validation set and test set are constructed; A DSG-Net model is constructed, comprising an encoder, a direction-aware skip attention module, and a decoder. The encoder includes an axial structure extraction module, which extracts direction-sensitive features from the raw retinal image to enhance the continuity of long-range main blood vessels and preserve the detailed information of short-range capillaries. The direction-aware skip attention module performs direction perception on the multi-layer features output by the encoder to obtain direction-aware features. The decoder fuses the direction-aware features output by the direction-aware skip attention module and gradually restores spatial resolution through upsampling and convolution operations. The DSG-Net model is trained using the training set, and the first model trained is validated using the validation set. The first model was tested using the test set to confirm that the target model that had been trained was obtained. The newly acquired retinal vessel image to be identified is segmented using the target model to obtain the segmentation result.

[0007] In some embodiments, the processing procedure of the axial structure extraction module includes: A local depthwise convolution operation is performed on the input first feature map to extract local spatial features and enhance the vascular texture information in the first feature map; The spatial local features are branched along horizontal and vertical stripes, and then the feature maps output from the two branches are fused to obtain the directional feature map. Based on the spatial attention mechanism, each spatial location of the directional feature map is weighted to obtain a spatial attention map; The orientation feature map is multiplied element-wise with the spatial attention map to obtain the orientation perception feature map; The first feature map of the original input is residually fused with the orientation-aware feature map to obtain the second feature map of the final output.

[0008] In some embodiments, the processing of the orientation-aware jump attention module includes: Obtain the deep feature map output by the encoder, and extract the feature responses in the horizontal and vertical directions through directional strip convolution to obtain the convolutional features in the horizontal and vertical directions. The horizontal and vertical convolutional features are concatenated along the channel dimension, and channel dimensionality reduction and feature fusion are performed through 1×1 convolution. Then, spatial attention weights are generated through batch normalization and Sigmoid mapping. The spatial attention weights are multiplied element-wise with the deep feature map output by the encoder, and orientation-aware jump features are generated through a residual mechanism.

[0009] In some embodiments, the method further includes: adding a global confidence prior module to the deep features of the encoder, wherein the global confidence prior module is used to perform channel-level modulation on the deep features by generating global orientation confidence, so as to ensure the orientation consistency of blood vessels in spatial and channel dimensions and the integrity of the overall structure.

[0010] In some embodiments, the processing procedure of the global confidence prior module includes: Obtain the bottleneck feature map output by the encoder, perform global average pooling on the bottleneck feature map to compress the spatial dimension into single-point features, and obtain the global statistical features of each channel. The global statistical features are subjected to 1×1 convolution mapping to achieve inter-channel information fusion, and then the global orientation confidence is generated by batch normalization and Sigmoid activation function. The global directional confidence and high-level features are fused along the channel dimension through a channel-by-channel multiplication operation.

[0011] In some embodiments, constructing a training set, a validation set, and a test set based on the acquired retinal vessel segmentation dataset includes: The acquired retinal vessel segmentation dataset is converted to grayscale. Standardize the image after grayscale conversion; The standardized image undergoes adaptive histogram equalization. Gamma correction is applied to the image after adaptive histogram equalization. The images after gamma correction are normalized to complete the image preprocessing, and the training set, validation set and test set are constructed. After the images are preprocessed, the training and validation sets are augmented with data, including random cropping, random horizontal flipping, random vertical flipping, and random rotation.

[0012] Another aspect of this application embodiment provides a retinal vessel segmentation device based on orientation-aware structure guidance, including: The first module is used to construct the training set, validation set, and test set based on the acquired retinal vessel segmentation dataset; The second module is used to construct the DSG-Net model, which includes an encoder, a direction-aware skip attention module, and a decoder. The encoder includes an axial structure extraction module, which extracts direction-sensitive features from the raw retinal image to enhance the continuity of long-range main blood vessels and preserve the detailed information of short-range capillaries. The direction-aware skip attention module performs direction perception on the multi-layer features output by the encoder to obtain direction-aware features. The decoder fuses the direction-aware features output by the direction-aware skip attention module and gradually restores spatial resolution through upsampling and convolution operations. The third module is used to train the DSG-Net model based on the training set and to verify the performance of the trained first model using the validation set. The fourth module is used to test the performance of the first model using the test set, and to confirm that the target model has been successfully trained. The fifth module is used to perform retinal vessel segmentation processing on the newly acquired retinal vessel image to be identified using the target model, and obtain the segmentation result.

[0013] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.

[0014] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.

[0015] This application also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.

[0016] The embodiments of this application include at least the following beneficial effects: This application provides a retinal vessel segmentation method and related equipment based on orientation-aware structure guidance. This scheme constructs a training set, a validation set, and a test set based on the acquired retinal vessel segmentation dataset; constructs a DSG-Net model, which includes an encoder, an orientation-aware skip attention module, and a decoder. The encoder includes an axial structure extraction module; the axial structure extraction module is used to extract orientation-sensitive features from the original retinal image, enhancing the continuity of long-range main vessels and preserving the detailed information of short-range capillaries; the orientation-aware skip attention module is used to perform orientation perception on the multi-layer features output by the encoder to obtain orientation-aware features; the decoder is used to fuse the orientation-aware features output by the orientation-aware skip attention module, gradually restoring spatial resolution through upsampling and convolution operations; the DSG-Net model is trained based on the training set, and the first model trained is validated using the validation set; the first model is tested using the test set to confirm the completion of the target model training; the target model is used to perform retinal vessel segmentation processing on newly acquired retinal vessel images to be identified, obtaining the segmentation result. The embodiments of this application can maintain the continuity of long-range main blood vessels and accurately identify short-range capillaries, thereby achieving retinal vessel segmentation with complete structure, high accuracy and strong robustness, which helps to improve the reliability of automated vascular analysis. Attached Figure Description

[0017] Figure 1 This is a schematic diagram of an implementation environment provided in an embodiment of this application; Figure 2 This is a flowchart of the overall steps provided in the embodiments of this application; Figure 3 This is a schematic diagram of the DSG-Net network structure provided in an embodiment of this application; Figure 4 This is a structural diagram of the ASE module provided in the embodiments of this application; Figure 5 This is a structural diagram of the DSA module provided in the embodiments of this application; Figure 6 This is a structural diagram of the GCP module provided in an embodiment of this application; Figure 7 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0019] It is understood that the terms "first," "second," "third," "fourth," etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0020] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0021] 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 application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0022] Before providing a detailed description of the embodiments of this application, some related technologies involved in the embodiments of this application will be described first, as follows: Existing retinal vessel segmentation techniques mainly include those based on Fully Convolutional Networks (FCNs) and their multi-scale improved convolutional networks, attention mechanisms (AMs) or graph convolutional networks (GCNs) to enhance global dependency modeling, and strategies to improve microvessel recognition capabilities through multi-scale input or residual enhancement modules. Methods based on FCNs or UNets extract multi-scale features through encoder-decoder structures, which can identify vessels of varying thicknesses to some extent and improve vessel edge detection. However, their local convolutional operations are limited by the receptive field, making it difficult to guarantee the continuity of long-range main vessels, and they still have shortcomings in capturing the fine features of short-range capillaries.

[0023] Attention-based mechanisms (AM) and graph convolutional networks (GCNs) enhance global structure perception through feature weighting in spatial or channel dimensions, partially alleviating the problem of long-range vessel rupture. However, most designs lack directional awareness constraints, and the fusion of long- and short-range vessel information remains insufficiently refined, resulting in limited accuracy in microvessel recognition. Multi-scale input or residual enhancement methods can achieve some improvement in microvessel detection, but they fail to systematically address the issues of long-range vessel continuity and directional sensitivity, and may still result in missed microvessels or misjudgments due to noise in complex backgrounds.

[0024] To address these shortcomings, this application proposes a Directional Structural Guidance U-Net (DSG-Net) network, which achieves joint learning of long- and short-range information sensitive to vessel direction through three core modules. First, the Axis-aligned Structure Extraction (ASE) module actively captures the directional features of vessels, enhancing the continuity of long-range vessels. Second, the Directional Skip Attention (DSA) module selectively emphasizes important information along the vessel direction during cross-layer feature transfer between the encoder and decoder, achieving fine fusion of long- and short-range vessels. Finally, the Global Confidence Prior (GCP) module introduces a global structural prior, globally modulating the segmentation results to improve microvessel recognition accuracy while maintaining consistency between the main vessels and the overall structure.

[0025] The orientation-aware structure-guided retinal vessel segmentation method and related equipment provided in this application relate to the technical fields of artificial intelligence, machine learning, image processing, and clinical medical image analysis. The orientation-aware structure-guided retinal vessel segmentation method provided in this application can be applied to a terminal, a server, or software running on a terminal or server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application implementing the orientation-aware structure-guided retinal vessel segmentation method, but is not limited to the above forms.

[0026] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0027] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.

[0028] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided in an embodiment of this application. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.

[0029] Server 101 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0030] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.

[0031] Terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc. It can also be a vehicle-mounted terminal of the various device types described above, but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment does not impose any limitations.

[0032] Exemplary based on Figure 1 The implementation environment shown in this application embodiment provides a retinal vessel segmentation method based on orientation-aware structure guidance. The following description uses the application of this orientation-aware structure guidance retinal vessel segmentation method in server 101 as an example. It can be understood that this method can also be applied in terminal 102.

[0033] Reference Figure 2 , Figure 2 The flowchart illustrates a orientation-aware structure-guided retinal vessel segmentation method applied to a server, as provided in this application embodiment. The execution entity of this method can be any of the aforementioned computer devices (including a server or terminal). See also... Figure 2 The method may include the following steps: Based on the obtained retinal vessel segmentation dataset, training set, validation set and test set are constructed; A DSG-Net model is constructed, comprising an encoder, a direction-aware skip attention module, and a decoder. The encoder includes an axial structure extraction module, which extracts direction-sensitive features from the raw retinal image to enhance the continuity of long-range main blood vessels and preserve the detailed information of short-range capillaries. The direction-aware skip attention module performs direction perception on the multi-layer features output by the encoder to obtain direction-aware features. The decoder fuses the direction-aware features output by the direction-aware skip attention module and gradually restores spatial resolution through upsampling and convolution operations. The DSG-Net model is trained using the training set, and the first model trained is validated using the validation set. The first model was tested using the test set to confirm that the target model that had been trained was obtained. The newly acquired retinal vessel image to be identified is segmented using the target model to obtain the segmentation result.

[0034] In some embodiments, the processing procedure of the axial structure extraction module includes: A local depthwise convolution operation is performed on the input first feature map to extract local spatial features and enhance the vascular texture information in the first feature map; The spatial local features are branched along horizontal and vertical stripes, and then the feature maps output from the two branches are fused to obtain the directional feature map. Based on the spatial attention mechanism, each spatial location of the directional feature map is weighted to obtain a spatial attention map; The orientation feature map is multiplied element-wise with the spatial attention map to obtain the orientation perception feature map; The first feature map of the original input is residually fused with the orientation-aware feature map to obtain the second feature map of the final output.

[0035] In some embodiments, the processing of the orientation-aware jump attention module includes: Obtain the deep feature map output by the encoder, and extract the feature responses in the horizontal and vertical directions through directional strip convolution to obtain the convolutional features in the horizontal and vertical directions. The horizontal and vertical convolutional features are concatenated along the channel dimension, and channel dimensionality reduction and feature fusion are performed through 1×1 convolution. Then, spatial attention weights are generated through batch normalization and Sigmoid mapping. The spatial attention weights are multiplied element-wise with the deep feature map output by the encoder, and orientation-aware jump features are generated through a residual mechanism.

[0036] In some embodiments, the method further includes: adding a global confidence prior module to the deep features of the encoder, wherein the global confidence prior module is used to perform channel-level modulation on the deep features by generating global orientation confidence, so as to ensure the orientation consistency of blood vessels in spatial and channel dimensions and the integrity of the overall structure.

[0037] In some embodiments, the processing procedure of the global confidence prior module includes: Obtain the bottleneck feature map output by the encoder, perform global average pooling on the bottleneck feature map to compress the spatial dimension into single-point features, and obtain the global statistical features of each channel. The global statistical features are subjected to 1×1 convolution mapping to achieve inter-channel information fusion, and then the global orientation confidence is generated by batch normalization and Sigmoid activation function. The global directional confidence and high-level features are fused along the channel dimension through a channel-by-channel multiplication operation.

[0038] In some embodiments, constructing a training set, a validation set, and a test set based on the acquired retinal vessel segmentation dataset includes: The acquired retinal vessel segmentation dataset is converted to grayscale. Standardize the image after grayscale conversion; The standardized image undergoes adaptive histogram equalization. Gamma correction is applied to the image after adaptive histogram equalization. The images after gamma correction are normalized to complete the image preprocessing, and the training set, validation set and test set are constructed. After the images are preprocessed, the training and validation sets are augmented with data, including random cropping, random horizontal flipping, random vertical flipping, and random rotation.

[0039] The following describes in detail the specific implementation process of the orientation-aware structure-guided retinal vessel segmentation method of this application, taking a specific application scenario as an example, with reference to the accompanying drawings: To address the shortcomings of existing technologies, this application proposes the Directional Structural Guidance U-Net (DSG-Net), which achieves joint learning of long- and short-range information sensitive to vessel direction through three core modules. First, the Axis-aligned Structure Extraction (ASE) module actively captures the directional features of vessels, enhancing the continuity of long-range vessels. Second, the Directional Skip Attention (DSA) module selectively emphasizes important information along the vessel direction during cross-layer feature transfer between the encoder and decoder, achieving fine fusion of long- and short-range vessels. Finally, the Global Confidence Prior (GCP) module introduces a global structural prior, globally modulating the segmentation results to improve microvessel recognition accuracy while maintaining consistency between the main vessels and the overall structure.

[0040] Compared with existing technologies, this application not only has significant advantages in the continuity of long-range main blood vessels and the accuracy of short-range microvessel identification, but also significantly enhances the robustness of vascular segmentation in complex backgrounds. This method can naturally unify long-range and short-range vascular information, achieving high-precision, structurally intact, and clinically usable segmentation results, providing reliable technical support for the early diagnosis of ophthalmic diseases and vascular morphology analysis.

[0041] Specifically, this application may include the following steps: Step 1: Obtain the retinal vessel segmentation dataset and divide it into training, validation, and test sets.

[0042] Step 2: Preprocess the dataset to reduce image noise, improve the contrast between blood vessel pixels and background pixels, and thus improve the segmentation accuracy of the deep learning model for retinal blood vessels. First, the dataset images are converted to grayscale. The grayscale conversion method adopted in this application is to extract the G channel (green channel) from the RGB image, because the contrast between the blood vessel contour and the background is the highest and the noise is the least on the green channel. The grayscale conversion formula is shown in Formula 1.

[0043] (1) in G ( () represents the brightness value of the G channel in an RGB image.

[0044] Next, the image is standardized by scaling the overall grayscale value to prevent extreme situations in the image data and to some extent solve the problem of uneven illumination in fundus images. The standardization formula is shown in Formula 2.

[0045] (2) in The pixel values ​​of the image. The standardized image pixel values, The mean of the image pixel values. The standard deviation of the image pixel values. and The calculation formulas are shown in Equations 3 and 4.

[0046] (3) (4) in W The number of rows of pixels in the image. H This represents the number of columns of pixels in the image.

[0047] The image is then subjected to adaptive histogram equalization, which stretches the grayscale histogram of the original image to a certain extent, thereby improving the image contrast and limiting the extremely dark and bright parts of the image.

[0048] Gamma correction is applied to the image to suppress phenomena such as uneven illumination and central line reflection in fundus images. The gamma correction formula used in this application is shown in Formula 5.

[0049] (5) in x The pixel values ​​of the image are variables in this application. A The variable takes a value of 1. The value is 0.8.

[0050] Finally, the fundus image data was normalized, reducing the gray levels from 0 to 255 to between 0 and 1 to facilitate subsequent model calculations on the image data.

[0051] Step 3: After image preprocessing, since the amount of data in the fundus image dataset is relatively small, data augmentation processing is required for the training and validation sets to increase the amount of data in both sets, especially the training set, as sufficient training data is necessary to train the retinal vessel segmentation model. This application uses four data augmentation processes: (1) random cropping, randomly cropping the image into 64×64 image blocks; (2) random horizontal flipping; (3) random vertical flipping; and (4) random rotation. After data augmentation, a large number of images can be obtained for training and validation of the segmentation model.

[0052] Step 4: This application builds DSG-Net (Directional Structural Guidance U-Net) within the PyTorch deep learning framework for high-precision retinal vessel segmentation. For example... Figure 3 As shown, this network is an improvement on the classic U-Net, with an overall U-shaped structure consisting of a left encoder and a right decoder. Compared to the traditional U-Net, DSG-Net retains a 4-layer encoder-decoder structure, with each layer having approximately half the number of output channels as U-Net, thus significantly reducing the overall model parameter count and computational cost while maintaining efficient representation of vascular features.

[0053] The network first introduces an Axis-aligned Structure Extraction (ASE) module in the encoder section to extract direction-sensitive features from the raw retinal image, enhancing the continuity of long-range main blood vessels while preserving detailed information of short-range capillaries. During feature transfer, the multi-layer features of the encoder are fused with the decoder through a Directional Skip Attention (DSA) module, selectively enhancing important information along the blood vessel direction, achieving joint modeling of long and short-range blood vessel features, and effectively suppressing the interference of background noise.

[0054] The decoder gradually restores spatial resolution through upsampling and convolution operations, while fusing the orientation-aware features from the DSA output to ensure the continuity of vascular structures and the full preservation of microvascular details. Before the decoder output, the network further introduces a Global Confidence Prior (GCP) module to integrate global vascular structure prior information and globally modulate the segmentation features, thereby reducing local breaks or missegmentation and improving overall structural consistency. To further improve the accuracy of vascular segmentation, DSG-Net supports multi-scale feature information fusion, integrating multi-layer features from the encoder and decoder, enabling the model to simultaneously capture vascular features at different scales and achieve joint representation of microvessels and main vessels. While ensuring high-precision segmentation, the entire network employs a lightweight design and parameter sharing mechanism, resulting in a moderate number of model parameters, making it suitable for practical clinical image analysis applications.

[0055] Step 5: To address the issues of long-range main vessel fragmentation, loss of microvascular details, and insufficient orientation information in existing retinal vessel segmentation methods, this application incorporates an Axis-aligned Structure Extraction (ASE) module within the encoder. This module extracts structural information of vessels along different directions from the input feature map, achieving orientation-sensitive feature enhancement. This preserves the detailed features of microvessels while maintaining the continuity of main vessels, providing high-quality feature input for subsequent orientation-aware skip attention and global confidence prior modules. The overall structure of the ASE module is as follows: Figure 4 As shown.

[0056] In this application, the ASE module first processes the input feature map F∈R C×H×W Local depthwise convolution is performed to extract basic local spatial features and enhance vascular texture information in the feature map. The representation of local depthwise convolution is shown in Equation 6.

[0057] (6) in, This is the feature map after local convolution. This operation can initially enhance the details of blood vessels while preserving the integrity of the local structure.

[0058] Subsequently, the ASE module branches the local convolutional features along two main directions: horizontal strip convolution and vertical strip convolution. Horizontal strip convolution extracts long-range features in the horizontal direction using a 1×k kernel, while vertical strip convolution extracts long-range features in the vertical direction using a k×1 kernel. Here, k can be set by parameter tuning, and different values ​​can be set at different levels to extract local features more specifically. The corresponding operation formulas are shown in Formulas 7 and 8.

[0059] (7) (8) This branching process enhances the features of the main vascular trunk along its extension direction, significantly enhancing the long-term main vascular trunk in the encoder features while suppressing the interference of background and noise on the vascular features. Subsequently, the feature maps output from the horizontal and vertical convolutions are fused to obtain the directional feature map. The corresponding formula is shown in Formula 9.

[0060] (9) Orientation feature fusion not only preserves vascular responses in both horizontal and vertical directions, but also enhances the continuity of main blood vessels through overlay operations, providing directional priors for subsequent spatial attention calculations. In the orientation feature map... Building upon this, the ASE module introduces a spatial attention mechanism to weight each spatial location of the feature map, thereby highlighting important feature regions along the blood vessel direction and reducing interference from irrelevant background. The operational formula for spatial attention is shown in Equation 10.

[0061] (10) The process involves first reducing the channel dimensionality using 1×1 convolutions, then normalizing the spatial locations using a softmax operation, and finally restoring the number of channels using 1×1 convolutions. (Spatial attention map) With directional feature map Perform element-wise multiplication to obtain the orientation-aware feature map. The formula is expressed as shown in Formula 11.

[0062] (11) Here, ⊙ represents element-wise multiplication. This operation significantly amplifies orientation-aware features in the main vascular region, while suppressing background and irrelevant region features, thus enhancing vascular orientation sensitivity.

[0063] To capture microvascular details in the output features, the ASE module combines the original input feature map F with the orientation-aware feature map. Residual fusion is performed to obtain the final output feature map. Residual fusion can effectively preserve microvascular texture information, while enhancing the continuity of main blood vessels, ensuring the stability of network training, and avoiding the loss of microvascular details during feature enhancement.

[0064] Through the above steps, the ASE module achieves three main functions: first, it extracts long-range structural features along the blood vessel direction to improve the continuity of the main blood vessels; second, it highlights direction-related regions through spatial attention while suppressing background interference, thereby improving the accuracy of microvessel recognition; and third, it preserves the integrity of input features through residual fusion, ensuring the synchronous expression of microvessel texture and main blood vessel information. These functions work together to enable the network to obtain direction-sensitive and structurally complete features at the encoder stage, providing effective support for the cross-layer feature fusion of the subsequent direction-aware skip attention module, and laying the foundation for the global confidence prior module to globally modulate the blood vessel structure at the decoder stage.

[0065] The ASE module in this application achieves the extraction of vascular orientation-sensitive features and joint modeling of long and short-range vessels through a joint design of local convolution, directional convolution, spatial attention, and residual fusion. While ensuring the continuity of the main vessels, it preserves the detailed information of microvessels, thereby significantly improving the segmentation accuracy and structural consistency of the retinal vessel segmentation network in complex backgrounds, providing a reliable feature basis for automated clinical vascular analysis.

[0066] Step 6: In retinal vessel segmentation, the continuity of long-range main vessels and the preservation of microvascular details are crucial for network segmentation accuracy. Traditional encoder-decoder structures rely solely on skip connections for cross-layer feature transfer, lacking awareness and selective enhancement of vessel orientation information. Therefore, this application designs a Directional Skip Attention (DSA) module at the deep feature R3 of the encoder to enhance the orientation sensitivity of encoder features. This allows the encoder to prioritize important features along the main vessel direction during upsampling and stitching in the decoder, while suppressing irrelevant background information, thus achieving joint modeling of long and short-range vessel features. The overall structure of the DSA module is as follows: Figure 5 As shown.

[0067] The input to the DSA module is the deep feature map F of the encoder. R3 ∈R C×H×W The module first extracts the feature responses in the horizontal and vertical directions through directional strip convolution, as shown in formulas 12 and 13.

[0068] (12) (13) Here, Conv1×7 represents strip convolution that expands the receptive field horizontally, and Conv7×1 represents strip convolution that expands vertically. Both are implemented using depthwise convolution, ensuring that channel information is preserved while significantly reducing computational cost. This operation can capture the spatial dependence of long-range vessels along the trunk direction and enhance the expression of local microvessels and branch structures.

[0069] Next, the horizontal and vertical convolutional features are concatenated along the channel dimension, and then 1×1 convolution is used for channel dimensionality reduction and feature fusion. Finally, batch normalization and sigmoid mapping are applied to generate spatial attention weights A∈[0,1]. C×H×W The corresponding formula for this operation is shown in Formula 14.

[0070] (14) Where [H;V] represents the concatenation operation in the channel dimension. This is the Sigmoid activation function, used to normalize the attention weights to the [0,1] interval. Spatial attention weights. It is used to indicate the importance of each spatial location along the vascular direction, which can enhance the characteristics of continuous areas of the main vascular trunk while suppressing irregular background and noise.

[0071] Finally, the DSA module performs element-wise multiplication of the attention weights and encoder features, and generates orientation-aware jump features through the residual mechanism. The corresponding formula for this operation is shown in Formula 15.

[0072] (15) Where α∈[0,1] is a learnable adjustment coefficient used to control the enhancement magnitude of orientation-aware features. This represents an element-wise multiplication operation. Residual fusion ensures that while enhancing orientation-aware features, it maintains the integrity of the encoder's original feature information, avoids the loss of microvascular details, and provides a smooth gradient flow during cross-layer feature transfer, which is beneficial to the stability of network training.

[0073] The shallow features of R1 and R2 mainly contain local low-level textures, and their orientation information is unstable. Applying DSA may introduce noise, affecting feature representation. R3, located deep in the encoder, can express the global long-range structural information of blood vessels while preserving microvascular and branch information, making it suitable for orientation-aware enhancement. Furthermore, the deep feature channel count and spatial size are moderate; using DSA in R3 can achieve orientation-aware enhancement without significantly increasing computation. The deepest layer, R4, is the bottleneck layer; its features are mainly passed to the decoder through upsampling, and direct DSA enhancement has limited value.

[0074] The DSA module achieves orientation-sensitive modulation of cross-layer features through strip-oriented convolution, attention fusion, and residual enhancement. This module enhances the continuity of long-range main blood vessels, preserves microvascular details, and provides orientation prior support, offering a high-quality feature foundation for the decoder's upsampling and feature fusion. Simultaneously, the module's design balances accuracy and computational efficiency, enabling the network to maintain high segmentation accuracy and structural integrity even in complex fundus backgrounds.

[0075] Step 7: In the retinal vessel segmentation task, although local orientation sensing features are extracted using the ASE module and cross-layer orientation enhancement features are implemented using the DSA module, relying solely on these local and mid-layer enhancements is still insufficient to guarantee the orientation consistency and structural integrity of long-range main vessels globally. To address this issue, this application designs a Global Direction Confidence (GCP) module on the deep features of the encoder. This module performs channel-level modulation of high-level features by generating global orientation confidence, thereby ensuring the orientation consistency and overall structural integrity of vessels in both spatial and channel dimensions. The overall structure of the GCP module is as follows: Figure 6 As shown.

[0076] The GCP module uses the encoder's deepest bottleneck feature map F R4 ∈R C×H×WAs input, the feature map not only contains rich global vascular information but also preserves the details of microvessels. Internally, the bottleneck features are first subjected to Global Average Pooling (GAP), compressing the spatial dimension into single-point features to obtain global statistical information for each channel. This operation extracts the average response of each channel in the feature map across the entire image, reflecting the overall extension trend and direction information of the blood vessels in that channel. Through GAP, the module can capture the extension structure of blood vessels at a global scale, providing a reliable prior for channel-level confidence calculation. Based on this, a 1×1 convolution mapping is performed on the global statistical feature Z to achieve inter-channel information fusion, followed by batch normalization and a sigmoid activation function to generate global orientation confidence. The formula for this operation is shown in Equation 16.

[0077] (16) The convolutional operation here enables a learnable mapping of channel features, batch normalization ensures stable feature distribution, and sigmoid activation maps the confidence scores to the [0,1] interval. The generated global orientation confidence score... The reliability of each channel in global directional consistency is quantified, providing explicit weight information for high-level feature modulation. This enables the network to highlight channels with high directional consistency and suppress directionally unstable or noisy channels. After obtaining the global directional confidence, It integrates with high-level features in the channel dimension.

[0078] Through channel-by-channel multiplication, high-level features spatially preserve the original microvascular and trunk vessel information while enhancing global directional consistency along the channel dimension. This operation enables directional coordination of trunk and microvessels at the global scale while maintaining local details, thereby effectively improving the continuity and overall structural consistency of long-range vessels.

[0079] In practical applications, the GCP module ensures that the network outputs a visually natural and continuous vascular structure in the vessel segmentation map. It also enhances the consistency of main vessel orientation and the fidelity of microvascular details, enabling the network to achieve high-precision and robust vessel segmentation even in complex backgrounds, low-contrast, and unevenly illuminated fundus images. The introduction of global orientation confidence not only improves the continuity of long-range vessels but also provides a reliable global prior for the decoder, achieving a harmonious balance between local feature enhancement and global structure preservation. This provides a robust feature foundation for automated clinical retinal vessel analysis and pathological assessment.

[0080] The GCP module's design fully considers the extraction of global structural information and the modulation of high-level features. Through global statistics of bottleneck features, the module can capture the extension trend of the entire retinal vessel in the deep feature space, while channel-weighted modulation ensures that this global directional information can be transmitted to the decoder upsampling stage, achieving global guidance for upsampled features. Through this combination of local directional sensing features, cross-layer directional enhancement features, and global directional confidence, the network forms a joint local-global feature modeling mechanism. The ASE module provides local directional enhancement, the DSA module strengthens cross-layer directional consistency, and the GCP module performs channel modulation of high-level features at the global scale, enabling the entire network to achieve high consistency in the segmentation of microvessels and trunk vessels.

[0081] Step 8: Train the model using images from the training set. The loss function used during training is the cross-entropy loss function, as shown in Equation 17.

[0082] (17) in N The total number of pixels in the image. Indicates input pixels i Probability of future forecasts For pixels i The true label is 1 (vessel) or 0 (non-vessel) in the retinal vessel segmentation task. The trained model can be validated using validation set images. Based on the current model's segmentation performance on the validation set, the model's hyperparameters are tuned. Through multiple adjustments to the hyperparameters, the model's performance is optimized, thus completing the model training.

[0083] Step 9: After completing the training of the retinal vessel segmentation model, use test set images to perform a final performance test on the segmentation model. Evaluate the vessel segmentation effect according to the evaluation indicators. The evaluation indicators that need to be calculated are: accuracy (ACC), sensitivity (SE), specificity (SP), and F1-score. The calculation formulas for each evaluation indicator can be found in Formulas 18 to 23.

[0084] (18) (19) (20) (twenty one) (twenty two) (twenty three) in, TP This indicates a true positive, meaning the actual target is a positive sample, and the algorithm also classifies that target as a positive sample. TN A true negative indicates that the actual sample is a negative sample, and the algorithm also classifies the negative sample as a negative sample. FP This indicates a false positive, meaning that the sample was actually negative, but the algorithm incorrectly identified it as a positive sample. FN This indicates a false negative, meaning that the sample was actually positive, but the algorithm incorrectly identified it as a negative sample. For accuracy, Recall Recall is the most important metric. All the above metrics range from 0 to 1; the higher the value, the better the segmentation performance of the algorithm. Precision represents the percentage of correctly classified pixels out of the total number of pixels in the image, reflecting the overall performance of the algorithm. Sensitivity, also known as the true positive rate, represents the percentage of correctly classified blood vessel pixels out of real blood vessel pixels, reflecting the algorithm's ability to detect blood vessel pixels. Specificity represents the percentage of correctly classified background pixels out of the number of real background pixels segmented by experts, reflecting the network's ability to discriminate background information. The F1-score comprehensively considers precision and recall. Ideally, both precision and recall should be high, but generally, high precision leads to low recall, and vice versa. Therefore, a new metric has been introduced. F1 score The harmonic value of precision and recall is taken into account.

[0085] This application addresses the task of retinal vessel segmentation, aiming to improve segmentation accuracy by providing a direction-aware structure-guided retinal vessel segmentation method (DSG-Net). Current mainstream vessel segmentation networks primarily employ convolutional neural networks (CNNs), but these methods suffer from the following shortcomings: First, ordinary convolutional modules have limited feature extraction capabilities and cannot distinguish the importance of different features, making them susceptible to interference from invalid features during feature extraction, thus affecting segmentation accuracy. Second, to obtain multi-scale semantic information, existing models often use downsampling operations, but downsampling loses a significant amount of semantic information, particularly affecting the identification of microvessels and complex branches, thus reducing segmentation performance. Third, due to the local nature of CNNs, their receptive field is small, making it difficult to capture long-range dependencies between pixels and global contextual information, frequently resulting in problems such as main vessel breaks and structural incompleteness during segmentation.

[0086] This application proposes a multi-level feature enhancement method based on orientation-aware structure guidance. Through local orientation feature enhancement, cross-layer orientation consistency modeling, and global orientation prior modulation, it effectively improves the network's ability to segment both long and short-range blood vessels, thereby increasing segmentation accuracy. Based on this method, this application mainly achieves three advantages: (1) To address the insufficient local feature extraction capability of convolutional modules and the need for multi-scale information, this application designs an ASE module. This module extracts local directional features of blood vessels through horizontal and vertical strip convolution, generates direction-aware features using spatial attention weighting, and then retains the original microvascular information through residual fusion, thereby achieving enhanced local direction sensitivity. Unlike existing methods, this application uses strip convolution kernels of different sizes in different encoder layers, fully considering the adaptability of features of different resolutions to the scale of blood vessels, thus achieving multi-scale local directional feature extraction. Experiments show that the ASE module can significantly improve the continuity of main blood vessels and the microvascular recognition rate. The continuity of main blood vessels is significantly improved, fully demonstrating the effectiveness of multi-scale direction perception for segmenting complex vascular structures.

[0087] (2) To address the potential loss of directional information during cross-layer feature transmission, this application designs a DSA module, primarily focusing on directional consistency during cross-layer feature transmission. This module extracts directional features from the encoder's deep features (R3) through horizontal and vertical strip convolutions, calculates directional consistency attention, and performs residual enhancement on the features. This ensures that important information along the main vessel direction is preferentially preserved during upsampling and fusion of cross-layer skip features in the decoder, while suppressing background interference. Experiments show that after adding the DSA module, the main vessel fracture rate is significantly reduced, and the expression of complex vessel branches is more complete, verifying its role in cross-layer direction perception and microvascular fidelity preservation.

[0088] (3) To address the issues of insufficient global vascular orientation consistency and structural integrity, this application designs a GCP module. This module takes bottleneck layer features as input, generates channel statistics through global average pooling, and then generates global orientation confidence through 1×1 convolution, batch normalization, and sigmoid mapping. This confidence is used to perform channel-weighted modulation on high-level features, thereby maintaining vascular orientation consistency and structural integrity at the global scale. Experiments show that after using the GCP module, the continuity and orientation consistency of the main vessels in the network output segmentation map are significantly improved, while the microvascular accuracy remains stable, fully demonstrating that GCP can effectively supplement the effects of local orientation enhancement and cross-layer skip attention.

[0089] In summary, this application forms a three-layer feature enhancement system—local-cross-layer-global—through multi-scale local orientation perception of the ASE module, cross-layer orientation consistency enhancement of the DSA module, and global orientation prior modulation of the GCP module. This effectively solves the problems of existing technologies in terms of insufficient blood vessel rupture, microvessel recognition, and global orientation inconsistency.

[0090] Another aspect of this application embodiment provides a retinal vessel segmentation device based on orientation-aware structure guidance, including: The first module is used to construct the training set, validation set, and test set based on the acquired retinal vessel segmentation dataset; The second module is used to construct the DSG-Net model, which includes an encoder, a direction-aware skip attention module, and a decoder. The encoder includes an axial structure extraction module, which extracts direction-sensitive features from the raw retinal image to enhance the continuity of long-range main blood vessels and preserve the detailed information of short-range capillaries. The direction-aware skip attention module performs direction perception on the multi-layer features output by the encoder to obtain direction-aware features. The decoder fuses the direction-aware features output by the direction-aware skip attention module and gradually restores spatial resolution through upsampling and convolution operations. The third module is used to train the DSG-Net model based on the training set and to verify the performance of the trained first model using the validation set. The fourth module is used to test the performance of the first model using the test set, and to confirm that the target model has been successfully trained. The fifth module is used to perform retinal vessel segmentation processing on the newly acquired retinal vessel image to be identified using the target model, and obtain the segmentation result.

[0091] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0092] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described orientation-aware structure-guided retinal vessel segmentation method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0093] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0094] Please see Figure 7 , Figure 7 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes: The processor 901 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory 902 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 902 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 902 and is called and executed by the processor 901 to implement the retinal vessel segmentation method based on orientation-aware structure guidance according to the embodiments of this application. The input / output interface 903 is used to implement information input and output; The communication interface 904 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.). Bus 905 transmits information between various components of the device (e.g., processor 901, memory 902, input / output interface 903, and communication interface 904); The processor 901, memory 902, input / output interface 903, and communication interface 904 are connected to each other within the device via bus 905.

[0095] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described retinal vessel segmentation method based on orientation-aware structure guidance.

[0096] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0097] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0098] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0099] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0100] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0101] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0102] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0103] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0104] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0105] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks. The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for retinal vessel segmentation based on orientation-aware structure guidance, characterized in that, include: Based on the obtained retinal vessel segmentation dataset, training set, validation set and test set are constructed; A DSG-Net model is constructed, comprising an encoder, a direction-aware skip attention module, and a decoder. The encoder includes an axial structure extraction module, which extracts direction-sensitive features from the raw retinal image to enhance the continuity of long-range main blood vessels and preserve the detailed information of short-range capillaries. The direction-aware skip attention module performs direction perception on the multi-layer features output by the encoder to obtain direction-aware features. The decoder fuses the direction-aware features output by the direction-aware skip attention module and gradually restores spatial resolution through upsampling and convolution operations. The DSG-Net model is trained using the training set, and the first model trained is validated using the validation set. The first model was tested using the test set to confirm that the target model that had been trained was obtained. The newly acquired retinal vessel image to be identified is segmented using the target model to obtain the segmentation result.

2. The retinal vessel segmentation method based on orientation-aware structure guidance according to claim 1, characterized in that, The processing steps of the axial structure extraction module include: A local depthwise convolution operation is performed on the input first feature map to extract local spatial features and enhance the vascular texture information in the first feature map; The spatial local features are branched along horizontal and vertical stripes, and then the feature maps output from the two branches are fused to obtain the directional feature map. Based on the spatial attention mechanism, each spatial location of the directional feature map is weighted to obtain a spatial attention map; The orientation feature map is multiplied element-wise with the spatial attention map to obtain the orientation perception feature map; The first feature map of the original input is residually fused with the orientation-aware feature map to obtain the second feature map of the final output.

3. The retinal vessel segmentation method based on orientation-aware structure guidance according to claim 1, characterized in that, The processing procedure of the direction-aware jump attention module includes: Obtain the deep feature map output by the encoder, and extract the feature responses in the horizontal and vertical directions through directional strip convolution to obtain the convolutional features in the horizontal and vertical directions. The horizontal and vertical convolutional features are concatenated along the channel dimension, and channel dimensionality reduction and feature fusion are performed through 1×1 convolution. Then, spatial attention weights are generated through batch normalization and Sigmoid mapping. The spatial attention weights are multiplied element-wise with the deep feature map output by the encoder, and orientation-aware jump features are generated through a residual mechanism.

4. The retinal vessel segmentation method based on orientation-aware structure guidance according to claim 1, characterized in that, The method further includes adding a global confidence prior module to the deep features of the encoder. The global confidence prior module is used to perform channel-level modulation on the deep features by generating global orientation confidence to ensure the orientation consistency of blood vessels in the spatial and channel dimensions and the integrity of the overall structure.

5. The retinal vessel segmentation method based on orientation-aware structure guidance according to claim 4, characterized in that, The processing procedure of the global confidence prior module includes: Obtain the bottleneck feature map output by the encoder, perform global average pooling on the bottleneck feature map to compress the spatial dimension into single-point features, and obtain the global statistical features of each channel. The global statistical features are subjected to 1×1 convolution mapping to achieve inter-channel information fusion, and then global orientation confidence is generated by batch normalization and Sigmoid activation function. The global directional confidence and high-level features are fused along the channel dimension through a channel-by-channel multiplication operation.

6. The retinal vessel segmentation method based on orientation-aware structure guidance according to claim 1, characterized in that, The process of constructing a training set, a validation set, and a test set based on the acquired retinal vessel segmentation dataset includes: The acquired retinal vessel segmentation dataset is converted to grayscale. Perform standardization operations on the grayscale image; The standardized image undergoes adaptive histogram equalization. Gamma correction is applied to the image after adaptive histogram equalization. The images after gamma correction are normalized to complete the image preprocessing, and the training set, validation set and test set are constructed. After the images are preprocessed, the training and validation sets are augmented with data, including random cropping, random horizontal flipping, random vertical flipping, and random rotation.

7. A retinal vessel segmentation device based on orientation-aware structure guidance, characterized in that, include: The first module is used to construct the training set, validation set, and test set based on the acquired retinal vessel segmentation dataset; The second module is used to construct the DSG-Net model, which includes an encoder, a direction-aware skip attention module, and a decoder. The encoder includes an axial structure extraction module, which extracts direction-sensitive features from the raw retinal image to enhance the continuity of long-range main blood vessels and preserve the detailed information of short-range capillaries. The direction-aware skip attention module performs direction perception on the multi-layer features output by the encoder to obtain direction-aware features. The decoder fuses the direction-aware features output by the direction-aware skip attention module and gradually restores spatial resolution through upsampling and convolution operations. The third module is used to train the DSG-Net model based on the training set and to verify the performance of the trained first model using the validation set. The fourth module is used to test the performance of the first model using the test set, and to confirm that the target model that has completed training has been obtained. The fifth module is used to perform retinal vessel segmentation processing on the newly acquired retinal vessel image to be identified using the target model, and obtain the segmentation result.

8. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 6.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 6.