Deep Learning based Early Detection and Grading of Diabetic Retinopathy Using Retinal Fundus Images
Sheikh Muhammad Saiful Islam Md Mahedi Hasan Sohaib Abdullah




Deep Learning based Early Detection and Grading of Diabetic Retinopathy





S.M.S. Islam et al.



Department of Pharmacy, Manarat International University Institute of Information and Communication Technology, Bangladesh University of Engineering and Technology Department of Computer Science and Engineering, Manarat International University 

saifulislam@manarat.ac.bd, mahedi0803@gmail.com, sohaib@manarat.ac.bd






Deep Learning based Early Detection and Grading of Diabetic Retinopathy Using Retinal Fundus Images
    Sheikh Muhammad Saiful Islam 1 Md Mahedi Hasan 2 0000-0002-6337-3571 Sohaib Abdullah 3
    September 15, 2018
===================================================================================================








Diabetic Retinopathy (DR) is a constantly deteriorating disease, being one of the leading causes of vision impairment and blindness. Subtle distinction among different grades and existence of many significant small features make the task of recognition very challenging. In addition, the present approach of retinopathy detection is a very laborious and time-intensive task, which heavily relies on the skill of a physician. Automated detection of diabetic retinopathy is essential to tackle these problems. Early-stage detection of diabetic retinopathy is also very important for diagnosis, which can prevent blindness with proper treatment. In this paper, we developed a novel deep convolutional neural network, which performs the early-stage detection by identifying all microaneurysms (MAs), the first signs of DR, along with correctly assigning labels to retinal fundus images which are graded into five categories. We have tested our network on the largest publicly available Kaggle diabetic retinopathy dataset, and achieved 0.851 quadratic weighted kappa score and 0.844 AUC score, which achieves the state-of-the-art performance on severity grading. In the early-stage detection, we have achieved a sensitivity of 98% and specificity of above 94%, which demonstrates the effectiveness of our proposed method. Our proposed architecture is at the same time very simple and efficient with respect to computational time and space are concerned.








§ INTRODUCTION


Diabetic retinopathy, a chronic, progressive eye disease, has turned out to be one of the most common causes of vision impairment and blindness especially for working ages in the world today <cit.>. It results from prolonged diabetes. Blood vessels in the light-sensitive tissue (i.e. retina) are mainly affected in diabetic retinopathy. The non-proliferative diabetic retinopathy (NPDR) occurs when the blood vessels leak the blood in the retina. The Proliferative DR (PDR), which causes blindness in the patient, is the next stage to NPDR.



The progress of DR can be categorized into four stages: mild, moderate, severe nonproliferative diabetic retinopathy, and the advanced stages of proliferative diabetic retinopathy. In mild NPDR, small areas in the blood vessels of the retina, called microaneurysms, swell like a balloon. In moderate NPDR, multiple microaneurysms, hemorrhages, and venous beading occur, causing the patients to lose their ability to transport blood to the retina. The third stage,  called severe NPDR, results from the presence of new blood vessels, which is caused by the secretion of growth factor. The worst stage of DR is the proliferative diabetic retinopathy, as illustrated in Fig. <ref> in which fragile new blood vessels and scar tissue form on the surface of the retina, increasing the likelihood of blood leaking, leading to permanent vision loss.


At present, retinopathy detection system is accomplished by involving a well-trained physician manually detecting vascular abnormalities and structural changes of retina in the retinal fundus images, which are then taken by dilating the retina using vasodilating agent. Due to the manual nature of DR screening methods, however, highly inconsistent results are found from different readers, so automated diabetic retinopathy diagnosis techniques are essential for solving these problems. 


Although DR can damage retina without showing any indication at the preliminary stage <cit.>, successful early-stage detection of DR can minimize the risk of progression to more advanced stages of DR. The diagnosis is particularly difficult for early-stage detection because the process relies on discerning the presence of microaneurysms, retinal hemorrhages, among other features on the retinal fundus images. Furthermore, accurate detection and determination of the stages of DR can greatly improve the intervention, which ultimately reduces the risk of permanent vision loss.


Earlier solutions of automated diabetic retinopathy detection system were based on hand-crafted feature extraction and standard machine learning algorithm for prediction <cit.>. These approaches were greatly suffer due to the hand-crafted nature of DR features extraction since feature extraction in color fundus images are more challenging compared to the traditional images for object detection task. Moreover, these hand-crafted features are highly sensitive to the quality of the fundus images, focus angle, presence of artifacts, and noise. Thus, these limitations in traditional hand-crafted features make it important to develop an effective feature extraction algorithm to effectively analyze the subtle features related to the DR detection task.

In recent times, most of the problems of computer vision have been solved with greater accuracy with the help modern deep learning algorithms, Convolutional Neural Networks (CNNs) being an example. CNNs have been proven to be revolutionary in different fields of computer vision such as object detection and tracking, image and medical disease classification and localization, pedestrian detection, action recognition, etc. The key attribute of the CNN is that it extracted features in task dependent and automated way. So, in this paper, we present an efficient CNN architecture for DR detection in large-scale database. Our proposed network was designed with a multi-layer CNN architecture followed by two fully connected layer and an output layer. Our network outperforms other state-of-the-art network in early-stage detection and achieves state-of-the-art performance in severity grading of diabetic retinopathy detection.


The rest of the paper is organized as follows: related work is presented in the section <ref>, followed by the proposed method in the section <ref>, while experimental set-up and results are discussed in the section <ref>. Finally, we draw our conclusion in the section <ref>.






§ RELATED WORK 
 


The earlier works on automatic diabetic retinopathy detection were based on designing hand-crafted feature detectors to measure the blood vessels and optic disc, and on counting the presence of abnormalities such as microaneurysms, red lesions, hemorrhages, and hard exudates, etc. The detection was performed using these extracted features by employing various machine learning methods like support vector machines (SVM) and  k-nearest neighbor (kNN) <cit.>. In <cit.>, Acharya et al. used features of blood vessel area, microaneurysms, exudes, and hemorrhages with an SVM, achieving an accuracy of 86%, specificity of 86%, and sensitivity of 82%. Roychowdhury et al. <cit.> developed a two-step hierarchical classification approach, where the non-lesions or false positives were rejected in the first step. For lesion classification in the second step, they used classifiers such as the Gaussian mixture model (GMM), kNN, and support vector machine (SVM). They achieved sensitivity of 100%, specificity of 53.16%, and AUC 0.904. However, these types of approaches have the disadvantage of utilizing limited number of features.

Deep learning based algorithms have become popular in the last few years. For example, standard ImageNet architectures were used in <cit.>. Furthermore, Kaggle <cit.> has recently launched a DR detection competition, where all the top-ranked solutions were implemented employing CNN as the key algorithm. Pratta et al. <cit.> developed a CNN based model, which surpassed human experts in classifying advanced stages of DR. In <cit.>, CNN based method was employed to detect microaneurysms a DR stage grading. Ensemble of CNN was employed to simultaneously detect DR and macular edema by Kori et al. <cit.>. They employed a variant of ResNet <cit.> and densely connected networks <cit.>. To make the model prediction more interpretable, a visual map was generated by Torre et al. <cit.> using CNN model, which can be used to detect lesion in the tested retinal fundus images. A similar approach was used in <cit.> along with generation of regression activation map (RAM). 

Some researches focused on exploring breakdown of classification task into subproblem prediction tasks. For example, Yang et al. <cit.> employed a two-stage deep convolutional neural network based methodology, where exudates, microaeurysms,and haemorrhage were first detected by local network and subsequent severity grading was performed by global network. By introducing unbalanced weight map to emphasize leison detection, they achieved AUC of 0.9590. Authors of <cit.> implemented an architecture like VGG-16 <cit.> and Inception-4 <cit.> network for DR classification. 

Some recent works <cit.> in diabetic retinopathy have leveraged mean squared error objective function to convert the classification task into a regression task. Here ensemble of classical machine learning algorithms, like naive bayes classifier, SVM, as well as ImageNet state-of-the-art networks, with mean squared error objective function applied to tackle DR detection problem with accuracy, Kappa, and F-score of 0.736, 0.676, and 0.417, respectively.





§ PROPOSED METHOD





 §.§ Data Preprocessing


There exists a lot of exposure and lighting variation over the original fundus images, so we took several preprocessing steps as suggested by Graham  <cit.> to  standardize the image condition. First, we re-scaled the images to get the same radius and subtracted the local average color. Thereafter, the local average color of the images were mapped to 50% gray. We also clipped the images to 90% size to remove the boundary effects. The sample of the resulted preprocessed images, along with the original images, are illustrated in Fig. <ref>. 




 §.§ Data Augmentation


The performance of deep neural network is strongly correlated with the size of available training data. Although Kaggle EyePACS dataset is largest for retinopathy detection consisting of around 88,702 images, We are to use a very small fraction of it containing images for disease severity grading task with imbalanced classes, requiring us to heavily augment our training data to obtain a model which is stable and not overfitted. The major data augmentation operations that we performed are listed below.



	
  * Rotation :– Images were randomly rotated between 0^∘ to 360^∘  
	
  * Shearing :-  Randomly sheared with angle between −20^∘ and 200^∘
	
  * Flip :– Images were both horizontally and vertically flipped
	
  * Zoom :– Images were randomly stretched between (1/1.3 , 1.3)
	
  * Crop :- Images were randomly cropped to 85-95% of the original size
	
  * Krizhevsky augmentation :– Images were augmented by Krizhevsky color augmentation technique <cit.>.
	
  * Translation :– Images were randomly shifted between -25 and 25 pixel



Also, we scaled and centered each image channel (RGB) to get zero mean and unit variance over the dataset. Fig. <ref> shows some post-augmentation example images. We eventually obtained up to 35 augmentation version of each training image. The output image sizes of our data augmentation pipeline are 512 x 512 and 448 x 448.




 §.§ Network Architecture



Table <ref> illustrates the network architecture of our proposed DR detection method. The input layer of the network is 512 x 512. We tried several kernel filters of sizes 3 x 3, 4 x 4, 5 x 5 and found the best result in kernel of size 4 x 4. Hence, all the convolutional layers of our network have the kernel size of 4 x 4 with united bias and the stride of 1 except the first and third convolutional layer which have stride of 2. 

LeakyReLU <cit.> was used in all convolutional layer as the activation function for nonlinearity. All the Max-Pooling layers used have same kernel size of 3 x 3. The final extracted local features were flattened before passing through fully connected layers. There are two fully connected layers, each having 1024 neurons. Dropout of 0.5 was added after all but the last fully connected layers to reduce overfitting. Since it is much worse to misclassify severe NPDR or PDR as normal eye than as moderate retinopathy, we considered this multi-class classification as a regression problem and so an output layer of one neuron was added. We took mean squared error as our objective function. Also, we clipped the loss function value between 0 and 4 since our class ranges between these values.



In diabetic retinopathy experiment, blending the features for both eyes of a patient usually leads to a significant 
improvement in performance <cit.>. Thus, we blended our features according to the state-of-the-art blending method <cit.>, where the output of our last max-pooling layer was also used as input features to the blending network, as shown in Table <ref>. To improve the feature quality, feature extraction was repeated as many as 40 times with different augmentations per image. The mean and standard deviation of each feature was used as input to our blending network.



 §.§ Training

Our eighteen-layer-deep proposed network has more than 8.9 million parameters which were randomly initialized using 
orthogonal weight initialization. The network was trained with SGD optimization function with 0.90 Nesterov momentum with a fixed schedule over 300 epochs with data augmentation at each step. L2 regularization with a factor of 0.0005 was applied to all weighted layers. We tested several learning rates but found 10^-4 to be the best initial learning rate. The learning rate constantly decreased as the number of training epochs progressed and ended up having a learning rate of 10^-6. The summary of the settings of our training hyperparameters are given in Table <ref>.




The blending network was trained with Adam <cit.> optimization algorithm with a fixed schedule over 100 epochs. ReLU activation function was used after each fully connected layer and an L2 regularization with a factor of 0.001 was applied to every layer. The batch size used was 32 considering mean squared error as our objective function. 




§ EXPERIMENTAL RESULTS





 §.§ Dataset

There are several publicly available databases of fundus images for DR including DIARETDB0 <cit.>, DIARETDB1 <cit.>, Kaggle EyePACS <cit.>, and Messidor <cit.> Databases. DIARETDB0 dataset contains 130 color fundus images, out of which 20 are normal and 110 are affected by DR. On the other hand, DIARETDB1 contains a total 89 color fundus images, out of which 84 images contain sign of microaneurysms and five images are normal. The Messidor database contains 1200 retinal fundus images. 




In this work, we used EyePACS, the largest publicly available dataset for diabetic retinopathy, from Kaggle Diabetic Retinopathy Detection competition <cit.> sponsored by the California Healthcare Foundation, which contains a total of 88,702 high-resolution retinal fundus images, captured under a variety of imaging conditions. The dataset also contains artifacts, out of focus, too bright, and too dark images as illustrated in 
Fig. <ref>.


Fundus images are categorized into five grades (0, 1, 2, 3, 4) according to the severity of DR which are named sequentially as healthy or normal image, mild non-proliferative DR, moderate non-proliferative DR, severe non-proliferative DR, and proliferative DR. The dataset is highly imbalanced due to the presence of around 75%  grade 0 (no DR) images. Table <ref> shows overview of the distribution among different grades in the training set images of the dataset. We split the dataset with 35,126 images in training set and 53,576 images in test set as suggested by the Kaggle competition <cit.> dataset settings. We also used 96% of images of each class in training set for training and 4% for validation. 





 §.§ Performance Evaluation on Early-Stage Detection

In this work, we performed two binary classification for early-stage detection experiment: sick (grades 1,2,3,4) vs healthy (grade 0), and low (grades 0,1) vs high (grades 2,3,4). We considered both of these sub-problems equally important for early-stage detection.



We calculated sensitivity and specificity metric for both of these binary classification problems and found out higher performance in low-high DR classification than in healthy-sick classification. This is because retinal features of grade (0, 1) are similar to grade (2, 3, 4)




 §.§ Performance Evaluation on Severity Grading

The quadratic weighted kappa, the state-of-the-art performance metric for multi-class classification and suggested evaluation metric for DR <cit.>, is adopted as the performance metric of our severity grading prediction. We took thresholds (0.5, 1.5, 2.5, 3.5) to discretize the predicted regression values and make the class levels into integer for computing the Kappa scores. We achieved 0.851 quadratic weighted kappa on test set of Kaggle dataset after submitting our solution in <cit.>.



We also calculated Area Under the ROC Curve (AUROC) and F-Score of our proposed architecture on the same dataset and achieved score 0.844 and 0.743 respectively. 



§ CONCLUSION


In this paper, we have presented a novel CNN-based deep neural network to detect early-stage and severity grades of diabetic retinopathy in retinal fundus images. In our work, we have found that without heavy data augmentation, a high capacity network can easily overfit the training data. Even with data-augmentation, any network can overfit on oversampled classes such as healthy eye (grade 0). Thus, designing a small capacity network with L2 regularization, and dropout has significant importance in retinopathy detection. So, in this work, we have presented a 4 x 4 kernel based CNN network with several preprocessing and augmentation methods to improve the performance of the architecture. Our network achieved 98% sensitivity and more than 94% specificity in early-stage detection and a kappa score of more than 0.85 in severity grading on the challenging Kaggle EyePACS dataset. The experimental results have demonstrated the effectiveness of our proposed algorithm to be good enough to be employed in clinical applications. 












 

8
Congdon Congdon, N.-G., Friedman, D.-S., Lietman, T.: Important causes of visual impairment in the world today. Jama 290 (15), 2057–2060 (2003).

Melville Melville, A., et al.: Complications of diabetes: screening for retinopathy and management of
foot ulcers. Qual. Saf. Health Care. 9(2), 137–141 (2000)

Silberman Silberman, N., Ahrlich, K., Fergus, R., Subramanian, L.: Case for automated detection of diabetic retinopathy. In: AAAI Spring Symposium: Artificial Intelligence for Development, (2010)


Sopharak1 Sopharak, A., Uyyanonvara, B. and Barman, S.: Automatic exudate detection from non-dilated diabetic retinopathy retinal images using fuzzy c-means clustering. In: Sensors, 9(3), pp. 2148–2161, (2009)


Acharya Acharya, U.-R., Lim, C.-M., Ng, E.-Y.-K., Chee, C., Tamura, T.: Computer-based detection of diabetes retinopathy stages using digital fundus images. In: Proceedings of the institution of mechanical engineers, part H: journal of engineering in medicine 223(5), pp. 545–553, (2009)


Roychowdhury Roychowdhury, S., Koozekanani, D.D., Parhi, K.K.: DREAM: diabetic retinopathy analysis using machine learning. IEEE journal of biomedical and health informatics 18(5), pp. 1717–1728 (2014)


Kauppi Kauppi, T., Kalesnykiene, V., Kamarainen, J.K., Lensu, L., Sorri, I., Uusitalo, H., Kälviäinen, H., Pietilä, J.: DIARETDB0: Evaluation database and methodology for diabetic retinopathy algorithms. Machine Vision and Pattern Recognition Research Group, Lappeenranta University of Technology, Finland (2006)


Kamarainen Kamarainen, T.K.K.K., Sorri, L., Pietilä, A.R.V., Uusitalo, H.K.: the DIARETDB1 diabetic retinopathy database and evaluation protocol. In: Proceedings of British Machine Vision Conference, pp. 15.1–15.10. BMVA Press (2007)


kaggle Kaggle: Diabetic Retinopathy Detection. https://www.kaggle.com/c/diabetic-retinopathy-detection, (2015)


Decencière Decencière, E., Zhang, X., Cazuguel, G., Lay, B., Cochener, B., Trone, C., Gain, P., Ordonez, R., Massin, P., Erginay, A., Charton, B.: Feedback on a publicly distributed image database: the Messidor database. Image Analysis & Stereology 33(3), 231–234 (2014)


Pratta Pratta, H., Coenenb, F., Broadbentc, D.-M., Hardinga, S.-P., Zheng, Y.: Convolutional neural networks for diabetic retinopathy. In: Procedia Computer Science, pp. 200–205. (2016)


kori Kori, A., Chennamsetty, S.-S., Alex, V.: Ensemble of Convolutional Neural Networks for Automatic Grading of Diabetic Retinopathy and Macular Edema. In: arXiv preprint arXiv:1809.04228, (2018)


swang Wang, S., Yin, Y., Cao, G., Wei, B., Zheng, Y., Yang, G.: Hierarchical retinal blood vessel segmentation based on feature and ensemble learning. In: Neurocomputing, 149, 708–717 (2015)


antal Antal, B., Hajdu, A.: An ensemble-based system for microaneurysm detection and diabetic retinopathy grading. In: IEEE transactions on biomedical engineering, 59(6), p. 1720. (2012)


kaiming He, K., Zhang, X., Ren, S., Sun, J.: Identity mappings in deep residual networks. In. European Conference on Computer Vision (ECCV), pp. 630–645, Springer, Cham (2016)


Gao1 Huang, G., Liu, Z., Van Der Maaten, L., Weinberger, K.-Q.: Densely connected convolutional networks.  In: Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR), vol. 1, p. 3. (2017)


Torre de la Torre, J., Valls, A., Puig, D.: A Deep Learning Interpretable Classifier for Diabetic Retinopathy Disease Grading. In: arXiv preprint arXiv:1712.08107, (2017)


Wang1 Wang, Z., Yang, J.: Diabetic Retinopathy Detection via Deep Convolutional Networks for Discriminative Localization and Visual Explanation. In: arXiv preprint arXiv:1703.10757, (2017)


Yang1 Yang, Y., Li, T., Li, W., Wu, H., Fan, W., Zhang, W.: Lesion detection and grading of diabetic retinopathy via two-stages deep convolutional neural networks. In: International Conference on Medical Image Computing and Computer-Assisted Intervention, pp. 533-540. Springer, Cham (2017)


Krizhevsky Krizhevsky, A., Sutskever, I., Hinton, G.E.: Imagenet classification with deep convolutional neural networks. In: Advances in neural information processing systems, pp. 1097–1105 (2012)


Szegedy Szegedy, C., Ioffe, S., Vanhoucke, V., Alemi, A.A.: Inception-v4, inception-resnet and the impact of residual connections on learning. In: AAAI, vol. 4, p. 12. (2017)


Butterworth Butterworth, D.T., Mukherjee, S., Sharma, M., Ensemble Learning for Detection of Diabetic Retinopathy


Bravo1 Bravo, M.-A., Arbeláez, P.A.: Automatic diabetic retinopathy classification. In: 13th International Conference on Medical Information Processing and Analysis,  vol. 10572, p. 105721E (2017).


Simonyan Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale image recognition. In: ICLR, (2015)


Maas Maas, A.L., Hannun, A.Y. and Ng, A.Y.: Rectifier nonlinearities improve neural network acoustic models. In: Proceedings of ICML,  vol. 30, p. 3. (2013)


Graham Graham, B.: Kaggle diabetic retinopathy detection competition report. (2015)

Antony Antony, M., Brüggemann, S.:Kaggle Diabetic Retinopathy Detection Team o_O solution. (2015)

Kingma Kingma, D.P., Ba, J.: Adam: A method for stochastic optimization. International Conference for Learning Representations (ICLR) (2015)


