A cataract diagnosis method, device, medium and equipment

CN118298241BActive Publication Date: 2026-10-20NANJING UNIV OF INFORMATION SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410491199.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-23
Publication Date
2026-10-20
Estimated Expiration
2044-04-23

AI Technical Summary

Technical Problem

然而,以2021年Weni等人提出的一种基于CNN的白内障检测方法为例,该模型存在由于CNN层数较多导致的计算成本较高的问题;同时,参数量较大导致模型复杂度高,核的尺寸较大可能使得模型对计算资源的需求较高

Benefits of technology

[0061]1.本发明提供的白内障诊断方法,采用多个图像预处理方法进行图像增强,对数据集进行了扩展,使得样本更加丰富;对传统的CNN模型进行修改,设计了一个自定义的CNN模型,降低计算成本,使其更易于实际应用;使用集成学习方法,结合三种分类器(KNN,NB和DT)的预测结果,使得诊断更准确;使用了加权投票的技术方案,对三个分类器结果进行加权,如果该分类器对特定类别表现出卓越的准确性,那么与其他分类器相比,它将被赋予更高的权重;相反,如果分类器表现不佳,则会分配较低的权重;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118298241B_ABST
    Figure CN118298241B_ABST
Patent Text Reader

Abstract

The application discloses the technical field of image classification and relates to a cataract diagnosis method, device, medium and equipment, and aims to solve the problem of high calculation cost in the prior art. The method comprises the following steps: obtaining a fundus image and performing cropping to obtain a cropped image; performing image preprocessing on the cropped image to obtain a processed image set; performing feature extraction on the processed image set based on a pre-trained convolutional neural network (CNN) model to obtain a feature vector of the image; performing cataract diagnosis based on a pre-trained ensemble learning classifier according to the feature vector, and combining weighted voting to obtain a cataract severity level. The application adopts multiple image preprocessing methods to perform image enhancement, modifies a traditional CNN model, and uses an ensemble learning method to combine the prediction results of three classifiers, thereby reducing the calculation cost, making the method more suitable for practical application, and making the diagnosis more accurate, which has practical significance and good application prospect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image classification technology, and in particular to a method, apparatus, medium and device for cataract diagnosis. Background Technology

[0002] Cataracts are a progressive eye disease that can lead to blindness if not detected early, currently affecting approximately 314 million people. Retinal fundus image analysis is the most widely used method in cataract diagnosis, and in recent years, researchers have proposed various methods for cataract detection and grading based on fundus images. Due to the increasing number of cataract patients, ophthalmologists are in high demand. To alleviate the workload of ophthalmologists and further improve the accuracy and efficiency of cataract detection, the scientific community has begun to research and develop computer-aided diagnostic methods. With the development of deep learning, deep learning-based cataract detection and grading methods have achieved significant results.

[0003] Deep learning-based cataract detection and grading algorithms have achieved significant results through supervised training on large datasets, with transfer learning of different CNN models yielding excellent accuracy and cataract classification outcomes. However, taking a CNN-based cataract detection method proposed by Weni et al. in 2021 as an example, this model suffers from high computational costs due to the large number of CNN layers; simultaneously, the large number of parameters leads to high model complexity, and the large kernel size may result in high computational resource requirements. These factors limit the application environment of early cataract detection algorithms, such as in rural areas with limited medical facilities. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art and provide a cataract diagnosis method, device, medium and equipment that reduces computing costs and makes the diagnosis more accurate, which has practical significance and good application prospects.

[0005] To solve the above-mentioned technical problems, the present invention is implemented using the following technical solution:

[0006] On one hand, the present invention provides a method for diagnosing cataracts, comprising:

[0007] Acquire fundus images and crop them to obtain cropped images;

[0008] The cropped image is preprocessed to obtain a set of processed images;

[0009] Based on the processed image set, feature extraction is performed using a pre-trained CNN model to obtain feature vectors;

[0010] Based on the feature vector, a cataract diagnosis is performed using a pre-trained ensemble learning classifier, and the severity level of the cataract is obtained by combining weighted voting.

[0011] The training of the CNN model includes:

[0012] Build an initial dataset and perform image cropping and preprocessing to obtain a training dataset;

[0013] Construct a CNN model, and train the CNN model using the training dataset to obtain a trained fusion object detection model;

[0014] The training of the ensemble learning classifier includes:

[0015] Based on the training dataset and a pre-trained CNN model, feature extraction is performed to obtain a set of feature vectors.

[0016] An ensemble learning classifier is constructed, trained using the aforementioned feature vector set, and optimized using weighted voting to obtain a well-trained ensemble learning classifier.

[0017] Optionally, the cropped image can be preprocessed using Min-pooling to obtain the Min-pooled processed image, specifically achieved through formula (1):

[0018] I C =αI+βG(σ)*I+γ (1)

[0019] Among them, I C The image after min-pooling is represented by α, which represents the preset parameter used to control the overall intensity of the original image, I represents the cropped image, β represents the preset parameter used to control the influence of the min-pooling filter on the image, G(σ) represents the Gaussian filter with a standard deviation of σ, * represents the convolution operation, and γ represents the preset parameter used to control the overall brightness shift and contrast of the output image.

[0020] The cropped image is decomposed into three channels: red (R), green (G), and blue (B) using RGB-CLAHE. The CLAHE algorithm is then applied to these three channels, and the three channels are recombined to obtain the RGB-CLAHE processed image.

[0021] The cropped image is converted from RGB color space to Lab color space using Lab-CLAHE, and the CLAHE algorithm is applied to the L channel. Then, the processed Lab color space is converted back to RGB color space to obtain the Lab-CLAHE processed image. This is specifically achieved through formula (2):

[0022] RGB processed =Lab2RGB(CLAHE(RGB2Lab(I))) (2)

[0023] Among them, RGB processed This represents the image after Lab-CLAHE processing. Lab2RGB represents the conversion function from Lab to RGB color space. CLAHE represents the contrast-limited adaptive histogram equalization function. RGB2Lab represents the conversion function from RGB to Lab color space. I represents cropping the image.

[0024] The MaxGreenGsc-CLAHE algorithm is applied to each channel of the cropped image to obtain the MaxGreenGsc-CLAHE processed image, specifically through formula (3):

[0025] MaxGreenGsc-CLAHE r,s

[0026] =(CLAHE Gray (Gray r,s ), CLAHE Grenn (Green r,s ), CLAHE MaxPixel (MaxPixelImageChanel r,s (3)

[0027] Among them, MaxGreenGsc-CLAHE r,s This represents the pixel value in the r-th row and s-th column of the image after MaxGreenGsc-CLAHE processing, where CLAHE... Gray CLAHE Green and CLAHE MaxPixel These represent applying the CLAHE function to the grayscale channel, green channel, and maximum pixel image channel, respectively. r,s Green r,s and MaxPixelImageChannel r,s These represent the pixel values ​​in the r-th row and s-th column of the grayscale channel, green channel, and maximum pixel image channel, respectively.

[0028] The images processed by Min-pooling, RGB-CLAHE, Lab-CLAHE, and MaxGreenGsc-CLAHE are combined to obtain a set of processed images.

[0029] Optionally, the pre-trained CNN model includes six sets of convolutional layers, one set of max pooling layers, three sets of fully connected layers, one set of dropout layers, and one set of classification layers; wherein the six sets of convolutional layers and the set of max pooling layers together form a joint layer.

[0030] Optionally, the feature extraction to obtain the feature vector is achieved through the following steps:

[0031] Remove the last three layers of the pre-trained CNN model, including a set of fully connected layers, a set of dropout layers, and a set of classification layers, to obtain the processed CNN model;

[0032] The processed image set is input into the processed CNN model to generate feature vectors, the expression of which is shown in formula (4):

[0033] Feature Vector = H(ε) (4)

[0034] Where Feature Vector represents the feature vector generated by the processed CNN model, H (ε) ε represents the output of the processed CNN model, and ε represents the number of layers in the pre-trained CNN model after removing the last three layers.

[0035] Optionally, the ensemble learning classifier includes three classifiers: K-Nearest Neighbors (KNN), Naive Bayes (NB), and Decision Tree (DT).

[0036] The K-nearest neighbor (KNN) distance metric is shown in formula (5):

[0037]

[0038] Where d(X, Y) represents the Euclidean distance, X = (x1, x2, ..., x... n ) represents the input feature vector, x1, x2, ..., x3. n Let Y = (y1, y2, ..., yn) be the 1st, 2nd, ..., nth feature in the input feature vector. n Let y1, y2, ..., y3 represent the feature vectors of other known samples in the sample set. n This represents the 1st, 2nd, ..., nth feature in the feature vector of other known samples in the sample set, where n represents the number of features in the feature vector.

[0039] The expression for Naive Bayes (NB) is shown in formula (6):

[0040]

[0041] Among them, h nb(X) represents the Naive Bayes classifier for the input feature vector X, arg max represents the parameter value that maximizes the function, c represents the class in the set of all classes θ, P(c) represents the prior probability of c, n represents the number of features in the feature vector, and x i P(x) represents the i-th feature in the input feature vector. i |c) represents x i The conditional probability relative to c;

[0042] The expression for the decision tree DT is shown in formula (7):

[0043] Decision Rule: if x i ≤threshold

[0044] then Class = Left Child

[0045] else Class = Right Child (7)

[0046] Wherein, Decision Rule represents the decision tree classifier for the input feature vector X, x i Let x represent the i-th feature in the input feature vector, threshold represent the threshold of the decision tree node, and Class represent the value of x. i The decision result is given by LeftChild, which represents the left child node of the decision tree, and RightChild, which represents the right child node of the decision tree.

[0047] Optionally, the combination of weighted voting to obtain the cataract severity level includes:

[0048] Obtain the output results of three classifiers: K-Nearest Neighbors (KNN), Naive Bayes (NB), and Decision Tree (DT).

[0049] The outputs of the three classifiers are evaluated using a weighted voting method to obtain the severity level of cataracts.

[0050] In a second aspect, the present invention provides a cataract diagnostic device, comprising:

[0051] Image cropping module: Used to crop the acquired fundus image to obtain the cropped image;

[0052] The image preprocessing module is used to: perform image preprocessing on the cropped image to obtain a set of processed images;

[0053] The feature extraction module is used to: extract features based on the processed image set and a pre-trained CNN model to obtain feature vectors;

[0054] The cataract diagnosis module is used to: diagnose cataracts based on the feature vector and a pre-trained ensemble learning classifier, and obtain the severity level of cataracts by combining weighted voting.

[0055] Thirdly, the present invention provides a computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of any of the cataract diagnosis methods described in the first aspect.

[0056] Fourthly, the present invention provides a computer device / equipment / system, comprising:

[0057] Memory, used to store computer programs / instructions;

[0058] A processor for executing the computer program / instructions to implement the steps of the cataract diagnosis method described in any one of the first aspects.

[0059] Fifthly, the present invention provides a computer program product, including a computer program / instructions, characterized in that, when the computer program / instructions are executed by a processor, they implement the steps of the cataract diagnosis method described in any one of the first aspects.

[0060] Compared with existing technologies, the beneficial effects achieved by this invention are as follows:

[0061] 1. The cataract diagnosis method provided by this invention employs multiple image preprocessing methods for image enhancement and expands the dataset to enrich the sample; it modifies the traditional CNN model and designs a custom CNN model to reduce computational costs and make it easier to apply in practice; it uses an ensemble learning method to combine the prediction results of three classifiers (KNN, NB, and DT) to make the diagnosis more accurate; and it uses a weighted voting technique to weight the results of the three classifiers. If a classifier shows excellent accuracy for a specific category, it will be given a higher weight compared to other classifiers; conversely, if a classifier performs poorly, it will be assigned a lower weight.

[0062] 2. The cataract diagnosis device provided by the present invention, by setting up an image cropping module, an image preprocessing module, a feature extraction module and a cataract diagnosis module, jointly realizes cataract diagnosis, reduces computing costs, improves the accuracy of diagnosis, and has practical significance and good application prospects.

[0063] 3. The computer-readable storage medium, computer device / equipment / system, and computer program product provided by the present invention can execute the steps of the cataract diagnosis method provided by the present invention. Attached Figure Description

[0064] Figure 1This is a flowchart of a cataract diagnosis method according to an embodiment of the present invention. Detailed Implementation

[0065] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments and specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations thereof. In the absence of conflict, the embodiments and technical features in the embodiments can be combined with each other.

[0066] It should be noted that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0067] This invention proposes a cataract diagnosis method, device, medium, and equipment. It employs multiple image preprocessing methods to enhance the target image, expands the dataset to enrich the sample, and modifies the traditional CNN model by reducing the number of layers and lowering computational costs. Furthermore, it utilizes an ensemble learning method, combining the prediction results of three classifiers: K-Nearest Neighbors (KNN), Naive Bayes (NB), and Decision Tree (DT), resulting in more accurate diagnostic results. This invention has practical significance and promising application prospects.

[0068] Example 1:

[0069] This invention discloses a method for diagnosing cataracts, with reference to... Figure 1 As shown, the specific steps include the following:

[0070] S1, acquire the fundus image and crop it to obtain the cropped image;

[0071] S2, perform image preprocessing on the cropped image to obtain a processed image set;

[0072] S3, Based on the processed image set, feature extraction is performed using a pre-trained CNN model to obtain feature vectors;

[0073] S4. Based on the feature vector, perform cataract diagnosis using a pre-trained ensemble learning classifier, and combine weighted voting to obtain the severity level of the cataract.

[0074] Specifically,

[0075] In step S1, an adaptive method is used to automatically crop the black borders from the acquired fundus images, and all fundus images are adjusted to the same resolution of 400×400 pixels.

[0076] In step S2, this embodiment uses four different preprocessing methods—Min-pooling, RGB-CLAHE, Lab-CLAHE, and MaxGreenGsc-CLAHE—to preprocess the cropped image; specifically, it includes:

[0077] S2.1, Min-pooling is used to preprocess the cropped image to obtain the Min-pooling processed image, specifically implemented by formula (1):

[0078] I C =αI+βG(σ)*I+γ (1)

[0079] Among them, I C The image after min-pooling is represented by α, which represents the preset parameter used to control the overall intensity of the original image, I represents the cropped image, β represents the preset parameter used to control the influence of the min-pooling filter on the image, G(σ) represents the Gaussian filter with a standard deviation of σ, * represents the convolution operation, and γ represents the preset parameter used to control the overall brightness shift and contrast of the output image.

[0080] S2.2, use RGB-CLAHE to decompose the cropped image into three channels: red (R), green (G), and blue (B). Apply the CLAHE algorithm to the three channels to achieve contrast-limited adaptive histogram equalization. Then recombine the three channels to obtain the RGB-CLAHE processed image.

[0081] S2.3, use Lab-CLAHE to convert the cropped image from RGB color space to Lab color space, and apply the CLAHE algorithm to the L channel to achieve contrast-limited adaptive histogram equalization. Then convert the processed Lab color space back to RGB color space to obtain the Lab-CLAHE processed image, specifically implemented by formula (2):

[0082] RGB processed =Lab2RGB(CLAHE(RGB2Lab(I))) (2)

[0083] Among them, RGB processed This represents the image after Lab-CLAHE processing. Lab2RGB represents the conversion function from Lab to RGB color space. CLAHE represents the contrast-limited adaptive histogram equalization function. RGB2Lab represents the conversion function from RGB to Lab color space. I represents cropping the image.

[0084] S2.4, Apply the CLAHE algorithm to each channel (grayscale channel, green channel, and maximum pixel image channel) of the cropped image using MaxGreenGsc-CLAHE to obtain the MaxGreenGsc-CLAHE processed image, specifically implemented through formula (3):

[0085] MaxGreenGsc-CLAHE r,s

[0086] =(CLAHE Gray (Gray r,s ), CLAHE Green (Green r,s ), CLAHE MaxPixel (MaxPixelImageChannel r,s (3)

[0087] Among them, MaxGreenGsc-CLAHE r,s This represents the pixel value in the r-th row and s-th column of the image after MaxGreenGsc-CLAHE processing, where CLAHE... Gray CLAHE Green and CLAHE MaxPixel These represent applying the CLAHE function to the grayscale channel, green channel, and maximum pixel image channel, respectively. r,s Green r,s and MaxPixelImageChannel r,s These represent the pixel values ​​in the r-th row and s-th column of the grayscale channel, green channel, and maximum pixel image channel, respectively.

[0088] S2.5, the images processed by Min-pooling, RGB-CLAHE, Lab-CLAHE, and MaxGreenGsc-CLAHE are combined to obtain a set of processed images.

[0089] In step S3, the pre-trained CNN model includes six convolutional layers, one max-pooling layer, three fully connected layers, one dropout layer, and one classification layer; wherein the six convolutional layers and the max-pooling layer together form a joint layer; the training of the CNN model includes:

[0090] Build an initial dataset and perform image cropping and preprocessing to obtain a training dataset;

[0091] Construct a CNN model and train it using the training dataset to obtain a trained fusion object detection model.

[0092] Specifically, the training dataset is first input into the CNN model, passing through a joint layer consisting of six convolutional layers and max pooling layers. Then, the output feature vector is sent to three fully connected layers, one dropout layer, and one classification layer for classification.

[0093] The six convolutional layers used 32, 64, 64, 128, 128, and 256 filters, respectively, with a filter size of 3×3. The convolutional layers are responsible for extracting low-level and high-level features from the fundus image using linear filters, including shapes such as edges, curves, points, corners, squares, and circles. The output formula of the 3×3 convolutional filter is as follows:

[0094]

[0095] Where f(l, m, z) represents the output value of the convolutional filter, l, m and z represent the indices of different feature maps, o(l, u, v, w) represents the weight, t(u, v, w) represents the image intensity value, and b(l) represents the bias of the convolutional layer.

[0096] The max pooling layer reduces the dimensionality of the activation map through subsampling, uses a set of nonlinear filters to sort the pixel values ​​within a specified region of the input image, and selects the pixel with the largest absolute value as the result; the formula for the 2×2 grid max pooling layer is as follows:

[0097]

[0098] Where g(l, m+1, z+1) represents the maximum pixel value of four adjacent points in the activation map, and l, m, and z represent the indices of different feature maps.

[0099] The fully connected layer consists of neurons connected to neurons in the previous layer. This layer represents an activation map. The main function of the fully connected layer is to generate a simplified representation of the entire input image. The Softmax layer is used in the final classification layer to generate the probability distribution for the four stages of cataracts, as shown in the following formula:

[0100]

[0101] Among them, Ψ λ Indicates Φ λ The corresponding Softmax value, Φ λ λ represents the λth output of the last fully connected layer, and N represents the number of output categories.

[0102] The feature extraction process, which yields the feature vector, involves the following steps:

[0103] Remove the last three layers of the pre-trained CNN model, including a set of fully connected layers, a set of dropout layers, and a set of classification layers, to obtain the processed CNN model;

[0104] The processed image set is input into the processed CNN model to generate feature vectors, the expression of which is shown in formula (4):

[0105] Feature Vector = H (ε) (4)

[0106] Where Feature Vector represents the feature vector generated by the processed CNN model, H (ε) ε represents the output of the processed CNN model, and ε represents the number of layers in the pre-trained CNN model after removing the last three layers.

[0107] In step S4, the ensemble learning classifier includes three classifiers: K-Nearest Neighbors (KNN), Naive Bayes (NB), and Decision Tree (DT); the training of the ensemble learning classifier includes:

[0108] Based on the training dataset and a pre-trained CNN model, feature extraction is performed to obtain a set of feature vectors.

[0109] An ensemble learning classifier is constructed and trained using the aforementioned feature vector set. A loss function is used when training each base learner. During the ensemble learning process, the loss of each base learner and the overall performance are considered comprehensively, and the loss is continuously optimized. The ensemble learning classifier is further optimized by combining weighted voting to obtain a well-trained ensemble learning classifier.

[0110] Specifically, the feature vector set is divided into a training set and a validation set. Using the training set, three different classifiers—K-Nearest Neighbors (KNN), Naive Bayes (NB), and Decision Tree (DT)—are trained respectively. Then, predictions are made on the validation set to obtain the prediction results of KNN, NB, and DT. The loss is optimized using a loss function, and then combined with a weighted voting scheme (WVS), the KNN, NB, and DT are optimized based on the prediction results. If the set number of training iterations is not met, the training process of the ensemble learning classifier is repeated. After each iteration, the cataract severity level of each fundus image is determined using the weighted voting scheme until the set number of training iterations is met.

[0111] The cross-entropy loss function is a commonly used loss function to measure the difference between two probability distributions, and it is often used in model training for multi-class classification problems. The expression of the loss function used in this embodiment is as follows:

[0112]

[0113] Where cce represents the cross-entropy loss function for N classification problems, N represents the number of output classes, and q j This represents the actual probability that the j-th output belongs to a specific class.

[0114] This embodiment uses a weighted voting scheme (WVS) to comprehensively consider the predictions of K-nearest neighbors (KNN), Naive Bayes (NB), and decision tree (DT) classifiers to determine the cataract severity level of each fundus image, ensuring the robustness of the model under multiple preprocessing methods.

[0115] K-Nearest Neighbors (KNN) is a distance-based classifier that finds the K nearest neighbors by measuring the distance between a new sample and each sample in the training set, and then classifies the sample based on the category of these neighbors. In the KNN algorithm, the classification result is affected by the number of neighbors and the distance metric. The distance metric for KNN is shown in formula (5).

[0116]

[0117] Where d(X, Y) represents the Euclidean distance, X = (x1, x2, ..., x... n ) represents the input feature vector, x1, x2, ..., x n Y represents the 1st, 2nd, ..., nth feature in the input feature vector, where Y = (y1, y2, ..., yn). n Let y1, y2, ..., y2 be the feature vectors of other known samples in the sample set. n This represents the 1st, 2nd, ..., nth feature in the feature vector of other known samples in the sample set, where n represents the number of features in the feature vector.

[0118] Naive Bayes (NB) is a classifier based on Bayes' theorem. It uses prior probability and conditional probability to build a classification model. The basic assumption of this algorithm is that all features are independent of each other, so the conditional probability can be simplified to the probability of a single feature. By learning the relationship between features and categories in the dataset, Naive Bayes can classify new samples. In this embodiment, the expression of Naive Bayes (NB) is shown in formula (6):

[0119] The expression for Naive Bayes (NB) is shown in formula (6):

[0120]

[0121] Among them, h nb(X) represents the Naive Bayes classifier for the input feature vector X, arg max represents the parameter value that maximizes the function, c represents the class in the set of all classes θ, P(c) represents the prior probability of c, n represents the number of features in the feature vector, and x i P(x) represents the i-th feature in the input feature vector. i |c) represents x i The conditional probability relative to c.

[0122] Decision tree DT recursively divides the dataset into different subsets, eventually forming a tree structure. The expression for decision tree DT is shown in formula (7):

[0123] Decision Rule: if x i ≤threshold

[0124] then Class = Left Child

[0125] else Class = Right Child (7)

[0126] Wherein, Decision Rule represents the decision tree classifier for the input feature vector X, x i Let x represent the i-th feature in the input feature vector, threshold represent the threshold of the decision tree node, and Class represent the value of x. i The decision result is given by LeftChild, which represents the left child node of the decision tree, and RightChild, which represents the right child node of the decision tree.

[0127] Example 2:

[0128] Based on the same inventive concept as Embodiment 1, this embodiment of the invention discloses a cataract diagnostic device, specifically comprising:

[0129] Image cropping module: Used to crop the acquired fundus image to obtain the cropped image;

[0130] The image preprocessing module is used to: perform image preprocessing on the cropped image to obtain a set of processed images;

[0131] The feature extraction module is used to: extract features based on the processed image set and a pre-trained CNN model to obtain feature vectors;

[0132] The cataract diagnosis module is used to: diagnose cataracts based on the feature vector and a pre-trained ensemble learning classifier, and obtain the severity level of cataracts by combining weighted voting.

[0133] The specific functions of each module described above are explained in the relevant content of the method in Embodiment 1, and will not be repeated here.

[0134] Example 3:

[0135] This embodiment provides a computer-readable storage medium storing a computer program / instructions thereon, which, when executed by a processor, implements the steps of the cataract diagnosis method as described in any of the embodiments.

[0136] Example 4:

[0137] This embodiment provides a computer device / equipment / system, including:

[0138] Memory, used to store computer programs / instructions;

[0139] A processor is configured to execute the computer program / instructions to implement the steps of the cataract diagnosis method as described in any one of Embodiment 1.

[0140] Example 5:

[0141] This embodiment provides a computer program product, including a computer program / instructions, characterized in that, when the computer program / instructions are executed by a processor, they implement the steps of the cataract diagnosis method as described in any one of Embodiment 1.

[0142] In summary, the cataract diagnosis method, apparatus, medium, and device provided by the present invention have the following advantages:

[0143] Beneficial effects:

[0144] 1. Multiple image preprocessing methods were used for image enhancement, which expanded the dataset and made the samples more abundant;

[0145] 2. A custom CNN model was designed by modifying the traditional CNN model, reducing computational costs and making it easier to apply in practice;

[0146] 3. By using ensemble learning methods, combining the prediction results of three classifiers (KNN, NB, and DT), the diagnosis becomes more accurate.

[0147] 4. A weighted voting technique is used to weight the results of the three classifiers. If a classifier shows excellent accuracy for a specific category, it will be given a higher weight compared to other classifiers; conversely, if a classifier performs poorly, it will be assigned a lower weight.

[0148] 5. This invention can be implemented either purely in software or in hardware.

[0149] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0150] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0151] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0152] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0153] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.

Claims

1. A method for diagnosing cataracts, characterized in that, include: Acquire fundus images and crop them to obtain cropped images; The cropped image is preprocessed to obtain a set of processed images; Based on the processed image set, feature extraction is performed using a pre-trained CNN model to obtain feature vectors; Based on the feature vector, a cataract diagnosis is performed using a pre-trained ensemble learning classifier, and the severity level of the cataract is obtained by combining weighted voting. The training of the CNN model includes: Build an initial dataset and perform image cropping and preprocessing to obtain a training dataset; Construct a CNN model, and train the CNN model using the training dataset to obtain a trained fusion object detection model; The training of the ensemble learning classifier includes: Based on the training dataset and a pre-trained CNN model, feature extraction is performed to obtain a set of feature vectors. Construct an ensemble learning classifier, train the ensemble learning classifier using the aforementioned feature vector set, and optimize the ensemble learning classifier using weighted voting to obtain a trained ensemble learning classifier; The image preprocessing includes: The cropped image is preprocessed using min-pooling to obtain the min-pooled image, specifically achieved through formula (1): (1) in, This represents the image after min-pooling, where 𝛼 represents the preset parameters used to control the overall intensity of the original image. This represents the image being cropped, and 𝛽 represents the preset parameters used to control the impact of the minimum pooling filter on the image. This represents a Gaussian filter with a standard deviation of σ, * represents a convolution operation, and σ represents preset parameters used to control the overall brightness shift and contrast of the output image. The cropped image is decomposed into three channels: red (R), green (G), and blue (B) using RGB-CLAHE. The CLAHE algorithm is then applied to these three channels, and the three channels are recombined to obtain the RGB-CLAHE processed image. The cropped image is converted from RGB color space to Lab color space using Lab-CLAHE, and the CLAHE algorithm is applied to the L channel. Then, the processed Lab color space is converted back to RGB color space to obtain the Lab-CLAHE processed image. This is specifically achieved through formula (2): (2) in, This represents the image after Lab-CLAHE processing. This represents the conversion function from Lab to RGB color space. This represents a contrast-limited adaptive histogram equalization function. This represents the conversion function from RGB to Lab color space. Indicates cropping the image; The MaxGreenGsc-CLAHE algorithm is applied to each channel of the cropped image to obtain the MaxGreenGsc-CLAHE processed image, specifically through formula (3): (3) in, Indicates the first [image element] in the MaxGreenGsc-CLAHE processed image. OK Column pixel values, , and This indicates that the CLAHE function is applied to the grayscale channel, green channel, and maximum pixel image channel, respectively. , and These represent the grayscale channel, green channel, and maximum pixel image channel, respectively. OK The pixel values ​​of the column; The images processed by Min-pooling, RGB-CLAHE, Lab-CLAHE, and MaxGreenGsc-CLAHE are combined to obtain a set of processed images. The pre-trained CNN model includes six sets of convolutional layers, one set of max pooling layers, three sets of fully connected layers, one set of dropout layers, and one set of classification layers; wherein the six sets of convolutional layers and the set of max pooling layers together form a joint layer.

2. The cataract diagnosis method according to claim 1, characterized in that, The feature extraction process, which yields the feature vector, involves the following steps: Remove the last three layers of the pre-trained CNN model, including a set of fully connected layers, a set of dropout layers, and a set of classification layers, to obtain the processed CNN model; The processed image set is input into the processed CNN model to generate feature vectors, where the expression of the feature vectors is shown in formula (4): (4) in, This represents the feature vector generated by the processed CNN model. This represents the output of the processed CNN model. This represents the layers of a pre-trained CNN model after removing the last three layers.

3. The cataract diagnosis method according to claim 1, characterized in that, The ensemble learning classifier includes three classifiers: K-Nearest Neighbors (KNN), Naive Bayes (NB), and Decision Tree (DT). The K-nearest neighbor (KNN) distance metric is shown in formula (5): (5) in, Represents Euclidean distance. This represents the input feature vector. Represents the first element in the input feature vector. One characteristic, This represents the feature vector of other known samples in the sample set. This represents the eigenvector of the other known samples in the sample set. One characteristic, This indicates the number of features in the feature vector; The expression for Naive Bayes (NB) is shown in formula (6): (6) in, Represents the input feature vector Naive Bayes classifier, This indicates the parameter value that makes the function reach its maximum value. Represents the set of all categories The categories in express The prior probability, This indicates the number of features in the feature vector. Represents the first feature vector in the input feature vector. One characteristic, express Compared to The conditional probability; The expression for the decision tree DT is shown in formula (7): (7) in, Represents the input feature vector Decision tree classifier, Represents the first feature vector in the input feature vector. One characteristic, The threshold representing a decision tree node, Indicates about The decision results This represents the left child node of the decision tree. This represents the right child node of the decision tree.

4. The cataract diagnosis method according to claim 3, characterized in that, The weighted voting method is used to determine the severity level of cataracts, including: Obtain the output results of three classifiers: K-Nearest Neighbors (KNN), Naive Bayes (NB), and Decision Tree (DT). The outputs of the three classifiers are evaluated using a weighted voting method to obtain the severity level of cataracts.

5. A cataract diagnostic device, characterized in that, A method for implementing the cataract diagnosis method according to any one of claims 1-4 includes: Image cropping module: Used to crop the acquired fundus image to obtain the cropped image; The image preprocessing module is used to: perform image preprocessing on the cropped image to obtain a set of processed images; The feature extraction module is used to: extract features based on the processed image set and a pre-trained CNN model to obtain feature vectors; The cataract diagnosis module is used to: diagnose cataracts based on the feature vector and a pre-trained ensemble learning classifier, and obtain the severity level of cataracts by combining weighted voting.

6. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the cataract diagnosis method according to any one of claims 1-4.

7. A computer device, characterized in that, include: Memory is used to store computer programs or instructions; A processor for executing the computer program or instructions to implement the steps of the cataract diagnosis method according to any one of claims 1-4.

8. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or instructions are executed by a processor, they implement the steps of the cataract diagnosis method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Cataract eye fundus image enhancement method based on hierarchical generation

    CN114359104A

  • Artificial intelligence-based ophthalmic disease diagnostic modeling method, apparatus, and system

    WO2019200535A1