A method, system and storage medium for segmenting medical images of eyes
By adopting a U-shaped codec structure convolutional neural network model based on attention mechanism and weighted loss function in ophthalmic medical image segmentation, the problem of low segmentation efficiency and accuracy in the prior art is solved, and efficient and accurate eyes are achieved medical image segmentation.
Patent Information
- Application Number
- CN202411254318.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-09
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-09-09
AI Technical Summary
The existing ophthalmic medical image segmentation method has low segmentation efficiency and accuracy, and is not comprehensive, making it difficult to deal with the diversity of morphological characteristics and complications in the lesion area, resulting in the results containing a large amount of redundant information and low segmentation accuracy.
The U-shaped codec structure convolutional neural network model based on attention mechanism and weighted loss function is adopted to build the model through the fusion of attention mechanism and multiple loss function to improve the segmentation performance and robustness of the model.
It realizes fast progress and high efficiency in ophthalmic medical image segmentation, high precision and comprehensive segmentation results, effectively process special samples, and significantly improves segmentation accuracy.
Smart Images

Figure CN118762049B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of medical image segmentation, and in particular to an eye medical image segmentation method, system and storage medium. Background Art
[0002] Medical image segmentation can make images of pathological structures clearer and plays an important role in computer-aided diagnosis and intelligent medicine.
[0003] The main difficulties in medical image segmentation for eye diseases are: the morphological features of the lesion area are diverse, and the size, shape, and intensity distribution are uneven; the boundary between the lesion area and the surrounding tissue is unclear, and there may be complications, such as fluid accumulation in the patient. These difficulties increase the complexity of medical image segmentation. The results obtained by existing eye medical image segmentation methods often contain a large amount of relevant redundant information and irrelevant feature information, resulting in slow segmentation progress and low efficiency.
[0004] In addition, the existing eye medical image segmentation method uses a single loss function to construct a convolutional neural network, performs poorly when processing special samples, is not comprehensive, and has low segmentation accuracy. Summary of the invention
[0005] To this end, the technical problem to be solved by the present invention is to overcome the problems of low segmentation efficiency and accuracy and lack of comprehensiveness of the eye medical image segmentation methods in the prior art, and to provide an eye medical image segmentation method, system and storage medium, which have fast segmentation progress, high efficiency, comprehensiveness and can obtain high-precision segmentation results.
[0006] In a first aspect, in order to solve the above technical problems, the present invention provides an eye medical image segmentation method, comprising the following steps:
[0007] Collecting medical image data of eye lesion areas, and dividing the medical image data into a training set and a test set according to a self-set ratio;
[0008] A convolutional neural network model with a U-type encoding and decoding structure is constructed based on the attention mechanism and weighted loss function;
[0009] Training the convolutional neural network model based on the training set and the test set;
[0010] Passing the medical image to be segmented into the trained convolutional neural network model to obtain a segmentation result;
[0011] The U-type codec structure includes an encoder, a skip connection part, a bottleneck layer and a decoder; the bottleneck layer is located between the encoder and the decoder; the encoder is connected to the decoder through the skip connection part; the attention mechanism is introduced into the U-type codec structure:
[0012] The shallow feature map I of the encoder LE After the convolution operation, I LE-1 , the deep feature map I of the decoder HD After upsampling and convolution operations, we get I HD-1 ; The I LE-1 and the I HD-1 Multiply them and get I Mul ; The I Mul With the I HD-1 After addition, the output is I through the activation function Sum ; The I Mul With the I Sum After splicing, output to the target layer.
[0013] In one embodiment of the present invention, the I Mul With the I Sum The method of splicing is:
[0014] ;
[0015] ;
[0016] ;
[0017] in, Indicates that the feature map is multiplied pixel by pixel, It means that the feature map is added pixel by pixel. is the activation function, is the concatenation function, The output after splicing.
[0018] In one embodiment of the present invention, the weighted loss function is constructed by adopting a multi-loss fusion method, and the method is:
[0019] The multi-classification logistic loss function, Dice loss function and binary cross entropy loss function are combined to obtain the weighted loss function. :
[0020] ;
[0021] in, is the weight of the multi-classification logistic loss function, Represents the multi-classification logistic loss function; is the weight of the Dice loss function, represents the Dice loss function; is the weight of the binary cross entropy loss function, represents the binary cross entropy loss function; are real numbers, and , The initial values are set to 0.4, 0.4, and 0.2 respectively.
[0022] In one embodiment of the present invention, the multi-classification logistic loss function for:
[0023] ;
[0024] ;
[0025] Where N is the number of pixels, x i represents the i-th pixel, Indicates the category of classification, For the summation symbol, Represents the i-th pixel x i The network segmentation result, log means taking the logarithm, Represents the i-th pixel x i The expected segmentation result, ROI represents the target lesion area, BACKGROUND represents the background area;
[0026] The Dice loss function for:
[0027] ;
[0028] in, Indicates the corresponding pixel multiplication, Indicates taking the absolute value;
[0029] The binary cross entropy loss function for:
[0030] .
[0031] In one embodiment of the present invention, the encoder is configured with multiple layers, each layer performs convolution operations, batch normalization operations and maximum pooling operations; the convolution kernel size and the number of operations selected for the convolution operation in each layer can be set independently.
[0032] In one embodiment of the present invention, the encoder is configured with 4 layers, each layer performs the convolution operation twice based on a convolution layer with a convolution kernel size of 3*3 and a step size of 1, and each layer performs the maximum pooling operation based on a pooling layer with a pooling kernel size of 2*2.
[0033] In one embodiment of the present invention, the medical image data includes OCT image data of choroidal neovascularization of the eye and fundus color image data of glaucoma, and both the OCT image data and the fundus color image data contain original image data and corresponding gold standard image data.
[0034] In one embodiment of the present invention, the background pixel values in the OCT image data and the fundus color image data are assigned to be 0, and each category of lesion area in the corresponding gold standard image data is assigned the same pixel value and is incremented in sequence according to its category.
[0035] In a second aspect, in order to solve the above technical problems, the present invention further provides an eye medical image segmentation system, comprising:
[0036] A data acquisition module, which collects medical image data of the eye lesion area and divides the medical image data into a training set and a test set according to a self-set ratio;
[0037] A model construction module, which constructs a weighted loss function by adopting a multi-loss fusion method, and constructs a convolutional neural network model with a U-type encoding and decoding structure based on the attention mechanism and the weighted loss function;
[0038] A model training module, which trains the convolutional neural network model based on the training set and the test set;
[0039] An image segmentation module, which passes the medical image to be segmented into the trained convolutional neural network model to obtain a segmentation result;
[0040] The U-shaped encoding and decoding structure includes an encoder, a bottleneck layer, a decoder and a jump connection part; the bottleneck layer is located between the encoder and the decoder; the attention mechanism is introduced in the decoder and the jump connection part:
[0041] The shallow feature map I of the encoder LE After the convolution operation, I LE-1 , the deep feature map I of the decoder HD After upsampling and convolution operations, we get I HD-1 ; The I LE-1 and the I HD-1 Multiply them and get I Mul ; The I Mul With the I HD-1After addition, the output is I through the activation function Sum ; The I Mul With the I Sum After splicing, output to the target layer.
[0042] In a third aspect, in order to solve the above-mentioned technical problem, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned method for segmenting an ocular medical image are implemented.
[0043] The above technical solution of the present invention has the following beneficial effects compared with the prior art:
[0044] The present invention provides an eye medical image segmentation method, system and storage medium. A convolutional neural network model with a U-type codec structure is constructed based on an attention mechanism and a weighted loss function. The segmentation progress of medical images is fast and efficient. Special samples can be effectively processed and are comprehensive. The segmentation results are highly accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to make the contents of the present invention more clearly understood, the present invention is further described in detail below based on specific embodiments of the present invention in conjunction with the accompanying drawings.
[0046] Figure 1 A flowchart of a method for segmenting an eye medical image in a preferred embodiment of the present invention;
[0047] Figure 2 is a schematic diagram of an attention module in a preferred embodiment of the present invention;
[0048] Figure 3 Schematic diagram of a U-type codec structure taking a 512×512CNV OCT image as an example in a preferred embodiment of the present invention;
[0049] Figure 4 This is a visualization comparison diagram of the segmentation performance of U-Net and A-UNet on an OCT test image with CNV in a preferred embodiment of the present invention;
[0050] Figure 5 This is a visualization comparison diagram of the optic cup segmentation performance of U-Net and A-UNet on a glaucoma fundus color test image in a preferred embodiment of the present invention;
[0051] Figure 6 This is a visualization comparison diagram of the optic disc segmentation performance of U-Net and A-UNet on a glaucoma fundus color test image in a preferred embodiment of the present invention;
[0052] Figure 7 4 is a module diagram of an eye medical image segmentation system in an embodiment of the present invention. DETAILED DESCRIPTION
[0053] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0054] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments.
[0055] Medical image segmentation for eye diseases needs to be combined with disease features. For example, choroidal neovascularization (CNV) is a typical symptom of age-related macular degeneration. The rupture of new blood vessels in the choroidal layer in the retinal layer will cause patients to have decreased vision or blindness. Glaucoma is manifested by an increase in the area of the optic cup and optic disc. In addition, optical coherence tomography (OCT) is a high-resolution non-invasive imaging technology that can record and display various structures of the fundus.
[0056] The inventors of the present invention want to achieve the goal of efficiently and accurately segmenting OCT images with CNV and glaucoma fundus color images. To this end, the present invention provides an eye medical image segmentation method, system and storage medium. Embodiment 1
[0057] This embodiment provides a method for segmenting an eye medical image. Figure 1 As shown, the following steps are included:
[0058] Collecting medical image data of eye lesion areas, and dividing the medical image data into a training set and a test set according to a self-set ratio;
[0059] A convolutional neural network model with a U-type encoding and decoding structure is constructed based on the attention mechanism and weighted loss function;
[0060] Training the convolutional neural network model based on the training set and the test set;
[0061] Passing the medical image to be segmented into the trained convolutional neural network model to obtain a segmentation result;
[0062] The U-type codec structure includes an encoder, a skip connection part, a bottleneck layer and a decoder; the bottleneck layer is located between the encoder and the decoder; the encoder is connected to the decoder through the skip connection part; the attention mechanism is introduced into the U-type codec structure:
[0063] The shallow feature map I of the encoder LE After the convolution operation, I LE-1 , the deep feature map I of the decoder HD After upsampling and convolution operations, we get I HD-1 ; The I LE-1 and the I HD-1 Multiply them and get I Mul ; The I Mul With the I HD-1 After addition, the output is I through the activation function Sum ; The I Mul With the I Sum After splicing, output to the target layer.
[0064] The present embodiment provides a method for segmenting an ocular medical image, which constructs a convolutional neural network model using a U-type codec structure. An attention mechanism is introduced into the U-type codec structure, and the convolutional neural network model uses a weighted loss function. (1) The progress of medical image segmentation is fast and efficient; (2) Special samples can be effectively processed and comprehensive; (3) The accuracy of the medical image segmentation result is high.
[0065] Next, a method for segmenting an eye medical image provided by this embodiment is described in detail:
[0066] 1. Principle of the method
[0067] Step 1
[0068] Specifically, medical image data of eye lesion areas are collected, and the medical image data are divided into a training set and a test set according to a self-set ratio.
[0069] Optionally, the medical image of the eye lesion area is annotated, the medical image data is collected, and then the medical image data is divided into a training set and a test set in a ratio of 8:2.
[0070] Optionally, the medical image data include OCT image data of choroidal neovascularization of the eye and fundus color image data of glaucoma, and both the OCT image data and the fundus color image data contain original image data and corresponding gold standard image data; wherein the gold standard image represents the segmented area manually marked by a professional doctor or under the guidance of a professional doctor.
[0071] Optionally, the background pixel values in the OCT image data and the fundus color image data are assigned a value of 0, and each category of lesion area in the corresponding gold standard image data is assigned the same pixel value and is incremented in sequence according to its category.
[0072] Step 2
[0073] Specifically, a convolutional neural network model with a U-type encoding and decoding structure is constructed based on the attention mechanism and weighted loss function.
[0074] Specifically, the U-type codec structure includes an encoder, a jump connection part, a bottleneck layer and a decoder; the bottleneck layer is located between the encoder and the decoder; the encoder is connected to the decoder through the jump connection part; please refer to Figure 2 As shown, the attention mechanism is introduced into the U-type codec structure to obtain the attention module:
[0075] The shallow feature map I of the encoder LE After the convolution operation Conv, I LE-1 , the deep feature map I of the decoder HD After up-sampling operation Up-conv and convolution operation Conv, I is obtained HD-1 ; The I LE-1 and the I HD-1 Multiply them and get I Mul ; The I Mul With the I HD-1 After addition, the output is I through the activation function Sum ; The I Mul With the I Sum After splicing, output to the target layer.
[0076] Optionally, the I Mul With the I Sum The method a for splicing is:
[0077] ;
[0078] ;
[0079] ;
[0080] in, Indicates that the feature map is multiplied pixel by pixel, It means that the feature map is added pixel by pixel. is the activation function, is the concatenation function, The output after splicing.
[0081] Specifically, the encoder is configured with multiple layers, each layer performs convolution operations, batch normalization operations and maximum pooling operations; the convolution kernel size and the number of operations selected for the convolution operation in each layer can be set independently.
[0082] Specifically, increasing the number of layers of the encoder can capture more feature levels, but it will increase the computational cost and memory requirements, and increase the difficulty of training; reducing the number of layers of the encoder will usually make the constructed network model simpler and reduce the amount of computation, but it will also reduce the expressive power of the constructed network model and make it difficult to capture detailed features.
[0083] Preferably, the encoder is configured with 4 layers, each layer performs the convolution operation twice based on a convolution layer with a convolution kernel size of 3*3 and a step size of 1, and each layer performs the maximum pooling operation based on a pooling layer with a pooling kernel size of 2*2.
[0084] For example, please refer to Figure 3 As shown in the figure, taking a 512×512CNV OCT image as an example, the image is input into the left encoder part, each layer of the encoder performs the convolution operation twice, and then performs the maximum pooling operation to reduce the spatial resolution; the number of channels of the convolution feature map is 128, 256, 512, and 1024 after passing through the encoder layer by layer from the initial 64; the right decoder part corresponds to the left encoder part, and the deep features of each layer of the decoder are integrated into the attention module A together with the low-level features of the corresponding encoder part after upsampling operation, and the number of channels of the convolution feature map is adjusted to 512, 256, 128, and 2 respectively;
[0085] in, Figure 3 The "Convolution 3×3" in it means that the convolution operation is performed based on the convolution layer with a convolution kernel size of 3*3, "ReLU" means the activation function, "Splicing" means performing a splicing operation, "Maximum Pooling 2×2" means performing the maximum pooling operation based on the pooling layer with a pooling kernel size of 2*2, and "Upsampling 2×2" means performing a 2*2 upsampling operation, and A is the attention module.
[0086] Specifically, in the above example, the rich information of some shallow features of the encoder is passed into the deep network, which improves the overall performance of the convolutional neural network model.
[0087] Specifically, the U-shaped encoding and decoding structure can effectively focus on the lesion area, suppress the interference caused by other irrelevant areas, and improve the segmentation accuracy of the lesion area.
[0088] Specifically, the weighted loss function is constructed by adopting a multi-loss fusion method, and the method is as follows:
[0089] The multi-classification logistic loss function, Dice loss function and binary cross entropy loss function are combined to obtain the weighted loss function. :
[0090] ;
[0091] in, is the weight of the multi-classification logistic loss function, Represents the multi-classification logistic loss function; is the weight of the Dice loss function, represents the Dice loss function; is the weight of the binary cross entropy loss function, represents the binary cross entropy loss function; are real numbers, and , The initial values are set to 0.4, 0.4, and 0.2 respectively.
[0092] Specifically, the multi-classification logistic loss function for:
[0093] ;
[0094] ;
[0095] Where N is the number of pixels, x i represents the i-th pixel, Indicates the category of classification, For the summation symbol, Represents the i-th pixel x i The network segmentation result, log means taking the logarithm, Represents the i-th pixel x i The expected segmentation result, ROI represents the target lesion area, and BACKGROUND represents the background area.
[0096] Specifically, in the multi-classification logistic loss function In the example, by setting the weight of the target lesion region ROI to 10 and the weight of the background region BACKGROUND to 1, the segmentation accuracy is enhanced by giving the target lesion region ROI a high weight.
[0097] Specifically, the Dice loss function for:
[0098] ;
[0099] in, Indicates the corresponding pixel multiplication, Indicates taking the absolute value.
[0100] Specifically, the binary cross entropy loss function for:
[0101] .
[0102] Specifically, the parameters in the convolutional neural network model are learned and updated based on the weighted loss function to balance the effectiveness of various indicators and improve the generalization ability of the convolutional neural network model; reduce missed segmentation and over-segmentation phenomena and ensure the accuracy and consistency of the segmentation results.
[0103] Step 3
[0104] Specifically, the convolutional neural network model is trained based on the training set and the test set.
[0105] Step 4
[0106] Specifically, the medical image to be segmented is passed into the trained convolutional neural network model to obtain a segmentation result.
[0107] 2. Data Verification
[0108] For example, OCT image data with CNV from a hospital is collected, the size of the original image is 1300×800, the training set is 1200, and the test set is 300; in order to reduce training time and memory usage, a downsampling operation is performed to compress the size of the original image to 512×512.
[0109] For example, glaucoma fundus color image data from the public dataset Drishti-GS is collected, the original image size is 512×512, the training set is 80, and the test set is 20.
[0110] Specifically, in order to quantitatively evaluate the segmentation performance of an eye medical image segmentation method provided in this embodiment, the evaluation indicators shown in Table 1 are used.
[0111] Table 1
[0112]
[0113] Specifically, the convolutional neural network model described in this embodiment is trained and tested based on the public platform PyTorch, and the stochastic gradient descent algorithm is used to optimize the parameters; the input image batch size is set to 8, and the learning rate is set to 8*10 -4 , the number of training rounds is set to 200, and the validation image batch size is set to 2.
[0114] Specifically, Table 2 shows the segmentation performance comparison between U-Net and A-UNet on OCT test images with CNV; Figure 4The figure shows a visual comparison of the segmentation performance of U-Net and A-UNet on OCT test images with CNV, where green represents the segmentation results, white represents missed segmentation, and blue represents over-segmentation.
[0115] Table 2
[0116]
[0117] Among them, U-Net represents the existing convolutional neural network model, and A-UNet represents the convolutional neural network model described in this embodiment.
[0118] Specifically, Table 3 compares the segmentation performance of U-Net and A-UNet at different learning rates.
[0119] Table 3
[0120]
[0121] Specifically, Table 4 shows the performance comparison of U-Net and A-UNet in optic cup segmentation on glaucoma fundus color test images; Figure 5 Visual comparison of the optic cup segmentation performance of U-Net and A-UNet on the glaucoma fundus color test image.
[0122] Table 4
[0123]
[0124] Specifically, Table 5 shows the performance comparison of optic disc segmentation between U-Net and A-UNet on glaucoma fundus color test images; Figure 6 Visual comparison of the optic disc segmentation performance of U-Net and A-UNet on the glaucoma fundus color test image.
[0125] Table 5
[0126]
[0127] Specifically, Table 6 shows the segmentation performance comparison between U-Net and A-UNet on the glaucoma fundus color image data test set.
[0128] Table 6
[0129]
[0130] Specifically, combined with the data comparison in Table 2, Table 3, Table 4, Table 5, and Table 6, the segmentation performance of A-UNet significantly exceeds the segmentation performance of U-Net, indicating that the eye medical image segmentation method provided in the embodiment of the present application is superior to the existing eye medical image segmentation method, and exhibits good segmentation performance in different modality images and different lesion areas, and has strong robustness. Embodiment 2
[0131] This embodiment provides an eye medical image segmentation system. Figure 7 As shown, including:
[0132] A data acquisition module, which collects medical image data of the eye lesion area and divides the medical image data into a training set and a test set according to a self-set ratio;
[0133] A model construction module, which constructs a weighted loss function by adopting a multi-loss fusion method, and constructs a convolutional neural network model with a U-type encoding and decoding structure based on the attention mechanism and the weighted loss function;
[0134] A model training module, which trains the convolutional neural network model based on the training set and the test set;
[0135] An image segmentation module, which passes the medical image to be segmented into the trained convolutional neural network model to obtain a segmentation result;
[0136] The U-shaped encoding and decoding structure includes an encoder, a bottleneck layer, a decoder and a jump connection part; the bottleneck layer is located between the encoder and the decoder; the attention mechanism is introduced in the decoder and the jump connection part:
[0137] The shallow feature map I of the encoder LE After the convolution operation, I LE-1 , the deep feature map I of the decoder HD After upsampling and convolution operations, we get I HD-1 ; The I LE-1 and the I HD-1 Multiply them and get I Mul ; The I Mul With the I HD-1 After addition, the output is I through the activation function Sum ; The I Mul With the I Sum After splicing, output to the target layer.
[0138] For an introduction to an eye medical image segmentation system provided in this embodiment, please refer to the first embodiment, and this embodiment will not be described in detail here.
[0139] This embodiment provides an eye medical image segmentation system, which has the same beneficial effects as the above-mentioned eye medical image segmentation method. Embodiment 3
[0140] This embodiment provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of an eye medical image segmentation method as described in the first embodiment are implemented.
[0141] For an introduction to a computer-readable storage medium provided in this embodiment, please refer to Embodiment 1, and this embodiment will not be described in detail here.
[0142] The computer-readable storage medium provided in this embodiment has the same beneficial effects as the aforementioned method for segmenting an eye medical image.
[0143] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0144] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0145] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0146] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0147] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.
Claims
1. A method for segmenting an eye medical image, characterized in that: The following steps are involved: Collecting medical image data of eye lesion areas, and dividing the medical image data into a training set and a test set according to a self-set ratio; A convolutional neural network model with a U-type encoding and decoding structure is constructed based on the attention mechanism and weighted loss function; Training the convolutional neural network model based on the training set and the test set; Passing the medical image to be segmented into the trained convolutional neural network model to obtain a segmentation result; The U-type codec structure includes an encoder, a skip connection part, a bottleneck layer and a decoder; the bottleneck layer is located between the encoder and the decoder; the encoder is connected to the decoder through the skip connection part; the attention mechanism is introduced into the U-type codec structure: The shallow feature map I of the encoder LE After the convolution operation, I LE-1 , the deep feature map I of the decoder HD After upsampling and convolution operations, we get I HD-1 ; The I LE-1 and the I HD-1 Multiply them and get I Mul ; The I Mul With the I HD-1 After addition, the output is I through the activation function Sum ; The I Mul With the I Sum After splicing, output to the target layer.
2. The method for segmenting an eye medical image according to claim 1, characterized in that: The weighted loss function is constructed by adopting a multi-loss fusion method, and the method is as follows: The multi-classification logistic loss function, Dice loss function and binary cross entropy loss function are combined to obtain the weighted loss function. : ; in, is the weight of the multi-classification logistic loss function, Represents the multi-classification logistic loss function; is the weight of the Dice loss function, represents the Dice loss function; is the weight of the binary cross entropy loss function, represents the binary cross entropy loss function; are real numbers, and , The initial values are set to 0.4, 0.4, and 0.2 respectively.
3. The method for segmenting an eye medical image according to claim 2, characterized in that: The multi-classification logistic loss function for: ; ; Where N is the number of pixels, x i represents the i-th pixel, Indicates the category of classification, For the summation symbol, Represents the i-th pixel x i The network segmentation result, log means taking the logarithm, Represents the i-th pixel x i The expected segmentation result, ROI represents the target lesion area, BACKGROUND represents the background area; The Dice loss function for: ; in, Indicates the corresponding pixel multiplication, Indicates taking the absolute value; The binary cross entropy loss function for: 。 4. The method for segmenting an eye medical image according to claim 1, characterized in that: The encoder is configured with multiple layers, each of which performs convolution operations, batch normalization operations, and maximum pooling operations; the convolution kernel size and the number of operations selected for the convolution operation in each layer can be set independently.
5. The method for segmenting an eye medical image according to claim 4, characterized in that: The encoder is configured with 4 layers, each layer performs the convolution operation twice based on a convolution layer with a convolution kernel size of 3*3 and a step size of 1, and each layer performs the maximum pooling operation based on a pooling layer with a pooling kernel size of 2*2.
6. The method for segmenting an eye medical image according to claim 1, characterized in that: The medical image data include OCT image data of choroidal neovascularization and fundus color image data of glaucoma, and both the OCT image data and the fundus color image data include original image data and corresponding gold standard image data.
7. The method for segmenting an eye medical image according to claim 6, characterized in that: The background pixel values in the OCT image data and the fundus color image data are assigned a value of 0, and each category of lesion area in the corresponding gold standard image data is assigned the same pixel value and is increased in sequence according to its category.
8. An eye medical image segmentation system, characterized in that: include: A data acquisition module, which collects medical image data of the eye lesion area and divides the medical image data into a training set and a test set according to a self-set ratio; A model construction module, which constructs a weighted loss function by adopting a multi-loss fusion method, and constructs a convolutional neural network model with a U-type encoding and decoding structure based on the attention mechanism and the weighted loss function; A model training module, which trains the convolutional neural network model based on the training set and the test set; An image segmentation module, which passes the medical image to be segmented into the trained convolutional neural network model to obtain a segmentation result; The U-shaped encoding and decoding structure includes an encoder, a bottleneck layer, a decoder and a jump connection part; the bottleneck layer is located between the encoder and the decoder; the attention mechanism is introduced in the decoder and the jump connection part: The shallow feature map I of the encoder LE After the convolution operation, I LE-1 , the deep feature map I of the decoder HD After upsampling and convolution operations, we get I HD-1 ; The I LE-1 and the I HD-1 Multiply them and get I Mul ; The I Mul With the I HD-1 After addition, the output is I through the activation function Sum ; The I Mul With the I Sum After splicing, output to the target layer.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the eye medical image segmentation method according to any one of claims 1 to 7 are implemented.
