A multi-lesion segmentation method for diabetic retinopathy
Through the dual-branch structure and feature interaction module, combined with image enhancement and pre-training network, the accuracy and efficiency problems of multi-lesion segmentation of diabetic retinopathy are solved, the simultaneous and efficient segmentation of multiple lesions is achieved, and the diagnosis of diabetic retinopathy is improved. and treatment levels.
Patent Information
- Application Number
- CN202410793240.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-19
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-06-19
AI Technical Summary
Existing diabetic retinopathy image segmentation methods have low accuracy in the case of multiple lesions and are prone to over-fitting. Moreover, traditional methods require repeated single-lesion segmentation training multiple times, ignoring the medical correlation between different lesions, and are difficult to be efficient and accurate. Divide a variety of lesions.
A dual-branch structure is used to combine image enhancement algorithms (CLAHE and CCEA) and pre-trained feature extraction networks, and the U-Net network and feature interaction module extended by the residual separable convolution module (RDWC) are used to achieve four main lesion types. Synchronous and efficient segmentation.
It improves the segmentation accuracy and efficiency of diabetic retinopathy images, reduces the risk of misdiagnosis and missed diagnosis, enhances the efficiency and accuracy of early screening, and reduces the demand for medical resources.
Smart Images

Figure CN118365658B
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of medical image analysis, artificial intelligence, machine vision, etc., and is a multi-lesion segmentation method for diabetic retinopathy. Background Art
[0002] In the field of ophthalmology, diabetic retinopathy has attracted much attention as one of the common and serious complications of diabetic patients. This disease may seriously damage vision in the late stage and even cause irreversible blindness. Its pathological characteristics include microvascular lesions, macular edema, hard exudates, soft exudates, etc. These lesions vary in size and shape, but have certain similarities. The development of algorithms for automatic segmentation of diabetic retinopathy will effectively support the work of ophthalmologists, improve the efficiency and accuracy of early screening of diabetic retinopathy, and reduce the risk of misdiagnosis and missed diagnosis.
[0003] In the field of medical image processing, image segmentation technology is widely used in diagnosis and treatment planning. However, due to the complexity of diabetic retinopathy, traditional image segmentation methods usually perform poorly in the case of multiple lesions and have difficulty in accurately distinguishing different types of lesions. Existing neural network-based methods have problems such as too many parameters and complex calculations, and most diabetic retinopathy segmentation models only focus on one type of lesion, and generally have problems such as low accuracy and easy overfitting. For multiple lesions, these methods need to repeat the single lesion segmentation training process multiple times. At the same time, due to the independent training stages, the potential medical correlations between different lesions that contribute to multi-lesion segmentation will be ignored. Therefore, an efficient, accurate and robust segmentation method is needed to overcome these challenges and improve the diagnosis and treatment of diabetic retinopathy.
[0004] Considering the importance of automatic segmentation of diabetic retinopathy and the current technical challenges and clinical needs in this segmentation field, the present invention aims to provide an innovative and efficient solution. With the help of advanced deep learning technology, the present invention can automatically and accurately achieve multi-lesion segmentation of diabetic retinopathy. This method is not only of great significance for alleviating the shortage of medical resources and regular screening, but also improves the accuracy of segmentation, thereby improving the efficiency and quality of overall medical services. Summary of the invention
[0005] In view of the above problems, the present invention proposes an automated multi-lesion segmentation scheme for diabetic retinopathy, which aims to simultaneously, accurately and efficiently segment four main types of lesions, including microaneurysms, hemorrhages, hard exudates and soft exudates. The invention adopts a dual-branch structure, and each branch applies an image enhancement algorithm (CLAHE and CCEA) to increase the number of samples and improve the feature richness of the lesions; by pre-training the feature extraction network, the impact caused by the uneven number of samples is reduced. In addition, an inter-domain feature interaction module is proposed to further refine the features and combine the feature maps of the two branches. The multi-lesion segmentation scheme realizes the synchronous and efficient segmentation of four lesions, can be effectively applied to clinical experiments, and helps to improve the efficiency and accuracy of early screening of diabetic retinopathy. In order to achieve the above purpose, the present invention adopts the following technical means:
[0006] The present invention provides a multi-lesion segmentation method for diabetic retinopathy, comprising the following steps:
[0007] Step 1, data preprocessing: First, using the field of view image, the original image is processed to eliminate its edge black edges, and the top and bottom are padded to ensure that the aspect ratio of the image is 1:1, and it is uniformly adjusted to a uniform size of 640×640 pixels;
[0008] Step 2, image enhancement: The image processed in step 1 is enhanced by contrast limited adaptive histogram equalization (CLAHE) and color and contrast enhancement algorithm (CCEA) to obtain two types of enhanced images;
[0009] Step 3: Data enhancement: For the two types of enhanced images processed in step 2, affine transformation is performed to expand the data set, including data enhancement methods such as random horizontal / vertical flipping and random rotation.
[0010] Step 4: Feature extraction network pre-training: After block sampling of the two types of enhanced data sets obtained in step 3, they are sent to the U-Net network extended by the residual separable convolution module (RDWC) for pre-training;
[0011] Step 5: Multi-lesion segmentation: A dual-branch structure is used, and the two types of enhanced data sets obtained in step 3 are respectively sent as input to the constructed network model. The network model includes a pre-trained extended U-Net network, a feature interaction module and a segmentation head. The extended U-Net network performs feature extraction, and the feature interaction module performs feature interaction. On this basis, the features of the two branches are connected and sent to the segmentation head to obtain the results of multi-lesion segmentation.
[0012] In the above scheme, the images are processed to the same size, and the specific implementation algorithm is:
[0013] Step a1. Using the field of view image, the original image is processed to eliminate the black edges thereof;
[0014] Step a2. Fill the result of step a1 up and down to ensure that the aspect ratio of the image is 1:1;
[0015] Step a3: resize the results of step a2 to a uniform size of 640×640 pixels.
[0016] In the above scheme, in step 2:
[0017] The specific implementation algorithm of the color and contrast enhancement algorithm for the image is as follows:
[0018]
[0019] In the formula, and They represent the values of the image to be enhanced and the image processed by the color and contrast enhancement algorithm at the (i, j) position respectively. * represents the convolution operation. α, τ, γ are three constants. σ is the variance of the Gaussian filter. The parameters are set as follows: α=4, τ=-4, γ=128, σ=χ / 30, and χ is the width of the input image.
[0020] In the above scheme, in step 4, block sampling is performed on the enhanced data set. The specific implementation algorithm is:
[0021] Step b1: randomly select an enhanced image image;
[0022] Step b2: randomly select a center point (x, y) and extract a 64*64 pixel image patch from the image;
[0023] Step b3: According to the label label(x,y) at the center point, determine the category to which the image patch belongs: label=0 indicates no lesion, label=1 indicates microvascular tumor, label=2 indicates bleeding, label=3 indicates hard exudation, and label=4 indicates soft exudation;
[0024] Step b4: Determine whether the number of samples in each category meets the requirement, and ensure that the samples in each category meet the ratio of 1:1:1:1:4. If the requirement is met, stop block sampling.
[0025] In the above scheme, in step 4, the U-Net network extended by the residual separable convolution module is used for feature extraction. The specific implementation algorithm is:
[0026] The U-Net network is extended by the built-in residual separable convolution module. The structure of the U-Net model consists of an encoder and a decoder.
[0027] The encoder uses the RDWC module for feature extraction, which can generate high-level features of the image step by step. The RDWC module structure includes: two serially connected repeated units, each unit contains a separable convolution layer, a batch normalization layer and a Relu activation function layer for feature extraction, and then the extracted features are added to the input to get the output;
[0028] The decoder uses an interpolation algorithm to gradually fuse the generated high-level features with the features of the previous layer to reconstruct the segmentation result;
[0029] The identity mapping is used between the encoder and the decoder to connect features of the same dimension.
[0030] In the above scheme, in step 5, the feature interaction module is used, and the specific implementation algorithm is:
[0031] The feature interaction module adopts a structure similar to Transformer, including an image attention module, a feedforward neural network, and a residual connection part;
[0032] For the image attention module, intra-domain feature interaction and inter-domain feature interaction are realized respectively according to different inputs. When the feature maps X, Y extracted by the input extended U-Net network are consistent, that is, they come from the same branch, self-attention calculation is performed to realize intra-domain feature interaction; when the input X, Y are different, that is, they come from different branches, cross-attention calculation is performed to complete inter-domain feature interaction.
[0033] In the above scheme, by integrating self-attention mechanism, deep separable convolution and gating mechanism and other technical means, the model's ability to extract effective features on two branches can be improved while greatly reducing the number of parameters, solving the problem of model overfitting and complex features difficult to extract in diabetic retinopathy multi-lesion segmentation, and greatly improving the segmentation effect. The specific implementation process of the feature interaction module is as follows:
[0034] Step c1: Generate query (Q), key (K), and value (V) projections on the feature map, and enrich the global context by applying 1×1 convolution and 3×3 depth convolution to obtain Q, K, and V;
[0035] Step c1.1: feature map Apply a 1×1 convolution , and get the intermediate result ;
[0036] Step c1.2: Intermediate results Apply 3×3 depthwise separable convolution , get the query Q;
[0037] Step c1.3: Apply 1×1 convolution to the feature map , and get the intermediate result Y ;
[0038] Step c1.4: Intermediate results Y Apply 3×3 depthwise separable convolution , get the key K;
[0039] Step c1.5: feature map Apply a 1×1 convolution , and get the intermediate result Y ;
[0040] Step c1.6: Intermediate results Y Apply 3×3 depthwise separable convolution , get the value .
[0041] Step c2: Perform dot product interaction on query Q and key K to generate transposed attention graph A;
[0042] Step c3: Apply the Softmax function to the transposed attention map A and multiply it with V to obtain the attention weighted value;
[0043] Step c4: Add the attention weighted value to the input feature map X and perform a 1×1 convolution to obtain the intermediate feature map. ;
[0044] Step c5: Intermediate feature map Apply a feedforward neural network (FFN) to encode local image features through a gating mechanism and depthwise separable convolution to obtain an output feature map .
[0045] Step c5.1: Intermediate feature map Apply a 1×1 convolution , and get the intermediate result ;
[0046] Step c5.2: Intermediate results Apply 3×3 depthwise separable convolution , and get the intermediate result ;
[0047] Step c5.3: Intermediate feature map Apply a 1×1 convolution , and get the intermediate result ;
[0048] Step c5.4: Intermediate results Apply 3×3 depthwise separable convolution , and get the intermediate result ;
[0049] Step c5.5: Intermediate results Apply the gating mechanism and then Perform element-wise multiplication to obtain gated output , where ⊙ represents element-wise multiplication and represents the GELU nonlinear function;
[0050] Step c5.6: Combine the gated output Gating(X) with the intermediate feature map Add and pass 1×1 convolution , and get the output feature map .
[0051] Because the present invention adopts the above technical means, it has the following beneficial effects:
[0052] 1. Image processing of diabetic retinopathy images: The present invention uses contrast-limited adaptive histogram equalization (CLAHE) and color and contrast enhancement algorithm (CCEA) algorithms for image enhancement, which increases the number of samples while enhancing the image contrast;
[0053] 2. Feature extraction: The present invention extends the U-Net network by using a built-in RDWC module, which is more suitable for multi-lesion feature extraction; using deep separable convolution, it can effectively extract features while reducing the number of parameters;
[0054] 3. Feature interaction: The present invention proposes a feature interaction module, which performs intra-domain and inter-domain feature interaction, further refines the features and combines the features of the two feature maps, thereby improving the feature richness of the lesion and being more conducive to lesion segmentation;
[0055] 4. A multi-task segmentation model is proposed, which can simultaneously, accurately and efficiently segment the four early lesions of diabetic retinopathy (microaneurysm, hemorrhage, hard exudate and soft exudate). BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 A basic flow chart of the multi-lesion segmentation scheme for diabetic retinopathy involved in the present invention;
[0057] Figure 2 The image enhancement result diagrams in the present invention (CLAHE (left), CCEA (right));
[0058] Figure 3 It is the overall network structure diagram for image segmentation in the present invention;
[0059] Figure 4is a basic structural diagram of a feature extractor used for feature extraction in the present invention;
[0060] Figure 5 is a structural diagram of a feature interaction module used for feature interaction in the present invention;
[0061] Figure 6 is a structural diagram of a feature feed-forward network used for enriching features in the present invention;
[0062] Figure 7 This is the segmentation result diagram finally obtained in the present invention. DETAILED DESCRIPTION
[0063] The following is a detailed description of the embodiments of the present invention. Although the present invention will be described and illustrated in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, modifications or equivalent substitutions made to the present invention should all be included in the scope of the claims of the present invention.
[0064] In addition, in order to better illustrate the present invention, numerous specific details are provided in the following specific embodiments. It will be appreciated by those skilled in the art that the present invention can be implemented without these specific details. It will be appreciated by those skilled in the art that the present invention can be implemented without these specific details.
[0065] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0066] The hardware environment used for algorithm testing is CPUlntel(R)Xeon(R)CPUE5-1650v4@3.60GHzGPUNVIDIATITANXp, and the operating environment is python3.6 and related extension package Pytorch.
[0067] The core algorithm of the present invention includes deep convolutional neural network, image enhancement algorithm (CLAHE and CCEA), feature interaction module, and feature feedforward network, etc.
[0068] like Figure 1 As shown, a multi-lesion segmentation method for diabetic retinopathy includes the following steps:
[0069] Step 1: Use the FOV image to process the original image to remove the black edges, pad the top and bottom of the image to ensure that the aspect ratio of the image is 1:1, and resize it to a uniform size of 640×640 pixels;
[0070] Step 2: For the uniformly sized images, contrast-limited adaptive histogram equalization (CLAHE) and color and contrast enhancement algorithm (CCEA) are used to perform image enhancement processing, and the following is obtained: Figure 2 The image enhancement results are shown.
[0071] The specific implementation formula of CCEA is:
[0072]
[0073] In the formula, and Represent the original image and the image processed by CCEA, * represents the convolution operation, α, τ, γ are three constants, σ is the variance of the Gaussian filter. The parameters are set as follows: α=4, τ=-4, γ=128, σ=χ / 30, χ is the width of the input image.
[0074] Model training phase:
[0075] Step 3: Expand the dataset by performing random horizontal / vertical flipping, random rotation, etc. to improve the performance and generalization ability of the model.
[0076] Step 4: The enhanced image is block sampled and then fed into the U-Net network extended by the RDWC module for pre-training.
[0077] The specific implementation steps of block sampling are:
[0078] Step a1: Randomly select an enhanced image image;
[0079] Step a2: Randomly select a center point (x, y) and extract a 64*64 patch from the image;
[0080] Step a3: According to the label label(x,y) at the center point, determine the category of the image patch: label=0 indicates no lesion, label=1 indicates microvascular tumor, label=2 indicates bleeding, label=3 indicates hard exudation, and label=4 indicates soft exudation;
[0081] Step a4: Determine whether the number of samples in each category meets the requirement, and ensure that the samples in each category meet the ratio of 1:1:1:1:4. If so, stop block sampling.
[0082] Step 5: Send the two enhanced images to Figure 3 The overall network shown is trained to obtain model parameters with good segmentation effect.
[0083] Model prediction stage:
[0084] The two enhanced images I1 and I2 are sent to the trained overall network for prediction.
[0085] The specific implementation details of network prediction are:
[0086] Step b1. The two enhanced images I1 and I2 are respectively sent to the extended U-Net network for feature extraction to obtain F1 and F2;
[0087] Step b2. Send the result of step b1 to the feature interaction module to obtain further enhanced feature maps Fc1 and Fc2;
[0088] Step b3. Connect the results in step b2 together and send them to the segmentation head (containing a Norm layer and a 1×1 convolution layer) to predict the lesion mask.
[0089] For feature extraction, we use the extended U-Net network, using Figure 4 The residual separable convolutional module shown extends the U-Net network:
[0090] The structure of the original U-Net model consists of an encoder and a decoder.
[0091] The core algorithm of the encoder is the convolution operation of the convolution layer, which can generate high-level features of the image step by step;
[0092] The core algorithm of the decoder is the interpolation algorithm, which gradually merges the generated high-level features with the features of the previous layer to reconstruct the segmentation result;
[0093] The identity mapping is used between the encoder and the decoder to connect features of the same dimension.
[0094] In the present invention, the encoder uses the RDWC module for feature extraction, and the module structure includes: two serially connected repeated units, each unit includes a separable convolution layer, a batch normalization layer and a Relu activation function layer for feature extraction, and then the extracted features are added to the input to obtain the output.
[0095] For feature interaction, we adopt the proposed feature interaction module, which has a structure similar to Transformer, including image attention module, feedforward neural network and residual connection part, such as Figure 5-6 As shown, the specific implementation details are:
[0096] For the image attention module, intra-domain feature interaction and inter-domain feature interaction are implemented according to different inputs. When the feature maps X and Y extracted by the input extended U-Net network are consistent, that is, they come from the same branch, self-attention calculation is implemented, and intra-domain feature interaction is completed; when X and Y are different, that is, they come from different branches, cross-attention calculation is implemented, and inter-domain feature interaction is completed. The specific implementation process is as follows:
[0097] Step c1: feature map Generate query (Q), key (K), and value (V) projections by applying 1×1 convolution and 3×3 depthwise convolution to enrich the global context to obtain Q, K, and V;
[0098] Step c1.1: feature map Apply a 1×1 convolution , and get the intermediate result ;
[0099] Step c1.2: Intermediate results Apply 3×3 depthwise separable convolution , get the query Q;
[0100] Step c1.3: feature map Apply a 1×1 convolution , and get the intermediate result Y ;
[0101] Step c1.4: Intermediate results Y Apply 3×3 depthwise separable convolution , get the key K;
[0102] Step c1.5: feature map Apply a 1×1 convolution , and get the intermediate result Y ;
[0103] Step c1.6: Intermediate results Y Apply 3×3 depthwise separable convolution , get the value .
[0104] Step c2: Perform dot product interaction on query Q and key K to generate transposed attention graph A;
[0105] Step c3: Apply the Softmax function to the transposed attention map A and multiply it with V to obtain the attention weighted value;
[0106] Step c4: Add the attention weighted value to the input feature map X and pass it through a 1×1 convolution , get the intermediate feature map ;
[0107] Step c5: Intermediate feature map Apply a feedforward neural network (FFN) to encode local image features through a gating mechanism and depthwise separable convolution to obtain an output feature map .
[0108] Step c5.1: Intermediate feature map Apply a 1×1 convolution , and get the intermediate result ;
[0109] Step c5.2: Intermediate results Apply 3×3 depthwise separable convolution , and get the intermediate result ;
[0110] Step c5.3: Intermediate feature map Apply a 1×1 convolution , and get the intermediate result ;
[0111] Step c5.4: Intermediate results Apply 3×3 depthwise separable convolution , and get the intermediate result ;
[0112] Step c5.5: Intermediate results Apply the gating mechanism, then perform element-wise multiplication with to get the gated output , where ⊙ represents element-wise multiplication and represents the GELU nonlinear function;
[0113] Step c5.6: Combine the gated output Gating(X) with the intermediate feature map Add and pass 1×1 convolution , and get the output feature map ,like Figure 7 shown.
[0114] The diabetic retinopathy multi-lesion segmentation method introduced in the present invention effectively solves the challenges faced by the prior art in processing diabetic retinopathy images through a series of technical means, and achieves the following technical effects:
[0115] 1. Data preprocessing and image enhancement: Contrast-limited adaptive histogram equalization (CLAHE) and color and contrast enhancement algorithm (CCEA) are used to effectively improve the contrast and feature richness of the image. This method can adapt to images of different brightness and contrast, making the subsequent segmentation processing more accurate.
[0116] 2. Feature extraction network pre-training: The U-Net network extended with the residual separable convolution module (RDWC) is used for feature extraction. This network structure shows better feature extraction capabilities when processing complex images. The encoder-decoder structure of the U-Net network helps to retain the contextual information of the image, while the RDWC module improves processing speed and efficiency by reducing the number of parameters and calculations.
[0117] 3. Multi-lesion segmentation: By processing different image enhancement data with a dual-branch structure and combining it with a feature interaction module, we can achieve simultaneous and efficient segmentation of four major lesion types. This method makes full use of the characteristics of different image data and improves the accuracy and robustness of segmentation.
[0118] 4. Feature interaction module: It adopts a structure similar to Transformer, which can realize the effective interaction of intra-domain and inter-domain features, further refine features and improve feature utilization efficiency. The design of this module takes into account the complementarity between features of different branches, which helps to improve the accuracy of segmentation.
[0119] 5. Overall performance improvement: When processing diabetic retinopathy images, the method of the present invention can significantly improve the accuracy and efficiency of segmentation and reduce the workload of medical personnel. This not only improves the quality of medical services, but also helps to achieve early screening and treatment of diabetic retinopathy, thus having important clinical application value.
[0120] In general, the method of the present invention is technically innovative, effectively solves the key problems in diabetic retinopathy image segmentation, and has obvious advantages over the existing technology.
[0121] The above is only a preferred embodiment of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and modifications without departing from the concept of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A multi-lesion segmentation method for diabetic retinopathy, characterized in that: The following steps are involved: Step 1, data preprocessing: resize the image to a uniform size of 640×640 pixels; Step 2, image enhancement: for the image processed in step 1, contrast-limited adaptive histogram equalization and color and contrast enhancement algorithm are used to perform image enhancement processing, and two types of enhanced images are obtained; Step 3: Data enhancement: For the two types of enhanced images processed in step 2, affine transformation is performed to expand the data set, including data enhancement methods such as random horizontal / vertical flipping and random rotation; Step 4: Feature extraction network pre-training: After block sampling of the two types of enhanced data sets obtained in step 3, they are sent to the U-Net network extended by the residual separable convolution module for pre-training; Step 5: Multi-lesion segmentation: A dual-branch structure is used to input the two types of enhanced data sets obtained in step 3 as input into the constructed network model. The network model includes a pre-trained extended U-Net network, a feature interaction module, and a segmentation head. The extended U-Net network performs feature extraction, and the feature interaction module performs feature interaction. On this basis, the features of the two branches are connected and sent to the segmentation head to obtain the result of multi-lesion segmentation. In step 5, the feature interaction module is used, and the specific implementation algorithm is as follows: The feature interaction module includes an image attention module, a feedforward neural network, and a residual connection part; For the image attention module, intra-domain feature interaction and inter-domain feature interaction are implemented according to different inputs. When the feature maps X and Y extracted by the input extended U-Net network are consistent, that is, they come from the same branch, self-attention calculation is performed to achieve intra-domain feature interaction; when the input X and Y are different, that is, they come from different branches, cross-attention calculation is performed to complete inter-domain feature interaction; The specific implementation process of the feature interaction module is as follows: Step c1: feature map Generate query (Q), key (K), and value (V) projections by applying 1×1 convolution and 3×3 depthwise convolution to enrich the global context to obtain Q, K, and V; Step c1.1: feature map Apply a 1×1 convolution , and get the intermediate result ; Step c1.2: Intermediate results Apply 3×3 depthwise separable convolution , get the query Q; Step c1.3: feature map Apply a 1×1 convolution , and get the intermediate result Y ; Step c1.4: Intermediate results Apply 3×3 depthwise separable convolution , get the key K; Step c1.5: feature map Apply a 1×1 convolution , and get the intermediate result Y ; Step c1.6: Intermediate results Apply 3×3 depthwise separable convolution , get the value ; Step c2: Perform dot product interaction on query Q and key K to generate transposed attention graph A; Step c3: Apply the Softmax function to the transposed attention map A and multiply it with V to obtain the attention weighted value; Step c4: Add the attention weighted value to the input feature map X and pass it through a 1×1 convolution , get the intermediate feature map ; Step c5: Intermediate feature map Apply a feedforward neural network to encode local image features through a gating mechanism and depthwise separable convolution to obtain an output feature map ; Step c5 includes the following steps: Step c5.1: Intermediate feature map Apply a 1×1 convolution , and get the intermediate result ; Step c5.2: Intermediate results Apply 3×3 depthwise separable convolution , and get the intermediate result ; Step c5.3: Intermediate feature map Apply a 1×1 convolution , and get the intermediate result ; Step c5.4: Intermediate results Apply 3×3 depthwise separable convolution , and get the intermediate result ; Step c5.5: Intermediate results Apply the gating mechanism and then Perform element-wise multiplication to obtain gated output , where ⊙ represents element-wise multiplication and represents the GELU nonlinear function; Step c5.6: Combine the gated output Gating(X) with the intermediate feature map Add and pass 1×1 convolution , and get the output feature map .
2. A multi-lesion segmentation method for diabetic retinopathy according to claim 1, characterized in that: Step 1 includes the following steps: Step a1. Using the field of view image, the original image is processed to eliminate the black edges thereof; Step a2. Fill the result of step a1 up and down to ensure that the aspect ratio of the image is 1:1; Step a3: resize the results of step a2 to a uniform size of 640×640 pixels.
3. A multi-lesion segmentation method for diabetic retinopathy according to claim 1, characterized in that: In step 2, the color and contrast enhancement algorithm is performed on the image. The specific implementation algorithm is: In the formula, and Respectively represent the image to be enhanced and the image processed by the color and contrast enhancement algorithm, * represents the convolution operation, α, τ, γ are three constants, σ is the variance of the Gaussian filter, and the parameters are set as follows: α=4, τ=-4, γ=128, σ=χ / 30, χ is the width of the input image, is a Gaussian function.
4. A multi-lesion segmentation method for diabetic retinopathy according to claim 1, characterized in that: In step 4, block sampling is performed on the enhanced dataset, including the following steps: Step b1: randomly select an enhanced image image; Step b2: randomly select a center point (x, y) and extract a 64*64 pixel image patch from the image; Step b3: According to the label label(x,y) at the center point, determine the category to which the image patch belongs: label=0 indicates no lesion, label=1 indicates microvascular tumor, label=2 indicates bleeding, label=3 indicates hard exudation, and label=4 indicates soft exudation; Step b4: Determine whether the number of samples in each category meets the requirement, and ensure that the samples in each category meet the ratio of 1:1:1:1:
4. If the requirement is met, stop block sampling.
5. A multi-lesion segmentation method for diabetic retinopathy according to claim 1, characterized in that: In step 4, the U-Net network extended by the residual separable convolution module is used for feature extraction. The specific implementation algorithm is: The U-Net network is extended by the built-in residual separable convolution module. The structure of the U-Net model consists of an encoder and a decoder. The encoder uses the RDWC module for feature extraction, which is used to generate high-level features of the image step by step. The RDWC module structure includes: two serially connected repeated units, each unit contains a separable convolution layer, a batch normalization layer and a Relu activation function layer for feature extraction, and then the extracted features are added to the input to obtain the output; The decoder uses an interpolation algorithm to gradually fuse the generated high-level features with the features of the previous layer to reconstruct the segmentation result; The identity mapping is used between the encoder and the decoder to connect features of the same dimension.
