Retinal artery and vein classification method and device, calculation program product and storage medium

Through the spatial multi-scale attention mechanism network model, combined with multi-scale feature extraction and feature enhancement technology, it solves the problems of inaccurate feature extraction and high computational complexity in arteriovenous classification in the existing technology, and achieves more accurate and efficient blood vessel classification. , suitable for diagnostic aids in retinal arteries and veins.

CN118570546APending Publication Date: 2024-08-30HARBIN ENG UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410728403.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing arteriovenous classification technology has problems such as inaccurate feature extraction, difficulty in feature selection, high computational complexity, weak generalization ability, and easy overfitting, which limits its wider application.

Method used

Adopting a network model based on a spatial multi-scale attention mechanism, through the encoding and decoding structure, multi-scale feature extraction, feature enhancement aggregation module and joint loss module, combined with sliding window sampling and random extraction patch strategies, end-to-end learning is achieved and the risk of over-fitting is reduced. and improve model robustness.

Benefits of technology

It improves the accuracy and precision of arteriovenous vessel classification, suppresses the influence of noise, reduces the risk of training overfitting, improves the training efficiency and classification performance of the model, and is suitable for the classification of retinal arteries and veins.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570546A
    Figure CN118570546A
Patent Text Reader

Abstract

The invention discloses a retinal artery and vein classification method and device, a calculation program product and a storage medium, belongs to the technical field of image processing and image segmentation, and particularly relates to retinal artery and vein classification. The problems that feature extraction is inaccurate, feature selection is difficult, calculation complexity is high, generalization ability is weak and overfitting is prone to occurring in an existing arteriovenous classification technology are solved. The method comprises the following steps: a model training step: training a spatial multi-scale attention mechanism network model by adopting a training set to obtain a trained spatial multi-scale attention mechanism network model; and a parameter adjustment step: verifying a classification result output by the trained spatial multi-scale attention mechanism network model by using a verification set, and screening out an optimal model by adjusting parameters. The retinal artery and vein classification method and device, the calculation program product and the storage medium are suitable for retinal artery and vein classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing and image segmentation, and in particular to the classification of retinal arteries and veins. Background Art

[0002] The fundus retinal artery and vein images contain important information about the patient's eye health. Abnormal morphology and changes in the fundus retinal artery and vein can indicate a variety of eye and systemic diseases, such as diabetic retinopathy, hypertensive retinopathy, glaucoma, etc.

[0003] By classifying the arteries and veins, doctors can detect and diagnose these diseases earlier, thereby improving the effectiveness of treatment and prognosis. Classifying the retinal arteries and veins can help doctors monitor the progression of the disease and the effectiveness of treatment. By regularly checking the morphology and changes of the arteries and veins, doctors can adjust the treatment plan in time to prevent further development of the disease and reduce the occurrence of complications.

[0004] The clinical importance of fundus retinal artery and vein classification lies in that it provides a non-invasive and reproducible method that can help doctors detect and diagnose eye and systemic diseases at an early stage, guide treatment and prevention, and thus improve patients' quality of life and health level.

[0005] However, due to the complexity of the retinal arteriovenous structure and the influence of noise such as medical image artifacts, automatic classification remains a challenging task.

[0006] Existing arteriovenous classification technologies are generally divided into two types: graph-based methods and feature-based methods.

[0007] Existing graph-based classification methods generally represent data as a graph structure and then use the graph's topological structure or node attributes for classification. Such methods are usually used to process data with complex relationships, such as social networks, biological networks, and semantic relationships in text data. Graph-based classification methods have the following two disadvantages:

[0008] First, such methods are overly dependent on the quality of image data. If the input image quality is poor, such as noisy, blurred, or distorted, it may lead to inaccurate feature extraction, thus affecting the performance of the classifier.

[0009] Secondly, this type of method has difficulty in feature selection, high computational complexity, high parameter requirements and limited generalization ability.

[0010] Existing feature-based classification methods are divided into logistic regression, support vector machine, decision tree, K nearest neighbor algorithm, naive Bayes classifier and other methods. Among them, logistic regression is suitable for linearly separable situations and can output probabilistic results; K nearest neighbor algorithm is suitable for various types of data, especially for complex or irregular data distribution; naive Bayes classifier is suitable for large-scale data sets, high-dimensional feature space and situations with high requirements for missing data and noise robustness. The main disadvantages of feature-based classification methods include: difficulty in feature selection, easy overfitting, dimensionality disaster phenomenon and unsuitability for unstructured data.

[0011] In summary, the existing arteriovenous classification technology has problems such as inaccurate feature extraction, difficult feature selection, high computational complexity, weak generalization ability, and easy overfitting, which limit its wider application. Summary of the invention

[0012] The present invention proposes a retinal artery and vein classification method, device, computer program product and storage medium, which solves the problems of inaccurate feature extraction, difficult feature selection, high computational complexity, weak generalization ability and easy overfitting in the existing artery and vein classification technology.

[0013] The retinal artery and vein classification method of the present invention has the following technical solutions:

[0014] The method is implemented based on a spatial multi-scale attention mechanism network model; the method comprises the following steps:

[0015] Data acquisition steps: acquiring fundus retinal arteriovenous image data as a data set;

[0016] Data preprocessing step: preprocess the images in the data set and divide each image into n×n local image blocks;

[0017] Dataset division step: divide the preprocessed dataset into training set, validation set and test set;

[0018] Model training steps: Use the training set to train the spatial multi-scale attention mechanism network model to obtain the trained spatial multi-scale attention mechanism network model;

[0019] Parameter adjustment step: Use the validation set to verify the classification results output by the trained spatial multi-scale attention mechanism network model, and select the best model by adjusting the parameters;

[0020] Classification verification step: Use the test set to test the best model to verify the classification effect of the best model.

[0021] Furthermore, a preferred implementation is provided, wherein the spatial multi-scale attention mechanism network model is based on U-Net; the spatial multi-scale attention mechanism network model is a five-layer encoding and decoding structure;

[0022] The spatial multi-scale attention mechanism network model includes a local image module, an encoding module, a feature enhancement aggregation module, a decoding module, a multi-scale spatial attention module, a detail supervision module, a joint loss module and a Softmax classifier;

[0023] The encoding module and the decoding module both use bottleneck blocks and residual connection convolution blocks;

[0024] The local image module is used to receive an input local image block; the output interface of the local image module is connected to the input interface of the encoding module; the output interface of the encoding module is respectively connected to the feature enhancement aggregation module and the multi-scale spatial attention module;

[0025] The output interface of the feature enhancement aggregation module is connected to the input interface of the decoding module; the output interface of the decoding module is connected to the first input interface of the joint loss module;

[0026] The output interface of the multi-scale spatial attention module is connected to the input interface of the detail supervision module; the output interface of the detail supervision module is connected to the second input interface of the joint loss module;

[0027] The output interface of the joint loss module is connected to the input interface of the Softmax classifier; the Softmax classifier is used to output the classification result.

[0028] Furthermore, a preferred embodiment is provided, wherein the multi-scale spatial attention module is used to extract multi-scale features using depthwise separable convolutions with different dilation rates.

[0029] Furthermore, a preferred embodiment is provided, wherein the feature enhancement aggregation module is used to obtain global information of the channel by using average pooling and maximum pooling, and to enhance the original features of the local image block by adjusting the input feature weights.

[0030] Furthermore, a preferred embodiment is provided, in the data preprocessing step, the method adopts a sliding window sampling method to divide each image into n×n local image blocks.

[0031] Furthermore, a preferred embodiment is provided, in the model training step, the training parameters are set as follows:

[0032] The batch size is 32; 100 epochs are trained each time; the corresponding early stopping strategy is adopted; the learning rate is 0.0005, and the cosine annealing method is used to dynamically reduce the learning rate during the training process.

[0033] Furthermore, a preferred embodiment is provided, in which, in the classification verification step, F1 score, accuracy and AUC value are used as evaluation indicators for verifying the classification effect of the best model.

[0034] The present invention also proposes a retinal artery and vein classification device, and its technical solution is as follows:

[0035] The device is implemented based on a spatial multi-scale attention mechanism network model; the device includes the following modules:

[0036] A data acquisition module, used for acquiring fundus retinal arteriovenous image data as a data set;

[0037] The data preprocessing module is used to preprocess the images in the data set and divide each image into n×n local image blocks;

[0038] The data set partitioning module is used to partition the preprocessed data set into a training set, a validation set, and a test set;

[0039] A model training module is used to train the spatial multi-scale attention mechanism network model using a training set to obtain a trained spatial multi-scale attention mechanism network model;

[0040] The parameter adjustment module is used to verify the classification results output by the trained spatial multi-scale attention mechanism network model using the verification set, and select the best model by adjusting the parameters;

[0041] The classification verification module is used to test the best model using a test set to verify the classification effect of the best model.

[0042] The present invention also proposes a computer program product, and its technical solution is as follows:

[0043] A computer program product comprises: a processor and a memory, wherein the memory is used to store executable instructions of the processor, and the processor is configured to perform the above-mentioned retinal artery and vein classification method by executing the executable instructions.

[0044] The present invention also proposes a computer storage medium, and its technical solution is as follows:

[0045] A computer storage medium stores a computer program, and when the computer program is run, the above-mentioned retinal artery and vein classification method is executed.

[0046] The present invention has the following beneficial effects:

[0047] 1. The retinal arteriovenous classification method of the present invention adopts a codec structure (i.e., a coding module and a decoding module) and cooperates with a multi-scale feature extraction technology (including a multi-scale spatial attention module, a detail supervision module, and a joint loss module) to aggregate contextual information of different scales, thereby enhancing the multi-scale vascular extraction capability and making the model more robust. It can suppress the influence of noise such as lesion artifacts and scale changes on the retina, improve the accuracy of arteriovenous classification and the accuracy of vascular segmentation, and provide doctors with more accurate diagnostic assistance. Among them, scale changes refer to differences in the diameter of blood vessels.

[0048] 2. The retinal artery and vein classification method described in the present invention, by adopting data enhancement technology (i.e., feature enhancement aggregation module) and random patch extraction strategy (i.e., preprocessing step), expands the small sample data set and greatly reduces the risk of training overfitting.

[0049] 3. The retinal artery and vein classification method described in the present invention introduces a feature enhancement aggregation module to better integrate the features between the encoder (encoding module) and the decoder (decoding module).

[0050] 4. The retinal artery and vein classification method described in the present invention improves the training efficiency of the model by adding lightweight channel attention technology to the (global) feature enhancement aggregation technology, and can stably train an efficient classification model within a reasonable time cost.

[0051] 5. Compared with the existing arteriovenous classification technology, the retinal arteriovenous classification method described in the present invention realizes end-to-end learning and can directly learn feature representation from the original data without manually designing features; this end-to-end learning method can make the model better adapt to the data, and usually can obtain better classification performance, and can effectively capture complex data relationships and patterns; through multi-level feature learning, features can be gradually extracted and combined from simple to complex, so as to better represent the data. At the same time, the pre-trained model can be used to perform fine-tuning on small sample data, thereby speeding up the model training process and improving classification performance.

[0052] The retinal artery and vein classification method, device, computer program product and storage medium of the present invention are suitable for the classification of retinal arteries and veins. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0054] Figure 1 A flowchart of a retinal artery and vein classification method in one embodiment of the present invention;

[0055] Figure 2 This is a schematic diagram of the structure of a spatial multi-scale attention mechanism network model in one embodiment of the present invention. DETAILED DESCRIPTION

[0056] In order to make the technical solutions and advantages of the present invention more clearly described, the specific implementation methods of the present invention will be further described in detail and completely in conjunction with the accompanying drawings. The various implementation methods described below are only part of the preferred solutions of the present invention, rather than all implementation methods; the various implementation methods described below are intended to explain the present invention and cannot be understood as limitations on the present invention; the reasonable combination of technical features defined in the various implementation methods of the present invention, and all other implementation methods obtained by ordinary technicians in the field without creative work based on the implementation methods of the present invention, are within the scope of protection of the present invention.

[0057] Implementation Method 1: Combination Figure 1 and 2 This embodiment describes a method for classifying retinal arteries and veins. The specific implementation contents are as follows:

[0058] The method is implemented based on a spatial multi-scale attention mechanism network model; the method comprises the following steps:

[0059] Data acquisition steps: acquiring fundus retinal arteriovenous image data as a data set;

[0060] Data preprocessing step: preprocess the images in the data set and divide each image into n×n local image blocks;

[0061] Dataset division step: divide the preprocessed dataset into training set, validation set and test set;

[0062] Model training steps: Use the training set to train the spatial multi-scale attention mechanism network model to obtain the trained spatial multi-scale attention mechanism network model;

[0063] Parameter adjustment step: Use the validation set to verify the classification results output by the trained spatial multi-scale attention mechanism network model, and select the best model by adjusting the parameters;

[0064] Classification verification step: Use the test set to test the best model to verify the classification effect of the best model.

[0065] In this embodiment, the AUC value of the output classification result is used as an evaluation standard, and the parameters are adjusted to select the best model.

[0066] In this implementation, the division ratio of the training set and the validation set is 9:1.

[0067] Implementation Method 2: Combination Figure 1 and 2 This embodiment is described as a further limitation of the retinal artery and vein classification method described in Embodiment 1. The specific implementation contents are as follows:

[0068] The spatial multi-scale attention mechanism network model is based on U-Net; the spatial multi-scale attention mechanism network model is a five-layer encoding and decoding structure;

[0069] The spatial multi-scale attention mechanism network model includes a local image module, an encoding module, a feature enhancement aggregation module, a decoding module, a multi-scale spatial attention module, a detail supervision module, a joint loss module and a Softmax classifier;

[0070] The encoding module and the decoding module both use bottleneck blocks and residual connection convolution blocks;

[0071] The local image module is used to receive an input local image block; the output interface of the local image module is connected to the input interface of the encoding module; the output interface of the encoding module is respectively connected to the feature enhancement aggregation module and the multi-scale spatial attention module;

[0072] The output interface of the feature enhancement aggregation module is connected to the input interface of the decoding module; the output interface of the decoding module is connected to the first input interface of the joint loss module;

[0073] The output interface of the multi-scale spatial attention module is connected to the input interface of the detail supervision module; the output interface of the detail supervision module is connected to the second input interface of the joint loss module;

[0074] The output interface of the joint loss module is connected to the input interface of the Softmax classifier; the Softmax classifier is used to output the classification result.

[0075] In this implementation, both the encoding module and the decoding module use bottleneck blocks and residual connection convolution blocks, which can reduce the computational burden and the risk of overfitting.

[0076] Implementation Method 3: Combination Figure 1 and 2 This embodiment is described as a further limitation of the retinal artery and vein classification method described in Embodiment 2. The specific implementation contents are as follows:

[0077] The multi-scale spatial attention module is used to extract multi-scale features by using depth-separable convolutions with different dilation rates.

[0078] Implementation Method 4: Combination Figure 1 and 2 This embodiment is described as a further limitation of the retinal artery and vein classification method described in Embodiment 2. The specific implementation contents are as follows:

[0079] The feature enhancement aggregation module is used to obtain the global information of the channel by using average pooling and maximum pooling, and to enhance the original features of the local image block by adjusting the input feature weights.

[0080] In this embodiment, the feature enhancement aggregation module includes a lightweight channel attention submodule and an efficient feature enhancement submodule, wherein the channel attention submodule is used to fuse context information of different scales.

[0081] In this embodiment, the detail supervision module is used to re-weight the multi-scale features (i.e., a deep feature) extracted by the multi-scale spatial attention module through an upsampling attention gate, and is also used to fuse the re-weighted multi-scale features with the shallow features of the input local image block, and is also used to process the fused results through bilinear interpolation upsampling to obtain output.

[0082] In this implementation, the joint loss module is used to receive the output of the decoding module in the backbone structure and the output of the detail supervision module, and then calculate the loss with the true label through the cross entropy loss function and add them to obtain the joint loss result.

[0083] In this implementation, the Softmax classifier is used to output a prediction probability map of a local image block, and then reconstruct all image blocks into the original image to obtain a classification result.

[0084] Implementation Method 5: Combination Figure 1 and 2 This embodiment is described as a further limitation of the retinal artery and vein classification method described in Embodiment 1. The specific implementation contents are as follows:

[0085] In the data preprocessing step, the method adopts a sliding window sampling method to divide each image into n×n local image blocks.

[0086] In this implementation, the value of n may be 48, that is, each image is divided into 48×48 local image blocks. The value of n may also be 96, 128 or a larger number.

[0087] In this implementation, the sliding window sampling method is:

[0088] The sliding window starts from the upper left corner of each image and samples with a step size of 32, which can divide the image into 48×48 local image blocks.

[0089] If sampling is performed with a step size of 16, the image can be divided into 96×96 local image blocks.

[0090] In this embodiment, since the grayscale values ​​of blood vessels and non-vascular structures (background) are similar, and since the retinal arteries and veins are large in size, they are generally not suitable for direct training. Therefore, the data is expanded and compressed by dividing them into local image blocks, which can better extract vascular information and reduce the size of images used for training, making training easier and improving training efficiency.

[0091] In this implementation, a random patch extraction strategy is adopted in the data preprocessing step to reduce the dimension of the data and expand the small sample data set, which greatly reduces the risk of overfitting in model training.

[0092] In this embodiment, in the sampling strategy of the local image block, one part adopts random sampling to sample the local image block, and the other part determines whether the local image block contains blood vessels during sampling. The best ratio between the two is 4:6.

[0093] Implementation Method 6: Combination Figure 1 and 2 This embodiment is described as a further limitation of the retinal artery and vein classification method described in Embodiment 1. The specific implementation contents are as follows:

[0094] In the model training step, the training parameters are set as follows:

[0095] The batch size is 32; 100 epochs are trained each time; the corresponding early stopping strategy is adopted; the learning rate is 0.0005, and the cosine annealing method is used to dynamically reduce the learning rate during the training process.

[0096] In this implementation, the corresponding early stopping strategy is to terminate the training of the model when the loss value no longer decreases in 10 batches (that is, the training is stopped when the loss value no longer decreases in 10 consecutive batches).

[0097] In this implementation, a corresponding early stopping strategy is adopted to prevent overfitting.

[0098] Implementation Method 7: Combination Figure 1 and 2 This embodiment is described as a further limitation of the retinal artery and vein classification method described in Embodiment 1. The specific implementation contents are as follows:

[0099] In the classification verification step, the F1 score, accuracy and AUC value are used as evaluation indicators to verify the classification effect of the best model.

[0100] Implementation Method 8: Combination Figure 1 and 2 This embodiment describes a retinal artery and vein classification device, and the specific implementation contents are as follows:

[0101] The device is implemented based on a spatial multi-scale attention mechanism network model; the device includes the following modules:

[0102] A data acquisition module, used for acquiring fundus retinal arteriovenous image data as a data set;

[0103] The data preprocessing module is used to preprocess the images in the data set and divide each image into n×n local image blocks;

[0104] The data set partitioning module is used to partition the preprocessed data set into a training set, a validation set, and a test set;

[0105] A model training module is used to train the spatial multi-scale attention mechanism network model using a training set to obtain a trained spatial multi-scale attention mechanism network model;

[0106] The parameter adjustment module is used to verify the classification results output by the trained spatial multi-scale attention mechanism network model using the verification set, and select the best model by adjusting the parameters;

[0107] The classification verification module is used to test the best model using a test set to verify the classification effect of the best model.

[0108] In this embodiment, the device is used to implement the retinal artery and vein classification method described in the first embodiment.

[0109] Implementation Method 9: Combination Figure 1 and 2This embodiment describes that this embodiment uses the retinal artery and vein classification method described in the above embodiment and other advanced models such as U-Net, U-Net++, Att U-Net, DDA-Net, Enhanced U-Net and VC-Net to conduct comparative tests on the public retinal vascular datasets DRIVE-AV, LES-AV and HRF-AV. The classification performance of each method is measured using quantitative indicators such as Sensitivity, F1-score, ROC, PR, MSE, MCC and IOU, and the average value of the test set data is taken.

[0110] First, experiments were conducted on the benchmark retinal image datasets DRIVE-AV and HRF-AV. 40,000 local image patches of size 128×128 were randomly extracted from the 20 fundus images in the training set; 90% of the samples were used as the training set and 10% of the samples were used as the validation set.

[0111] The experimental results are shown in Table 1:

[0112] Table 1 Performance comparison of different classification methods on the DRIVE-AV dataset

[0113] Methods Sen(%) F1(%) ROC(%) PR(%) MSE(%) MCC(%) IOU(%) U-Net 63.95 68.14 81.52 70.09 2.75 61.30 52.48 U-Net++ 67.23 70.48 83.07 72.40 2.58 70.24 55.24 AttU-Net 67.03 68.87 80.27 70.30 2.53 67.50 54.54 DDA-Net 65.87 68.40 82.18 70.67 2.68 64.58 53.40 Enhanced U-Net 63.43 66.63 81.05 68.49 2.88 62.02 51.10 VC-Net 67.00 68.86 80.19 70.20 2.56 64.78 54.42 Proposed 70.43 70.55 84.49 72.05 2.61 67.83 55.25

[0114] It can be seen from Table 1 that the retinal artery and vein classification method described in the above embodiment has achieved the best performance in most indicators.

[0115] A new local image block sampling strategy is used when segmenting retinal arteriovenous images. One part uses randomly selected image blocks, and the other part determines whether the image block contains blood vessels during sampling. The optimal ratio between the two is verified by experiments and the results are shown in Table 2:

[0116] Table 2 Performance comparison on DRIVE-AV dataset under different sampling strategies

[0117]

[0118] It can be seen from Table 2 that the 4:6 sampling strategy has better segmentation performance, that is, in the sampling strategy of the local image block, one part adopts a random sampling method to sample the local image block, and the other part judges whether the local image block contains blood vessels during sampling. The best ratio between the two is 4:6.

[0119] In the HRF-AV dataset, there are 45 retinal arteriovenous images, 40 of which are selected for training and the rest for validation. The new local image block sampling strategy is adopted, and the experimental results are listed in Table 3.

[0120] Table 3 Performance comparison of different classification methods on the HRF-AV dataset after adopting the new local image patch sampling strategy

[0121] Methods Sen(%) F1(%) ROC(%) PR(%) MSE(%) MCC(%) IOU(%) U-Net 52.64 50.50 70.63 55.58 2.25 51.43 45.68 U-Net++ 56.75 54.26 71.77 60.04 2.08 56.70 50.75 AttU-Net 55.62 52.91 74.34 56.24 2.03 57.50 51.55 DDA-Net 50.04 48.02 66.38 52.66 2.20 48.84 44.15 Enhanced U-Net 54.66 53.33 72.05 58.53 2.15 54.38 47.90 VC-Net 54.34 52.68 71.34 57.67 2.15 53.62 47.60 Proposed 55.83 53.86 72.61 60.13 2.16 54.48 50.65

[0122] As can be seen from Table 3, the retinal artery and vein classification method described in the above embodiment is very competitive in terms of PR. Due to the uneven distribution of blood vessels and background pixels in the fundus data, the PR performance is excellent, indicating that the retinal artery and vein classification method described in the above embodiment predicts the image closer to the actual situation and further improves the accuracy. The edges of the blood vessels after model classification are smooth, which effectively suppresses noise interference, enhances the edges of the crossing blood vessels, and successfully restores the blood vessel structure.

[0123] It should be noted that in the other advanced models mentioned above, the VC-Net model also uses a codec structure and uses vascular distribution and edge information enhancement to classify arteries and veins. However, it has classification confusion problems at the intersection of blood vessels and the calculation is relatively complex. The retinal artery and vein classification method described in the above implementation first uses multi-scale feature aggregation technology to extract features of different scales and capture deep and shallow feature information; then uses feature enhancement channel attention technology to reduce noise interference and reduce computational complexity, and finally classifies arteries and veins through global feature information fusion technology, accurately classifying the overlapping arteries and veins, and solving the problems of classification confusion and relatively complex calculations.

[0124] The technical solution provided by the present invention is further described in detail above through several specific implementation modes in order to highlight the advantages and benefits of the technical solution provided by the present invention. However, the several specific implementation modes described above are not intended to be used as limitations on the present invention. Any reasonable changes and improvements to the present invention, reasonable combinations of implementation modes and equivalent substitutions based on the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. Retinal artery and vein classification method, It is characterized in that The method is implemented based on a spatial multi-scale attention mechanism network model; the method comprises the following steps: Data acquisition steps: acquiring fundus retinal arteriovenous image data as a data set; Data preprocessing step: preprocess the images in the data set and divide each image into n×n local image blocks; Dataset division step: divide the preprocessed dataset into training set, validation set and test set; Model training steps: Use the training set to train the spatial multi-scale attention mechanism network model to obtain the trained spatial multi-scale attention mechanism network model; Parameter adjustment step: Use the validation set to verify the classification results output by the trained spatial multi-scale attention mechanism network model, and select the best model by adjusting the parameters; Classification verification step: Use the test set to test the best model to verify the classification effect of the best model.

2. The retinal artery and vein classification method according to claim 1, It is characterized in that The spatial multi-scale attention mechanism network model is based on U-Net; the spatial multi-scale attention mechanism network model is a five-layer encoding and decoding structure; The spatial multi-scale attention mechanism network model includes a local image module, an encoding module, a feature enhancement aggregation module, a decoding module, a multi-scale spatial attention module, a detail supervision module, a joint loss module and a Softmax classifier; The encoding module and the decoding module both use bottleneck blocks and residual connection convolution blocks; The local image module is used to receive an input local image block; the output interface of the local image module is connected to the input interface of the encoding module; the output interface of the encoding module is respectively connected to the feature enhancement aggregation module and the multi-scale spatial attention module; The output interface of the feature enhancement aggregation module is connected to the input interface of the decoding module; the output interface of the decoding module is connected to the first input interface of the joint loss module; The output interface of the multi-scale spatial attention module is connected to the input interface of the detail supervision module; the output interface of the detail supervision module is connected to the second input interface of the joint loss module; The output interface of the joint loss module is connected to the input interface of the Softmax classifier; the Softmax classifier is used to output the classification result.

3. The retinal artery and vein classification method according to claim 2, It is characterized in that The multi-scale spatial attention module is used to extract multi-scale features by using depth-separable convolutions with different dilation rates.

4. The retinal artery and vein classification method according to claim 2, It is characterized in that The feature enhancement aggregation module is used to obtain the global information of the channel by using average pooling and maximum pooling, and to enhance the original features of the local image block by adjusting the input feature weights.

5. The retinal artery and vein classification method according to claim 1, It is characterized in that In the data preprocessing step, the method adopts a sliding window sampling method to divide each image into n×n local image blocks.

6. The retinal artery and vein classification method according to claim 1, It is characterized in that In the model training step, the training parameters are set as follows: The batch size is 32; 100 epochs are trained each time; the corresponding early stopping strategy is adopted; the learning rate is 0.0005, and the cosine annealing method is used to dynamically reduce the learning rate during the training process.

7. The retinal artery and vein classification method according to claim 1, It is characterized in that In the classification verification step, the F1 score, accuracy and AUC value are used as evaluation indicators to verify the classification effect of the best model.

8. Retinal artery and vein classification device, It is characterized in that The device is implemented based on a spatial multi-scale attention mechanism network model; the device includes the following modules: A data acquisition module, used for acquiring fundus retinal arteriovenous image data as a data set; The data preprocessing module is used to preprocess the images in the data set and divide each image into n×n local image blocks; The data set partitioning module is used to partition the preprocessed data set into training set, validation set and test set; A model training module is used to train the spatial multi-scale attention mechanism network model using a training set to obtain a trained spatial multi-scale attention mechanism network model; The parameter adjustment module is used to verify the classification results output by the trained spatial multi-scale attention mechanism network model using the verification set, and select the best model by adjusting the parameters; The classification verification module is used to test the best model using a test set to verify the classification effect of the best model.

9. A computer program product, include: A processor and a memory, characterized in that the memory is used to store executable instructions of the processor, and the processor is configured to execute the retinal artery and vein classification method described in any one of claims 1 to 7 by executing the executable instructions.

10. A computer storage medium, It is characterized in that The storage medium stores a computer program, and when the computer program is run, the retinal artery and vein classification method according to any one of claims 1 to 7 is executed.

Citation Information

Patent Citations

  • Classification method and device for fundus retina arteries and veins and storage medium

    CN115018756A

  • DSA cerebrovascular segmentation system and method based on spatial multi-scale attention network

    CN115439651A

  • Fundus image classification algorithm based on fusion decision tree and improved UNet + +

    CN115601822A

  • Image recognition method and device, storage medium and computer equipment

    CN116266390A