Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vineet1992/Retina-Seg
https://github.com/vineet1992/Retina-Seg
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vineet1992/Retina-Seg
- Owner: vineet1992
- Created: 2021-03-26T04:49:27.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-03T15:27:52.000Z (about 2 years ago)
- Last Synced: 2024-08-02T16:46:20.350Z (6 months ago)
- Language: Python
- Size: 2.92 MB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-uk-biobank - Retina-Seg
README
# Retina Vessel Segmentation using an Ensemble of U-Nets
![Example Segmentation](/images/Main.png)
## Overview
This provides a software package to automatically segment vasculature from Retinal Fundus photographs. The model uses an ensemble of 10 U-Nets trained on datasets from DRIVE, CHASEdb, and STARE.## Installation
This inference code was tested on Ubuntu 18.04.3 LTS, conda version 4.8.0, python 3.7.7, fastai 1.0.61, cuda 10.2, pytorch 1.5.1 and cadene pretrained models 0.7.4. A full list of dependencies is listed in `environment.yml`.Inference can be run on the GPU or CPU, and should work with ~4GB of GPU or CPU RAM. For GPU inference, a CUDA 10 capable GPU is required.
For the model weights to download, Github's large file service must be downloaded and installed: https://git-lfs.github.com/
This example is best run in a conda environment:
```bash
git lfs clone https://github.com/vineet1992/Retina-Seg/
cd location_of_repo
conda env create -n Retina_Seg -f environment.yml
conda activate Retina_Seg
python Code/seg_ensemble.py test_images/ test_output/ ../model/UNet_Ensemble 10
```Dummy image files are provided in `test_images/;`. Weights for the segmentation model are in `model/UNet_Ensemble_[0-9].pth`.
Output will be written to `test_output/`.To run the outlier detection model use the following additional steps
```bash
python Code/run_outliers.py ../test_images/ /home/vraghu/Retina/Github/Retina-Seg/model/Outlier_Detector_Resnet_021421 ../test_output/Outlier_Output.csv
```Then, the predicted outlier scores will be stored in test_output/Outlier_Output.csv. Please change the image directory to run the model on your images.
## Acknowledgements
I thank the creators of the DRIVE, CHASEdb, STARE databases along with the UK Biobank for access to their datasets.