Diabetic-Retinopathy-Detection-Retinal-Vessel-Segmentation
Diabetic-Retinopathy-Detection-Retinal-Vessel-Segmentation copied to clipboard
Classification of Fundus Images into 5 stages of Diabetic Retinopathy, and segmentation of blood vessels in fundus images
Classification and Segmentation:
This project was tested on Ubuntu 22.04 LTS with Python 3.10
Summary:
There are 2 aspects to this project:
- 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
- Segmentation of blood vessels in fundus images
How to run the program:
- Install python 3.10
-
Install everything you need
python -m venv venv- Activate the virtual environment
- Linux/MacOS:
source venv/bin/activate - Windows:
venv\Scripts\activate
- Linux/MacOS:
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
-
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.pygives 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: