Investigating vision transformers for imbalanced ocular image classification with explainable ai

Authors

  • Syed Sofiya Ali Department of computer science & engineering, shri shankaracharya institute of professional management & technology, Raipur, Chhattisgarh, India Author
  • Dr. Suman Kumar Swarnkar Department of computer science & engineering, shri shankaracharya institute of professional management & technology, Raipur, Chhattisgarh, India Author

DOI:

https://doi.org/10.48047/2mq0qf97

Keywords:

machine learning, conjunctivitis, vision transformer, explainable ai, conjunctivitis.

Abstract

Conjunctivitis is a common eye inflammation that creates a major health challenge worldwide due to its frequent occurrence and the difficulties of timely and accurate diagnosis. Traditional clinical examination methods can be subjective, require many resources, and may result in misdiagnosis or delayed treatment, especially in underserved areas. This paper introduces an automated deep learning framework for accurately detecting conjunctivitis from eye images, with the goal of providing a dependable diagnost ic tool for healthcare professionals. Our solution uses a pre-trained vision transformer (vit) model, fine-tuned for binary classification of healthy and infected eyes. To tackle usual problems in medical imaging datasets, we apply a wide range of data augmentation techniques to improve generalization and use the synthetic minority over-sampling technique (smote) to reduce class imbalance in the training data. We rigorously evaluated the model's performance on an independent test set, demonstrating a high diagnostic accuracy of 95.69%, precision of 97.47%, recall of 96.25%, and f1-score of 96.86% after optimizing the classification threshold on a validation set. Additionally, to ensure transparency and practical use, we integrated lime (local interpretable model-agnostic explanations), which provides visual insights into the specific areas of images that influence the model's predictions. The developed system offers a strong, accurate, and interpretable tool that can greatly improve the efficiency and accessibility of conjunctivitis diagnosis. Ultimately, it contributes to better patient outcomes and a lighter burden on healthcare services.

Downloads

Download data is not yet available.

References

A. A. Azari and a. Arabi, “conjunctivitis: a systematic review,” j ophthalmic vis res, vol. 15, no. 3,

Pp. 372–395, sep. 2020, doi: 10.18502/jovr.v15i3.7456.

G. Clare, j. H. Kempen, and c. Pavésio, “infectious eye disease in the 21st century—an overview,” aug.

, 2024, springer nature. Doi: 10.1038/s41433-024-02966-w.

A. A. Azari and n. P. Barney, “conjunctivitis: a systematic review of diagnosis and treatment,” oct. 23,

, american medical association. Doi: 10.1001/jama.2013.280318.

E. Yeu and s. Hauswirth, “a review of the differential diagnosis of acute infectious conjunctivitis: implications for treatment and management,” 2020, dove medical press ltd. Doi: 10.2147/opth.s236571.

H. Kumar et al., “a review on most opthalmic viral disease conjunctivitivs (eye flu),” journal for research in applied sciences and biotechnology, vol. 2, no. 4, pp. 96–100, aug. 2023, doi: 10.55544/jrasb.2.4.13.

S. S. Ali and dr. S. K. Swarnkar, “conjunctivitis detection: a comprehensive review of deep learning approaches,” interantional journal of scientific research in engineering and management, vol. 08, no. 10, pp. 1–7, oct. 2024, doi: 10.55041/ijsrem37957.

M. J. Mahoney, r. Bekibele, s. L. Notermann, t. G. Reuter, and e. C. Borman-shoap, “pediatric conjunctivitis: a review of clinical manifestations, diagnosis, and management,” may 01, 2023, mdpi. Doi: 10.3390/children10050808.

Y. Guan et al., “clinical study of tear total ige detection in the diagnosis and treatment of allergic conjunctivitis in children,” feb. 08, 2024. Doi: 10.21203/rs.3.rs-3878687/v1.

B. S. A. Almjalawi, “eye diseases transmitted by insects to humans,” research review, aug. 2023,

Doi: 10.52845/jmrhs/2023-6-6-6.

T. Muto, s. Imaizumi, and k. Kamoi, “viral conjunctivitis,” mar. 01, 2023, mdpi. Doi: 10.3390/v15030676.

A. L. Onugwu et al., “nanotechnology based drug delivery systems for the treatment of anterior segment eye diseases,” feb. 01, 2023, elsevier b.v. doi: 10.1016/j.jconrel.2023.01.018.

S. Ahad ali, s. Ali, and i. Jahan, “allergies to infections: understanding the spectrum of conjunctivitis,”

[online]. Available: https://ijpdd.org/

L. Bielory, l. Delgado, c. H. Katelaris, a. Leonardi, n. Rosario, and p. Vichyanoud, “icon: diagnosis and management of allergic conjunctivitis,” annals of allergy, asthma and immunology, vol. 124, no. 2,

Pp. 118–134, feb. 2020, doi: 10.1016/j.anai.2019.11.014.

R. Kamal, d. Mukherjee, and a. Singh, “an outbreak of eye flu virus in india,” curr drug targets, vol. 24, no. 17, pp. 1293–1297, dec. 2023, doi: 10.2174/0113894501275247231129112022.

M. Manchalwar and k. Warhade, “detection of cataract and conjunctivitis disease using histogram of

Oriented gradient,” international journal of engineering and technology, vol. 9, no. 3, pp. 2400–2406, jun. 2017, doi: 10.21817/ijet/2017/v9i3/1709030214.

E. S. Shorter et al., “diagnostic accuracy of clinical signs, symptoms and point-of-care testing for early adenoviral conjunctivitis,” clin exp optom, vol. 105, no. 7, pp. 702–707, 2022, doi: 10.1080/08164622.2021.1984180.

A. Khan et al., “a recent survey of vision transformers for medical image segmentation.”

Q. Pu, z. Xi, s. Yin, z. Zhao, and l. Zhao, “advantages of transformer and its application for medical image segmentation: a survey,” dec. 01, 2024, biomed central ltd. Doi: 10.1186/s12938-024-01212-4.

K. Han et al., “a survey on vision transformer,” ieee trans pattern anal mach intell, vol. 45, no. 1, pp.

–110, jan. 2023, doi: 10.1109/tpami.2022.3152247.

A. Arnab, m. Dehghani, g. Heigold, c. Sun, m. L. Luči´c, and c. Schmid, “vivit: a video vision transformer.”

D. Zhou et al., “deepvit: towards deeper vision transformer.” [online]. Available:

Https://github.com/zhoudaquan/dvit_repo.

X. Dong et al., “cswin transformer: a general vision transformer backbone with cross-shaped windows.” [online]. Available: https://github.com/

B. S. Abunasser, m. Rasheed, j. Al-hiealy, i. S. Zaqout, and s. S. Abu-naser, “breast cancer detection and classification using deep learning xception algorithm.” [online]. Available: www.ijacsa.thesai.org

P. Zhang et al., “multi-scale vision longformer: a new vision transformer for high-resolution image

Encoding.” [online]. Available: https://github.com/microsoft/vision-

S. Sofiya al and s. K. Swarnkar, “automated conjunctivitis detection using xception model with transfer learning,” int j sci res, pp. 77–80, mar. 2025, doi: 10.36106/ijsr/2824965.

G. A. Pradipta, r. Wardoyo, a. Musdholifah, i. N. H. Sanjaya, and m. Ismail, “smote for handling imbalanced data problem : a review,” in 2021 sixth international conference on informatics and computing (icic), 2021, pp. 1–8. Doi: 10.1109/icic54025.2021.9632912.

A. D and u. V, “integrating smote and lime techniques for enhanced stroke prediction using machine learning approaches,” in 2024 international conference on emerging technologies in computer science for interdisciplinary applications (icetcs), 2024, pp. 1–6. Doi: 10.1109/icetcs61022.2024.10544182.

K. Liu, y. Cai, k. Song, r. Yuan, and j. Zou, “clarifying the effect of gut microbiota on allergic conjunctivitis risk is instrumental for predictive, preventive, and personalized medicine: a mendelian randomization analysis,” epma journal, vol. 14, no. 2, pp. 235–248, jun. 2023, doi: 10.1007/s13167-023- 00321-9.

P. Kumar, r. Kumar, and m. Gupta, “deep learning based analysis of ophthalmology: a systematic review,” eai endorsed trans pervasive health technol, vol. 7, no. 29, nov. 2021, doi: 10.4108/eai.10- 9-2021.170950.

N. V. Prajna et al., “outpatient human coronavirus associated conjunctivitis in india,” journal of clinical virology, vol. 157, dec. 2022, doi: 10.1016/j.jcv.2022.105300.

N. Rane, “transformers for medical image analysis: applications, challenges, and future scope,” ssrn electronic journal, 2023, doi: 10.2139/ssrn.4622241.

A. Akram and r. Debnath, “an automated eye disease recognition system from visual content of facial images using machine learning techniques,” turkish journal of electrical engineering and computer sciences, vol. 28, no. 2, pp. 917–932, 2020, doi: 10.3906/elk-1905-42.

Y. Lecun, y. Bengio, and g. Hinton, “deep learning,” nature, vol. 521, no. 7553, pp. 436–444, 2015, doi: 10.1038/nature14539ï.

V. Gulshan et al., “development and validation of a deep learning algorithm for detection of diabetic retinopathy in retinal fundus photographs,” jama - journal of the american medical association, vol. 316, no. 22, pp. 2402–2410, dec. 2016, doi: 10.1001/jama.2016.17216.

P. Mukherjee, i. Bhattacharyya, m. Mullick, r. Kumar, n. D. Roy, and m. Mahmud, “icondet: an intelligent portable healthcare app for the detection of conjunctivitis,” in communications in computer and information science, springer science and business media deutschland gmbh, 2021, pp. 29–42. Doi: 10.1007/978-3-030-82269-9_3.

S. Mondal, s. Banerjee, s. Mukherjee, a. Ganguly, and d. Sengupta, “deep classifier for conjunctivitis – a three-fold binary approach,” international journal of mathematical sciences and computing, vol. 8, no. 2, pp. 46–54, jun. 2022, doi: 10.5815/ijmsc.2022.02.05.

A. K. Bitto and i. Mahmud, “multi categorical of common eye disease detect using convolutional neural network: a transfer learning approach,” bulletin of electrical engineering and informatics, vol. 11, no. 4,

Pp. 2378–2387, aug. 2022, doi: 10.11591/eei.v11i4.3834.

Muh. Erdin and prof. L. Patel, “early detection of eye disease using cnn,” int j res appl sci eng technol, vol. 11, no. 4, pp. 2683–2690, apr. 2023, doi: 10.22214/ijraset.2023.50737.

M. Gunay, i. Kucukoglu, e. Goceri, t. Danisman, and f. Alturjman, “automated detection of adenoviral conjunctivitis disease from facial images using machine learning,” in proceedings - 2015 ieee 14th international conference on machine learning and applications, icmla 2015, institute of electrical and electronics engineers inc., mar. 2016, pp. 1204–1209. Doi: 10.1109/icmla.2015.232.

R. K. Bawa and a. Koul, “automated detection of conjunctivitis using convolutional neural network,” in

Applied data science and smart systems, crc press, 2024, pp. 91–97. Doi: 10.1201/9781003471059-13.

Downloads

Published

2025-03-12

How to Cite

Investigating vision transformers for imbalanced ocular image classification with explainable ai (S. Sofiya Ali & S. Kumar Swarnkar , Trans.). (2025). Cuestiones De Fisioterapia, 54(5), 1112-1131. https://doi.org/10.48047/2mq0qf97