Retinal blood vessel segmentation method based on neural ordinary differential equation
By employing a retinal vessel segmentation method based on neural frequent differential equations, and utilizing adaptive receptive fields and a hybrid attention mechanism, the problems of multi-scale and low contrast in retinal vessel segmentation are solved, achieving high-precision retinal vessel segmentation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTHERN MEDICAL UNIVERSITY
- Filing Date
- 2026-04-17
- Publication Date
- 2026-06-05
AI Technical Summary
Existing retinal vessel segmentation methods struggle to simultaneously handle multi-scale changes and the segmentation of minute vessels in low-contrast environments, resulting in receptive field fixation failing to adapt to the large scale span of blood vessels and the fragility of small vessels.
A retinal vessel segmentation method based on neural frequent differential equations is adopted. By constructing an encoder and decoder, and combining a hybrid attention perception module and a neural frequent differential equation module, the receptive field is adaptively adjusted. Asymmetric convolution decomposition and channel shuffling are used to enhance feature capture, thereby achieving accurate segmentation at multiple scales and high contrast.
It significantly improves the accuracy of retinal vessel segmentation, solves the problems of multi-scale adaptability and insufficient extraction of fine vessel features, reduces the phenomenon of small vessel breakage, and improves segmentation robustness and accuracy.
Smart Images

Figure CN122156645A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical image processing technology, specifically to a method for retinal vessel segmentation in fundus images based on neurological differential equations. Background Technology
[0002] In fundus image analysis, retinal vessel segmentation is of great significance for the auxiliary diagnosis of ophthalmic diseases (such as diabetic retinopathy and glaucoma) and cardiovascular and cerebrovascular diseases. However, due to the complexity of fundus imaging, existing vessel segmentation techniques face two main challenges:
[0003] First, the vascular scale is vast. Retinal vessels range from large main vessels to extremely fine terminal capillaries, exhibiting a tree-like branching structure. Existing methods based on convolutional neural networks (such as U-Net) typically use convolutional blocks with a fixed number of layers, resulting in a fixed receptive field. A fixed receptive field makes it difficult to simultaneously capture the overall connectivity of large vessels and the local details of small vessels; an excessively large receptive field blurs the small vessels, while an excessively small receptive field fails to perceive the structure of the main vessels.
[0004] Second, small blood vessels have low contrast and are prone to breakage. Due to uneven light reflection and interference from lesion areas (such as exudates and bleeding points), small blood vessels are often submerged in background noise. Existing attention mechanisms often use standard square convolution kernels when extracting spatial features, failing to fully utilize the linear morphological features of blood vessels and lacking deep decoupling and reorganization of channel and spatial information, resulting in easily broken or mis-segmented blood vessels.
[0005] Therefore, designing a retinal vascular image segmentation method that can adaptively adjust the receptive field to adapt to multi-scale changes and accurately focus on subtle linear structures has become an urgent technical problem to be solved. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of existing technologies, such as poor scale adaptability and insufficient extraction of fine vascular features, by providing a method for retinal vessel segmentation in fundus images based on neuronormal differential equations to solve the above problems.
[0007] To achieve the above objectives, the technical solution of the present invention is as follows:
[0008] A method for retinal vessel segmentation in fundus images based on neurological differential equations includes the following steps:
[0009] 11) Acquire retinal and fundus images and perform preprocessing;
[0010] 12) Construct a retinal vessel segmentation network;
[0011] 13) Training of the retinal vessel segmentation network: The preprocessed retinal fundus images are input into the retinal vessel segmentation network, and feature encoding, feature enhancement and feature decoding are performed in sequence;
[0012] 14) Obtaining the retinal vessel segmentation results of fundus images: Acquire fundus images of the retina to be segmented and preprocess them, input them into the trained retinal vessel segmentation network, and obtain the retinal vessel segmentation results of fundus images.
[0013] The construction of the retinal vessel segmentation network includes the following steps:
[0014] 21) The retinal vessel segmentation network is configured to include an encoder, a decoder, and a hybrid attention perception module located at the jump connection between the encoder and decoder;
[0015] 22) Set up an encoder, which includes a five-layer neural frequent differential equation module. The neural frequent differential equation module uses a continuous processing mechanism to adaptively adjust the receptive field. The preprocessed retinal fundus image is input into the encoder. The feature evolution is performed through the neural frequent differential equation module, and multi-scale contextual information is captured by combining downsampling operation to obtain the encoder feature map.
[0016] 23) Set up a hybrid attention perception module.
[0017] The encoder feature maps of each layer of the encoder are input into the hybrid attention perception module for channel feature enhancement and interaction. The features are refined based on the multi-scale spatial attention mechanism of asymmetric convolution decomposition to obtain the enhanced feature map. The enhanced feature map is then transmitted to the decoder through skip connections and fused with the upsampled features of the corresponding layer of the decoder.
[0018] 24) Configure the decoder.
[0019] The decoder includes a four-layer neural network differential equation module, which gradually recovers the feature map size, and finally outputs an image segmentation mask of retinal vessels through a classification layer.
[0020] 25) Set up the module for the constant differential equations.
[0021] The training of the retinal vessel segmentation network includes the following steps:
[0022] 31) Set the cross-entropy loss function to be used during network training. The optimized formula is as follows:
[0023] ,
[0024] in, For the first The real label of each pixel This represents the predicted probability that the pixel belongs to a blood vessel. This represents the total number of pixels in the image.
[0025] Set the batch size to 32 and the total number of training rounds to 100; adopt an early stopping strategy with a threshold of 8, select Adam as the optimizer, and set the learning rate to 0.0005.
[0026] 32) Feature encoding: retinal images The data is input into the encoder of the retinal vessel segmentation network. Given a real number space, an image channel of 1, a height of H, and a width of W, after passing through one layer... Convolution adjusts the spatial dimension of the feature map, inputs the first layer of neural network frequent differential equation module, and outputs the first feature map. ; the first feature map pass Convolution is used to increase dimensionality, and then... After downsampling, the input is fed into the second-layer neural network constant differential equation module, which outputs the second feature map. ; the second feature map pass Convolution upscaling, then After convolutional downsampling, the input is fed into the third layer of the neural network's frequent differential equation module, which outputs the third feature map. ; the third feature map pass Convolution upscaling, then After convolutional downsampling, the input is fed into the fourth layer of the neural network's frequent differential equation module, which outputs the fourth feature map. ; the fourth feature map pass Convolution upscaling, then After convolutional downsampling, the input is fed into the fifth layer of the neural network's frequent differential equation module, which outputs the fifth feature map. That is, the encoder feature map;
[0027] 33) Feature enhancement and decoding: The encoder feature map enters the hybrid attention perception module and the decoding stage. The decoder gradually restores the feature map resolution through upsampling, output fusion of the hybrid attention perception module, and processing by the neural network differential equation module.
[0028] The fifth feature map pass Convolution dimensionality reduction, then The sixth feature map is obtained after convolutional upsampling. ; the fourth feature map Input to the hybrid attention perception module, output the enhanced feature map and the sixth feature map. The first enhanced feature map is obtained by merging and splicing channels through skip connections. ;Will Input to the sixth-level neuromorphic differential equation module, and through Convolution dimensionality reduction, then The seventh feature map is obtained after upsampling. ; the third feature map Input to the hybrid attention perception module, output the enhanced feature map and the seventh feature map. By merging and splicing channels through skip connections, a second enhanced feature map is obtained. ;
[0029] Will The input is passed to the seventh-level divine ordinary differential equation module, and then through... Convolution dimensionality reduction, and The eighth feature map is obtained after convolutional upsampling. ; the second feature map Input to the hybrid attention perception module, output the enhanced feature map and the eighth feature map. The third enhanced feature map is obtained by merging and splicing channels through skip connections. ;
[0030] Will The input is passed to the eighth-level constant differential equation module, and then through... Convolution dimensionality reduction, and The ninth feature map is obtained after convolutional upsampling. ; the first feature map Input to the hybrid attention perception module, output the enhanced feature map and the ninth feature map. The fourth enhanced feature map is obtained by merging and splicing the data through skip connections along channels. ;
[0031] Will Input into the ninth-level divine ordinary differential equation module, and then through... After dimensionality reduction via convolution, the feature map is normalized using the softmax function, and the final image segmentation mask is output.
[0032] Setting up the hybrid attention perception module includes the following steps:
[0033] 41) Phase 1: Channel Feature Enhancement and Interaction
[0034] First, the input features conduct Convolutional dimensionality reduction yields the input feature map ;
[0035] Secondly, calculate and weight the channel attention weights, and then perform feature map calculations. The feature map is generated by parallel global average pooling and max pooling, followed by fusion through a multilayer perceptron to produce channel weights, which are then multiplied with the original feature points. :
[0036] ,
[0037] in, This represents the channel attention calculation function, used to generate channel weights based on the channel statistics of the input features. This indicates element-wise multiplication;
[0038] Then, the channel order is shuffled, allowing features from different groups to interact in subsequent spatial processing, thereby breaking down information isolation between channel groups and improving the feature maps. The feature map after rinsing is obtained by performing channel rinsing operation. ;
[0039] 42) Stage Two: Multi-scale Spatial Attention Mechanism Based on Asymmetric Convolution Solutions
[0040] Feature map after mixing The stream is split into four parallel branches, each corresponding to a spatial scale. ,in ;
[0041] Within each branch, asymmetric depthwise convolution is used to extract spatial features, meaning the feature maps are sequentially passed through... Single-channel deep convolutional layers and A single-channel deep convolutional layer is generated by Sigmoid activation to produce a spatial weight matrix;
[0042] The weight matrices generated by the four branches are summed element-wise to obtain the comprehensive spatial mask, which is then compared with the shuffled feature map. Multiply, and finally pass through a Pointwise convolutional layers are used for channel fusion to obtain spatially enhanced features. :
[0043] ,
[0044] in, and They represent and Depth-wise convolution operations; for Convolution operation, This is an element-wise addition operation of the feature map. For activation function, This is an element-wise multiplication operation;
[0045] 43) Stage Three: Residual Output
[0046] Input features are processed through residual connections. Spatial Enhancement Features The features are summed and activated by the ReLU function to output the enhanced feature map. :
[0047] ,
[0048] Here, ReLU represents the ReLU activation function.
[0049] The aforementioned ordinary differential equation module includes the following steps:
[0050] 51) The differential equation module of the God is set to adopt a residual block structure. Its internal calculation sequence is as follows: instance normalization, 3×3 convolution and ReLU activation function. After the above operation is repeated twice, the input and output feature maps are added element-wise through residual connection.
[0051] 52) Define the time interval for feature evolution. and divide it into Each time step has two equally spaced sub-intervals. ;
[0052] At the point of time , to feature vector Input the God ordinary differential equation module, the initial state of the God ordinary differential equation module. Initialized to , Let the image channel be a real number space. The height is Width is ,
[0053] 521) Regarding the initial state Normalization is performed, followed by operation through a 3×3 convolutional layer, then the ReLU activation function is applied and normalization is performed again;
[0054] 522) Perform the second round of 3×3 convolution and ReLU operations;
[0055] 523) By time step Scaling is performed, and the original state is connected via a residual connection layer. Merge and obtain updated state ;
[0056] 53) As time progresses to hour, Following the iterative process from step 521) to 523), a new state is generated. ;
[0057] 54) At time k, i.e. The output of the God's frequent differential equation module Defined as:
[0058] ,
[0059] in, This refers to the state at the previous moment. The computational flow for a single divine ordinary differential equation module;
[0060] 55) At the end time When the final state is reached , This is the final output of the God's constant differential equation module.
[0061] A computer-readable storage medium is characterized in that a computer program is stored on the storage medium, and when the computer program is executed by a processor, a method for retinal vessel segmentation based on neurological differential equations in fundus images can be implemented.
[0062] A computer device is characterized by comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it can realize a method for retinal vessel segmentation based on neurological differential equations in fundus images.
[0063] Beneficial effects
[0064] The present invention provides a retinal vessel segmentation method for fundus images based on neural ODEs. Compared with the prior art, the encoder and decoder paths are stacked with neural ODE modules. By utilizing their continuous dynamic characteristics, the effective receptive field is adaptively adjusted by calculating feature derivatives to adapt to vascular features at different scales. The hybrid attention perception module (HAN module) is located at the jump connection and adopts an "asymmetric convolution solution" architecture. It combines channel shuffling and multi-scale spatial attention to accurately capture subtle linear vascular features while suppressing background noise.
[0065] This invention effectively solves the problems in the prior art where the fixed receptive field cannot adapt to multi-scale changes in blood vessels and low contrast leads to vascular rupture, and significantly improves the segmentation accuracy of retinal vessels in fundus images.
[0066] The present invention has the following advantages:
[0067] (1) Dynamic receptive field adaptability: By utilizing the continuous dynamic characteristics of the Neural ODE module, the model can maintain a small receptive field in flat background areas to reduce noise introduction, and automatically expand the receptive field in complex vascular intersection areas to capture context, effectively solving the multi-scale problem.
[0068] (2) Enhanced linear feature capture: The asymmetric depth convolution decomposition design in the HAM module not only reduces the number of computational parameters, but more importantly, it achieves a high degree of fit between the strip convolution kernel and the tubular morphology of blood vessels, which significantly reduces the phenomenon of rupture of small blood vessels.
[0069] (3) Deep feature fusion: By combining channel shuffling and terminal point-by-point convolution, the effective interaction between spatial information and channel information is realized, which improves the segmentation robustness in low contrast environment. Attached Figure Description
[0070] Figure 1 This is a sequence diagram of the method of the present invention;
[0071] Figure 2 This is a framework diagram of the retinal vessel segmentation network involved in the present invention;
[0072] Figure 3 This is a comparison diagram of the segmentation results involved in this invention. Detailed Implementation
[0073] To provide a better understanding of the structural features and effects achieved by the present invention, a detailed description is provided below, accompanied by preferred embodiments and accompanying drawings:
[0074] like Figure 1 As shown, the retinal vessel segmentation method for fundus images based on neurological differential equations of the present invention includes the following steps:
[0075] The first step is to acquire and preprocess retinal fundus images. The acquired retinal fundus images are resized to a uniform size and normalized to ensure pixel values are distributed within a standard range.
[0076] The second step is to construct a segmentation network for the retinal vessels. For example... Figure 2 As shown, the retinal vessel segmentation network is based on an encoder-decoder architecture and innovatively introduces a Neural Ordinary Differential Equations (Neural ODE) module and a Hybrid Attention-aware Module (HAM) module to accurately segment the complex morphology and multi-scale features of retinal vessels. This network is specifically designed to address the three major segmentation challenges of retinal vessels: large scale span, low contrast, and elongated shape. The specific construction process is as follows:
[0077] (1) The retinal vessel segmentation network is configured to include an encoder, a decoder, and a hybrid attention perception module located at the jump connection between the encoder and the decoder.
[0078] (2) An encoder is defined, comprising a five-layer neural network constant differential equation module. Traditional discrete convolution has a fixed receptive field, making it difficult to simultaneously capture the overall structure of large blood vessels and the local details of small blood vessels. This invention uses the neural network constant differential equation module as the core unit of the encoder, utilizing its continuous processing mechanism to model the discrete transformation of the network layers as a continuous dynamic system. The preprocessed retinal fundus image is input into the encoder, and feature evolution is performed through the neural network constant differential equation module. During feature evolution, the module can adaptively adjust the receptive field according to the vascular morphology: maintaining a small receptive field in flat background areas to reduce noise introduction, and automatically expanding the receptive field in complex intersecting areas of blood vessels to capture contextual information. Combined with stepwise downsampling operations, the encoder can effectively capture multi-scale contextual information, obtaining an encoder feature map, providing rich vascular feature representations for subsequent segmentation.
[0079] (3) Set up a hybrid attention perception module,
[0080] The encoder feature maps of each layer of the encoder are input into the hybrid attention perception module for channel feature enhancement and interaction. The features are refined based on the multi-scale spatial attention mechanism of asymmetric convolution decomposition to obtain the enhanced feature map. The enhanced feature map is then transmitted to the decoder through skip connections and fused with the upsampled features of the corresponding layer of the decoder.
[0081] Retinal capillaries exhibit extremely low contrast in fundus images and are easily affected by non-vascular structures such as exudates and light reflections, making accurate separation difficult using only an encoder. Therefore, this invention incorporates a hybrid attention perception module at the skip connections to doubly enhance the feature maps output from each layer of the encoder.
[0082] A1) Phase 1: Channel Feature Enhancement and Interaction
[0083] First, the input features conduct Convolutional dimensionality reduction yields the input feature map ;
[0084] Secondly, calculate and weight the channel attention weights, and then perform feature map calculations. The feature map is generated by parallel global average pooling and max pooling, followed by fusion through a multilayer perceptron to produce channel weights, which are then multiplied with the original feature points. :
[0085] ,
[0086] in, This represents the channel attention calculation function, used to generate channel weights based on the channel statistics of the input features. This indicates element-wise multiplication;
[0087] Then, the channel order is shuffled, allowing features from different groups to interact in subsequent spatial processing, thereby breaking down information isolation between channel groups and improving the feature maps. The feature map after rinsing is obtained by performing channel rinsing operation. ;
[0088] A2) Phase Two: Multi-scale Spatial Attention Mechanism Based on Asymmetric Convolution Solution
[0089] Feature map after mixing The stream is split into four parallel branches, each corresponding to a spatial scale. ,in ;
[0090] Within each branch, asymmetric depthwise convolution is used to extract spatial features, meaning the feature maps are sequentially passed through... Single-channel deep convolutional layers and A single-channel deep convolutional layer is generated by Sigmoid activation to produce a spatial weight matrix;
[0091] The weight matrices generated by the four branches are summed element-wise to obtain the comprehensive spatial mask, which is then compared with the shuffled feature map. Multiply, and finally pass through a Pointwise convolutional layers are used for channel fusion to obtain spatially enhanced features. :
[0092] ,
[0093] in, and They represent and Depth-wise convolution operations; for Convolution operation, This is an element-wise addition operation of the feature map. For activation function, This is an element-wise multiplication operation;
[0094] A3) Stage Three: Residual Output
[0095] Input features are processed through residual connections. Spatial Enhancement Features The features are summed and activated by the ReLU function to output the enhanced feature map. :
[0096] ,
[0097] Here, ReLU represents the ReLU activation function.
[0098] (4) Configure the decoder.
[0099] The decoder consists of four layers of neural network differential equation modules. The feature map size is gradually recovered through the neural network differential equation modules, and finally the image segmentation mask of retinal blood vessels is output through the classification layer.
[0100] Through progressive upsampling operations combined with enhanced feature maps introduced by skip connections, the decoder can progressively restore the feature map resolution and precisely reconstruct the boundaries and topology of blood vessels. Each layer of neural network differential equation modules also maintains the adaptive adjustment capability of the receptive field during feature restoration, ensuring continuous feature evolution from coarse to fine scales, and finally outputting a high-precision retinal vessel segmentation mask through the classification layer.
[0101] (5) Set up the module for the constant differential equations of the god.
[0102] The Ordinary Differential Equation (ODE) module extends discrete residual connections into continuous state evolution. Its core lies in integrating the feature derivatives through an ODE solver, allowing the network to maintain continuous state transitions at any time step. This mechanism overcomes the limitations of discrete layers in traditional networks on feature representation capabilities, endowing the model with the ability to finely control feature evolution over time. Compared to stacking a fixed number of residual blocks, the ODE module achieves smoother state transitions with fewer parameters, reducing the optimization difficulty of deep networks.
[0103] B1) The neural network constant differential equation module adopts a residual block structure. Its internal calculation sequence is as follows: instance normalization, 3×3 convolution and ReLU activation function. After the above operation is repeated twice, the input and output feature maps are added element-wise through residual connection.
[0104] B2) Define the time interval for feature evolution. and divide it into Each time step has two equally spaced sub-intervals. ;
[0105] At the point of time , to feature vector Input the God ordinary differential equation module, the initial state of the God ordinary differential equation module. Initialized to , Let the image channel be a real number space. The height is Width is ,
[0106] B21) Regarding the initial state Normalization is performed, followed by operation through a 3×3 convolutional layer, then the ReLU activation function is applied and normalization is performed again;
[0107] B22) Perform the second round of 3×3 convolution and ReLU operations;
[0108] B23) By time step Scaling is performed, and the original state is connected via a residual connection layer. Merge and obtain updated state ;
[0109] B3) When time progresses to hour, Following the iterative process from steps B21) to B23), a new state is generated. ;
[0110] B4) At time k, i.e. The output of the God's frequent differential equation module Defined as:
[0111] ,
[0112] in, This refers to the state at the previous moment. The computational flow for a single divine ordinary differential equation module;
[0113] B5) At the end time When the final state is reached , This is the final output of the God's constant differential equation module.
[0114] The third step is training the retinal vessel segmentation network: the preprocessed retinal fundus images are input into the retinal vessel segmentation network, and feature encoding, feature enhancement and feature decoding are performed sequentially.
[0115] Retinal vessels have an extremely low pixel count, resulting in a severe imbalance between positive and negative samples. If conventional training strategies are used directly, the model is highly likely to favor the background category. This invention employs a cross-entropy loss function combined with a mini-batch training strategy with a batch size of 32, ensuring a relatively stable distribution of positive and negative samples within each batch. Simultaneously, an early stopping mechanism is introduced to prevent overfitting, ensuring that training terminates when the model reaches its optimum on the validation set. Furthermore, the training process of this invention includes three stages of collaborative optimization: the encoding stage adaptively extracts multi-scale features using a neural network constant differential equation module; the enhancement stage selectively strengthens vascular features at skip connections using a hybrid attention perception module; and the decoding stage gradually restores resolution and fuses the enhanced features. These three stages work precisely together to ensure that the network can simultaneously learn the topological structure of coarse vessels and the local details of fine vessels.
[0116] (1) Set the cross-entropy loss function to be used during network training. The optimized formula is as follows:
[0117] ,
[0118] in, For the first The real label of each pixel This represents the predicted probability that the pixel belongs to a blood vessel. This represents the total number of pixels in the image.
[0119] The batch size was set to 32, the total number of training rounds was set to 100, an early stopping strategy was adopted with a threshold of 8, the optimizer was Adam, and the learning rate was set to 0.0005.
[0120] (2) Feature encoding: retinal image The data is input into the encoder of the retinal vessel segmentation network. Given a real number space, an image channel of 1, a height of H, and a width of W, after passing through one layer... Convolution adjusts the spatial dimension of the feature map, inputs the first layer of neural network frequent differential equation module, and outputs the first feature map. ; the first feature map pass Convolution is used to increase dimensionality, and then... After downsampling, the input is fed into the second-layer neural network constant differential equation module, which outputs the second feature map. ; the second feature map pass Convolution upscaling, then After convolutional downsampling, the input is fed into the third layer of the neural network's frequent differential equation module, which outputs the third feature map. ; the third feature map pass Convolution upscaling, then After convolutional downsampling, the input is fed into the fourth layer of the neural network's frequent differential equation module, which outputs the fourth feature map. ; the fourth feature map pass Convolution upscaling, then After convolutional downsampling, the input is fed into the fifth layer of the neural network's frequent differential equation module, which outputs the fifth feature map. That is, the encoder feature map.
[0121] (3) Feature enhancement and decoding: The encoder feature map enters the hybrid attention perception module and the decoding stage. The decoder adopts a structure symmetrical to the encoder. It gradually restores the feature map resolution by going through upsampling, output fusion of the hybrid attention perception module, and processing of the neural frequent differential equation module in sequence.
[0122] The fifth feature map pass Convolution dimensionality reduction, then The sixth feature map is obtained after convolutional upsampling. ; the fourth feature map Input to the hybrid attention perception module, output the enhanced feature map and the sixth feature map. The first enhanced feature map is obtained by merging and splicing channels through skip connections. ;Will Input to the sixth-level neuromorphic differential equation module, and through Convolution dimensionality reduction, then The seventh feature map is obtained after upsampling. ; the third feature map Input to the hybrid attention perception module, output the enhanced feature map and the seventh feature map. By merging and splicing channels through skip connections, a second enhanced feature map is obtained. ;
[0123] Will The input is passed to the seventh-level divine ordinary differential equation module, and then through... Convolution dimensionality reduction, and The eighth feature map is obtained after convolutional upsampling. ; the second feature map Input to the hybrid attention perception module, output the enhanced feature map and the eighth feature map. The third enhanced feature map is obtained by merging and splicing channels through skip connections. ;
[0124] Will The input is passed to the eighth-level constant differential equation module, and then through... Convolution dimensionality reduction, and The ninth feature map is obtained after convolutional upsampling. ; the first feature map Input to the hybrid attention perception module, output the enhanced feature map and the ninth feature map. The fourth enhanced feature map is obtained by merging and splicing the data through skip connections along channels. ;
[0125] Will Input into the ninth-level divine ordinary differential equation module, and then through... After dimensionality reduction via convolution, the feature map is normalized using the softmax function, and the final image segmentation mask is output.
[0126] The fourth step is to obtain the retinal vessel segmentation results from the fundus image: acquire and preprocess the fundus image of the retina to be segmented, input it into the trained retinal vessel segmentation network, and obtain the retinal vessel segmentation results from the fundus image.
[0127] Tests were conducted on the public datasets DRIVE, STARE, and CHASEDB1. Figure 3 As shown, the HA-NODE method proposed in this invention maintains the integrity of the connectivity of the main blood vessels in the segmentation results, and its ability to identify microcapillaries is significantly better than existing methods. Especially in low-contrast areas and at blood vessel intersections, the segmentation results are closer to the actual annotations.
[0128] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A method for retinal vessel segmentation in fundus images based on neurological differential equations, characterized in that, Includes the following steps: 11) Acquire retinal and fundus images and perform preprocessing; 12) Construct a retinal vessel segmentation network; 13) Training of the retinal vessel segmentation network: The preprocessed retinal fundus images are input into the retinal vessel segmentation network, and feature encoding, feature enhancement and feature decoding are performed sequentially; 14) Obtaining the retinal vessel segmentation results of fundus images: Acquire fundus images of the retina to be segmented and preprocess them, input them into the trained retinal vessel segmentation network, and obtain the retinal vessel segmentation results of fundus images.
2. The method for retinal vessel segmentation in fundus images based on neurological differential equations according to claim 1, characterized in that, The construction of the retinal vessel segmentation network includes the following steps: 21) The retinal vessel segmentation network is configured to include an encoder, a decoder, and a hybrid attention perception module located at the jump connection between the encoder and decoder; 22) Set up an encoder, which includes a five-layer neural frequent differential equation module. The neural frequent differential equation module uses a continuous processing mechanism to adaptively adjust the receptive field. The preprocessed retinal fundus image is input into the encoder. The feature evolution is performed through the neural frequent differential equation module, and multi-scale contextual information is captured by combining downsampling operation to obtain the encoder feature map. 23) Set up a hybrid attention perception module. The encoder feature maps of each layer of the encoder are input into the hybrid attention perception module for channel feature enhancement and interaction. The features are refined based on the multi-scale spatial attention mechanism of asymmetric convolution decomposition to obtain the enhanced feature map. The enhanced feature map is then transmitted to the decoder through skip connections and fused with the upsampled features of the corresponding layer of the decoder. 24) Configure the decoder. The decoder includes a four-layer neural network differential equation module, which gradually recovers the feature map size, and finally outputs an image segmentation mask of retinal vessels through a classification layer. 25) Set up the module for the constant differential equations.
3. The method for retinal vessel segmentation in fundus images based on neurological differential equations according to claim 1, characterized in that, The training of the retinal vessel segmentation network includes the following steps: 31) Set the cross-entropy loss function to be used during network training. The optimized formula is as follows: , in, For the first The real label of each pixel This represents the predicted probability that the pixel belongs to a blood vessel. This represents the total number of pixels in the image. Set the batch size to 32 and the total number of training rounds to 100; adopt an early stopping strategy with a threshold of 8, select Adam as the optimizer, and set the learning rate to 0.0005. 32) Feature encoding: retinal images The data is input into the encoder of the retinal vessel segmentation network. Given a real number space, an image channel of 1, a height of H, and a width of W, after passing through one layer... Convolution adjusts the spatial dimension of the feature map, inputs the first layer of neural network frequent differential equation module, and outputs the first feature map. ; the first feature map pass Convolution is used to increase dimensionality, and then... After downsampling, the input is fed into the second-layer neural network constant differential equation module, which outputs the second feature map. ; the second feature map pass Convolution upscaling, then After convolutional downsampling, the input is fed into the third layer of the neural network's frequent differential equation module, which outputs the third feature map. ; the third feature map pass Convolution upscaling, then After convolutional downsampling, the input is fed into the fourth layer of the neural network's frequent differential equation module, which outputs the fourth feature map. ; the fourth feature map pass Convolution upscaling, then After convolutional downsampling, the input is fed into the fifth layer of the neural network's frequent differential equation module, which outputs the fifth feature map. That is, the encoder feature map; 33) Feature enhancement and decoding: The encoder feature map enters the hybrid attention perception module and the decoding stage. The decoder gradually restores the feature map resolution through upsampling, output fusion of the hybrid attention perception module, and processing by the neural network differential equation module. The fifth feature map pass Convolution dimensionality reduction, then The sixth feature map is obtained after convolutional upsampling. ; the fourth feature map Input to the hybrid attention perception module, output the enhanced feature map and the sixth feature map. The first enhanced feature map is obtained by merging and splicing channels through skip connections. ;Will Input to the sixth-level neuromorphic differential equation module, and through Convolution dimensionality reduction, then The seventh feature map is obtained after upsampling. ; the third feature map Input to the hybrid attention perception module, output the enhanced feature map and the seventh feature map. By merging and splicing channels through skip connections, a second enhanced feature map is obtained. ; Will The input is passed to the seventh-level divine ordinary differential equation module, and then through... Convolution dimensionality reduction, and The eighth feature map is obtained after convolutional upsampling. ; the second feature map Input to the hybrid attention perception module, output the enhanced feature map and the eighth feature map. The third enhanced feature map is obtained by merging and splicing channels through skip connections. ; Will The input is passed to the eighth-level constant differential equation module, and then through... Convolution dimensionality reduction, and The ninth feature map is obtained after convolutional upsampling. ; the first feature map Input to the hybrid attention perception module, output the enhanced feature map and the ninth feature map. The fourth enhanced feature map is obtained by merging and splicing the data through skip connections along channels. ; Will Input into the ninth-level divine ordinary differential equation module, and then through... After dimensionality reduction via convolution, the feature map is normalized using the softmax function, and the final image segmentation mask is output.
4. The method for retinal vessel segmentation in fundus images based on neurological differential equations according to claim 2, characterized in that, Setting up the hybrid attention perception module includes the following steps: 41) Phase 1: Channel Feature Enhancement and Interaction First, the input features conduct Convolutional dimensionality reduction yields the input feature map ; Secondly, calculate and weight the channel attention weights, and then perform feature map calculations. The feature map is generated by parallel global average pooling and max pooling, followed by fusion through a multilayer perceptron to produce channel weights, which are then multiplied with the original feature points. : , in, This represents the channel attention calculation function, used to generate channel weights based on the channel statistics of the input features. This indicates element-wise multiplication; Then, the channel order is shuffled, allowing features from different groups to interact in subsequent spatial processing, thereby breaking down information isolation between channel groups and improving the feature maps. The feature map after rinsing is obtained by performing channel rinsing operation. ; 42) Stage Two: Multi-scale Spatial Attention Mechanism Based on Asymmetric Convolution Solutions Feature map after mixing The stream is split into four parallel branches, each corresponding to a spatial scale. ,in ; Within each branch, asymmetric depthwise convolution is used to extract spatial features, meaning the feature maps are sequentially passed through... Single-channel deep convolutional layers and A single-channel deep convolutional layer is generated by Sigmoid activation to produce a spatial weight matrix; The weight matrices generated by the four branches are summed element-wise to obtain the comprehensive spatial mask, which is then compared with the shuffled feature map. Multiply, and finally pass through a Pointwise convolutional layers are used for channel fusion to obtain spatially enhanced features. : , in, and They represent and Depth-wise convolution operations; for Convolution operation, This is an element-wise addition operation of the feature map. For activation function, This is an element-wise multiplication operation; 43) Stage Three: Residual Output Input features are processed through residual connections. Spatial Enhancement Features The features are summed and activated by the ReLU function to output the enhanced feature map. : , Here, ReLU represents the ReLU activation function.
5. The method for retinal vessel segmentation in fundus images based on neurological differential equations according to claim 2, characterized in that, The aforementioned ordinary differential equation module includes the following steps: 51) The differential equation module of the God is set to adopt a residual block structure. Its internal calculation sequence is as follows: instance normalization, 3×3 convolution and ReLU activation function. After the operation is repeated twice, the input and output feature maps are added element-wise through residual connection. 52) Define the time interval for feature evolution. and divide it into Each time step has two equally spaced sub-intervals. ; At the point of time , to feature vector Input the God ordinary differential equation module, the initial state of the God ordinary differential equation module. Initialized to , Let the image channel be a real number space. The height is Width is , 521) Regarding the initial state Normalization is performed, followed by operation through a 3×3 convolutional layer, then the ReLU activation function is applied and normalization is performed again; 522) Perform the second round of 3×3 convolution and ReLU operations; 523) By time step Scaling is performed, and the original state is connected via a residual connection layer. Merge and obtain updated state ; 53) As time progresses to hour, Following the iterative process from step 521) to 523), a new state is generated. ; 54) At time k, i.e. The output of the God's frequent differential equation module Defined as: , in, This refers to the state at the previous moment. The computational flow for a single divine ordinary differential equation module; 55) At the end time When the final state is reached , This is the final output of the God's constant differential equation module.
6. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the retinal vessel segmentation method for fundus images based on neuronormal differential equations as described in any one of claims 1-5.
7. A computer device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it can implement the retinal vessel segmentation method based on neuronormal differential equations in fundus images as described in any one of claims 1-5.