Skip to content

Diabetic Retinopathy (DR), a vision-threatening complication of diabetes, using neural networks. Leveraging TensorFlow, two models (Standard CNN and InceptionV3) were trained on a preprocessed and augmented retinal image dataset.

Notifications You must be signed in to change notification settings

chaitanyasai-2021/Deep-Learning-for-Diabetic-Retinopathy-Screening

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 

Repository files navigation

Deep-Learning-for-Diabetic-Retinopathy-Screening

πŸ“– Overview

Diabetic Retinopathy (DR) is a serious complication of diabetes that damages the retina, potentially leading to blindness if not detected early. This project leverages TensorFlow to build neural networks capable of identifying DR from retinal images. By addressing the challenges in the dataset and applying deep learning techniques, this solution aims to assist in early detection.


πŸ“Š Dataset

The dataset used in this project comes from the 2015 Kaggle competition. It contains approximately 35,000 retinal images captured under varying conditions and sizes.

However, the dataset is:

  • Imbalanced: Most images are labeled as "No DR."
  • Noisy: Contains inconsistencies in quality, requiring thorough preprocessing.

Example: Original Dataset

Original Dataset


πŸ› οΈ Preprocessing Pipeline

To make the dataset suitable for training, a preprocessing pipeline was implemented:

  1. Crop & Resize Images: All images were resized to 256x256 pixels. Black or invalid images were removed.
  2. Augmentation: Images were rotated, mirrored, and resized to balance the dataset.
  3. Label Updates: A new CSV file was created to map augmented images to DR levels.

Augmentation Examples

Augmented Dataset

Class Balance Before and After Augmentation

Augmentation Example

Note: Preprocessing scripts were adapted from Grew Chase's EyeNet.


🧠 Neural Network Architectures

Two types of neural networks were trained:

  1. Standard CNN: A basic architecture using convolution and pooling layers.
  2. InceptionV3: A pre-trained model by Google, fine-tuned on the augmented dataset using transfer learning.

Architectures for both models can be found in the neural_nets folder.


πŸš€ Training

  • Data Split:
    • 80% of the dataset for training.
    • 20% for validation.
  • Google Colab Usage:
    • Import the .pynb file for the neural network architecture.
    • Use this command to unzip the dataset:
      !unzip '/content/drive/MyDrive/filepath/filename.zip'  

The dataset was directly accessed from the directory, saving significant space (~20GB).


πŸ“ˆ Results

Model Accuracy (Training) Accuracy (Validation)
Standard CNN 82.2% 82.2%
InceptionV3 86.0% 85.8%

πŸ“· Visual Examples

Training on Google Colab

Colab Upload Example


By combining advanced neural networks and thorough preprocessing, this project aims to provide a reliable tool for early detection of Diabetic Retinopathy. πŸ‘οΈβœ¨

About

Diabetic Retinopathy (DR), a vision-threatening complication of diabetes, using neural networks. Leveraging TensorFlow, two models (Standard CNN and InceptionV3) were trained on a preprocessed and augmented retinal image dataset.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published