Retinal blood vessel segmentation using convolutional neural network (u-net) and image processing techniques.
Use conda's spec file in order to create identical environment on your local machine:
cd vessels
conda create --name myenv --file dependencies.yml
conda activate myenv
Then run:
jupyter notebook
- Original image:
- Transformation to grayscale:
- CLAHE (Constrast-limited adaptive histogram equalization):
- Gamma correction:
- cv2.fastNlMeansDenoising:
- Ridge detection:
- Mask:
- Median filter:
- Threshold:
- Results:
Simple classificator evaluation:
U-Net architecture is widely used in medical field when it comes to image segmentation. We train the network with small and random image crops sized 64 x 64 pixels, and for each of them we get 1 if it's classified as a blood vessel or 0 if's not. The training took 100 epochs, 125 steps each with the batch size equal to 16 random image crops. We used Google Colab in order to train our model (Nvidia Tesla K80). The training took no longer than 40 minutes. Some of the results are presented below: