Skip to content

amirrdr/keratitis-detection-confocal

Repository files navigation

Code for the paper "Deep Learning-Based Classification of Fungal and Acanthamoeba Keratitis Using Confocal Microscopy"

Introduction: The purpose of this study is to assess the feasibility of using deep learning to classify different types of—fungal keratitis (FK), acanthamoeba keratitis (AK), and nonspecific keratitis (NSK)—using confocal microscopy. Diagnosing AK and FK can be particularly challenging, even for experienced ophthalmologists, due to their similar clinical presentation. Methods: In this study, we employed transfer learning with a ResNet50 architecture to classify keratitis types in a dataset of 1,975 images (1,137 FK, 457 AK, 381 NSK). The dataset was split into training and testing sets. Data augmentation (e.g., rotation, zooming) was applied to the training subset to address class imbalance, and class weighting was used (5x for acanthamoeba, 30x for nonspecific). The model was trained for 150 epochs using the Adam optimizer. To evaluate the model, K-fold cross-validation (K=5) was used. The simulation was conducted using Python 3.10 on hardware powered by an Nvidia RTX 3070 Ti GPU, AMD Ryzen Gen 9 Series 6000 CPU, and 32 GB of DDR5 RAM. Results: The model achieved a macro average accuracy of 87% and a weighted average accuracy of 89%. Precision and recall were high for AK (93% and 96%) and FK (90% and 92%). NSK had lower performance, with 78% precision and 71% recall. Conclusion: The model demonstrated excellent performance in distinguishing AK and FK, showing its potential to support clinicians in diagnosing these conditions. However, performance for NSK was suboptimal, indicating the need for further work to improve accuracy for other types of keratitis.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages