Study approval
The study adhered strictly to the principles of the Declaration of Helsinki. The Institutional Review Board (IRB2023.K003.01) of He Eye Specialist Hospital approved the protocol. All participants gave informed consent, allowing the publication of all images, clinical data, and associated information in this manuscript.
Study design
The study employed a dual-center, single-masked, cross-sectional design. Figure 7 shows the experimental workflow. To ensure the reliability of the anterior segment slit lamp image, the researchers implemented the exclusion criteria outlined, which include the following: uncertain anterior chamber angle status; inadequate exposure of the ocular surface (e.g., ptosis); the presence of ocular conditions hindering precise corneal or iris imaging (e.g., severe corneal opacity, iris absence); history of ocular surgery within the past year (e.g., glaucoma surgery, cataract surgery); history of laser procedures (e.g., iridoplasty, laser peripheral iridotomy, laser refractive surgeries); use of medications that may impact ocular status (e.g., steroids, anti-glaucoma drugs); acute ocular inflammation or infection (e.g., keratitis, conjunctivitis); inability to cooperate during slit lamp examination effectively; and withdrawal from the study before completion. Several factors may hinder the successful computation of morphological parameters in the central anterior chamber section. The primary challenges include: (1) Eyelid obstruction of the corneal or iris beams is the most common issue, as it can render them too short for accurate curvature measurement, impeding the anterior chamber angle fitting. (2) Incomplete or discontinuous corneal or iris beams can prevent obtaining a closed central anterior chamber section. (3) Inaccurate segmentation of the corneal or iris beams occasionally leads to ineffective intersection along the curvature direction, obstructing the formation of the anterior chamber angle. The process advances to the NACA discrimination stage only when all eight morphological parameters of the central anterior chamber section are successfully computed.

Red arrows denote the algorithm training process, where “Cutoff” signifies the classification threshold derived from training. Yellow arrows represent the algorithm testing process, using the trained cutoff to evaluate each dataset. The red rounded rectangle indicates the exclusion criteria. The gray rounded rectangle indicates the reasons for algorithm failure. Detailed descriptions are provided in the Methods section.
This study collected three datasets. Dataset-1 was used for algorithm training and testing, while Datasets-2 and Dataset-3 were used for external algorithm validation. Dataset-1 was sourced from the ophthalmology outpatient department of He Eye Specialist Shenyang Hospital, with data collected from May to August 2023. It included 607 subjects, with an average age of 69.46 years (±9.67) and an age range of 32 to 98 years. Among these subjects were 246 males and 361 females, resulting in the collection of 1021 eyes (505 right eyes and 516 left eyes), totaling 3079 images. Based on exclusion criteria, 138 eyes (412 images) were excluded, leaving 2667 images in the study, divided into a training set of 2411 images and a testing set of 256 images.
Dataset-2 was sourced from the ophthalmology outpatient department of He Eye Specialist Shenyang Hospital, with data collected from September to December 2023. This dataset was used for external algorithm validation and included 665 subjects, with an average age of 69.90 years (±9.05) and an age range of 32 to 95 years. It comprised 630 right and 633 left eyes, totaling 2526 anterior segment slit lamp images.
Dataset-3 was obtained from the ophthalmology outpatient department at He Eye Specialist Jinzhou Hospital, with data collected from September to December 2023. It was also used for external algorithm validation and included 200 subjects, with an average age of 68.32 years (±9.86) and an age range of 17–89 years. This dataset comprised 174 right and 175 left eyes, totaling 698 anterior segment slit lamp images.
Portable slit lamp examination
The portable slit lamp (ISPECTOR MINI HE 010-21, eyerobo, Shenyang, China) used in this study is compact, lightweight, and user-friendly, as shown in Fig. 8. This device provides 10× magnification, weighs only 100 g, and has a working distance of 40 mm. It features a slit length of over 8 mm, a slit width of no more than 0.2 mm, and a slit illumination angle of 30°. Powered by a 3.7 V lithium battery with an 850 mAh capacity, it can operate continuously for over 2 h. The device measures 126 mm in length, 53 mm in width, and 31 mm in height, allowing for high-quality anterior segment image capture.

The image shows the compact design and key features of the portable slit lamp used in the study.
In this study, we utilized the Honor 6-H60-L02 smartphone (Huawei, China) for image acquisition, specifically the rear camera. The smartphone’s optical properties include a 13-megapixel resolution and an aperture size of f/2.0, enhancing its ability to capture clear images in low-light conditions. Additionally, the rear camera supports 720p video recording at 30 frames per second. The device employs a fourth-generation backside-illuminated (BSI) CMOS sensor with a dual LED flash.
In our study, we adhered to a standardized protocol for image acquisition. Patients were seated and allowed to rest for three minutes before images were captured. The smartphone’s rear camera was aligned with and attached to the lens of the portable slit lamp. The capture sequence involved both vertical and horizontal light bands: for vertical bands, images were taken from the temporal and nasal sides of the right and left eyes; for horizontal bands, images were taken from the upper and lower sides of the right and left eyes. The portable slit lamp was held parallel to the line connecting both eyes, with the midpoint of the lens positioned 4 cm from the corneal center, using the pinky, ring, and middle fingers for support. Images were captured with the slit light centered on the pupil. The portable slit lamp used in the study had fixed optical parameters, and the smartphone camera was set to default parameters to ensure consistent image quality.
In this study, Dataset-1 and Dataset-2 were collected by a trained photographer, while a different photographer collected Dataset-3. Each eye was photographed four times, as shown in Fig. 9. The yellow arrow in Fig. 9a indicates the light band formed by the slit lamp on the cornea, and the blue arrow indicates the light band on the iris. These light bands delineate the cross-section of the central anterior chamber, which forms the basis for calculating the morphological parameters of the anterior chamber. However, due to specific ocular conditions in some subjects, only vertical or horizontal light band photography could be conducted. For example, ptosis prevented the capture of the upper corneal or iris band in the vertical meridian, resulting in only horizontal band images. Each photograph was saved in JPG format, with dimensions of 4160 × 3120 pixels or 3120 × 4160 pixels and a resolution of 72 dpi.

The yellow arrow indicates the light band on the cornea, and the blue arrow indicates the light band on the iris. a Horizontal lower incident light band. b Vertical nasal incident light band. c Horizontal upper incident light band. d Vertical temporal incident light band.
Gonioscopy and classification of anterior segment slit lamp images
The anterior chamber angle of both eyes was independently examined by two glaucoma specialists using a Volk three-mirror gonioscope and a slit lamp. The angle was evaluated utilizing the Scheie grading system. The Scheie system assigns grades from “Wide” to “IV” for the angle classification. A “Wide” grade indicates an open angle where all structures are visible, while a “IV” grade implies a closed angle with no visible structures. Grade I indicates a slightly narrowed angle where the ciliary body is visible, but the last roll of the iris obscures the recess. Grade II signifies that the apex is not visible, along with the non-visibility of the ciliary body. Grade III implies that the posterior half of the trabecular meshwork, the ciliary body, and the scleral spur are not visible. Lastly, Grade IV indicates the non-visibility of any angle structures, including the ciliary body, scleral spur, and trabecular meshwork. For eyes with an anterior chamber angle where 90° or more of the angle is graded as III or IV, slit lamp images are classified as Category 1, indicating NACA. Conversely, slit lamp images are categorized as Category 0, signifying NON-NACA. In cases where the two ophthalmologists disagreed, a re-examination was conducted. If consensus remained unattainable, the eye was excluded from the dataset.
Ophthalmological examination
All subjects underwent a standard ophthalmic examination, although it is noted that some patients may have missed one or more of the following tests. Visual acuity was assessed using a standard logarithmic visual acuity chart. Refractive errors were determined utilizing an automatic kerato-refractometer (KR-8100, Topcon, Japan). Intraocular pressure was measured using a non-contact tonometer (CT-800, Topcon, Tokyo, Japan). Fundus examination was conducted using a 45° non-mydriatic digital camera (TRC-NW300, Topcon, Japan). Ocular biometric parameters were measured using an optical biometer (IOL Master 700, Zeiss, Germany).
Algorithm workflow
As illustrated in Fig. 10, the algorithm consists of four steps: image preprocessing, corneal band and iris band segmentation, fitting the central anterior chamber section, and calculating anterior chamber biological parameters.

a Original anterior segment image at 4160 × 3120 pixels. b Preprocessed image with effective FOV at 2048 × 2048 pixels. c Segmented corneal and iris light band. d Fitted central cross-section of the anterior chamber. e–l Correspond to Parameters I–VIII, respectively.
Image preprocessing consists of three steps. First, a deep learning model is trained to recognize the limbus, and this pre-trained model is subsequently utilized to obtain the boundary coordinates of the corneal limbus. Second, to construct the bounding rectangle of the limbus, the longer side is designated as the diameter of an approximate circle representing the limbus, thereby treating the limbus as a circular shape. The area of this approximate circle, determined by its diameter, is defined as the area of the corneal limbus and is utilized for subsequent calculations of relative morphological parameters in the central section of the anterior chamber. Lastly, the original image is cropped to 2048 × 2048 pixels, centering on the limbus. The pre-trained model details are as follows: Limbus segmentation annotation for anterior segment photographs was conducted using the Labelme tool, ensuring that annotation points accurately align with the limbus, maintain smoothness and density, and adhere to the eyelid edge when obscured. One thousand three anterior segment photographs were annotated, with 902 for training and 101 for testing. The model utilizes UNet30 as its backbone, PSPNet31 as the head, and FCN32 as an auxiliary head, with an input size of 1024 × 1024. A cross-entropy loss function and an SGD33 optimizer with an initial learning rate of 0.001 following a poly decay strategy were employed. The batch size was set to 4, and the model was iterated 20,000 times. On the test set, the Dice coefficient for the background was 0.994, with an accuracy of 0.995, while for the limbus area, the Dice coefficient was 0.949, with an accuracy of 0.939. This preprocessing maximizes the retention of the anterior chamber region while removing potential interferences (Fig. 10b).
For the segmentation of the corneal band and iris band, a three-class semantic segmentation model is trained to classify the background, corneal band, and iris band (Fig. 10c). The Labelme tool was utilized for the segmentation annotation of the corneal light band and iris light band in anterior segment photographs. The annotation guidelines involved separately annotating the corneal limbus light band and the iris light band, ensuring annotation points accurately fall on the edges of the light bands, and maintaining smooth and dense point distribution. Three thousand seventy-nine anterior segment photographs were annotated, with 2771 images used for model training and 308 for model testing. A subset of annotated images of corneal and iris light bands is presented in Supplementary Fig. 1. The model employs UNet30 as the backbone, PSPNet31 as the head, and FCN32 as the auxiliary head, with an input size of 1024 × 1024. The loss function is cross-entropy, and the optimizer is SGD33 with an initial learning rate of 0.001. The learning rate decay follows a poly strategy. The batch size is set to 4, and the model was trained for 20,000 iterations. On the test set, the Dice coefficient for the background is 0.995, with an accuracy of 0.992. For the corneal light band, the Dice coefficient is 0.900, with an accuracy of 0.953. For the iris light band, the Dice coefficient is 0.882, with an accuracy of 0.957.
The process of fitting the central anterior chamber section comprises three primary steps: firstly, the corneal and iris bands are compressed; secondly, the two iris bands are interconnected; lastly, gradient information from the corneal and iris bands is employed to fit the anterior chamber angles on both sides, thereby generating the closed section of the central anterior chamber (Fig. 10d). In the test set images of Dataset-1, the fitted lines of the central anterior chamber section are drawn on the original images, as shown in Supplementary Fig. 2.
This study focuses on fitting eight biological parameters of the central anterior chamber section. The closed area (Fig. 10e) refers to the number of pixels within the closed region formed by sequentially connecting the segmented corneal light band and two iris light bands, and it is not affected by the fitting step of the central anterior chamber section. The central anterior chamber section area (Fig. 10f) is the number of pixels within the fitted central anterior chamber section. The ratio of central anterior chamber section area to limbus area (Fig. 10g) is the ratio of the central anterior chamber section area to the limbus area. The anterior chamber angle area (Fig. 10h) is the average number of pixels in the angle regions on both sides of the central anterior chamber section, divided into five equal parts along its long axis. The central area of the central anterior chamber section (Fig. 10i) is the total number of pixels in the middle three parts when the central anterior chamber section is divided into five equal parts along its long axis. The anterior chamber angle (Fig. 10j) is the average angle in degrees of the fitted central anterior chamber section on both sides. The ratio of lengths of the corneal band to the iris band (Fig. 10k) is the ratio of the length of the line on the cornea to the length of the line on the iris in the fitted central anterior chamber section. Lastly, the difference in lengths between the corneal band and iris band (Fig. 10l) is the difference in length between the line on the cornea and the line on the iris in the fitted central anterior chamber section.
Based on the voting concept, a simple ensemble model was devised to integrate the eight biological parameters of the central anterior chamber cross-section. A case is classified as Category 1 if at least four of the eight parameters exceed their respective thresholds.
Statistics
The data were analyzed using SPSS version 27. Descriptive statistics for continuous variables were presented as mean ± SD. The normality of these variables was assessed using the Kolmogorov-Smirnov test. For variables following a normal distribution, group comparisons were conducted with an independent samples two-sided t-test; for non-normal distributions, the two-sided Mann–Whitney U test was employed. Binary variables were reported as the percentage of Category 1, and group differences were analyzed with the chi-square test. Diagnostic performance was evaluated by calculating accuracy, sensitivity, specificity, F1 score, and the area under the receiver operating characteristic (ROC) curve (AUC).