A method, device and storage medium for automatic grading of keratoconus

Through multi-level feature extraction and feature fusion modules, the attention mechanism and depth-separable convolution are used to solve the problem of insufficient feature extraction and fusion capabilities of traditional networks, and significantly improve the performance of keratoconus severity classification.

CN116246331BActive Publication Date: 2024-08-16SUZHOU UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211552123.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-05
Publication Date
2024-08-16
Estimated Expiration
2042-12-05

AI Technical Summary

Technical Problem

Existing technology fails to fully consider the connection between multiple corneal topographic maps, and traditional convolutional neural networks have insufficient capabilities in feature extraction and fusion, resulting in low performance in keratoconus severity grading tasks.

Method used

It uses a multi-level feature extraction module and a feature fusion module to generate attention weights through the attention mechanism, adjust the feature importance, and perform channel attention mechanism fusion. It combines depth-separable convolution and fully connected layers to generate more accurate grading results. .

Benefits of technology

Improved performance on the keratoconus severity classification task, the network is more focused on key features in the corneal topography, significantly improving the classification effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116246331B
    Figure CN116246331B
Patent Text Reader

Abstract

The present invention relates to the field of deep learning technology, and in particular to a method, device, computer storage medium, and ophthalmic imaging equipment for automatic grading of keratoconus. The automatic grading method for keratoconus described in the present invention takes five topographic maps as a whole as input, fully considering the connection between multiple corneal topography maps, and the feature extraction module based on self-attention obtains the average and maximum values ​​of the corresponding dimensions of each channel of the input feature, and generates attention weights based on the rich information of these different dimensions, thereby guiding the network to extract important feature information; the feature fusion module can adaptively calibrate the features of the upper and lower channel dimensions based on the attention mechanism, and fuse the upper and lower features according to certain weights, thereby obtaining advanced features that are more conducive to classification, which can enable the network to focus more on the key features in the corneal topography map, and achieve excellent performance in the task of grading the severity of keratoconus.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of deep learning technology, and in particular to a method and device for automatic grading of keratoconus, a computer storage medium, and an ophthalmic imaging device. Background Art

[0002] Keratoconus (KC) is an eye disease characterized by thinning of the central cornea, which bulges forward in a cone shape and is usually asymmetrical. It tends to develop during adolescence and often leads to highly irregular myopic astigmatism, accompanied by acute corneal edema, scarring, and significant loss of vision in the late stages. Studies have shown that one in every 2,000 people in the general population suffers from keratoconus. Although the cause of keratoconus is still unclear, researchers have found that the incidence of the disease varies by race, environment, and genetic factors.

[0003] Ophthalmologists usually diagnose keratoconus based on corneal topography because they provide detailed data and morphological features of the cornea. Early imaging devices could only obtain topographic data of the anterior surface. With the continuous development of science and technology, imaging technologies related to ophthalmology have also been rapidly improved. The current corneal imaging mode provides much more information than the previous placido-based anterior corneal analysis. Not only can other parameter indicators for diagnosing keratoconus be obtained, but also data information on the posterior surface of the cornea can be obtained, which is conducive to the detection and grading of keratoconus. However, the parameter indicators obtained by different imaging devices are often different. Therefore, the classification standards formulated based on the parameter indicators have poor repeatability and cannot reflect the characteristic differences between each category. Corneal topography can provide rich characteristic information, which will be conducive to the grading of the severity of keratoconus.

[0004] The treatment of keratoconus depends on the progression of the disease and its severity. Usually, glasses can provide acceptable vision for mild and some moderate patients. As the disease progresses and irregular astigmatism occurs, contact lenses can correct irregular astigmatism and provide better vision for moderate patients. In addition, by using corneal topography and optical coherence tomography imaging, the appropriate lenses can be selected according to the type, location and size of the cones, which can not only effectively improve the wearer's comfort, but also help prevent the progression to severe keratoconus and avoid corneal transplantation. Patients with severe keratoconus can undergo keratoplasty and choose related surgical treatments. Therefore, the development of an effective keratoconus grading algorithm will provide effective guidance and assistance for ophthalmologists to formulate appropriate treatment plans for patients.

[0005] In the past, many studies on keratoconus focused on the screening and detection of keratoconus. Most of them used some traditional machine learning algorithms, such as decision trees, support vector machines, artificial neural networks, etc., to diagnose the disease with the help of corneal index obtained from the equipment. In recent years, with the continuous development of artificial intelligence technology, its ability to analyze and process complex data has been continuously strengthened, especially in the field of deep learning. AlexNet, VGGNet, GoogLeNet, ResNet, DenseNet and other convolutional neural networks (CNN) have been used for image classification tasks in many scenarios. In ophthalmology, deep learning methods have been widely used in the diagnosis and screening of diseases such as diabetic retinopathy (DR), age-related macular degeneration (AMD), retinopathy of prematurity (ROP) and many other diseases. With the emergence of advanced imaging equipment, researchers have also begun to use deep learning technology to study end-to-end automated keratoconus detection algorithms based on corneal topography. However, the current research on grading the severity of keratoconus using deep learning is relatively rare. Most of the available methods use traditional convolutional neural networks such as VGGNet and ResNet to directly extract features from a single corneal topography map and then obtain classification results.

[0006] At present, these keratoconus diagnostic algorithms developed using deep learning still have some limitations. Most studies feed a single corneal topography map into the network for processing to obtain their own classification results, without considering the relationship between multiple corneal topography maps. In addition, most researchers still use traditional convolutional neural networks to process corneal topography, and there is no major innovation in feature extraction and fusion. The performance of classification tasks still needs to be improved. Summary of the invention

[0007] To this end, the technical problem to be solved by the present invention is to overcome the problem that the prior art does not consider the relationship between multiple corneal topography maps, and the traditional convolutional neural network has insufficient feature extraction and feature fusion capabilities, resulting in low performance of classification tasks.

[0008] In order to solve the above technical problems, the present invention provides a method for automatic grading of keratoconus, comprising: obtaining multiple corneal topography maps of a target eye and performing normalization processing to obtain target input features, and inputting the features into a pre-trained automatic grading model for keratoconus;

[0009] The target input feature is input into the n-level feature extraction module to further extract features, wherein the processing process in each level of feature extraction module is as follows:

[0010] The output features of the previous feature extraction module are processed by the batch normalization layer and the ReLU activation function, and then passed through three 3×3 convolutions to obtain the first feature F q , the second feature F k and the third feature F v , respectively find the first feature F q , the second feature F k The average value and the maximum value of the corresponding dimension, and the product of the average values ​​of the two corresponding dimensions and the product of the maximum values ​​of the two corresponding dimensions are added and processed by the sigmoid function to obtain an attention weight matrix, the third feature is multiplied by the attention weight matrix to obtain an attention weight, and the attention weight is added to the output feature of the previous level feature extraction module through 1×1 convolution to obtain the output feature of the current level feature extraction module;

[0011] The output features of the nth level feature extraction module and the output features of the n-2th level feature extraction module whose dimensions and sizes are consistent with the nth level after 1×1 convolution adjustment are input into the feature fusion module together. The processing process in the feature fusion module is as follows:

[0012] The importance of the two input features is adjusted through the channel attention mechanism, and the two calibrated input features are fused according to the preset ratio. Finally, the target output features are obtained through 1×1 convolution.

[0013] After the target output features are processed by the fully connected layer and the Softmax function, the classification results are obtained.

[0014] Preferably, the 3×3 convolution is a 3×3 depthwise separable convolution.

[0015] Preferably, adjusting the importance by a channel attention mechanism includes:

[0016] The input features are passed through the maximum pooling layer and the average pooling layer respectively to obtain the maximum pooling features and the average pooling features;

[0017] The maximum pooling feature and the average pooling feature are respectively passed through two weight-shared 1×1 convolutions and ReLU activation functions, and the obtained results are added together and then passed through a sigmoid activation function to generate a channel attention weight ranging from 0 to 1;

[0018] The channel attention weight is multiplied by the input feature to adjust its importance.

[0019] Preferably, the sigmoid function is a Hard-sigmoid function.

[0020] Preferably, the step of acquiring multiple corneal topography maps of the target eye and performing normalization processing comprises:

[0021] Get the target eye's inspection report in pdf format;

[0022] Extracting multiple corneal topography maps from the examination report by parsing the PDF file, the multiple corneal topography maps including a corneal thickness map, an anterior surface tangent map, an anterior surface elevation map, a posterior surface tangent map, and a posterior surface elevation map;

[0023] The five corneal topography maps were downsampled to the same size using a bilinear interpolation method and then normalized.

[0024] Preferably, the training method of the keratoconus automatic grading model comprises:

[0025] Obtain corneal topography data of multiple eyes, annotate them, and classify them into normal, mild, moderate, and severe to obtain a training set;

[0026] The keratoconus automatic grading model is trained using the training set until the loss function converges.

[0027] Preferably, the loss function is:

[0028]

[0029] Among them, L m represents the CE loss of multi-classification tasks, y i,k Indicates that the true label of the i-th sample is k, there are K label values ​​and N samples in total, p i,k It represents the probability that the i-th sample is predicted to be the k-th label value.

[0030] The present invention also provides an automatic grading device for keratoconus, comprising:

[0031] An input module is used to obtain multiple corneal topography maps of the target eye and perform normalization processing to obtain target input features, which are input into a pre-trained keratoconus automatic grading model;

[0032] The multi-level feature extraction module is used to input the target input feature into the n-level feature extraction module to further extract features, wherein the processing process in each level of feature extraction module is:

[0033] The output features of the previous feature extraction module are processed by the batch normalization layer and the ReLU activation function, and then passed through three 3×3 convolutions to obtain the first feature F q , the second feature Fk and the third feature F v , respectively find the first feature F q , the second feature F k The average value and the maximum value of the corresponding dimension, and the product of the average values ​​of the two corresponding dimensions and the product of the maximum values ​​of the two corresponding dimensions are added and processed by the sigmoid function to obtain an attention weight matrix, the third feature is multiplied by the attention weight matrix to obtain an attention weight, and the attention weight is added to the output feature of the previous level feature extraction module through 1×1 convolution to obtain the output feature of the current level feature extraction module;

[0034] The feature fusion module is used to adjust the importance of the output features of the n-th level feature extraction module and the output features of the n-2-th level feature extraction module whose dimensions and sizes are consistent with the n-th level after 1×1 convolution, respectively, through the channel attention mechanism, and fuse the two calibrated features according to the preset ratio, and finally obtain the target output features through 1×1 convolution;

[0035] The automatic classification module is used to obtain the classification results after processing the target output features through the fully connected layer and the Softmax function.

[0036] The present invention also provides an ophthalmic imaging device, comprising the automatic keratoconus grading device as described above.

[0037] The present invention also 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 the above-mentioned method for automatic grading of keratoconus are implemented.

[0038] The above technical solution of the present invention has the following advantages compared with the prior art:

[0039] The automatic keratoconus grading method described in the present invention takes five topographic maps as a whole as input, fully considering the connection between multiple corneal topography maps, and the feature extraction module based on self-attention obtains the average and maximum values ​​of the corresponding dimensions of each channel of the input feature, and generates attention weights based on the rich information of these different dimensions, thereby guiding the network to extract important feature information; the feature fusion module can adaptively calibrate the features of the upper and lower channel dimensions based on the attention mechanism, and fuse the upper and lower features according to certain weights, thereby obtaining high-level features that are more conducive to classification, which can enable the network to focus more on the key features in the corneal topography and achieve excellent performance in the task of grading the severity of keratoconus. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:

[0041] Figure 1 It is a flow chart of an automatic grading method for keratoconus of the present invention;

[0042] Figure 2 It is the overall structure diagram of the automatic grading method of keratoconus designed by the present invention;

[0043] Figure 3 This is a network structure diagram of the self-attention-based feature extraction module SaFEB designed by the present invention;

[0044] Figure 4 It is a network structure diagram of the multi-level feature fusion module MlFFM designed by the present invention;

[0045] Figure 5 This is a structural block diagram of an automatic keratoconus grading device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0046] The core of the present invention is to provide a method and device for automatic grading of keratoconus, a computer storage medium, and an ophthalmic imaging device, which improve the performance of the keratoconus severity grading task.

[0047] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0048] Please refer to Figure 1 and Figure 2 , Figure 1 is a flow chart of an automatic grading method for keratoconus of the present invention. Figure 2 The figure is the overall structure diagram of the automatic grading method for keratoconus designed by the present invention; the specific operation steps are as follows:

[0049] S101: Acquire multiple corneal topography maps of the target eye and perform normalization processing to obtain target input features, and input the features into a pre-trained keratoconus automatic grading model;

[0050] The training method of the keratoconus automatic grading model comprises:

[0051] Obtain corneal topography data of multiple eyes, annotate them, and classify them into normal, mild, moderate, and severe to obtain a training set;

[0052] The keratoconus automatic grading model is trained using the training set until the loss function converges.

[0053] The network proposed in this invention is for grading the severity of keratoconus, which is a multi-classification task. In the supervised classification task of deep learning, the cross entropy loss function (CE) is often used. It can be used not only for binary classification tasks but also for multi-classification tasks, and can effectively measure the difference between the distribution learned by the model and the true distribution. The loss function is:

[0054]

[0055] Among them, L m represents the CE loss of multi-classification tasks, y i,k Indicates that the true label of the i-th sample is k, there are K label values ​​and N samples in total, P i,k It represents the probability that the i-th sample is predicted to be the k-th label value.

[0056] S102: Input the target input feature into n-level feature extraction modules to further extract features, wherein the processing process in each level of feature extraction module is as follows:

[0057] like Figure 3 As shown, a novel feature extraction block is designed, which uses feature information of different dimensions to generate its attention weight matrix, thereby obtaining richer and more effective features. In addition, in order to reduce the complexity of the model, the present invention uses depth-wise separable convolution (DSC) instead of traditional convolution. Depth-wise separable convolution consists of depth-wise (Dw) convolution and 1×1 convolution. In depth convolution, a convolution kernel has only one dimension, and a channel is convolved by only one convolution kernel. It can significantly reduce the amount of parameters while maintaining model performance, so it is widely used in lightweight networks:

[0058] The output feature F of the previous feature extraction module i ∈ After the batch normalization layer and the ReLU6 activation function processing (which can strengthen the regularization of the model and make it easier to optimize), it is divided into three passes through the 3×3 depth-separable convolution F q =DSC3(BR(F i ))、F k =DSC3(BR(F i ))、F v =DSC3(BR(F i )), get the first feature Second feature and the third feature Find the feature F q The average and maximum values ​​of the corresponding dimensions are obtained and Find the feature F k The average and maximum values ​​of the corresponding dimensions are obtained and The product of the average values ​​of the two corresponding dimensions and the product of the maximum values ​​of the two corresponding dimensions are added together and processed by the Hard-sigmoid function (the Hard-sigmoid function is implemented based on ReLU6 and is very close to the sigmoid function, but it becomes simpler in the calculation and derivation process) to obtain the attention weight matrix W v =HS(EM(W qA , W kA )+EM(W kM , W qM ), multiplying the third feature by the attention weight matrix to obtain an attention weight, adding the attention weight to the output feature of the previous level feature extraction module through 1×1 convolution to obtain the output feature F of the current level feature extraction module o =EM(F v , W v )+C1(F i );in represents the input feature map, C i is the number of channels of the feature map, H i is the height of the feature map, W i is the width of the feature map. DSC3 represents a depthwise separable convolution with a kernel size of 3×3, BR represents a batch normalization layer and a ReLU6 activation function, EM represents element-wise multiplication, HS represents a Hard-sigmoid activation function, and C1 represents a 1×1 convolution.

[0059] S103: The output features of the nth level feature extraction module and the output features of the n-2th level feature extraction module whose dimensions and sizes are consistent with the nth level after 1×1 convolution adjustment are input into the feature fusion module together. The processing process in the feature fusion module is as follows:

[0060] like Figure 4 As shown in the figure, a multi-level feature fusion module is designed. This module can adaptively calibrate the features of the upper and lower channel dimensions based on the channel attention mechanism, and fuse the calibrated two-level features according to certain weights to enhance the features:

[0061] The importance of the two input features is adjusted through the channel attention mechanism, and the two calibrated input features are fused according to the preset ratio. Finally, the information aliasing is eliminated through 1×1 convolution to obtain the target output feature:

[0062] F n+1 =C1(((CA(C1(F n-2 )))×w+(CA(F n ))×(1-w))

[0063] Among them, CA represents the channel attention mechanism, C1 represents 1×1 convolution, and w∈[0, 1] represents the fusion ratio of level n-2.

[0064] The adjustment of importance through the channel attention mechanism includes:

[0065] The input features are passed through the maximum pooling layer and the average pooling layer respectively to obtain the maximum pooling features and the average pooling features;

[0066] The maximum pooling feature and the average pooling feature are respectively passed through two weight-shared 1×1 convolutions and ReLU activation functions, and the obtained results are added together and then passed through a hard-sigmoid activation function to generate a channel attention weight ranging from 0 to 1;

[0067] The channel attention weight is multiplied by the input feature to adjust its importance.

[0068] S104: After the target output features are processed by the fully connected layer and the Softmax function, a classification result is obtained.

[0069] Based on the above embodiments, this embodiment further explains step S101:

[0070] Obtain the examination report of the target eye in PDF format, and extract five color-coded corneal topography images from the examination report by parsing the PDF file. The size of these images is 640 × 480. Then enter the image processing stage, first use the bilinear interpolation method to downsample all five images to 256 × 256, and then synthesize the five images into an input data format of 256 × 256 × 15.

[0071] In the data processing part, the present invention designs an automated processing program that can extract data from input reports without human intervention. Secondly, in the network part, a self-attentionbased feature extraction block (SaFEB) module and a multi-level feature fusion module (MlFFM) module are designed and applied to the ResNet18 network structure to realize a lightweight keratoconus grading network (LKG-Net), which divides the input data into four categories: normal, mild, moderate and severe.

[0072] The self-attention-based feature extraction module SaFEB proposed in the present invention can generate an attention weight matrix using feature information of different dimensions, thereby obtaining richer and more effective features, and uses deep separable convolution to reduce the number of parameters and calculations, which can significantly reduce the number of model parameters while obtaining rich features. The multi-level feature fusion module MlFFM can adaptively calibrate the features of the upper and lower channel dimensions based on the attention mechanism, and fuse the upper and lower features according to certain weights, thereby obtaining advanced features that are more conducive to classification. In the keratoconus grading experiment, excellent results were obtained, indicating the effectiveness of the method proposed in the present invention.

[0073] The present invention proposes a lightweight automatic keratoconus grading method based on corneal topography. The proposed self-attention-based feature extraction module SaFEB and multi-level feature fusion module MlFFM can make the network more focused on the key features in the corneal topography, and achieve excellent performance in the keratoconus severity grading task. In addition, the method has a small number of parameters and high practicality, which will provide strong assistance to ophthalmologists in the diagnosis and treatment of keratoconus.

[0074] Based on the above embodiments, this embodiment is based on the integrated environment of Pytorch, and uses an NVIDIA Tesla K40 GPU with 12GB storage space to train and test the model. The model is trained by minimizing the cross entropy loss through the back propagation algorithm, and the optimizer Adam is used to minimize the cost function. The basic learning rate and weight decay are both set to 0.0001. Each batch of data sent for processing is set to 8, and the number of iterations is set to 200.

[0075] The experimental data used in this embodiment are corneal topography data from 488 eyes of 281 people, including 236 normal eyes and 252 eyes with keratoconus. The data of each eye contains five corneal topography maps, namely corneal thickness map, anterior surface tangent map, anterior surface elevation map, posterior surface tangent map and posterior surface elevation map, and the original resolution of the image is 640×480. Professional ophthalmologists divided the 252 KC eyes into 137 mild, 64 moderate and 51 severe eyes based on the Amsler-Krumeich classification standard combined with the indicators in the examination report. Considering the problem of data volume, a 4-fold cross-validation strategy was adopted to evaluate the effectiveness of the proposed method. In order to reduce the computational cost, all corneal topography maps were downsampled to 256×256 using bilinear interpolation and normalized to [0,1].

[0076] The weighted recall (W_R), weighted precision (W_P), weighted F1 score (W_F1) and consistency test coefficient (Kappa) are used to compare the proposed method with other excellent CNN-based classification networks, including VGG16, InceptionV2, ResNet34, ResNet101, ResNext50, SE_ResNet50, DenseNet121, EfficientNet_b0, EfficientNet_b2, MobileNet_v3_small, MobileNet_v3_large and Mutil-ResNet18. For convenience, the backbone network ResNet18 is called the benchmark network. For all methods, the five corneal topography maps are sent to the network as a whole input for training and testing. The experimental results are shown in Table 1:

[0077] Table 1 Keratoconus grading results by different methods

[0078]

[0079]

[0080] As can be seen from Table 1, the performance of the network LKG-Net proposed in the present invention is better than all the above CNN-based methods. First, compared with the baseline network, the performance of the method proposed in the present invention has been significantly improved, with W_R, W_P, W_F1 and Kappa increased by 2.46%, 2.15%, 3.45% and 1.67% respectively. The complexity of the model proposed in the present invention is greatly reduced, and the number of parameters is about one-fifth of the baseline network, so it is called a lightweight network. Secondly, compared with other networks that use attention mechanisms and use ResNet as the backbone, including SE_Resnet50 and SE_ResNext50, this method has obvious advantages in model performance and complexity. MobileNetV3 is a typical representative of lightweight networks. Compared with MobileNetV3_small with similar model parameters, the performance of the proposed method has been significantly improved.

[0081] So far, a novel end-to-end method for grading the severity of keratoconus has been implemented and verified. Based on the self-attention-based feature extraction module SaFEB and the multi-level feature fusion module MlFFM proposed in the present invention, the LKG-Net network has overcome the shortcomings of previous models such as insufficient consideration of feature extraction and fusion and high model complexity. The experimental results show that the LKG-Net network designed by the present invention can effectively distinguish keratoconus of different severity, which will be beneficial to ophthalmologists in diagnosing and treating patients.

[0082] Please refer to Figure 5 , Figure 5 A structural block diagram of an automatic keratoconus grading device provided by an embodiment of the present invention; the specific device may include:

[0083] An input module 100 is used to obtain multiple corneal topography maps of a target eye and perform normalization processing to obtain target input features, and input the features into a pre-trained keratoconus automatic grading model;

[0084] The multi-level feature extraction module 200 is used to input the target input feature into the n-level feature extraction module to further extract features, wherein the processing process in each level of feature extraction module is:

[0085] The output features of the previous feature extraction module are processed by the batch normalization layer and the ReLU activation function, and then passed through three 3×3 convolutions to obtain the first feature F q , the second feature F k and the third feature F v , respectively find the first feature F q , the second feature F kThe average value and the maximum value of the corresponding dimension, and the product of the average values ​​of the two corresponding dimensions and the product of the maximum values ​​of the two corresponding dimensions are added and processed by the sigmoid function to obtain an attention weight matrix, the third feature is multiplied by the attention weight matrix to obtain an attention weight, and the attention weight is added to the output feature of the previous level feature extraction module through 1×1 convolution to obtain the output feature of the current level feature extraction module;

[0086] The feature fusion module 300 is used to adjust the importance of the output features of the n-th level feature extraction module and the output features of the n-2-th level feature extraction module whose dimensions and sizes are consistent with the n-th level after 1×1 convolution respectively through the channel attention mechanism, fuse the two calibrated features according to a preset ratio, and finally obtain the target output features through 1×1 convolution;

[0087] The automatic classification module 400 is used to obtain a classification result after processing the target output features through a fully connected layer and a Softmax function.

[0088] The automatic grading device for keratoconus of the present embodiment is used to implement the aforementioned automatic grading method for keratoconus. Therefore, the specific implementation of the automatic grading device for keratoconus can be seen in the embodiment section of the automatic grading method for keratoconus mentioned above. For example, the input module 100, the multi-level feature extraction module 200, the feature fusion module 300, and the automatic grading module 400 are respectively used to implement steps S101, S102, S103, and S104 in the aforementioned automatic grading method for keratoconus. Therefore, its specific implementation can refer to the description of the corresponding embodiments of each part, which will not be repeated here.

[0089] A specific embodiment of the present invention further provides an ophthalmic imaging device, into which the above-mentioned automatic keratoconus grading device is integrated to realize automated inspection.

[0090] A specific embodiment of the present invention further 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 the above-mentioned method for automatic grading of keratoconus are implemented.

[0091] 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 in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0092] 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.

[0093] 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.

[0094] 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 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0095] Obviously, the above embodiments are merely examples for the purpose of 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 therefrom are still within the scope of protection of the present invention.

Claims

1. A method for automatically grading keratoconus, characterized in that: include: Obtain multiple corneal topography images of the target eye and perform normalization processing to obtain target input features, which are then input into a pre-trained keratoconus automatic grading model; The target input feature is input into the n-level feature extraction module to further extract features, wherein the processing process in each level of feature extraction module is as follows: The output features of the previous feature extraction module are processed by the batch normalization layer and the ReLU activation function, and then passed through three 3×3 convolutions to obtain the first feature F q , the second feature F k and the third feature F v , respectively find the first feature F q , the second feature F k The average value and the maximum value of the corresponding dimension, and the product of the average values ​​of the two corresponding dimensions and the product of the maximum values ​​of the two corresponding dimensions are added and processed by the sigmoid function to obtain an attention weight matrix, the third feature is multiplied by the attention weight matrix to obtain an attention weight, and the attention weight is added to the output feature of the previous level feature extraction module through 1×1 convolution to obtain the output feature of the current level feature extraction module; The output features of the nth level feature extraction module and the output features of the n-2th level feature extraction module whose dimensions and sizes are consistent with the nth level after 1×1 convolution adjustment are input into the feature fusion module together. The processing process in the feature fusion module is as follows: The importance of the two input features is adjusted through the channel attention mechanism, including: The input features are passed through the maximum pooling layer and the average pooling layer respectively to obtain the maximum pooling features and the average pooling features; The maximum pooling feature and the average pooling feature are respectively passed through two weight-shared 1×1 convolutions and ReLU activation functions, and the obtained results are added together and then passed through a sigmoid activation function to generate a channel attention weight ranging from 0 to 1; The channel attention weight is multiplied by the input feature to adjust its importance; the two calibrated input features are fused according to a preset ratio, and finally a 1×1 convolution is performed to obtain the target output feature; After the target output features are processed by the fully connected layer and the Softmax function, the classification results are obtained.

2. The method for automatic grading of keratoconus according to claim 1, characterized in that: The 3×3 convolution is a 3×3 depthwise separable convolution.

3. The method for automatic grading of keratoconus according to claim 1, characterized in that: The sigmoid function is a Hard-sigmoid function.

4. The automatic grading method for keratoconus according to claim 1, characterized in that: The step of obtaining multiple corneal topography maps of the target eye and performing normalization processing comprises: Get the target eye's inspection report in pdf format; Extracting multiple corneal topography maps from the examination report by parsing the PDF file, the multiple corneal topography maps including a corneal thickness map, an anterior surface tangent map, an anterior surface elevation map, a posterior surface tangent map, and a posterior surface elevation map; The multiple corneal topography maps are downsampled to the same size using a bilinear interpolation method and are normalized.

5. The automatic grading method for keratoconus according to claim 1, characterized in that: The training method of the keratoconus automatic grading model comprises: Obtain corneal topography data of multiple eyes, annotate them, and classify them into normal, mild, moderate, and severe to obtain a training set; The keratoconus automatic grading model is trained using the training set until the loss function converges.

6. The method for automatic grading of keratoconus according to claim 5, characterized in that: The loss function is: Among them, L m represents the CE loss of multi-classification tasks, y i,k Indicates that the true label of the i-th sample is k, there are K label values ​​and N samples in total, p i,k It represents the probability that the i-th sample is predicted to be the k-th label value.

7. An automatic grading device for keratoconus, characterized in that: include: An input module is used to obtain multiple corneal topography maps of the target eye and perform normalization processing to obtain target input features, which are input into a pre-trained keratoconus automatic grading model; The multi-level feature extraction module is used to input the target input feature into the n-level feature extraction module to further extract features, wherein the processing process in each level of feature extraction module is: The output features of the previous feature extraction module are processed by the batch normalization layer and the ReLU activation function, and then passed through three 3×3 convolutions to obtain the first feature F q , the second feature F k and the third feature F v , respectively find the first feature F q , the second feature F k The average value and the maximum value of the corresponding dimension are obtained, and the product of the average values ​​of the two corresponding dimensions and the product of the maximum values ​​of the two corresponding dimensions are added and processed by the sigmoid function to obtain an attention weight matrix, the third feature is multiplied by the attention weight matrix to obtain an attention weight, and the attention weight is added to the output feature of the previous level feature extraction module through 1×1 convolution, Obtain output features of the current-level feature extraction module; A feature fusion module is used to adjust the importance of the output features of the nth level feature extraction module and the output features of the n-2th level feature extraction module whose dimensions and sizes are consistent with the nth level after 1×1 convolution adjustment through the channel attention mechanism, including: passing the input features through the maximum pooling layer and the average pooling layer respectively to obtain the maximum pooling features and the average pooling features; passing the maximum pooling features and the average pooling features through two weight-sharing 1×1 convolutions and ReLU activation functions respectively, adding the obtained results and generating a channel attention weight ranging from 0 to 1 through a sigmoid activation function; multiplying the channel attention weight with the input feature to adjust its importance; fusing the two calibrated features according to a preset ratio, and finally obtaining the target output feature through 1×1 convolution; The automatic classification module is used to obtain the classification results after processing the target output features through the fully connected layer and the Softmax function.

8. An ophthalmic imaging device, characterized in that: It comprises an automatic keratoconus grading device as described in claim 7.

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 method for automatically grading keratoconus as claimed in any one of claims 1 to 6 are implemented.