Evaluation of the corneal topography based on deep learning

Purpose The current study designed a unique type of corneal topography evaluation method based on deep learning and traditional image processing algorithms. The type of corneal topography of patients was evaluated through the segmentation of important medical zones and the calculation of relevant medical indicators of orthokeratology (OK) lenses. Methods The clinical data of 1,302 myopic subjects was collected retrospectively. A series of neural network-based U-Net was used to segment the pupil and the treatment zone in the corneal topography, and the decentration, effective defocusing contact range, and other indicators were calculated according to the image processing algorithm. The type of corneal topography was evaluated according to the evaluation criteria given by the optometrist. Finally, the method described in this article was used to evaluate the type of corneal topography and compare it with the type classified by the optometrist. Results When the important medical zones in the corneal topography were segmented, the precision and recall of the treatment zone reached 0.9587 and 0.9459, respectively, and the precision and recall of the pupil reached 0.9771 and 0.9712. Finally, the method described in this article was used to evaluate the type of corneal topography. When the reviewed findings based on deep learning and image processing algorithms were compared to the type of corneal topography marked by the professional optometrist, they demonstrated high accuracy with more than 98%. Conclusion The current study provided an effective and accurate deep learning algorithm to evaluate the type of corneal topography. The deep learning algorithm played an auxiliary role in the OK lens fitting, which could help optometrists select the parameters of OK lenses effectively.


Introduction
In recent decades, the prevalence of myopia has increased dramatically worldwide, with a trend toward affecting younger ages (1,2).It has been documented that the prevalence of myopia in children and adolescents in China will be 84% in 2050 (3).Myopia has been suggested to be a great burden on society in both the economic and public health systems (4).
Many optical interventions have been studied to retard myopia progression, such as multifocal contact lenses (5), multifocal spectacle lenses, and orthokeratology (OK) lenses (6)(7)(8).OK lenses have shown one of the greatest myopia control effects among these optical methods, with the slowing axial elongation ranging from 32% to 63% (9).
Corneal topography is an indispensable measurement in pretreatment screening (10) and evaluating lens performance (11)(12)(13)(14).The color of the topography interprets the morphological patterns (15), with different colors reflecting the variety of corneal diopter power.In the previous studies, usually, the basic information of corneal topography, such as flat K, steep K, and E value, were studied (16,17), while few of them investigated the decentration, treatment zone, and pupil (18).For example, it has been reported that decentration is negatively correlated with axial elongation in myopic children (19,20).Currently, two methods are used in corneal topography classification in clinics.One is based on the modeled force acting on corneal shape changes, such as bull's-eye, smiley-face, central islands, and corneal astigmatism.The other way is based on the decentration distance, which is classified as mild decentration (<0.5 mm), medium decentration (0.5-1 mm), and severe decentration (>1.0 mm) (21).However, the methods mentioned above were proposed according to the changes in corneal shape.They were not connected with the defocus power of the OK lens, which may not predict the myopia control effects.Therefore, we proposed a new classification for corneal topography according to the effective defocusing contact range.
Deep learning plays a powerful role in the analysis of corneal topography, (22,23) and it can learn various semantic information in images by building deep neural networks (24).Deep learning has been used to classify corneal topography between keratoconus and normal corneas because of the significant difference in corneal shape between them, and neural networks could easily extract image features (22,25).However, it is difficult to accurately distinguish the corneal topographical characteristics among normal corneas using deep neural networks due to the insignificant difference in corneal shapes among them.In the past, semantic segmentation was used to identify the content and location of objects in the image (26,27).In the current study, we aimed to use semantic segmentation to identify the important medical zones in corneal topography.In this study, semantic segmentation of the pupil and treatment zone is performed based on deep learning (28).We then calculate the medical indicators of decentration and effective defocusing contact range and finally evaluate the type of corneal terrain according to the evaluation criteria given by the optometrists.

Materials and methods . Data collection method
This study was approved by the Ethics Committee of the Tianjin Eye Hospital Optometric Center (ID 2023003) and adhered to the tenets of the Declaration of Helsinki.All participants provided informed consent.A Tomey corneal topographer (Takaratomy, Japan) was used to measure the corneal topography (29).The data of 1,302 myopic children and adolescents, aged 6-18 years, in the Tianjin Eye Hospital Optometry Center from 2013 to 2021 were collected retrospectively (2,604 eyes in total).Among them, data from 500 eyes that completed corneal topography were used for statistical and artificial intelligence analysis.The corneal topographic data were collected at baseline and after 1 month of OK lens wear.The specific operations were as follows.The collected images were exported in the form of tangent images through the automated scripts and corneal topography software (TMS-4A SW).Patients with previous experience with OK lens wear, poor fitting performance, and corneal diseases were excluded (30).

. Materials
The corneal topography was measured after 1 month of lens wear, which reflected the corneal characteristics (Figure 1).We determined the different zones of corneal topography and pupil as follows for analyzing the OK lens performance.
Treatment zone: the zone of the corneal surface that provides functional vision.It is the zone with the smallest central corneal aberration and the best visual quality.
Pupil: the hole in the middle of the iris, which refers to the circle of black pixels in the middle of the corneal topography.
Decentration: the distance between the pupil and the center of the treatment zone.
Effective defocusing contact range: the intersection of the defocusing zone boundary and the pupil boundary is the effective contact value, and the proportion of the effective contact value in the pupil boundary is the effective defocusing contact range.

. Research framework
In the current study, a unique type of corneal topography evaluation method based on deep learning and traditional image processing algorithms (Figure 2) was proposed.The treatment zone and pupil in corneal topography were segmented by the U-Net series of neural networks (31,32).Decentration and effective defocusing contact range in the corneal topography was defined by an experienced optometrist, and a variety of image processing algorithms were used for calculation.Finally, the types of corneal topography were evaluated by combining the evaluation criteria provided by the optometrist with the results of various medical indicators (decentration and effective defocusing contact range).
. Important medical zones

. . Segmentation method
The location information of the pupil and the treatment zone in the corneal topography were segmented by semantic segmentation.The semantic segmentation was usually interpreted as the classification of pixels in an image, so a U-Net series of neural networks was proposed to solve the problem (semantic segmentation of important medical zones).The jump connection in U-Net helps the convergence of the deep network and prevents  the gradient from disappearing in the training process.The U-Net network structure is shown in Figure 3, including 19 3 * 3 convolution layers (blue rectangle), four maximum pooling layers (green rectangle), 4 upper sampling layers (yellow rectangle), and 1 1 * 1 convolution layer (purple rectangle).U-Net++ introduces deep supervision and multi-scale skip connections to improve network structure.It is worth noting that U-Net++ integrates feature maps from specific decoder and encoder layers, achieving a more robust semantic segmentation process through feature superposition.On this basis, U-Net3+ incorporates full-scale skip links, allowing for the fusion of feature maps across every decoder and encoder layer.This comprehensive integration facilitates a more holistic understanding of the input data.Additionally, U-Net3+ introduces a classification-guided module, which plays a vital role in ensuring precise segmentation.Therefore, 809 corneal topographies with good quality (the image acquisition is complete and the corresponding patient has no eye disease) were selected, and the specific zones of the pupil and treatment zone were manually marked with labeling software under the guidance of the optometrist (33) to facilitate semantic segmentation in the subsequent use of the U-Net neural network.To ensure the accuracy of the label, we asked two ophthalmic optical directors to recheck the label results during the labeling of the original data.
In the design of the loss function, the cross-entropy loss function was used (33).Suppose there are N pixels in total; the true annotation is expressed as r n , and the predicted probability is expressed as p n , so the cross entropy (CE) is described by Eq. 1: Precision, recall, f1 score, and Intersection over Union (IoU) in the segmentation model were selected to evaluate segmentation performance (Eq.2-5): .

. Training strategy
The original images and their corresponding labels were input into the neural network together.They randomly selected 80% as the training set to train the semantic segmentation model and the other 20% as the test set to test the performance of the model.To achieve faster convergence in the training phase, the Adam optimizer was used for gradient descent (34).In terms of setting experimental parameters, the selection of learning rate and batch size is a key factor in model performance and training stability.The learning rate refers to the step size of each parameter update.An excessive learning rate may lead to unstable training, and the model cannot achieve minimum loss.A low learning rate can lead to slow convergence speed and may fall into local minima.Batch size refers to the size of the data batches used in each training session.An excessive batch size may lead to underfitting of the model, while an excessively low batch size may prolong training time and may not perform as well as models with larger batch sizes.In the experiment, our initial learning rate was selected as 10 −3 , 10 −4 , and 10 −5 , while the batch size was selected as 16, 32, and 64.We trained using the grid search method and ultimately set the initial learning rate to 10 −4 and the batch size to 32.At the same time, all input images were resized to 224 × 224 and trained for 100 epochs to obtain the optimal results.Based on the loaded pre-training model, the semantic segmentation task was realized through transfer learning.In the test stage, the corneal topography was enhanced by rotation, clipping, and adding noise, which is used as the input of the model, and the pupillary and treatment zone segmentation effect images were obtained.The whole program was implemented based on the Pytorch deep learning framework.

. Calculation method of the medical indicators
Treatment zone, pupil, decentration, and effective defocusing contact range were calculated based on the OpenCV library (35).
The decentration was calculated as the Euclidean distance between the pupil and treatment zone after obtaining the position information of the pupil and the treatment zone.The formula is shown in Eq. 6, where x and y are the coordinates of the corresponding center point zone, respectively.
Decentration represented the distance between the center point of the pupil and the treatment zone.To obtain this indicator, the following operations should be carried out: (1) The pupil and the treatment zone were segmented using the above-trained U-Net3+ model.(2) The contour of the segmented zone was detected, and the coordinates of the center point were located by its circumscribed rectangle.(3) The distance between the pupil and the center point of the treatment zone is calculated, and the unit is converted into millimeters according to the ratio of 1:50 (1 mm = 50 px).
The effective defocusing contact range reflects the situation, in which the pupil encloses the treatment zone.Specifically, the location of the defocusing zone was calculated at first.The intersection of the pupil and the treatment zone was subtracted from the pupil.Then, the image was binarized (the function of binarization is to keep the foreground part of the segmented image unique in pixel values) and the boundary range between the defocused zone and the pupil boundary was calculated using the four-neighborhood algorithm, which is the effective contact value.The proportion of the effective contact value in the whole pupil boundary was calculated using the formula shown in Eq. 7, where EDCR is the effective defocusing contact range, ECV is the effective contact value, and C is the length of the pupil boundary. .

Evaluation criteria for corneal topography type
After calculating the decentration and effective defocusing contact range mentioned earlier, we incorporated them into the evaluation criteria provided by the optometrist to evaluate the corneal topography.The evaluation criteria are as follows: Class I: 0 mm ≤ decentration ≤ 1 mm, effective defocusing contact range > 3/4.Class II: 0 mm ≤ decentration ≤ 1 mm, effective defocusing contact range is 1/4-3/4.There is no absolute difference between "good" and "bad" topography.For example, for most younger myopic children, optometrists prefer the corneal topography to be class I after fitting the OK lens.The small decentration of this type of topography could control axial elongation and correct refractive errors.While for older adolescents, the myopia progression reaches a stable state, the class IV of corneal topography is more appropriate.Therefore, the corneal topography type evaluation method described in this article can effectively analyze the corneal topography of various patients to facilitate optometrists' development of personalized laboratory fitting programs for patients.

Data analysis
Data analysis was performed using third-party libraries Matplotlib 2.2.3 and scikit-learn 0.6.1.For semantic segmentation of important medical zones, the scikit-learn library was used to calculate the precision, recall, F1-score, and IoU.Finally, we compared the number and accuracy of various types of corneal topographies with the labels given by the optometrist and counted the relationship between them and the 1-year axial elongation.

Results and analysis . Results of the treatment zone and pupil segmentation
In the past, when optometrists identified the treatment zone of the corneal topography, some errors might have occurred due to human subjectivity or long-term work.Table 1 shows the segmentation accuracy of the deep learning model through a number of evaluation indicators.It could be seen that the results of the model are very close to the human annotation results, and the performance of U-Net, U-Net++, and U-Net3+ is fairly comparable.However, U-Net exhibits a lower model complexity, implying that we could expedite the training and prediction processes.Furthermore, U-Net++ and U-Net3+, owing to their increased model complexity, were more prone to overfitting.In addition, considering model deployment, the lightweight and simplicity of U-Net make it more amenable to practical applications.Our research has already been applied at the Tianjin Eye Hospital Optometry Center, so selecting U-Net has facilitated the simplification of the deployment and maintenance processes.In summary, the U-Net model, due to its shorter training times, reduced susceptibility to overfitting, and ease of deployment, emerged as our preferred choice.Both spatial attention and channel attention were also attempted in our study in an effort to optimize the performance of the model.However, there was no observed improvement in the segmentation results.The U-Net model trained by CE loss was chosen (36) and evaluated from the aspects of precision, recall, F1-score, and IoU.To obtain optimal segmentation results, U-Net++ and U-Net3+ were used to carry out experiments.The results showed that U-Net3+ has the best segmentation performance.We thought it was mainly because U-Net3+ uses multiple short connections instead of long connections, which maximizes the semantic information of the original image.In addition, the deep learning model only took 0.06 s to segment the pupil and the treatment zone in the corneal topography.In conclusion, the deep learning model had faster processing speed and higher accuracy in the semantic segmentation of important medical zones.
To further demonstrate the stability of the model, a K-fold cross-validation method was used to divide the dataset into 10 parts to train the model (k = 10).The method of dividing the dataset into 10 parts to train the model is to randomly divide the dataset into nine parts for each experiment as the training set and the other .

Calculation results of the medical indicators . . Decentration calculation results
The results are shown in Supplementary Figure S1f, where dark gray is the contour of the treatment zone, light gray is the contour of the pupil, and the black straight line is the decentration.At the same time, special circumstances need to be considered (the results are shown in Supplementary Figure S2).There may be noise after the deep learning segmentation model segments the medical zone.It was necessary to calculate the maximum value of the zone under each contour in the segmentation image as the desired medical zone and understand other zones as noise for removal.

. . Calculation results of e ective defocusing contact range
The effective defocusing contact range indicated how much the treatment zone is inside the pupil.The results of each step were as follows.(1) The original figure (Supplementary Figure S3a) was transferred into the trained U-Net3+ model to segment the pupil (Supplementary Figure S3b) and the treatment zone (Supplementary Figure S3c).( 2) The pupil was used to intersect with the treatment zone (Supplementary Figure S3d).(3) The defocused zone was obtained by subtracting this intersection from the pupil (Supplementary Figure S3e).( 4) The pupil and the defocusing zone were binarized (Supplementary Figure S3g).( 5) The four-neighborhood algorithm was used to detect the boundary points of the pupil and the defocusing zone.The proportion of their coincident boundary points (purple line) to the total circumference of the pupil was calculated, which was the effective defocusing contact range (Supplementary Figure S3h).

. Research on the results of corneal topography type assessment and axial elongation
Following the calculation of the decentration and effective defocusing contact range, the corneal topography was evaluated according to the recommendation suggested by the Tianjin Eye Hospital Optometry Center.The relationship between corneal topography and axial elongation was analyzed to verify the suitability of different corneal topographies for patients of different ages.As the rate of axial elongation in older adolescents is slower, optometrists need to mainly consider visual quality when fitting OK lenses.The treatment zone of the class IV corneal topography in Table 3 was relatively large, and the decentration was relatively small, resulting in better visual quality in patients.As for younger children, they were in a period of rapid myopia development, and more attention should be paid to controlling the growth rate of the axial length during the fitting of the OK lens.However, excessive decentration might impact the effects of the corneal reshaping of the OK lens.In general, class I or class II of corneal topography might be more suitable for younger children.

. E ciency of machine learning
This experiment was developed under the Linux system, and the video card was Nvidia 2080Ti.The statistical analysis of 10 program runs showed that the average running time of the method described in this article is 2.2 s [Intel Core (TM) i7-9700K CPU @ 3.6 GHz].It saved manpower and time compared with the optometrist, who spends more than half a minute to analyze the results.

Discussion
. The need for models Usually, traditional curvature information from corneal topography is used to determine the parameters of OK lenses (37).After a series of fluorescence evaluations and several trials of lenses, we can obtain lenses that are suitable for patients.This process depends on the experience of the optometrist and is very timeconsuming.It was worth noting that the risk of corneal damage and cross-infection may be increased during the fitting process of an OK lens (38,39).Therefore, clinicians hope to reduce the number of trial lenses as much as possible.
In this study, an effective method for corneal topography type evaluation was proposed, which can accurately calculate various medical indicators.Optometrists could set the best values for important medical indicators for different patients.At this time, the system would classify the corneal topography type, calculate the decentration, select effective defocusing contact range, etc.The optometrists then could quickly select the optimal OK lens for the patients and reduce the number of tests required, which plays an important role in preventing and controlling the risk of cross-infection.

. The advantage of the model
A deep learning model could more easily solve problems that are difficult to describe with objective criteria, especially for the segmentation of treatment zones.The treatment zone is originally referred to as the zone in the corneal topography where the diopter of the anterior surface of the cornea changes <0.50 D compared with that at the apex of the cornea (40).However, due to the uncertainty of the corneal state during the fitting of the OK lens, the treatment zone of some patients was not a relatively complete closed zone, but the optometrist hoped to get a complete zone for further analysis.Therefore, it is difficult to identify the treatment zone of all people with a fixed diopter value.At this time, the semantic segmentation model based on deep learning could better solve this problem.After extracting features from many corneal topographies, the model could understand which part of the treatment zone corresponds to it and segment it.
Previous studies only identified the treatment zone (41).As far as we know, there was no objective evaluation method to classify the corneal topography type according to the decentration and effective defocusing contact range.These indicators were usually calculated through professional medical guidance.The current method proposed by us could help optometrists carry out customized fittings according to the different ages of patients so that In addition, it takes 1-2 min for the optometrist to evaluate the corneal topography results in the usual way and input them into the computer, and there is a chance of interference due to external factors in the process.However, the error caused by subjectivity can be avoided based on the method described in this article, and the data calculation and acquisition efficiency could be effectively improved.

. Model performance
It could be seen that the results of the model are very close to the human annotation results, and the performance of U-Net, U-Net++, and U-Net3+ is fairly comparable.However, U-Net exhibits a lower model complexity, implying that we could expedite the training and prediction processes.Furthermore, U-Net++ and U-Net3+, owing to their increased model complexity, were more prone to overfitting.In addition, considering model Frontiers in Medicine frontiersin.orgdeployment, the lightweight and simplicity of U-Net make it more amenable to practical applications.Our research has already been applied at the Tianjin Eye Hospital Optometry Center, so selecting U-Net has facilitated the simplification of the deployment and maintenance processes.In summary, the U-Net model, due to its shorter training times, reduced susceptibility to overfitting, and ease of deployment, emerged as our preferred choice.In our study, spatial attention and channel attention were also attempted in an effort to optimize the performance of the model.However, there was no observed improvement in the segmentation results.The U-Net model trained by CE loss was chosen, and the model was evaluated from the aspects of precision, recall, F1-score, and IoU.
In addition, the deep learning model only took 0.06 s to segment the pupil and the treatment zone in the corneal topography.In conclusion, the deep learning model had faster processing speed and higher accuracy in the semantic segmentation of important medical zones.

. Limitations
A larger sample size could optimize the deep learning model to avoid overfitting.This method can effectively improve the segmentation accuracy of the pupil and treatment zone, calculate medical evaluation indicators more accurately, and analyze and evaluate the type of corneal topography more reasonably, which can effectively improve the efficiency of lens fitting.In addition, this study is on the images collected by Tomey corneal topography.Images generated by other brands of corneal topographers can also use the method described in this article to grade the treatment effect of corneal topographers.However, it is necessary to retrain the segmentation model of the treatment zone and pupil and fine-tune the subsequent image processing algorithm.

Conclusion
This study proposed a novel method to evaluate corneal topography based on deep learning.This process formulated corresponding medical indicators and accurately calculated them according to the analysis of images.At the same time, it reduced the pressure of time and manpower on optometrists and assisted optometrists in follow-up treatment.This method provided a new idea for the analysis of corneal topography, and the corneal topography of other brands could be analyzed through simple changes, thus guiding the intelligent fitting of OK lenses.

FIGURE
FIGURECorneal topography after month of OK lens wear.Treatment zone, pupil, decentration, and e ective defocusing contact range are marked in the figure.

FIGURE
FIGUREResearch framework process.
TABLE Segmentation results of the U-net, U-Net++, and U-Net + models.The validation set for each experiment is different, and the entire experiment is repeated 10 times to ensure the robust of the model.As shown in Table2, the results of the 10 experiments showed slight differences due to different datasets, but the overall performance was good.The F1-scores of the pupil and treatment zone were the highest at 0.9707 and 0.9409, respectively.
TABLE Statistics of corneal topography and axial elongation.