Science Journal of Circuits, Systems and Signal Processing
Volume 5, Issue 1, February 2016, Pages: 1-7

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

Email address:

(A. R. Chowdhury)
(S. Banerjee)

*Corresponding author

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)


1. Introduction

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 [1], 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 [2], 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 [3], 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 [4], 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 [5] 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 [6], 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 [7], 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 [8]. Red lesions like micro aneurysms and hemorrhages are detected in [9]. Gaussian shaped curve is used for identifying red lesions. Color based segmentation is done in [10] after converting the input image into L*a*b* color space. In [10], Classification is done using K nearest neighbor approach. Conversion of RGB images into CIE color space is done in [11]. After segmentation using K means, features like contrast, correlation, cluster shade are calculated for classification using SVM. The book on Data mining [12] 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

2.1. Algorithm

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

Final output

Figure 1. Steps of applying the algorithm.

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

Figure 2. Flow chart of the proposed method.

3. Results

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.

Figure 3. Image of Soft Exudates.

Figure 4. SE detected.

Figure 5. Image of Hard Exudates.

Figure 6. HE detected.

Figure 7. Image of Hemorrhage.

Figure 8. Haemorrhage detected.

Figure 9. Image of dry AMD.

Figure 10. Dry AMD detected.

Figure 11. Image of wet AMD.

Figure 12. WetAMD detected.

Figure 13. Image of MA.

Figure 14. MA detected.

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:

Table 1. Feature values of retinal images.

Image Disease Color Frequency Shape Area Position
Fig3 SE White 23 circular 180 Far
Fig5 HE Yellow 89 Not defined 230 Far
Fig7 HAM Dark red 4 Not defined 318 Far
Fig9 Dry AMD Yellow 41 Circular 122 Near
Fig11 Wet AMD Dark red 5 Not defined 298 Near
Fig13 MA Light red 37 circular 69 Far

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

Sensitivity=(TP)/(TP+FN)                       (1)

Specificity=(TN)/(TN+FP)                      (2)

Accuracy=(TP+TN)/(TP+TN+FP+FN)            (3)

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.

Table 2. Result of SVM classifier.

Classes Number of training image Number of test image Number of correct classification Classification (%)
HE 35 9 5 55.56
SE 10 8 7 87.5
MA 4 3 2 66.67
HAM 3 5 5 100
Dry AMD 3 3 3 100
Wet AMD 5 4 3 75

Table 3. Result of Accuracy by SVM classifier.

TN TP FN FP Sensitivity Specificity Accuracy
5 25 7 8 78.125% 38.46% 66.67%

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.

Table 4. Confusion Matrices

Confusion matrix for HE:

  Predicted HE
Actual HE   Diseased retina Normal retina
Diseased retina 5 4
Normal retina 2 2

Confusion matrix for SE:

  Predicted SE
Actual SE   Diseased retina Normal retina
Diseased retina 7 1
Normal retina 2 0

Confusion matrix for MA:

  Predicted MA
Actual MA   Diseased retina Normal retina
Diseased retina 2 1
Normal retina 0 1

Confusion matrix for HAM:

  Predicted HAM
Actual HAM   Diseased retina Normal retina
Diseased retina 5 0
Normal retina 1 1

Confusion matrix for dry AMD:

  Predicted dry AMD
Actual dry AMD   Diseased retina Normal retina
Diseased retina 3 0
Normal retina 2 0

Confusion matrix for wet AMD:

  Predicted wet AMD
Actual wet AMD   Diseased retina Normal retina
Diseased retina 3 1
Normal retina 1 1

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.

Figure 15. Bar chart (disease vs number of images).

4. Conclusion

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.

Acknowledgements

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.


References

  1. A. Roy Chowdhury, R. Saha, S. Banerjee, Detection of different types of Diabetic Retinopathy and Age related Macular Degeneration, Computer Science and Application (CSA) 2015 Proceedings, pp: 71-76.
  2. M. Niemeijer, B. V. Ginneken, S. R. Russell, M. S. A. Suttorp-Schulten, and M. D. Abramoff, Automated Detection and Differentiation of Drusen, Exudates, and Cotton-Wool Spots in Digital Color Fundus Photographs for Diabetic Retinopathy Diagnosis, Vol. 48, No. 5 (Invest Ophthalmol Visual Science., May 2007).
  3. A. Sopharak, M. N. Dailey, B. Uyyanonvara, S. Barman, T. Williamson, K. T. Nwe and Y. A. Moe, Machine learning approach to automatic exudate detection in retinal images from diabetic patients, Vol. 57(2), pp:124-135, 2009 (Journal of Modern Optics).
  4. S. Banerjee, A. Roy Chowdhury, Case Based Reasoning in the Detection of Retinal Abnormalities using Decision Trees, International Conference on Information and Communication Technologies (ICICT 2014).
  5. A. Sopharak, B. Uyyanonvara and S. Barman, Automatic Exudate Detection from Non-dilated Diabetic Retinopathy Retinal Images Using Fuzzy C-means Clustering, Vol. 9, pp: 2148-2161, March 2009 (Sensors (1424-8220)).
  6. T. Akila, G. Kavitha, Detection and Classification of Hard Exudates in Human Retinal Fundus Images Using Clustering and Random Forest Methods, Vol. 4, Special Issue 2, April (International Journal of Emerging Technology and Advanced Engineering, 2014).
  7. C. Aravind, M. PonniBala, S. Vijayachitra, Automatic Detection of Microaneurysms and Classification of Diabetic Retinopathy Images using SVM Technique, (International Journal of Computer Applications (0975–8887)).
  8. K. Wisaeng, N. Hiransakolwong, E. Pothiruk, Automatic Detection of Retinal Exudates using a Support Vector Machine, Vol. 32, No. 1/2013, pp: 33-42 (Applied Medical Informatics, 2013).
  9. G. B. Kande, T. S. Savithri and P. V. Subbaiah, Automatic Detection of Microaneurysms and Hemorrhages in Digital Fundus Images, Vol 23, No 4 (August), pp 430-437 (Journal of Digital Imaging, 2010).
  10. B. Ramasubramanian, G. Prabhakar, An Early Screening System for the Detection of Diabetic Retinopathy using Image Processing, Vol. 61– No.15, January 2013(International Journal of Computer Applications (0975–8887)).
  11. B. Ramasubramanian, G. Mahendran, An Efficient Integrated Approach for the Detection of Exudates and Diabetic Maculopathy in Colour fundus Images, Advanced Computing: An International Journal ( ACIJ ), Vol.3, No.5, September 2012, DOI: 10.5121/acij.2012.3509 83.
  12. Data Mining: Practical Machine Learning Tools and Techniques, Ian H. Witten, Eibe Frank, Mark A. Hall.

Article Tools
  Abstract
  PDF(6660K)
Follow on us
ADDRESS
Science Publishing Group
548 FASHION AVENUE
NEW YORK, NY 10018
U.S.A.
Tel: (001)347-688-8931