CSwinFK: a bidirectional cross-attention CNN-Swin Transformer fusion model for fungal keratitis classification in in vivo confocal microscopy images
Fungal keratitis is a corneal infection caused by filamentous fungi or yeasts. It can progress rapidly and, if not diagnosed and treated promptly, may lead to irreversible visual impairment or blindness. In this study, we developed CSwinFK, a classification model for distinguishing fungal keratitis from negative cases using in vivo confocal microscopy images. This model is based on a novel bidirectional cross-attention fusion of the CNN architecture and Swin Transformer. Through deep interactions between the two branches, the model aims to achieve high sensitivity to local structural details while effectively capturing long-range global dependencies in the image. Experiments were conducted on a curated set of 3,612 clinical IVCM images from the fungal keratitis and negative groups using a subject-level data split. The model achieved a test accuracy of 97.23%, with a sensitivity of 97.05% and a specificity of 97.42%. Comparative experiments with representative architectures and existing deep learning models showed that CSwinFK achieved favorable classification performance. Grad-CAM analysis further showed that the model focused on regions exhibiting patterns consistent with fungal hyphae in IVCM images.
Authors
- Xianxian Wei
- Miaoting Hu
- Dongqi Liu (ORCID: https://orcid.org/0000-0001-6736-3955)
- Shirley W. I. Siu (ORCID: https://orcid.org/0000-0002-3695-7758)
- Jianxiu Cai
- Qianqian Lan
- Qi Chen
- Li Jiang
- Lifei Chen
- Liang Liang
- Henry H. Y. Tong
- Wenjing He
- Kefeng Li
- Hui Huang
Institutions
- Beibu Gulf University (CN)
- The People's Hospital of Guangxi Zhuang Autonomous Region (CN)
- Macao Polytechnic University (MO)
Publication Details
- Journal
- Scientific Reports
- Published
- 2026-10-13
- DOI
- https://doi.org/10.1038/s41598-026-72933-w
- Primary Topic
- Ocular Infections and Treatments
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Natural Science Foundation of Guangxi Zhuang Autonomous Region
- National Natural Science Foundation of China