Retina vessel segmentation method and system of automatic coding-decoding network based on discrete binary particle swarm optimization

By optimizing the U-shaped neural network through the discrete binary particle swarm optimization algorithm and the feature pyramid attention module, the instability and complexity problems of the NSMD-NAS model were solved, and efficient and accurate segmentation of retinal vessels was achieved, which is suitable for clinical applications.

CN120598971AActive Publication Date: 2025-09-05UESTC (SHENZHEN) ADVANCED RES INST
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510751329.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-05
Estimated Expiration
2045-06-06

AI Technical Summary

Technical Problem

The existing NSMD-NAS model in retinal vessel segmentation suffers from instability in the optimization process, insufficient adaptability to real-time applications, and model complexity, resulting in low stability and computational efficiency in clinical applications.

Method used

The discrete binary particle swarm optimization algorithm (DPSO) is used to automatically search and optimize the U-shaped neural network structure. The feature pyramid attention module and attention mechanism are combined to perform retinal vessel segmentation through the encoder-decoder network to construct a lightweight U-shaped neural network model.

Benefits of technology

The accuracy and efficiency of retinal vessel segmentation are improved, the computing resource requirements are reduced, and the sensitivity and adaptability of the model to key areas are enhanced, making it suitable for resource-constrained clinical environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120598971A_ABST
    Figure CN120598971A_ABST
Patent Text Reader

Abstract

The invention discloses a retinal vessel segmentation method and system of an automatic coding-decoding network based on discrete binary particle swarm optimization. The segmentation method comprises the following steps: constructing a retinal vessel data set; obtaining a lightweight U-shaped neural network model; obtaining an optimal U-shaped neural network model; and obtaining a segmentation result of the retinal blood vessel image through the optimal U-shaped neural network model. According to the method, a neural network structure is automatically searched and optimized through a discrete binary particle swarm optimization algorithm, so that a network architecture can be automatically adjusted according to task requirements, meanwhile, an FPN Attention Block is introduced, attention mechanisms such as ECA-Net and CBAM are combined, the attention mechanisms are flexibly configured according to selection factors, the output of an encoder is weighted and then fused with a decoder, and the algorithm has the advantages that the algorithm is simple, the algorithm is easy to implement, and the algorithm is easy to implement. Important local features can be effectively focused, and the segmentation precision of small blood vessels and complex structures is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a retinal blood vessel segmentation method and system based on an automated encoding-decoding network optimized by discrete binary particle swarms. Background Art

[0002] The NSMD-NAS (Non-Subsampling Module and Neural Architecture Search) model's automated retinal vessel segmentation method aims to improve the efficiency and accuracy of diabetic retinopathy (DR) screening. This method combines multi-scale, multi-frequency, and multi-directional feature extraction, constructing a feature extraction layer using a non-subsampling filter (NSMD) and convolution and Transformer modules. The network structure is automatically optimized to accommodate the complex structure of retinal images. Specifically, the model optimizes 14 key parameters, such as convolutional layer type, number of filters, and pooling method, using a fixed-length genotype encoding strategy. A genetic evolutionary algorithm (GA) is then used to search for the most adaptable network structure to obtain the optimal network structure, resulting in more accurate vessel segmentation, particularly for small vessels and complex backgrounds.

[0003] In the model architecture, the NSMD module is integrated with a CNN (convolutional neural network) to extract boundary information of varying scales, frequencies, and orientations. Normalization is performed to ensure feature stability before input into the network. Combined with the TUnet base network and a multi-head attention mechanism, the modeling capabilities for both local and global information are further enhanced. Experimental results demonstrate that the proposed NSMD-NAS model outperforms other popular retinal vessel segmentation models on the DRIVE, STARE, and CHASE_DB1 datasets, achieving particularly high segmentation accuracy for small vessels and complex regions. It also demonstrates strong robustness and generalization capabilities.

[0004] However, the existing NSMD-NAS model has the following shortcomings: 1. Stability of the optimization process Genetic algorithms (GAs) are optimization methods based on natural selection, and their search process is highly stochastic. GAs generate multiple candidate solutions through selection, crossover, and mutation, and evaluate them based on fitness. However, GA optimization results often depend on the diversity of the initialization population and the settings of the search parameters. Different initialization methods can lead the optimization process in different directions, or even trap it in a local optimum. Models may exhibit different performance in different experiments, resulting in a certain degree of uncertainty in the final network architecture, which poses a challenge to the stability and consistency requirements of clinical applications.

[0005] 2. Adaptability to real-time applications The NSMD-NAS model requires high computational resources due to its complex architecture and parameter optimization process. Rapid feedback and real-time processing are crucial for practical clinical diagnosis. Despite high accuracy during the model training phase, the inference phase (i.e., image segmentation in actual use) can still require significant computational time, especially on devices with limited hardware resources. Slow model inference speed may not provide real-time or rapid results in clinical practice, reducing its practical application value as an auxiliary tool.

[0006] 3. Model complexity The NSMD-NAS model combines multiple complex modules, such as the non-subsampling module (NSMD), convolutional layers, and Transformer modules. These modules are nested and work together, increasing the number of network parameters and layers. Furthermore, the use of a genetic algorithm (GA) in network architecture search further increases the model's complexity. The design and tuning of each module requires consideration of multiple factors, such as the fusion of multi-scale, multi-frequency, and multi-directional information, making the overall network architecture very complex. This highly complex model structure not only increases training time but also slows down the model's inference process and makes it difficult to optimize. This complexity also makes parameter adjustment more difficult, requiring extensive experimentation and adjustments to find the optimal network structure. Furthermore, the complex architecture consumes more computing resources, which may limit its application in resource-constrained environments, particularly in real-time clinical diagnosis, where a balance between accuracy and computational efficiency is crucial. Summary of the Invention

[0007] Based on this, the purpose of the present invention is to provide a retinal vessel segmentation method and system based on an automated encoding-decoding network optimized by discrete binary particle swarm optimization. By constructing a basic operation sequence and a network search space within a limited range, the architecture of the U-shaped neural network is gradually optimized, thereby effectively improving the accuracy and efficiency of retinal vessel segmentation.

[0008] In a first aspect, a retinal vessel segmentation method based on an automated encoding-decoding network using discrete binary particle swarm optimization comprises the following steps: Step S11, constructing a retinal vascular dataset, and dividing the retinal vascular dataset into a training set, a validation set, and a test set; Step S12, after designing the architecture search space of the U-shaped neural network, the internal structure and spatial architecture of different modules in the U-shaped neural network are searched by using a discrete binary particle swarm algorithm, and training and verification are performed using a training set and a validation set to obtain a lightweight U-shaped neural network model; Wherein, the architecture search space includes a first coding region, a second coding region, and a second coding region; The first coding region comprises two binary digits for indicating the number of gene layers; The second coding region comprises a seven-bit binary number, where the first to third bits are used to represent the operating gene, the fourth and fifth bits are used to represent the position of the attention factor, the sixth bit is used to represent the selected attention factor, and the seventh bit is used to represent the residual connection gene; The third coding region includes a six-bit binary number, the first bit is used to represent the connection relationship between the intermediate nodes (n1, n2), the second and third bits are used to represent the connection relationship between the intermediate nodes (n1, n3) and (n2, n3), and the fourth, fifth and sixth bits are used to represent the connection relationship between the intermediate nodes (n1, n4), (n2, n4) and (n3, n4); Step S13, testing the performance of the lightweight U-shaped neural network model using a test set to obtain an optimal U-shaped neural network model; In step S14, the input retinal blood vessel image is segmented using the optimal U-shaped neural network model, and the segmentation result of the retinal blood vessel image is displayed.

[0009] Preferably, in step S12, "00" in the first coding region represents the second layer, "01" represents the third layer, "10" represents the fourth layer, and "11" represents the fifth layer.

[0010] 3. The retinal vessel segmentation method based on the automated encoding-decoding network of discrete binary particle swarm optimization according to claim 1, characterized in that in step S12, from the first to the third bits in the second coding region, "000" indicates that the basic operation sequence is "3x3 convolution + activation function ReLU activation function", "001" indicates that the basic operation sequence is "3x3 convolution + batch normalization BN + activation function ReLU", "010" indicates that the basic operation sequence is "activation function ReLU + 3x3 convolution", and "011" indicates that the basic operation sequence is The order is "batch normalization BN + activation function ReLU + 3x3 convolution", "100" means the basic operation order is "3x3 convolution + instance normalization IN + activation function ReLU", "101" means the basic operation order is "3x3 convolution + instance normalization IN + activation function Mish", "110" means the basic operation order is "instance normalization IN + activation function ReLU + 3x3 convolution", and "111" means the basic operation order is "instance normalization IN + activation function Mish + 3x3 convolution", where the number of convolution kernels is 10; The 4th and 5th bits, "00" represents the intermediate node n1, "01" represents the intermediate node n2, "10" represents the intermediate node n3, and "11" represents the intermediate node n4; The sixth bit, "0" means using CBAM as the attention mechanism, and "1" means using ECA-Net as the attention mechanism; The 7th bit, "0" indicates that the residual connection is not used, and "1" indicates that the residual connection is used.

[0011] Preferably, in step S12, in the third coding region, "0" in each binary digit indicates that there is no connection between the two intermediate nodes, and "1" indicates that there is a connection between the two intermediate nodes.

[0012] Preferably, a feature pyramid attention module is used between the encoder output and the decoder input of the U-shaped neural network to enhance the U-shaped neural network's ability to fuse global features and local features, specifically comprising the following steps: A pyramid feature network is used to extract feature maps of different scales from the input feature map, and the feature maps of different scales are upsampled for the first time to adjust them to the same spatial size, so that the feature maps of different scales are spliced ​​together in the channel dimension to form a multi-scale feature map; The multi-scale feature map is upsampled a second time to align with the input feature map in the spatial dimension, and then fused with the input feature map to obtain a fused feature map; The convolution layer is used to capture the global semantic information of the global features in the fused feature map, and the adaptive pooling layer is used to weight the local features in the fused feature map to calculate the attention weights corresponding to the global features and local features respectively; According to the attention weights corresponding to the global features and local features, the feature values ​​at each position in the input feature map are weighted to output a weighted feature map.

[0013] Preferably, the features between the encoder and the decoder are fused by using a bitwise addition method.

[0014] Preferably, when the discrete binary particle swarm algorithm is used for optimization, i The speed of the particle V i Represents the speed and direction of the particle moving in each dimension, defined as: Where, t is the number of iterations, w is the inertia weight, It is i The local optimal position of a particle, G * is the optimal position of all particles, r 1, r 2 is a random number generated from uniform distribution U(0,1), c 1.c 2 is the learning factor.

[0015] Secondly, a retinal vessel segmentation system based on an automated encoding-decoding network using discrete binary particle swarm optimization is provided, comprising: Constructing a partitioning unit for constructing a retinal vascular dataset and dividing the retinal vascular dataset into a training set, a validation set, and a test set; The training and verification unit is used to search the internal structure and spatial architecture of different modules in the U-shaped neural network through the discrete binary particle swarm algorithm after designing the architecture search space of the U-shaped neural network, and to train and verify using the training set and verification set to obtain a lightweight U-shaped neural network model; Wherein, the architecture search space includes a first coding region, a second coding region, and a second coding region; The first coding region comprises two binary digits for indicating the number of gene layers; The second coding region comprises a seven-bit binary number, where the first to third bits are used to represent the operating gene, the fourth and fifth bits are used to represent the position of the attention factor, the sixth bit is used to represent the selected attention factor, and the seventh bit is used to represent the residual connection gene; The third coding region includes a six-bit binary number, the first bit is used to represent the connection relationship between the intermediate nodes (n1, n2), the second and third bits are used to represent the connection relationship between the intermediate nodes (n1, n3) and (n2, n3), and the fourth, fifth and sixth bits are used to represent the connection relationship between the intermediate nodes (n1, n4), (n2, n4) and (n3, n4); The testing unit is used to test the performance of the lightweight U-shaped neural network model through the test set to obtain the optimal U-shaped neural network model; The segmentation unit is used to segment the input retinal blood vessel image through the optimal U-shaped neural network model and display the segmentation result of the retinal blood vessel image.

[0016] Compared with the prior art, the present invention has the following beneficial effects: This invention uses the Discrete Binary Particle Swarm Optimization (DPSO) algorithm to automatically search and optimize neural network structures, allowing the network architecture to be automatically adjusted according to task requirements. The DPSO algorithm uses an efficient particle swarm optimization process to quickly search for the optimal structure within limited computing resources, thereby achieving efficient network architecture design. Compared to traditional manual design, this invention not only reduces manual intervention but also improves the accuracy and efficiency of network architecture design. This paper introduces the FPN Attention Block, combining attention mechanisms such as ECA-Net and CBAM, and flexibly configures the attention mechanism based on selection factors. By weighting the encoder output before fusing it with the decoder, it effectively focuses on important local features, improving the segmentation accuracy of small blood vessels and complex structures. Compared with traditional methods, this design significantly enhances the model's sensitivity to key areas, effectively improving segmentation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a diagram showing the corresponding relationship between the coding strategy and the network structure in the present invention; Figure 2 Schematic diagram of the feature pyramid attention module in the present invention; Figure 3 This is an example diagram of the internal node connection encoding method of the present invention; Figure 4 This is a flow chart of the discrete binary particle swarm optimization (DPSO) algorithm in the present invention; Figure 5 Schematic diagram of the network search framework and its internal factor gene sequences in the module of the present invention; Figure 6 Visualization results of comparative tests between the method of the present invention and other methods on the DRIVE dataset; Figure 7 Visualization results of comparative tests between the method of the present invention and other methods in the CHASE_DB1 dataset; Figure 8 2 is a structural block diagram of the segmentation system of the present invention.

[0018] The following specific embodiments will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0019] The following description is intended to disclose the present invention so that those skilled in the art can implement the present invention. The preferred embodiments described below are merely examples, and those skilled in the art may conceive of other obvious variations.

[0020] See also Figure 1 In one embodiment of the present invention, a retinal vessel segmentation method based on an automated encoding-decoding network using discrete binary particle swarm optimization is provided, comprising the following steps: Step S11, constructing a retinal vascular dataset, and dividing the retinal vascular dataset into a training set, a validation set, and a test set; It should be noted that the experimental data in this paper comes from a wide range of sources and is targeted, covering two public datasets: DRIVE and CHASE_DB1. These datasets provide a rich and diverse sample for the experiment, which strongly supports the comprehensive evaluation of model performance.

[0021] The DRIVE dataset (Digital Retinal Images for Vessel Extraction), a standardized dataset focused on retinal vessel segmentation, was released by the Netherlands Institute of Ophthalmology. It holds significant research value and widespread application in the field of ophthalmic medical image analysis. This dataset was originally designed to evaluate the performance of automatic vessel segmentation algorithms. This is particularly true for the early screening and diagnosis of chronic eye diseases such as diabetic retinopathy, where morphological and structural changes in vessels are often key pathological features. Therefore, accurate vessel segmentation is crucial for clinical diagnosis and pathological analysis. The DRIVE dataset contains 40 high-quality color fundus images, each with a resolution of 584×565 pixels. The images are clear and detailed, fully capturing the texture structure of retinal vessels. Importantly, each image is accompanied by a binary vessel mask manually annotated by professional ophthalmologists, serving as a precise reference for the vessel region. These high-quality manual labels not only provide a reliable training basis for supervised learning methods but also provide a unified benchmark for comparing model performance during evaluation.

[0022] The CHASE_DB1 dataset is a medical image dataset focused on pediatric retinal vascular analysis, offering valuable insights for the early diagnosis of ophthalmic diseases and research on children's visual health. Compared to other commonly used adult retinal datasets, CHASE_DB1 is unique in that it focuses on children, making it irreplaceable for studying pediatric retinal development and diagnosing pediatric eye diseases. Because the morphology, distribution, and scale of retinal vascular structures in children differ from those in adults, a high-quality dataset tailored to this population provides essential data support for the development of more adaptable medical image analysis algorithms. The dataset contains 28 high-resolution color fundus images, each measuring up to 960×999 pixels. The rich image detail clearly reveals the fine branching structure of retinal vessels, enabling in-depth analysis of local vascular features. Each image is accompanied by a precisely annotated vascular mask by experts, providing authoritative labeling for vascular segmentation in supervised learning methods. The image acquisition process utilizes specialized medical equipment, ensuring image clarity and consistency, providing a robust input foundation for algorithm training.

[0023] Step S12, after designing the architecture search space of the U-shaped neural network, the internal structure and spatial architecture of different modules in the U-shaped neural network are searched by using a discrete binary particle swarm algorithm, and training and verification are performed using a training set and a validation set to obtain a lightweight U-shaped neural network model; 1. Design and encode the search space The encoding strategy of the present invention systematically maps the global depth configuration of the network, the internal operations of the module, and the node connection relationship into a binary gene sequence through a hierarchical design, so that the particle swarm optimization algorithm can explore tens of thousands of potential architectures while maintaining the effectiveness of the structure. The following will elaborate on the correspondence between the encoding strategy and the network structure, revealing how it controls the network scale through the global architecture, defines the feature processing logic through module operations, and realizes the dynamic adaptation of feature flow through node connections, thereby achieving a balance between performance and computational efficiency. This design not only reflects the decoupling and controllability of the search space, but also significantly improves the model's ability to model the topological structure of retinal blood vessels, providing new ideas for automated network design.

[0024] This coding strategy consists of three main parts: global architecture coding (first coding area), module operation coding (second coding area) and internal node connection coding (third coding area), e.g. Figure 1 The global architecture encoding (2 bits) controls the number of skip connection layers and modules in the network, determining the overall depth and feature transfer scale. The module operation encoding (7 bits) defines the basic operation sequence, attention mechanism position, and residual connection state of each module, responsible for the computational logic and enhancement method of feature processing. The internal node connection encoding (6 bits) configures the feature flow path between intermediate nodes within the module, enabling dynamic adjustment of multi-branch fusion and information exchange.

[0025] Global architecture encoding: Global architecture encoding (as shown in Table 1) plays a vital role in the neural network architecture search system of the present invention. It defines the number of skip connection layers of the U-type codec network with the help of only 2-bit binary code, namely four specific combinations of "00", "01", "10" and "11". The determination of the number of skip connection layers directly determines the depth and number of modules of the network. From "00" corresponding to the minimum complexity configuration of 2 layers of skip connection and a total of 5 modules, to "11" representing the maximum complexity architecture of 5 layers of skip connection and a total of 11 modules, different binary coding combinations guide the network to make a trade-off between complexity and representation ability, providing a flexible and efficient solution to adapt to diverse task requirements.

[0026] Table 1 Global architecture encoding Module operation coding: For the structural search space within each codec module (as shown in Table 2), its rich variability provides broad possibilities for building a high-performance network architecture. As a key component, the module operation coding adopts a unique 6-bit binary design to define the core components of each module. In this 5-bit binary code, the first 2 bits are responsible for defining the basic operation sequence of the operation nodes within the module, the middle 2 bits of binary code focus on determining the node position of the attention mechanism embedding, the 5th bit of binary code represents the selected attention factor, and the 6th bit of binary code is used to control the residual connection (embodied in the design of the present invention as: the input node information n of the codec module in Add to input node information n out in).

[0027] Table 2 Coding of the spatial operation module within the codec module It should be noted that this invention uses a genetic representation method to encode neural network architectures, enabling the search for lightweight neural network structures. This encoding process uses a 3-bit binary number to represent the four basic designed operation genes. Each operation gene is composed of three basic operations combined in a specific order: 3x3 convolution (Conv), ReLU activation function, Mish activation function, batch normalization (BN), and instance normalization (IN). By permuting and combining these operation genes, eight different operation sequences can be constructed.

[0028] Assume that the basic operation set of the operator gene is {Conv, ReLU, Mish, BN, IN}. By permuting and combining these basic operations, 8 commonly used different operation sequences are selected. For the convolution operation in each operation sequence, the number of convolution kernels C is limited to a certain range to ensure the lightweight characteristics of the neural network. In the present invention, the number of convolution kernels C is limited to 10 to maintain the lightweight structure of the network while ensuring the network's expressiveness. In this way, a lightweight neural network architecture with strong expressiveness can be searched under limited computing resources.

[0029] Table 3 Selection and advantages of predefined operation combinations Attention Factor Position: This invention utilizes a concise and efficient encoding strategy to introduce an attention factor within each module. Specifically, only one attention factor is allowed within a module, and its position is represented using a binary code. The length of this position code is related to the number of basic operation factors, N, which determines the number of attention factors that can be supported within the module. To optimize the internal structure of the module, this method uses a two-bit binary number to represent the position of the attention factor. Let this position code be p, where p∈{0,1,2,3}. This means that four different position information can be represented by a two-bit binary number. Specifically, the value range of the position code p is 00, 01, 10, and 11, corresponding to four different positions within the module. This design allows for flexible positioning of the attention factor within each module, providing flexibility in weighting and adjusting features within the module. Through this compact binary encoding, the system can efficiently manage the attention factors within each module and achieve precise structural control. This encoding strategy ensures optimized internal module structure and functional flexibility, further enhancing the model's adaptability and accuracy in feature extraction.

[0030] Attention Mechanism Factor Selection: In this invention, the attention mechanism factor is determined by the sixth binary bit. This invention introduces two different attention mechanisms: Efficient Channel Attention (ECA-Net) and Convolutional Block Attention Module (CBAM). To enable flexible selection of attention mechanisms, a binary selection factor α∈{0,1} is designed to specify which attention mechanism to use.

[0031] Specifically, when the selection factor α = 0, CBAM is selected as the attention mechanism, while when α = 1, ECA-Net is selected as the attention mechanism. The selection factor α controls the configuration of the attention mechanism, allowing the model to flexibly switch between the two mechanisms based on task requirements and data characteristics.

[0032] Here, X represents the input feature map, and ECA and CBAM represent two different attention mechanism operations. This selective design allows the model to flexibly configure the attention mechanism based on the needs of specific tasks, thereby optimizing feature representation and enhancing the model's adaptability to different application scenarios.

[0033] Staggered connection gene: In the present invention, the residual connection gene is determined by the 7th binary number. This gene controls whether the module introduces residual connection. Let the input of the module be X and the output be Y. If the 7th binary gene r=1, the module introduces residual connection; if r =0, no residual connection is introduced.

[0034] The mathematical expression of residual connection is: in, f (X) represents the computational operation within the module, X is the input feature map of the module, and Y is the output feature map of the module. r is the value of the 7th binary gene. r =1, the residual connection is enabled, that is, the input X is added to the module output f(X); when r = 0, the residual connection is disabled and the output is only f (X).

[0035] This design allows the network to introduce residual connections in certain modules, thereby enhancing the stability of feature transfer, alleviating the gradient vanishing problem, and improving the training efficiency and performance of the network.

[0036] Jump connection: In practical applications, the design of the U-shaped network structure is not limited to a fixed number of layers, but can be flexibly adjusted according to the needs and complexity of specific tasks. Suppose the total number of layers of the network is L, where the number of encoder and decoder modules is N respectively. enc and N dec , N can be adjusted within a certain range according to the characteristics of the task enc and N dec Specifically, increasing or decreasing the number of encoder and decoder modules can flexibly control the depth and complexity of the network, thereby optimizing the expressiveness and adaptability of the model.

[0037] See also Figure 2 The skip connection in the U-shaped network structure is one of its key features, and its main purpose is to enhance the information transfer between the encoder and the decoder. Let the output of the encoder be E i , the input of the decoder is D i Based on the traditional skip connection, the encoder outputs E i It also passes through an additional FPN Attention Block (Feature Pyramid Attention Block), which further enhances the selectivity and weighting of features through a custom attention mechanism.

[0038] This attention mechanism introduces a pyramid feature network (FPN) and a global feature weighting mechanism to significantly enhance the U-shaped neural network's ability to fuse local and global features, thereby improving the performance of the U-shaped neural network in handling complex tasks. Specifically, this mechanism is implemented through the following key steps: (1) A pyramid feature network is used to extract feature maps of different scales from the input feature map, and the feature maps of different scales are upsampled for the first time to adjust them to the same spatial size, so that the feature maps of different scales are spliced ​​together in the channel dimension to form a multi-scale feature map; Specifically, the input feature map first passes through three layers of pyramid convolution, with each convolution operation extracting feature maps of different scales. These feature maps of different scales represent different levels of information, with fine-grained local information coexisting with coarse-grained global information. This process ensures that the network can simultaneously capture detailed information and global semantic information in the image, thereby enhancing the model's expressiveness in visual tasks. To ensure that features of different scales can be effectively fused, all generated feature maps are resized to the same spatial size through upsampling and then concatenated along the channel dimension to form a multi-scale feature representation.

[0039] (2) The multi-scale feature map is upsampled for the second time to align it with the input feature map in the spatial dimension, and then fused with the input feature map to obtain a fused feature map; Specifically, after obtaining the multi-scale feature maps, we perform an upsampling operation to further process this multi-scale information, aligning the concatenated feature maps with the input feature maps in spatial dimensions. This feature map now incorporates information from different scales, providing a richer feature representation. We then fuse the adjusted feature maps with the input feature maps to ensure that information at different levels is fully utilized within the network.

[0040] (3) The convolution layer is used to capture the global semantic information of the global features in the fusion feature map, and the adaptive pooling layer is used to weight the local features in the fusion feature map to calculate the attention weights corresponding to the global features and local features respectively; Specifically, global and local features pass through different processing modules, further extracted and optimized through convolutional layers and adaptive pooling layers, respectively. Convolutional layers primarily capture global semantic information, while adaptive pooling layers weight input features based on local variations, helping the model more flexibly focus on key areas. Through these operations, the network calculates the attention weight for each region, thereby determining which features are more important.

[0041] The attention mechanism's weighted operation: Attention weights are calculated for the processed global and local features. These weights are then applied to the input feature map in further operations. Specifically, the feature values ​​at each location in the input feature map are weighted according to the calculated weights, assigning higher weights to important features and suppressing less important ones. This weighted operation effectively enhances the representation of important features and suppresses irrelevant or useless features, thereby improving the model's accuracy and generalization capabilities.

[0042] (4) According to the attention weights corresponding to the global features and local features, the feature values ​​at each position in the input feature map are weighted to output a weighted feature map.

[0043] Specifically, after the weighting operation described above, the feature maps output by the network have stronger expressive power, especially in terms of the more accurate integration of detailed features and global semantic information. This mechanism can effectively improve the model's ability to recognize complex backgrounds and small objects, making the network more flexible in performing tasks such as segmentation and recognition, and enabling more accurate feature extraction in key areas.

[0044] It's important to note that FPN enhances the network's ability to focus on important areas through multi-scale pyramid feature fusion and weighted processing of global and local features. This design enables the network to accurately identify and enhance key features when handling complex visual tasks, effectively improving overall performance. The advantage of this design lies in its ability to capture information at different scales and dynamically adjust attention weights, giving the network greater flexibility and accuracy in complex tasks, thereby better adapting to diverse application scenarios.

[0045] Furthermore, in terms of codec feature fusion, the present invention adopts the element-wise addition method to fuse the features between the encoder and decoder. i and the decoder output is D i , the fusion operation obtains the fusion feature by adding the elements at the corresponding positions: This fusion operation preserves local details through element-by-element addition while avoiding a significant increase in computational effort. This simple and efficient approach helps reduce the computational complexity of the model and improve its speed while maintaining high performance.

[0046] Internal node connection coding: In the present invention, the internal structure of each module can be represented by nodes and edges in graph theory. Each node represents an operation unit or operation sequence, while the edge represents the connection relationship between nodes. In order to represent the connection relationship between nodes within the module, we use binary coding, in which each bit represents the connection status between two nodes. Nodes are divided into two categories: default nodes and intermediate nodes. The default nodes include default input nodes and default output nodes. The default input node receives the output data from the upstream module and passes it to each intermediate node without a predecessor node. The default output node receives the output of all intermediate nodes without subsequent nodes, adds and processes these output data, and then passes the processed data to the pooling layer.

[0047] See also Figure 3 , for the K intermediate nodes in the module. The connection relationship between the nodes is represented by a binary code of length K(K-1) / 2, where the connection relationship between each pair of nodes corresponds to one bit. Specifically, the first bit represents the connection relationship between node n1 and node n2, the next two bits represent the connection relationship between nodes n1 and n3, nodes n2 and n3, and so on, until the last K(K-1) / 2 bits represent the connection relationship between nodes n1, n2, ..., n K-2 and n K-1 The connection relationship between them.

[0048] If a pair of nodes n i and n j If the corresponding bit between them is 1, it means that there is a connection between the two nodes. j will receive data from node n i The output of is used as part of the input. Conversely, if the corresponding bit is 0, it means that there is no connection between the two nodes. Finally, each node adds up all its inputs and performs subsequent processing operations.

[0049] 2. Optimization algorithm (discrete particle swarm optimization) The idea behind the discrete binary particle swarm optimization (DPSO) algorithm stems from research on the foraging behavior of bird flocks. Birds in a flock share information to find the optimal foraging location. Specifically, each bird's current position represents a possible solution. Each bird evaluates its current position based on its fitness and remembers its own optimal position (a local optimum). Simultaneously, the optimal position of all individuals in the flock represents the optimal position for the entire flock (a global optimum). By continuously updating each bird's speed and position, the flock's foraging activity ultimately leads to the globally optimal foraging area.

[0050] In the discrete binary particle swarm algorithm, the speed and position of a flock of birds are mapped to a binary code space between 0 and 1. The position of each individual is represented by a binary bit, forming a binary vector. Through continuous iteration, the particle's speed is updated to adjust the change in its binary position based on the relationship between the set speed and the function, thus achieving an efficient search of the problem solution space. In each iteration, the particle's speed and position are updated based on the comparison between the local optimal position and the global optimal position, allowing the particle swarm to gradually approach the global optimal solution.

[0051] This algorithm implements particle velocity updates and position changes through discrete binary coding, allowing the particle swarm to optimize within a discrete search space and is suitable for those discrete optimization problems. In this way, the discrete binary particle swarm algorithm can efficiently search the solution space and find the optimal binary coding configuration after multiple iterations.

[0052] See also Figure 4 In the search space encoding, each binary bit is regarded as a particle, thereby mapping the entire gene sequence into a particle swarm. Assume that there are M particles, and the particles are in a N -dimensional space to find the optimal solution. The position of each particle is expressed as X i ∈RN, that is, i The coordinates of a particle in N-dimensional space.

[0053] The velocity V of each particle i i represents the speed and direction of its movement in each dimension and is defined as: Where, t is the number of iterations, w is the inertia weight (controls the effect of the particle's current velocity on its future velocity), It is i The local optimal position of a particle, is the optimal position of all particles, r 1, r 2 is a random number generated from uniform distribution U(0,1), c 1. c 2 is the learning factor, which controls the particles to their local optimal solution and the global optimal solution cognition.

[0054] The fitness of a particle is determined by the objective function f ( X i), the fitness reflects the quality of the particle position. After each iteration, the particle will update its position and select the historical position with the best fitness as the local optimal position. , the optimal position of the entire group is the global optimal ,Right now: Next, the particle's velocity is mapped to the interval [0,1] using the Sigmoid function: To ensure that the particle's velocity value is always within a reasonable range, so that the position update does not exceed the boundary. Finally, the particle position update follows the following formula: in, X i t+1 Indicates the i The particle in t +1 new position in iteration. By repeatedly iterating the above process, the particle swarm continuously approaches the global optimal solution, thus finding the optimal encoding scheme in the search space.

[0055] Step S13, testing the performance of the lightweight U-shaped neural network model using a test set to obtain an optimal U-shaped neural network model; In step S14, the input retinal blood vessel image is segmented using the optimal U-shaped neural network model, and the segmentation result of the retinal blood vessel image is displayed.

[0056] It should be noted that when evaluating model performance, the present invention uses a series of indicators to provide us with multi-dimensional measurement standards. The following will introduce Accuracy (ACC), Sensitivity (SEN), Specificity (SPE), F1 score (F1), Intersection over Union (IoU) and Precision in detail.

[0057] Accuracy (ACC) is an intuitive and commonly used metric. It reflects the proportion of samples correctly predicted by the model to the total number of samples. The calculation formula is: ACC = (number of correctly predicted samples / total number of samples) × 100%. This metric comprehensively considers the model's ability to judge positive and negative samples. A higher value indicates a higher prediction accuracy for the model across the entire sample. However, when the sample class distribution is uneven, the accuracy rate can give misleading results. For example, in a highly skewed dataset, even if the model incorrectly predicts a large number of minority class samples, the accuracy rate can still be high as long as it correctly predicts the vast majority of majority class samples.

[0058] Sensitivity (SEN), also known as recall or true positive rate (TPR), focuses on the proportion of positive samples that the model correctly identifies as true positives. Its calculation formula is: SEN = (True Positive Number / (True Positive Number + False Negative Number)) × 100%. In scenarios such as disease diagnosis, SEN is crucial because it is desirable to detect as many individuals with actual illnesses (positive samples) as possible to avoid missed diagnoses. A high recall rate indicates that the model has a strong ability to capture positive samples and does not miss many real target samples.

[0059] Specificity (SPE), also known as the True Negative Rate (TNR), measures the proportion of samples correctly identified as negative when they are actually negative. It is calculated as: SPE = (True Negatives / (True Negatives + False Positives)) × 100%. In practical applications, such as when security monitoring systems identify normal behavior (negative samples), high specificity can effectively reduce false alarms for normal situations. Similar to recall, specificity primarily reflects the model's ability to correctly identify negative samples, ensuring the model's accuracy in identifying non-target samples.

[0060] The F1 score (F1) is a harmonic mean metric that comprehensively considers Precision and Recall. Its calculation formula is: F1 = 2 × (Precision × Recall) / (Precision + Recall). Because Precision and Recall can constrain each other in certain situations, focusing on either metric in isolation does not fully reflect model performance. The F1 score balances both, providing a more comprehensive assessment of the model's overall performance in predicting positive examples. A higher F1 score indicates that the model performs well in both accurately identifying positive examples and finding as many positive examples as possible. This makes it particularly suitable for evaluating tasks that require both accuracy and completeness.

[0061] Intersection over Union (IoU), also known as the intersection-over-union ratio, is commonly used in fields such as object detection and image segmentation. It measures the degree of overlap by calculating the ratio of the area (or number of pixels, etc.) of the intersection between the model's predictions and the ground-truth annotations to the area of ​​their union. The formula is: IoU = (intersection of predictions and ground-truth annotations / union of predictions and ground-truth annotations) × 100%. An IoU value closer to 1 indicates a closer match between the model's predictions and the ground-truth. It intuitively reflects the model's accuracy in locating and segmenting objects and is a key performance metric for evaluating such models.

[0062] Precision refers to the ratio of samples predicted by the model as positive and actually positive to the total number of samples predicted as positive. The calculation formula is: Precision = (True Positives / (True Positives + False Positives)) × 100%. Precision focuses on the reliability of the model's predictions of positive samples. A high precision means that the model's predictions of positive samples contain a high proportion of true positive samples. This means that the model is more accurate in identifying positive samples and can effectively reduce false positives. This is important in scenarios with strict requirements for false positives.

[0063] In the retinal vessel segmentation task, we systematically compared our proposed method with 11 classic and cutting-edge models on the DRIVE and CHASE_DB1 benchmark datasets. The comparison models included traditional U-network variants, lightweight architectures, and innovative models based on neural architecture search. The experimental results were quantitatively evaluated using multi-dimensional metrics such as ACC, SEN, SPE, F1, and IoU, comprehensively verifying the model's segmentation accuracy and generalization capabilities. To ensure a fair comparison, the hyperparameter settings of all compared models remained consistent with those used in our method.

[0064] Comparison verification: Please refer to Figure 5 ,In order to show the evaluation results of the network evolved by the algorithm of the present invention and compare its performance on the datasets DRIVE and CHASE_DB1 with other advanced networks, the detailed network structure of the automatic design is shown in Figure 5 shown.

[0065] Experimental results on the DRIVE dataset (Table 4) show that our method achieves state-of-the-art sensitivity (SEN = 0.8403) and specificity (SPE = 0.9979), surpassing the second-place MedUNAS ODE (SEN = 0.8382) and third-place UNet++ (SPE = 0.9976), respectively. Its F1 score (0.8299) ranks second among the compared models, trailing only the 1.27M-parameter MedUNAS ODE (0.8301). With only 0.09M parameters, our method achieves improved accuracy while maintaining its lightweight nature. Its Intersection over Union (IoU) metric (0.7542) outperforms most compared models, demonstrating its accuracy in vascular region localization. Traditional models such as UNet (F1 = 0.8052) and Attention UNet (F1 = 0.8089) suffer from limitations in feature fusion and attention mechanisms, resulting in their inferior performance in recognizing complex vascular structures.

[0066] Table 4 Comparison with other methods on the DRIVE dataset Experimental results on the CHASE_DB1 dataset (Table 5) further validate the robustness of our method. In the children's retinal vessel segmentation task, our model achieved leading scores with F1=0.8120 and SPE=0.9944. Although Genetic U-Net (F1=0.8152) and FR-UNet (F1=0.8138) have a slight advantage in F1 score, their parameter counts, at 0.93M and 1.15M, respectively, are 10 times and 13 times that of our method. This comparison highlights the breakthrough balance achieved in our research between model lightweighting and performance optimization. Notably, our method also performs well in the IoU (0.7436) and ACC (0.9701) metrics, demonstrating its leading capabilities in recognizing small blood vessels in high-resolution images and suppressing complex backgrounds.

[0067] Table 5 Comparison with other methods on the CHASE_DB1 dataset Cross-dataset analysis demonstrates that this method maintains stable performance across retinal images of varying resolutions and age groups, validating its adaptability to diverse vascular morphologies. Compared to comparable NAS-based models, this method, through a DBPSO-driven automated design framework, achieves comparable or superior segmentation accuracy while reducing the number of parameters by over 90%, fully demonstrating the synergistic advantages of modular search space and swarm intelligence optimization strategies. This lightweight feature is of great significance for scenarios such as real-time clinical diagnosis and portable medical device deployment, providing an efficient solution for medical image analysis.

[0068] See also Figure 6 and Figure 7 Furthermore, in order to intuitively verify the segmentation performance of the model in different task scenarios, the present invention clearly demonstrates the advantages of the method of the present invention on the DRIVE and CHASE_DB1 datasets through visualization results comparison. Visual analysis can not only intuitively present the model's ability to recognize vascular structures, but also reveal its noise suppression and detail capture characteristics under complex backgrounds. By comparing the segmentation results of different methods (such as Figure 6 and Figure 7 As shown in the figure, we can clearly see the significant advantages of this method in preserving blood vessel continuity, suppressing background interference and processing small-scale features. Especially in the low-contrast area of ​​the DRIVE dataset ( Figure 6 ), the model accurately captures the microvascular branches missed by traditional methods (such as UNet) through the CBAM attention mechanism; in the high-resolution image of CHASE_DB1 ( Figure 7), whose dynamic feature fusion strategy effectively connects the delicate vascular networks in children's retinas. These visualization results complement the quantitative metrics and demonstrate the universality and efficiency of the automated network design framework for medical imaging and industrial inspection tasks.

[0069] See also Figure 8 The present invention provides a retinal vessel segmentation system based on an automated encoding-decoding network optimized by discrete binary particle swarm optimization, comprising: Constructing a partitioning unit for constructing a retinal vascular dataset and dividing the retinal vascular dataset into a training set, a validation set, and a test set; The training and verification unit is used to search the internal structure and spatial architecture of different modules in the U-shaped neural network through the discrete binary particle swarm algorithm after designing the architecture search space of the U-shaped neural network, and to train and verify using the training set and verification set to obtain a lightweight U-shaped neural network model; Wherein, the architecture search space includes a first coding region, a second coding region, and a second coding region; The first coding region includes two binary digits for indicating the number of gene layers; The second coding region comprises a seven-bit binary number, where the first to third bits are used to represent the operating gene, the fourth and fifth bits are used to represent the position of the attention factor, the sixth bit is used to represent the selected attention factor, and the seventh bit is used to represent the residual connection gene; The third coding region includes a six-bit binary number, the first bit is used to represent the connection relationship between the intermediate nodes (n1, n2), the second and third bits are used to represent the connection relationship between the intermediate nodes (n1, n3) and (n2, n3), and the fourth, fifth and sixth bits are used to represent the connection relationship between the intermediate nodes (n1, n4), (n2, n4) and (n3, n4); The testing unit is used to test the performance of the lightweight U-shaped neural network model through the test set to obtain the optimal U-shaped neural network model; The segmentation unit is used to segment the input retinal blood vessel image through the optimal U-shaped neural network model and display the segmentation result of the retinal blood vessel image.

[0070] In summary, the beneficial effects of the present invention are: This invention uses the Discrete Binary Particle Swarm Optimization (DPSO) algorithm to automatically search and optimize neural network structures, allowing the network architecture to be automatically adjusted according to task requirements. The DPSO algorithm uses an efficient particle swarm optimization process to quickly search for the optimal structure within limited computing resources, thereby achieving efficient network architecture design. Compared to traditional manual design, this invention not only reduces manual intervention but also improves the accuracy and efficiency of network architecture design. This paper introduces the FPN Attention Block, combining attention mechanisms such as ECA-Net and CBAM, and flexibly configures the attention mechanism based on selection factors. By weighting the encoder output before fusing it with the decoder, it effectively focuses on important local features, improving the segmentation accuracy of small blood vessels and complex structures. Compared with traditional methods, this design significantly enhances the model's sensitivity to key areas, effectively improving segmentation accuracy.

[0071] The above shows and describes 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 above embodiments and descriptions merely illustrate the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.

Claims

1. A retinal vessel segmentation method based on an automated encoding-decoding network optimized with discrete binary particle swarm optimization, characterized in that: The following steps are involved: Step S11, constructing a retinal vascular dataset, and dividing the retinal vascular dataset into a training set, a validation set, and a test set; Step S12, after designing the architecture search space of the U-shaped neural network, the internal structure and spatial architecture of different modules in the U-shaped neural network are searched by using a discrete binary particle swarm algorithm, and training and verification are performed using a training set and a validation set to obtain a lightweight U-shaped neural network model; Wherein, the architecture search space includes a first coding region, a second coding region, and a second coding region; The first coding region includes two binary digits for indicating the number of gene layers; The second coding region comprises a seven-bit binary number, where the first to third bits are used to represent the operating gene, the fourth and fifth bits are used to represent the position of the attention factor, the sixth bit is used to represent the selected attention factor, and the seventh bit is used to represent the residual connection gene; The third coding region includes a six-bit binary number, the first bit is used to represent the connection relationship between the intermediate nodes (n1, n2), the second and third bits are used to represent the connection relationship between the intermediate nodes (n1, n3) and (n2, n3), and the fourth, fifth and sixth bits are used to represent the connection relationship between the intermediate nodes (n1, n4), (n2, n4) and (n3, n4); Step S13, testing the performance of the lightweight U-shaped neural network model using a test set to obtain an optimal U-shaped neural network model; Step S14 , segmenting the input retinal vascular image using the optimal U-shaped neural network model, and displaying the segmentation result of the retinal vascular image.

2. The retinal vessel segmentation method based on the automated encoding-decoding network of discrete binary particle swarm optimization according to claim 1, characterized in that: In step S12, "00" in the first coding region represents the second layer, "01" represents the third layer, "10" represents the fourth layer, and "11" represents the fifth layer.

3. The retinal vessel segmentation method based on the automated encoding-decoding network of discrete binary particle swarm optimization according to claim 1, characterized in that: In step S12, for the first to third bits in the second coding region, "000" indicates that the basic operation sequence is "3x3 convolution + activation function ReLU activation function", "001" indicates that the basic operation sequence is "3x3 convolution + batch normalization BN + activation function ReLU", "010" indicates that the basic operation sequence is "activation function ReLU + 3x3 convolution", "011" indicates that the basic operation sequence is "batch normalization BN + activation function ReLU + 3x3 convolution", "100" indicates that the basic operation sequence is "3x3 convolution + instance normalization IN + activation function ReLU", "101" indicates that the basic operation sequence is "3x3 convolution + instance normalization IN + activation function Mish", "110" indicates that the basic operation sequence is "instance normalization IN + activation function ReLU + 3x3 convolution", and "111" indicates that the basic operation sequence is "instance normalization IN + activation function Mish + 3x3 convolution", where the number of convolution kernels is 10; The 4th and 5th bits, "00" represents the intermediate node n1, "01" represents the intermediate node n2, "10" represents the intermediate node n3, and "11" represents the intermediate node n4; The sixth bit, "0" means using ECA-Net as the attention mechanism, and "1" means using CBAM as the attention mechanism; The 7th bit, "0" means that the residual connection is not used, and "1" means that the residual connection is used.

4. The retinal vessel segmentation method based on the automated encoding-decoding network of discrete binary particle swarm optimization according to claim 1, characterized in that: In step S12, in the third coding area, "0" in each binary digit indicates that there is no connection between the two intermediate nodes, and "1" indicates that there is a connection between the two intermediate nodes.

5. The retinal vessel segmentation method based on the automated encoding-decoding network of discrete binary particle swarm optimization according to claim 1, characterized in that: A feature pyramid attention module is used between the encoder output and decoder input of the U-shaped neural network to enhance the U-shaped neural network's ability to fuse global and local features. The specific steps include: A pyramid feature network is used to extract feature maps of different scales from the input feature map, and the feature maps of different scales are upsampled for the first time to adjust them to the same spatial size, so that the feature maps of different scales are spliced ​​together in the channel dimension to form a multi-scale feature map; The multi-scale feature map is upsampled a second time to align with the input feature map in the spatial dimension, and then fused with the input feature map to obtain a fused feature map; The convolution layer is used to capture the global semantic information of the global features in the fused feature map, and the adaptive pooling layer is used to weight the local features in the fused feature map to calculate the attention weights corresponding to the global features and local features respectively; According to the attention weights corresponding to the global features and local features, the feature values ​​at each position in the input feature map are weighted to output a weighted feature map.

6. The retinal vessel segmentation method based on the automated encoding-decoding network of discrete binary particle swarm optimization according to claim 5, characterized in that: The features between the encoder and decoder are fused using a bitwise addition method.

7. The retinal vessel segmentation method based on the automated encoding-decoding network of discrete binary particle swarm optimization according to claim 1, characterized in that: When using discrete binary particle swarm optimization, i The speed of the particle V i Represents the speed and direction of the particle moving in each dimension, defined as: Where, t is the number of iterations, w is the inertia weight, It is i The local optimal position of a particle, G * is the optimal position of all particles, r 1, r 2 is a random number generated from uniform distribution U(0,1), c 1. c 2 is the learning factor.

8. A retinal vessel segmentation system based on an automated encoding-decoding network optimized by discrete binary particle swarm optimization, characterized in that: include: Constructing a partitioning unit for constructing a retinal vascular dataset and dividing the retinal vascular dataset into a training set, a validation set, and a test set; The training and verification unit is used to search the internal structure and spatial architecture of different modules in the U-shaped neural network through the discrete binary particle swarm algorithm after designing the architecture search space of the U-shaped neural network, and to train and verify using the training set and verification set to obtain a lightweight U-shaped neural network model; Wherein, the architecture search space includes a first coding region, a second coding region, and a second coding region; The first coding region includes two binary digits for indicating the number of gene layers; The second coding region comprises a seven-bit binary number, where the first to third bits are used to represent the operating gene, the fourth and fifth bits are used to represent the position of the attention factor, the sixth bit is used to represent the selected attention factor, and the seventh bit is used to represent the residual connection gene; The third coding region includes a six-bit binary number, the first bit is used to represent the connection relationship between the intermediate nodes (n1, n2), the second and third bits are used to represent the connection relationship between the intermediate nodes (n1, n3) and (n2, n3), and the fourth, fifth and sixth bits are used to represent the connection relationship between the intermediate nodes (n1, n4), (n2, n4) and (n3, n4); The testing unit is used to test the performance of the lightweight U-shaped neural network model through the test set to obtain the optimal U-shaped neural network model; The segmentation unit is used to segment the input retinal blood vessel image through the optimal U-shaped neural network model and display the segmentation result of the retinal blood vessel image.

Citation Information

Patent Citations

  • Rough set neural network method for fundus retinal vessel image segmentation

    CN111815574A

  • Eye fundus blood vessel image segmentation method based on visual attention fusion network

    CN117523202A

  • Training method for fundus blood vessel image classification and related system and method

    CN118262402A