alexa Diagnosis of Diabetic Retinopathy using Machine Learning | Open Access Journals
ISSN : 2311-3278
Journal of Research and Development
Make the best use of Scientific Research and information from our 700+ peer reviewed, Open Access Journals that operates with the help of 50,000+ Editorial Board Members and esteemed reviewers and 1000+ Scientific associations in Medical, Clinical, Pharmaceutical, Engineering, Technology and Management Fields.
Meet Inspiring Speakers and Experts at our 3000+ Global Conferenceseries Events with over 600+ Conferences, 1200+ Symposiums and 1200+ Workshops on
Medical, Pharma, Engineering, Science, Technology and Business

Diagnosis of Diabetic Retinopathy using Machine Learning

Swati Gupta* and Karandikar AM

Department of Computer Science and Engineering, Shri Ramdeobaba College Of Engineering and Management, Nagpur, India

*Corresponding Author:
Swati Gupta
Department of Computer Science and Engineering
Shri Ramdeobaba College Of Engineering and Management
Nagpur, India
Tel: +91-8888602003
E-mail: [email protected]

Received Date: June 07, 2015; Accepted Date: July 24, 2015; Published Date: August 31, 2015

Citation: Gupta S, Karandikar AM (2015) Diagnosis of Diabetic Retinopathy using Machine Learning. J Res Development 3: 127. doi: 10.4172/2311-3278.1000127

Copyright: © 2015 Gupta S, et al. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.

Visit for more related articles at Journal of Research and Development


Diabetic retinopathy is the most common diabetic eye disease and a leading cause of blindness. Regular screening for early disease detection has been a highly labor and resource intensive task. Hence automatic detection of these diseases through computational techniques would be a great remedy. There are many features present in retina like exudates and micro aneurysm feature. The presence of micro aneurysms (MAs) is usually an early sign of diabetic retinopathy and their automatic detection from color retinal images somewhat tough job, so for that we are using green Chanel images. The objective of project is to detect retinal micro-aneurysms and exudates for automatic screening of DR using classifier. To develop an automated DR screening system detection of dark lesions and bright lesions in digital funds photographs is needed. To detect retinal micro- aneurysms and exudates retinal funds images are taken from Messidor dataset. After pre-processing, morphological operations are performed to find the feature and then features are get extracted such as GLCM and Splat for classification. In this we are achieve the sensitivity and specificity of 87% and 100% respectively with accuracy of 86%.


Exudates; Micro aneurysm; Green channel; Bright lesions; Red lesion


Diabetic retinopathy (DR) is a serious eye disease that occurs due to diabetes mellitus and it has grown as the most common cause of blindness in the present world. Based on latest reports by 2030 there is an epidemic rise of 4.4% in the global prevalence of diabetes [1]. Patient’s sight can be affected by diabetes which causes cataracts, glaucoma, and most importantly, damage to blood vessels inside the eye, a condition known as “diabetic retinopathy”. Effective treatments for DR are available though it requires early diagnosis and the continuous monitoring of diabetic patients. Diagnosis of DR is performed by the evaluation of retinal (fundus) images. Manual grading of these images to determine the severity of DR is rather slow and resource demanding [2]. It occurs when diabetes damages the tiny blood vessels inside the retina, the light sensitive tissue at the back of the eye. This tiny blood vessel will leak blood and fluid on the retina forms features such as micro-aneurysms, hemorrhages, hard exudates, cotton wool spots or venous loops [1].

Diabetic retinopathy can be broadly classified as non-proliferative diabetic retinopathy (NPDR) (Figure 1b) and proliferative diabetic retinopathy (PDR). Depending on the presence of features on the retina, which is said above, the stages of DR can be identified. A normal retina of the eye does not have any of the above said features (Table 1) [3-7]. In the NPDR stage, the disease can advance from mild, moderate to severe stage with various levels of features said above except less growth of new blood vessels. PDR is the advanced stage where the fluids sent by the retina for nourishment trigger the growth of new blood vessels. They grow along the retina and over the surface of the clear, vitreous gel that fills the inside of the eye. If they leak blood, severe vision loss and even blindness can result [1].


Figure 1: The fundus images of a) normal b) NPDR c) PDR.

1 MA<5 Normal
2 5<MA<15 Mild
3 MA>15 Serve

Table 1: Show the diabetic retinopathy severity or grade as normal, mild and serve.

Therefore regular screening of diabetic patients’ retina is very essential and automated or computer-assisted analysis of diabetic patients’ retina can help eye care specialist to screen larger populations of patients. Since 1982, the quantification of diabetic retinopathy and detection of features such as exudates and blood vessels (Figure 2) on fundus images were studied [8-12]. A computer based algorithms to detect the individual features of the fundus image were developed. In all these work, image processing techniques such as image preprocessing then segmentation after that 2D matched filters and image thresholding techniques were widely used for more clarify the image. An automatic system for the detection of symptoms pertaining to the abnormality is proposed [13-16]. Global and local thresholding values were used to segment exudates bright lesions from the red-free images. All these methods cannot be used to develop the features for automatic detection system as it is difficult to set a constant threshold value. The system proposed can detect and quantify only micro-aneurysms which can be useful in detecting only mild stages. Methods proposed in this paper use morphological image processing techniques. This method also cannot work for a constant threshold value when converted binary image. A prototype on automated diagnosis and understanding of retinal images was presented. The methods proposed in all the researches discussed above are not reliable and robust as it does not provide any objective measurement on the features. As all the above discussed methods are mainly useful in analysis of the specific features on the retina.


Figure 2: Diabetes Features In Defected Human Eye.

We are proposing a system for automated classification of three types first one is normal then second one is NPDR (non proliferative diabetic retinopathy) and third is PDR (proliferative diabetic retinopathy) retinal images by automatically detecting the blood vessels hard exudates and GLCM features. The proposed system is shown in block diagram which is shown in Figure 3. The target of it, to measurement such as blood vessels and remove it, calculates exudates area and contrast is computed from the processed retinal images. These objective measurements are finally fed to an SVM classifier. Materials and methods section explains the methods in detail and results are tabulated and explained in Results section. Discussion and conclusions are presented in Discussion and Conclusions sections respectively.


Figure 3: Proposed systems for detection and classification of different stages of Diabetic Retinopathy.

Diabetic retinopathy

According the presence and extent of the features such as hard exudates, cotton wools spots micro aneurysms or hemorrhages due to leakage of fluid and blood from the blood vessels which are shown in Figure 1. DR can be classified into normal, NPDR and PDR. Diabetic retinopathy is of two type’s namely non proliferative i.e., NRDR and proliferative type i.e., PDR. Non proliferative is the early stage of the disease characterized by the presence of micro aneurysms. As the disease progresses the retina is deprived of oxygen and new blood vessels are formed leads to clouding vision. There are also three categories that are mild NPDR, moderate NPDR and severe NPDR.

In mild NPDR, micro aneurysms are small areas of balloon-like swellings in the retina's tiny blood vessels. As the disease growths, some blood vessels that nourish the retina are blocked and this stage is called moderate NPDR. The next stage is severe NPDR during which many more blood vessels are blocked.

Materials and Methods

In this paper, the evaluation of the automated diagnosis system of diabetic retinopathy has been performed by using a set of 94 images which were captured by retinal fundus camera and the captured images are stored in a JPG image format files with the size of 1500 × 1152 pixels at 24 bits pixel length.

In given proposed methodology in Figure 2 shows that image is get input from retinal fundus data set then pre-processing techniques are applied on retinal image. After that morphological operations are performed to identify exudates and micro-aneurysms features. Finally using multiclass SVM and KNN classifier for giving severity or grade of abnormality. For given methodology the input images are taken from MESSIDOR, Diabeticret DB1.


The three-stage algorithm to automatically detect and grade the severity of DR using ophthalmic fundus images is shown in Figure 2. In preprocessing stage, the image (Figure 4) is get rectified some problems such as blurring, non-clarity and size of image. In this stage resizing of the image is done and then color space conversion problem, image restoration and finally enhance the image. In color space conversion the input color fundus image (Figure 4) is converted into HSI (Figure 5)i.e. hue saturation and intensity model. In HSI the intensity component, color model space is decoupled from color images. The preprocessing module proceeds by histogram equalization and contrast enhancement and followed by scaling all pixel intensities in the range (0, 1) (Figures 6 and 7).


Figure 4: Original image.


Figure 5: HIS model image.


Figure 6: Pre-processed Image.


Figure 7: Histogram of pre-processed Image.

Next, is median filtered to obtain the enhanced images. These three detection stages are applied for DR severity detection per fundus image. In this the transformation equations used in the conversion of RGB to HSI are



Where r=red, g=green, b=blue and the saturation of component (S) is given by formula


Finally intensity (I) component is given by:


The converted images are then filtered using hybrid median filter. This filter is used to remove noise like pepper and salt occur during image acquisition. Specialty of hybrid median filter is to provide better edge corner prevention by smoothing the quality of image and reduced the noise appears due to thickness and thinness of boundaries of features. After filtering we are using CLACHE technique, which means the contrast limited adaptive histogram equalization for contrast enhancement and it improves the quality of images. The Figures 5 and 6 show the histogram equalization and image after preprocessing.

Features extraction

In candidate extraction like Morphological operations such as erosion, dilation, closing, and opening are performed for finding micro-aneurysms and exudates features. Then invert image method is applied to for inverting the image. Then holes are filled in the image.

Optical disc elimination: The optical disc is brightest part of the normal eye in fundus images and approximately it is oval or elliptical in shape. In colored fundus images the OD appears as a bright yellowish or white region in fundus images. Exudates have high and similar intensity values of optic disc. So it is necessary to eliminate the optic disc from the retinal image. This brighter optic disc should be masked and removed using region properties and area finding. After preprocessing edge detection algorithm is applied for detection of optical disc and blood vessels. Canny edge detection is used for counter detection [3]. Canny edge detection algorithm enhances blurred edges by preserving all local maxima the gradient, through this it detects optimally the boundaries of features.

The logical black and white function is used to create and then invert the image to create mask image as shown in Figure 6. In this the mask image is created and then mask image is subtracted from the edge detected image.

Blood vessels extraction and removal: For the detection of microaneurysms and exudates remove blood vessel and optical disc is must from retinal image because it have similar concentration level like micro-aneurysms and exudates respectively. Dilation operation on the intensity image helps to remove high level of contrasts vessels of blood. After that we are using the structuring element to fill the small holes in images by using dilation operation. Structure elements (SE) have numbers of shapes like diamond, disc, round etc., but in our project we are using flat disc shaped structure which is used to remove the optical disc and blood vessels. If SE start from bright pixel then there will be no change and goes to the next pixel. On otherwise SE start from black pixels then SE covered whole image through dilation operation which adds pixels to pixels and create boundaries of objects in fundus image. Whereas erosion operation is used to remove pixels on object boundaries. Then the dilated image obeys the following equation.


Disk Shaped SE (B) on A, Erosion operator is used to remove completely blood vessels from images (Figure 8) without affecting other portions which is calculated by following formula:



Figure 8: Blood Vessels Removed Image.

Detection of exudates and micro-aneurysms: After removing blood vessels and optical disc from image, detect the exudates features. Exudates are a bright lesion of retina image (Figure 9). This feature is detected by using morphological closing operation and this closing operation applied on eroded fundus image. For the detection of exudates features, closing dilation is followed by erosion operator are used.



Figure 9: Exudates Features.

Micro-aneurysms are other features of DR. For micro-aneurysms detection opening morphological operation is performed in which erosion is followed by dilation whereas the micro-aneurysms are appearing as red spot which get swell in the retina. Invert image method is used and then morphological opening operation is performed for detection of micro-aneurysms. So, we can easily count the microaneurysms values (Figure 10).


Figure 10: Binary image.

Classification: After detecting exudates and micro-aneurysms (Figure 11) in color image the features get extracted from fundus image. All these features are calculated and applied to SVM and KNN classifier. SVM classifier gives better results than KNN classifier. In this paper we analyze a set of 17 features that consists of most of the features from GLCM (gray level co-occurrence matrix) (Figure 12) features and along with additional structural features that are obtained using the “regionpropsl” command in MATLAB. The features that we are using like energy, contrast, entropy, homogeneity, area, major axis, major axis length, convex image, etc. In this study we selected the 11 features out of 17 features that were calculating the probably of occurrence generated by ANOVA (analysis of variance between group) test. The ANOVA test uses variances to decide whether the mean are different.


Figure 11: Gray level transformed image.


Figure 12: Micro-aneurysms Detection Image.

These features are selected for reducing noise and enhancing the result of classifier accuracy. The result is shown in Figure 12. If the MA >15 then it treated as severe and if total 5<MA ≤ 15 so it treated as moderate. If the value is less than 5 then it is normal image (Figure 13).


Figure 13: (a) original image (b) Severe NPDR.

SVM classifier: The SVM approach basically used for binary classification problems. In this we are using multi-class pattern recognition problem. Basically there are two types to solve multi-class problems by using binary SVM classifiers: The first one is "one-againstone" in this method for each possible pair of classification a binary classifier is calculated. Other approach is the "one-against-rest" in this method N different classifiers are constructed, one for each class. In this paper we built a two-class classifier over a feature vector φ(x, y′) derived from the pair consisting of the input features and the class of the data. At test time the classifier chooses the class (Figure 14).



Figure 14: Hyper plane representation for multi-classification.

The margin during training is the gap between this value for the correct class and for the nearest other class. In the SVM world, such work comes under the label of structural SVMs (Figure 15).


Figure 15: SVM Classifier: 70% Training ; 30% Testing.

KNN classifier: KNN classifier- The k-nearest-neighbor classifier is normally based on the Euclidean distance distance between a test sample and the specified training samples (Figure 16). The Euclidean distance between sample xi and xl(l=1,2,…,n) is defined as


Figure 16: KNN Classifier: 70% Training; 30% Testing.

Voronoi cell encapsulates all neighboring points that are nearest to each sample and is defined as above. Where Ri is the Voronoi cell for sample xi and x represents all possible points within Voronoi cell Ri.


The final goal of our DR detection system is to classify the fundus images that are free from retinopathy lesions as normal, and to classify the abnormal images according to its severity as non PDR and PDR. Using the data obtained from the images their data are divided into two portions that is training and testing. In this we are using 70-30 ratio during the training and testing of classifiers. In our project we are doing comparative study with classifier SVM and KNN. SVM classifier gives better result than KNN which is shown in Tables 2 and 3.

Classes number No. of data for training Data for testing Number of accurate data classification Percentage accuracy
Normal 19 11 9 81.8181
Non PDR 32 8 7 87.5
PDR 22 8 7 87.5
Total 73 27 23 85.6060

Table 2: Results of support vector machine classifier.

Classes number No. of data for training Data for testing Number of accurate data classification Percentage accuracy
Normal 21 9 5 55.55
Non PDR 34 14 10 71.14
PDR 13 6 1 16.67
Total 68 29 16 55.17

Table 3: Results of K-nearest neighborhood.

Table 4 gives the information about training testing and accurately classified data and its percentage of accuracy is given in SVM classifier achieves 85.60% accuracy and whereas KNN classifier achieves 55.17% accuracy. Table 5 as shown is the breakdown of the images according to the actual class and the classes predicted by SVM and KNN for training set.

True Predicated Normal Non PDR PDR
Normal 9 0 0
Non PDR 0 1 4
PDR 0 5 1

Table 4: Breakdown results of support vector machine classifier.

True Predicated Normal Non PDR PDR
Normal 9 0 0
Non PDR 0 1 4
PDR 0 5 1

Table 5: Breakdown results of K nearest neighbor.

Here from the calculation of Sensitivity and Specificity for the SVM and K-NN classifier are good for SVM sensitivity of 91 percent and specificity of 100 percent and a classification accuracy of 86.67 percent.

For KNN Classifier sensitivity of only 32.80 percent and specificity of 100 percent and a classification accuracy of 55 percent.


The Graphic User Interface has been successfully developed. It is capable to input a test image to be processed and extract texture features of the image and display these values and the results of the classification of both SVM and KNN classifiers. This project, a reliable fundus image analysis system is developed to give an ophthalmologist the most comprehensive view of the retina state to diagnose diabetic retinopathy. This system extracts the fundal features such as retinal exudates and micro-aneurysms even for a low quality color fundus image. the fundus image analysis system detects and grades the severity of diabetic retinopathy. Hence this system can also function as an automatic tool for the mass screening of diabetic retinopathy. A morphological operation is done to detect dark lesions in digital fundus images. This method combines morphological based dark lesion detection with inverting and rage of pixels. To evaluate the performance of the proposed the fundus image analysis system detected diabetic retinopathy with a high sensitivity and specificity of 87% and 100% respectively with accuracy of 86% using SVM classifier.


Authors would like to thank them for providing the data to do research on the area of detection of exudates, micro-aneurysms and for Diabetic Retinopathy.


Select your language of interest to view the total content in your interested language
Post your comment

Share This Article

Recommended Journals

Recommended Conferences

Article Usage

  • Total views: 12784
  • [From(publication date):
    December-2015 - Oct 17, 2017]
  • Breakdown by view type
  • HTML page views : 8712
  • PDF downloads :4072

Post your comment

captcha   Reload  Can't read the image? click here to refresh

Peer Reviewed Journals
Make the best use of Scientific Research and information from our 700 + peer reviewed, Open Access Journals
International Conferences 2017-18
Meet Inspiring Speakers and Experts at our 3000+ Global Annual Meetings

Contact Us

Agri, Food, Aqua and Veterinary Science Journals

Dr. Krish

[email protected]

1-702-714-7001 Extn: 9040

Clinical and Biochemistry Journals

Datta A

[email protected]

1-702-714-7001Extn: 9037

Business & Management Journals


[email protected]

1-702-714-7001Extn: 9042

Chemical Engineering and Chemistry Journals

Gabriel Shaw

[email protected]

1-702-714-7001 Extn: 9040

Earth & Environmental Sciences

Katie Wilson

[email protected]

1-702-714-7001Extn: 9042

Engineering Journals

James Franklin

[email protected]

1-702-714-7001Extn: 9042

General Science and Health care Journals

Andrea Jason

[email protected]

1-702-714-7001Extn: 9043

Genetics and Molecular Biology Journals

Anna Melissa

[email protected]

1-702-714-7001 Extn: 9006

Immunology & Microbiology Journals

David Gorantl

[email protected]

1-702-714-7001Extn: 9014

Informatics Journals

Stephanie Skinner

[email protected]

1-702-714-7001Extn: 9039

Material Sciences Journals

Rachle Green

[email protected]

1-702-714-7001Extn: 9039

Mathematics and Physics Journals

Jim Willison

[email protected]

1-702-714-7001 Extn: 9042

Medical Journals

Nimmi Anna

[email protected]

1-702-714-7001 Extn: 9038

Neuroscience & Psychology Journals

Nathan T

[email protected]

1-702-714-7001Extn: 9041

Pharmaceutical Sciences Journals

John Behannon

[email protected]

1-702-714-7001Extn: 9007

Social & Political Science Journals

Steve Harry

[email protected]

1-702-714-7001 Extn: 9042

© 2008-2017 OMICS International - Open Access Publisher. Best viewed in Mozilla Firefox | Google Chrome | Above IE 7.0 version