E2lsh method for classifying ocular corneal diseases based on residual network

By optimizing the residual network and the E2LSH algorithm, the problem of early diagnosis of keratoconus was solved, the classification accuracy and recall were improved, the computational complexity was reduced, and efficient classification of corneal diseases was achieved.

CN116595457BActive Publication Date: 2026-05-15NANYANG INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310759632.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2026-05-15
Estimated Expiration
2043-06-26

AI Technical Summary

Technical Problem

Existing technologies have difficulty in the early diagnosis of keratoconus, especially in the subclinical stage when there are no symptoms and the corrected visual acuity is good. Furthermore, the existing ResNet network has many parameters, high computational complexity, and gradient vanishing problem. The E2LSH algorithm does not consider the data distribution characteristics, resulting in uneven hash buckets.

Method used

An E2LSH corneal disease classification method based on residual networks is adopted. By removing fully connected layers, increasing the number of feature mapping channels, introducing Dropout layers, and combining an improved E2LSH locality-sensitive hashing algorithm, a dynamic hash index is constructed, the bucket width parameter is adjusted, the data distribution balance is optimized, and an improved ReLU layer and softmax classifier are used.

Benefits of technology

It improves the accuracy and recall of the model, reduces computational cost and training time, effectively identifies keratoconus features in eye images, avoids overfitting, and achieves efficient classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116595457B_ABST
    Figure CN116595457B_ABST
Patent Text Reader

Abstract

This invention provides an E2LSH corneal disease classification method based on residual networks, comprising the following steps: S1, loading pre-trained weights and parameters into the convolutional layers of the new model; S2, removing the traditional fully connected layers in the original ResNet residual network and designing new fully connected modules to reduce the depth of the residual network while increasing the number of channels in the feature mapping; S3, introducing Dropout between convolutional layers to effectively prevent overfitting; S4, extracting the output features of the last set of residual blocks as feature descriptors. This invention makes the model more compact by removing unnecessary modules from the conventional ResNet architecture. It also employs variance calculation to construct a dynamic hash index, enabling the selection of appropriate bucket width parameters and dynamic adjustment of the bucket width, resulting in relatively uniform data distribution within each hash bucket and further improving model performance. The improved ResNet-v model maintains a high average recognition rate and recall rate, exhibiting high accuracy and strong robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a classification algorithm, and more particularly to an E2LSH corneal disease classification method based on residual networks, belonging to the technical field of corneal disease classification methods. Background Technology

[0002] As people age, they may develop various eye diseases. Keratoconus is a primary corneal deformity characterized by localized, cone-shaped corneal bulges and highly irregular myopic astigmatism. It is inherited in an autosomal recessive or dominant pattern, often appearing during puberty, and affects both eyes. Pathologically, it presents with Descemet's membrane rupture, corneal cell deformities, and Descemet's membrane rupture. This is a complication of Descemet's membrane rupture, which can be triggered by rubbing the eyes. Previously, the diagnosis of keratoconus relied mainly on routine examinations such as slit-lamp examination. Typical slit-lamp findings include Fleischer's rings and corneal scarring. Diagnosis is relatively easy if these typical clinical symptoms and signs are present. However, early-stage keratoconus (subclinical stage: asymptomatic, good corrected visual acuity, negative clinical examination) is very difficult to diagnose. Despite the many methods proposed, identifying images of keratoconus remains a challenging problem.

[0003] In recent years, with the advancement and development of technology, computer technology has been integrated into people's daily lives. Convolutional neural networks (CNNs), as a branch of artificial intelligence, have been applied in various fields such as image retrieval, face recognition, traffic scene recognition in the transportation field, and image classification in the medical field, due to their ability to extract image features. Among these, the application of deep learning technology to assist doctors in the diagnosis of eye diseases has become a popular research direction. The existing ResNet residual network uses the ReLU function as the activation function to integrate local information with class discrimination in the convolutional or pooling layers. The last fully connected output layer uses the linear classifier softmax for logistic regression classification. Although this has changed the degradation problem and gradient vanishing problem that occurs when the number of layers in the traditional convolutional neural network increases, it still has problems such as many parameters, high complexity, and weak expressive power in the convolutional stage. Moreover, the fully connected layer has high computational cost, the ReLU function is not suitable for large gradient inputs during training, and after the parameters are updated, the ReLU neurons will no longer have the function of activation, resulting in the gradient always being zero. Furthermore, softmax classification cannot distinguish the extracted features well, which can cause model overfitting and even lead to intra-class distance being greater than inter-class distance. On the other hand, the E2LSH algorithm uses multiple hash tables to improve recall. However, this algorithm does not consider the distribution characteristics of the data. Because the hash function is randomly generated based on a p-steady-state distribution, the data in the dataset is generally not uniformly distributed. The data in each hash bucket of the hash table is affected by the original data distribution, resulting in some hash buckets having concentrated data while others have only a few data points. To address this, an E2LSH corneal disease classification method based on residual networks is proposed. Summary of the Invention

[0004] In view of this, the present invention provides a method for classifying E2LSH corneal diseases based on residual networks, in order to solve or alleviate the technical problems existing in the prior art, and at least provide a beneficial alternative.

[0005] The technical solution of this invention is implemented as follows: A method for classifying E2LSH corneal diseases based on residual networks, comprising the following steps:

[0006] S1. Load the pre-trained weights and parameters into the convolutional layers of the new model;

[0007] S2. Remove the traditional fully connected layers in the original ResNet residual network and design a new fully connected module to reduce the depth of the residual network while increasing the number of channels in the feature map;

[0008] S3. Introducing Dropout between convolutional layers effectively prevents overfitting;

[0009] S4. The output features of the last set of residual blocks are extracted as feature descriptors and combined with the improved E2LSH locality-sensitive hashing algorithm to replace the combination of ReLU layer and softmax classifier in the standard residual function.

[0010] S5. Calculate the variance matrix of the extracted feature descriptors to obtain the feature vector, construct a dynamic hash index, select an appropriate bucket width parameter to dynamically adjust the size of the bucket, improve the balance of data distribution in each hash bucket, and the classifier calculates the probability of each category based on this vector.

[0011] S6. Connect the average pooling layer to obtain the classification output.

[0012] Further preferred: In S1, the model input image is 224×224×3. By setting the input to three layers of 3×3 convolutional kernels, a feature map with a receptivity of 5 can be obtained. Using small convolutional kernels can effectively reduce the number of parameters, making training and testing more efficient.

[0013] Further preferred embodiment: In S1, the output channel size of the first and second 3×3 convolutional layers in the three-layer convolutional kernel is 32, the stride size is 2, and the output channel size of the third convolutional layer is 64. This significantly reduces the computational cost of the classification network while ensuring consistency with the previously output backbone information, and also reduces the computational load of the network model.

[0014] Further preferred: In S2, the fully connected module is divided into 5 modules, and each ResNet module has five sets of convolutions.

[0015] A further preferred embodiment is that, in S3, a Dropout layer with a P value of 0.5 is introduced between the convolutional layers.

[0016] Further preferred embodiment: In S4, since the fully connected layer requires a large amount of computation, it is modified. The output features of the last set of residual blocks are extracted as feature descriptors. Combined with the improved E2LSH locality-sensitive hashing algorithm, the combination of ReLU layer and softmax classifier in the standard residual function is replaced. Using pooling layers and downsampling in the residual network reduces the spatial resolution of the feature map, causing the loss of many details and affecting the accuracy of the model in classifying images. In order to alleviate the gradient vanishing problem in the residual, the output features of the last set of residual blocks are extracted as feature descriptors. Combined with the improved E2LSH locality-sensitive hashing algorithm, the combination of ReLU layer and softmax classifier in the standard residual function is replaced. The variance matrix corresponding to the extracted feature descriptors is calculated to obtain the feature vector. A dynamic hash index is constructed, and an appropriate bucket width parameter is selected to dynamically adjust the size of the bucket, thereby improving the balance of data distribution in each hash bucket. The classifier calculates the probability of each category based on this vector.

[0017] A further preferred embodiment: In step S5, when calculating the variance of each data point, let be the proportion of the data in the set, then:

[0018]

[0019] When calculating the variance of each data point, let the mean eigenvalue be , then we have:

[0020] .

[0021] A further preferred embodiment: In S5, the within-class variance is denoted as:

[0022]

[0023] The optimal variance value is defined as the value corresponding to the maximum variance. Value, that is:

[0024]

[0025] The eigenvalues ​​of the variance matrix are sorted, and the corresponding eigenvectors are obtained. These eigenvectors reflect the density of the data.

[0026] A further preferred embodiment: In S5, the hash function in E2LSH is randomly generated based on a p-steady-state distribution. The data in the hash buckets varies with the data distribution, resulting in some hash buckets having concentrated data while others have only a few data points. Therefore, the improved hash function is:

[0027]

[0028] in The dynamic hash index is constructed by using eigenvectors obtained from the corresponding variance matrix. By selecting appropriate bucket width parameters, the size of the bucket can be dynamically adjusted to improve the balance of data distribution in each hash bucket.

[0029] A further preferred embodiment: In step S5, when performing a hash operation on the data and mapping it to a hash bucket, it is necessary to select... Several hash functions are used to form a complete data hash map, as follows:

[0030]

[0031] in, This represents the data dimension after dimensionality reduction. This represents a function within the hash function family. The original data is processed through the function. The mapping is reduced to The result obtained is It uses a combination of arrays and linked lists for hierarchical structure, and indexes the hashes by using buckets to build a hierarchy, connecting them to the average pooling layer to obtain the classified output.

[0032] The embodiments of the present invention have the following advantages due to the adoption of the above technical solutions:

[0033] This invention makes the model more compact by removing unnecessary modules from the conventional ResNet architecture. It also employs variance calculation to construct a dynamic hash index, allowing for the selection of appropriate bucket width parameters and dynamic adjustment of bucket size. This ensures relatively uniform data distribution within each hash bucket, further improving model performance. The improved ResNet-v model maintains a high average recognition rate and recall rate, exhibiting high accuracy and robustness. The training time is short, and it can correctly classify eye images containing keratoconus features.

[0034] The above overview is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments, and features described above, further aspects, embodiments, and features of the invention will become readily apparent from the accompanying drawings and the following detailed description. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1This is a flowchart of the algorithm of the present invention. Detailed Implementation

[0037] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0038] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0039] like Figure 1 As shown, this embodiment of the invention provides a method for classifying E2LSH corneal diseases based on residual networks, including the following steps:

[0040] S1. Load the pre-trained weights and parameters into the convolutional layers of the new model;

[0041] S2. Remove the traditional fully connected layers in the original ResNet residual network and design a new fully connected module to reduce the depth of the residual network while increasing the number of channels in the feature map;

[0042] S3. Introducing Dropout between convolutional layers effectively prevents overfitting;

[0043] S4. The output features of the last set of residual blocks are extracted as feature descriptors and combined with the improved E2LSH locality-sensitive hashing algorithm to replace the combination of ReLU layer and softmax classifier in the standard residual function.

[0044] S5. Calculate the variance matrix of the extracted feature descriptors to obtain the feature vector, construct a dynamic hash index, select an appropriate bucket width parameter to dynamically adjust the size of the bucket, improve the balance of data distribution in each hash bucket, and the classifier calculates the probability of each category based on this vector.

[0045] S6. Connect the average pooling layer to obtain the classification output.

[0046] In this embodiment, specifically: in S1, the model input image is 224×224×3. By setting the input to three layers of 3×3 convolution kernels, a feature map with a receptivity of 5 can be obtained. Using small convolution kernels can effectively reduce the number of parameters, making training and testing more efficient.

[0047] In this embodiment, specifically: in S1, the output channel size of the first and second 3×3 convolutional layers in the three-layer convolutional kernel is 32, the stride size is 2, and the output channel size of the third convolutional layer is 64. While ensuring consistency with the previously output backbone information, the computational cost of the classification network is greatly reduced, and the computational load of the network model is also reduced.

[0048] In this embodiment, specifically: in S2, the fully connected module is divided into 5 modules, and each ResNet module has five sets of convolutions.

[0049] In this embodiment, specifically: in S3, a Dropout layer with a P value of 0.5 is introduced between the convolutional layers.

[0050] In this embodiment, specifically: in S4, because the fully connected layer requires a lot of computation, the fully connected layer is modified so that the output features of the last set of residual blocks are extracted as feature descriptors, and combined with the improved E2LSH locality-sensitive hashing algorithm, the combination of ReLU layer and softmax classifier in the standard residual function is replaced.

[0051] In this embodiment, specifically: In S5, when calculating the variance of each data point, let the proportion of the data in the set be denoted as , then:

[0052]

[0053] When calculating the variance of each data point, let the mean eigenvalue be , then we have:

[0054] .

[0055] In this embodiment, specifically: in S5, the within-class variance is denoted as:

[0056]

[0057] The optimal variance value is defined as the value corresponding to the maximum variance. Value, that is:

[0058]

[0059] The eigenvalues ​​of the variance matrix are sorted, and the corresponding eigenvectors are obtained. These eigenvectors reflect the density of the data.

[0060] In this embodiment, specifically: In S5, the hash function in E2LSH is randomly generated based on a p-steady-state distribution. The data in the hash buckets changes with the data distribution, resulting in some hash buckets having concentrated data while others have only a few data points. Therefore, the improved hash function is:

[0061]

[0062] in The dynamic hash index is constructed by using eigenvectors obtained from the corresponding variance matrix. By selecting appropriate bucket width parameters, the size of the bucket can be dynamically adjusted to improve the balance of data distribution in each hash bucket.

[0063] In this embodiment, specifically: in S5, when data is hashed and mapped to a hash bucket, it is necessary to select... Several hash functions are used to form a complete data hash map, as follows:

[0064]

[0065] in, This represents the data dimension after dimensionality reduction. This represents a function within the hash function family. The original data is processed through the function. The mapping is reduced to The result obtained is It uses a combination of arrays and linked lists for hierarchical structure, and indexes the hashes by using buckets to build a hierarchy, connecting them to the average pooling layer to obtain the classified output.

[0066] In operation, this invention employs a novel residual network model based on ResNet-50 for feature extraction. Pre-trained weights and parameters are loaded into the convolutional layers of this new model. An improved E2LSH (Local Sensitive Hashing) algorithm is used to calculate the corresponding variance matrix, obtaining the feature vector. A dynamic hash index is constructed, and an appropriate bucket width parameter is selected to dynamically adjust the bucket size. Finally, a classifier calculates the probability of each class based on this vector. The results show that the loss is effectively reduced, and after 50 epochs of training, the accuracy on the validation set reaches approximately 97%. Therefore, this algorithm effectively increases the accuracy of classification results, avoids overfitting, has a short training time, and can correctly classify eye images containing keratoconus features.

[0067] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various variations or substitutions within the technical scope disclosed in the present invention, and these should all be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for classifying E2LSH corneal diseases based on residual networks, characterized in that, Includes the following steps: S1. Load the pre-trained weights and parameters into the convolutional layers of the new model; S2. Remove the traditional fully connected layers in the original ResNet residual network and design a new fully connected module to reduce the depth of the residual network while increasing the number of channels in the feature map; S3. Introducing Dropout between convolutional layers effectively prevents overfitting; S4. The output features of the last set of residual blocks are extracted as feature descriptors and combined with the improved E2LSH locality-sensitive hashing algorithm to replace the combination of ReLU layer and softmax classifier in the standard residual function. S5. Calculate the variance matrix of the extracted feature descriptors to obtain the feature vector, construct a dynamic hash index, select an appropriate bucket width parameter to dynamically adjust the size of the bucket, improve the balance of data distribution in each hash bucket, and the classifier calculates the probability of each category based on this vector. S6. Connect the average pooling layer to obtain the classified output; In step S5, the hash function in E2LSH is randomly generated based on a p-steady-state distribution. The data in the hash buckets varies with the data distribution, leading to a situation where some hash buckets contain concentrated data, while others contain only a few data points. Therefore, the improved hash function is: ; in, The dynamic hash index is constructed by the eigenvectors obtained from the corresponding variance matrix. By selecting an appropriate bucket width parameter, the size of the bucket width can be dynamically adjusted to improve the balance of data distribution in each hash bucket. In step S5, when data is hashed and mapped to a hash bucket, it is necessary to select... Several hash functions are used to form a complete data hash map, as follows: ; in, This represents the data dimension after dimensionality reduction. This represents a function within a hash function family, where the original data is processed by the function. The mapping is reduced to The result obtained is It uses a combination of arrays and linked lists for hierarchical structure, and indexes the hashes by using buckets to build a hierarchy, connecting them to the average pooling layer to obtain the classified output.

2. The E2LSH corneal disease classification method based on residual networks according to claim 1, characterized in that: In S1, the model input image is 224×224×3. By setting the input to three 3×3 convolutional kernels, a feature map with a receptivity of 5 can be obtained.

3. The E2LSH corneal disease classification method based on residual networks according to claim 2, characterized in that: In S1, the output channel size of the first and second 3×3 convolutional layers in the three convolutional kernels is 32, the stride size is 2, and the output channel size of the third convolutional layer is 64.

4. The E2LSH corneal disease classification method based on residual networks according to claim 1, characterized in that: In S2, the fully connected module is divided into 5 modules, and each ResNet module has five sets of convolutions.

5. The E2LSH corneal disease classification method based on residual networks according to claim 1, characterized in that: In S3, a Dropout layer with a P value of 0.5 is introduced between the convolutional layers.

6. The E2LSH corneal disease classification method based on residual networks according to claim 1, characterized in that: In S4, because the fully connected layer requires a lot of computation, the fully connected layer is modified so that the output features of the last set of residual blocks are extracted as feature descriptors and combined with the improved E2LSH locality-sensitive hashing algorithm to replace the combination of ReLU layer and softmax classifier in the standard residual function.

7. The E2LSH corneal disease classification method based on residual networks according to claim 6, characterized in that: In S5, when calculating the variance of each data point, let be the proportion of the data point to the corresponding set, then: ; When calculating the variance of each data point, let the mean eigenvalue be... , Then we have: 。 8. The E2LSH corneal disease classification method based on residual networks according to claim 7, characterized in that: In S5, the within-class variance is denoted as: ; The optimal variance value is defined as the value corresponding to the maximum variance. Value, that is: ; The eigenvalues ​​of the variance matrix are sorted, and the corresponding eigenvectors are: , This feature vector reflects the density of the data.