Automated Diabetic Retinopathy Screening System Using Hybrid Simulated Annealing and Ensemble Bagging Classifier

Diabetic Retinopathy (DR) is the leading cause of blindness in working-age adults globally. Primary screening of DR is essential, and it is recommended that diabetes patients undergo this procedure at least once per year to prevent vision loss. However, in addition to the insufficient number of ophthalmologists available, the eye examination itself is labor-intensive and time-consuming. Thus, an automated DR screening method using retinal images is proposed in this paper to reduce the workload of ophthalmologists in the primary screening process and so that ophthalmologists may make effective treatment plans promptly to help prevent patient blindness. First, all possible candidate lesions of DR were segmented from the whole retinal image using a combination of morphological-top-hat and Kirsch edge-detection methods supplemented by preand post-processing steps. Then, eight feature extractors were utilized to extract a total of 208 features based on the pixel density of the binary image as well as texture, color, and intensity information for the detected regions. Finally, hybrid simulated annealing was applied to select the optimal feature set to be used as the input to the ensemble bagging classifier. The evaluation results of this proposed method, on a dataset containing 1200 retinal images, indicate that it performs better than previous methods, with an accuracy of 97.08%, a sensitivity of 90.90%, a specificity of 98.92%, a precision of 96.15%, an F-measure of 93.45% and the area under receiver operating characteristic curve at 98.34%.


Introduction
Diabetes is a lifelong disease which has been identified as one of the leading causes of many health problems including renal failure, heart attacks, strokes and eye complications.It occurs when sugar in the blood is not digested properly, either because the pancreas is unable to produce sufficient insulin, or because the body is not using the insulin it produces correctly [1].When diabetes affects the eye, it is called Diabetic Retinopathy (DR).It is the main cause of blindness in working-age adults globally and is categorized into two stages.Microaneurysms (MAs), Exudates (EXs), and Hemorrhages (HMs) are the early signs of DR known as Non-Proliferative Diabetic Retinopathy (NPDR), while neovascularization, vitreous hemorrhages, and fibrous proliferation occur during the advanced stage of DR known as Proliferative Diabetic Retinopathy (PDR).MAs are the first visible sign of DR and defined as dark red fundus spots.HMs are also dark red lesions, which appear as dots, blot or flame-shaped in the fundus image.They are the results of blood vessels bleeding either from superficial or deep capillary plexus.EXs are MAs exuded combined with the leakage of lipids in the retina.They appear as pale white or fluffy patches (soft EXs) or bright yellowish dots (hard EXs) in the inner retina.Neovascularization is the development of immature blood vessels which usually occur as a result of generalized retinal ischemia.Vitreous hemorrhage is the result of hemorrhage or blood bleeding into the vitreous humor, and fibrous proliferation is fibrous tissue opaque enough to be seen at the Optic Disc (OD) area or somewhere around the OD margin with or without accompanying new blood vessels.OD, macula, and Blood Vessels (BV) are normal retinal structures.The anatomy of a healthy retinal image and the pathological signs of DR images are shown in Figures 1 and 2.
and fibrous proliferation is fibrous tissue opaque enough to be seen at the Optic Disc (OD) area or somewhere around the OD margin with or without accompanying new blood vessels.OD, macula, and Blood Vessels (BV) are normal retinal structures.The anatomy of a healthy retinal image and the pathological signs of DR images are shown in Figures 1 and 2.
As reported in the International Diabetes Federation Diabetes Atlas 2017 [2], an estimated 425 million adults were living with diabetes as of 2017, and approximately one-third of diabetes patients had some degree of diabetic retinopathy.Consequently, it is recommended that people with diabetes undergo eye-screening at regular yearly intervals to help prevent vision loss.This eye screening is currently labor-intensive, time-consuming, as well as subjective and can be performed by a retina specialist either directly or by first using a fundus camera to capture the retinal image, followed by a screening process [3].However, the number of ophthalmologists available is insufficient in many countries, especially in developing countries and rural areas where eye specialists are rarely available.To overcome these limitations, this paper proposes an automatic DR screening system to identify DR more objectively and enable ophthalmologists to make effective treatment plans in order to help prevent patient blindness.In our review of previous works, we found that several papers aimed to detect each pathological sign of DR: EXs, MAs, and HMs.However, only a few papers were devoted to differentiating between healthy and unhealthy retinal images.As reported in the International Diabetes Federation Diabetes Atlas 2017 [2], an estimated 425 million adults were living with diabetes as of 2017, and approximately one-third of diabetes patients had some degree of diabetic retinopathy.Consequently, it is recommended that people with diabetes undergo eye-screening at regular yearly intervals to help prevent vision loss.This eye screening is currently labor-intensive, time-consuming, as well as subjective and can be performed by a retina specialist either directly or by first using a fundus camera to capture the retinal image, followed by a screening process [3].However, the number of ophthalmologists available is insufficient in many countries, especially in developing countries and rural areas where eye specialists are rarely available.To overcome these limitations, this paper proposes an automatic DR screening system to identify DR more objectively and enable ophthalmologists to make effective treatment plans in order to help prevent patient blindness.
In our review of previous works, we found that several papers aimed to detect each pathological sign of DR: EXs, MAs, and HMs.However, only a few papers were devoted to differentiating between healthy and unhealthy retinal images.Acharya et al. [4] proposed an automated screening system to discriminate healthy retinal images using a support vector machine for three different eye diseases namely DR, glaucoma and age-related macular degeneration.First, an image was preprocessed using adaptive-histogram equalization, and then a bi-dimensional empirical mode decomposition technique was applied to decompose the image due to pixel variations.Texture features were later extracted from 2D intrinsic mode functions and ranked as inputs for feeding the support vector machine.The paper reported an accuracy of 88.63%, a sensitivity of 86.25% and a specificity of 91%.The improved version of this paper was published in [5].A 2D-continuous wavelet transform was used first to decompose the fundus images, and then 15 features from entropies and energy features were extracted.These significant features were ranked and selected using particle swarm optimization.Finally, an adaptive synthetic sampling approach was applied to balance the input data which was then differentiated into two data classes using a random forest classifier.The updated results showed an accuracy of 92.48%, a sensitivity of 89.37% and a specificity of 95.58%.
Kumar et al. [6] classified DR or healthy images from retinal images using the aggregate of the extracted lesions.The OD and BV were first detected.Then the white lesions and red lesions were detected through modification of their previous work presented in [7,8] respectively.Finally, the detected lesions were classified based on a waterfall model based classification.Rates of 80% and 50% for sensitivity and specificity were reported respectively.
Imani et al. [9] presented a DR screening system based on morphological component analysis.Without using any segmentation methods, the structural information was exploited to evaluate performance.The blood vessels and lesions were then separated using morphological component analysis.Finally, a support vector machine was employed to distinguish healthy retinal images from abnormal ones.It achieved an accuracy of 92.82%, sensitivity of 92.01% and specificity of 95.45%.Acharya et al. [4] proposed an automated screening system to discriminate healthy retinal images using a support vector machine for three different eye diseases namely DR, glaucoma and age-related macular degeneration.First, an image was preprocessed using adaptive-histogram equalization, and then a bi-dimensional empirical mode decomposition technique was applied to decompose the image due to pixel variations.Texture features were later extracted from 2D intrinsic mode functions and ranked as inputs for feeding the support vector machine.The paper reported an accuracy of 88.63%, a sensitivity of 86.25% and a specificity of 91%.The improved version of this paper was published in [5].A 2D-continuous wavelet transform was used first to decompose the fundus images, and then 15 features from entropies and energy features were extracted.These significant features were ranked and selected using particle swarm optimization.Finally, an adaptive synthetic sampling approach was applied to balance the input data which was then differentiated into two data classes using a random forest classifier.The updated results showed an accuracy of 92.48%, a sensitivity of 89.37% and a specificity of 95.58%.

Microaneurysms
Kumar et al. [6] classified DR or healthy images from retinal images using the aggregate of the extracted lesions.The OD and BV were first detected.Then the white lesions and red lesions were detected through modification of their previous work presented in [7,8] respectively.Finally, the detected lesions were classified based on a waterfall model based classification.Rates of 80% and 50% for sensitivity and specificity were reported respectively.
Imani et al. [9] presented a DR screening system based on morphological component analysis.Without using any segmentation methods, the structural information was exploited to evaluate performance.The blood vessels and lesions were then separated using morphological component analysis.Finally, a support vector machine was employed to distinguish healthy retinal images from abnormal ones.It achieved an accuracy of 92.82%, sensitivity of 92.01% and specificity of 95.45%.
Goh et al. [10] filtered the retinal healthy images from DR based on the result of exudates detection using the features of the sub-images locally as the input to multiple classifiers.The paper obtained sensitivity of 92% and specificity of 91%.
A grading system for DR was presented by Akram et al. [11] which used the number of each detected DR lesion as determined through morphological operation.Aliahmad et al. [12] presented the automatic analysis of fundus images for modeling early changes in retinal blood vessels resulting from diabetes based on the total number of branching angles and average acute branching angles in addition to patient demographic information.Linear regression was applied in this study.Similarly, Raja et al. [13] proposed a method to detect BV for the diagnosis of DR.
Taking into account the works mentioned above and the methods in Reference [10], the authors attempted to detect only the EXs while other DR lesions including MIs, HMs, and CWSs were ignored.When ignoring other associated lesions, the detection system is not robust.The papers in [6,9] filtered any abnormal signs of DR using all extracted features whether significant differences existed or not.The use of all features without the use of feature selection may lead to heavy computation time, redundancy, and poor predictive performance.The papers in [4,5] applied a feature selection to select the optimal feature set to feed to the classifiers.However, more feature selection methods should be studied and the results compared.
In this paper, we proposed an automated DR screening system based on five processing steps: (i) preprocessing, (ii) lesion detection, (iii) feature extraction, (iv) feature selection and (v) classification.Image preprocessing is completed first so as to standardize image size and improve retinal image quality.Then, bright and dark lesions are segmented using a combination of morphological-top-hat and Kirsch edge-detection methods using a Boolean operation.Post-processing is further applied to filter out only DR lesions.After the DR lesions are segmented, eight feature sets with a total of 208 features are extracted, and hybrid simulated annealing is utilized to select the optimal feature set for input to the ensemble bagging classifier.
The rest of the paper is organized into four sections.Section 2 outlines the materials and methods used in the study.The experimental results are described in Section 3. Sections 4 and 5 present the discussions and conclusions, respectively.

Methodology
The flowchart of the proposed method is depicted in Figure 3.It composes five processing steps: Image processing, image segmentation, feature extraction, feature selection and classification.The detail of each processing step is described below.

Image Preprocessing
The uneven illumination inside the retinal images is usually caused by the process of image acquisition and the main focus of retinal image analysis (nasal view and macula view) [3].In our dataset, most images were captured for the purpose of macular view in which the illumination is highly focused on the macular area and image pixels at the outer ring of pixels saturation [14].Thus, image preprocessing is done first to standardize the image size and improve the retinal image quality.The following procedures are used to preprocess the retinal images based on the image quality assessment metrics [15], as shown in Figure 4.

1.
Image resizing to 576 × 720 pixels to standardize the image size and reduce the computation time.2.
RGB color image conversion to the green channel, followed by removal of small noise using a median filter.

3.
Gamma correction to improve the intensity values for image binarization.

Image Segmentation
Image segmentation can be considered as the main processing step in many applications of image processing [16].Numerous applications have been presented in the segmentation methods based on image intensity, color, edges, and texture.In this paper, the lesions of DR are segmented based on our previous work [17] by using Kirsch edges detection and morphological top hat.However, the segmentation results still contain significant amounts of noise (BV and artifacts in the vicinity of the OD).Therefore, post-processing is used.In the previous work, we removed the BV using the area measurement where the largest region of the image segmented result was eliminated.Then we used the property of axis length to remove short blood vessels.Assuming that the largest region has the highest occurrence of BV may wrongly remove the DR lesions when the lesions deposit next to BV.To deal with this issue, morphological operation was applied.The main BV was first eroded by a disk-shaped structuring element with the radius equal to one.Then the remaining parts of BV were further removed using the ratio between the major axis length and minor axis length.Finally, we removed the artifacts in the vicinity of the OD by first localizing the OD using our method proposed in [18], and then built a rectangular mask from the center of the detected OD area.By combining the rectangular mask with the result after eliminating BV, we could remove all noise attached to the rectangular mask.The processing steps of image segmentation are presented in Figure 5.

Features Description
Morphological features F1 Total area of detected regions F2 Total length of boundary of detected regions

Intensity features F3-F5
The mean values of maximum intensity, mean intensity and minimum intensity of the segmented image.

Color features F6-F8
The mean intensity in hue, saturation and value in HSV color space of the segmented image.

First order statistical features F9-F15
The mean, standard deviation, smoothness, variance, skewness, kurtosis and energy of intensity of the segmented image.

Feature Selection
The process of feature selection is to choose the optimal feature set as the input for classification.Directly using all features may include the irrelevant features, which can cause heavy computation time, redundancy, and even reduce the predictive performance.To remedy the aforementioned problems, the initial feature set of 208 features from feature extraction was filtered by Hybrid Simulated Annealing (HSA) optimization.Simulated Annealing (SA), introduced by Kirkpatrick et al., is one of the metaheuristic algorithms inspired by the process of annealing in metallurgy [23].
The main advantage of SA over other methods is its ability to avoid being trapped at local optima.However, the use of a single method sometimes fails to optimize the problems when a huge number of features are applied or there is a high degree of epistasis between features [24].For this reason,

Feature Extraction
After image segmentation, we reconstructed the binary image into a grayscale image using morphological reconstruction, and then we differentiated the retinal health and DR images based on the pixel density in binary image (see in Figure 4e) and the information of texture, color, and intensity of the detected regions (see in Figure 4f).As illustrated in Table 1, 208 features from eight feature extractors namely morphological features, intensity features, color features, first order statistical features, Gray Level Co-occurrence Matrix (GLCM) features, Gray Level Run Length Matrix (GLRLM) features, local binary pattern features and Tamura's texture features were extracted.

Morphological features F1
Total area of detected regions F2 Total length of boundary of detected regions

Intensity features F3-F5
The mean values of maximum intensity, mean intensity and minimum intensity of the segmented image.

Color features F6-F8
The mean intensity in hue, saturation and value in HSV color space of the segmented image.

First order statistical features F9-F15
The mean, standard deviation, smoothness, variance, skewness, kurtosis and energy of intensity of the segmented image.

Feature Selection
The process of feature selection is to choose the optimal feature set as the input for classification.Directly using all features may include the irrelevant features, which can cause heavy computation time, redundancy, and even reduce the predictive performance.To remedy the aforementioned problems, the initial feature set of 208 features from feature extraction was filtered by Hybrid Simulated Annealing (HSA) optimization.Simulated Annealing (SA), introduced by Kirkpatrick et al., is one of the metaheuristic algorithms inspired by the process of annealing in metallurgy [23].
The main advantage of SA over other methods is its ability to avoid being trapped at local optima.However, the use of a single method sometimes fails to optimize the problems when a huge number of features are applied or there is a high degree of epistasis between features [24].For this reason, many researchers have proposed the hybrid approaches to combine complementary strengths and to overcome the drawbacks of single methods by embedding in them one or more steps involving alternative techniques [25].In this study, we implemented the HSA similar to Yarpiz in Reference [26] by embedding a multi-layer perceptron neural network in SA as presented in Figure 6.
many researchers have proposed the hybrid approaches to combine complementary strengths and to overcome the drawbacks of single methods by embedding in them one or more steps involving alternative techniques [25].In this study, we implemented the HSA similar to Yarpiz in Reference [26] by embedding a multi-layer perceptron neural network in SA as presented in Figure 6.

Classification
Once the features were selected, they were fit as input to the ensemble bagging classifier.It is one of the best classifiers for unbalanced data classification and was first introduced by Leo Breiman [27].The basic concept of bagging is illustrated in Figure 7. First, bootstrap samples were drawn from the original training data to form an ensemble then each bootstrap sample was trained by a decision tree classifier separately, and finally the classifier outputs were combined and selected using majority vote.

Classification
Once the features were selected, they were fit as input to the ensemble bagging classifier.It is one of the best classifiers for unbalanced data classification and was first introduced by Leo Breiman [27].The basic concept of bagging is illustrated in Figure 7. First, bootstrap samples were drawn from the original training data to form an ensemble then each bootstrap sample was trained by a decision tree classifier separately, and finally the classifier outputs were combined and selected using majority vote.

Experimental Results
A total of 1200 retinal images with the resolution of 3872 × 2592 pixels in 24-bit JPEG format from Bhumibol Adulyadej Hospital were used to evaluate our proposed method in which 70% of images were used for training and the remaining images were used for testing.The images were separated into 7 groups by the ophthalmologists as illustrated in Table 2.In this paper, the proposed method was tested using MATLAB R2016b on a laptop with i3 processor and 2 GB RAM.The experiment was conducted as outlined in the following procedure: 1.All appeared lesions were segmented by improving our previous method in Reference [17].2. Eight feature sets namely morphological features, intensity features, color features, first order statistical features, Gray Level Co-occurrence Matrix (GLCM) features, Gray Level Run Length Matrix (GLRLM) features, local binary pattern features and Tamura's texture features were extracted.3. The highlights comparative studies on Genetic Algorithm (GA) [28], Particle Swarm Optimization (PSO) [29], Hybrid Ant Colony Optimization (HACO) [26] and HSA Optimization were performed to get the best optimal feature set.4. The optimal feature set was used as input to classifiers.Support Vector Machine (SVM), Decision Tree (DT), Logistic Regression (LR), Linear Discriminant Analysis (LDA), K-Nearest Neighbors (KNN), Ensemble Bagging (EB) based classifiers were employed.

Experimental Results
A total of 1200 retinal images with the resolution of 3872 × 2592 pixels in 24-bit JPEG format from Bhumibol Adulyadej Hospital were used to evaluate our proposed method in which 70% of images were used for training and the remaining images were used for testing.The images were separated into 7 groups by the ophthalmologists as illustrated in Table 2.In this paper, the proposed method was tested using MATLAB R2016b on a laptop with i3 processor and 2 GB RAM.The experiment was conducted as outlined in the following procedure: 1.
All appeared lesions were segmented by improving our previous method in Reference [17].

2.
Eight feature sets namely morphological features, intensity features, color features, first order statistical features, Gray Level Co-occurrence Matrix (GLCM) features, Gray Level Run Length Matrix (GLRLM) features, local binary pattern features and Tamura's texture features were extracted.

5.
The performance of each classifiers coupling GA, PSO, HACO, and HSA were respectively evaluated using six performance measures: sensitivity, specificity, accuracy, F-measure, precision and the Area Under Receiver Operating Characteristic curve (AUROC).
To make the quantitative evaluation of the classification performance of the proposed method, we compared the classification results with five performance measures: sensitivity, specificity accuracy, F-measure, and precision.The performance measures were obtained based on the combination of different classifiers and feature selections as tabulated in Tables 3-6 respectively.The performance measures were also evaluated using AUROC as presented in Table 7.The experimental results in Tables 3-6 show that HSA coupling with EB achieved the best performance compared to other coupling pairs in this study as well as compared to the related works in the literature as given in Table 8.

Discussion
An automatic screening system of DR is essential and a difficult task for computer-aided diagnosis systems due to the uneven illumination inside the image caused by the process of image acquisition and the main focus of retinal analysis (nasal view or macula view).In this study, we proposed a framework (see Figure 3) that differentiates DR and Non-DR automatically using fundus images.The proposed method comprised five processing steps.
Image preprocessing was applied to standardize the image size and improve the retinal image quality.Then DR lesions were segmented using an improved approach over our previous work in [15].Post-processing was further applied to eliminate any remaining noise causing poor image quality.
After the DR lesions were segmented, the healthy retinal and DR images were differentiated based on the pixel density of the binary image (see Figure 4e) and the information of texture, color, and intensity of the detected regions (see Figure 4f), in which eight feature sets with a total of 208 features were extracted.Directly using all features from feature extraction may include the irrelevant features, which cause heavy computation time, redundancy, and even reduce predictive performance.
To deal with this problem, we studied and compared the performance of four famous feature selection methods namely GA, PSO, HSA and HACO to select the optimal feature set as the input to the classifiers.Since the input data set is unbalanced (960 DR images and only 240 non-DR images), an EB based classifier was selected.To evaluate the performance of EB classifier, GA, PSO, HAS and HACO coupling with SVM, DT, LR, LDA, KNN and EB based classifiers were employed as reported in Tables 3-6 and the AUROC as depicted in Table 7.
To evaluate the performance of the proposed method, six performance measures were compared using: sensitivity, specificity, accuracy, F-measure, precision and AUROC.As presented in Table 8, our methods give better results compared to the conventional methods because we carefully investigate and experiment throughout each step of the process.

Conclusions
This paper presents an automated DR screening system for quantitative analysis of retinal images.First, during the image segmentation step, all possible candidate lesions of DR are segmented using an approach that improves over our previous method.The proposed method uses eight feature extractors to extract a total of 208 features based on the density of the pixels, texture, color, and intensity of the segmented lesions.A hybrid feature selection algorithm based on simulated annealing is utilized to select the optimal feature set as the input to ensemble bagging classifier.The proposed method is evaluated using a dataset containing 1200 images and achieves an accuracy of 97.08%, a sensitivity of 90.90%, a specificity of 98.92%, a precision of 96.15%, an F-measure of 93.45% and an AUROC of 98.34%.The classification results also reveal that the optimal feature set obtained through a hybrid simulated annealing algorithm can significantly discriminate between healthy and DR retinal images and has better performance compared to previous methods and other metaheuristic based hybrid feature selection algorithms.In future, we will further extend our research to grade the severity of DR.

Figure 1 .
Figure 1.Healthy fundus image and diabetic retinopathy image.

Figure 1 .
Figure 1.Healthy fundus image and diabetic retinopathy image.

Figure 3 .
Figure 3. Flowchart of the proposed system.Figure 3. Flowchart of the proposed system.

Figure 3 .
Figure 3. Flowchart of the proposed system.Figure 3. Flowchart of the proposed system.

Figure 1 .
Figure 1.Flowchart of the proposed system.

Figure 4 .
Figure 4. Image quality assessment metrics: (a) peak signal to noise ratio (PSNR) comparison for filtering methods, and (b) contrast improvement index (CII) comparison for contrast enhancement methods.

Figure 4 .
Figure 4. Image quality assessment metrics: (a) peak signal to noise ratio (PSNR) comparison for filtering methods, and (b) contrast improvement index (CII) comparison for contrast enhancement methods.

Figure 5 .
Figure 5.The processing steps of image segmentation: (a) Retinal image; (b) DR lesions detection; (c) blood vessels elimination; (d) rectangular mask (e) resulted image after post processing step and (f) segmented result in grayscale image.

Figure 5 .
Figure 5.The processing steps of image segmentation: (a) Retinal image; (b) DR lesions detection; (c) blood vessels elimination; (d) rectangular mask (e) resulted image after post processing step and (f) segmented result in grayscale image.

Table 2 .
Number of each pathological signs of retinal images.

Table 2 .
Number of each pathological signs of retinal images.

Table 3 .
Classification results based on hybrid simulated annealing coupling with different classifiers.

Table 4 .
Classification results based on genetic algorithm coupling with different classifiers.

Table 5 .
Classification results based on particle swarm optimization coupling with different classifiers.

Table 6 .
Classification results based on hybrid ant colony optimization coupling with different classifiers.

Table 7 .
Area under receiver operating characteristic curve of different pairs of feature selection and classifiers.

Table 8 .
Comparison of the proposed method with previous works.