Ophthalmic disease classification and identification method, device and medium based on random forest
By combining the deep convolutional neural network and the random forest model, the problem of low model reliability and accuracy in ophthalmic OCT image classification and recognition is solved, the accuracy and interpretability of ophthalmic disease classification is improved, and the cost of sample collection is reduced.
Patent Information
- Application Number
- CN201910542438.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-21
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2039-06-21
AI Technical Summary
In the existing technology, when the deep convolutional neural network model is used for classification and recognition of ophthalmic OCT images, the reliability and accuracy of the model are low, and the cost of collecting training samples is high, which affects the accuracy of the classification and recognition results.
The ophthalmic disease classification method based on random forest is used, combined with the deep convolutional neural network model for lesion identification and the random forest model for disease classification. The lesion type probability value on the OCT image is obtained through the lesion recognition model and input into the disease classification model. To obtain the eye disease category.
It improves the interpretability of the algorithm model and the reliability and accuracy of disease classification, assists doctors in diagnosing eye diseases, and enhances the generalization ability of the model when processing a small number of samples.
Smart Images

Figure CN110363226B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device and medium for classifying and identifying ophthalmic diseases based on random forests. Background Art
[0002] Optical coherence tomography (OCT) is an imaging technology that uses the basic principle of weak coherent light interferometer to detect the back reflection or several scattered signals of the incident weak coherent light at different depths of biological tissue. By scanning, a two-dimensional or three-dimensional structural image of the biological tissue can be obtained. OCT images are usually used for screening and auxiliary diagnosis of ophthalmic diseases. The classification and identification of ophthalmic diseases is beneficial to the auxiliary diagnosis of ophthalmic diseases. At present, the classification and identification of ophthalmic OCT diseases is usually achieved by extracting features from OCT images through a deep convolutional neural network model. However, there is a certain difference between the features extracted by the deep neural network model and the doctor's diagnostic image logic. Therefore, the classification and identification results of ophthalmic diseases obtained by the deep neural network model are greatly different from the actual disease results, and the model reliability is low. In addition, the deep convolutional neural network model used requires a large number of training samples. In general, one eye can scan 20-30 OCT images. Although more training samples can be collected at the image level, the cost of collecting a large number of samples at the eye level is relatively high, which makes model training difficult and affects the accuracy of the classification and identification results of ophthalmic OCT diseases obtained by the model. Summary of the invention
[0003] The present invention provides a method, device and medium for classifying and identifying ophthalmic diseases based on random forests, so as to solve the problems of low model reliability and accuracy in the prior art.
[0004] In order to achieve the above object, one aspect of the present invention is to provide a method for classifying and identifying ophthalmic diseases based on random forests, comprising:
[0005] Acquire multiple original OCT images of the eye; input the OCT images into a trained lesion recognition model, and output the probability value of the lesion type on the OCT image through the lesion recognition model; input the probability values of the lesion type of all OCT images corresponding to the same eye into a trained disease classification model, and output the probability value of the disease type category of the eye through the disease classification model; obtain the disease category of the eye according to the probability value of the disease type category of the eye.
[0006] Preferably, the lesion recognition model is a deep convolutional neural network model, which is used to identify the lesion type of a single OCT image; the disease classification model is a random forest model, which is used to identify the disease type of the eye.
[0007] Preferably, the method also includes: training the deep convolutional neural network model, wherein the step of training the deep convolutional neural network model includes: obtaining a first training sample, the first training sample being a single OCT image, and annotating the first training sample, including annotating the type of lesions present in each OCT image; and training the deep convolutional neural network model using the annotated first training sample.
[0008] Preferably, the deep convolutional neural network model is trained using a labeled first training sample, including: inputting the labeled first training sample into the deep convolutional neural network model; outputting a probability vector corresponding to the first training sample through the deep convolutional neural network model; and determining the weight parameters of each connection layer in the deep convolutional neural network model based on minimizing the loss function and the stochastic gradient descent method to obtain a trained deep convolutional neural network model as a lesion recognition model.
[0009] Preferably, the random forest model includes multiple decision tree classification models, wherein the decision tree classification model includes: a root node, multiple internal nodes and multiple leaf nodes, the root node includes all the input features of the decision tree classification model, each of the leaf nodes corresponds to a disease category predicted by the decision tree classification model, and each of the internal nodes corresponds to a feature judgment, and the judgment condition is whether the feature corresponding to the internal node exceeds the corresponding preset threshold.
[0010] Preferably, the method also includes: training the random forest model, wherein the step of training the random forest model includes: constructing a sample library according to the output of the lesion recognition model, the sample library including multiple samples, each sample including multiple features corresponding to the same eye; selecting multiple samples from the sample library as second training samples, and marking the disease type of the eye corresponding to each second training sample to form a training set; and using the training set to train the random forest model.
[0011] Preferably, training the random forest model using the training set includes: inputting the second training sample into the random forest model, randomly extracting multiple features from the second training sample as inputs of each decision tree classification model; training the decision tree classification model to obtain parameters in each decision tree classification model; and combining the trained decision tree classification models to form the random forest model.
[0012] In order to achieve the above-mentioned purpose, another aspect of the present invention is to provide an electronic device, which includes: a processor; a memory, wherein the memory includes an ophthalmic disease classification and identification program based on random forest, and when the ophthalmic disease classification and identification program is executed by the processor, the steps of the ophthalmic disease classification and identification method based on random forest are implemented as described above.
[0013] In order to achieve the above-mentioned purpose, another aspect of the present invention is to provide a computer-readable storage medium, which includes an ophthalmic disease classification and identification program based on random forests. When the ophthalmic disease classification and identification program is executed by a processor, the steps of the ophthalmic disease classification and identification method based on random forests as described above are implemented.
[0014] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0015] The present invention obtains the lesion type of the OCT image through a lesion recognition model, and classifies and identifies ophthalmic disease categories based on the lesion type, thereby increasing the interpretability of the algorithm model, improving the reliability and accuracy of disease classification and identification, and assisting doctors in diagnosing eye diseases. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 This is a flow chart of the random forest-based ophthalmic disease classification and identification method of the present invention;
[0017] Figure 2 This is a module diagram of the random forest-based ophthalmic disease classification and identification program of the present invention.
[0018] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0019] The embodiments of the present invention will be described below with reference to the accompanying drawings. It will be appreciated by those skilled in the art that the described embodiments may be modified in various ways or combinations thereof without departing from the spirit and scope of the present invention. Therefore, the drawings and descriptions are illustrative in nature and are only used to explain the present invention, rather than to limit the scope of the claims. In addition, in this specification, the drawings are not drawn to scale, and the same reference numerals represent the same parts.
[0020] Figure 1 Schematic diagram of the process of the random forest-based ophthalmic disease classification and identification method of the present invention, as shown in FIG. Figure 1 As shown, the random forest-based ophthalmic disease classification and identification method of the present invention comprises the following steps:
[0021] Step S1, obtaining multiple original OCT images of the eye. Usually, multiple OCT images are scanned at different positions of one eye to obtain the type of eye disease by integrating the multiple images. In the present invention, it is not necessary to perform any processing on the original OCT images, as long as the scanning position of the image is ensured to be correct;
[0022] Step S2, inputting the OCT image into a trained lesion recognition model, and outputting a probability value of the lesion type on the OCT image through the lesion recognition model;
[0023] Step S3, inputting the probability values of the lesion types of all OCT images corresponding to the same eye into the trained disease classification model, and outputting the probability value of the disease type of the eye through the disease classification model;
[0024] Step S4, obtaining the eye disease category according to the probability value of the eye disease category.
[0025] The present invention obtains the disease category corresponding to the eye through the lesion recognition model and the disease classification model, and classifies and identifies the ophthalmic disease category based on the lesion category, thereby increasing the interpretability of the algorithm model.
[0026] Preferably, the lesion recognition model is a deep convolutional neural network model, which is used to identify the lesion type of a single OCT image. The probability value of the lesion type that may exist in each OCT image is obtained through the deep convolutional neural network model (the probability value is 0 to 1). For example, an OCT image is input and the output is a 1×N probability vector, where N represents the number of lesion types that may exist in the OCT image; the disease classification model is a random forest model, which is used to identify the disease type of the eye. The random forest model is used to classify and identify diseases based on the whole eye level to obtain the corresponding eye disease categories. For example, the input of the random forest model is a one-dimensional vector of 1×(M·N), where M is the number of OCT images scanned by one eye (such as 31 images), and N is the number of lesion types that may exist in each OCT image (such as 13 pre-selected lesion types). The M×N matrix is obtained by one-dimensional processing. Each vector element represents the probability value of a certain lesion sign that may exist in a certain OCT image (the value range is 0 to 1). The random forest model outputs the probability value of the eye belonging to a certain type of disease. For example, the M×N matrix can be expressed as Among them, P MN It represents the probability of the presence of the Nth lesion type in the Mth OCT image scanned for the eye.
[0027] By integrating deep convolutional neural networks and random forests, we can take advantage of the convolutional neural network's advantage in automatically expressing image features, and take advantage of the random forest's model generalization ability when processing a small number of samples, thereby improving the accuracy and generalization of the overall model and the accuracy of eye disease identification.
[0028] The deep convolutional neural network includes substructures such as convolutional layers, pooling layers, activation functions and fully connected layers. Furthermore, skip connection units are added between convolutional layers with different convolution kernel sizes to avoid degradation caused by deepening the network structure.
[0029] In one embodiment of the present invention, the method further comprises: training the deep convolutional neural network model, wherein the step of training the deep convolutional neural network model comprises:
[0030] A first training sample is obtained, where the first training sample is a single OCT image. When training the model, a certain amount of OCT images are collected in advance, corresponding to one or more eyes, and the first training sample is labeled, including labeling the type of lesions present in each OCT image (i.e., each first training sample), for example, including intraretinal fluid, intraretinal high reflective points, pigment epithelial detachment, drusen, etc.; the deep convolutional neural network model is trained using the labeled first training sample, and various parameters of the convolutional neural network are trained.
[0031] Furthermore, the deep convolutional neural network model is trained using the first labeled training sample, including: inputting the first labeled training sample into the deep convolutional neural network model; outputting a probability vector corresponding to the first training sample through the deep convolutional neural network model, indicating the probability of a certain type of lesion existing on the first training sample (with a value of 0 to 1); based on the minimum loss function and the stochastic gradient descent (SGD) method, determining the weight parameters of each connection layer in the deep convolutional neural network model, and obtaining a trained deep convolutional neural network model as a lesion recognition model. After outputting the probability vector corresponding to a first training sample, the weight parameters of each connection layer are updated based on the stochastic gradient descent method, and the deep convolutional neural network model is continuously trained using the updated parameters, and whether to end the training is determined based on the minimum loss function to obtain the final weight parameters.
[0032] The loss function selected in the present invention is binary cross entropy.
[0033] The random forest model includes multiple decision tree classification models, and multiple decision trees are combined through a certain strategy (here, voting method is adopted) to form the random forest model. The use of the random forest model can enhance the generalization ability of the model when processing a small number of samples.
[0034] The decision tree classification model includes: a root node, multiple internal nodes (including parent nodes and child nodes) and multiple leaf nodes, wherein the root node includes all input features of the decision tree classification model, wherein the feature is the probability value of a certain lesion sign that may exist in a certain OCT image scanned by an eye, each leaf node corresponds to the disease category predicted by the decision tree classification model, each internal node corresponds to a feature judgment, and the judgment condition is whether the feature corresponding to the internal node (which is a probability value) exceeds the corresponding preset threshold value, and the feature contained in the internal node is divided from the parent node to the child node according to the feature judgment result. The path from the root node to each leaf node corresponds to a judgment test sequence, and the probability of a disease category is output. Therefore, in a decision tree classification model, multiple judgment test sequences are included, and the probabilities of multiple disease categories can be output.
[0035] In one embodiment of the present invention, all input features of the decision tree classification model corresponding to the root node are multiple features randomly extracted from the input of the random forest model. For example, the input of the random forest model is a one-dimensional vector of 1×(M·N), and a new vector formed by randomly extracting multiple vector elements in the one-dimensional vector is used as the input of the decision tree classification model, and each vector element in the new vector is regarded as a feature, representing the probability value of a certain lesion sign that may exist in a certain OCT image.
[0036] In one embodiment of the present invention, the method further includes: training the random forest model, wherein the step of training the random forest model includes: constructing a sample library according to the output of the lesion recognition model, the sample library including multiple samples, each sample including multiple features corresponding to the same eye, for example, the sample is a one-dimensional vector including M·N features, M is the number of OCT images scanned by one eye, N is the number of lesion types that may exist in each OCT image, and the feature is a vector element in the one-dimensional vector; selecting multiple samples from the sample library as second training samples, and annotating the disease type of the eye corresponding to each second training sample to form a training set, wherein the annotated disease types include diabetic macular edema, venous thrombosis, dry / wet age-related macular degeneration, etc.; using the training set to train the random forest model.
[0037] The first training sample and the second training sample in the present invention have different meanings. The first training sample corresponds to a single OCT image, and the second training sample corresponds to an eye.
[0038] Furthermore, the random forest model is trained using the training set, including: inputting the second training sample into the random forest model, randomly extracting multiple features from the second training sample as inputs of each decision tree classification model, and the number of features randomly extracted from each decision tree can be the same or different; training the decision tree classification model to obtain parameters in each decision tree classification model; and combining the trained decision tree classification models to form the random forest model.
[0039] In one embodiment of the present invention, the probability value of the disease category of the eye is output through the disease classification model, including: counting the number of decision trees that predict the eye as each disease category; selecting the disease category with the largest number of corresponding decision trees; obtaining the probability value of the selected disease category and outputting it, wherein the probability value of the selected disease category is the ratio of the corresponding number of decision trees to the total number of decision trees.
[0040] Further, selecting the disease category corresponding to the largest number of decision trees includes: if there are multiple disease categories corresponding to the largest number of decision trees, randomly selecting one from the multiple disease categories as the disease category of the eye.
[0041] In one embodiment of the present invention, after counting the number of decision trees that predict the eye as each disease category, the number of decision trees corresponding to each disease category can be sorted. When selecting a disease category, the disease category corresponding to one or more decision trees with a top ranking can be selected as needed as the final selected disease category, and the probability value of the selected one or more disease categories can be obtained, and accordingly one or more disease categories can be obtained for reference by doctors and experts.
[0042] The random forest-based ophthalmic disease classification and identification method of the present invention is applied to an electronic device, which may be a terminal device such as a television, a smart phone, a tablet computer, or a computer.
[0043] The electronic device comprises: a processor; a memory for storing an ophthalmic disease classification and identification program based on random forests, wherein the processor executes the ophthalmic disease classification and identification program based on random forests to implement the following steps of an ophthalmic disease classification and identification method based on random forests:
[0044] Acquire multiple original OCT images of the eye;
[0045] Inputting the OCT image into a trained lesion recognition model, and outputting a probability value of the lesion type on the OCT image through the lesion recognition model;
[0046] Inputting the probability values of the lesion types of all OCT images corresponding to the same eye into a trained disease classification model, and outputting the probability value of the disease type of the eye through the disease classification model;
[0047] The eye disease category is obtained according to the probability value of the eye disease category.
[0048] The electronic device also includes a network interface and a communication bus, etc. The network interface may include a standard wired interface and a wireless interface, and the communication bus is used to realize the connection and communication between various components.
[0049] The memory includes at least one type of readable storage medium, which may be a non-volatile storage medium such as a flash memory, a hard disk, an optical disk, or a plug-in hard disk, etc., and is not limited thereto. It may be any device that stores instructions or software and any associated data files in a non-temporary manner and provides instructions or software programs to a processor so that the processor can execute the instructions or software programs. In the present invention, the software program stored in the memory includes an ophthalmic disease classification and identification program based on a random forest, and the ophthalmic disease classification and identification program based on a random forest can be provided to the processor so that the processor can execute the ophthalmic disease classification and identification program based on a random forest, thereby implementing the steps of the ophthalmic disease classification and identification method based on a random forest.
[0050] The processor can be a central processing unit, a microprocessor or other data processing chip, etc., and can run the stored program in the memory, for example, the ophthalmic disease classification and identification program based on random forest in the present invention.
[0051] The electronic device may also include a display, which may also be referred to as a display screen or a display unit. In some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an organic light-emitting diode (OLED) touch device. The display is used to display information processed in the electronic device and to display a visual working interface.
[0052] The electronic device may further include a user interface, which may include an input unit (such as a keyboard), a voice output device (such as a speaker, a headset), and the like.
[0053] In other embodiments, the ophthalmic disease classification and identification program based on random forest can also be divided into one or more modules, one or more modules are stored in the memory and executed by the processor to complete the present invention. The module referred to in the present invention refers to a series of computer program instruction segments that can complete specific functions. Figure 2 Schematic diagram of the module of the random forest-based ophthalmic disease classification and identification program in the present invention, such as Figure 2 As shown, the random forest-based ophthalmic disease classification and identification program can be divided into: image acquisition module 1, lesion identification module 2, disease classification module 3 and disease acquisition module 4. Among them:
[0054] Image acquisition module 1, acquiring multiple original OCT images of the eye;
[0055] Lesion recognition module 2, inputting the OCT image into a trained lesion recognition model, and outputting a probability value of the lesion type on the OCT image through the lesion recognition model;
[0056] The disease classification module 3 inputs the probability value of the lesion type obtained through all OCT images corresponding to the same eye into a trained disease classification model, and outputs the probability value of the disease type of the eye through the disease classification model;
[0057] The disease type acquisition module 4 obtains the eye disease type according to the probability value of the eye disease type.
[0058] Preferably, the lesion recognition model is a deep convolutional neural network model, which is used to identify the lesion type of a single OCT image. The probability value of the lesion type that may exist in each OCT image is obtained through the deep convolutional neural network model (the probability value is 0 to 1). For example, an OCT image is input and the output is a 1×N probability vector, where N represents the number of lesion types that may exist in the OCT image; the disease classification model is a random forest model, which is used to identify the disease type of the eye. The random forest model is used to classify and identify diseases based on the whole eye level to obtain the corresponding eye disease categories. For example, the input of the random forest model is a one-dimensional vector of 1×(M·N), where M is the number of OCT images scanned by one eye (such as 31 images), and N is the number of lesion types that may exist in each OCT image (such as 13 pre-selected lesion types). The M×N matrix is obtained by one-dimensional processing. Each vector element represents the probability value of a certain lesion sign that may exist in a certain OCT image (the value range is 0 to 1). The random forest model outputs the probability value of the eye belonging to a certain type of disease. For example, the M×N matrix can be expressed as Among them, P MN It represents the probability of the presence of the Nth lesion type in the Mth OCT image scanned for the eye.
[0059] By integrating deep convolutional neural networks and random forests, we can take advantage of the convolutional neural network's advantage in automatically expressing image features, and take advantage of the random forest's model generalization ability when processing a small number of samples, thereby improving the accuracy and generalization of the overall model and the accuracy of eye disease identification.
[0060] The deep convolutional neural network includes substructures such as convolutional layers, pooling layers, activation functions and fully connected layers. Furthermore, skip connection units are added between convolutional layers with different convolution kernel sizes to avoid degradation caused by deepening the network structure.
[0061] In one embodiment of the present invention, the electronic device also includes a first training module for training a deep convolutional neural network model, and the first training module includes: a sample labeling unit for obtaining a first training sample, where the first training sample is a single OCT image. When training the model, a certain amount of OCT images are collected in advance, corresponding to one or more eyes, and the first training samples are labeled, including labeling the type of lesions present in each OCT image (i.e., each first training sample), for example, including intraretinal fluid, intraretinal high reflection points, pigment epithelial detachment, drusen, etc.; a neural network model training unit for training the deep convolutional neural network model using the labeled first training samples, and training various parameters of the convolutional neural network.
[0062] Furthermore, the neural network model training unit trains the deep convolutional neural network model in the following manner, including: inputting the labeled first training sample into the deep convolutional neural network model; outputting a probability vector corresponding to the first training sample through the deep convolutional neural network model, indicating the probability of a certain type of lesion existing on the first training sample (with a value of 0 to 1); based on the minimum loss function and stochastic gradient descent (SGD), determining the weight parameters of each connection layer in the deep convolutional neural network model, and obtaining a trained deep convolutional neural network model as a lesion recognition model. After outputting the probability vector corresponding to a first training sample, the weight parameters of each connection layer are updated based on the stochastic gradient descent method, and the deep convolutional neural network model is continuously trained using the updated parameters, and whether to end the training is determined based on the minimum loss function to obtain the final weight parameters.
[0063] The loss function selected in the present invention is binary cross entropy.
[0064] The random forest model includes multiple decision tree classification models, and multiple decision trees are combined through a certain strategy (here, voting method is adopted) to form the random forest model. The use of the random forest model can enhance the generalization ability of the model when processing a small number of samples.
[0065] The decision tree classification model includes: a root node, multiple internal nodes (including parent nodes and child nodes) and multiple leaf nodes, wherein the root node includes all input features of the decision tree classification model, wherein the feature is the probability value of a certain lesion sign that may exist in a certain OCT image scanned by an eye, each leaf node corresponds to the disease category predicted by the decision tree classification model, each internal node corresponds to a feature judgment, and the judgment condition is whether the feature corresponding to the internal node (which is a probability value) exceeds the corresponding preset threshold value, and the feature contained in the internal node is divided from the parent node to the child node according to the feature judgment result. The path from the root node to each leaf node corresponds to a judgment test sequence, and the probability of a disease category is output. Therefore, in a decision tree classification model, multiple judgment test sequences are included, and the probabilities of multiple disease categories can be output.
[0066] In one embodiment of the present invention, all input features of the decision tree classification model corresponding to the root node are multiple features randomly extracted from the input of the random forest model. For example, the input of the random forest model is a one-dimensional vector of 1×(M·N), and a new vector formed by randomly extracting multiple vector elements in the one-dimensional vector is used as the input of the decision tree classification model, and each vector element in the new vector is regarded as a feature, representing the probability value of a certain lesion sign that may exist in a certain OCT image.
[0067] In one embodiment of the present invention, the electronic device further includes a second training module for training the random forest model. The second training module includes: a sample library construction unit, which constructs a sample library according to the output of the lesion recognition model, the sample library includes multiple samples, each sample includes multiple features corresponding to the same eye, for example, the sample is a one-dimensional vector including M·N features, M is the number of OCT images scanned by one eye, N is the number of lesion types that may exist in each OCT image, and the feature is a vector element in the one-dimensional vector; a training set construction unit, which selects multiple samples from the sample library as second training samples, and annotates the disease type of the eye corresponding to each second training sample to form a training set, wherein the annotated disease types include diabetic macular edema, venous thrombosis, dry / wet age-related macular degeneration, etc.; a random forest model training unit, which trains the random forest model using the training set.
[0068] Furthermore, the random forest model training unit trains the random forest model in the following manner, including: inputting the second training sample into the random forest model, randomly extracting multiple features from the second training sample as inputs of each decision tree classification model, and the number of features randomly extracted from each decision tree can be the same or different; training the decision tree classification model to obtain parameters in each decision tree classification model; and combining the trained decision tree classification models to form the random forest model.
[0069] In one embodiment of the present invention, the disease classification module includes: a statistical unit, which counts the number of decision trees that predict the eye as each disease category; a selection unit, which selects the disease category with the largest number of corresponding decision trees; and a probability output unit, which obtains and outputs the probability value of the selected disease category, wherein the probability value of the selected disease category is the ratio of the corresponding number of decision trees to the total number of decision trees.
[0070] Furthermore, when the selection unit selects the disease category corresponding to the largest number of decision trees, if there are multiple disease categories corresponding to the largest number of decision trees, one of the multiple disease categories is randomly selected as the disease category of the eye.
[0071] In one embodiment of the present invention, the disease classification module also includes a sorting unit. After counting the number of decision trees that predict the eye as each disease category, the number of decision trees corresponding to each disease category is sorted. When selecting a disease category, the disease category corresponding to one or more decision trees with a top ranking can be selected as needed as the final selected disease category, and the probability value of the selected one or more disease categories is obtained, and accordingly one or more disease categories are obtained for reference by doctors and experts.
[0072] In one embodiment of the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program or instruction, wherein the program may be executed, and the corresponding function may be implemented through the hardware associated with the stored program instruction. For example, a computer-readable storage medium may be a computer disk, a hard disk, a random access memory, a read-only memory, etc. The present invention is not limited thereto, and may be any device that stores instructions or software and any related data files or data structures in a non-temporary manner and can be provided to a processor so that the processor executes the program or instruction therein. The computer-readable storage medium includes an ophthalmic disease classification and identification program based on random forests. When the ophthalmic disease classification and identification program based on random forests is executed by the processor, the following ophthalmic disease classification and identification method based on random forests is implemented:
[0073] Acquire multiple original OCT images of the eye;
[0074] Inputting the OCT image into a trained lesion recognition model, and outputting a probability value of the lesion type on the OCT image through the lesion recognition model;
[0075] Inputting the probability values of the lesion types of all OCT images corresponding to the same eye into a trained disease classification model, and outputting the probability value of the disease type of the eye through the disease classification model;
[0076] The eye disease category is obtained according to the probability value of the eye disease category.
[0077] The specific implementation of the computer-readable storage medium of the present invention is roughly the same as the specific implementation of the above-mentioned random forest-based ophthalmic disease classification and identification method and electronic device, and will not be repeated here.
[0078] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, device, article or method including the element.
[0079] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. Through the description of the above implementation modes, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases the former is a better implementation mode. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0080] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for classifying and identifying ophthalmic diseases based on random forests, applied to electronic devices, characterized in that: include: Acquire multiple original OCT images of the eye; Inputting the OCT image into a trained lesion recognition model, and outputting a probability value of the lesion type on the OCT image through the lesion recognition model; Inputting the probability values of the lesion types of all OCT images corresponding to the same eye into a trained disease classification model, and outputting the probability value of the disease type of the eye through the disease classification model; The eye disease category is obtained according to the probability value of the eye disease category. The lesion recognition model is a deep convolutional neural network model, which is used to identify the lesion type of a single OCT image; the disease classification model is a random forest model, which is used to identify the disease type of the eye. The random forest model includes multiple decision tree classification models, wherein the decision tree classification model includes: a root node, multiple internal nodes and multiple leaf nodes, the root node includes all input features of the decision tree classification model, each leaf node corresponds to the disease category predicted by the decision tree classification model, each internal node corresponds to a feature judgment, and the judgment condition is whether the feature corresponding to the internal node exceeds the corresponding preset threshold. The method further comprises: Training the random forest model; Wherein, the step of training the random forest model includes: Building a sample library according to the output of the lesion recognition model, wherein the sample library includes a plurality of samples, and each sample includes a plurality of features corresponding to the same eye; Selecting a plurality of samples from the sample library as second training samples respectively, and marking the type of eye disease corresponding to each second training sample to form a training set; Using the training set to train the random forest model, Training the random forest model using the training set includes: Inputting the second training sample into the random forest model, and randomly extracting multiple features from the second training sample as inputs of each decision tree classification model; Training the decision tree classification model to obtain parameters in each decision tree classification model; The trained decision tree classification models are combined to form the random forest model.
2. The method for classifying and identifying ophthalmic diseases based on random forests according to claim 1, characterized in that: The method further comprises: Training the deep convolutional neural network model; Wherein, the step of training the deep convolutional neural network model includes: Acquire a first training sample, where the first training sample is a single OCT image, and annotate the first training sample, including annotating the type of lesions present in each OCT image; The deep convolutional neural network model is trained using the labeled first training samples.
3. The method for classifying and identifying ophthalmic diseases based on random forests according to claim 2, characterized in that: Training the deep convolutional neural network model using the labeled first training sample includes: Inputting the labeled first training sample into the deep convolutional neural network model; Outputting a probability vector corresponding to the first training sample through the deep convolutional neural network model; Based on the minimization of the loss function and the stochastic gradient descent method, the weight parameters of each connection layer in the deep convolutional neural network model are determined to obtain a trained deep convolutional neural network model as a lesion recognition model.
4. An electronic device, characterized in that: The electronic device comprises: a processor; a memory, wherein the memory comprises an ophthalmic disease classification and identification program based on random forests, and when the ophthalmic disease classification and identification program is executed by the processor, the steps of the ophthalmic disease classification and identification method based on random forests are implemented as follows: Acquire multiple original OCT images of the eye; Inputting the OCT image into a trained lesion recognition model, and outputting a probability value of the lesion type on the OCT image through the lesion recognition model; Inputting the probability values of the lesion types of all OCT images corresponding to the same eye into a trained disease classification model, and outputting the probability value of the disease type of the eye through the disease classification model; The eye disease category is obtained according to the probability value of the eye disease category. The lesion recognition model is a deep convolutional neural network model, which is used to identify the lesion type of a single OCT image; the disease classification model is a random forest model, which is used to identify the disease type of the eye. The random forest model includes multiple decision tree classification models, wherein the decision tree classification model includes: a root node, multiple internal nodes and multiple leaf nodes, the root node includes all input features of the decision tree classification model, each leaf node corresponds to the disease category predicted by the decision tree classification model, each internal node corresponds to a feature judgment, and the judgment condition is whether the feature corresponding to the internal node exceeds the corresponding preset threshold. The method further comprises: Training the random forest model; Wherein, the step of training the random forest model includes: Building a sample library according to the output of the lesion recognition model, wherein the sample library includes a plurality of samples, and each sample includes a plurality of features corresponding to the same eye; Selecting a plurality of samples from the sample library as second training samples respectively, and marking the type of eye disease corresponding to each second training sample to form a training set; Using the training set to train the random forest model, Training the random forest model using the training set includes: Inputting the second training sample into the random forest model, and randomly extracting multiple features from the second training sample as inputs of each decision tree classification model; Training the decision tree classification model to obtain parameters in each decision tree classification model; The trained decision tree classification models are combined to form the random forest model.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes an ophthalmic disease classification and identification program based on random forests. When the ophthalmic disease classification and identification program is executed by a processor, the steps of the ophthalmic disease classification and identification method based on random forests as described in any one of claims 1 to 3 are implemented.
