A Hybrid Cnn-Vision Transformer Approach For The Differentiation Of Fungal And Bacterial Keratitis
Published 2026 - 44th Congress of the ESCRS
Reference: FP10.13 | Type: Free paper | DOI: 10.82333/k6x8-7187
Authors: Dr Deema Jomar* 1 , Dr Muhammad Ahad 2 , Dr Adi Al Owaifeer 3
1Cornea, External Eye Diseases, and Refractive Surgery Division,King Khaled Eye Specialist Hospital & Research Centre,Riyadh,Saudi Arabia, 2Cornea, External Eye Diseases, and Refractive Surgery Division,King Khaled Eye Specialist Hospital & Research Center,Riyadh,Saudi Arabia, 3Innovation Unit,King Khaled Eye Specialist Hospital & Research Center,Riyadh,Saudi Arabia;College of Medicine,King Faisal University,Al Ahsa,Saudi Arabia
Purpose
To evaluate the diagnostic performance of a novel hybrid deep learning framework that integrates Convolutional Neural Networks (CNN) and Vision Transformers (ViT) for the automated differentiation of fungal keratitis (FK) and bacterial keratitis (BK) using slit-lamp photography. The study aimed to determine if combining local feature extraction with global spatial attention could overcome the diagnostic challenges posed by overlapping clinical features in infectious keratitis.
Setting
This was a diagnostic deep learning evaluation study at a tertiary eye care center.
Methods
A total of 5,713 slit-lamp images (augmented from 783 original images of 351 patients) were utilized, with ground truth established via laboratory culture or biopsy. Images were partitioned at the patient level into training (n=4,570) and testing (n=1,143) sets. We developed a hybrid CNN+ViT architecture designed to capture both local morphological features—such as feathery borders—and global spatial dependencies, such as satellite lesions. Performance was compared against standalone architectures, including MobileNetV2, VGG16, CNN, and a standard ViT.
Results
The hybrid CNN+ViT model achieved a superior diagnostic accuracy of 96.51%, significantly outperforming standalone CNN models (which ranged from 60.19% to 78.39%) and the standalone ViT (69.64%). The framework demonstrated robust discriminative capability with an AUROC of 0.99. On the independent test set, the model correctly identified 583 bacterial and 517 fungal cases, achieving a precision of 96.04% and a recall of 96.84%.
Conclusions
The hybrid CNN+ViT architecture significantly enhances the differentiation of FK and BK compared to standalone models by effectively bridging the gap between local textural nuances and broader structural patterns. This approach offers a reliable clinical decision support tool that can provide immediate probability scores during initial presentation, potentially reducing time-to-treatment for devastating fungal infections.