A corneal difference intelligent recognition system and method based on deep learning

Through the intelligent corneal differential recognition method based on deep learning, a corneal difference recognition model with multi-tower structure was constructed. Combined with doctor review, the accuracy of corneal shaping effect was solved, and a rapid and accurate corneal shaping effect evaluation was achieved.

CN120236154BActive Publication Date: 2025-09-02HANGZHOU EMEIJING MEDICAL EQUIPMENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510725264.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-03
Publication Date
2025-09-02
Estimated Expiration
2045-06-03

AI Technical Summary

Technical Problem

In the prior art, the analysis of corneal topographic maps mainly relies on the doctor's manual experience, which leads to differences in the judgment of corneal shaping effects of different doctors, which affects the accuracy of correction effects and the judgment of complex morphological changes is difficult.

Method used

The intelligent corneal difference recognition method based on deep learning is adopted. By obtaining the corneal topographic map before and after the patient wears the corneal resizing lens, a corneal difference recognition model with multi-tower structure is constructed, and the position and structural integrity of the defocus ring are used for classification. Combined with the doctor's review, a comprehensive analysis method is formed to construct a corneal difference recognition model with multi-tower structure to automatically judge the corneal shaping effect.

Benefits of technology

It improves the accuracy of the evaluation of corneal shaping effect, reduces the possibility of misjudgment and misjudgment, and achieves a fast and accurate evaluation of corneal shaping effect, which can replace senior ophthalmologists with auxiliary judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120236154B_ABST
    Figure CN120236154B_ABST
Patent Text Reader

Abstract

The present invention discloses a corneal difference intelligent recognition system and method based on deep learning, which relates to the field of ophthalmic medical technology. It uses corneal topography before and after wearing orthokeratology lenses and corneal topography corneal difference maps as input features, classifies corneal difference maps by identifying the position and structural integrity of the defocus ring, and combines the doctor's review and verification to form a comprehensive analysis method, which improves the accuracy of the evaluation of corneal reshaping effects and reduces the possibility of misjudgment and missed judgment. The present invention uses a large amount of data to train a multi-level Resnet50 corneal difference recognition model to achieve automatic recognition and analysis of corneal difference maps, which can quickly and accurately evaluate the corneal reshaping effect, reduce the time and error of manual analysis, and can replace senior ophthalmologists to assist in judging the effect of orthokeratology lenses.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of ophthalmic medical technology, and in particular to a deep learning-based intelligent corneal difference recognition system and method and electronic equipment. Background Art

[0002] Orthokeratology (OK) lenses are a non-surgical method for temporarily correcting vision by changing the shape of the cornea. They are widely used in vision correction. To evaluate the effectiveness of OK lenses, doctors typically use corneal topography equipment to record changes in corneal morphology before and after wearing OK lenses. Corneal topography is a two-dimensional or three-dimensional image that displays the morphology of the cornea. It uses different colors or grayscale to represent the ups and downs of the corneal surface, thereby intuitively reflecting the morphological characteristics of the cornea.

[0003] However, the analysis of corneal topography and corneal difference maps in the existing technology mainly relies on the manual experience of doctors. Doctors need to observe the changes in corneal morphology in the corneal difference map, such as the center alignment and integrity of the ring structure, to judge the effectiveness of corneal reshaping. However, this manual analysis method has many defects and shortcomings. For example, doctors of different levels may come to different conclusions when analyzing the same corneal topography and corneal difference map. This difference in subjective judgment directly affects the accuracy of the subsequent glasses fitting process. In addition, manual analysis is limited by the doctor's experience and knowledge level, making it difficult to accurately judge complex corneal morphological changes. This may lead to misjudgment of the corneal reshaping effect, thereby affecting the patient's correction effect. Summary of the Invention

[0004] To achieve the above object, the present invention provides the following technical solutions:

[0005] A first aspect of the present invention provides a method for intelligently identifying corneal differences based on deep learning, the method comprising:

[0006] Step S100: Obtain corneal topography of the patient before and after wearing orthokeratology lenses and form a corneal difference map;

[0007] Step S200: performing recognition analysis on the corneal difference map, classifying the corneal difference map into different categories based on the analysis results, and evaluating the orthokeratology effect based on the classification results to obtain image datasets corresponding to different categories and orthokeratology effects;

[0008] Step S300: Based on deep learning technology, image data sets of different categories and corneal reshaping effects are trained and studied to construct a multi-tower structure corneal difference recognition model, which is used to intelligently identify and analyze the topographic map differences before and after corneal reshaping, and automatically judge the effect of corneal reshaping based on the output results of the model.

[0009] Preferably, the step S100 includes: step S101: exporting pictures of the patient's corneal topography before and after wearing the glasses and the difference between the front and back corneas through corneal topography acquisition software;

[0010] Step S102: Based on the characteristics of the corneal topography, define the fixed pixel ranges of the corneal area in the three images:

[0011] The four vertices of the corneal topography pixel before reshaping are Q=[x1,y1][x2,y1][x1,y2][x2,y2];

[0012] The four vertices of the corneal topography pixel after reshaping are H=[a1,b1][a2,b1][a1,b2][a2,b2];

[0013] The four vertices of the corneal difference map pixels are Y=[e1,f1][e2,f1][e1,f2][e2,f2]; the image is cut according to the fixed pixel range;

[0014] Step S103: Adjust the cropped image and uniformly compress the image to a set pixel size according to the model input requirements.

[0015] In the above technical solution, by obtaining the corneal topography and corneal difference maps of the patient before and after wearing orthokeratology lenses, the necessary data basis is provided for subsequent analysis, which helps to improve the recognition accuracy and efficiency of the model; by defining the fixed pixel point range of the corneal area and cutting and resizing the image, the corneal area can be accurately cut out, ensuring the uniformity and consistency of the image data input to the model, avoiding interference from irrelevant information, and improving the efficiency and accuracy of image processing.

[0016] Preferably, the step S200 includes: step S201: identifying the center point of the defocus ring in the corneal difference map and calculating the Euclidean distance from the corneal center point to obtain the offset C of the defocus ring center relative to the corneal center:

[0017] ;

[0018] Among them C x and C y Represent the coordinates of the center point of the cornea, where P x and P y Respectively represent the coordinates of the center point of the defocus ring;

[0019] Highlight the structural features of the defocus ring through morphological processing. Use a contour detection algorithm to detect the contour of the defocus ring in the corneal difference image after morphological processing, and calculate the perimeter L and the contour area A of the contour; Obtain the measure value of the shape regularity of the defocus ring by calculating the roundness and compactness indexes of the contour:

[0020] ;

[0021] where S represents the measure value of the shape regularity of the defocus ring, w1 and w2 respectively represent the weights of the roundness and compactness of the defocus ring contour in the measure of shape regularity, and w1 + w2 = 1; where represents the roundness of the contour, represents the compactness index;

[0022] Based on the contour area, contour perimeter and measure value of shape regularity, define a contour integrity index to evaluate the integrity of the defocus ring:

[0023] ;

[0024] where R represents the contour integrity evaluation index; Calculate the R values of all corneal difference maps, and determine the maximum value R max and the minimum value R min , and perform normalization processing on the index R, R ∈ (0, 1];

[0025] Step S202: Set the defocus ring center offset thresholds C1 and C2 and the integrity degree threshold R1. According to the position and structural integrity of the defocus ring in the corneal difference map, classify the corneal topographic corneal difference map types into the following three categories:

[0026] The first category: When C <= C1 and R = 1, it means that the defocus ring in the image is located at the center of the cornea, with a centered position and an intact structure;

[0027] The second category: When C1 < C <= C2 and R1 <= R < 1, it means that the position of the defocus ring in the image deviates from the center of the cornea but is still within the allowable deviation range, and the overall structure remains intact;

[0028] The third category: When C > C2, it means that the position of the defocus ring in the image deviates from the center of the cornea and has exceeded the allowable deviation range; When R < R1, it means that the defocus ring structure is incomplete; Both of the above situations are classified as the third category;

[0029] After classification, the doctor checks the classification results and judges the shaping effect according to the results. Among them, the first and second categories are judged to have good shaping effects, and the third category is judged to have poor shaping effects; Create a database, and associate the judgment results with the corresponding corneal difference maps to form an image data set.

[0030] In the above technical solution, by calculating parameters such as the offset of the defocus ring center relative to the corneal center, the circumference and area of ​​the contour, the shape regularity measurement value, and the contour integrity evaluation index, the position and structural integrity of the defocus ring can be comprehensively evaluated, providing an objective basis for subsequent classification and effect evaluation; the corneal difference map is divided into three categories according to the position and structural integrity of the defocus ring, which helps doctors quickly understand the patient's corneal reshaping effect and provides guidance for subsequent treatment; through the doctor's review, the accuracy and reliability of the classification results can be ensured. At the same time, the judgment results are associated with the corresponding corneal difference map to form an image data set, providing rich data support for subsequent model training.

[0031] Preferably, the step S300 includes: step S301: using the Pytorch framework to construct a corneal difference recognition model including three independent Resnet50 model branches, each branch is used to receive and process the corneal topography before shaping, the corneal topography after shaping, and the corneal difference map, wherein the model structures of the three branches are the same but the parameters are independent, and the basic features in the three images can be extracted respectively; the model structure includes an input layer, a three-tower layer, a merging layer, a fully connected layer, and an output layer, wherein the input layer is used to receive three kinds of image data; the three-tower layer contains three independent Resnet50 branches, each branch is used to extract features of the corresponding image; the merging layer is used to splice the outputs of the three branches; the fully connected layer is used to perform feature fusion and classification judgment on the merged features; the output layer is used to output the probability of the shaping effect of the final corneal difference map;

[0032] Step S302: extract a complete data set including the corneal topography before reshaping, the corneal topography after reshaping and the corneal difference map from the database, and divide it into training set, test set and validation set according to the proportion by using the stratified sampling method. The training set data is further divided into m batches and the learning rate and number of iterations are set to input into the model for training; the training set data is input into the model in batches, and forward propagation and back propagation are performed to continuously update the model parameters. During the training process, the performance of the model is evaluated by calculating the loss function and accuracy.

[0033] Step S303: After the model training is completed, the test set is input into the model in batches, forward propagation is performed to obtain the prediction results, and the loss function and accuracy are calculated to evaluate the performance of the model. The model performance is continuously optimized based on the evaluation results.

[0034] In the above technical solution, a corneal difference recognition model is constructed. Three independent Resnet50 model branches respectively extract the basic features of the three images, which helps the model better learn and recognize image features. The model is trained through steps such as stratified sampling, batch input, forward propagation and back propagation, which can continuously update the model parameters and improve the recognition accuracy and generalization ability of the model. The performance of the model is evaluated through the test set, which can fully understand the recognition accuracy and generalization ability of the model. At the same time, the model can be optimized according to the evaluation results to further improve the performance of the model.

[0035] Preferably, the method further comprises:

[0036] Step S400: Using the trained model to perform batch predictions on a large number of unknown corneal difference maps, the model's prediction results are submitted to doctors for verification and judgment to determine the true type of each corneal difference map. The true type verified by the doctors is combined with the prediction results to form a new data set to continuously optimize and upgrade the model;

[0037] The step S400 includes: step S401: using the trained model to batch predict a large number of unknown corneal topography and corneal difference maps, obtaining the predicted type and corresponding probability value of each corneal difference map, and submitting the prediction results of the model to a doctor for verification and judgment to determine the true type of each corneal difference map;

[0038] Step S402: Combine the true type verified by the doctor with the prediction result to form a new data set, and then return to steps S302 and S303 to use the new data set to train and predict the model; after training, use the validation set to evaluate the model performance, and continuously optimize the model based on the evaluation results.

[0039] In the above technical solution, by using the trained model to perform batch prediction on a large number of unknown corneal topography and corneal difference maps, the predicted type and corresponding probability value of each corneal difference map can be quickly obtained, and the accuracy and reliability of the prediction results can be ensured through verification and judgment by the doctor. The real type after verification by the doctor is combined with the prediction result to form a new data set, and the model is continuously updated and optimized to improve the recognition accuracy and generalization ability of the model. In addition, the model performance is evaluated using the validation set to ensure the stability and reliability of the model in practical applications.

[0040] A second aspect of the present invention provides a deep learning-based intelligent corneal difference recognition system, which includes a data acquisition and preprocessing module, a data annotation module, and a recognition model training module, wherein:

[0041] The data acquisition and preprocessing module is used to obtain corneal topography of the patient before and after wearing orthokeratology lenses and form corneal difference maps, and to cut and resize the three images obtained respectively;

[0042] The data annotation module is used to identify and analyze the corneal difference map, classify the corneal difference map into different categories according to the analysis results, and evaluate the orthokeratology effect according to the classification results to obtain image data sets corresponding to different categories and orthokeratology effects;

[0043] The model building module trains and studies image data sets of different categories and corneal reshaping effects based on deep learning technology, constructs a multi-tower structure corneal difference recognition model, and constructs a multi-tower structure corneal difference recognition model for intelligently identifying and analyzing the topographic map differences before and after corneal reshaping, and automatically judges the effect of corneal reshaping based on the output results of the model.

[0044] The data acquisition and preprocessing module includes a data acquisition unit and a data preprocessing unit; the data acquisition unit uses corneal topography acquisition software to derive images of the patient's corneal topography before and after wearing glasses and the difference between the front and back corneas; the data preprocessing unit defines the fixed pixel point range of the corneal area in the three images based on the characteristics of the corneal topography:

[0045] The four vertices of the corneal topography pixel before reshaping are Q=[x1,y1][x2,y1][x1,y2][x2,y2];

[0046] The four vertices of the corneal topography pixel after reshaping are H=[a1,b1][a2,b1][a1,b2][a2,b2];

[0047] The four vertices of the corneal difference map pixels are Y=[e1,f1][e2,f1][e1,f2][e2,f2]; the image is cut according to the fixed pixel range; the cut image is adjusted and uniformly compressed to the set pixel size according to the model input requirements;

[0048] The data annotation module includes a corneal difference map evaluation unit and a corneal difference map classification unit; the corneal difference map evaluation unit identifies the center point of the defocus ring in the corneal difference map and calculates the Euclidean distance from the corneal center point to obtain the offset C of the defocus ring center relative to the corneal center:

[0049] Highlight the structural features of the defocus ring through morphological processing. Use a contour detection algorithm to detect the contour of the defocus ring in the corneal difference image after morphological processing, and calculate the perimeter L and the contour area A of the contour. Obtain the defocus ring shape regularity metric value S by calculating the roundness and compactness indexes of the contour. Define a contour integrity index R based on the contour area, contour perimeter, and shape regularity metric value to evaluate the integrity of the defocus ring.

[0050] The corneal difference map classification unit sets the defocus ring center offset thresholds C1 and C2 and the integrity degree threshold R1. According to the position and structural integrity of the defocus ring in the corneal difference map, the corneal topographic map corneal difference map types are divided into the following three categories:

[0051] The first category: When C <= C1 and R = 1, it indicates that the defocus ring in the image is located at the center of the cornea, with a centered position and an intact structure.

[0052] The second category: When C1 < C <= C2 and R1 <= R < 1, it indicates that the position of the defocus ring in the image deviates from the center of the cornea but is still within the allowable deviation range, and the overall structure remains intact.

[0053] The third category: When C > C2, it indicates that the position of the defocus ring in the image deviates from the center of the cornea and has exceeded the allowable deviation range; when R < R1, it indicates that the defocus ring structure is incomplete; both of the above situations are classified as the third category.

[0054] After classification, the doctor checks the classification results and judges the shaping effect according to the results. Among them, the first and second categories are judged to have a good shaping effect, and the third category is judged to have a poor shaping effect. Create a database, and associate the judgment results with the corresponding corneal difference maps to form an image data set.

[0055] The model construction module uses the Pytorch framework to construct a corneal difference recognition model containing three independent Resnet50 model branches. Each branch is used to receive and process the corneal topographic map before shaping, the corneal topographic map after shaping, and the corneal difference map respectively. Among them, the model structures of the three branches are the same, but the parameters are independent, and they can extract the basic features in the three images respectively. The model structure includes an input layer, a three-tower layer, a merging layer, a fully connected layer, and an output layer. The input layer is used to receive the three types of picture data; the three-tower layer contains three independent Resnet50 branches, and each branch is used to extract the features of the corresponding image; the merging layer is used to splice the outputs of the three branches; the fully connected layer is used to perform feature fusion and classification judgment on the merged features; the output layer is used to output the probability of the final corneal difference map shaping effect.

[0056] A complete dataset containing corneal topography before and after reshaping and corneal difference maps was extracted from the database. A stratified sampling method was used to divide the dataset into training, test, and validation sets in proportion. The training set data was further divided into m batches, and the learning rate and number of iterations were set to input the model for training. The training set data was input into the model in batches, and forward and backward propagation were performed to continuously update the model parameters. The performance of the model was evaluated by calculating the loss function and accuracy during the training process.

[0057] After the model training is completed, the test set is input into the model in batches, forward propagation is performed to obtain the prediction results, and the loss function and accuracy are calculated to evaluate the performance of the model. The model performance is continuously optimized based on the evaluation results.

[0058] Preferably, the system further comprises:

[0059] A model optimization module, which uses the trained model to batch predict a large number of unknown corneal topography and corneal difference maps, obtains the predicted type and corresponding probability value of each corneal difference map, and submits the model's prediction results to doctors for verification and judgment to determine the true type of each corneal difference map;

[0060] The true type verified by the doctor is combined with the prediction result to form a new data set, and then return to step S302 and step S303 to use the new data set to train and predict the model; after training is completed, the validation set is used to evaluate the model performance, and the model is continuously optimized based on the evaluation results.

[0061] A third aspect of the present invention provides an electronic device, comprising:

[0062] processor;

[0063] A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the above-described method.

[0064] Compared with the prior art, the present invention has the following beneficial effects:

[0065] The present invention uses corneal topography before and after wearing orthokeratology lenses and corneal topography-corneal difference maps as input features, classifies corneal difference maps by identifying the position and structural integrity of the defocus ring, and combines it with the doctor's review and verification to form a comprehensive analysis method, which improves the accuracy of the evaluation of the orthokeratology effect and reduces the possibility of misjudgment and missed judgment.

[0066] The present invention uses large amounts of data to train a multi-level Resnet50 corneal difference recognition model to achieve automatic recognition and analysis of corneal difference maps. It can quickly and accurately evaluate the corneal reshaping effect, reduce the time and error of manual analysis, and can replace experienced ophthalmologists to assist in judging the effect of reshaping lenses. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] Figure 1 This is a flow chart of a method for intelligently identifying corneal differences based on deep learning according to the present invention;

[0068] Figure 2 This is a schematic diagram of the model construction and optimization of a method for intelligent identification of corneal differences based on deep learning in the present invention;

[0069] Figure 3 This is a schematic diagram of the structure of a deep learning-based intelligent recognition system for corneal differences according to the present invention;

[0070] Figure 4 The figure is a schematic diagram of the application structure of an electronic device of the present invention. DETAILED DESCRIPTION

[0071] Various exemplary embodiments, features, and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.

[0072] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0073] In addition, numerous specific details are provided in the following detailed description to better illustrate the present disclosure. Those skilled in the art will appreciate that the present disclosure can be practiced without certain specific details. In some instances, methods, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main points of the present disclosure.

[0074] Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative work shall fall within the scope of protection of the present invention. Example 1

[0075] like Figure 1-2 As shown, the present invention provides a method for intelligently identifying corneal differences based on deep learning, the method comprising:

[0076] Step S100: Obtain corneal topography of the patient before and after wearing orthokeratology lenses and form corneal difference maps, and perform cutting and size adjustment on the three acquired images respectively;

[0077] Step S200: performing recognition analysis on the corneal difference map, classifying the corneal difference map into different categories based on the analysis results, and evaluating the orthokeratology effect based on the classification results to obtain image datasets corresponding to different categories and orthokeratology effects;

[0078] Step S300: Using deep learning technology to train image datasets of different categories and orthokeratology effects, a multi-tower structured corneal difference recognition model is constructed to intelligently identify and analyze the topographic differences before and after orthokeratology, and automatically determine the orthokeratology effect based on the model output results;

[0079] Step S400: Use the trained model to perform batch predictions on a large number of unknown corneal difference maps. The model's prediction results are submitted to doctors for verification and judgment to determine the true type of each corneal difference map. The true type verified by the doctor is combined with the prediction results to form a new data set to continuously optimize and upgrade the model.

[0080] Preferably, the step S100 includes: step S101: exporting pictures of the patient's corneal topography before and after wearing the glasses and the difference between the front and back corneas through corneal topography acquisition software;

[0081] Step S102: Based on the characteristics of the corneal topography, define the fixed pixel ranges of the corneal area in the three images:

[0082] The four vertices of the corneal topography pixel before reshaping are Q=[x1,y1][x2,y1][x1,y2][x2,y2];

[0083] The four vertices of the corneal topography pixel after reshaping are H=[a1,b1][a2,b1][a1,b2][a2,b2];

[0084] The four vertices of the corneal difference map pixel are Y=[e1,f1][e2,f1][e1,f2][e2,f2];

[0085] Step S103: cutting the image according to the fixed pixel range, adjusting the cut image, and uniformly compressing the image to a set pixel size according to the model input requirements.

[0086] In the above technical solution, by obtaining the corneal topography and corneal difference maps of the patient before and after wearing orthokeratology lenses, the necessary data basis is provided for subsequent analysis, which helps to improve the recognition accuracy and efficiency of the model; by defining the fixed pixel point range of the corneal area and cutting and resizing the image, the corneal area can be accurately cut out, ensuring the uniformity and consistency of the image data input to the model, avoiding interference from irrelevant information, and improving the efficiency and accuracy of image processing.

[0087] By using the corneal topography of the patient before and after wearing the glasses and the pictures of the corneal difference between the front and back images, we can use deep learning technology to identify the difference features and output the before and after difference images, so as to achieve intelligent and rapid difference image feature analysis and identify the changes in the corneal topography before and after the patient wears the glasses. The following will use the CNN convolutional neural network to generate the before and after corneal difference image as an example to illustrate:

[0088] 1. Image Preprocessing and Registration

[0089] 1.1 Image Standardization

[0090] Purpose: To ensure that the input image has consistent brightness and contrast to facilitate subsequent processing.

[0091] Principle: The corneal topography before and after reshaping is normalized separately, and the pixel values ​​are scaled to a fixed range (such as [0,1] or standardized to a mean of 0 and a variance of 1) to eliminate differences in lighting and acquisition equipment.

[0092] 1.2 Image Registration

[0093] Purpose: To ensure that the images before and after reshaping are spatially aligned so that the same pixel corresponds to the same corneal position.

[0094] principle:

[0095] Use feature point detection algorithms (such as SIFT and ORB) to extract key points in the image.

[0096] Calculate the transformation matrix (such as affine transformation or homography matrix) between the two images through a matching algorithm (such as FLANN or RANSAC).

[0097] The reshaped image is aligned to the image coordinate system before reshaping through the transformation matrix.

[0098] 2. Feature extraction and comparison

[0099] 2.1 Two-stream CNN feature extraction

[0100] Purpose: To extract high-dimensional features from images before and after shaping.

[0101] principle:

[0102] A convolutional neural network (CNN) with shared weights is used to process the images before and after reshaping respectively.

[0103] CNN extracts local and global features of the image through multi-layer convolution and pooling operations to generate high-dimensional feature maps.

[0104] Each pixel in the feature map corresponds to a local area of ​​the original image and contains the semantic information of the area.

[0105] 2.2 Feature Difference Calculation

[0106] Purpose: To compare the feature differences of images before and after orthokeratology and to capture the changes in corneal shape.

[0107] principle:

[0108] The feature maps before and after shaping are compared pixel by pixel to calculate the feature difference.

[0109] The difference can be calculated by using Euclidean distance, cosine similarity or directly calculating the difference of feature values.

[0110] The difference map reflects the degree of change in corneal topography before and after reshaping.

[0111] 3. Difference map generation

[0112] 3.1 Difference map calculation

[0113] Purpose: To visualize feature differences and generate intuitive difference maps.

[0114] principle:

[0115] The feature difference map is restored to the original image resolution through deconvolution or upsampling operations.

[0116] The difference values ​​are normalized and mapped to the range of [0, 255] to generate a grayscale difference map.

[0117] The brightness value in the difference map indicates the degree of change, with higher brightness indicating greater differences.

[0118] 3.2 Difference Map Post-Processing

[0119] Purpose: To enhance the readability and visualization of difference maps.

[0120] principle:

[0121] Smooth the difference map (such as Gaussian filtering) to remove noise.

[0122] Use a pseudocolor map (such as Jet or Viridis) to convert the grayscale difference map into a color map for easier viewing.

[0123] Superimpose the original image outline to help locate the difference area.

[0124] 4. Results Analysis and Application

[0125] 4.1 Difference Map Interpretation

[0126] Objective: To evaluate the effect of orthokeratology by combining difference maps with clinical significance.

[0127] principle:

[0128] Areas of high variance may indicate significant local corneal changes caused by orthokeratology.

[0129] Areas of low variance may indicate weak shaping effects or no significant changes.

[0130] Combined with the doctor's experience, determine whether the difference is within the expected range.

[0131] 4.2 Clinical Application

[0132] The difference map visually shows the changes before and after corneal reshaping.

[0133] Combined with the classification model, the shaping effect is automatically evaluated (such as "significant effect", "average effect", "needs parameter adjustment"). Please refer to the subsequent plastic effect evaluation of the present invention for details.

[0134] Provide decision support for doctors and optimize the wearing plan of orthokeratology lenses.

[0135] Advantages of using CNN for difference map generation:

[0136] 1. High-precision registration: Ensures that images before and after shaping are aligned at the pixel level to avoid errors.

[0137] 2. Feature-level comparison: CNN is used to extract high-dimensional features and capture subtle corneal changes.

[0138] 3. Visual difference map: Converts abstract difference values ​​into intuitive images for easier interpretation by doctors.

[0139] 4. Clinical application orientation: Combine medical knowledge, combine difference maps with shaping effect evaluation to provide decision support.

[0140] Through the above steps, it is possible to realize intelligent analysis of the topography of patients before and after wearing orthokeratology lenses, generate intuitive difference maps, and provide strong support for clinical evaluation.

[0141] This department can evaluate the orthokeratology effect based on the classification results in the following two ways.

[0142] Option 1:

[0143] Preferably, the step S200 includes: step S201: identifying the center point of the defocus ring in the corneal difference map and calculating the Euclidean distance from the corneal center point to obtain the offset C of the defocus ring center relative to the corneal center:

[0144] ;

[0145] Among them C x and C y Represent the coordinates of the center point of the cornea, where P x and P y Respectively represent the coordinates of the center point of the defocus ring;

[0146] Morphological processing is used to highlight the structural features of the defocus ring. A contour detection algorithm (user-selected) is used to detect the contour of the defocus ring in the corneal difference image after morphological processing, and the contour perimeter L and contour area A are calculated. The defocus ring shape regularity metric is obtained by calculating the contour roundness and compactness indicators:

[0147] ,

[0148] Where S represents the shape regularity metric of the defocus ring, w1 and w2 represent the weights of the roundness and compactness of the defocus ring contour in the shape regularity metric, and w1+w2=1; Indicates the roundness of the contour, represents the compactness index;

[0149] Based on the contour area, contour perimeter and shape regularity metrics, a contour integrity index is defined to evaluate the integrity of the defocus ring:

[0150] ;

[0151] Where R represents the contour integrity assessment index; calculate the R value of all corneal difference maps and determine the maximum value R max and the minimum value R min , normalize the index R, R∈(0,1];

[0152] Step S202: setting the defocus ring center offset thresholds C1 and C2 and the integrity threshold R1, and classifying the corneal topography difference map types into the following three categories based on the defocus ring position and structural integrity in the corneal difference map:

[0153] Category 1: When C <= C1 and R = 1, it indicates that the defocus ring in the image is located at the center of the cornea, with centered positioning and an intact structure;

[0154] Category 2: When C1 < C <= C2 and R1 <= R < 1, it indicates that the position of the defocus ring in the image deviates from the center of the cornea but is still within the allowable deviation range, and the overall structure remains intact;

[0155] Category 3: When C > C2, it indicates that the position of the defocus ring in the image deviates from the center of the cornea and has exceeded the allowable deviation range; when R < R1, it indicates that the structure of the defocus ring is incomplete; both of the above situations are classified as Category 3;

[0156] Step S203: After classification, the doctor checks the classification results and judges the shaping effect based on the results. Among them, Category 1 and Category 2 are judged to have a good shaping effect, and Category 3 is judged to have a poor shaping effect; create a database, and associate the judgment results with the corresponding corneal difference map to form an image dataset.

[0157] Solution 2:

[0158] Based on the design and application parameters of the orthokeratology lens, etc., evaluate based on the treatment zone size (TZ), defocus amount (Q), curvature change amount (ΔK_post), and regularity index (SRI), etc., combined with empirical value weights:

[0159] Let the calculation formula for the shaping effect score S be as follows:

[0160] ,

[0161] Among them:

[0162] T is the target shaping amount (the target refractive correction amount calculated according to the fitting formula, unit: D);

[0163] Each weight coefficient (needs to be calibrated according to clinical data, example values):

[0164] w1 = 0.3 (proportion of curvature change amount);

[0165] w2 = 0.25 (proportion of treatment zone size);

[0166] Among them:

[0167] T is the target shaping amount (the target refractive correction amount calculated according to the fitting formula, unit: D);

[0168] Each weight coefficient (needs to be calibrated according to clinical data, example values):

[0169] w1 = 0.3 (proportion of curvature change amount);

[0170] w2=0.25 (ratio of treatment area size);

[0171] symbol definition ΔK_post‌ The calculation formula for the change in corneal curvature after orthokeratology (unit: D) ​​is: ΔK_post = K_post K_pre (K_pre is the flat K value before orthokeratology, K_post is the flat K value after orthokeratology) TZ The diameter of the treatment area (unit: mm) is calculated by comparing the corneal topography with the area diameter when the refractive power is 0. Q Defocus (unit: D) ​​is measured by tangent contrast chart to measure the peak change of corneal refractive power in the middle and peripheral regions SRI Corneal surface regularity index (normal value 0.2±0.2) TFSQ‌ Tear film surface quality index (>0.2 is abnormal)

[0172] The shaping effects are categorized as follows:

[0173] Rating range (S) category Evaluation Criteria S≥85 excellent The treatment area is uniform, the defocus reaches the target (≥2.5D), and the curvature change is ≥90% of the target value. 70≤S<85 good The treatment area is slightly eccentric, the defocus is 1.5-2.5D, and the curvature change is ≥80% of the target value 50≤S<70 generally The treatment area is obviously eccentric, the defocus is less than 1.5D, and the curvature change is ≥ 60% of the target value S<50 Need to adjust Ineffective or abnormal shaping (tear film instability, corneal irregularity)

[0174] Curvature change (ΔK_post): reflects the change in central refractive power after orthokeratology. Its effectiveness needs to be evaluated in combination with the target reshaping value T. For overcorrection, an additional 0.75D compensation value (ΔK_post = actual change 0.75D) is required.

[0175] Treatment zone diameter (TZ)

[0176] Ideal value: 5.0-6.5mm (related to pupil size). Too small (<4.5mm) may cause glare, and too large (>7.0mm) may reduce the defocus effect.

[0177] Defocus (Q): directly affects the effect of myopia control and needs to be ≥2.0D to effectively delay axial length growth.

[0178] ‌Tear Film Stability (TFSQ): Abnormal tear film (TFSQ>0.2) will result in a score penalty.‌

[0179] ‌4. Application Examples‌

[0180] Assume that a patient's fitting parameters are:

[0181] Kpre=46.0D, target shaping amount T=4.0D, actual measurement:

[0182] Kpost=42.5D;

[0183] TZ=6.0mm, Q=2.8D, SRI=0.33, TFSQ=0.15;

[0184] Substitute and calculate: S=89.5

[0185] Classification result: Excellent (S=89.5).

[0186] In the above technical solution, by calculating the offset of the defocus ring center relative to the corneal center, the circumference and area of ​​the contour, the shape regularity measurement value and the contour integrity evaluation index, the position and structural integrity of the defocus ring can be comprehensively evaluated, providing an objective basis for subsequent classification and effect evaluation; the corneal difference map is divided into three categories according to the position and structural integrity of the defocus ring, which helps doctors quickly understand the patient's corneal reshaping effect and provides guidance for subsequent treatment; through the doctor's review, the accuracy and reliability of the classification results can be ensured. At the same time, the judgment results are associated with the corresponding corneal difference maps to form an image dataset (that is, the image dataset subsequently saved to the database for training), providing rich data support for subsequent model training.

[0187] The image dataset consists of several groups of corresponding pictures (corneal topography or corneal difference maps before and after wearing orthokeratology lenses) and their classification categories and orthokeratology effects (categories and results can be annotated on the picture features in the form of annotations).

[0188] Preferably, the step S300 includes: step S301: using the Pytorch framework to construct a corneal difference recognition model including three independent Resnet50 model branches, each branch is used to receive and process the corneal topography before shaping, the corneal topography after shaping, and the corneal difference map, wherein the model structures of the three branches are the same but the parameters are independent, and the basic features in the three images can be extracted respectively; the model structure includes an input layer, a three-tower layer, a merging layer, a fully connected layer, and an output layer, wherein the input layer is used to receive three kinds of image data; the three-tower layer contains three independent Resnet50 branches, each branch is used to extract features of the corresponding image; the merging layer is used to splice the outputs of the three branches; the fully connected layer is used to perform feature fusion and classification judgment on the merged features; the output layer is used to output the probability of the shaping effect of the final corneal difference map;

[0189] Step S302: extract a complete (image) data set containing corneal topography before reshaping, corneal topography after reshaping, and corneal difference map from the database, and divide it into training set, test set, and validation set according to the proportion using a stratified sampling method. The training set data is further divided into m batches and the learning rate and number of iterations are set to input into the model for training; the training set data is input into the model in batches, and forward propagation and back propagation are performed to continuously update the model parameters. During the training process, the performance of the model is evaluated by calculating the loss function and accuracy.

[0190] Step S303: After the model training is completed, the test set is input into the model in batches, forward propagation is performed to obtain the prediction results, and the loss function and accuracy are calculated to evaluate the performance of the model. The model performance is continuously optimized based on the evaluation results.

[0191] In the above technical solution, a corneal difference recognition model is constructed. Three independent Resnet50 model branches respectively extract the basic features of the three images, which helps the model better learn and recognize image features. The model is trained through steps such as stratified sampling, batch input, forward propagation and back propagation, which can continuously update the model parameters and improve the recognition accuracy and generalization ability of the model. The performance of the model is evaluated through the test set, which can fully understand the recognition accuracy and generalization ability of the model. At the same time, the model can be optimized according to the evaluation results to further improve the performance of the model.

[0192] You can refer to the following design steps:

[0193] The structure of ResNet50, including the composition of each layer, is not described here. The steps for extracting image features from corneal topography images using the ResNet50 model can be referred to as follows:

[0194] ResNet50 feature extraction typically involves steps such as input preprocessing, model forward propagation (removing fully connected layers), and feature vector acquisition. For example, when using a pretrained ResNet50 model, the final fully connected layer is typically removed, retaining only the convolutional and pooling layers for feature extraction. The input image requires specific preprocessing, such as resizing and normalization, to meet the model's input requirements. Post-feature extraction processing, such as flattening, is also common.

[0195] 1. Input preprocessing stage

[0196] 1. Image size standardization;

[0197] The input image is uniformly resized to 224×224 resolution to meet the input requirements of ResNet50;‌

[0198] Apply ImageNet standard normalization parameters.

[0199] 2. Data augmentation strategy

[0200] During the training phase, random cropping (RandomResizedCrop) and horizontal flipping (RandomHorizontalFlip) are used to improve generalization ability.

[0201] 2. Model Loading and Structure Adaptation

[0202] 1. Loading pre-trained model‌

[0203] resnet = models.resnet50(pretrained=True)

[0204] ```‌:ml-citation{ref="1,3" data="citationList"};

[0205] 2. Remove the classification layer‌

[0206] Intercept the ResNet50 front feature extraction module:

[0207] features = nn.Sequential(list(resnet.children())[:-1])

[0208] ```‌:ml-citation{ref="1,5" data="citationList"}

[0209] Keep the convolutional layers and residual blocks from conv1 to layer4 (49 layers in total).

[0210] 3. Feature Extraction Process

[0211] 1. Forward propagation path

[0212] The input image goes through:

[0213] 7×7 convolutional layer (64 output channels, stride 2);

[0214] 3×3 max pooling (stride 2);

[0215] 4 groups of residual blocks (layer1-layer4);

[0216] Finally, the feature map with 2048 channels is output.

[0217] 2. Feature map dimension changes

[0218] Input: 3×224×224 (RGB image);

[0219] Output: 2048×7×7 (the last layer of convolutional feature map);

[0220] After global average pooling: 2048×1×1. ‌

[0221] 4. Feature Vector Acquisition

[0222] 1. Feature flattening

[0223] flattened_features = features(x).flatten(1) Output dimension 2048

[0224] ```‌:ml-citation{ref="1,5" data="citationList"}.

[0225] 2. Freeze parameter optimization

[0226] It is recommended to freeze the parameters of the first 4 stages and only fine-tune layer 4 to improve training efficiency.

[0227] In tasks such as corneal difference recognition, multiple ResNet50 branches can be run in parallel to process input images of different modalities.

[0228] Feature fusion strategy

[0229] By concatenating the 2048-dimensional feature vectors of different branches, a 6144-dimensional composite feature is formed (3-branch scenario).

[0230] The user uses PyTorch to build a model with three independent ResNet50 branches for corneal disparity recognition. Each branch processes different images: corneal topography before and after reshaping, and the disparity map. The model structure includes an input layer, a three-tower layer, a merging layer, a fully connected layer, and an output layer. It is necessary to ensure that the three branches have the same structure but independent parameters. This is achieved by creating three separate ResNet50 instances, each of which does not share parameters. It is necessary to ensure that each branch is independent during initialization, such as using models.resnet50 (pretrained=True) three times and processing the input separately; finally, the features are merged for classification.

[0231] During design, the input layer needs to receive three different image data. The input of each branch needs to be passed separately, with each ResNet50 processing one image. Then, the merging layer needs to concatenate the outputs of the three branches. The output of ResNet50 is usually the features before the last fully connected layer. The feature vector can be obtained by removing the classification layer and then concatenating the three feature vectors. The feature extraction and concatenation methods are as follows:

[0232] 1. The definition is as follows (taking a group as an example):

[0233] Pre-shaping topography: Xpre∈R 3×224×224 ;

[0234] Post-shaping topography: Xpost®R 3×224×224 ;

[0235] Difference map: Xdiff∈R 3×224×224 ;

[0236] 2. ResNet50 branch structure‌

[0237] Each branch consists of 5 stages (according to the original ResNet50 structure):

[0238] ‌Initial Convolutional Layer‌:

[0239] F conv1 (X)=ReLU(BN(Conv 7×7 (X)))(output size: 64×112×112);

[0240] Max Pooling Layer:

[0241] F maxpool (X)=MaxPool 3×3 (X)(output size: 64×56×56);

[0242] ‌Residual block sequence‌ (including 4 groups of Bottleneck structures‌):

[0243] F layer1 (X)=Bottleneck1(X)⊗Bottleneck1(X)⊗Bottleneck1(X);

[0244] F layer2 (X)=Bottleneck2(X)⊗⋯⊗Bottleneck2(X) (4 times in total);

[0245] F layer3 (X), Flayer4(X) by analogy (output size: 2048×7×7);

[0246] ‌Symbol explanation‌: ⊗ represents the residual connection operation: H(X)=F(X)⊕X, where ⊕ is element-by-element addition‌; Bottleneck i Represents the residual block structure of the i-th stage.

[0247] 3. Global branch feature generation .

[0248] The three branches share a common structure but have independent parameters. The loss function of the branch and the weight of each layer have functions and parameter data defined by the administrator, so the branches can be kept isolated.

[0249] The fully connected layer processes the merged features, performing feature fusion and classification. Several fully connected layers can be designed, and dropout can be added to prevent overfitting. The output layer uses a sigmoid activation function to output probabilities.

[0250] Data preprocessing includes image resizing and normalization. Data loading requires a custom Dataset class to load three image paths and labels at the same time.

[0251] During training, the parameters of each branch should be updated independently, so the optimizer needs to include the parameters of all three branches, as well as the parameters of the fully connected layer. The loss function used is BCEWithLogitsLoss, which is suitable for binary classification tasks.

[0252] The validation part requires ensuring that the model is in evaluation mode, with Dropout disabled, etc. The test function can calculate metrics such as accuracy.

[0253] The following is the technical implementation plan and main code implementation framework of the three-branch ResNet50 corneal difference recognition model based on the PyTorch framework:

[0254] 1. Model Architecture Design

[0255] Input layer

[0256] It also accepts three types of input: corneal topography before reshaping (pre_img), corneal topography after reshaping (post_img), and difference image (diff_img), with a unified size of 3×224×224‌.

[0257] Three-tower layer (independent feature extraction branch)‌

[0258] Create three independent ResNet50 branches, each containing:

[0259] from torchvision import models

[0260] class ResNetBranch(nn.Module):

[0261] def __init__(self):

[0262] super().__init__()

[0263] resnet = models.resnet50(pretrained=True)

[0264] self.features=

[0265] nn.Sequential(list(resnet.children())[:-1]) removes the original classification layer ‌:ml-citation{ref="4,6" data="citationList"}

[0266] Parameters are initialized independently: three branches (pre_branch, post_branch, diff_branch) are instantiated separately through ResNetBranch().

[0267] Merge Layers‌

[0268] Flatten the feature vectors (each with a dimension of 2048×1×1) output by the three branches and concatenate them:

[0269] merged = torch.cat([pre_feat, post_feat, diff_feat], dim=1) Output dimension 6144:ml-citation{ref="3" data="citationList"}

[0270] Fully connected layer (feature fusion and classification)‌

[0271] Structural design:

[0272] self.fc = nn.Sequential(

[0273] nn.Linear(6144, 1024),

[0274] nn.ReLU(),

[0275] nn.Dropout(0.5),

[0276] nn.Linear(1024, 512),

[0277] nn.ReLU(),

[0278] nn.Dropout(0.3),

[0279] nn.Linear(512, 1)

[0280] )‌:ml-citation{ref="1,7" data="citationList"}

[0281] Output layer

[0282] Output probability through the Sigmoid function: nn.Sigmoid()‌.

[0283] 2. Key code implementation

[0284] import torch

[0285] import torch.nn as nn

[0286] from torchvision import models

[0287] class TripleResNet50(nn.Module):

[0288] def __init__(self):

[0289] super().__init__()

[0290] Three independent branches

[0291] self.pre_branch = ResNetBranch()

[0292] self.post_branch = ResNetBranch()

[0293] self.diff_branch = ResNetBranch()

[0294] Fully connected layer

[0295] self.fc = nn.Sequential(

[0296] nn.Linear(6144, 1024),

[0297] nn.ReLU(),

[0298] nn.Dropout(0.5),

[0299] nn.Linear(1024, 512),

[0300] nn.ReLU(),

[0301] nn.Dropout(0.3),

[0302] nn.Linear(512, 1),

[0303] nn.Sigmoid() )

[0305] def forward(self, pre_img, post_img, diff_img):

[0306] Feature extraction

[0307] pre_feat = self.pre_branch(pre_img).flatten(1)

[0308] post_feat = self.post_branch(post_img).flatten(1)

[0309] Merge and Classify

[0310] merged = torch.cat([pre_feat, post_feat, diff_feat], dim=1)

[0311] return self.fc(merged)

[0312] class ResNetBranch(nn.Module):

[0313] def __init__(self):

[0314] super().__init__()

[0315] resnet = models.resnet50(pretrained=True)

[0316] self.features = nn.Sequential(list(resnet.children())[:-1])

[0317] def forward(self, x):

[0318] return self.features(x)

[0319] 3. Training Configuration Recommendations

[0320] Data preprocessing‌

[0321] ImageNet standardized parameters are uniformly used:

[0322] transform = transforms.Compose([

[0323] transforms.Resize(256),

[0324] transforms.CenterCrop(224),

[0325] transforms.ToTensor(),

[0326] transforms.Normalize([0.485, 0.456, 0.406], [0.229, 0.224, 0.225])

[0327] ])‌:ml-citation{ref="4,6" data="citationList"}

[0328] Training parameters‌

[0329] Optimizer: AdamW (learning rate 3e-4, weight decay 1e-4);

[0330] Loss function: BCEWithLogitsLoss;

[0331] Batch Size: 8-16 is recommended.

[0332] Feature Alignment‌

[0333] Add contrastive loss to constrain the feature space similarity of the three branches;

[0334] Multimodal feature extraction is achieved through a three-branch structure with independent parameters. Combined with the advantages of PyTorch's pre-trained model, it can quickly adapt to corneal topography analysis tasks.

[0335] Preferably, the step S400 includes: step S401: using the trained model to batch predict a large number of unknown corneal topography maps and corneal difference maps, obtaining the predicted type and corresponding probability value of each corneal difference map, and submitting the prediction results of the model to the doctor for verification and judgment to determine the true type of each corneal difference map;

[0336] Step S402: Combine the true type verified by the doctor with the prediction result to form a new data set, and then return to steps S302 and S303 to use the new data set to train and predict the model; after training, use the validation set to evaluate the model performance, and continuously optimize the model based on the evaluation results.

[0337] In the above technical solution, by using the trained model to perform batch prediction on a large number of unknown corneal topography and corneal difference maps, the predicted type and corresponding probability value of each corneal difference map can be quickly obtained, and the accuracy and reliability of the prediction results can be ensured through verification and judgment by the doctor. The real type after verification by the doctor is combined with the prediction result to form a new data set, and the model is continuously updated and optimized to improve the recognition accuracy and generalization ability of the model. In addition, the model performance is evaluated using the validation set to ensure the stability and reliability of the model in practical applications.

[0338] The specific implementation process of the present invention is:

[0339] Based on the medmont corneal topography acquisition software, the corneal topography before and after wearing the orthokeratology lens was exported and a corneal difference map was formed. The total image pixels were 1603868.

[0340] From the above collected images, we cut out the topography before shaping, the topography after shaping, and the corneal difference map respectively. The cutting is done using fixed pixel points:

[0341] The four vertices of the topographic map pixel before shaping are:

[8038]

[39838]

[80310] [398310];

[0342] The four vertices of the topographic map pixel after shaping are:

[80482] [398482]

[80756] [398756];

[0343] The four vertices of the corneal difference map pixels are:

[77943] [1432 43] [779600] [1432 600]; the three different sized images are compressed to 224224 pixels respectively;

[0344] The defocus ring coordinates in the corneal difference map are obtained by edge detection and centroid segments as P x =112, P y =112; the coordinate of the corneal center is C x =115, C y =118; calculated offset C=5.8;

[0345] Morphological processing was used to highlight the structural features of the defocus ring. A contour detection algorithm was used to detect the outline of the defocus ring in the corneal difference image after morphological processing. The perimeter of the defocus ring was L = 200 pixels and the area A = 1500 pixels. Setting w1 = 0.6 and w2 = 0.4, the formula S was calculated to be 0.60.4712 + 0.41.459 ≈ 0.8663.

[0346] According to the formula, the integrity index R is approximately equal to 7.4999. The R value of all corneal difference maps is selected. max =10 and R min =1, then according to the normalization formula R=(7.4999-1) / (10-1)≈0.72;

[0347] Set the thresholds C1 = 3, C2 = 10, and R1 = 0.6; according to the classification requirements, when C1 < C <= C2 and R1 <= R < 1, it indicates that the position of the defocus ring in the image deviates from the corneal center but is still within the allowable deviation range, and the overall structure remains intact, belonging to the second category; after classification, the doctor then checks the classification results and judges that the shaping effect is good based on the results; create a database, associate the judgment results with the corresponding corneal difference maps to form an image dataset to build a model.

[0348] Obviously, those skilled in the art should understand that to implement all or part of the processes in the above embodiments, it can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above control embodiments. Those skilled in the art can understand that to implement all or part of the processes in the above embodiments, it can be completed by instructing relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the above control embodiments. Among them, the storage medium can be a magnetic disk, optical disc, read-only memory (ROM), random access memory (RAM), flash memory, hard disk (Hard Disk Drive, abbreviated as HDD) or solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memories. Embodiment 2

[0349] As Figure 3 shown, based on the application of Embodiment 1, this embodiment also proposes a corneal difference intelligent recognition system based on deep learning. The system includes a data acquisition and preprocessing module, a data annotation module, an identification model training module, and an identification model optimization module;

[0350] The data acquisition and preprocessing module is used to obtain corneal topographic maps before and after the patient wears the orthokeratology lens and form a corneal difference map, and perform cutting and size adjustment on the three acquired images respectively;

[0351] The data annotation module is used to perform identification and analysis on the corneal difference map, divide the corneal difference map into different categories according to the analysis results, and evaluate the orthokeratology shaping effect according to the classification results to obtain an image dataset corresponding to different categories and orthokeratology shaping effects;

[0352] The model building module trains and studies image datasets of different categories and corneal reshaping effects based on deep learning technology, constructs a corneal difference recognition model with a multi-tower structure, and constructs a corneal difference recognition model with a multi-tower structure for intelligently identifying and analyzing the topographic differences before and after corneal reshaping, and automatically determines the effect of corneal reshaping based on the output results of the model;

[0353] The model optimization module uses the trained model to perform batch predictions on a large number of unknown corneal difference maps, and submits the model's prediction results to doctors for verification and judgment to determine the true type of each corneal difference map. The true type verified by the doctor is combined with the prediction results to form a new data set for continuous iterative optimization of the model.

[0354] The data acquisition and preprocessing module includes a data acquisition unit and a data preprocessing unit; the data acquisition unit uses corneal topography acquisition software to derive images of the patient's corneal topography before and after wearing glasses and the difference between the front and back corneas; the data preprocessing unit defines the fixed pixel point range of the corneal area in the three images based on the characteristics of the corneal topography:

[0355] The four vertices of the corneal topography pixel before reshaping are Q=[x1,y1][x2,y1][x1,y2][x2,y2];

[0356] The four vertices of the corneal topography pixel after reshaping are H=[a1,b1][a2,b1][a1,b2][a2,b2];

[0357] The four vertices of the corneal difference map pixels are Y=[e1,f1][e2,f1][e1,f2][e2,f2]; the image is cut according to the fixed pixel range; the cut image is adjusted and uniformly compressed to the set pixel size according to the model input requirements;

[0358] The data annotation module includes a corneal difference map evaluation unit and a corneal difference map classification unit; the corneal difference map evaluation unit identifies the center point of the defocus ring in the corneal difference map and calculates the Euclidean distance from the corneal center point to obtain the offset C of the defocus ring center relative to the corneal center:

[0359] Morphological processing was used to highlight the structural features of the defocus ring. A contour detection algorithm was used to detect the contour of the defocus ring in the morphologically processed corneal difference image, and the contour perimeter L and contour area A were calculated. The shape regularity metric S of the defocus ring was obtained by calculating the contour roundness and compactness indicators. A contour integrity index R was defined based on the contour area, contour perimeter, and shape regularity metric to evaluate the integrity of the defocus ring.

[0360] The corneal difference map classification unit sets the decentration ring center offset thresholds C1 and C2 and the integrity degree threshold R1. According to the position and structural integrity of the decentration ring in the corneal difference map, the corneal topographic corneal difference map types are classified into the following three categories:

[0361] The first category: When C <= C1 and R = 1, it means that the decentration ring in the image is located at the center of the cornea, with centered positioning and intact structure;

[0362] The second category: When C1 < C <= C2 and R1 <= R < 1, it means that the position of the decentration ring in the image deviates from the center of the cornea but is still within the allowable deviation range, and the overall structure remains intact;

[0363] The third category: When C > C2, it means that the position of the decentration ring in the image deviates from the center of the cornea and has exceeded the allowable deviation range; when R < R1, it means that the structure of the decentration ring is incomplete; both of the above situations are classified into the third category;

[0364] After the classification is completed, the doctor then checks the classification results and judges the orthokeratology effect based on the results. Among them, the first and second categories are judged to have good orthokeratology effects, and the third category is judged to have poor orthokeratology effects; a database is created, and the judgment results are associated with the corresponding corneal difference maps to form an image data set.

[0365] The model construction module uses the Pytorch framework to construct a corneal difference recognition model containing three independent Resnet50 model branches. Each branch is respectively used to receive and process the corneal topographic map before orthokeratology, the corneal topographic map after orthokeratology, and the corneal difference map. Among them, the model structures of the three branches are the same, but the parameters are independent, and they can respectively extract the basic features in the three images; the model structure includes an input layer, a three-tower layer, a merging layer, a fully connected layer, and an output layer. Among them, the input layer is used to receive the three types of picture data; the three-tower layer contains three independent Resnet50 branches, and each branch is respectively used to extract the features of the corresponding image; the merging layer is used to splice the outputs of the three branches; the fully connected layer is used to perform feature fusion and classification judgment on the merged features; the output layer is used to output the probability of the final corneal difference map orthokeratology effect;

[0366] Extract a complete data set containing the corneal topographic map before orthokeratology, the corneal topographic map after orthokeratology, and the corneal difference map from the database. Using the method of stratified sampling, it is divided into a training set, a test set, and a validation set according to a ratio. The training set data is further divided into m batches and the learning rate and the number of iterations are set and input into the model for training; the training set data is input into the model batch by batch for forward propagation and backward propagation, continuously updating the model parameters, and evaluating the performance of the model by calculating the loss function and the accuracy rate during the training process.

[0367] After the model training is completed, the test set is input into the model in batches, forward propagation is performed to obtain the prediction results, and the loss function and accuracy are calculated to evaluate the performance of the model. The model performance is continuously optimized based on the evaluation results.

[0368] The model optimization module uses the trained model to batch predict a large number of unknown corneal topography and corneal difference maps, obtains the predicted type and corresponding probability value of each corneal difference map, and submits the model's prediction results to the doctor for verification and judgment to determine the true type of each corneal difference map;

[0369] The true type verified by the doctor is combined with the prediction result to form a new data set, and then return to step S302 and step S303 to use the new data set to train and predict the model; after training is completed, the validation set is used to evaluate the model performance, and the model is continuously optimized based on the evaluation results.

[0370] The interaction between the above modules can be understood and implemented in conjunction with Example 1, and will not be described in detail in this example.

[0371] The modules or steps of the present invention described above can be implemented using a general-purpose computing system. They can be centralized on a single computing system or distributed across a network of multiple computing systems. Alternatively, they can be implemented using program code executable by the computing system, which can then be stored in a storage system and executed by the computing system. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software. Example 3

[0372] like Figure 4 As shown, further, in another aspect, the present application also proposes an electronic device, comprising:

[0373] processor;

[0374] a memory for storing processor-executable instructions;

[0375] The processor is configured to implement the method described in Example 1 when executing the executable instructions.

[0376] The electronic device of the embodiment of the present disclosure includes a processor and a memory for storing processor-executable instructions, wherein the processor is configured to implement the method described in the above embodiment 1 when executing the executable instructions.

[0377] It should be noted that the number of processors can be one or more. Furthermore, the electronic device according to the embodiments of the present disclosure may also include an input system and an output system. The processor, memory, input system, and output system may be connected via a bus or other means, which are not specifically limited herein.

[0378] Memory, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and various modules, such as the program or module corresponding to the deep learning-based intelligent corneal disparity recognition method in the present disclosure. The processor executes the software programs or modules stored in the memory to perform various functional applications and data processing in the electronic device.

[0379] The input system can be used to receive input numbers or signals. The signals can be key signals related to user settings and function control of the device / terminal / server. The output system can include display devices such as display screens.

[0380] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art will be able to modify the technical solutions described in the aforementioned embodiments or substitute equivalents for some of the technical features. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention shall be included within the scope of protection of the present invention.

Claims

1. A method for intelligent identification of corneal differences based on deep learning, characterized by: The method comprises: Step S100: Obtain corneal topography of the patient before and after wearing orthokeratology lenses and form a corneal difference map; Step S200: performing recognition analysis on the corneal difference map, classifying the corneal difference map into different categories based on the analysis results, and evaluating the orthokeratology effect based on the classification results, thereby obtaining image datasets corresponding to different categories and orthokeratology effects, including: Step S201: Identify the center of the defocus ring in the corneal difference map and calculate the Euclidean distance from the corneal center to obtain the offset C of the defocus ring center relative to the corneal center; Morphological processing is used to highlight the structural features of the defocus ring. A contour detection algorithm is used to detect the contour of the defocus ring in the corneal difference image after morphological processing, and the perimeter L and contour area A of the contour are calculated. The defocus ring shape regularity metric value is obtained by calculating the roundness and compactness index of the contour. The calculation method of the defocus ring shape regularity metric value is as follows: ; Where S represents the shape regularity metric of the defocus ring, w1 and w2 represent the weights of the roundness and compactness of the defocus ring contour in the shape regularity metric, and w1+w2=1; Based on the contour area, contour perimeter and shape regularity metrics, a contour integrity index is defined to evaluate the integrity of the defocus ring. The contour integrity index is evaluated as follows: ; Where R represents the contour integrity assessment index; calculate the R value of all corneal difference maps and determine the maximum value R max and the minimum value R min , normalize the index R; Step S202: setting the defocus ring center offset thresholds C1 and C2 and the integrity level threshold R1, and classifying the corneal topography difference map type according to the defocus ring position and structural integrity in the corneal difference map; Step S300: Based on deep learning technology, image data sets of different categories and corneal reshaping effects are trained and learned to build a multi-tower corneal difference recognition model for intelligently identifying and analyzing the topographic differences before and after corneal reshaping, and automatically judging the effect of corneal reshaping based on the output results of the model.

2. The method for intelligently identifying corneal differences based on deep learning according to claim 1, characterized in that: The step S100 includes: Step S101: Exporting corneal topography images of the patient before and after wearing the glasses and images of the difference between the front and back corneas using corneal topography acquisition software; Step S102: Based on the characteristics of the corneal topography, define the fixed pixel ranges of the corneal area in the three images: The four vertices of the corneal topography pixel before reshaping are: Q=[x1,y1][x2,y1][x1,y2][x2,y2]; The four vertices of the corneal topography pixel after reshaping are: H=[a1,b1][a2,b1][a1,b2][a2,b2]; The four vertices of the corneal difference map pixel are Y=[e1,f1][e2,f1][e1,f2][e2,f2]; Step S103: According to the fixed pixel range, the three acquired images are cut and resized respectively, and the images are uniformly compressed to the set pixel size according to the model input requirements.

3. The method for intelligently identifying corneal differences based on deep learning according to claim 1, characterized in that: The calculation method of the offset C in step S201 is as follows: ; Among them C x and C y Represent the coordinates of the center point of the cornea, where P x and P y Respectively represent the coordinates of the center point of the defocus ring; The step S202 of classifying the corneal topography and corneal difference map types includes: Category 1: When C<=C1 and R=1, it means that the defocus ring in the image is located at the center of the cornea, centered and structurally intact; Category 2: When C1 < C <= C2 and R1 <= R < 1, it means that the position of the defocus ring in the image deviates from the corneal center but is still within the allowable deviation range, and the overall structure remains intact; Category 3: When C > C2, it means that the position of the defocus ring in the image deviates from the corneal center and has exceeded the allowable deviation range; when R < R1, it means that the defocus ring structure is incomplete; It also includes the following steps: Step S203: After classification, the doctor checks the classification results and judges the shaping effect according to the results. Among them, the first and second categories are judged to have good shaping effects, and the third category is judged to have poor shaping effects; create a database, and associate the judgment results with the corresponding corneal difference maps to form an image data set.

4. The method for intelligently identifying corneal differences based on deep learning according to claim 1, characterized in that: The step S300 includes: Step S301: Use the Pytorch framework to build a corneal difference recognition model containing three independent Resnet50 model branches. Each branch is used to receive and process the corneal topographic map before shaping, the corneal topographic map after shaping, and the corneal difference map. Among them, the model structures of the three branches are the same, but the parameters are independent, and they can extract the basic features in the three images respectively; the model structure includes an input layer, a three-tower layer, a merging layer, a fully connected layer, and an output layer. The input layer is used to receive the three types of picture data; the three-tower layer contains three independent Resnet50 branches, and each branch is used to extract the features of the corresponding image; the merging layer is used to splice the outputs of the three branches; the fully connected layer is used to perform feature fusion and classification judgment on the merged features; the output layer is used to output the probability of the final shaping effect of the corneal difference map; Step S302: Extract a complete data set containing the corneal topographic map before shaping, the corneal topographic map after shaping, and the corneal difference map from the database. Using the method of stratified sampling, divide it into a training set, a test set, and a validation set according to a ratio. Further divide the training set data into m batches and set the learning rate and the number of iterations and input them into the model for training; input the training set data into the model batch by batch, perform forward propagation and backward propagation, and continuously update the model parameters. During the training process, evaluate the performance of the model by calculating the loss function and the accuracy rate; Step S303: After the model training is completed, input the test set into the model batch by batch, perform forward propagation to obtain the prediction results, and calculate the loss function and the accuracy rate to evaluate the performance of the model. Continuously optimize the model performance according to the evaluation results.

5. The method for intelligently identifying corneal differences based on deep learning according to claim 4, characterized in that: The method also includes: Step S400: Use the trained model to perform batch prediction on a large number of unknown corneal difference maps. Hand over the prediction results of the model to the doctor for verification and judgment and determine the true type of each corneal difference map. Combine the true type verified by the doctor with the prediction results to form a new data set and continuously optimize and upgrade the model; The step S400 includes: Step S401: Use the trained model to perform batch prediction on a large number of unknown corneal topographic map corneal difference maps, obtain the predicted type and the corresponding probability value of each corneal difference map, and hand over the prediction results of the model to the doctor for verification and judgment to determine the true type of each corneal difference map; Step S402: Combine the true type verified by the doctor with the prediction result to form a new data set, and then return to steps S302 and S303 to use the new data set to train and predict the model; after training, use the validation set to evaluate the model performance, and continuously optimize the model based on the evaluation results.

6. A deep learning-based intelligent corneal difference recognition system, characterized by: The system includes a data acquisition and preprocessing module, a data annotation module, and a recognition model training module, wherein: The data acquisition and preprocessing module is used to obtain corneal topography of the patient before and after wearing orthokeratology lenses and form corneal difference maps, and to cut and resize the three images obtained respectively; The data annotation module is used to identify and analyze the corneal difference map, classify the corneal difference map into different categories based on the analysis results, and evaluate the orthokeratology effect based on the classification results, thereby obtaining image datasets corresponding to different categories and orthokeratology effects, including: Step S201: Identify the center of the defocus ring in the corneal difference map and calculate the Euclidean distance from the corneal center to obtain the offset C of the defocus ring center relative to the corneal center; Morphological processing is used to highlight the structural features of the defocus ring. A contour detection algorithm is used to detect the contour of the defocus ring in the corneal difference image after morphological processing, and the perimeter L and contour area A of the contour are calculated. The defocus ring shape regularity metric value is obtained by calculating the roundness and compactness index of the contour. The calculation method of the defocus ring shape regularity metric value is as follows: ; Where S represents the shape regularity metric of the defocus ring, w1 and w2 represent the weights of the roundness and compactness of the defocus ring contour in the shape regularity metric, and w1+w2=1; Based on the contour area, contour perimeter and shape regularity metrics, a contour integrity index is defined to evaluate the integrity of the defocus ring. The contour integrity index is evaluated as follows: ; Where R represents the contour integrity assessment index; calculate the R value of all corneal difference maps and determine the maximum value R max and the minimum value R min , normalize the index R; Step S202: setting the defocus ring center offset thresholds C1 and C2 and the integrity level threshold R1, and classifying the corneal topography difference map type according to the defocus ring position and structural integrity in the corneal difference map; The recognition model training module is used to train and learn image data sets of different categories and corneal reshaping effects based on deep learning technology, construct a multi-tower corneal difference recognition model for intelligently identifying and analyzing the topographic map differences before and after corneal reshaping, and automatically judge the effect of corneal reshaping based on the output results of the model.

7. The deep learning-based intelligent corneal difference recognition system according to claim 6, characterized in that: The data acquisition and preprocessing module includes a data acquisition unit and a data preprocessing unit; the data acquisition unit uses corneal topography acquisition software to derive images of the patient's corneal topography before and after wearing glasses and the difference between the front and back corneas; the data preprocessing unit defines the fixed pixel point range of the corneal area in the three images based on the characteristics of the corneal topography: The four vertices of the corneal topography pixel before reshaping are: Q=[x1,y1][x2,y1][x1,y2][x2,y2]; The four vertices of the corneal topography pixel after reshaping are: H=[a1,b1][a2,b1][a1,b2][a2,b2]; The four vertices of the corneal difference image pixels are Y = [e1, f1][e2, f1][e1, f2][e2, f2]; Cut the image according to the fixed pixel point range; adjust the cut image, and uniformly compress the image to the set pixel size according to the model input requirements; The data annotation module includes a corneal difference map evaluation unit and a corneal difference map classification unit; the corneal difference map evaluation unit identifies the center point position of the defocus ring in the corneal difference map and calculates the Euclidean distance from the center of the cornea to obtain the offset C of the defocus ring center relative to the corneal center: Highlight the structural features of the defocus ring through morphological processing, use the contour detection algorithm to detect the contour of the defocus ring in the morphologically processed corneal difference image, and calculate the perimeter L and contour area A of the contour; obtain the defocus ring shape regularity measurement value S by calculating the roundness and compactness indexes of the contour; define a contour integrity index R based on the contour area, contour perimeter and shape regularity measurement value to evaluate the integrity of the defocus ring; The corneal difference map classification unit sets the defocus ring center offset thresholds C1 and C2 and the integrity degree threshold R1, and classifies the corneal topographic corneal difference map types into the following three categories according to the position and structural integrity of the defocus ring in the corneal difference map: The first category: when C <= C1 and R = 1, it means that the defocus ring in the image is located at the center of the cornea, centered and the structure is intact; The second category: when C1 < C <= C2 and R1 <= R < 1, it means that the position of the defocus ring in the image deviates from the center of the cornea but is still within the allowable deviation range, and the overall structure remains intact; The third category: when C > C2, it means that the position of the defocus ring in the image deviates from the center of the cornea and has exceeded the allowable deviation range; when R < R1, it means that the defocus ring structure is incomplete; After classification, the doctor checks the classification results and judges the shaping effect according to the results. Among them, the first and second categories are judged to have good shaping effects, and the third category is judged to have poor shaping effects; create a database, and associate the judgment results with the corresponding corneal difference maps to form an image data set.

8. The deep learning-based intelligent corneal difference recognition system according to claim 6, characterized in that: The model construction module uses the Pytorch framework to construct a corneal difference recognition model containing three independent Resnet50 model branches. Each branch is used to receive and process the corneal topographic map before shaping, the corneal topographic map after shaping, and the corneal difference map respectively. The model structures of the three branches are the same, but the parameters are independent and can extract the basic features in the three images respectively; the model structure includes an input layer, a three-tower layer, a merging layer, a fully connected layer and an output layer. The input layer is used to receive the three types of picture data; the three-tower layer contains three independent Resnet50 branches, and each branch is used to extract the features of the corresponding image; the merging layer is used to splice the outputs of the three branches; the fully connected layer is used to perform feature fusion and classification judgment on the merged features; the output layer is used to output the probability of the final corneal difference map shaping effect; A complete dataset containing corneal topography before and after reshaping and corneal difference maps was extracted from the database. A stratified sampling method was used to divide the dataset into training, test, and validation sets in proportion. The training dataset was further divided into m batches, and the learning rate and number of iterations were set to input the dataset into the model for training. The training dataset was input into the model in batches, and forward and backward propagation were performed to continuously update the model parameters. During the training process, the model performance was evaluated by calculating the loss function and accuracy. After the model training is completed, the test set is input into the model in batches, forward propagation is performed to obtain the prediction results, and the loss function and accuracy are calculated to evaluate the performance of the model. The model performance is continuously optimized based on the evaluation results.

9. The deep learning-based intelligent corneal difference recognition system according to claim 6, characterized in that: The system further comprises: A model optimization module, which uses the trained model to batch predict a large number of unknown corneal topography and corneal difference maps, obtains the predicted type and corresponding probability value of each corneal difference map, and submits the model's prediction results to doctors for verification and judgment to determine the true type of each corneal difference map; The true type verified by the doctor is combined with the prediction result to form a new data set, and then return to step S302 and step S303 to use the new data set to train and predict the model. After the training is completed, the model performance is evaluated using the validation set, and the model is continuously optimized based on the evaluation results.

10. An electronic device, characterized in that: The electronic device comprises: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Intelligent evaluation auxiliary system and method for orthokeratology lens

    CN113935809A

  • Orthokeratology lens parameter recommendation method

    CN118939991A