BackgroundThis study aims to investigate how infectious keratitis depicted on slit-lamp and smartphone photographs can be reliably assessed using deep learning. Materials and MethodsWe retrospectively collected a dataset consisting of 5,673 slit-lamp photographs and 400 smartphone photographs acquired on different subjects. Based on multiple clinical tests (e.g., cornea scraping), these photographs were diagnosed and classified into four categories, including normal (i.e., no keratitis), bacterial keratitis (BK), fungal keratitis (FK), and herpes simplex virus stromal keratitis (HSK). We preprocessed these slit-lamp images into two separate subgroups: (1) global images and (2) regional images. The cases in each group were randomly split into training, internal validation, and independent testing sets. Then, we implemented a deep learning network based on the InceptionV3 by fine-tuning its architecture and used the developed network to classify these slit-lamp images. Additionally, we investigated the performance of the InceptionV3 model in classifying infectious keratitis depicted on smartphone images. We, in particular, clarified whether the computer model trained on the global images outperformed the one trained on the regional images. The quadratic weighted kappa (QWK) and the receiver operating characteristic (ROC) analysis were used to assess the performance of the developed models. ResultsOur experiments on the independent testing sets showed that the developed models achieved the QWK of 0.9130 (95% CI: 88.99–93.61%) and 0.8872 (95% CI: 86.13–91.31%), and 0.5379 (95% CI, 48.89–58.69%) for the global images, the regional images, and the smartphone images, respectively. The area under the ROC curves (AUCs) were 0.9588 (95% CI: 94.28–97.48%), 0.9425 (95% CI: 92.35–96.15%), and 0.8529 (95% CI: 81.79–88.79%) for the same test sets, respectively. ConclusionThe deep learning solution demonstrated very promising performance in assessing infectious keratitis depicted on slit-lamp photographs and the images acquired by smartphones. In particular, the model trained on the global images outperformed that trained on the regional images.