Detection of Abnormalities of Retina Due to Diabetic Retinopathy and Age Related Macular Degeneration Using SVM
Amrita Roy Chowdhury1, *, Sreeparna Banerjee1, 2
1Computer Science and Engineering Department, West Bengal University of Technology, Salt Lake, India
2Natural Science Department, West Bengal University of Technology, Salt Lake, India
To cite this article:
Amrita Roy Chowdhury, Sreeparna Banerjee. Detection of Abnormalities of Retina Due to Diabetic Retinopathy and Age Related Macular Degeneration Using SVM. Science Journal of Circuits, Systems and Signal Processing.Vol.5, No. 1, 2016, pp. 1-7. doi: 10.11648/j.cssp.20160501.11
Received: February 25, 2016; Accepted: May 16, 2016; Published: May 19, 2016
Abstract: Diabetic Retinopathy and Age related Macular Degeneration are two major retinal diseases which are creating serious concern in today’s age. Detection of preliminary signs of abnormalities due to these diseases is hard and time consuming for the ophthalmologists as the abnormal objects are very fine and small in size. As early detection of abnormalities can prevent permanent vision loss, a semi automated system is developed to detect the affected portion of retina and is tested with some retinal images. A training image set is used to train a support vector machine classifier. A test image set is given to the classifier for automatic detection of disease type. Efficiency of the classifier is tested comparing the actual value and predicted value by the classifier.
Keywords: Hard Exudates (HE), Soft Exudates (SE), Micro Aneurysms (MA), Hemorrhages (HAM), Fuzzy C Means (FCM)
Retinal abnormalities have become very common for elderly as well as young people. Diabetic retinopathy (DR) and Age related Macular Degeneration (AMD) are two leading causes of retinal abnormality. Early detection and treatment can prevent permanent damage to the retina. The early stage of diabetic retinopathy does not show very clear symptoms. Only few red spots known as micro aneurysms (MA) are seen. These spots have low visibility. But as the disease progresses retinal blood vessels leak some lipid called hard exudates (HE) which are bright yellow in color. In addition, soft exudates (SE) which are nearly white in color due to nerve fibre infacrctions, also occur. These bright lesions are the signs of moderate non-proliferative diabetic retinopathy. In a later next stage, blood vessels burst causing hemorrhages (HAM) in retina. In proliferative stage of DR, all abnormalities like soft exudates, hemorrhages appear together resulting low vision and blindness in worst case. In AMD, the macula, where the cone cells are concentrated, gets deformed. This results in blurred vision. Dry AMD and wet AMD are two varieties of this disease. In dry AMD, micro infracts generated by leaking of blood vessel covers macula. In wet AMD, bleeding from blood vessel causes blood clots in the macular region which is more severe than the other variety. Aging is the main cause of AMD whereas suffering from diabetes for a long time introduces DR. The symptoms are very close for DR and AMD as they appear in retina. Patients’ post-prandial blood glucose (PPBG) helps to separate DR and AMD. If patients’ PPBG is more than 180 and he is suffering from diabetes, then DR is more likely to come; otherwise AMD. In this research work, an algorithm is developed to detect the abnormalities of retina automatically. In , an automated system is developed for detecting retinal abnormality and then the Naïve Bayes classifier is used for training and testing purposes. Sensitivity, specificity and accuracy are calculated by this classifier. In , a machine learning algorithm is developed depending on the probability of each pixel being bright lesion. Large training set and testing set are used and the results were verified by ophthalmologists. In , several features of preprocessed image like intensity of pixel, hue of pixel, standard deviation of pixel are extracted. All the features are used for Naïve Bayes classifier and SVM classifier. In , detection of abnormalities are performed using decision tree. Fuzzy C means clustering is done for segmentation purposes. After enhancing the contrast of retinal input image, Fuzzy C means clustering is done in  where number of clusters is specified as 8. After that, a marker image and mask image is used tto enhance the quality of the output image. In , random forest classifier is used for machine learning. Before that Fuzzy C means and K means clustering is done to detect the abnormality. Features like entropy, homogeneity are used for the classifier. In , the degree of abnormality of retina is classified by SVM. The features like texture, micro aneurysm area are used for the classifier. Localization of Optic Disc, its elimination and yellow exudates detection is done using SVM classifier in . Red lesions like micro aneurysms and hemorrhages are detected in . Gaussian shaped curve is used for identifying red lesions. Color based segmentation is done in  after converting the input image into L*a*b* color space. In , Classification is done using K nearest neighbor approach. Conversion of RGB images into CIE color space is done in . After segmentation using K means, features like contrast, correlation, cluster shade are calculated for classification using SVM. The book on Data mining  gives a concrete idea about Weka tool where several machine learning systems are available. In our research work, the developed algorithm is implemented using Matlab. Some retinal images with abnormalities are collected and tested. Several salient features like color, shape, frequency, area, position with respect to macula are considered. A support vector machine (SVM) classifier in Weka is used for training and testing purpose. Twenty five training images and thirty six test images are used for this purpose. Sensitivity, specificity and accuracy are calculated.
2. Proposed Methodology
The proposed algorithm is presented below for finding the abnormal portion of retina. This algorithm is implemented using Matlab.
Step 1: Diseased retinal image in RGB is taken as input.
Step 2: The coordinate value of the brightest point and darkest point is found.
Step 3: The green component is extracted from the RGB image.
Step 4: Quality enhancement is done for prominence.
Step 5: Fuzzy C Means clustering algorithm is done with cluster number three for generating three different groups.
Step 6: Clusters corresponding to darkest portion and brightest portions are extracted separately.
Step 7: Hard exudates and soft exudates are extracted along with optic disk
Step 8: After eliminating optic disk, hard exudates and soft exudates are identified.
Step 9: Hemorrhages and micro aneurysms are extracted with blood vessel tree.
Step 10: After elimination of blood vessel tree, hemorrhages and micro aneurysms are extracted.
Step 11: Meta data like patients' post-prandial blood glucose (PPBG), appearance of the abnormal objects with respect to macula, the frequency, color, area and shape of the abnormal objects are also used to decide the type of abnormality of retina.
The proposed methodology is implemented using Matlab and is tested with several images. One input image and the output of each step of the process is given below:
|Step 1: Input image||Step 2: Green component|
|Step 3: Quality enhanced image||Step 4: Clustering using Fuzzy C means|
|Step 5: Extraction of region of interest||Step 6: Blood vessel removal|
After the final output is obtained, the feature values are calculated. For this particular output image, we obtain the following feature values:
Color of detected portion: dark red (found from main input)
Shape of detected portion: not defined
Area of detected portion: 318 in terms of pixel
Number of detected objects: 4
Position with respect to macula: Far
2.2. Discussion on Proposed Algorithm
Any RGB image is composed of three different matrices each for red, green and blue intensity of each pixel of the image. As it is difficult to work with three different matrices simultaneously, the green component is extracted from RGB image. This is done because green component holds significant information about abnormalities compared to red or blue components. Due to low intensity while capturing the image of retina, some portion may be dark or blurred. So quality enhancement is done for making different part of retina clear. Then Fuzzy C means (FCM) clustering is done. Clustering helps us to separate a large amount of data into different groups. Here depending on the color of a pixel, three different groups are formed. Any retinal image, either normal or diseased, consists of three different colors. Optic Disc (OD) is bright yellow. If exudates are present due to diabetic retinopathy or age related macular degeneration, then these are also bright yellow or whitish. Another color is dark red as blood vessel tree is of this color. Hemorrhages, micro aneurysms and wet AMD are dark red as these are formed due to blood clots. The third color is reddish as the rest part of retina is yellowish red. For this reason number of cluster is mentioned as three. After FCM, three different groups of pixels are formed and they are assigned three different colors. When we are interested on bright lesions, we extract the cluster formed corresponding to bright area of retina. It contains OD along with HE, SE or dry AMD. In this step, the coordinate point of any pixel lying inside the OD is required. This point helps us to identify OD and extraction of the yellow pixel cluster. This point can be detected by finding the brightest point from the input RGB image as the middle of OD is the brightest portion in retina. When we are interested in extracting the hemorrhages, micro aneurysms or wet AMD, we extract the cluster corresponding to darkest section which includes blood vessel tree. In this case, we calculate the darkest point from the input image. With the help of this point we extract all dark objects. Then blood vessel tree is removed by applying morphological operations like erosion. After selection of abnormal objects, their color, frequency, shape and area in terms of pixel and position with respect to macula is detected. Along with that the patients’ PPBG is checked. After collecting the mentioned information, a training set and a test set is generated.
2.3. Training of SVM Classifier in Weka
Sixty five retinal images including normal retina, retina affected by DR and AMD are considered as training set. After implementing the above mentioned algorithm in Matlab, these images are considered as input and the corresponding output images are examined. The properties mentioned above are calculated along with disease type. In this case, information about the disease should be given to the knowledge base. These data are collected together and given to the classifier for learning purpose.
2.4. Testing Using SVM Classifier in Weka
After training the classifier, a test set is generated where the type of the disease is known but not specified to the classifier. Nearly thirty six images are considered for this purpose. The disease type was automatically detected by the classifier with the help of stored knowledge.
2.5. Flow Chart
3.1. Results of Algorithm Implementation
Several images are considered as input and the proposed method is applied. Figure 3 to Figure 14 are some input retinal images with different abnormalities and their corresponding final output. After detection of abnormalities in retinal images, features like number of objects, area are extracted.
3.2. Table Related to SVM Classifier
After detection of abnormalities, several features are extracted for training and testing purposes. Color feature is selected because the abnormal objects in retina can be first identified by its color. For Diabetic Retinopathy (DR) the color of soft exudates (SE) is whitish in nature. Hard exudates (HE) are yellow in color. Micro aneurysms are light red and hemorrhages are dark red. For Age related Macular Degeneration (AMD), dry AMD are yellow and wet AMD are dark red. Frequency is the number of abnormal objects present in retina. This is also a very useful feature as SE are few in number whereas HE are generally formed in huge numbers. MA are many but hemorrhages are few. Similarly, in dry AMD, several drusen are formed but in wet AMD, some blood clots are introduced. The next selected feature is shape. This feature is selected because it varies with disease type. Shape of SE, micro aneurysms and dry AMD is nearly circular. But for hemorrhages, HE, wet AMD, no such clear shape can be viewed. Area, the next feature, is calculated in terms of pixels. Generally, HE, HAM in DR and wet AMD is scattered in a large area. But SE, MA in DR and dry AMD consumes less space. The feature position means presence of the abnormalities near to or far from the macula. If the abnormalities covers the macula, then it is more probable that it is AMD; otherwise DR according to the patients’ PPBG. Here some of the information is tabulated:
|Fig7||HAM||Dark red||4||Not defined||318||Far|
|Fig11||Wet AMD||Dark red||5||Not defined||298||Near|
3.3. Accuracy Calculation
To analyze the performance of the classifier, sensitivity, specificity, accuracy is calculated. Below we define these terms:
True Positive (TP): abnormal retina correctly classified as diseased
True Negative (TN): healthy retina correctly classified as healthy
False Positive (FP): healthy retina but classified as diseased
False Negative (FN): abnormal retina but classified as healthy
If the value of sensitivity and specificity is high, then accuracy of the procedure is also higher. Here, with the help of SVM classifier in Weka, we have testes several retinal images with abnormality after training the classifier.
|Classes||Number of training image||Number of test image||Number of correct classification||Classification (%)|
3.4. Confusion Matrix
A confusion matrix is used to evaluate the performance of a classifier. In Weka, confusion matrix is generated for each test set. Here we specify the number of correct and incorrect classification by SVM classifier in a suitable format which is easy to understand.
|Actual HE||Diseased retina||Normal retina|
|Actual SE||Diseased retina||Normal retina|
|Actual MA||Diseased retina||Normal retina|
|Actual HAM||Diseased retina||Normal retina|
|Predicted dry AMD|
|Actual dry AMD||Diseased retina||Normal retina|
|Predicted wet AMD|
|Actual wet AMD||Diseased retina||Normal retina|
3.5. Bar Chart
In this section, a bar chart is represented. This chart shows the diseases along X axis and along Y axis, number of images tested for each disease is plotted. The blue bar shows proper diagnosis by ophthalmologists and the red bar represents diagnosis of disease by SVM classifier.
In this research work, images used are taken from retinal image databases freely available online. Number of images used in the implementation of proposed algorithm are 101. In future a large database collected from eye clinics can be used to increase accuracy of the classifier. Real images of diseased retina can increase the reliability of the system. Quality enhancement of the images is done by adjusting the contrast of the image. Filtering techniques can be introduced in this preprocessing step. In case of blood vessel removal, morphological operation like erosion is used. This removes some micro aneurysms which are very tiny in size. In Optic Disc elimination, mask image is used. If some exudates are closer to Optic Disc, then those are also removed with the mask. A scope of modification is present in this context.
The authors would like to acknowledge a grant from TEQIP and Department of Biotechnology, Government of India (No.BT/PR4256/BID/7/393/2012 dated 02.08.2012) for supporting this research.