Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 1.64 KB

README.md

File metadata and controls

44 lines (33 loc) · 1.64 KB

Blood vessel for retinal images using KNN classifier

(We used images from HRF database)

Instructions

First clone the repository:

git clone https://github.com/kwencel/VesselsClassifier.git

Next go to the root directory and run:

./gradlew fatJar

This will produce a jar with all dependencies.

Run the program with example images:

java -jar ./build/libs/VesselsClassifier-all-1.0-SNAPSHOT.jar ./Examples/training/ ./Examples/test/images/01_dr.JPG

This may take a while depending on your CPU. Results will be written to ./Examples/test/results

Manual segmentation

Input image Manualy labeled image

To achive same result without time-consuming manual segmentation we used our custom implementation of k Nearest Neighbours Classifier.

Preprocessing

First we extract green channel from input image as it has the highest contrast between the blood vessels and the retinal background. Next we equalize the histogram of the channel.

Classifier

Model was trained using 300 random balanced samples. We used 7 features -- Hu moments for 11 x 11 surrounding of each pixel. 11 neighbours proved to yield the best result.

Results

For 15 test inputs we achived average accuracy of 87,7%