Corneal staining analysis method based on deep learning and related training methods and systems
Through multi-stage model training and loss optimization technology based on deep learning, the problems of insufficient accuracy and lack of interpretability in corneal staining analysis are solved, and high-accuracy and interpretable corneal staining analysis is achieved, which is suitable for corneal diseases. Assessment and diagnosis.
Patent Information
- Application Number
- CN202410151848.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-02
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-02-02
AI Technical Summary
Existing technologies have insufficient accuracy and lack of interpretability in corneal staining analysis, and are particularly difficult in capturing fine-grained lesion features and grading disease.
Using a corneal staining analysis method based on deep learning, through multi-stage model training and loss optimization, a small number of regional images are used to train fine-grained feature extraction capabilities, combined with data enhancement and knowledge distillation technology, to improve the accuracy and reliability of the model's analysis of corneal staining images. interpretive.
It improves the accuracy and interpretability of corneal staining analysis, can automatically extract regional images, reduces annotation costs, adapts to color differences of different acquisition equipment and staining methods, provides continuous scoring and visualization diagrams, and is close to the doctor's judgment logic.
Smart Images

Figure CN118115783B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, and in particular to a corneal staining analysis method based on deep learning and related training methods and systems. Background Art
[0002] With the popularization of electronic information media, excessive use of video terminals and bad living habits have led to an increase in the prevalence of ocular surface diseases represented by dry eyes, which has seriously affected the normal life of contemporary people and has become a problem that cannot be ignored. Corneal staining is an important means of examining ocular surface diseases and ocular surface damage caused by systemic diseases. The evaluation of the morphology, size and distribution of lesions after staining is an important basis for judging the severity of ocular surface diseases. For example, fluorescein dye can visualize corneal lesions, and the cornea stained with fluorescein helps to observe the severity of corneal epithelial lesions.
[0003] At present, the evaluation method of naked eye assessment and grading can no longer meet medical needs. This evaluation method relies on the expertise of skilled ophthalmologists to perform subjective scoring by carefully examining the distribution of staining (such as the distribution of punctate staining) and density, which is time-consuming and there are individual differences in the professionalism of ophthalmologists. In recent years, researchers have begun to try to use artificial intelligence to assist in corneal staining scoring to improve the convenience of corneal staining evaluation. For example, some researchers based on the operator feature extraction of traditional computer vision, extracted local features and aggregated them, used edge extraction and positioning algorithms, and combined machine learning algorithms to perform the final disease grading or classification. For another example, other researchers based on the global discriminant algorithm of deep learning, through stacking convolution and other basic operators, to achieve feature extraction of lesion semantics.
[0004] However, corneal staining has rich morphology, and it is difficult to capture fine-grained lesion features. When using artificial intelligence to assist in corneal staining scoring, there are still problems of insufficient accuracy or lack of interpretability. For example, the above-mentioned traditional computer vision methods rely too much on the extraction of pre-designed features and lack generalization, while the global discrimination algorithm based on deep learning lacks sufficient interpretability. Therefore, there is an urgent need for a method that can improve the accuracy of corneal staining analysis and has interpretability. Summary of the invention
[0005] The present disclosure is proposed in view of the above-mentioned situation, and its purpose is to provide a corneal staining analysis method based on deep learning and with interpretability, as well as related training methods and systems.
[0006] To this end, a first aspect of the present disclosure provides a training method for corneal staining analysis based on deep learning, comprising: training a first model using a first training set; extracting a regional image corresponding to the disease from a second training set including multiple corneal staining images using the trained first model, and determining a third training set based on the multiple regional images; training a second model using a fourth training set determined based on the third training set, the second model being used to segment the lesion area and having a first output related to the segmentation probability; and training a third model based on deep learning using a fifth training set determined based on the third training set, the encoder of the third model being initialized to the encoder of the trained second model, the second output of the third model including a first sub-output and a first sub-output. Two sub-outputs, the first sub-output is related to the disease grade, and the second sub-output is related to the segmentation probability, wherein the number of samples in the fourth training set is less than the number of samples in the fifth training set, in training the third model, the third model is optimized based on multiple losses determined by the fifth training set, the multiple losses include a first loss, a second loss and a third loss, the first loss represents the difference between the first sub-output and the true value, the second loss represents the difference between the first output and the second sub-output of the trained second model, the third loss represents the concentration degree of the first sub-output distribution near the discrete disease grade, the trained first model and the trained third model are used for the corneal staining analysis.
[0007] In the first aspect of the present disclosure, the number of samples in the fourth training set is less than the number of samples in the fifth training set. In this case, the fine-grained feature extraction capability of the second model is trained using a small number of regional images, so that the fine-grained feature extraction capability can be further generalized to more images when migrating to the third model, and when the second loss is combined with the first output of the second model, it is possible to use more training samples to train the third model to obtain the lesion area in the case of a small number of annotations that are difficult to annotate such as the lesion area, but it is not required to have annotations for the lesion area when training the third model, thereby improving the accuracy of corneal staining analysis and being interpretable. In addition, during optimization, the third loss facilitates the concentration of the first sub-output near the discrete disease classification, thereby facilitating the acquisition of a classification consistent with the standard disease classification, and further improving the accuracy of corneal staining analysis. In addition, the trained first model facilitates the automatic extraction of regional images, which can automate corneal staining analysis.
[0008] In addition, in the training method for corneal staining analysis based on deep learning involved in the first aspect of the present disclosure, optionally, the labeling result of the fourth training set is determined by coarsely labeling the training samples in the fourth training set. In this case, the fine-grained feature extraction capability of the second model can be trained while further reducing the labeling cost, which is convenient for subsequent use to constrain the third model so that the third model has the ability to extract fine-grained features.
[0009] In addition, in the training method for corneal staining analysis based on deep learning involved in the first aspect of the present disclosure, optionally, a plurality of images of the region are subjected to data enhancement processing as the third training set, and the data enhancement processing includes at least one of rotation, flipping and color transformation. In this case, rotation and flipping can simulate the angle of acquisition and improve the model's tolerance to the deformation of corneal staining images. In addition, for corneal staining images, color transformation can enable the model to adapt to the color differences between different acquisition devices or different staining methods.
[0010] In addition, in the training method for corneal staining analysis based on deep learning involved in the first aspect of the present disclosure, optionally, the second loss satisfies the formula:
[0011]
[0012] in, represents the second loss, B represents the batch size, i represents the index of the training samples of the current batch in the fifth training set, represents the first segmentation probability of the i-th training sample in the current batch, represents the second segmentation probability of the i-th training sample in the current batch, KL() represents a function for comparing KL divergences, the first segmentation probability is the segmentation probability corresponding to the first output, and the second segmentation probability is the segmentation probability corresponding to the second sub-output. In this case, it is easy to measure the difference in distribution between the two probabilities, which can make the model pay more attention to the shape of the feature distribution, thereby further improving the ability to extract fine-grained features.
[0013] In addition, in the training method for corneal staining analysis based on deep learning involved in the first aspect of the present disclosure, optionally, the third loss satisfies the formula:
[0014]
[0015] in, represents the third loss, B represents the batch size, i represents the index of the training samples of the current batch in the fifth training set, C represents the number of discrete disease classifications, j represents the index of the discrete disease classification, and fi represents the feature information extracted by the third model for the i-th training sample in the current batch, p j represents the prototype feature of the jth disease classification of the current batch, y i represents the true value of the i-th training sample, Indicates the current batch and y i Corresponding prototype features, τ represents the temperature coefficient, and exp() represents the exponential function. In this way, the intra-class aggregation capability of feature information can be enhanced.
[0016] In addition, in the training method for corneal staining analysis based on deep learning according to the first aspect of the present disclosure, optionally, the current batch of i The corresponding prototype features satisfy the formula:
[0017]
[0018] in, Indicates the previous batch and y i The corresponding prototype features, Indicates the current batch and y i The corresponding prototype features, α represents a hyperparameter. In this case, the prototype features of the previous batch can be considered, and so on. Ultimately, the prototype features of all training samples can be combined to determine the third loss when the video memory is limited, thereby improving the accuracy of the model.
[0019] In addition, in the training method for corneal staining analysis based on deep learning involved in the first aspect of the present disclosure, optionally, the initial third model is used to extract feature information for multiple training samples in the fifth training set, and the multiple feature information extracted by the initial third model is clustered, and the cluster center is used as the initial value of the prototype feature of each disease classification. In this case, the initial value of the prototype feature of the corresponding disease classification can be easily obtained, and when the encoder of the initial third model is the encoder of the second training model, the initial value of the prototype feature has a certain accuracy.
[0020] The second aspect of the present disclosure provides a deep learning-based corneal staining analysis training system, comprising at least one processing circuit, wherein the at least one processing circuit is configured to: execute the deep learning-based corneal staining analysis training method involved in the first aspect of the present disclosure.
[0021] The third aspect of the present disclosure provides a method for analyzing corneal staining based on deep learning, comprising: obtaining an image to be predicted of a subject; and obtaining a trained first model and a trained third model according to the training method for corneal staining analysis based on deep learning involved in the first aspect of the present disclosure, using the trained first model to determine an image of a region to be predicted for the image to be predicted, and using the trained third model to determine a disease grade and a lesion region for the image of the region to be predicted. Thus, the accuracy of corneal staining analysis can be improved and the analysis is interpretable.
[0022] The fourth aspect of the present disclosure provides a deep learning-based corneal staining analysis system, comprising at least one processing circuit, wherein the at least one processing circuit is configured to: execute the deep learning-based corneal staining analysis method involved in the third aspect of the present disclosure.
[0023] According to the present disclosure, a training method for corneal staining analysis based on deep learning is provided, which can improve the accuracy of corneal staining analysis and has interpretability. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The present disclosure will now be explained in further detail, by way of example only, with reference to the accompanying drawings.
[0025] Figure 1 is a schematic diagram showing an example of a staining analysis environment to which the present disclosure examples relate.
[0026] Figure 2 is an exemplary flow chart showing a training method involved in the examples of the present disclosure.
[0027] Figure 3 is a schematic diagram showing the training process involved in the examples of the present disclosure.
[0028] Figure 4 is an exemplary flowchart showing the batch-based training of the third model involved in the examples of the present disclosure.
[0029] Figure 5 is an exemplary block diagram showing a training system involved in the examples of the present disclosure.
[0030] Figure 6 is a flowchart illustrating an example of an analysis method to which the present disclosure examples relate.
[0031] Figure 7 is a schematic diagram showing the corneal staining analysis process involved in the examples of the present disclosure.
[0032] Figure 8 2 is a schematic diagram showing a comparison between the analysis method involved in the example of the present disclosure and other methods. DETAILED DESCRIPTION
[0033] Hereinafter, with reference to the accompanying drawings, preferred embodiments of the present disclosure are described in detail. In the following description, the same symbols are given to the same components, and repeated descriptions are omitted. In addition, the accompanying drawings are only schematic diagrams, and the ratio of the dimensions of the components to each other or the shapes of the components, etc. may be different from the actual ones. It should be noted that the terms "including" and "having" in the present disclosure and any variations thereof, such as a process, method, system, product or device including or having a series of steps or units, are not necessarily limited to those steps or units clearly listed, but may include or have other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] First, relevant terms involved in the present disclosure are introduced.
[0035] "Neural network" can refer to a computational model that mimics the way neurons in the human brain are connected. By learning the characteristics of training data, the model can be used to recognize images, predict outcomes, or perform other complex tasks. In addition, "model weights" can refer to the network parameters learned during the training process. Models based on deep learning are also a type of neural network.
[0036] "Encoder" can refer to a network structure or module used in deep learning to convert input data into a potential representation (such as a feature vector). In addition, "decoder" can refer to a structure used to convert the potential representation generated by the encoder back to the original input data.
[0037] "Annotation result" may refer to the label of the image determined after the image is annotated. It may also be called the gold standard. In the field of artificial intelligence, annotation results can be used to indicate what the neural network needs to predict or learn. In addition, "annotation" may refer to the process of manually labeling or annotating a data set (such as training data). Annotation may include operations such as classification, bounding box labeling, or semantic segmentation of images, text, or other types of data. For example, for a corneal stained image, the label provided by the annotation may be a label for a target area (such as a lesion area) on the corneal stained image, or it may be a classification for the entire corneal stained image.
[0038] "Corneal staining" refers to staining the cornea with a stain to highlight possible abnormalities or lesions. Preferably, the stain can be a fluorescein dye, thereby facilitating visualization of the lesion.
[0039] "Fine-grained features" refer to small features in corneal staining images. For example, the dot-shaped staining in some corneal staining images is generally very small and dense, and it is difficult to identify or mark each dot-shaped staining with the naked eye.
[0040] The cornea referred to in the examples of the present disclosure refers to the transparent dome-shaped structure at the front of the eye. The cornea plays a vital role in focusing light onto the retina.
[0041] As mentioned above, some existing methods cannot effectively capture fine-grained lesion features, and some methods can only provide the final overall results, lacking sufficient interpretability. Through research, the inventors have provided some solutions, and the corresponding embodiments can at least improve the accuracy and are also interpretable. The solution involved in the example of the present disclosure fills the current gap in feature recognition of dye particles, is particularly suitable for assisting the assessment of dry eyes, and can provide clinicians with continuous scoring and visualization diagrams that meet the doctor's judgment logic. The examples of the present disclosure will be described in detail below.
[0042] The examples disclosed herein involve a training method for tissue staining analysis based on deep learning. The training method transfers the fine-grained feature extraction capability of the segmentation model to the staining scoring model (i.e., the third model) by using a limited number of coarsely annotated training samples to train the segmentation model, thereby achieving accurate scoring of fine-grained tissue staining. In addition, the training method for corneal staining analysis based on deep learning involved in the examples disclosed herein may also be referred to as a training method or a model training method, etc. In some examples, the tissue may be the cornea, and accordingly, the training method may also be referred to as a training method for corneal staining analysis based on deep learning. In other examples, the tissue may also be tissue other than the cornea.
[0043] For the convenience of description, some examples are described below using cornea as an example of tissue, corneal staining as an example of tissue image, and dry eye as an example of disease. Dry eye is a common ocular surface disease, usually characterized by epithelial punctate damage. As the severity of dry eye increases, corneal staining gradually progresses from punctate to a mixed pattern of punctate and plaque staining. It should be noted that this does not limit the present disclosure, and unless there is a contradiction, the relevant description is also applicable to other types of images.
[0044] Examples of the present disclosure will be described in detail below with reference to the accompanying drawings. Figure 1 is a schematic diagram showing an example of a staining analysis environment 100 to which examples of the present disclosure relate.
[0045] refer to Figure 1, the staining analysis environment 100 may include a computing device 110. The computing device 110 may be any device with computing capabilities. For example, the computing device 110 may be a cloud server, a personal computer, a mainframe, and a distributed computing system. The computing device 110 may obtain an input 120 and generate an output 140 corresponding to the input 120 using a machine learning model 130. In some examples, the input 120 may be a tissue image (e.g., a corneal staining image), and the output 140 may be a prediction result, a training parameter (e.g., a weight), or a performance indicator (e.g., accuracy, error rate, sensitivity, and specificity).
[0046] In some examples, the machine learning model 130 may include, but is not limited to, a convolutional neural network. In some examples, the machine learning model 130 may be a model for image segmentation. In some examples, the machine learning model 130 may be a UNET model.
[0047] In some examples, the staining analysis environment 100 may also include a model training device and a model application device. The model training device can be used to implement a training method for training a machine learning model 130 to obtain a trained model. The model application device can be used to implement a related method for obtaining a recognition result using a trained model. In addition, the recognition result can be related to the output 140 of the trained model.
[0048] In the example of the present disclosure, the machine learning model 130 may be the first model 210, the second model 220, and the third model 230 described later, and accordingly, the trained first model 210, the second model 220, and the third model 230 may be trained models. In addition, for the convenience of description, the trained first model 210 is referred to as the first training model 410, the trained second model 220 is referred to as the second training model, and the trained third model 230 is referred to as the third training model 420.
[0049] Figure 2 is an exemplary flow chart showing a training method involved in the examples of the present disclosure. Figure 3 2 is a schematic diagram showing a training process 200 involved in the example of the present disclosure. The training method involved in the example of the present disclosure may be implemented by at least a part of the components in the above-mentioned computing device 110. For example, the training method may be implemented by a processor of the computing device 110.
[0050] refer to Figure 2 and Figure 3, the training method may include: training the first model 210 using the first training set (step S110), extracting the regional image corresponding to the disease in the second training set using the first training model 410 to determine the third training set (step S120), determining the fourth training set based on the third training set, training the second model 220 using the fourth training set (step S130), and determining the fifth training set based on the third training set, training the third model 230 using the fifth training set, and the encoder 2301 of the third model 230 is initialized as the encoder of the second training model (step S140). In this case, using the first training model 410 facilitates automatic extraction of regional images, which can automate corneal staining analysis. In addition, extracting regional images can reduce the amount of calculation and increase the model's attention to useful information. In addition, the encoder 2301 of the third model 230 is initialized as the encoder of the second training model, which can improve the training efficiency on the one hand, and facilitate the subsequent migration of the fine-grained feature extraction capability of the second model 220 to the third model 230 on the other hand.
[0051] Continue to refer Figure 2 In some examples, in step S110, the first training set may include multiple corneal staining images. In some examples, the first training set may be a public data set. In this case, for extracting a region of interest, which has a low requirement for the accuracy of boundary division, using a public data set to train the first model 210 can reduce the cost and difficulty of data acquisition. In some examples, the first training set may be a public data set for object detection. Thus, it is easy to extract a regional image.
[0052] In some examples, the first training set may be associated with a corresponding disease. Thus, the first training model 410 is enabled to extract a regional image of the corresponding disease. In some examples, the first training set may be associated with a single disease. In some examples, the first training set may be associated with multiple diseases. Thus, it is convenient for the first model 210 to learn to extract regional images of multiple diseases.
[0053] In addition, the first model 210 can be used to extract the regional image of the corresponding disease. That is, the first model 210 can be used to extract the corneal region of the corresponding disease. Figure 3 Taking dry eyes as an example, the lower 1 / 3 area of the cornea of dry eye patients is considered to be the most sensitive area for evaluating the severity of the disease and the effect of treatment. The area corresponding to the regional image can be the area 211 located in the lower 1 / 3 of the cornea in the corneal staining image with the background removed.
[0054] In some examples, the input of the first model 210 may be a corneal staining image in the first training set, and the output of the first model 210 may be a regional image. In some examples, the first model 210 may be based on deep learning. In some examples, the first model 210 may be based on a UNET model. Thus, it is possible to easily segment the regional image from the corneal staining image.
[0055] In some examples, the first training model 410 can be saved in a storage medium. Thus, it is convenient to reload and use when needed. In some examples, after the training is completed, the weight of the first training model 410 can be saved. In some examples, the first training model 410 can be used for corneal staining analysis in the model application stage. Specifically, the first training model 410 can be used to obtain an image of the area to be predicted.
[0056] In addition, the corneal staining images in the first training set may also be referred to as training samples, and the training samples in the first training set may have annotation results. In some examples, the annotation results of the training samples in the first training set may be annotations for regions of interest on the training samples.
[0057] Return to reference Figure 2 In some examples, in step S120, the second training set may include multiple corneal staining images. In some examples, the second training set may be a private data set. In this case, it is convenient to obtain more information for performance evaluation of the model, which can improve the accuracy of the model. In addition, for private data sets of specific scenarios, the performance of the model in the specific scenario can also be improved, thereby improving the practicality and adaptability of the model. For example, in some scenarios, private data generally have contextual information, and more accurate annotation results can be obtained.
[0058] As described above, the first training model 410 can be used to extract regional images, and the first training set can be a public data set. In this case, when the second training set is a private data set, the regional images extracted by fully utilizing the advantages of the public data set can enable the model using the private data set to be more focused on feature extraction of the regional images, suppress overfitting caused by training in non-interested areas, and help improve the generalization ability of the model, and can also reduce the data volume requirements for the private data set.
[0059] In some examples, the corneal staining images in the second training set may be images from a target hospital with patient information removed, and the target hospital may be a hospital whose acquisition conditions are similar to or the same as those in the model application stage. In this case, the trained model can be more suitable for performing corneal staining analysis on corneal staining images collected by the target hospital. In some examples, the target hospital may be a hospital in the model application stage.
[0060] In other examples, the regional image may not be determined by the first training model 410 (that is, step S110 may not be necessary), and the regional image corresponding to the disease in the second training set may be obtained by any method. For example, the content of the region of interest may be intercepted as the regional image by an image processing algorithm. In other examples, the content of the region of interest may not be extracted, the entire image may be used as input, and the model (such as the second model 220 and the third model 230) may be made to reduce the degree of attention to non-regions of interest through weights.
[0061] In addition, the third training set may be determined based on a plurality of area images. In some examples, the third training set may include a plurality of area images.
[0062] In some examples, the third training set may include multiple regional images after data enhancement processing. Specifically, multiple regional images may be subjected to data enhancement processing as the third training set. In this case, the number of samples can be increased and the generalization ability of the model can be improved. In particular, since private data sets generally have a small amount of data, the number of samples can be effectively increased through data enhancement processing.
[0063] In some examples, the data enhancement process may include at least one of rotation, flipping, and color transformation. In this case, rotation and flipping can simulate the angle of acquisition and improve the model's tolerance to the deformation of the corneal staining image. In addition, for corneal staining images, color transformation can enable the model to adapt to the color differences between different acquisition devices or different staining methods. In some examples, the lesion area in the corneal staining image can be highlighted by color changes. This facilitates the model to extract feature information of the lesion area.
[0064] In addition, the disease may be any cornea-related ocular surface disease or cornea-related systemic disease. For example, the ocular surface disease may include at least one of dry eye, neurotrophic keratitis, superficial punctate keratitis, viral keratitis, etc. For example, the systemic disease may be diabetes, which may lead to corneal epithelial defects.
[0065] Continue to refer Figure 2 In some examples, in step S130, the training samples in the fourth training set may be derived from the third training set. In some examples, regional images may be selected from the third training set to form the fourth training set. In some examples, regional images that are different from each other may be selected from the third training set to form the fourth training set. Thus, the generalization of the second model 220 can be improved. In some examples, the difference may include at least one of disease classification, staining method, and resolution of the acquisition device.
[0066] In some examples, a small number of regional images (i.e., a small number of samples) can be selected from the third training set to form a fourth training set. For example, 100 regional images can be selected from the third training set to form a fourth training set. In some examples, the number of samples in the fourth training set may be less than the number of samples in the subsequent fifth training set. In this case, a small number of regional images are used to train the fine-grained feature extraction capability of the second model 220, so that the fine-grained feature extraction capability can be further generalized to more images when subsequently migrating to the third model 230. In addition, as mentioned above, the cornea has rich morphology after staining, so the boundary of the lesion area is not very obvious, and it is difficult to mark the lesion area. Using a small number of regional images to train the second model 220 can reduce the annotation cost.
[0067] In addition, the training samples in the fourth training set may have a labeling result. The labeling result of the training samples in the fourth training set may be referred to as the first labeling result 223 (see Figure 3 ). In some examples, the first annotation result 223 may be an annotation for a lesion area on a training sample.
[0068] In some examples, the first annotation result 223 can be determined by roughly annotating the training samples in the fourth training set. In this case, the fine-grained feature extraction capability of the second model 220 can be trained while further reducing the annotation cost, so as to facilitate the subsequent use of constraining the third model 230 so that the third model 230 has the ability to extract fine-grained features. In addition, the rough annotation can be a rough annotation of the lesion area, that is, the accuracy of the annotation is relatively low. In other words, the marked lesion area can be an approximate area. In some examples, for stained images (such as corneal stained images), the rough annotation can be to frame the areas with similar or identical colors in the training samples. In this case, it is convenient to mark the areas that are dotted and densely dotted and the annotation efficiency can be improved.
[0069] In addition, the second model 220 can be used to segment the lesion area. The input of the second model 220 can be referred to as the first input 221 (see Figure 3 ). The first input 221 may be a regional image. The output of the second model 220 may be referred to as a first output 222, and the first output 222 may be related to the segmentation probability. In some examples, the second model 220 may be based on deep learning. In some examples, the second model 220 may be based on a UNET model. Thus, it is possible to easily segment the lesion area from the regional image.
[0070] In addition, the segmentation probability may refer to the probability that each pixel in the training sample belongs to the corresponding classification. For example, for the second model 220, it may be the probability that each pixel belongs to the corresponding lesion area. For another example, for the subsequent third model 230, it may be the probability that each pixel belongs to the corresponding disease grade. Figure 3 , a segmentation loss 224 may be determined based on the first output 222 and the first annotation result 223 to optimize the second model 220 .
[0071] In some examples, the weights of the first training model 410 can be used as the initial weights of the second model 220 through transfer learning. That is, transfer learning can be performed based on the weights of the first training model 410. In this case, the ability to extract fine-grained features of the second model 220 can be further improved, and the requirement for the number of samples in the fourth training set can be further reduced. In some examples, when training starts, the second model 220 can be the first training model 410. Specifically, the weights of the first training model 410 can be used as the initial weights of the second model 220. In some examples, after the training is completed, the weights of the second training model can be saved.
[0072] Return to reference Figure 2 In some examples, in step S140, the training samples in the fifth training set may come from the third training set. In some examples, regional images may be selected from the third training set to form the fifth training set. In some examples, the third training set may be directly used as the fifth training set. Thus, the third model 230 may be trained with more data.
[0073] In addition, the training samples in the fifth training set may have a labeling result. The labeling result of the training samples in the fifth training set may be referred to as the second labeling result 233 (see Figure 3 ). In addition, the second annotation result 233 can be a disease classification for the training sample. As described above, the number of samples in the fourth training set can be less than the number of samples in the fifth training set. In this case, the second annotation result 233 has a low annotation difficulty relative to the lesion area. When combined with the first output 222 of the second model 220, it can be convenient to use more training samples to train the third model 230 to obtain the lesion area (that is, to have the ability to extract fine-grained features) in a small amount of annotations with high annotation difficulty such as the lesion area, but it is not required to have annotations for the lesion area when training the third model 230.
[0074] In some examples, the disease classification in the second annotation result 233 may be discrete. This facilitates the correspondence with the disease classification identified manually (e.g., by an ophthalmologist). For example, for dry eye, the disease classification may include a level between 0 and 4, with an interval of 0.5, so a total of 9 disease classifications (also referred to as 9 classes) may be included.
[0075] In addition, the third model 230 can be used to simultaneously identify the disease classification and segment the lesion area, thereby improving the interpretability of the disease classification, that is, making the process of the disease classification output by the third model 230 understandable and interpretable.
[0076] In addition, the input of the third model 230 can be referred to as the second input 231 (see Figure 3 ). The second input 231 may be a region image. In addition, the output of the third model 230 may be referred to as a second output 232 (see Figure 3 ), the second output 232 may include a first sub-output 2321 and a second sub-output 2322. The first sub-output 2321 may be related to the disease grade. The second sub-output 2322 may be related to the segmentation probability.
[0077] Continue to refer Figure 3 In some examples, the third model 230 may have at least one encoder 2301 and two decoders 2302. One decoder 2302 may be used for disease grading to determine the first sub-output 2321, and another decoder 2302 may be used for segmentation to determine the second sub-output 2322, and the two decoders 2302 may share the encoder 2301. In this case, the two decoders 2302 can jointly affect the encoder 2301, and then share the features affected by each other for decoding. In this case, the accuracy of the segmentation probability and the disease grading can be further improved, so as to facilitate obtaining a finer lesion area and further improve the interpretability of the disease grading.
[0078] In some examples, the second sub-output 2322 may be a binary image, thereby highlighting the contour of the lesion area. In some examples, the second sub-output 2322 may be a heat map, thereby indicating the degree of correlation between the area on the corneal staining image and the disease grade by color.
[0079] In addition, the third model 230 may be based on deep learning. In some examples, the third model 230 may be based on a UNET model. Thus, it is possible to segment the lesion region from the regional image.
[0080] In some examples, the weights of the second training model may be used to initialize the initial weights of the third model 230. Specifically, the weights of the encoder 2301 in the third model 230 may be used to initialize the initial weights of the encoder in the second training model.
[0081] In addition, in training the third model 230, the third model 230 may be optimized based on multiple losses determined by the fifth training set to obtain a third training model 420. In some examples, multiple losses may be weighted to determine a total loss, and the third model 230 may be optimized using the total loss.
[0082] In some examples, the third model 230 may be trained until a stop training condition is met to obtain a third training model 420. For example, the stop training condition may be that the total loss corresponding to the third model 230 has not decreased or the number of training rounds has reached a preset number. In addition, the third training model 420 may be used for corneal staining analysis in the model application stage. Specifically, the third training model 420 may be used to determine the disease grade and lesion area for the image of the area to be predicted in the model application stage.
[0083] refer to Figure 3 In some examples, the plurality of losses may include at least one of the first loss 234, the second loss 235, and the third loss 236. Preferably, the plurality of losses may include the first loss 234, the second loss 235, and the third loss 236.
[0084] In some examples, multiple batches may be determined by the fifth training set, and multiple losses may be determined based on the training samples of each batch. Thus, the utilization of hardware resources (e.g., memory) may be improved. Specifically, multiple batches may be traversed to optimize the third model 230 using multiple losses determined for each batch.
[0085] In addition, the first loss 234 may represent the difference between the first sub-output 2321 and the true value. Thus, during optimization, it is convenient to make the first sub-output 2321 approach the true value. Figure 3 , the true value may be the disease classification in the second annotation result 233. The first loss 234 may also be referred to as classification loss.
[0086] In some examples, the first loss 234 may be an L1 loss. In some examples, the first loss 234 may satisfy the formula:
[0087]
[0088] in, represents the first loss 234, B represents the batch size, i represents the index of the training sample of the current batch in the fifth training set, and y i ′ Represents the vector corresponding to the first sub-output 2321 of the i-th training sample in the current batch, y irepresents the vector corresponding to the true value of the i-th training sample in the current batch, and ∥∥ represents the norm of the vector. In this case, the mean absolute error is relatively insensitive to outliers, which can improve the robustness of model training. It should be noted that if batch training is not performed, B involved in the example of the present disclosure can represent the number of samples in the fifth training set.
[0089] refer to Figure 3 , the second loss 235 can represent the difference between the first output 222 of the second training model and the second sub-output 2322 of the third model 230. In this case, it is convenient to make the second sub-output 2322 approach the first output 222 when optimizing without a segmentation standard (that is, there is no annotation for the lesion area in the annotation result of the fifth training set), so that the extraction capability of fine-grained features in the second training model can be transferred to the third model 230, so that when the training samples with lesion area annotation are limited, the third model 230 can obtain the extraction capability of fine-grained features without relying on the annotation of the lesion area, and then the third model 230 can output the lesion area when outputting the disease grade. The second loss 235 can also be called fine-grained knowledge distillation loss.
[0090] In some examples, the second loss 235 may satisfy the formula:
[0091]
[0092] in, represents the second loss 235, B represents the batch size, i represents the index of the training sample of the current batch in the fifth training set, represents the first segmentation probability of the i-th training sample in the current batch, represents the second segmentation probability of the i-th training sample in the current batch, and KL() represents a function for comparing KL (Kullback-Leibler) divergences. In addition, the first segmentation probability may be the segmentation probability corresponding to the first output 222, and the second segmentation probability may be the segmentation probability corresponding to the second sub-output 2322. In this case, it is convenient to measure the difference in distribution between the two probabilities, so that the model can pay more attention to the shape of the feature distribution, thereby further improving the ability to extract fine-grained features.
[0093] In addition, the third loss 236 can represent the concentration degree of the first sub-output 2321 near the discrete disease classification. In this case, during optimization, it is convenient to concentrate the first sub-output 2321 near the discrete disease classification, so as to obtain a classification consistent with the standard disease classification, which can further improve the accuracy of corneal staining analysis. That is, the third model 230 can have some prior information of ophthalmologists. In addition, the concentration degree can refer to the degree to which the data is concentrated within a certain range (for example, near the discrete disease classification). The third loss 236 can also be called the prototype feature extraction loss.
[0094] Taking dry eyes as an example, the continuous value of the third model 230 can be linked to the discrete rating of the corneal staining score followed by the doctor clinically. That is, the doctor's score is discrete, but the output of the third model 230 is continuous. For example, the doctor's score may be 0.5, 1.5, 2 and 2.5, but the output of the third model 230 can be a continuous value from 0 to 4. The third loss 236 can enable the third model 230 to learn some expected more important thresholds. For example, assuming that the scores of 1.5 and 2 are more important, the third loss 236 can enable the third model 230 to approach these two scores.
[0095] refer to Figure 3 In some examples, the third loss 236 may be determined by the third model 230 for the feature information extracted from the training samples in the current batch and the prototype feature 237 of each disease classification. In addition, the prototype feature 237 may represent representative feature information of a disease classification. In some examples, the third loss 236 may satisfy the formula:
[0096]
[0097] in, represents the third loss 236, B represents the batch size, i represents the index of the training sample of the current batch in the fifth training set, C represents the number of discrete disease classifications (for example, the number of disease classifications can be the above 9 categories), j represents the index of the discrete disease classification, and f i represents the feature information extracted by the third model 230 for the i-th training sample in the current batch, p j Represents the prototype feature 237 of the jth disease classification corresponding to the current batch, y i represents the true value of the i-th training sample, Indicates the current batch and y i Corresponding prototype feature 237, τ represents the temperature coefficient, exp() represents the exponential function, and "·" represents the dot product. In addition, the temperature coefficient can be a hyperparameter for controlling the degree of clustering. Thus, the intra-class aggregation capability of feature information can be enhanced.
[0098] In addition, the prototype feature 237 of each disease classification can be dynamically updated in each batch. In some examples, the true value of the training sample in each batch can be used to determine the training sample used to update the prototype feature 237 of the corresponding disease classification. For example, for a disease classification of 1, the prototype feature 237 of the disease classification of 1 can be updated using the training sample whose true value is 1 in each batch.
[0099] In some examples, the current batch and y i The corresponding prototype feature 237 can satisfy the formula:
[0100]
[0101] in, Indicates the previous batch and y i The corresponding prototype feature is 237, Indicates the current batch and y i Corresponding prototype features 237, α represents a hyperparameter, and α is used to control the smoothness of cluster update. In this case, the prototype features 237 of the previous batch can be considered, and so on, and finally the prototype features 237 of all training samples can be integrated to determine the third loss 236 when the video memory is limited, thereby improving the accuracy of the model.
[0102] In some examples, the initial value of the prototype feature 237 of each disease classification can be determined based on a clustering algorithm. Specifically, the initial third model 230 is used to extract feature information for multiple training samples in the fifth training set, and the multiple feature information is clustered, and the cluster center is used as the initial value of the prototype feature 237 of each disease classification. In this case, the initial value of the prototype feature 237 of the corresponding disease classification can be easily obtained, and when the encoder 2301 of the initial third model 230 is the encoder of the second training model, the initial value of the prototype feature 237 has a certain accuracy. In some examples, the clustering algorithm can be a k-means algorithm, which can also be called a K-means clustering algorithm.
[0103] refer to Figure 3 In some examples, the feature information of the training samples involved in the third loss 236 may be feature information output by the encoder 2301 of the third model 230 .
[0104] As described above, in some examples, multiple losses may be weighted to determine a total loss, and the total loss may be used to optimize the third model 230. In some examples, the total loss may satisfy the formula:
[0105]
[0106] Among them, λgrade represents a hyperparameter for controlling the weight of the first loss 234, λ proto represents a hyperparameter for controlling the weight of the third loss 236, λ dist represents a hyperparameter for controlling the weight of the second loss 235.
[0107] In some examples, weights may be set based on the degree of influence of the second loss 235 and the third loss 236 on the first loss 234. For example, the third loss 236 generally has the greatest influence and may be given the smallest weight. grade can be 1, and λ proto <λ dist <λ grade In this case, while comprehensively considering the lesion region identification and disease grade distribution, the influence of the correlation loss on the relatively important disease grade can be reduced, so that the third model 230 can be more focused on the disease grade of the regional image. grade Can be 1, λ dist can be 0.5, λ proto It may be 0.05. It should be noted that this does not limit the present disclosure, and corresponding adjustments may be made according to the performance of the third model 230.
[0108] Figure 4 is an exemplary flowchart showing the batch-based training of the third model 230 involved in the example of the present disclosure.
[0109] As described above, in some examples, multiple batches can be determined by the fifth training set, and multiple losses can be determined based on the training samples of each batch. To this end, the example of the present disclosure also provides an exemplary process for training the third model 230 based on batches. It should be noted that the exemplary process is also applicable when the batch is replaced with the fifth training set. Figure 4 , the exemplary process may include:
[0110] Step S210: Initialize the encoder 2301 of the third model 230 using the encoder of the second training model.
[0111] Step S220: sequentially obtain a batch from the multiple batches as the current batch. For example, in the first training, the first batch can be obtained from the multiple batches as the current batch, and in the next training, the second batch can be obtained from the multiple batches as the current batch.
[0112] Step S230 : input the current batch of training samples into the third model 230 to obtain the second output 232 .
[0113] Step S240: Using the second training model to take the current batch of training samples as input to obtain the first output 222 corresponding to the second output 232. Specifically, for a training sample, the second output 232 can be obtained when the third model 230 is input, and the first output 222 can be obtained when the second training model is input.
[0114] Step S250: Determine multiple losses based on the first output 222 and the second output 232 of the current batch of training samples. For details, see the description of multiple losses in the above step S140.
[0115] Step S260: Utilize multiple losses to optimize the third model 230. For details, refer to the description of optimizing the third model 230 in the above step S140.
[0116] In addition, step S220 to step S260 may be repeatedly executed until the training stop condition is met, and finally the third training model 420 is obtained.
[0117] Figure 5 is an exemplary block diagram showing a training system 300 involved in the examples of the present disclosure.
[0118] The present disclosure also relates to a training system 300 for corneal staining analysis based on deep learning, and the training system 300 may include at least one processing circuit. The at least one processing circuit is configured to perform one or more steps in the above-mentioned training method. It should be noted that, unless there is a contradiction, the above-mentioned description of the training method is also applicable to the training system 300. In addition, the training system 300 for corneal staining analysis based on deep learning may also be referred to as a training system 300, a learning system, or an inference system, etc.
[0119] refer to Figure 5 In some examples, the training system 300 may include a first training module 310, a second training module 320, and a third training module 330. The first training module 310 may be used to train the first model 210. The second training module 320 may be used to train the second model 220. The third training module 330 may be used to train the third model 230.
[0120] In some examples, the first training module 310 may be used to train the first model 210 using the first training set, for details see the relevant description of the above step S110.
[0121] In some examples, the second training module 320 can be used to train the second model 220 using the fourth training set. In some examples, the fourth training set can be determined based on the third training set. In some examples, the third training set can be determined by extracting the regional image corresponding to the disease in the second training set using the first training model 410. For details, see the relevant description of the above steps S120 and S130.
[0122] In some examples, the third training module 330 may be used to train the third model 230 using the fifth training set. The fifth training set may be determined based on the third training set. In addition, the encoder 2301 of the third model 230 may be initialized as the encoder of the second training model. For details, see the relevant description of the above step S140.
[0123] The following combination Figure 6 The present disclosure example describes a deep learning-based corneal staining analysis method (hereinafter referred to as the analysis method). Figure 6 is a flowchart illustrating an example of an analysis method to which the present disclosure examples relate. Figure 7 is a schematic diagram showing a corneal staining analysis process 400 involved in an example of the present disclosure.
[0124] refer to Figure 6 The analysis method may include step S310. In step S310, an image to be predicted of a subject may be acquired. The image to be predicted may be a corneal staining image to be predicted.
[0125] refer to Figure 6 The analysis method may further include step S320. In step S320, the analysis result for the image to be predicted may be determined using the first training model 410 and the third training model 420.
[0126] Specifically, refer to Figure 7 In the corneal staining analysis process 400, the first training model 410 may be used to determine the image of the region to be predicted for the image to be predicted, and the third training model 420 may be used to determine the analysis result of the image of the region to be predicted. In some examples, the first training model 410 may be used to extract the image of the region to be predicted according to different diseases.
[0127] In addition, the analysis results may include at least the disease classification and information related to the lesion area. In some examples, the analysis results may include the disease classification and the lesion area. In some examples, the lesion area may be represented as a highlighted heat map of the corresponding lesion.
[0128] The example of the present disclosure also discloses a corneal staining analysis system based on deep learning, and the corneal staining analysis system may include at least one processing circuit. The at least one processing circuit is configured to perform one or more steps in the above-mentioned analysis method.
[0129] The examples of the present disclosure also disclose a computer-readable storage medium, which can store at least one instruction, and when the at least one instruction is executed by a processor, one or more steps in the above-mentioned training method or analysis method are implemented. Wherein, the computer-readable storage medium can include but is not limited to any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a micro drive and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), or any type of medium or device suitable for storing instructions and / or data.
[0130] The scheme involved in the examples of the present disclosure can extract global features related to disease grading in corneal staining images while maintaining sufficient fine-grained feature understanding capabilities. Based on the scheme involved in the examples of the present disclosure, a continuous score (for example, a disease grade in the range of 0 to 4) can be given to assist doctors in judging subtle changes in lesions, achieve accurate disease monitoring, and assist doctors in quickly locating the development stage of ophthalmic diseases.
[0131] In addition, during the model training phase, the lesion extraction capability of the second training model is transferred to the third model 230 through the knowledge distillation algorithm, thereby providing a more effective and explainable lesion area prompt while giving the disease classification. In addition, the scheme involved in the example of the present disclosure can be easily extended to a variety of eye diseases, and then the corresponding staining rating and lesion heat map can be given, reducing the time cost of the screening process and the prognosis of disease development.
[0132] The solution involved in the example of the present disclosure, by introducing fine-grained feature analysis, can achieve performance closer to or even better than that of senior doctors in multiple ophthalmic diseases including dry eyes.
[0133] Figure 8 Schematic diagram showing the comparison between the analysis method involved in the example of the present disclosure (hereinafter referred to as the present invention) and other methods.
[0134] In addition, the inventors also conducted external validation, confirming that it has comparable sensitivity, specificity and effectiveness with experienced corneal experts in corneal punctate staining scoring and detection, and has higher stability. To this end, the present disclosure also provides some experimental results, in which, taking dry eye as an example, the corneal staining image is corneal imaging after passing through fluorescein dye. In addition, internal validation refers to validation on a training set, external validation refers to validation on real-world data that has not been seen before the model, the Pearson Correlation Coefficient is used to measure the correlation between the expert score or the score of the present invention and the true value, and the t-test is a statistical method for comparing whether there is a significant difference between the mean values of two groups, and the p-value of the t-test provides information on whether the difference in the mean values of the two groups of data is significant.
[0135] Take dry eyes as an example. Figure 8 The second image set C21 after highlighting the lesion area of the original first image set C20 by the present invention is shown, wherein the bright area is the thermal area where the model considers the lesion area. In addition, for the convenience of comparison, Figure 8 A third image set C22 obtained by another method different from the present invention is also shown. In addition, in the first image set C20, the first image P30 represents a mild dry eye image, the second image P31 represents a moderate dry eye image, and the third image P32 represents a severe dry eye image.
[0136]
[0137] Table 1 Performance comparison between the present invention and middle and senior doctors
[0138] It can be seen from Table 1 that the Pearson correlation coefficient of the present invention is the largest in both internal and external validation, and the P value shows a significant difference.
[0139]
[0140] Table 2 Experimental results of different loss combinations in the present invention
[0141] From Table 2, we can see that when using the hierarchical loss, the performance of using both the prototype feature extraction loss and the fine-grained knowledge distillation loss is the best.
[0142] Although the present disclosure is specifically described above in conjunction with the accompanying drawings and examples, it is to be understood that the above description does not limit the present disclosure in any form. Those skilled in the art may modify and change the present disclosure as needed without departing from the essential spirit and scope of the present disclosure, and these modifications and changes all fall within the scope of the present disclosure.
Claims
1. A training method for corneal staining analysis based on deep learning, characterized in that: include: A first model is trained using a first training set, wherein the first training set is a public data set for object detection and includes multiple corneal staining images, and the first model is based on a UNET model; the trained first model is used to extract regional images corresponding to the disease in a second training set including multiple corneal staining images, and a third training set is determined based on the multiple regional images; a second model is trained using a fourth training set determined based on the third training set, wherein the second model is used to segment the lesion area and has a first output related to the segmentation probability, wherein the regional images are selected from the third training set to form the fourth training set, the second model is based on a UNET model and the corresponding segmentation probability is the probability that each pixel in the training sample belongs to the corresponding lesion area; and a third model based on deep learning is trained using a fifth training set determined based on the third training set, the encoder of the third model is initialized to the encoder of the trained second model, the second output of the third model includes a first sub-output and a second sub-output, the first sub-output is related to the disease grade, and the second sub-output is related to the segmentation probability, wherein the fourth The number of samples in the training set is less than the number of samples in the fifth training set. In training the third model, the third model is optimized based on multiple losses determined by the fifth training set, the multiple losses include a first loss, a second loss and a third loss, the first loss represents the difference between the first sub-output and the true value, the second loss represents the difference between the first output and the second sub-output of the trained second model, the third loss represents the concentration degree of the first sub-output near the discrete disease grade, the trained first model and the trained third model are used for corneal staining analysis, the regional image is selected from the third training set to form the fifth training set or the third training set is directly used as the fifth training set, the third model is based on the UNET model and the corresponding segmentation probability is the probability that each pixel in the training sample belongs to the corresponding disease grade, the third model has at least one encoder and two decoders, one decoder is used for disease grade to determine the first sub-output, and the other decoder is used for segmentation to determine the second sub-output, and the two decoders share an encoder, The second loss satisfies the formula: in, represents the second loss, B represents the batch size, i represents the index of the training samples of the current batch in the fifth training set, represents the first segmentation probability of the i-th training sample in the current batch, represents the second segmentation probability of the i-th training sample in the current batch, KL() represents a function for comparing KL divergences, the first segmentation probability is the segmentation probability corresponding to the first output, the second segmentation probability is the segmentation probability corresponding to the second sub-output, The third loss is determined by the third model for the feature information extracted from the training samples in the current batch and the prototype feature of each disease classification, wherein the prototype feature represents representative feature information of a disease classification, and the third loss satisfies the formula: in, represents the third loss, B represents the batch size, i represents the index of the training samples of the current batch in the fifth training set, C represents the number of discrete disease classifications, j represents the index of the discrete disease classification, and f i represents the feature information extracted by the third model for the i-th training sample in the current batch, p j represents the prototype feature of the jth disease classification of the current batch, y i represents the true value of the i-th training sample, Indicates the current batch and y i Corresponding prototype features, τ represents the temperature coefficient, exp() represents the exponential function, "·" represents the dot product, and the temperature coefficient is a hyperparameter used to control the degree of clustering.
2. The method for training corneal staining analysis based on deep learning according to claim 1, characterized in that: The labeling result of the fourth training set is determined by roughly labeling the training samples in the fourth training set.
3. The training method for corneal staining analysis based on deep learning according to claim 1, characterized in that: The plurality of regional images are subjected to data enhancement processing to serve as the third training set, wherein the data enhancement processing includes at least one of rotation, flipping and color conversion.
4. The training method for corneal staining analysis based on deep learning according to claim 1, characterized in that: The current batch and y i The corresponding prototype characteristics satisfy the formula: in, Indicates the previous batch and y i The corresponding prototype features, Indicates the current batch and y i The corresponding prototype features, α represents the hyperparameter.
5. The method for training corneal staining analysis based on deep learning according to claim 4, characterized in that: The initial third model is used to extract feature information for a plurality of training samples in the fifth training set, the plurality of feature information extracted by the initial third model is clustered, and the cluster center is used as the initial value of the prototype feature of each disease classification.
6. A training system for corneal staining analysis based on deep learning, characterized in that: The method comprises at least one processing circuit, wherein the at least one processing circuit is configured to execute the training method for corneal staining analysis based on deep learning as described in any one of claims 1 to 5.
7. A corneal staining analysis method based on deep learning, characterized in that: include: Acquiring an image to be predicted of a subject; and According to the training method for corneal staining analysis based on deep learning described in any one of claims 1 to 5, a trained first model and a trained third model are obtained, the trained first model is used to determine the image of the area to be predicted for the image to be predicted, and the trained third model is used to determine the disease grade and lesion area for the image of the area to be predicted.
8. A corneal staining analysis system based on deep learning, characterized in that: It includes at least one processing circuit, and the at least one processing circuit is configured to: execute the deep learning-based corneal staining analysis method described in claim 7.
