Clinically Verified Hybrid Deep Learning System for Retinal Ganglion Cells Aware Grading of Glaucomatous Progression
We present a novel strategy encompassing a hybrid convolutional network RAG-Netv2 that extracts the retinal nerve fiber layer (RNFL), ganglion cell with the inner plexiform layer (GC-IPL) and GCC regions, allowing thus a quantitative screening and grading of glaucomatous subjects. Furthermore, RAG-Net has additionally been tested to screen the glaucomatous cases through retinal fundus images. The block diagram of the proposed framework is presented below:
Block Diagram of the Proposed Framework
This repository contains the source code of our paper published in IEEE Transactions on Biomedical Engineering. The proposed framework is developed using TensorFlow 2.3.1 and Keras APIs with Python 3.7.8. Moreover, the results are compiled through MATLAB R2020a. The detailed steps for installing and running the code are presented below:
To run the codebase, following libraries are required. Although, the framework is developed using Anaconda. But it should be compatable with other platforms.
- TensorFlow 2.3.1
- Keras 2.3.1
- OpenCV 4.4.0
- imgaug 0.2.9 or above
- tqdm
- Matplotlib
Alternatively, we also provide a yml file that contains all of these packages.
The proposed framework has been tested on the following public datasets:
- Armed Forces Institute of Ophthalmology (AFIO) Dataset URL (contains correlated fundus and OCT scans of glaucomatous and healthy subjects)
- ORIGA Dataset URL (contains fundus images of healthy and glaucomic patients)
For OCT Analysis
- Download the AFIO dataset
- Use 'preprocessor2.m' or 'structure_tensor_get.py' to preprocess the input scans
- Use 'augmentation.py' or 'augmentor.m' to augment the training scans
- Put the augmented training images in '…\trainingDataset\train_images' and '…\codebase\models\trainingSet' folders. The former one is used for segmentation and the latter one is used for the classification purposes.
- Put the training annotations (for segmentation) in '…\trainingDataset\train_annotations' folder
- Put validation images in '…\trainingDataset\val_images' and '…\codebase\models\validationSet' folders. The former one is used for segmentation and the latter one is used for the classification purposes.
- Put validation annotations (for segmentation) in '…\trainingDataset\val_annotations' folder. Note: the images and annotations should have same name and extension (preferably .png).
- Put test images in '…\testingDataset\test_images' folder and their annotations in '…\testingDataset\test_annotations' folder
- Use 'trainer.py' file to train RAG-Netv2 on preprocessed scans and also to evaluate the trained model on test scans. The results on the test scans are saved in ‘…\testingDataset\segmentation_results’ folder. This script also saves the trained model in 'model.h5' file.
- Run 'ragClassifier.py' script to classify the preprocessed test scans as normal or glaucomic. The results are saved as a mat file in '…\testingDataset\diagnosisResults' folder. Note: step 10 can only be done once the step 9 is finished because the model trained in step 9 is required in step 10.
- Once step 10 is completed, run 'trainSVM.m' script to train the SVM model for grading the severity of the classified glaucomic scans.
- Once the SVM is trained, run 'glaucomaGrader.m' to get the grading results.
- The trained models can also be ported to MATLAB using ‘kerasConverter.m’ (this step is optional and only designed to facilitate MATLAB users if they want to avoid Python analysis).
- Some additional results (both qualitative and quantitative) of the proposed framework are also presented in the '…\results' folder.
For Fundus Analysis
- Download the desired dataset
- Put the training scans in '…\codebase\models\trainingSet\glaucoma' and '…\codebase\models\trainingSet\normal' folders
- Put the validation scans in '…\codebase\models\validationSet\glaucoma' and '…\codebase\models\validationSet\normal' folders
- Put the test scans in '…\testingDataset\fundus_test_images' folder.
- Uncomment the path at line 44 within the 'ragClassifier.py' file. Note: if you want to perform OCT analysis again, this line has to be commented again
- Run 'ragClassifier.py' to produce classify normal and glaucomic fundus scans. The results will saved in a mat file within '…\testingDataset\diagnosisResults' folder once the analysis is completed. Note: Before running 'ragClassifier.py', please make sure you have the saved 'model.h5' file generated through step 9 because RAG-Netv2 classification model initially adapts the weights of the trained RAG-Netv2 segmentation unit for faster convergence.
We have provided the quantitative andresults in the 'results' folder. Please contact us if you want to get the trained model instances.
If you use RAG-Netv2 (or any part of this code in your research), please cite the following paper:
@article{ragnetv2,
title = {Clinically Verified Hybrid Deep Learning System for Retinal Ganglion Cells Aware Grading of Glaucomatous Progression},
author = {Hina Raja and Taimur Hassan and Muhammad Usman Akram and Naoufel Werghi},
journal = {IEEE Transactions on Biomedical Engineering},
year = {2020}
}
If you have any query, please feel free to contact us at: taimur.hassan@ku.ac.ae.