Skip to content

About

Retinal disease classification (cataract, diabetic retinopathy, glaucoma, normal) with VGG16, ResNet152V2 and EfficientNetB7 transfer learning.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Retinal Disease Classification using Transfer Learning

This project aims to classify retinal diseases, including cataract, diabetic retinopathy, glaucoma, and normal retina, using deep learning models. The models used include VGG16, ResNet152V2, and EfficientNetB7, all fine-tuned with pre-trained weights from ImageNet.

Table of Contents

Project Overview

The objective of this project is to classify retinal images into four categories: cataract, diabetic retinopathy, glaucoma, and normal. The models are built using TensorFlow and Keras, employing transfer learning from pre-trained models (VGG16, ResNet152V2, and EfficientNetB7).

Dataset

  • The dataset consists of images from three classes: cataract, diabetic retinopathy, glaucoma, and normal.
  • Data is divided into training, validation, and testing sets:
    • Training Set: 2108 images
    • Validation Set: 1053 images
    • Test Set: 1056 images

Model Architecture

Three models are used for classification:

  • VGG16
  • ResNet152V2
  • EfficientNetB7

Fine-tuning Process:

  • All layers in the base models are frozen to retain the learned features from ImageNet.
  • A global average pooling layer is added, followed by a dense layer with 1024 units and ReLU activation.
  • The final layer is a dense layer with softmax activation for multi-class classification.

Installation

  1. Clone the repository:

    git clone https://github.com/your-username/retinal-disease-classification.git
    cd retinal-disease-classification
  2. Install the required packages:

    pip install -r requirements.txt

Usage

  1. Prepare the Dataset:

    • Organize the dataset into Train, Valid, and Test directories, each containing subfolders for each class (cataract, diabetic_retinopathy, glaucoma, normal).
  2. Run the Training Script:

    • Execute the script to train the models:

      python train.py
  3. Evaluate the Models:

    • After training, evaluate the models on the test set:

      python evaluate.py

Results

The models achieved the following performance on the test set:

  • VGG16:

    • Accuracy: 73%
    • Precision, Recall, F1-Score for each class:
  • ResNet152V2:

    • Accuracy: 81%
    • Precision, Recall, F1-Score for each class:
  • EfficientNetB7:

    • Accuracy: 25%
    • Precision, Recall, F1-Score for each class:

Visualization

  • The training history (accuracy and loss) for each model is plotted to show the model's performance over epochs. image image image

  • Precision-Recall curves are plotted to evaluate the performance of each model across different thresholds.

  • image

Evaluation

The evaluation of each model includes:

  • Confusion Matrix
  • Classification Report
  • Precision-Recall Curve

These metrics help in understanding the model's performance and identifying areas for improvement.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

Retinal disease classification (cataract, diabetic retinopathy, glaucoma, normal) with VGG16, ResNet152V2 and EfficientNetB7 transfer learning.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages