U-net based CNN for segmenting blood vessel and thereafter removal of vessels from fundus image to allow better diagnostic models using classifiers trained on top of this cleaned up version of fundus as well as classifiers trained to analyse the vessel maps to identify clinical features associated with vessel shapes, like vessel tortuosity.
Training Data is obtained from DRIVE and STARE datasets. For STARE dataset the target vessel map annotated by Valentina Kouznetsova is used since it was more detailed.
The notebook generate_patches is used for generating of a vast dataset of 256 X 256
patches from the images available in DRIVE and STARE datasets. The patches are generated at random. For robust training patches involving flipping of image and addition of noise are also generated.
In order to use the notebook without any changes ensure following tree structure for storing DRIVE and STARE datasets:
VesselExtract/
├── DRIVE
│ ├── test
│ └── training
├── STARE
│ ├── labels-vk
│ └── stare-images
├── generate_patches.ipynb
├── README.md
├── research_model.ipynb
├── run_tests.ipynb
The training of model for vessel segmentation is done in the notebook research_model. Results of vessel segmentation in presence of various clinical features is also documented.
Various tests to evaluate the quality of vessel maps generated against the vessel maps available in the database can be found in run_tests. Also an attempt to cleanup the fundus image by removing the vessel map has been done by using mean colour of local neighbourhood (32X32, 16X16, 8X8 and 4X4 surrounding patches
) to fill up the pixels corresponding to vessels.
A MATLAB code for vessel extraction is also available in vessel_extraction.m. This was taken from here. However this is terribly slow and is not very accurate. Placed here as baseline.
If you use this code for research, please cite:
@misc{vesselextract18,
author = {Jindal, Deepanshu},
title = {Vessel Extract},
year = {2018},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/djin31/VesselExtract}}
}