Pterygium Screening and Lesion Area Segmentation Based on Deep Learning

A two-category model and a segmentation model of pterygium were proposed to assist ophthalmologists in establishing the diagnosis of ophthalmic diseases. A total of 367 normal anterior segment images and 367 pterygium anterior segment images were collected at the Affiliated Eye Hospital of Nanjing Medical University. AlexNet, VGG16, ResNet18, and ResNet50 models were used to train the two-category pterygium models. A total of 150 normal and 150 pterygium anterior segment images were used to test the models, and the results were compared. The main evaluation indicators, including sensitivity, specificity, area under the curve, kappa value, and receiver operator characteristic curves of the four models, were compared. Simultaneously, 367 pterygium anterior segment images were used to train two improved pterygium segmentation models based on PSPNet. A total of 150 pterygium images were used to test the models, and the results were compared with those of the other four segmentation models. The main evaluation indicators included mean intersection over union (MIOU), IOU, mean average precision (MPA), and PA. Among the two-category models of pterygium, the best diagnostic result was obtained using the VGG16 model. The diagnostic accuracy, kappa value, diagnostic sensitivity of pterygium, diagnostic specificity of pterygium, and F1-score were 99%, 98%, 98.67%, 99.33%, and 99%, respectively. Among the pterygium segmentation models, the double phase-fusion PSPNet model had the best results, with MIOU, IOU, MPA, and PA of 86.57%, 78.1%, 92.3%, and 86.96%, respectively. This study designed a pterygium two-category model and a pterygium segmentation model for the images of the normal anterior and pterygium anterior segments, which could help patients self-screen easily and assist ophthalmologists in establishing the diagnosis of ophthalmic diseases and marking the actual scope of surgery.


Introduction
Pterygium is a common and frequently occurring disease in ophthalmology that afects the fbrovascular tissue on the ocular surface, resulting in eye irritation and infammation [1,2]. It can cause visual impairment or even blindness when the lesion covers most of the cornea [3,4]. Corresponding treatment methods can be used to control pterygium development in the early stage. However, in the later stage, only surgery can be used to respect the lesion area for treatment [5][6][7]. Te diagnosis and surgery of pterygium require the localization of the lesion area. Currently, the most commonly used method is manual positioning by ophthalmologists based on anterior segment images. Manual positioning is slow and not precise, and diferent doctors may position diferent lesion ranges. Simultaneously, the early detection, diagnosis, and treatment of pterygium can better control or treat the disease. Terefore, a pterygium two-category model and a pterygium lesion area segmentation model were designed, which could initially screen the pterygium and segment the lesion area accurately. Tese models can assist ophthalmologists in establishing the diagnosis of ophthalmic diseases and marking the scope of surgical resection.
With the close integration of artifcial intelligence and ophthalmology, many studies have used deep learning models to assist in the diagnosis of ophthalmic diseases [8][9][10][11][12][13]. In terms of lesion segmentation, most studies have diagnosed glaucoma by segmenting the optic disc [14][15][16], and there have also been some studies on segmenting the blood vessels of fundus images to screen for related diseases [17][18][19]. Regarding the studies conducted on pterygium, some researchers used traditional machine learning [20] and deep learning methods to classify [21,22] pterygium as normal and pterygium disease. A three-category pterygium model on normal, pterygium observation, and pterygium surgery periods was studied by some researchers [23]. Related studies have also been conducted on the localization and segmentation of pterygium lesions [24]. Te above studies on pterygium classifcation and segmentation were conducted separately. In this study, the two studies were combined. Te two-category model of pterygium was used on the anterior segment image, and the lesion area was segmented according to the pterygium image.
In this study, four deep-learning models were used to realize the two categories of pterygium for preliminary screening. Simultaneously, the team's improved models were used to segment the pterygium lesion area accurately, which could not only help patients understand the progression of pterygium but could also assist ophthalmologists in establishing the diagnosis of ophthalmic diseases and marking accurate lesion localization before surgery.

Data Source.
Te Afliated Eye Hospital of Nanjing Medical University provided 1034 anterior segment images for this study. Te data were obtained using two diferent brands of slit-lamp digital microscopes, and the quality of the images was high. Relevant personal information of the patient was removed from the image data provided. Terefore, it did not violate the patient's privacy. Tis study had no restrictions on the sex and age of patients, and the data provided did not contain related information of patients. Hence, this study had no relevant statistics.
Te anterior segment images provided by the hospital in this study were of a single type of pterygium, which can only be diagnosed as normal or pterygium. Te corresponding label (normal or pterygium) of each anterior segment image and lesion area annotation map of the pterygium anterior segment image along with the image were provided by the hospital. Te marking standard for pterygium was as follows [25]: the normal anterior segment was characterized by the absence of evident hyperemia or proliferative bulge in the conjunctiva, with a transparent cornea. Figure 1 shows the images of the normal anterior segment Figure 1(a), the anterior segment of the pterygium Figure 1(b), and the labeling map of the lesion area Figure 1(c). Two professional ophthalmologists independently diagnosed the same anterior segment. If the diagnosis results were consistent, it was the fnal diagnosis result. If the diagnosis results were inconsistent, the fnal diagnosis result was decided by an expert ophthalmologist. Labeling of the pterygium lesion area was performed by a trained professional ophthalmologist and confrmed by an expert ophthalmologist. If the lesion area was marked incorrectly, it was revised and reconfrmed until it was correct.
Te pterygium two-category models were trained using 734 anterior segment images and were tested using 300 anterior segment images. Te normal anterior segment and pterygium images in the training and test image data were equally divided. Te pterygium lesion area segmentation models were trained using 367 pterygium images and tested using 150 pterygium images.

Classifcation Model Training.
Deep learning classical classifcation models mainly include AlexNet [26], VGG16 [27], ResNet18 [28], and ResNet50 [28]. Tis study used the above four classical models to design two-category models on normal and anterior pterygium segment images. Te network structures of these classical models are similar. Te backbone networks of AlexNet and VGG16 include convolutional, pooling, and fully connected layers. ResNet adds a residual network structure. Te model network structure is shown in Figure 2.
Te aforementioned classical models require an input image size of 224 × 224 pixels. In this study, the adaptive average pooling method was added before the fully connected layer of the classical models. Terefore, the input size could be adjusted to the required size. Te input image size was set to 336 × 224 pixels to adapt to the size of the original anterior segment image.
Normal and pterygium anterior segment images were divided into the training and validation sets in a 9 : 1 ratio. When training the pterygium two-category model, the original image was resized to 336 × 224. Te preprocessing method adopted a random rotation of −3°− 3°. Te parameters trained by several models in the ImageNet [29] dataset were used as the initial parameters for the corresponding models. Te loss function was the cross-entropy loss function. Te learning rate of AlexNet and VGG16 was 0.001, the epoch was 30, the learning rate of ResNet18 and ResNet50 was 0.01, and the epoch was 100. Te training parameters of the four models were iteratively updated to obtain the best model for the validation set as the fnal pterygium two-category model for each model.

Segmentation Model Training.
Classical semantic segmentation models include U-Net [30], DeepLabv3+ [31], and PSPNet [32] models. Te PSPNet and its improved models were used to segment the pterygium lesion areas in the anterior segment images of the pterygium. Te results were compared with those of other segmentation models.
MobileNet [33] was used as the backbone network of PSPNet to extract features and obtain the feature map of the input image. Average pooling was used on the feature map at four diferent scales: 1 × 1, 2 × 2, 3 × 3, and 6 × 6. Subsequently, the maps after average pooling with the same size as the feature map were obtained through bilinear interpolation. Te feature map and maps after average pooling were spliced; fnally, the segmented prediction map was obtained. As shown in Figure  Te backbone network MobileNet was replaced by ResNet50 in the PSPNet, which can obtain better mean intersection over union (MIOU) and IOU results. Two improvements were made to the PSPNet model using ResNet50 as the backbone network. Te frst improvement was to increase the stage upsampling module, which frst upsampled the feature map (1) to ×2 through bilinear interpolation and then added the sampled feature map and feature map (2). Te added feature map was upsampled and then added to the feature map (3) element by element. Te added feature map was upsampled and then added to the feature map (4) element by element. Te fnal added feature map was upsampled to 30 × 30 pixels. Te feature map obtained after the stage upsampling module continued to be stacked to Figure 3(e) to obtain a new feature map. Terefore, a new pyramid pooling module (PPM+) was obtained, and the fnal prediction map through convolution was obtained. Te frst improvement model, called phasefusion PSPNet, and the structure of this model are shown in Figure 3.
Te second improvement was mainly aimed at the feature extraction of the ResNet50 network. Te shallow feature maps of the ResNet50 third-layer input were input into the PPM + module, and the results obtained after convolution were the same as those obtained after PPM+ and convolution in the phase-fusion PSPNet. Feature maps were added, and the fnal prediction map was obtained after upsampling. As shown in Figure 4, box A in the fgure represents the newly added feature extraction and fusion module in the phase-fusion PSPNet.
A total of 367 pterygium anterior segment images were selected to train the segmentation models, of which 330 and 37 were used as the training and validation sets, respectively. Both sides of the short side of the input image were lengthened so that the length of the short side was the same as the length of the long side. Ten, the image became a square, and the increased part was flled with gray (R, G, B are all 128), and the square image size was resized to 473 × 473 as the input image for training. Te number of training epochs was 80, and the model with the best validation result was selected as the fnal segmentation model.
where p i is the segmented area, g i is the real area, k is the number of classes (excluding background classes), p ii is the number of correctly predicted pixels, and p ij and p ji are the numbers of incorrectly predicted pixels.

Results of Classifcation.
In this study, four models were tested with 150 images of normal and pterygium anterior segments, and the VGG16 model had the best results, with an accuracy of 99% and a kappa value of 98%. Te sensitivities of diagnosing normal and pterygium were 99.33% Journal of Healthcare Engineering and 98.67%, respectively, the specifcities were 98.67% and 99.33%, and the AUCs were 98.67% and 99.33%, respectively. Te diagnostic results and evaluation indicators of the four models are shown in Tables 1 and 2, respectively, and the ROC curve is shown in Figure 5.

Results of Segmentation Models.
A total of 150 pterygium anterior segment images were used to test U-Net, Deep-Labv3+, PSPNet (based on MobileNet and ResNet50), and the two improved models based on PSPNet. Te pterygium segmentation results for the six models are presented in Table 3. As shown in Table 3, the PSPNet model based on ResNet50 performed better than the U-Net, DeepLabv3+, and MobileNet-based PSPNet models for the MIOU, IOU, and MPA indicators. Te double phase-fusion PSPNet was obtained after two improvements on the ResNet50-based PSPNet; its MIOU, IOU, MPA, and PA were 86.57%, 78.1%, 92.3%, and 86.96%, respectively. Te result of the PA was slightly worse than that of the PSPNet model based on MobileNet, but other indicators yielded the best results. Te segmentation results of the phase-fusion and double phasefusion PSPNets are shown in Figure 6.

Discussion
Most patients with pterygium are outdoor workers, such as fshermen and farmers [34]. In the early stage of the disease, there will be no signifcant efect on the patient, and the symptoms are similar to ordinary infammation, which will not attract the attention of the patient. Tus, the disease gradually develops to the stage where surgical treatment is necessary. Te pterygium two-category and lesion segmentation model can help patients screen for the disease by themselves and pay attention to the progress of the lesion area. Terefore, the patient has an intuitive understanding of the disease's progress and then immediately visits a hospital for diagnosis and treatment, fnally obtaining a good therapeutic efect.
Four classical classifcation models were selected to diagnose whether the anterior segment images were normal or pterygium images. Te normal anterior segment was clearly distinguished from the anterior segment of the pterygium. Subsequently, the features can be extracted better without a complex network structure. Terefore, the VGG16 model yielded the best results. ResNet18 and ResNet50 have more complex network structures, whereas the AlexNet network structure is slightly simpler; therefore, the diagnosis results of these models were both worse than those of VGG16.  In 2018, Wan Zaki et al. [20] used support vector machine (SVM) and artifcial neural network methods to study the two categories of pterygium. Te data used in the study were obtained from four datasets, including 2692 and 325 images of the normal anterior and pterygium anterior segments, respectively. Te result obtained using the SVM method was better, with sensitivity, specifcity, and AUC values of 88.7%, 88.3%, and 0.956, respectively. In 2019,  Normal  147  3  149  1  143  7  140  10  150  Pterygium  6  144  2  148  12  138  11  139  150  Total  153  147  151  149  155  145  151 149 300 (3)

Journal of Healthcare Engineering
Zulkifey et al. [21] used the convolutional neural network method to diagnose pterygium based on 60 normal and anterior pterygium segment images, with diagnostic sensitivity and specifcity of 95% and 98.3%, respectively. In this study, the sensitivity, specifcity, and AUC of the VGG16 model for the diagnosis of pterygium were 98.67%, 99.33%, and 0.99, respectively, which are higher than those reported by other researchers. Te VGG16 model can better extract image features. Te training data were balanced, and the number of training images was greater than that in the literature [21]; thus, better results were obtained.
Classical (U-Net, DeepLabv3, PSPNet) and improved models based on PSPNet (phase-fusion PSPNet and double phase-fusion PSPNet) were used to segment pterygium. According to Table 3, the improved model had better segmentation results. Te improved model extracted more features from the pterygium image, which can fully combine local features, global features, and features at diferent levels   in the feature extraction network. Teir structures can lose less feature information and obtain better segmentation results.
Abdani et al. [24] used Dense Deeplabv2 to segment pterygium in 2020. Compared with the Deeplabv1, Dense Deeplabv1, and Deeplabv2 models, the best MIOU result was 83.81%. Te same team designed Group-PPM-Net to segment pterygium in 2021, and the best MIOU result was 86.32% [35]. Cai et al. [36] used DRUNet and SegNet to segment pterygium, and the best IOU was 60.8%. Te MIOU and IOU results obtained using the double phase-fusion PSPNet in this study were 86.57% and 78.1%, respectively. Te study in [24,35] had 328 pterygium images, which are less than this study in terms of the number of training images. Simultaneously, the improved model can better extract image features and obtain better results. Figure 6 shows that there is a certain gap between the segmentation and real results. Te models can only assist physicians in determining the position before the surgery. Physicians also need to calibrate and confrm its boundary and range. More labeled data are required to further train the models, or a more sensitive and efcient model is expected. Terefore, the predicted segmentation results are closer to the real segmentation results.

Conclusions
A pterygium two-category model and a pterygium segmentation model for the images of the normal anterior and pterygium anterior segments were designed in this study, which could help patients self-screen easily and assist ophthalmologists in establishing the diagnosis of ophthalmic diseases and marking the actual scope of surgery. Te VGG16 model can obtain the best diagnostic result among the four two-category models, and the double phase-fusion PSPNet model had the best results among the pterygium segmentation models. Te two models could help patients self-screen easily and assist ophthalmologists in marking the actual scope of surgery.

Data Availability
Te data used in this study can obtain from the corresponding author with a reasonable request.

Conflicts of Interest
Te authors declare that there are no conficts of interest regarding the publication of this paper.