Ghailen-Ben-Achour / DR-Diagnosis

Diabetic Classifciation and model optimization

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Diabetic classifciation and model optimization

The goal of this project is to build a high accuracy/real time model able to classify Diabetic degree. The model takes as an input an image and predicts its label.

  1. No DR
  2. Mild DR
  3. Moderate DR
  4. Severe DR
  5. Proliferate DR

Getting Started

Dataset

The Dataset contains 3662 training images and 1928 for testing.
A CSV file containing the labels is also available.
The Dataset can be downloaded here: https://www.kaggle.com/c/aptos2019-blindness-detection/data.

Code

To train the model I used transfer learning for Resnet50.
The Resnet50_model.py trains the model and stores the results (accuracy and loss functions, confusion matrix ...).

python Resnet50_model.py

Results

Confusion matrix

Quantization

Finally, to ensure a real time detection, I used both integer and full integer quatization to convert weights and activation functions from 32bit floats to 8bit integers.
weights values

About

Diabetic Classifciation and model optimization


Languages

Language:Python 100.0%