Back to Projects
Deep Learning · Medical Imaging · Case Study

Diabetic Retinopathy Screening

Automated retinal fundus image severity classification

Role

Deep Learning Team

Core Stack

Python · TensorFlow · PyTorch

Model Comparison

4 CNN Architectures

Status

In Progress

Introduction

A comparative deep-learning study of four convolutional neural network architectures for classifying diabetic retinopathy severity from retinal fundus images.

The Classification Problem

Five grades. One retinal image.

Manual grading of retinal images is time-intensive and depends on access to eye-care specialists. This project investigates automated classification across five diabetic retinopathy severity stages. The severity labels follow an ordered scale, so evaluation considers how far a prediction is from the reference grade.

Image-to-grade workflow

Research pipeline

APTOS Dataset

01 · Image data

Start with retinal fundus images.

The study uses the APTOS 2019 Blindness Detection training set: approximately 3,660 labeled RGB retinal images across five severity grades.

Source

APTOS 2019

Image type

RGB fundus

Dataset access

Download separately

Dataset files are not included in the repository; access is subject to Kaggle competition terms.

1 of 4 research steps

Architecture Comparison

Four approaches, shared conditions.

TensorFlow · PyTorch

01 · Baseline · Trained from scratch

Custom CNN

A from-scratch convolutional model establishes a baseline for comparing the value of transfer learning.

Baseline role

Shows how a model trained from scratch compares with ImageNet-initialized architectures.

02 · Transfer learning · ImageNet

DenseNet121

Dense connectivity reuses earlier feature maps and supports gradient flow through the network.

Dense connectivity

Earlier feature maps are reused

03 · Transfer learning · ImageNet

EfficientNetB0

Compound scaling balances model depth, width, and input resolution.

Scaling strategy

Considers depth, width, and resolution together for an accuracy-to-computation comparison.

04 · Transfer learning · ImageNet

ResNet50

Residual connections create shortcut paths through a deeper network.

Skip connections

Shortcut paths help information and gradients travel through deeper layers.

Common evaluation

Compare performance & efficiency

Quadratic Weighted KappaMacro F1ROC-AUCTraining time

Technology & Study Insights

The tools behind the study.

Frameworks, preprocessing & explainability

  • CNN
  • CLAHE
  • Grad-CAM

Study spotlight · Transfer learning

DenseNet121

Reuse features. Keep information flowing.

DenseNet connects each layer to the feature maps from earlier layers. This dense connectivity promotes feature reuse and helps gradient flow through the network. In this study, DenseNet121 uses ImageNet transfer learning and is compared with three other CNN approaches.

01

Dense connections

Layers receive earlier feature maps.

02

Feature reuse

Previously learned patterns stay available.

03

Transfer learning

ImageNet weights initialize the model.

Image preparation

Make retinal details clearer.

The workflow crops dark borders, resizes and normalizes images, and explores CLAHE / Gaussian blend contrast enhancement before training.

Explainable predictions

Look beyond the class label.

Grad-CAM maps help visualize which image regions influenced a model prediction; they support interpretation and are not clinical evidence.

From image to severity class

Fundus imageAPTOS 2019
PreprocessingCrop · resize · enhance
DenseNet121ImageNet transfer learning
Severity gradeOne of five classes

Experimental Workflow

From fundus image to model review.

The study uses the APTOS 2019 Blindness Detection training set: approximately 3,660 labeled RGB retinal images. Dataset files are not redistributed with the project.

01

Explore

Review class distribution, image dimensions, and representative samples.

02

Preprocess

Crop dark borders, resize, enhance contrast, and normalize fundus images.

03

Split

Create stratified train, validation, and held-out test sets.

04

Balance

Apply class weighting to address the natural skew toward No DR cases.

05

Train

Compare all four architectures with matched data splits and augmentation.

06

Explain

Use Grad-CAM to inspect which retinal regions influence predictions.

Evaluation & Explainability

Measure performance. Inspect attention.

Quadratic Weighted Kappa is the primary metric for the ordered grades. Accuracy, per-class and macro precision/recall/F1, one-vs-rest ROC-AUC, confusion matrices, parameter counts, and training time provide additional comparisons. Grad-CAM is used to visualize influential retinal regions.

ModelVal. κTest κAccuracy
Custom CNNPendingPendingPending
DenseNet121PendingPendingPending
EfficientNetB0PendingPendingPending
ResNet50PendingPendingPending

Numerical results were not included in the supplied project summary and are intentionally not estimated here.

Team Contributions

A collaborative model study.

Developed for the SE4050 Deep Learning module at SLIIT. Review the final notebooks in the Finalize-Models branch.

Browse final notebooks

Bagya R M S

Custom CNN · Preprocessing pipeline

02

Insath MMM

DenseNet121

03

Gayathree M.G.K

EfficientNetB0

04

Purijjala R W M A H

ResNet50 · Evaluation · Grad-CAM

Up Next in Portfolio · Final Year Research · Disaster Risk

Integrated Flood and Landslide Risk Assessment & Response System→

A Sri Lanka-focused research prototype connecting flood impact mapping, explainable landslide prediction, GN-level human impact assessment, and hazard-aware emergency response.

PythonMachine LearningGeoPandasFastAPIWeb GISOR-Tools