Skip to main content
NPJ Digital Medicine logoLink to NPJ Digital Medicine
. 2026 Jun 17;9:756. doi: 10.1038/s41746-026-02857-2

A web-based semi-supervised deep learning platform for automated AS-OCT assessment and monitoring of infectious keratitis

Yiming Sun 1, Peng Jin 2, Jingxuan Cai 3, Pengjie Chen 1, Nuliqiman Maimaiti 1, Yaqi Wang 4, Xianwen Liu 2, Zhichao Hu 2, Guiping Qian 5, Gangyong Jia 2, Peifang Xu 1,✉, Juan Ye 1,✉
PMCID: PMC13635184  PMID: 42310120

Abstract

Infectious keratitis (IK) is a leading cause of corneal blindness globally. Accurate severity assessment is critical but remains limited by the subjective and limited nature of slit-lamp and anterior segment optical coherence tomography (AS-OCT) assessments. This study presents the ‘Intelligent Quantitative Keratitis Image Analysis Platform’, a web-based deep learning system for automated IK assessment through lesion segmentation, parameterization, stratification, and three-dimensional (3D) visualization based on AS-OCT data. A semi-supervised framework combining U-Net and Swin Transformer architectures was trained on 3130 AS-OCT images to address imaging artifacts, low contrast, scale variation, and irregular lesion boundaries. The model achieved Dice scores of 0.922 for corneal tissue and 0.834 for infiltrative lesions. Lesion characteristics were quantified within a polar coordinate system for radial stratification, yielding classification accuracies of 0.802 for infiltration thickness (IT) and 0.905 for infiltration width (IW). Intraclass correlation coefficients (ICCs) between AI and ground truth were 0.961 (IT) and 0.960 (IW), numerically exceeding the inter-expert agreement (ICCs: 0.786–0.955). Multimodel visualization via 3D corneal reconstructions aligned with slit-lamp images enabled anatomically coherent monitoring of disease progression. Overall, the platform provides a non-invasive, objective, and efficient approach for IK evaluation and monitoring.

Subject terms: Corneal diseases, Three-dimensional imaging

Introduction

Infectious keratitis (IK) is one of the leading causes of corneal blindness worldwide, accounting for ~5 million cases of bilateral blindness and 2 million cases of monocular vision loss each year, particularly in low- and middle-income countries1–4. Timely and accurate assessment of IK is essential for selecting appropriate treatment and improving clinical outcomes. However, current clinical evaluations face several limitations: Slit-lamp imaging provides only a two-dimensional, front-facing view of lesions, while anterior segment optical coherence tomography (AS-OCT) is capable of capturing cross-sectional corneal structure, is often underutilized, typically relying on only a few slices. This leads to incomplete and subjective assessments, difficulty in longitudinal comparison, and heavily dependent on clinician expertise5,6.

These challenges underscore the urgent need for more comprehensive, objective, and standardized tools to support IK management. Deep learning (DL), a branch of artificial intelligence (AI), has shown considerable promise in enhancing diagnostic accuracy, clinical decision-making, and workflow efficiency across various medical domains7–10. In IK, prior DL studies have primarily focused on improving diagnostic performance, reporting mean sensitivities and specificities of 86.2% and 96.3%, respectively, on external datasets2. However, automated tools for lesion assessment, monitoring, and stratification remain underdeveloped6.

AS-OCT provides high-resolution volumetric imaging of the anterior segment, including detailed corneal structures11,12. Its key advantage lies in the precise delineation of corneal ulceration, infiltrates and stromal haze, enabling objective quantification of lesion depth, extent and progression. This makes AS-OCT particularly valuable for characterizing and monitoring both superficial and deep-seated forms of IK13–15. When combined with DL algorithms, this modality has the potential to enable accurate, reproducible, and longitudinal evaluation of IK progression.

Segmentation serves as the foundation for downstream algorithmic analysis. U-Net remains the most widely adopted architecture for medical image segmentation, effectively combining multi-scale features from the encoder and decoder via skip connections16. Although several approaches have been proposed to address poor object-background contrast17, they often fail to achieve satisfactory segmentation performance for low-contrast or ill-defined targets. In AS-OCT images, noise artifacts and indistinct corneal structures further complicate accurate segmentation of the cornea and lesions. Moreover, the need for large-scale manual annotations presents a significant barrier to scalability. Semi-supervised segmentation offers a promising solution by leveraging self-training and consistency regularization, which have shown success in natural image tasks and are increasingly being adapted to medical imaging18,19. Therefore, a semi-supervised framework for lesion segmentation is well-suited to address these challenges and reduce annotation burdens.

In this study, we developed and validated a web-based platform, ‘Intelligent Quantitative Keratitis Image Analysis Platform’, which integrates deep learning-based lesion detection, quantitative parameter extraction, three-dimensional (3D) visualization, and automated stratification. By combining established approaches for the automated diagnosis of anterior segment diseases and etiological differentiation, this platform aims to support timely and objective evaluation of corneal pathology.

Results

Patient demographics and dataset construction

A total of 16,000 AS-OCT images were initially collected from 125 patients diagnosed with infectious keratitis between September 2018 and March 2024. After excluding 12,663 low-quality or irrelevant scans, 3130 images were included for model training and internal validation. The mean age was 58.4 ± 15.6 years (range: 3–92 years), and 69.4% of patients were male. An independent hold-out cohort comprising 207 AS-OCT images from 61 patients, distinct from the training cohort, was used to evaluate model generalizability. Patient demographics are summarized in Table 1.

Table 1.

Patient demographics of the developmental dataset and independent hold-out cohort

Variables Development dataset Independent hold-out cohort
No. of eyes 125 61
No. of patients 125 61
No. of images 3130 207
Mean age (SD) 58 (16) 60 (15)
No. of males (%) 69.4% 72.1%
No. of right eyes (%) 61.3% 55.7%

As described in our previous work, annotation reliability was assessed using intra- and inter-observer consistency. Twenty randomly selected AS-OCT images were manually segmented by three ophthalmologists. Cornea annotations showed high agreement (mean IoU > 0.93, Dice > 0.96), while lesion annotations demonstrated acceptable consistency (mean IoU > 0.73, Dice > 0.83). In some cases, corneal infiltration obscured lesion margins, particularly on visual inspection, which likely contributed to the relatively lower consistency observed in lesion segmentation compared with corneal annotations.

Performance of the deep learning detection module

Segmentation performance was evaluated using both direct and indirect metrics. Direct metrics included Dice coefficient, accuracy, precision, and sensitivity, while indirect evaluation involved relative absolute error (RAE) and intersection-over-union for angular measurements (IoU-angles).

As shown in Table 2, corneal segmentation achieved a Dice coefficient of 0.922, accuracy of 0.984. For keratitis lesions, the corresponding values were 0.834 and 0.997, indicating high segmentation accuracy and lesion detectability, surpassing baseline models. Representative cases with relatively lower Dice scores are shown in Supplementary Fig. 1, suggesting that performance may be affected when lesions are located near the limbus or central beam.

Table 2.

Segmentation performance for the cornea and lesion on the independent hold-out cohort, along with the comparative performance of three baseline models for lesion segmentation

Variables Dice Accuracy Precision Sensitivity
Cornea 0.922 0.984 0.912 0.936
Lesion 0.834 0.997 0.863 0.830
Lesion, Attention U-Net 0.648 0.992 0.508 0.960
Lesion, Segnet 0.364 0.968 0.242 0.973
Lesion, U-Net 0.783 0.996 0.864 0.742

Figure 1 shows the error distribution for infiltration thickness (IT) and infiltration width (IW) relative to ground truth. Most RAEs were within 15%, with 22.7% (IT) and 33.8% (IW) below 5%. The mean IoU-angles was 0.811, further supporting segmentation reliability.

Fig. 1. Segmentation performance based on quantification analysis.

Fig. 1

a RAE distribution between AI-derived and ground truth values for IT and IW. b Mean IoU-angles between AI predictions and the ground truth. Light purple indicates the predicted segmentation, dark purple denotes the ground truth, and the green highlights the overlapping region between them. IT infiltration thickness, IW infiltration width, RAE relative absolute error. IoU-angles intersection-over-union for angle-based evaluations.

In a sensitivity analysis restricted to 10 representative images with clear and typical infiltrates, the Dice coefficient was 0.851, indicating that the main findings were not driven by slice selection.

Accuracy of parametric analysis and stratification

Parametric accuracy was assessed using Bland–Altman analysis and coordinate error calculations on 168 test images with Dice > 0.8. As shown in Fig. 2a, the mean bias for IT was −0.008 mm (95% limits of agreement [LoA]: −0.108 to 0.092 mm), and for IW was 0.199 mm (95% LoA: −0.769 to 1.168 mm), indicating negligible systematic error. At the patient level (Supplementary Fig. 2), the mean bias was −0.010 mm (95% LoA: −0.092 to 0.073 mm) for IT and 0.321 mm (95% LoA: −0.731 to 1.373 mm) for IW, suggesting consistent performance across slice- and patient-level analyses.

Fig. 2. Evaluation of parametric analysis and stratification.

Fig. 2

a Bland–Altman plots assessing agreement in IT and IW measurements between the AI system and ground truth. b X/Y coordinate errors for the deepest and lateral edge points of lesions. c Correlation of AI-derived measurements with manual annotations and ground truth for IT and IW. d Classification accuracy of lesion stratification based on IT and IW compared with the ground truth. IT infiltration thickness, IW infiltration width, DIT degree of infiltration thickness, DIW degree of infiltration width, G groundtruth, D deep learning method, A/B/C different ophthalmologists.

No significant differences in measurement error were observed by sex or eye laterality (all p > 0.05). Spearman correlation analysis showed no association between age and absolute error for IT (ρ = 0.171, p = 0.217) or IW (ρ = −0.070, p = 0.613).

Coordinate errors for key lesion landmarks were small (Fig. 2b). For the deepest point, X/Y errors were −0.158 ± 0.754 mm and −0.014 ± 0.173 mm, respectively. For the left edge, errors were −0.005 ± 0.342 mm and −0.009 ± 0.178 mm; for the right edge, −0.147 ± 0.281 mm and −0.007 ± 0.193 mm, demonstrating accurate lesion localization.

Linear correlation analysis (Fig. 2c) showed strong agreement between the AI system and ground truth (R2 = 0.874 for IT and 0.905 for IW). In comparison, manual measurements by three ophthalmologists (Groups A-C) yielded lower agreement for IT (R2 = 0.437–0.705) and comparable but slightly lower agreement for IW (R2 = 0.877–0.882), indicating reduced interobserver variability with AI-based quantification of lesion parameters.

Reproducibility analysis using intraclass correlation coefficients (ICCs) on 207 test images demonstrated high consistency. For IT, the ICC between AI (Group D) and ground truth (Group G) was 0.961, numerically exceeding the ICC of ophthalmologists (0.868, 0.786, and 0.837). For IW, ICCs were 0.960 (AI), and 0.955, 0.947, and 0.929 for ophthalmologists, indicating comparable or superior consistency of the AI system.

Stratification performance based on IT and IW is shown in Fig. 2d. Agreement between the AI system was higher than that of ophthalmologists for both IT-based stratification (Degree of infiltration thickness, DIT; 0.802 vs. 0.623, 0.429, and 0.444) and IW-based stratification (Degree of infiltration width, DIW; 0.905 vs. 0.873, 0.687, and 0.802), highlighting reduced observer variability and improved robustness of AI-based stratification.

3D visualization and system integration

Three-dimensional reconstruction was performed using 128 AS-OCT slices from a representative eye independent of the training and testing datasets. Corneal masks were extracted and registered to generate a 3D model (Fig. 3a), enabling visualization of lesion morphology across transverse, sagittal, and frontal planes. Integration with slit-lamp images (Fig. 3b) enhances assessment of epithelial defects, pupillary involvement, and visual axis obstruction. Comprehensive slice-by-slice analysis was performed for another representative case, with detailed quantitative measurements provided in Supplementary Table 1 (zero values indicate absence of lesion). Front-view visualization (Fig. 3c) further enables quantitative assessment of lesion depth and spatial distribution. These features allow precise evaluation of infiltration severity, spatial location relative to the pupil, and involvement of the visual axis.

Fig. 3. 3D visualization of corneal lesions.

Fig. 3

a Interactive visualization of lesion morphology across corneal planes (From left to right: transverse, sagittal, and frontal). b Integration with slit-lamp images to facilitate assessment of epithelial defects, pupillary involvement, and visual axis obstruction. c Frontal 3D view providing quantitative information on lesion depth and spatial distribution. The plot on the left shows infiltration thickness at the deepest point and at the left and right edge points across slices. Purple, mild; yellow, moderate, red, severe. IT infiltration thickness, IR infiltration range, DIT degree of infiltration thickness.

Clinical web-based deep learning platform deployment

We developed an integrated ‘Intelligent Quantitative Keratitis Image Analysis Platform’ (Supplementary Fig. 3) incorporating AI-based modules. The platform enables access to patient records, including visit history, clinical findings, treatments, and multimodal imaging (e.g., AS-OCT, slit-lamp, confocal microscopy; Supplementary Fig. 3a, b), supporting longitudinal follow-up.

Uploaded AS-OCT images are automatically processed by deep learning modules (Supplementary Fig. 3c), generating quantitative metrics such as infiltration thickness, corneal thickness, and lesion area, and providing stratification based on infiltration depth. This enables standardized and efficient assessment of IK.

In addition, previously developed modules20,21 were integrated to enhance clinical utility including models for anterior segment diseases diagnosis (Supplementary Fig. 4a) and etiological classification of IK using multimodal data (Supplementary Fig. 4b). Together, these components support AI-assisted evaluation of IK in real-world clinical settings.

Discussion

We developed the ‘Intelligent Quantitative Keratitis Image Analysis Platform’, an AI-powered system for comprehensive and quantitative assessment of corneal infiltration using AS-OCT. The platform demonstrated robust performance in lesion detecting and severity stratification (mild, moderate, severe), and enables 3D reconstruction of affected eyes. When integrated with slit-lamp images, this provides a multimodal and anatomically aligned view of disease extent, which may facilitate clinical interpretation and monitoring.

Accurate assessment of IK severity is essential for clinical decision-making, including treatment intensity and use of systemic therapy22–24. Traditionally, severity evaluation relies on slit-lamp biomicroscopy. However, AS-OCT is increasingly favored for its high-resolution cross-sectional imaging, allowing more precise assessment of stromal infiltration, ulcer depth and corneal structure. Prior studies have demonstrated its utility in differentiating inflammatory and infectious conditions and in identifying morphology suggestive of specific pathogens, particularly when slit-lamp visualization is limited25–28. Compared with previous approaches that rely on selected AS-OCT slices or focus primarily on classification, our platform analyzes volumetric AS-OCT data and aligns it with co-registered slit-lamp images, enabling more comprehensive and spatially consistent evaluation.

Reliable segmentation and quantification are fundamental to intelligent IK assessment. In routine practice, measurements are often based on a limited number of manually selected AS-OCT slices, which is subjective and may not fully capture the lesion and spatial heterogeneity. In contrast, our approach enables automated, whole-volume analysis, reducing observer variability and providing more comprehensive characterization of lesion geometry and distribution. To address known challenges in AS-OCT lesion segmentation, such as imaging artifacts, low contrast, irregular boundaries, and class imbalance29–31, we developed a semi-supervised framework that allows effective training with limited manual annotation. This design achieved strong segmentation performance and supports scalable application in clinical settings.

To improve clinical applicability, we further developed an automated stratification module grounded in quantitative parameters and existing clinical evidence. The strategy reflects clinical understanding: superficial corneal involvement (upper one-third) typically corresponds to milder inflammation and potentially reversible disease, whereas deeper stromal infiltration (lower two-thirds) is associated with a higher risk of scarring and visual loss. Larger lesions (exceeding 6 mm) and those involving the pupillary zone are also indicative of more severe disease. However, the lack of universally accepted objective grading standards remains a limitation, and further large-scale studies are needed to establish standardized criteria.

Existing clinical evidence supports the relevance of this stratification approach to disease severity and outcomes. Anatomic features measurable by AS-OCT have been shown to correlate strongly with presenting visual acuity (VA), with lesion size, depth, and location consistently associated with worse VA in a cohort of 667 patients32. Among these, stromal infiltrate depth appears particularly informative. Posterior stromal involvement was independently associated with poorer VA (PR 1.22, 95% CI 1.09–1.36, p < 0.001)32, consistent with evidence that deeper infections reflect greater tissue disruption. In the Steroids for Corneal Ulcers Trial (SCUT), deeper infiltrates were associated with greater visual improvement following adjunctive corticosteroid therapy, whereas infiltrate diameter was not predictive of treatment response22. Long-term studies further suggest that initial infection depth may influence irregular astigmatism and subsequent visual impairment33. These findings indicate that stromal depth may reflect both baseline severity and aspects of healing trajectory, supporting its use in risk stratification.

Central infiltrate location was also independently associated with poor presenting VA (PR 1.26, 95% CI 1.14–1.38, p < 0.001)32, likely due to involvement of the visual axis. This is consistent with SCUT findings demonstrating greater benefit of adjunctive corticosteroids in centrally located ulcers, supporting the inclusion of lesion location in severity stratification frameworks22.

In contrast, the role of infiltrate diameter appears less consistent. Although larger epithelial defects were associated with worse VA, stromal infiltrate diameter showed weaker associations after adjustment32. While larger lesions have been linked to more severe disease and higher rates of surgical intervention, only some studies have demonstrated associations with clinical endpoints22,34. AS-OCT studies suggest that reductions during treatment are more pronounced in stromal thickness than in en face diameter35, indicating that infiltrate depth may better capture dynamic changes in disease activity and response than surface dimensions alone.

Emerging evidence also suggests that AS-OCT parameters may capture pathogen-related characteristics and early treatment response. For example, significant reductions in infiltrate thickness and corneal edema, as well as decreases in central corneal thickness, have been observed during healing of viral keratitis (p < 0.001)36. Notably, reductions in infiltrate thickness and back-shadow intensity may precede overt clinical improvement, suggesting a potential role for AS-OCT in early detection of treatment response.

Taken together, these findings support a stratification approach that prioritizes stromal depth, central involvement, and selected size parameters. The consistent associations between AS-OCT–derived features and presenting VA, along with their ability to reflect dynamic changes, provide a quantitative basis for integration into clinical workflows. While further validation is required, this approach may support more standardized assessment and individualized management.

This study has several strengths. It leverages deep learning for automated lesion detection, quantification, and stratification, enabling early detection of subtle features and facilitating longitudinal comparisons, also enabling ophthalmologists to directly assess the lesion’s position relative to the pupil and determine the extent of visual axis involvement. Second, the incorporation of 3D reconstruction allows cross-modal visualization, aiding clinicians in correlating slit-lamp and OCT findings. Finally, the web-based platform supports long-term data management and follow-up, streamlining the clinical workflow.

Several limitations should be acknowledged. First, this is a single-center study, and model performance may be affected by variability across AS-OCT devices, acquisition protocols, and patient populations. Differences in image characteristics and operator technique may introduce variability. External validation in multicenter cohorts is therefore necessary. Second, the dataset excludes post-surgical cases and lacks longitudinal follow-up, limiting evaluation of long-term outcomes. Accordingly, the system should not yet be used for treatment decision-making or prognostic prediction. Future work will focus on larger, multicenter, and longitudinal datasets to further validate and refine the model.

In summary, this study demonstrates that AI-based analysis of AS-OCT can provide accurate, objective, and reproducible quantification of corneal lesions in IK. The proposed platform integrates lesion segmentation, stratification, 3D visualization, and multimodal alignment, offering a clinically interpretable tool for IK assessment and monitoring.

Methods

Patient selection and image acquisition

This study included patients clinically diagnosed with infectious keratitis between September 2018 and March 2024 at the Eye Center of the Second Affiliated Hospital, School of Medicine, Zhejiang University. Diagnosis was confirmed by ocular surface specialists based on clinical evaluation. Patients with a history of corneal surgery or other ocular conditions affecting corneal lesion were excluded. Only one eye per patient was included.

AS-OCT scans were acquired using a swept-source CASIA SS-1000 (Tomey Corporation, Nagoya, Japan). Each scan was centered on the corneal apex and consisted of 128 radial cross-sectional images acquired over a 360-degree sweep and exported in BMP format. Images included in model development and validation were required to have minimal artifacts and clearly visible corneal lesions.

For the independent hold-out cohort, when multiple slices were obtained from the same eye, images were selected by at least 10°. Representative eyes used for validating intelligent stratification and 3D visualization were not included in the training or testing datasets and consisted of the full set of 128 slices per eye, including slices without visible lesions.

The study was approved by the Ethics Committee of the Second Affiliated Hospital, School of Medicine, Zhejiang University (approval ID: IR2021001176), and conducted in accordance with the Declaration of Helsinki. All data were collected during routine clinical care and fully de-identified prior to analysis. As the dataset contained no direct patient identifiers, the Ethics Committee of the Second Affiliated Hospital, Zhejiang University School of Medicine, granted a waiver of informed consent.

Image quality evaluation and ground truth annotation

Based on our prior work37, three common imaging artifacts were assessed: (1) Central artifact: Hyper or hypo-reflective regions caused by the central beam; (2) Eyelid occlusion: Coverage or distortion of the anterior chamber angle by the eyelid; (3) Blur: Motion-induced artifacts.

Ground truth annotations were performed as previously described37. Corneal and lesion boundaries were manually delineated on each image using Labelme38 by three general ophthalmologists, requiring approximately five minutes per slice. All annotations were subsequently reviewed and refined by an ocular surface expert to ensure accuracy and consistency. Prior to annotations, all annotators were trained and standardized according to predefined criteria: (1) Lesion: Hyper-reflective regions corresponding to clinical infiltration. (2) Cornea: Cornea and anterior sclera visible on AS-OCT images without deformation caused by imaging artifacts.

Development and validation of the deep learning detection module

To enable automatic detection and segmentation of corneal lesions in AS-OCT images, we developed a deep learning detection module (Fig. 4).

Fig. 4. Overview of the study workflow.

Fig. 4

a Detection module: The development dataset was randomly divided into training and internal validation sets at a 7:3 ratio. The training set included 20% labeled and 80% unlabeled images for model development. b Parametric analysis, stratification, and 3D visualization modules.

The module employed a semi-supervised learning framework combining U-Net39 and Swin Transformer40 architecture with a cross-teaching paradigm, enabling extraction of both local and global features. The dataset was split into training and internal validation sets at a 7:3 ratio. Among 2191 training images, 438 (20%) were labeled and 1753 (80%) were unlabeled. All images were preprocessed by cropping, resizing into 448 × 448 pixels, and normalization. Data augmentation, including random flipping and rotation, was applied to enhance variability.

For labeled data, both networks generated segmentation outputs that were supervised using the Dice loss function. For unlabeled data, probability maps from both networks were binarized at a threshold of 0.5. Dropout was applied to perform multiple stochastic forward passes, enabling uncertainty estimation via information entropy. These uncertainty maps were used to refine pseudo-labels, which were then used to supervise the counterpart network with uncertainty-weighted loss. This cross-teaching strategy provided implicit consistency regularization and leveraged complementary strengths of convolutional (local detail) and transformer-based (global context) representations.

Model performance was evaluated after each iteration on the validation set using the Dice coefficient, and model weights were saved upon improvement. Training was conducted for 5200 epochs with a batch size of 8, using stochastic gradient descent (SGD) with a weight decay of 0.0001 and momentum of 0.9. All experiments were implemented in Python 3.8 with PyTorch 1.9.0.

Segmentation performance was assessed using: (1) Direct metrics: Dice coefficient, accuracy, precision and sensitivity; (2) Indirect metrics: Relative absolute error (RAE), and intersection-over-union for angle-based evaluations (IoU-angles). A sensitivity analysis restricted to 10 representative images with clear and typical infiltrates was conducted to confirm that results were not driven by slice selection.

Parametric analysis of corneal lesions

To enable quantitative assessment of lesion characteristics, a polar coordinate system was established based on a fitted circle representing the posterior corneal boundary (Fig. 5). This enabled measurements of infiltration depth, width, and corneal thickness at each angular position.

Fig. 5. Construction of the polar coordinate system.

Fig. 5

a N points (P1,P2,…,PN) were randomly sampled along the lower corneal boundary, with coordinates xi,yi for 1≤i≤N. b A circle was fitted via least squares to determine center O and radius r. c Radial lines were projected from O at angle α, intersecting the upper and lower corneal boundaries and the lesion at points Aα, Bα and Cα, respectively. d Corneal thickness was calculated as|AαBα|, and lesion infiltration depth as|BαCα|.

The algorithm consisted of the following steps:

Step 1: Randomly sample N points P1,P2,…,PN along the posterior corneal boundary, where the pixel coordinates of Pi are xi,yi for 1≤i≤N;

Step 2: Fit a circle via least squares to determine its center O and radius r.

Step 3: Project rays from O at angle α to intersect the upper and lower corneal boundaries and lesion area at Aα, Bα and Cα, respectively.

Step 4: Compute corneal thickness as|AαBα|and lesion infiltration depth as|BαCα|.

Step 5: Repeat for all αi to obtain comprehensive spatial lesion data.

As shown in Fig. 4, this framework enabled the parametric characterization of lesion morphology, including: CT (Corneal thickness at the deepest point C), IT (Lesion infiltration thickness at point C), IW (Lesion infiltration width), IR (Angular infiltration range), and EAL/EAR/EAD (Left, right, and deepest-point eccentricity angles, respectively).

Accuracy was evaluated using 168 test images with Dice > 0.8 through: (1) Bland–Altman analysis of IT and IW (slice- and patient-level); (2) X/Y coordinate error of key points; (3) linear correlation (R2) with ground truth.

Patient-level Mann–Whitney U tests were used to assess the effects of sex and eye laterality, while Spearman correlation analysis evaluated the effect of age on measurement accuracy.

Reproducibility was assessed using intraclass correlation coefficients (ICCs) across multiple observers: Group G (ground truth), Group D (AI system), and three ophthalmologists with varying levels of experience (Groups A–C: 5, 1, 3 years of experience respectively).

Intelligent stratification and 3D visualization

Based on segmentation and parametric analysis, the system performed automated lesion stratification and 3D visualization.

Stratification criteria included5,41–43: (1) Mild: IT < 1/3; (2) Moderate: 1/3 ≤ IT < 2/3; (3) Severe: IT > 2/3 or IW > 6 mm.

Additional exploratory parameters included: (1) Pupillary involvement: R×sinEAL or EAR> 3 mm; (2) Visual axis overlap: EAL < EAD < EAR (right eye), or vice versa; (3) Corneal edema or ulceration: Lesion area corneal thickness > or < normal area corneal thickness, respectively.

3D reconstruction was performed following our previously reported methods29, including voxel alignment and rendering, enabling volumetric visualization of corneal and lesion morphology.

Supplementary information

Supplementary information. (1,005.3KB, docx)

Acknowledgements

This study was funded by National Natural Science Foundation Regional Innovation and Development Joint Fund (U20A20386), Key Research and Development Program of Zhejiang Province (2024C03204), Key Program of the National Natural Science Foundation of China (82330032). The funder played no role in study design, data collection, analysis and interpretation of data, or the writing of this manuscript.

Author contributions

S.Y., X.P., and Y.J. conceived and designed the study. J.P., C.J., W.Y., L.X., H.Z., Q.G. and J.G. provided technical support. S.Y., C.P. and M.N. conducted the manual assessment comparison. S.Y., J.P. and C.J. performed data analysis. S.Y., J.P., C.J., X.P. and J.Y. contributed to manuscript writing, preparation, and submission. All authors reviewed, revised, and approved the final manuscript.

Data availability

The datasets generated and analyzed during the current study are not publicly available but may be available from the corresponding author on reasonable request.

Code availability

The underlying code for this study is not publicly available but may be made available to qualified researchers on reasonable request from the corresponding author.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Contributor Information

Peifang Xu, Email: xpf1900@zju.edu.cn.

Juan Ye, Email: yejuan@zju.edu.cn.

Supplementary information

The online version contains supplementary material available at https://doi.org/10.1038/s41746-026-02857-2.

References

  • 1.Flaxman, S. R. et al. Global causes of blindness and distance vision impairment 1990-2020: a systematic review and meta-analysis. Lancet Glob. Health5, e1221–e1234 (2017). [DOI] [PubMed] [Google Scholar]
  • 2.Ong, Z. Z. et al. Diagnostic performance of deep learning for infectious keratitis: a systematic review and meta-analysis. EClinicalMedicine77, 102887 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 3.Stapleton, F. The epidemiology of infectious keratitis. Ocul. Surf.28, 351–363 (2023). [DOI] [PubMed] [Google Scholar]
  • 4.Ting, D. S. J., Ho, C. S., Deshmukh, R., Said, D. G. & Dua, H. S. Infectious keratitis: an update on epidemiology, causative microorganisms, risk factors, and antimicrobial resistance. Eye35, 1084–1101 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Austin, A., Lietman, T. & Rose-Nussbaumer, J. Update on the management of infectious keratitis. Ophthalmology124, 1678–1689 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 6.Tuft, S. et al. Bacterial keratitis: identifying the areas of clinical uncertainty. Prog. Retin Eye Res.89, 101031 (2022). [DOI] [PubMed] [Google Scholar]
  • 7.Ting, D. S. W. et al. Development and validation of a deep learning system for diabetic retinopathy and related eye diseases using retinal images from multiethnic populations with diabetes. JAMA318, 2211–2223 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.De Fauw, J. et al. Clinically applicable deep learning for diagnosis and referral in retinal disease. Nat. Med.24, 1342–1350 (2018). [DOI] [PubMed] [Google Scholar]
  • 9.Liu, X. et al. A comparison of deep learning performance against health-care professionals in detecting diseases from medical imaging: a systematic review and meta-analysis. Lancet Digit Health1, e271–e297 (2019). [DOI] [PubMed] [Google Scholar]
  • 10.Lin, T., Lin, R. T., Mhaskar, R. & Margo, C. E. Evaluating the accuracy of advanced language learning models in ophthalmology: a comparative study of ChatGPT-4o and Meta AI’s Llama 3.1. Adv. Ophthalmol. Pract. Res.5, 95–99 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Ang, M. et al. Anterior segment optical coherence tomography. Prog. Retin Eye Res.66, 132–156 (2018). [DOI] [PubMed] [Google Scholar]
  • 12.Thomas, R. Anterior segment optical coherence tomography. Ophthalmology114, 2362–2363 (2007). [DOI] [PubMed] [Google Scholar]
  • 13.Ang, M. et al. Anterior segment optical coherence tomography. Prog. Retinal Eye Res.66, 132–156 (2018). [DOI] [PubMed] [Google Scholar]
  • 14.Ting, D. S. J. & Ghosh, S. Central toxic keratopathy after contact lens wear and mechanical debridement: clinical characteristics, and visual and corneal tomographic outcomes. Eye Contact Lens45, e15–e23 (2019). [DOI] [PubMed] [Google Scholar]
  • 15.Konstantopoulos, A., Kuo, J., Anderson, D. & Hossain, P. Assessment of the use of anterior segment optical coherence tomography in microbial keratitis. Am. J. Ophthalmol.146, 534–542.e532 (2008). [DOI] [PubMed] [Google Scholar]
  • 16.Ronneberger, O., Fischer, P. & Brox, T. U-net: Convolutional networks for biomedical image segmentation. In Medical image computing and computer-assisted intervention–MICCAI 2015: 18th international conference. Munich, Germany, October 5-9, 2015, proceedings, part III 18 234–241 (Springer, 2015).
  • 17.Ye, Y., Pan, C., Wu, Y., Wang, S. & Xia, Y. MFI-Net: multiscale feature interaction network for retinal vessel segmentation. IEEE J. Biomed. Health Inform.26, 4551–4562 (2022). [DOI] [PubMed] [Google Scholar]
  • 18.Chen, X., Yuan, Y., Zeng, G. & Wang, J. Semi-supervised semantic segmentation with cross pseudosupervision. In Proc. IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2613–2622 (2021).
  • 19.Luo, X., Chen, J., Song, T. & Wang, G. Semi-supervised medical image segmentation through dual-taskconsistency. In Proc. AAAI Conference on Artificial Intelligence. Vol. 35. 8801–8809 (2021).
  • 20.Hu, S. et al. Automatic diagnosis of infectious keratitis based on slit lamp images analysis. J. Pers. Med.13, 10.3390/jpm13030519 (2023). [DOI] [PMC free article] [PubMed]
  • 21.Xu, M. et al. A generalized and interpretable multi-label multi-disease screening system for ocular anterior segment disease detection. Ophthalmol. Sci.5, 100883 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 22.Srinivasan, M. et al. Corticosteroids for bacterial keratitis: the Steroids for Corneal Ulcers Trial (SCUT). Arch. Ophthalmol.130, 143–150 (2012). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 23.Wilhelmus, K. R. et al. Herpetic eye disease study: a controlled trial of topical corticosteroids for herpes simplex stromal keratitis. Ophthalmology127, S5–s18 (2020). [DOI] [PubMed] [Google Scholar]
  • 24.Prajna, N. V. et al. Effect of oral voriconazole on fungal keratitis in the mycotic ulcer treatment trial II (MUTT II): a randomized clinical trial. JAMA Ophthalmol.134, 1365–1372 (2016). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 25.Yim, M. et al. Ability of novice clinicians to interpret high-resolution optical coherence tomography for ocular surface lesions. Can. J. Ophthalmol.53, 150–154 (2018). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 26.Sharma, N. et al. Spectral domain anterior segment optical coherence tomography in fungal keratitis. Cornea37, 1388–1394 (2018). [DOI] [PubMed] [Google Scholar]
  • 27.Soliman, W., Nassr, M. A., Abdelazeem, K. & Al-Hussaini, A. K. Appearance of herpes simplex keratitis on anterior segment optical coherence tomography. Int. Ophthalmol.39, 2923–2928 (2019). [DOI] [PubMed] [Google Scholar]
  • 28.Jin, X., Jin, H., Shi, Y., Zhang, N. & Zhang, H. Clinical observation of corneal endothelial plaques with fungal and bacterial keratitis by anterior segment optical coherence tomography and in vivo confocal microscopy. Cornea41, 1426–1432 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Qian, G. et al. Cascade spatial and channel-wise multifusion network with criss cross augmentation for corneal segmentation and reconstruction. Comput Biol. Med.177, 108602 (2024). [DOI] [PubMed] [Google Scholar]
  • 30.Fu, H. et al. Segmentation and quantification for angle-closure glaucoma assessment in anterior segment OCT. IEEE Trans. Med Imaging36, 1930–1938 (2017). [DOI] [PubMed] [Google Scholar]
  • 31.Fang, J., Xing, A., Chen, Y. & Zhou, F. SeqCorr-EUNet: a sequence correction dual-flow network for segmentation and quantification of anterior segment OCT image. Comput Biol. Med.171, 108143 (2024). [DOI] [PubMed] [Google Scholar]
  • 32.Anant, S. et al. Anatomic biomarkers predict poor presenting visual acuity in infectious keratitis. Clin. Ophthalmol.19, 4155–4168 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 33.Menda, S. A. et al. Association of postfungal keratitis corneal scar features with visual acuity. JAMA Ophthalmol.138, 113–118 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 34.Agarwal, S. et al. Depth, size of infiltrate, and the microbe – the trio that prognosticates the outcome of infective keratitis. Indian J. Ophthalmol.72, 44–50 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 35.Abdelghany, A. A., Alio, J. L. & AttaAllah, H. R. Role of anterior segment optical coherence tomography in staging and evaluation of treatment response in infectious keratitis. Cornea43, 1216–1222 (2024). [DOI] [PubMed] [Google Scholar]
  • 36.ElZawahry, F. O., Kepez Yildiz, B., Beer, F., Said, D. & Dua, H. S. Characterization of different stages of corneal infections using anterior segment OCT to enhance monitoring of progression and response to therapy. Eye39, 2836–2838 (2025). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 37.Sun, Y. et al. An AS-OCT image dataset for deep learning-enabled segmentation and 3D reconstruction for keratitis. Sci. Data11, 627 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Torralba, A., Russell, B. C. & Yuen, J. LabelMe: online image annotation and applications. Proc. IEEE98, 1467–1484 (2010). [Google Scholar]
  • 39.Ibtehaz, N. & Rahman, M. S. MultiResUNet: rethinking the U-Net architecture for multimodal biomedical image segmentation. Neural Netw.121, 74–87 (2020). [DOI] [PubMed] [Google Scholar]
  • 40.Liu, Z. et al. Swin transformer: Hierarchical vision transformer using shifted windows. In Proc. IEEE/CVF International Conference on Computer Vision. 10012–10022 (2021).
  • 41.Wang, L., Wang, R., Xu, C. & Zhou, H. Pathogenesis of herpes stromal keratitis: immune inflammatory response mediated by inflammatory regulators. Front. Immunol.11, 766 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 42.Chinese expert consensus on the diagnosis and treatment of herpes simplex keratitis (2023). Zhonghua Yan Ke Za Zhi59, 988–994 (2023). [DOI] [PubMed]
  • 43.Sharma, N. et al. Fungal keratitis: a review of clinical presentations, treatment strategies and outcomes. Ocul. Surf.24, 22–30 (2022). [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Supplementary information. (1,005.3KB, docx)

Data Availability Statement

The datasets generated and analyzed during the current study are not publicly available but may be available from the corresponding author on reasonable request.

The underlying code for this study is not publicly available but may be made available to qualified researchers on reasonable request from the corresponding author.


Articles from NPJ Digital Medicine are provided here courtesy of Nature Publishing Group

RESOURCES