A method for constructing a tear detection model, a tear detection method, a device and an apparatus

By constructing a deep learning model and based on the ocular surface image of the tear river stained with fluorescein sodium, non-invasive epiphora detection is achieved, which solves the difficulties of inaccurate detection and invasive examination in the existing technology, and improves the accuracy and accuracy of detection. Security.

CN118279702BActive Publication Date: 2024-09-27AIER EYE HOSPITAL GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410704293.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-03
Publication Date
2024-09-27
Estimated Expiration
2044-06-03

AI Technical Summary

Technical Problem

The detection of epiphora in the existing technology is inaccurate, and invasive examination methods can easily lead to false tracts and infections, which brings difficulties to young doctors and patients.

Method used

By constructing an epiphora detection model and using deep learning technology, based on the ocular surface images stained with fluorescein sodium, the image quality screening model, the preliminary diagnosis model of the degree of epiphora, and the mild to moderate binary classification model are trained to achieve non-invasive epiphora detection. Overflow detection.

Benefits of technology

It improves the accuracy and safety of epiphora detection, reduces the risk to doctors and patients, and provides a convenient and efficient diagnostic tool that is close to the accuracy of doctor's diagnosis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118279702B
    Figure CN118279702B
Patent Text Reader

Abstract

The present invention discloses a method for constructing a tearing detection model, a tearing detection method, a device and an apparatus, which are applied to the field of artificial intelligence, including: obtaining an ocular surface image after tear meniscus staining with sodium fluorescein as sample data; training an image quality screening model with sample data of qualified quality and unqualified quality to obtain a trained image quality screening model; training a preliminary diagnosis model for tearing degree with sample data of normal, mild to moderate tearing and severe tearing to obtain a trained preliminary diagnosis model for tearing degree; training a mild to moderate binary classification model with sample data of moderate tearing and mild tearing to obtain a trained mild to moderate binary classification model; the trained image quality screening model, the trained preliminary diagnosis model for tearing degree and the trained mild to moderate binary classification model form a tearing detection model. The invention has created a research paradigm for automatically judging the tearing degree based on tear meniscus staining of ocular surface images, realizing non-invasive detection and being able to accurately detect the tearing degree.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a method and device for constructing a tearing detection model, a tearing detection method, device, equipment and a computer-readable storage medium. Background Art

[0002] Lacrimal disease is mainly caused by abnormalities in the tear duct or tear gland and ocular surface structure. The main manifestation of lacrimal disease is tearing, which is caused by stenosis or obstruction of the tear duct. It can occur in chronic dacryocystitis, tear duct obstruction, stenosis and other diseases.

[0003] Clinically, the lesion can be diagnosed by flushing the tear duct, or surgical treatments such as probing, threading or intubation can be tried. However, the use of tear duct flushing to diagnose epiphora is an invasive examination. It is easy to produce complications such as false passages and infections. And it must have certain instruments and aseptic conditions. It is particularly challenging for young doctors. First, experienced doctors are needed to perform the operation, and second, patients also need to cooperate well. This is undoubtedly a huge consumption of front-line clinical resources, and it also brings a certain psychological pressure to patients. The examination method directly affects the examination results.

[0004] Therefore, how to accurately detect patients' tearing in a non-invasive manner is an urgent problem that needs to be solved. Summary of the invention

[0005] In view of this, an object of the present invention is to provide a method and device for constructing a tear epilepsy detection model, a tear epilepsy detection method, device, equipment and a computer-readable storage medium, which solve the problem of inaccurate tear epilepsy detection in the prior art.

[0006] In order to solve the above technical problems, the present invention provides a method for constructing a tear detection model, comprising:

[0007] Acquire sample data for training, wherein the sample data are respectively labeled with types, wherein the type labels include qualified quality and unqualified quality; the qualified quality includes normal, mild to moderate tearing, and severe tearing, and the mild to moderate tearing includes mild tearing and moderate tearing; the sample data is an ocular surface image after tear meniscus is stained with sodium fluorescein;

[0008] Using the sample data of the type marked as qualified quality and the sample data of the type marked as unqualified quality as training data of the image quality screening model to train, thereby obtaining a trained image quality screening model;

[0009] The sample data marked as normal, the sample data marked as mild to moderate tearing, and the sample data marked as severe tearing are used as training data for a preliminary diagnosis model of tearing degree to train, so as to obtain a trained preliminary diagnosis model of tearing degree;

[0010] The sample data with the type marked as moderate epiphora and the sample data with the type marked as mild epiphora are used as training data for a mild-to-moderate binary classification model to obtain a trained mild-to-moderate binary classification model;

[0011] The trained image quality screening model, the trained tearing degree preliminary diagnosis model and the trained mild to moderate binary classification model form a tearing detection model.

[0012] Optionally, the image quality screening model is a GoogleNet model; the tearing degree preliminary diagnosis model and the mild to moderate model binary classification model are BiseNet models.

[0013] Optionally, the obtaining of sample data for training includes:

[0014] The ocular surface image of the tear meniscus stained with sodium fluorescein is acquired based on diffuse illumination of cobalt blue light from a slit lamp and optical zoom.

[0015] Optionally, the sample data with the type marked as moderate epiphora and the sample data with the type marked as mild epiphora are used as training data for a mild-to-moderate binary classification model to obtain a trained mild-to-moderate binary classification model, wherein the mild-to-moderate binary classification model is a BiseNet model, including:

[0016] The image pixel values ​​of the training data of the mild-moderate binary classification model are adjusted to a preset size, and data enhancement, flipping, and brightness adjustment are performed to obtain processed training data;

[0017] Input the processed training data into the convolution layer, pooling layer, and fully connected layer based on the BiseNet model to obtain a classification result;

[0018] The loss value is calculated using the classification result, the actual type label and the loss function;

[0019] The loss value is used to optimize the model parameters of the mild-to-moderate binary classification model until the training end condition is reached, then the training is stopped to obtain the trained mild-to-moderate binary classification model.

[0020] The present invention also provides a method for detecting epiphora, which is applied to a computer and comprises:

[0021] Obtaining an image to be detected of a target user and a tearing detection model obtained by using the tearing detection model construction method described above; the image to be detected is an ocular surface image after tear meniscus is stained with sodium fluorescein;

[0022] Inputting the image to be detected into the image quality screening model trained in the tearing detection model to determine whether the image to be detected meets the image quality standard;

[0023] If not, re-collect the image of the target user to be detected;

[0024] If it is in compliance, the detection image is input into the preliminary diagnosis model of the degree of epiphora trained in the epiphora detection model to obtain a preliminary detection result of the image;

[0025] If the preliminary detection result of the image is severe tearing or normal, then end;

[0026] If the preliminary detection result of the image is mild to moderate tearing, the image to be detected is input into the mild to moderate binary classification model trained in the tearing detection model to obtain the final detection result of the image.

[0027] Optionally, obtaining the image to be detected of the target user includes:

[0028] Based on the diffuse illumination of cobalt blue light from a slit lamp and optical zoom, an ocular surface image of the target user's tear meniscus stained with sodium fluorescein is acquired.

[0029] The present invention also provides a device for constructing a tearing detection model, comprising:

[0030] An acquisition module is used to acquire sample data for training, wherein the sample data are respectively labeled with types, wherein the type labels include qualified quality and unqualified quality; the qualified quality includes normal, mild to moderate tearing and severe tearing, and the mild to moderate tearing includes mild tearing and moderate tearing; the sample data is an ocular surface image after tear meniscus is stained with sodium fluorescein;

[0031] An image quality screening model training module is used to train the sample data of the type marked as qualified quality and the sample data of the type marked as unqualified quality as training data of the image quality screening model to obtain a trained image quality screening model;

[0032] A preliminary diagnosis model training module for the degree of tearing, used to train the sample data marked as normal, the sample data marked as mild to moderate tearing, and the sample data marked as severe tearing as training data for the preliminary diagnosis model for the degree of tearing, to obtain a trained preliminary diagnosis model for the degree of tearing;

[0033] A mild-to-moderate binary classification model training module is used to train the sample data with the type marked as moderate tearing and the sample data with the type marked as mild tearing as training data of the mild-to-moderate binary classification model to obtain a trained mild-to-moderate binary classification model;

[0034] A construction module is used to form a tearing detection model by combining the trained image quality screening model, the trained tearing degree preliminary diagnosis model and the trained mild to moderate binary classification model.

[0035] The present invention also provides a tearing detection device, which is applied to a computer and comprises:

[0036] The module for acquiring an image to be detected and a model is used to acquire an image to be detected of a target user and a tearing detection model obtained by using the tearing detection model construction method described above; the image to be detected is an ocular surface image after the tear meniscus is stained with sodium fluorescein;

[0037] An image quality screening module, used for inputting the image to be detected into the image quality screening model trained in the tear overflow detection model to determine whether the image to be detected meets the image quality standard;

[0038] A first result module, used for re-collecting the image to be detected of the target user if it does not meet the requirements;

[0039] a preliminary diagnosis module for the degree of epiphora, for inputting the detection image into a preliminary diagnosis model for the degree of epiphora trained in the epiphora detection model to obtain a preliminary detection result of the image if the condition is met;

[0040] A second result module, configured to end the process if the preliminary detection result of the image is severe tearing or normal;

[0041] The mild-to-moderate binary classification module is used to input the image to be detected into the mild-to-moderate binary classification model trained in the tearing detection model if the preliminary detection result of the image is mild-to-moderate tearing, so as to obtain the final detection result of the image.

[0042] The present invention also provides a tearing detection device, comprising:

[0043] Memory for storing computer programs;

[0044] A processor is used to implement the above method when executing the computer program.

[0045] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the above method is implemented.

[0046] It can be seen that the present invention obtains sample data for training, and the sample data are respectively labeled with types, and the type labels include qualified quality and unqualified quality; qualified quality includes normal, mild to moderate tearing and severe tearing, and mild to moderate tearing includes mild tearing and moderate tearing; the sample data is an ocular surface image after the tear river is stained with sodium fluorescein; the sample data with type labels as qualified quality and the sample data with type labels as unqualified quality are used as training data for the image quality screening model to train a trained image quality screening model; the sample data with type labels as normal, the sample data with type labels as mild to moderate tearing and the sample data with type labels as severe tearing are used as training data for the preliminary diagnosis model of the tearing degree to train a trained preliminary diagnosis model of the tearing degree; the sample data with type labels as moderate tearing and the sample data with type labels as mild tearing are used as training data for the mild to moderate binary classification model to train a trained mild to moderate binary classification model; the trained image quality screening model, the trained preliminary diagnosis model of the tearing degree and the trained mild to moderate binary classification model constitute a tearing detection model.

[0047] In addition, the present invention also provides a tearing detection model construction device, a tearing detection method, a device, a device and a computer-readable storage medium, which also have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0049] Figure 1 A flowchart of a method for constructing a tearing detection model provided by an embodiment of the present invention;

[0050] Figure 2 A flowchart of a method for detecting epiphora provided by an embodiment of the present invention;

[0051] Figure 3 A schematic diagram of the structure of a device for building a tearing detection model provided by an embodiment of the present invention;

[0052] Figure 4 A schematic structural diagram of a tear overflow detection device provided by an embodiment of the present invention;

[0053] Figure 5 A schematic structural diagram of a tear overflow detection device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] Lacrimal disease is mainly caused by abnormalities in the tear duct or tear gland and ocular surface structure. The main manifestation of lacrimal disease is tearing, which is caused by stenosis or obstruction of the tear duct. It can occur in chronic dacryocystitis, tear duct obstruction, stenosis and other diseases. Clinically, the lesion can be diagnosed by flushing the tear duct, and surgical treatments such as probe probing, threading or intubation can also be tried. However, the use of tear duct flushing to determine tearing disease is an invasive examination. It is easy to produce complications such as false channels and infections. And certain instruments and sterile conditions are required. It is especially challenging for young doctors. First, experienced doctors are needed to perform the operation, and second, patients also need to cooperate well. This is undoubtedly a huge consumption of front-line clinical resources and also brings certain psychological pressure to patients.

[0056] With the rapid development of deep learning technology, there are application scenarios in all walks of life, and there are countless products that combine medical care with AI (Artificial Intelligence). For example, AI fundus cameras can automatically analyze fundus images while taking fundus photos, and give possible fundus diseases and treatment recommendations. Ophthalmologists can further analyze the diseases predicted by AI. Therefore, AI fundus cameras can assist ophthalmologists in diagnosing fundus diseases and improve the efficiency of diagnosis and treatment. Inspired by related work, this application proposes a new tear overflow detection method that can automatically identify whether there is a tear apparatus disease and judge the degree of tear overflow. It has a high recognition accuracy and can be used in clinical screening for early tear apparatus diseases. It can provide professional ophthalmologists with reliable diagnostic references and improve the diagnostic efficiency of tear apparatus diseases.

[0057] Please refer to Figure 1 , Figure 1 A flowchart of a method for constructing a tear detection model provided by an embodiment of the present invention. The method may include:

[0058] S101: Obtain sample data for training. The sample data are labeled with types, including qualified quality and unqualified quality. Qualified quality includes normal, mild to moderate tearing, and severe tearing. Mild to moderate tearing includes mild tearing and moderate tearing. The sample data is an ocular surface image after tear meniscus is stained with sodium fluorescein.

[0059] The sample data in this embodiment is the ocular surface image after the tear meniscus is stained with sodium fluorescein. The specific practical process is to drop a dye on a test paper, insert the test paper into the lower eyelid, and rotate the eye in a circle, so that the tear meniscus will be stained, and then use a small laser pen to illuminate the eye, and the tear meniscus will appear blue. At this time, use a camera or mobile phone to take a picture to obtain sample data for training. This embodiment collects sample data collected by the above method from the clinic, and then has experienced ophthalmologists label them, specifically including 5 categories, namely mild tearing, moderate tearing, severe tearing, normal, and unqualified image quality.

[0060] Furthermore, in order to ensure the validity and accuracy of the sample data, the above-mentioned acquisition of sample data for training may include the following steps, which may specifically include:

[0061] Based on the diffuse illumination of cobalt blue light from a slit lamp and optical zoom, ocular surface images of the tear meniscus stained with sodium fluorescein were acquired.

[0062] The sample data used for training in this embodiment can all be ocular surface images of the original tear meniscus stained with fluorescein sodium under diffuse illumination of cobalt blue light from a slit lamp and 6x optical zoom. For the accuracy of detection, this embodiment uses sodium fluorescein to stain the tear meniscus; for the clarity of the photo, the ocular surface images are collected under diffuse illumination of cobalt blue light from a slit lamp and 6x optical zoom.

[0063] S102: Using sample data with a type label as qualified quality and sample data with a type label as unqualified quality as training data for an image quality screening model to train an image quality screening model to obtain a trained image quality screening model.

[0064] In this embodiment, sample data with two types of labels, qualified quality and unqualified quality, are used as training data for the image quality screening model to obtain a trained image quality screening model. This embodiment does not limit the image quality screening model. The purpose of the image quality screening model in this embodiment is to control the image quality, because in ophthalmic clinical diagnosis and the collection of tear images (sample data), due to the blinking, movement of the subject, or the unclean lens, lighting, staining or magnification of the shooting equipment, etc., the target data finally collected contains some sample data that cannot be directly used for training the model. If there is a large amount of this type of data during model training, the training of the model will be greatly affected. Therefore, in this part, an image quality diagnosis model is obtained based on the collected sample data. Specifically, an image quality diagnosis model dataset is constructed for the labeled sample data. Each category is split into a training set and a test set at a ratio of 9:1. Multiple deep learning models are selected for training and testing (such as: VGG (Visual Geometry Group, convolutional neural network model), ResNet (residual network structure), BiseNet (Sementic Segmentation, image semantic segmentation network), GoogleNet (convolutional neural network), ViT (Vision Transformer, image classification model)) to obtain the model with the best accuracy. The best model is used as the main body of the image quality diagnosis module to diagnose the quality of the input data and determine whether it can enter the next stage.

[0065] S103: Using the sample data labeled as normal, the sample data labeled as mild to moderate epiphora, and the sample data labeled as severe epiphora as training data for a preliminary diagnosis model for the degree of epiphora to obtain a trained preliminary diagnosis model for the degree of epiphora.

[0066] This embodiment does not directly construct a four-classification model, because if four categories are predicted at the same time, that is, mild epiphora, moderate epiphora, severe epiphora, and normal, the overall accuracy of the model will be greatly reduced, because the model mainly judges the category based on the tear manifold height, and the tear manifold heights of mild and moderate epiphora are very close. Therefore, it is necessary to train in stages to obtain two decreasing discrimination models.

[0067] In this embodiment, sample data with three labels of mild to moderate epiphora, severe epiphora and normal are used as training data for the preliminary diagnosis model of epiphora to obtain a trained preliminary diagnosis model of epiphora. This embodiment does not limit the preliminary diagnosis model of epiphora.

[0068] Specifically, the labeled sample data was integrated, mild and moderate tearing were merged into one category (mild and moderate tearing), the other two categories (severe tearing and normal) remained unchanged, and each category was divided into a training set and a test set at a ratio of 9:1. Multiple deep learning models were selected for training and testing to obtain the model with the best accuracy.

[0069] S104: Using the sample data labeled as moderate epiphora and the sample data labeled as mild epiphora as training data for a mild-to-moderate binary classification model to obtain a trained mild-to-moderate binary classification model.

[0070] In this embodiment, the sample data of mild epiphora and moderate epiphora are used as training data of the mild-moderate binary classification model to obtain a trained mild-moderate binary classification model. This embodiment does not limit the mild-moderate binary classification model.

[0071] In this embodiment, the execution steps of step S102 to step S104 are not limited. For example, model training can be performed simultaneously, or model training can be performed sequentially.

[0072] S105: The trained image quality screening model, the trained tearing degree preliminary diagnosis model and the trained mild to moderate binary classification model constitute a tearing detection model.

[0073] After the training of each model in step S102 to step S104 is completed, the entire epiphora detection model is constructed.

[0074] Furthermore, in order to improve the accuracy of detection, the above-mentioned image quality screening model can be a GoogleNet model; the preliminary diagnosis model for the degree of tearing and the binary classification model of the mild to moderate model can be a BiseNet model.

[0075] Each model in step S102 to step S104 uses multiple deep learning models for training and testing, and the optimal model for the image quality screening model is GoogleNet, with an accuracy of 92%; the optimal model for the preliminary diagnosis model of tearing degree and the mild to moderate model binary classification model is BiseNet, with an accuracy of 95%.

[0076] Furthermore, in order to further improve the accuracy of detection, sample data with the type labeled as moderate epiphora and sample data with the type labeled as mild epiphora are used as training data for a mild-to-moderate binary classification model to obtain a trained mild-to-moderate binary classification model, which is a BiseNet model, and can include the following steps:

[0077] Step 21: Adjust the image pixel values ​​of the training data of the mild-moderate binary classification model to a preset size, and perform data enhancement, flipping, and brightness adjustment to obtain processed training data;

[0078] Step 22: Input the processed training data into the convolution layer, pooling layer, and fully connected layer based on the BiseNet model to obtain the classification results;

[0079] Step 23: Use the classification results, actual type labels and loss function to calculate the loss value;

[0080] Step 24: Use the loss value to optimize the model parameters of the mild-moderate binary classification model until the training end condition is reached, then stop the training to obtain the trained mild-moderate binary classification model.

[0081] The training process of the above-mentioned image quality screening model, tearing degree preliminary diagnosis model and mild to moderate binary classification model can all refer to steps 21 to 24, such as first pre-processing the input image of the model, which may specifically include the adjustment of pixel value size, data enhancement, image flipping adjustment, etc., and then input it into the convolution layer, pooling layer and fully connected layer of the corresponding model to obtain the classification result of the model, and calculate the loss value based on the classification result of the model and the label of the original input image and the loss function, and adjust the model parameters according to the loss value. When the end condition is met, the training result is reached. The end condition can be that the loss value reaches a preset value; or the number of training times reaches a preset number.

[0082] The method for constructing a tearing detection model provided by the embodiment of the present invention is applied. By acquiring sample data for training, the sample data are respectively labeled with types, and the type labels include qualified quality and unqualified quality; qualified quality includes normal, mild to moderate tearing and severe tearing, and mild to moderate tearing includes mild tearing and moderate tearing; the sample data is an ocular surface image after the tear meniscus is stained with sodium fluorescein; the sample data with the type labeling as qualified quality and the sample data with the type labeling as unqualified quality are used as training data of the image quality screening model to obtain a trained image quality screening model; the type labeling is used as the training data of the image quality screening model to obtain the trained image quality screening model. Sample data marked as normal, sample data marked as mild to moderate tearing, and sample data marked as severe tearing are used as training data for the preliminary diagnosis model of tearing degree to obtain a trained preliminary diagnosis model of tearing degree; sample data marked as moderate tearing and sample data marked as mild tearing are used as training data for the mild to moderate binary classification model to obtain a trained mild to moderate binary classification model; the trained image quality screening model, the trained preliminary diagnosis model of tearing degree, and the trained mild to moderate binary classification model constitute the tearing detection model. This method has created a research paradigm for automatically judging the tearing degree based on tear river staining ocular surface images, and the tearing detection model provided includes three levels of models, which is more conducive to accurately determining the tearing degree. Different from the traditional one-stage deep learning model, it connects multiple models that implement subtasks in series according to actual needs, that is, multi-stage model series connection. At the same time, it can be decoupled during training, that is, parallel training, to improve the training efficiency of the model. Finally, this method can achieve one-stop diagnosis of epiphora quality, preliminary classification of epiphora, and subdivision of moderate and mild epiphora, summarize and organize the results, and output the final results of whether the patient has epiphora and the degree of epiphora. It can be used for clinical assistance and treatment reference.

[0083] Please refer to Figure 2 , Figure 2 A flowchart of a method for detecting epiphora provided in an embodiment of the present invention is provided. The method is applied to a computer and may include:

[0084] S201: Obtain an image to be detected of a target user and a tearing detection model obtained by using the tearing detection model construction method described above; the image to be detected is an ocular surface image after the tear meniscus is stained with sodium fluorescein.

[0085] The execution subject of this embodiment is a computer, that is, the computer executes a program to implement step 201 to step S205. This embodiment obtains an ocular surface image of the patient, that is, the ocular surface image is an ocular surface image after the tear meniscus is stained with sodium fluorescein.

[0086] Furthermore, in order to improve the accuracy of the image to be detected, the above-mentioned acquisition of the image to be detected of the target user may include the following steps:

[0087] Based on the diffuse illumination of cobalt blue light from a slit lamp and optical zoom, the ocular surface image of the target user's tear meniscus stained with sodium fluorescein is acquired.

[0088] This embodiment collects the ocular surface image of the target user under the diffuse illumination of cobalt blue light of a slit lamp and optical zoom to improve the availability and clarity of the ocular surface image.

[0089] S202: Input the image to be detected into the image quality screening model trained in the tear overflow detection model to determine whether the image to be detected meets the image quality standard.

[0090] This embodiment first uses the image quality screening model to detect the image quality of the image to be detected. If the image quality is unqualified, it needs to be re-captured; if the image quality is qualified, the image automatically enters the next stage.

[0091] S203: If not, re-collect the image to be detected of the target user.

[0092] S204: If it is in compliance, the detection image is input into the preliminary diagnosis model of the degree of epiphora that has been trained in the epiphora detection model to obtain a preliminary detection result of the image.

[0093] In this embodiment, the image to be tested that meets the image quality standards is used as the input of the preliminary diagnosis model of the degree of tearing. Through a series of feature extraction and encoding operations of the model, the predicted category of the degree of tearing of the image is output. In this module, the degree of tearing is divided into three levels (mild to moderate tearing, severe tearing, and normal). If the output is normal, it means that the target user does not suffer from tearing disease. If the output is severe tearing, it means that the target user suffers from a serious tearing disease. If the output is mild to moderate tearing, it means that the target user suffers from a certain degree of tearing disease, but the specific severity cannot be determined, and it needs to continue to be input into the next detection stage to determine the specific degree of tearing.

[0094] S205: If the preliminary detection result of the image is severe tearing or normal, then end.

[0095] S206: If the preliminary detection result of the image is mild to moderate epiphora, the image to be detected is input into the mild to moderate binary classification model trained in the epiphora detection model to obtain the final detection result of the image.

[0096] This step is to further determine the target user's tear level. Through such a hierarchical degree detection model, the accuracy of classification can be ensured.

[0097] The tear detection method provided by the embodiment of the present invention is applied, by obtaining the image to be detected of the target user and the tear detection model obtained by the tear detection model construction method mentioned above; the image to be detected is the ocular surface image after the tear meniscus is stained with sodium fluorescein; the image to be detected is input into the image quality screening model trained in the tear detection model to determine whether the image to be detected meets the image quality standard; if not, the image to be detected of the target user is re-collected; if it meets, the detection image is input into the tear detection model trained in the tear detection model to obtain the preliminary detection result of the image; if the preliminary detection result of the image is severe tearing or normal, the process ends; if the preliminary detection result of the image is mild to moderate tearing, the image to be detected is input into the mild to moderate binary classification model trained in the tear detection model to obtain the final detection result of the image. This method directly takes a photo of the ocular surface stained with the tear meniscus to obtain the image to be detected, and then uses the three-stage detection method provided by the present application, that is, performs detailed detection layer by layer, specifically including the image quality screening model, the preliminary diagnosis model of the tearing degree, and the mild to moderate binary classification model, to achieve non-invasive detection and accurately detect the tearing degree. The tear overflow detection method proposed in this application does not need to use traditional image processing technology to process the image to be detected, obtain the tear meniscus height, and then compare it with the standard card. Instead, it provides a tear overflow detection model and uses deep learning methods to achieve tear overflow detection, which is more convenient, efficient, fast and accurate than traditional processing methods. It also pioneered a research paradigm for automatically judging the degree of tear overflow based on ocular surface data of tear meniscus staining, and directly diagnoses based on ocular surface images, which is more convenient, non-invasive and safe. The diagnostic accuracy is close to that of a doctor's diagnosis, so it has pioneered a research paradigm in this field.

[0098] The following is an introduction to a tear epilepsy detection model construction device provided in an embodiment of the present invention. The tear epilepsy detection model construction device described below and the tear epilepsy detection model construction method described above can be referenced to each other.

[0099] The acquisition module 100 is used to acquire sample data for training, wherein the sample data are respectively labeled by type, wherein the type labeling includes qualified quality and unqualified quality; the qualified quality includes normal, mild to moderate tearing and severe tearing, and the mild to moderate tearing includes mild tearing and moderate tearing; the training sample is an ocular surface image after tear meniscus is stained with sodium fluorescein;

[0100] An image quality screening model training module 200 is used to train the sample data of the type marked as qualified quality and the sample data of the type marked as unqualified quality as training data of the image quality screening model to obtain a trained image quality screening model;

[0101] The module 300 for training the preliminary diagnosis model of the degree of tearing is used to train the sample data with the type marked as normal, the sample data with the type marked as mild to moderate tearing and the sample data with the type marked as severe tearing as the training data of the preliminary diagnosis model of the degree of tearing, so as to obtain a trained preliminary diagnosis model of the degree of tearing;

[0102] A mild-to-moderate binary classification model training module 400 is used to train the sample data with the type marked as moderate epiphora and the sample data with the type marked as mild epiphora as training data of the mild-to-moderate binary classification model to obtain a trained mild-to-moderate binary classification model;

[0103] The construction module 500 is used to form a tearing detection model by combining the trained image quality screening model, the trained tearing degree preliminary diagnosis model and the trained mild to moderate binary classification model.

[0104] Based on the above embodiment, the acquisition module 100 may include:

[0105] The training image acquisition unit is used to acquire the ocular surface image of the tear meniscus stained with sodium fluorescein based on diffuse illumination of cobalt blue light of a slit lamp and optical zoom.

[0106] Based on the above embodiment, the image quality screening model may be a GoogleNet model; the tearing degree preliminary diagnosis model and the mild-to-moderate model binary classification model may be a BiseNet model.

[0107] Based on the above embodiment, the mild-moderate binary classification model training module 400 may include:

[0108] A preprocessing unit, used to adjust the image pixel values ​​of the training data of the mild-moderate binary classification model to a preset size, and perform data enhancement, flipping, and brightness adjustment to obtain processed training data;

[0109] An input unit, used to input the processed training data into the convolution layer, pooling layer, and fully connected layer based on the BiseNet model to obtain a classification result;

[0110] A training unit, used to calculate a loss value using the classification result, the actual type label and the loss function;

[0111] An optimization unit is used to optimize the model parameters of the mild-moderate binary classification model using the loss value until the training end condition is reached, then stop the training to obtain the model of the trained mild-moderate binary classification model.

[0112] The apparatus for constructing a tearing detection model provided by the embodiment of the present invention is applied, and the acquisition module 100 is used to acquire sample data for training, and the sample data are respectively labeled with types, and the type labels include qualified quality and unqualified quality; qualified quality includes normal, mild to moderate tearing and severe tearing, and mild to moderate tearing includes mild tearing and moderate tearing; the sample data is an ocular surface image after the tear meniscus is stained with sodium fluorescein; the image quality screening model training module 200 is used to train the sample data with the type labeled as qualified quality and the sample data with the type labeled as unqualified quality as the training data of the image quality screening model to obtain the trained image quality screening model; the tearing degree preliminary diagnosis model training module Block 300 is used to train the sample data with the type labeled as normal, the sample data with the type labeled as mild to moderate tearing, and the sample data with the type labeled as severe tearing as the training data of the preliminary diagnosis model of the tearing degree, so as to obtain the trained preliminary diagnosis model of the tearing degree; the mild to moderate binary classification model training module 400 is used to train the sample data with the type labeled as moderate tearing and the sample data with the type labeled as mild tearing as the training data of the mild to moderate binary classification model, so as to obtain the trained mild to moderate binary classification model; the construction module 500 is used to form a tearing detection model with the trained image quality screening model, the trained preliminary diagnosis model of the tearing degree, and the trained mild to moderate binary classification model. This device has created a research paradigm for automatically judging the tearing degree based on the ocular surface image of tear river staining, and the tearing detection model provided includes three levels of models, which is more useful for accurately determining the tearing degree.

[0113] The following is an introduction to a tear overflow detection device provided by an embodiment of the present invention. The tear overflow detection device described below and the tear overflow detection method described above can be referenced to each other. The device is applied to a computer.

[0114] Please refer to Figure 4 , Figure 4 A schematic structural diagram of a tear overflow detection device provided in an embodiment of the present invention may include:

[0115] The image to be detected and model acquisition module 1100 is used to obtain the image to be detected of the target user and the epiphora detection model obtained by using the above-mentioned epiphora detection model construction method; the image to be detected is an ocular surface image after the tear meniscus is stained with sodium fluorescein;

[0116] An image quality screening module 1200 is used to input the image to be detected into the image quality screening model trained in the tear overflow detection model to determine whether the image to be detected meets the image quality standard;

[0117] The first result module 1300 is used to re-collect the image to be detected of the target user if it does not meet the requirements;

[0118] The tear level preliminary diagnosis module 1400 is used for inputting the detection image into the tear level preliminary diagnosis model trained in the tear level detection model to obtain a preliminary image detection result if the condition is met;

[0119] The second result module 1500 is used to end if the preliminary detection result of the image is severe tearing or normal;

[0120] The mild-to-moderate binary classification module 1600 is used to input the image to be detected into the mild-to-moderate binary classification model trained in the epiphora detection model to obtain the final detection result of the image if the preliminary detection result of the image is mild-to-moderate epiphora.

[0121] Based on the above embodiment, the to-be-detected image acquisition module 1100 may include:

[0122] The detection image acquisition unit is used to acquire the ocular surface image of the target user's tear meniscus stained with sodium fluorescein based on the diffuse illumination of cobalt blue light of a slit lamp and optical zoom.

[0123] The tear detection device provided by the embodiment of the present invention is applied to a computer, and is used to obtain the image to be detected of the target user and the tear detection model obtained by the tear detection model construction method described above through the image to be detected and model acquisition module 1100; the image to be detected is an ocular surface image after the tear meniscus is stained with sodium fluorescein; the image quality screening module 1200 is used to input the image to be detected into the image quality screening model trained in the tear detection model to determine whether the image to be detected meets the image quality standard; the first result module 1300 is used to re-collect the image to be detected of the target user if it does not meet the standard; the tear level preliminary diagnosis module 1400 is used to input the detection image into the tear level preliminary diagnosis model trained in the tear detection model to obtain the preliminary detection result of the image if it meets the standard; the second result module 1500 is used to end if the preliminary detection result of the image is severe tearing or normal; the mild to moderate binary classification module 1600 is used to input the image to be detected into the mild to moderate binary classification model trained in the tear detection model to obtain the final detection result of the image if the preliminary detection result of the image is mild to moderate tearing. The device directly takes a picture of the tear meniscus-stained ocular surface to obtain the image to be tested, and then uses the three-stage detection method provided in the present application, that is, performing detailed detection layer by layer, specifically including an image quality screening model, a preliminary diagnosis model for the degree of tearing, and a mild to moderate binary classification model, to achieve non-invasive detection and accurately detect the degree of tearing.

[0124] The following is an introduction to a tear overflow detection device provided in an embodiment of the present invention. The tear overflow detection device described below and the tear overflow detection method described above can be referenced to each other.

[0125] Please refer to Figure 5 , Figure 5 A schematic structural diagram of a tear overflow detection device provided by an embodiment of the present invention may include:

[0126] A memory 10, used for storing computer programs;

[0127] The processor 20 is used to execute a computer program to implement the above-mentioned epiphora detection method and / or epiphora detection model construction method.

[0128] The memory 10 , the processor 20 , and the communication interface 31 all communicate with each other via the communication bus 32 .

[0129] In the embodiment of the present invention, the memory 10 is used to store one or more programs, and the program may include program code, and the program code includes computer operation instructions. In the embodiment of the present invention, the memory 10 may store programs for implementing the following functions:

[0130] Obtain sample data for training, and the sample data are respectively labeled with types, including qualified quality and unqualified quality; qualified quality includes normal, mild to moderate tearing and severe tearing, and mild to moderate tearing includes mild tearing and moderate tearing; the sample data is an ocular surface image after the tear meniscus is stained with sodium fluorescein; the sample data with types labeled as qualified quality and the sample data with types labeled as unqualified quality are used as training data for the image quality screening model to obtain a trained image quality screening model; the sample data with types labeled as normal, the sample data with types labeled as mild to moderate tearing and the sample data with types labeled as severe tearing are used as training data for the preliminary diagnosis model for the degree of tearing to obtain a trained preliminary diagnosis model for the degree of tearing; the sample data with types labeled as moderate tearing and the sample data with types labeled as mild tearing are used as training data for the mild to moderate binary classification model to obtain a trained mild to moderate binary classification model; the trained image quality screening model, the trained preliminary diagnosis model for the degree of tearing and the trained mild to moderate binary classification model constitute a tearing detection model;

[0131] or,

[0132] Obtain an image to be detected of the target user and a tear overflow detection model obtained by the tear overflow detection model construction method described above; the image to be detected is an ocular surface image after the tear meniscus is stained with sodium fluorescein; the image to be detected is input into an image quality screening model trained in the tear overflow detection model to determine whether the image to be detected meets the image quality standard; if not, re-collect the image to be detected of the target user; if yes, input the detection image into a preliminary tear overflow degree diagnosis model trained in the tear overflow detection model to obtain a preliminary image detection result; if the preliminary image detection result is severe tear overflow or normal, end the process; if the preliminary image detection result is mild to moderate tear overflow, input the image to be detected into a mild to moderate binary classification model trained in the tear overflow detection model to obtain a final image detection result.

[0133] In a possible implementation, the memory 10 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required for at least one function, etc.; the data storage area may store data created during use.

[0134] In addition, the memory 10 may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include an NVRAM. The memory stores an operating system and operating instructions, executable modules or data structures, or a subset thereof, or an extended set thereof, wherein the operating instructions may include various operating instructions for implementing various operations. The operating system may include various system programs for implementing various basic tasks and processing hardware-based tasks.

[0135] The processor 20 may be a central processing unit (CPU), an application specific integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device, a microprocessor or any conventional processor, etc. The processor 20 may call a program stored in the memory 10 .

[0136] The communication interface 31 may be an interface of a communication module, and is used to connect to other devices or systems.

[0137] Of course, it should be noted that Figure 5 The structure shown does not constitute a limitation on the tearing detection device in the embodiment of the present invention. In actual applications, the tearing detection device may include Figure 5 More or fewer components than shown, or combinations of certain components.

[0138] The computer-readable storage medium provided in an embodiment of the present invention is introduced below. The computer-readable storage medium described below and the epiphora detection method and / or epiphora detection model construction method described above can be referenced to each other.

[0139] The present invention also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the above-mentioned epiphora detection model construction method and / or epiphora detection method are implemented.

[0140] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0141] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0142] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0143] Finally, it should be noted that, in this article, relationships such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprises" or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0144] The above is a detailed introduction to a method and device for building a tear detection model, a tear detection method, device, equipment and a computer-readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for constructing a tear detection model, It is characterized in that include: Acquire sample data for training, wherein the sample data are respectively labeled with types, wherein the type labels include qualified quality and unqualified quality; the qualified quality includes normal, mild to moderate tearing, and severe tearing, and the mild to moderate tearing includes mild tearing and moderate tearing; the sample data is an ocular surface image after tear meniscus is stained with sodium fluorescein; Using the sample data of the type marked as qualified quality and the sample data of the type marked as unqualified quality as training data of the image quality screening model to train, thereby obtaining a trained image quality screening model; The sample data marked as normal, the sample data marked as mild to moderate tearing, and the sample data marked as severe tearing are used as training data for a preliminary diagnosis model of tearing degree to train, so as to obtain a trained preliminary diagnosis model of tearing degree; The sample data with the type marked as moderate epiphora and the sample data with the type marked as mild epiphora are used as training data for a mild-to-moderate binary classification model to obtain a trained mild-to-moderate binary classification model; The trained image quality screening model, the trained tearing degree preliminary diagnosis model and the trained mild to moderate binary classification model are connected in series to form a tearing detection model.

2. The method for constructing a tear detection model according to claim 1, It is characterized in that The image quality screening model is the GoogleNet model; the preliminary diagnosis model for epiphora and the binary classification model for mild to moderate models are the BiseNet model.

3. The method for constructing an epiphora detection model according to claim 1, It is characterized in that The obtaining of sample data for training includes: The ocular surface image of the tear meniscus stained with sodium fluorescein is acquired based on diffuse illumination of cobalt blue light from a slit lamp and optical zoom.

4. The method for constructing a tear detection model according to claim 2, It is characterized in that The sample data with the type marked as moderate epiphora and the sample data with the type marked as mild epiphora are used as training data for a mild-to-moderate binary classification model to obtain a trained mild-to-moderate binary classification model, wherein the mild-to-moderate binary classification model is a BiseNet model, including: The image pixel values ​​of the training data of the mild-moderate binary classification model are adjusted to a preset size, and data enhancement, flipping, and brightness adjustment are performed to obtain processed training data; The processed training data is input into the convolution layer, pooling layer, and fully connected layer based on the BiseNet model to obtain the classification result; The loss value is calculated using the classification result, the actual type label and the loss function; The loss value is used to optimize the model parameters of the mild-to-moderate binary classification model until the training end condition is reached, then the training is stopped to obtain the trained mild-to-moderate binary classification model.

5. A method for detecting epiphora, It is characterized in that Applied to computers, including: Obtain an image to be detected of a target user and a tearing detection model obtained by using the tearing detection model construction method according to any one of claims 1 to 4; the image to be detected is an ocular surface image after tear meniscus is stained with sodium fluorescein; Inputting the image to be detected into the image quality screening model trained in the tearing detection model to determine whether the image to be detected meets the image quality standard; If not, re-collect the image of the target user to be detected; If it is in compliance, the detection image is input into the preliminary diagnosis model of the degree of epiphora trained in the epiphora detection model to obtain a preliminary detection result of the image; If the preliminary detection result of the image is severe tearing or normal, then end; If the preliminary detection result of the image is mild to moderate tearing, the image to be detected is input into the mild to moderate binary classification model trained in the tearing detection model to obtain the final detection result of the image.

6. The method for detecting epiphora according to claim 5, It is characterized in that The step of obtaining the image to be detected of the target user includes: Based on the diffuse illumination of cobalt blue light from a slit lamp and optical zoom, an ocular surface image of the target user's tear meniscus stained with sodium fluorescein is acquired.

7. A device for constructing a tear detection model, It is characterized in that include: An acquisition module is used to acquire sample data for training, wherein the sample data are respectively labeled with types, wherein the type labels include qualified quality and unqualified quality; the qualified quality includes normal, mild to moderate tearing and severe tearing, and the mild to moderate tearing includes mild tearing and moderate tearing; the sample data is an ocular surface image after tear meniscus is stained with sodium fluorescein; An image quality screening model training module is used to train the sample data of the type marked as qualified quality and the sample data of the type marked as unqualified quality as training data of the image quality screening model to obtain a trained image quality screening model; A preliminary diagnosis model training module for the degree of tearing, used to train the sample data marked as normal, the sample data marked as mild to moderate tearing, and the sample data marked as severe tearing as training data for the preliminary diagnosis model for the degree of tearing, to obtain a trained preliminary diagnosis model for the degree of tearing; A mild-to-moderate binary classification model training module is used to train the sample data with the type marked as moderate tearing and the sample data with the type marked as mild tearing as training data of the mild-to-moderate binary classification model to obtain a trained mild-to-moderate binary classification model; The building module is used to form a tearing detection model by serially connecting the trained image quality screening model, the trained tearing degree preliminary diagnosis model and the trained mild to moderate binary classification model.

8. A tearing detection device, It is characterized in that Applied to computers, including: An image to be detected and a model acquisition module, used to obtain an image to be detected of a target user and a tear detection model obtained by using the tear detection model construction method according to any one of claims 1 to 4; the image to be detected is an ocular surface image after the tear meniscus is stained with sodium fluorescein; An image quality screening module, used for inputting the image to be detected into the image quality screening model trained in the tear overflow detection model to determine whether the image to be detected meets the image quality standard; A first result module, used for re-collecting the image to be detected of the target user if it does not meet the requirements; a preliminary diagnosis module for the degree of epiphora, for inputting the detection image into a preliminary diagnosis model for the degree of epiphora trained in the epiphora detection model to obtain a preliminary detection result of the image if the condition is met; A second result module, configured to end the process if the preliminary detection result of the image is severe tearing or normal; The mild-to-moderate binary classification module is used to input the image to be detected into the mild-to-moderate binary classification model trained in the tearing detection model if the preliminary detection result of the image is mild-to-moderate tearing, so as to obtain the final detection result of the image.

9. A tear detection device, It is characterized in that include: Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 6 when executing the computer program.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by a processor, the method according to any one of claims 1 to 6 is implemented.