MacularAttentionNet: Retinal OCT Diagnostic Classifier
This repository hosts the fine-tuned model checkpoints developed as part of an MSc Computer Science dissertation at Keele University. The research focuses on evaluating and enhancing deep convolutional network architectures for the automated classification of macular pathologies using optical coherence tomography (OCT) scans.
The primary objective is to advance clinical diagnostic pipelines by introducing spatial-channel attention mechanisms to legacy convolutional baselines, optimizing both diagnostic accuracy and model interpretability.
- Worked on by: Tadiwanashe Mataruse
- Source Code Repository: GitHub - macular-attention-oct
- Intended Use: Educational and research purposes only.
- Gradio Demo: https://huggingface.co/spaces/jeepaz/MacularAttentionNet-Demo
Technical Overview
The models hosted in this repository were trained, evaluated, and benchmarked sequentially across three distinct architectural paradigms:
- ResNet50 (Baseline): A legacy convolutional anchor utilizing classic residual mapping blocks.
- ConvNeXt-Tiny (Baseline): A modernized convolutional design incorporating macro-level features inspired by Vision Transformers.
- ResNet50 + CBAM (Hybrid Attention): An engineered model integrating a Convolutional Block Attention Module to compute channel and spatial feature maps sequentially. I would like to designate this custom implementation as MacularAttentionNet.
To maintain structural transparency, local explainability layers are generated dynamically via Gradient-weighted Class Activation Mapping (Grad-CAM), mapping the network's high-activation focus directly onto localized retinal lesions.
Dataset and Class Specifications
The models are trained and validated using the publicly available Kermany 2018 Retinal OCT Dataset (OCT2017).
- Dataset Source: Kaggle - Retinal OCT Images
- Evaluation Split: Modified from the default layout to use the balanced 968-sample test array as the active validation monitor, bypassing the sample constraints of the original placeholder split.
Cross-sectional retinal B-scans are classified into four distinct clinical categories:
- CNV (Choroidal Neovascularization): Neoangiogenesis within the sub-retinal space, manifesting as hyper-reflective complexes or fluid tracking.
- DME (Diabetic Macular Edema): Intra-retinal cystoid fluid accumulation causing retinal thickening.
- DRUSEN: Extracellular lipid deposits beneath the retinal pigment epithelium, seen as nodular elevations.
- NORMAL: Structurally sound retinal architecture showing complete layer continuity.
Model Evaluation Results
Performance matrix computed across the balanced 968-sample testing split (check the results under the Files & Versions tab):
| Model Architecture | Macro Precision | Macro Recall | Macro F1-Score | Overall Accuracy |
|---|---|---|---|---|
| ResNet50 Baseline | 0.9969 | 0.9969 | 0.9969 | 99.69% |
| ConvNeXt-Tiny Baseline | 0.9969 | 0.9969 | 0.9969 | 99.69% |
| ResNet50 + CBAM (Ours) | 1.0000 | 1.0000 | 1.0000 | 100.00% |
Citation and Licensing
This repository and its source code are licensed under the MIT License and are restricted to academic, educational, and research use cases. If referencing this implementation, please cite the underlying dataset source:
@article{Kermany2018,
title={Identifying Medical Diagnoses and Treatable Diseases by Image-Based Deep Learning},
author={Kermany, Daniel S. and Goldbaum, Michael and Wen, Wenjia and Topol, Eric D. and Zhang, Kang and others},
journal={Cell},
volume={172},
number={5},
pages={1122--1131},
year={2018},
publisher={Elsevier}
}