A novel approach for the classification of diabetic maculopathy using discrete wavelet transforms and a support vector machine

: The role of diabetes mellitus in deteriorating the visual health of diabetic subjects has been affirmed precisely. The study of morphological features near the macular region is the most common method of investigating the impairment rate. The general mode of diagnosis carried out by manual inspection of fundus imaging, is less effective and slow. The goal of this study is to provide a novel approach to classify optical coherence tomography images effectively and efficiently. discrete wavelet transform and fast fourier transform are utilized to extract features, and a kernel-based support vector machine is used as classifier. To improve image contrast, histogram equalization is performed. Segmentation of the enhanced images is performed using k-means clustering. The hybrid feature extraction technique comprising the discrete wavelet transform and fast fourier transform renders novelty to the study. In terms of classification accuracy, the system's efficiency is compared to that of earlier available techniques. The suggested approach attained an overall accuracy of 96.46 % over publicly available datasets. The classifier accuracy of the system is found to be better than the performance of the discrete wavelet transform with self organizing maps and support vector machines with a linear kernel.


Introduction
The negative influence induced by pancreatic cells affects the structural link of Diabetes Mellitus. More specifically, these cells are β-cells [1][2][3]. Diabetes is mainly dependent on insulin imbalance in the human body. So, diabetes can be categorized into two types namely, type 1 and type 2. Type 1 is categorized for the section of deficiency of insulin and the second category is resistance diabetes [1][2][3]. It is evident in recent studies and surveys that diabetes is becoming more and more common among young and middle-aged people. According to the research, the increment in the percentage of diabetic patients will increase by nearly 2.3% by 2035, although it is currently 8.1% [4]. In the present state, nearly 400 million individuals are living with diabetes globally; also, this percentage is supposed to increase to up to nearly 500 million by 2035 at the present increasing rate [4]. The global prevalence of diabetic macular edema (DME) has been identified as 21 million people with a prevalence rate of 10.2% among people having diabetes [7]. DM is the mother of many diseases. As someone gets this condition, DM starts to erode the rest of the organs. All of the major organs like the kidney, liver and brain affected by this. Even the minor organs like the blood vessels, eyes and pancreas become eroded [5].
To understand the pathology of DME, one needs to understand the anatomical details of the eye. Figure 1 shows the major parts and morphological changes in the eye due to diabetes. To check the effects of diabetes on the eye, different types of image modality methods are considered for this. One of the techniques is optical coherence tomography (OCT), which is a sub-category of non-invasive techniques. OCT modelling gives the early indication of infection or disease in the retinal areas, which are considered as symptoms that warrant the onset of their treatment [8]. Mostly OCT is considered to detect the damage caused by DME in the optical region [9][10][11][12]. The optical structure is not planar; it is not a homogeneous structural organ. So this technique is preferred yet the method is slow and time-consuming. The method gives the exact comparison between a healthy and infected person [13]. The effect of diabetes is very slow on the retina so for this the person has to go through OCT screening so that the effect of diabetic retinopathy (DR) can be recognized early [14][15][16].  [7]. DME is recognized by the appearance of DME clinical features like micro-aneurysms, haemorrhages, and hard exudates inside 2-disc diameterof the fovea which is the central part of the macula [6]. The fovea is responsible for detailed and sharp vision, and any deformity near the foveal region causes blurred or partial vision. DME causes swelling in this region and ultimately leads to complete blindness if not cured in time [3,5,6]. OCT images provide cross-sectional views of various retinal layers, and they also show any swelling, deposition of ocular fluids or presence of pathological features. The OCT scans undergo a sequenced procedure of image-processing algorithms for automated detection. The accuracy of a classifier system depends on a number of parameters which are of diverse nature like the dataset quality, size of the database, number of normal vs abnormal eyes in the dataset and performance metrics of applied algorithms.
This study consists of proposing an automated classification system for the grading of diabetic maculopathy with the help of a supervised machine learning classifier and a hybrid feature extraction algorithm. The paper is organized as follows: Section 1 is the introduction and it provides the background study and scope of research. Section 2 is related literature that points out the potential algorithms and related work. Section 3 comprises the material and methodology. The next section, i.e., Section 4 is for results and Section 5 is for the conclusion.

Related literature
To detect diabetes under comprehensive conditions is difficult [6,17]. So researchers are trying to find an effective way, which should be an easy and even effective method, for its detection. To ease the process OCT imaging comes in handy as this element helps doctors to detect the grade and criticality of DME. This helps in effective decision-making regarding the treatment of patients and to recognize the severity level in order to dictate proceedings of treatment. The OCT modeling supports the effective diagnosis and fundamental method of treatment of DME [18,19]. In the early 20 th century the rapid response of OCT technology was used. But this method was not structured in good condition and the functional values were upgraded to slow response OCT technique. Many more amendments were brought in the structure and the segments for the section with the help of few algorithms. These algorithms were namely geodesic active contour (GAC) and Chan-Vese (C-V). GAC was categorized for the image identification analysis. GAC algorithm could efficiently handle the noise [20]. On the other hand, the C-V model is comparatively slow and needs manual data computation along with all the iterations of the system [21]. But these both have the limitation of the number of input images that can be considered in it [22]. If more than the limit, images are uploaded then that will not be considered in the database. Image classification in DME or normal category requires efficient segmentation and feature extraction. Out of diverse image processing techniques, the literature study helped narrow down the potential promising segmentation and feature extraction techniques. Morphological operations like otsu thresholding, gaussian filtering, image sharpening and noise removal are suggested by [23] for efficient segmentation of target features and background. An optimized gabor filter is employed by [24] for abnormal features and deposition of foreign elements over the glass surface. Wavelet transforms are capable of extracting texture-based features providing accurate results for the shape and size of abnormal textures [24]. Also, as suggested by [25] discrete wavelet transform (DWT) and support vector machine (SVM) for feature extraction and classification has provided excellent performance in terms of power quality even in noisy signals. The selection of statistical features for data classification using machine learning algorithms is suggested by [26]. Various statistical features like arithmetic mean, geometric mean, standard deviation, skewness and kurtosis with energy features are helpful in achieving high classification accuracy [27]. Here the paper presents the algorithm for the DME effect measured by OCT images. The algorithm is a compact version of the algorithm including the K-means in addition to the upgraded SVM algorithm. The resultant algorithm gives an easy hand to work on DME-affected regions.

Dataset
The research here is performed with online available public data. 300 OCT images are considered, which are further divided into training, testing and validation subsets. These 300 images consisted of 200 DME and 100 normal OCT scans. 100 images were put in training set and 100 images are used for testing and validation each. All the images are resized at the same pixel levels to avoid fragmentation in the results of accuracy.

Step-wise proposed algorithm
Step-I. Dataset division into testing and training subsets Step-II. Image enhancement using histogram equalization Step-III. k-means clustering for image segmentation Step-IV. Feature extraction through DWT + fast fourier transform (FFT) Step-V. Training and testing of SVM classifier for classification Step-VI. Validation of results Figure 2 shows the stepwise proposed methodology for image classification. The OCT images acquired from diabetic patients available as different databases are first resized to obtain identical resolution for homogeneous processing. The resized images undergo pre-processing, segmentation, feature extraction, and classification using suitable and efficient algorithms. The detailed analysis of these processes is done as follows. divided into three subsets for training, testing, and validation purpose. Out of 300 images training, testing, and validation dataset consist of 100 images each. The images are then subjected to preprocessing for a better contrast ratio with the help of histogram equalization. Histogram equalization removes the non-uniformity of background pixels and prepares the image for efficient segmentation and feature extraction.

Image segmentation
Using image processing tools for automated image grading is a sequential process where every step prepares the data image better suitable for the next algorithm so that ultimately overall image classification accuracy is maximized and incorrect grading is minimized. Image segmentation is an image processing technique that comes after pre-processing of the raw image. During this step, the given image pixels are partitioned into structured and background pixels to separate the image features from the background pixels.. It also helps to eliminate redundant pixels as background and keeps the pixels of our interest . The k-means clustering algorithm is proposed in this work for image segmentation. The clustering algorithms form clusters of similar components out of data. Each cluster has its unique features that act as the base of feature extraction. The result of k-means clustering on our data is discussed in the result section of the paper.

Feature extraction
After image segmentation, the images are used for feature extraction. A novel hybrid approach comprising of DWT-FFT is proposed in this paper. It is also found that this approach leads to increased image classification accuracy. The classification accuracy is tabulated and discussed in the result section. The general DWT and FFT algorithms are discussed as follows:

DWT-based feature extraction
DWT is a wavelet-based transform composed of a discrete arrangement of the wavelet components known as scales and interpretations complying with some pre-defined rules [8]. As such, this transform disintegrates the given signal into the mutually orthogonal arrangement of wavelets.
Discrete wavelet transform is used here to extract features for DME classification. This technique integrates both the spatial-based as well as the frequency-based information content from given pictorial data. The DWT analysis decomposes the image information on two scales i.e. a coarse approximation with the help of low-pass filters and finer details using a high-pass filter. It applies convolution operation over the original image with impulse response of the corresponding filter. The decomposition is done repetitively on the approximation coefficients of the low-pass filter generated at each level for several iteration cycles.
Assuming, the intensity levels of each pixel of the given image be represented by individual elements of a 2-dimensional (2D) array namely I [i, j] of order M x N, where elements of the matrix address the intensity level of an individual pixel in grayscale. All non-border pixels have eight adjoining pixels known as neighborhoods. This image first undergoes low-pass as well as high-pass filtering along the rows. The resultant of each filter is down-sampled by half. Now, these sub-signals are again low-pass and high-pass filtered, but this time along the column. The results are again down-sampled by half. In this way, the original pictorial information is partitioned into four subsets each one with resolution M/2 x N/2 which present the picture on different frequency thresholds.
These two-layered 2D-DWT coefficients are equivalent regardless of whether the matrix is navigated right to left or vice-versa. Figure 3 presents the image decomposition obtained at level-1 of DWT, where I is the input image, L[n] is the impulse response of the low-pass filter and H[n] is the impulse response of the high-pass filter. ↓2 represents down sampling by 2. Low-pass filtering of rows and columns provides approximation coefficients (A1). H1 represents the detailed horizontal coefficients of level 1and is generated from low-pass filtering of rows and high-pass filtering of columns. V1 stands for detailed vertical coefficient of level 1 generated from high-pass filtering of rows and lowpass filtering of columns. D1 denotes the detailed diagonal coefficients of level 1 obtained from high-pass filtering of rows and columns. 2-D DWT of the first level yields four resultant matrices (A1, H1, V1, D1), the elements of which are various intensity levels. Similarly, the second-order 2D-DWT matrices H2, V2, D2, and A2 are obtained. The energy features in the various sub-bands discriminating information based on frequency are evaluated using Equation (1). Table 1 shows the range of 2D-DWT energy features. To validate the hypothetical significance of extracted energy features, student's t-test is conducted over the range of obtained energies. It is an efficient method for hypothesis testing. A student's distribution is followed if the null hypothesis is found valid. In expense of the null hypothesis, it is suggested that there is no significant distinction among the mean values of the energy features in different classification grades. Generally, the null hypothesis is supposed to be rejected in case the p-value decreases lower than 0.05. Above this value, the null hypothesis is found to be true which means there is a significant difference among average energy levels of features marking the different classification grades. The value of p is a probabilistic measure of the occurrence of an event where a significant difference between means is happened by pure coincidence. Here, with these criteria, all extracted features are found to be clinically significant (p\ 0.0001). The wavelets are developed from the following scaling function which, portrays the scaling properties. = where S is the scaling factor (normally the value is taken as 2). Also, the area between the function is normalized and the scaling function is orthogonal to its discrete translations e.g.
The restrictions mentioned above do not lead to a unique solution. Hence, after some more approximations, we can obtain results of all these equations, e.g. a finite set of coefficients that not only define the scaling function but also generate the wavelets. The scaling function now provides the wavelets defined mathematically as below: where N is an even integer.

Fast Fourier Transform
FFT is regularly used to transform a picture between the spatial and recurrence area. Also, FFT completely transforms pictures into the recurrence area, dissimilar to time-recurrence or wavelet transforms. The FFT decays a picture into sines and cosines of changing amplitudes and stages, which uncovers rehashing designs inside the picture.
Low frequencies address continuous varieties in the picture; they contain the most data since they decide the general shape or example in the picture. High frequencies compare to sudden varieties in the picture; they give more detail in the picture, yet they contain more commotion [10]. One approach to sifting through foundation commotion is to apply a veil.
When utilizing a forward FFT to transform a picture from the spatial to the recurrence area, the most minimal frequencies are regularly appeared by an enormous top in the focal point of the information. The accompanying picture shows a model. Here, the aftereffect of an FFT work is plotted as a surface, with the cause (0,0) of the x-and y-frequencies moved to the middle. The recurrence of size at that point increments with distance from the cause [11].
Fundamentally, the computational issue for the DFT is to figure the succession {X(k)} of N complex-esteemed numbers given another arrangement of information {x(n)} of length N, as indicated by the formula As a general assumption, the data sequence x(n) is complex. The IDFT, hence, becomes

Image classification
In this study, SVM is proposed as a classification algorithm, which is a popular and efficient machine learning algorithm. SVM-based classification algorithm includes an optimized grouping of given data in predefined groups with the help of extracted features mapped as support vectors. SVM performs well on linear as well as non-linear data. The grading of data in specified classes is done to maximize the dividing margin on a hyper-plane. A vast variety of machine learning algorithms to improve the classification efficiency and accuracy are available which work well in their respective application areas [7]. In this paper, one of the best effective methods for the reduction of classification errors has been proposed. Principle component analysis (PCA) technique is used to impart the strongly supported vectors in a dataset by eliminating non-uniformity. It is performed to prepare the database to make them easy to explore and analyze. The stepwise analysis of the PCA algorithm can be understood as follows: [11] Step-1 Partition your data so that out of sub-sets X and Y, the validation set is set Y and the training set is set X so, we will utilize X for our study and Y for investigating whether our study is correct or not.
Step-2 Provide structure to the data taking the 2-dimensional matrix of two independent variables.
Step-3 Systematize the data as the columns have features with high variance more crucial than the data with low variance and are important for data.
Step-4 Take out the covariance of Z as the matrix Z, transpose, and find out the product of the transposed matrix.
Step-5 Estimate the eigen vectors and eigen values as finding out the corresponding eigen values of Z T Z.
Step-6 Categorize the eigen vectors as -λ 1 , λ 2 , λ 3 …λ n Step-7 Estimate the new features as Z * = ZP * The new matrix obtained i.e., Z * is a homogenous kind of X as if now each observation is an association of original variables.
Step-8 Remove the unessential features from the new set to obtain which features from the new set are to keep for future analysis.

Results
Step I-The classification system starts with data collection of relevant OCT images to be used for training, testing, and validation purpose. Total 300 OCT images are collected from different public datasets. The dataset is then split into training, testing, and validation subsets each with 100 images. Figure 4 shows normal and DME deformed eye OCT scans.
Step II-The training images are resized for the same resolution and to eliminate image size-induced non-homogeneity. The resized images undergo image enhancement by histogram equalization. Figure 5 shows resized images and figure 6 shows enhanced images after histogram equalization.
Step III-The pre-processed images are segmented using a k-means clustering algorithm, figure 7 shows segmented images for normal as well as DME eye. It is clear from obtained resultant images that the image segmentation successfully separates our region of interest from background data.
Step IV-Segmented images undergo feature extraction using a hybrid DWT-FFT feature extraction technique. Table 1 represents the features extracted from the processed images. Step V-SVM classifier is trained on training subset and testing is done for testing subset data.
Step VI-The achieved classifier accuracy is compared with previously available systems. The comparison is shown in table 2.

Conclusions
Automated detection of DME through image processing algorithms can provide a comprehensive screening tool for diabetic patients. It can detect DME symptoms in the retina of an eye at early stages so that the treatment can be started before the damageenters an irreversible phase. In this paper, an efficient machine learning-based DME detection system is proposed where OCT scans undergo sequential algorithms to classify the images in DME and normal images. The dataset of 300 images is chosen with 100 normal eye scans so that the classifier shows better specificity along with improved sensitivity; the parameters contributing equally for classifier accuracy. Image resizing to remove dataset diversity is proposed and implemented for a 740 x 576 resolution. To separate the retinal layers from background pixels, k-means clustering is used which has shown remarkable outcomes. A hybrid DWT-FFT feature extraction and SVM classifier has resulted in classification accuracy of 96.46% using 10-fold cross-validation. However, it is not practically possible to achieve 100% accuracy; it is still significant to achieve a promising and consistent accuracy. The overall performance of these systems depends on a large variety of heterogeneous features such as the image quality, resolution, background noise of the acquired images, the robustness of the training algorithm, choice of significant features, different kinds of classification grading systems, etc. Though we have gone one step further in the classification domain by using the SVM approach by improving overall accuracy, the system can still be improvised for larger datasets as well as for multi-level disease severity grading.