Skip to content

Classification of Fundus Images into 5 stages of Diabetic Retinopathy, and segmentation of blood vessels in fundus images

License

Notifications You must be signed in to change notification settings

rishiswethan/Diabetic-Retinopathy-Detection-Retinal-Vessel-Segmentation

Repository files navigation

Classification and Segmentation:

This project was tested on Ubuntu 22.04 LTS with Python 3.10

Summary:

There are 2 aspects to this project:

  1. Classification of Diabetic Retinopathy in fundus images. Classification is done into 5 classes:
    • 0: No DR
    • 1: Mild
    • 2: Moderate
    • 3: Severe
    • 4: Proliferative DR
  2. Segmentation of blood vessels in fundus images

How to run the program:

  1. Install python 3.10
  1. Install everything you need

    • python -m venv venv
    • Activate the virtual environment
      • Linux/MacOS: source venv/bin/activate
      • Windows: venv\Scripts\activate
    • pip install -r requirements.txt
    • To setup the GPU version of pytorch, follow the instructions in this link. A quick summary of the steps is given below:
      • pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --no-cache-dir --force-reinstall
        • There should be a download size of 2.3GB if it is downloading the GPU version correctly. If it's something like 600MB, that's the CPU version.
        • If that didn't work, simply install the CPU version for now. It'll slow down transcription but it'll work.
          • pip install torch
  2. python run.py

    • You can follow the on-screen instructions to run the program.
    • Input folder contains sample images to test the program. You can either feed the entire folder path or a single image path as input to the program.
    • run.py gives you a quick way to run the program, and is meant to be an example of how to use the various functions.

PS: Consider leaving a star if you find this useful. Thanks!

Display Items:

Confusion Matrix On Test Set:

More Samples: