Support Vector Machine Based Diagnostic System for Thyroid Cancer using Statistical Texture Features

Diagnosis of malignancy in patients with thyroid nodules is most important as it is one of the curable malignancies (Phuttharak et al., 2009). Most of the thyroid nodules are benign and not cancerous. However, less than 5% of thyroid nodules are discovered to be malignant (Mazzaferri, 1993). The major challenge is the discrimination of benign and malignant thyroid nodules so that unnecessary surgical treatment can be avoided for patients with benign nodules (Tsantis et al., 2009). Fine needle aspiration cytology examination is a simple, safe and cost-effective diagnostic procedure in the investigation of thyroid nodules with high specificity and accuracy (Mundasad et al., 2006). However, routine screening of microscopic slides is a time consuming task. To reduce time consumption and increase sensitivity, it is necessary to develop computer-aided diagnosis systems (CADs) (Tsai et al., 2011). Many research works have been conducted in the development of automated computer-aided diagnostic system for the diagnosis of cancer pattern in medical images to improve the diagnosis results. A computer-aided diagnosis system was proposed for early-stage breast cancer using wavelet transform and back-propagation neural network with high true positive and low false positive (Tsai et al., 2011). A multi-classifier system was designed for discriminating benign from malignant


Introduction
Diagnosis of malignancy in patients with thyroid nodules is most important as it is one of the curable malignancies (Phuttharak et al., 2009).Most of the thyroid nodules are benign and not cancerous.However, less than 5% of thyroid nodules are discovered to be malignant (Mazzaferri, 1993).The major challenge is the discrimination of benign and malignant thyroid nodules so that unnecessary surgical treatment can be avoided for patients with benign nodules (Tsantis et al., 2009).Fine needle aspiration cytology examination is a simple, safe and cost-effective diagnostic procedure in the investigation of thyroid nodules with high specificity and accuracy (Mundasad et al., 2006).However, routine screening of microscopic slides is a time consuming task.To reduce time consumption and increase sensitivity, it is necessary to develop computer-aided diagnosis systems (CADs) (Tsai et al., 2011).
Many research works have been conducted in the development of automated computer-aided diagnostic system for the diagnosis of cancer pattern in medical images to improve the diagnosis results.A computer-aided diagnosis system was proposed for early-stage breast cancer using wavelet transform and back-propagation neural network with high true positive and low false positive (Tsai et al., 2011).A multi-classifier system was designed for discriminating benign from malignant RESEARCH ARTICLE Support Vector Machine Based Diagnostic System for Thyroid Cancer using Statistical Texture Features B Gopinath 1 *, N Shanthi 2 thyroid nodules using routinely H&E-stained cytological images (Daskalakis et al., 2008).Majority voting based automatic classification of papillary and medullary thyroid carcinomas was done (Gopinath and Gupta, 2010b).An analysis of mammogram classification was performed using wavelet transform decomposition (Ferreira and Borges, 2003).Classification of melanoma has been reported using tree structured wavelet transforms (Patwardhan et al., 2003).A computer-aided prostate cancer detection system was developed using texture features and clinical features in ultrasound image (Han et al., 2008).
The objective of the proposed study is to segment thyroid cell regions and classify benign and malignant thyroid nodules in FNAC cytological images of thyroid nodules.The segmentation of thyroid cell regions is performed by mathematical morphology segmentation method.Statistical texture features are subsequently extracted using Gabor filter based method at various wavelengths and the angles and thyroid modules are classified by k-nearest neighbor and SVM classifiers.

Materials and Methods
Fine needle aspiration cytology (FNAC) is a nonsurgical method of determining benign or malignant state of the thyroid nodules.Thyroid FNAC specimens on glass slides are analyzed by a consultant pathologist based on the cytological features and the pathologist makes a cytological diagnosis report.Normally, the accuracy of FNAC technique is around 95%, false negative and false positive results vary from 0-5% (Mundasad et al., 2006;Daskalakis et al., 2008).The parameters sensitivity, specificity and diagnostic accuracy (DA) are derived from the FNAC diagnosis report by, In the development of computer-aided diagnosis systems, the cytological images are captured from the glass slides of the sample material.The classification process is then automated using various image processing techniques.The CAD system can be used as a second opinion tool for the pathologist, when a definite diagnosis is difficult to be obtained (Daskalakis et al., 2008).
In the present study, the thyroid FNAC images have been used from on-line image atlas of Papanicolaou Society of Cytopathology which are reviewed and approved by the atlas committee (http://www.papsociety.org/atlas.html).Few samples of FNAC cytological microscopic images of benign and malignant thyroid nodules which are used in the study are shown in Figure 1.The training image set consists of 40 benign and 40 malignant images whereas the testing image set consists of 10 benign and 20 malignant images.Figure 1(a) shows a FNAC image of benign thyroid nodule; 1(b) shows a FNAC image of papillary carcinoma; and 1(c) shows a FNAC image of medullary carcinoma of thyroid nodules.
The thyroid FNAC images are stained by various types of stains and they are multi-stained cytological FNAC images.In automated computer-aided diagnosis, the diagnostic accuracy is affected by the unwanted background staining information and hence it is very important to select an appropriate segmentation method to carefully remove the unwanted background information in multi-stained FNAC images.

Image segmentation
The diagnostic accuracy depends on the efficient segmentation methodology and can be improved, if the segmentation of the regions of interest is clearly defined (Gopinath and Gupta, 2010a).In the current study, mathematical morphology image segmentation method is used to segment the required benign and malignant cell regions of thyroid nodules in multi-stained FNAC images.

Mathematical morphology
Mathematical morphology, which is based on set theory, provides a quantitative description of geometrical structures.It is used for extracting shape and size information from the images (Hrebien et al., 2008;Kimori, 2010;2011;Gopinath and Shanthi, 2012).A morphology based image segmentation method is presented in Figure 2.

Preprocessing
The preprocessing stage consists of converting RGB image into gray-scale image, cropping 256x256 pixel image from the input image by auto-cropping and thresholding.Since morphology concentrates only on the shape of the cell objects, RGB components of the given input image are not required in this study.In automated segmentation and classification methods, high density cell regions in slide images are identified before segmentation and classification for simple and fast computing (Petushi et al., 2006;Kavitha et al., 2012).
In auto-cropping technique, a 256x256 cropping window is moved over the entire image and mean value is calculated for each 256x256 window.The high density cell region in the input slide image will have least mean value.A window having least mean value is cropped and used for further processing which will improve the diagnostic accuracy.The original and cropped images are shown in Figures 3a and 3b.
The most common method of thresholding assigns a pixel to one class if its gray-level is greater than a specified threshold value and otherwise assigns it to the other class for separating objects from its background in slide image (Petushi et al., 2006).An appropriate threshold value is calculated using Otsu's method (Otsu, 1979) to classify image pixels into one of two classes; i.e. objects and background.Each pixel in the image is compared with the threshold value.When the pixel's intensity is higher than the threshold value, the pixel is set to white; otherwise, it is set to black.Mathematically, the output image g(x,y) for the input image f(x,y), at global threshold value T, is given as,

Morphological opening and closin g
If sets I and Se are referred to as the input image and structuring element, respectively, and s is an element of Se, then erosion is defined as the result of the intersection of s and I.According to the erosion operation, if all black elements in the structuring element match the neighbors of a pixel, then the original pixel becomes black; otherwise, it The size parameter of a structuring element must be selected in accordance with the size of the structure to be extracted from the image.For the opening operation, all the elements smaller than the structuring element are removed.For the closing operation, all the elements, present as holes, smaller than the structuring element are filled (Kimori, 2011).Hence, the size of the structuring element must be larger than the size of the target thyroid cell objects.Thus, disk-shaped structuring elements with radii of three and eight pixels are selected for opening and closing respectively so that small objects around the cell objects in the image are removed by performing the opening operation and holes inside the cells are filled by performing the closing operation.An image complement is performed to clearly distinguish foreground thyroid cell objects from the background image.Figure 3a) shows FNAC cytological images of benign and malignant thyroid nodules.Automatically cropped images are shown in Figure 3b).The results of morphological opening and closing operators are given in Figures 3c) and 3d) respectively.The contour superimposed images on the original images are presented in Figure 3e).

Feature extraction
Feature extraction is a method of generating description of an object in an image in terms of measurable values.The extracted features represent the properties of the object.These features can be used with a classifier to assign the class for the object.The texture patterns scattered in the microscopic medical images have been used in medical image analysis for segmentation and classification for several years (Daskalakis et al., 2008;Gopinath and Gupta, 2010b).Since microscopic image texture contains statistical information of a gray-level image in the spatial domain, texture analysis may be used to classify thyroid FNAC microscopic images (Hrebien et al., 2008).

Gabor filters
Gabor filter is an often used operator for texture properties description.This filter has the features of directionality and spatial frequency which belong to the basic texture properties.For texture analysis purposes the input image is filtered with the filter bank and then a set of descriptors are computed from the resulting output images (Linder et al., 2012).Gabor filter's characteristics is a Gaussian signal (also called an envelope) modulated by a cosine signal (also called a carrier). where, The standard deviation σ determines the effective size of the Gaussian signal.λ is the wavelength of the cosine function.θ determines the direction of the cosine function and finally, ? is the phase offset (Bandzi et al., 2007).An input image f(x,y), x,y ε X (X is the set of image points), is convolved with a two-dimensional Gabor function g(x,y), x,y ε X to obtain a Gabor feature image.The Gabor families of filters are generated for four frequencies 4, 8, 16 and 32 as well as four orientations 0, 45, 90 and 135 degrees.Each image in the training set and testing set are convolved with these filters.Then, the statistical features mean, standard deviation, entropy, variance, energy, homogeneity, contrast and correlation are calculated and stored in feature library as, where, f (i,j) is the gray-level value for each pixel in the region of interest, N is the total number of pixels in the region of interest and are means and standard deviations of f (i,j).
These eight statistical features are derived for 80 images in training set and 30 images in testing set so that the total number of feature vectors becomes 880.To reduce this high dimension feature space and find the significance levels of feature vectors, statistical analysis is carried out using box whisker's plot method as explained in results and discussion section.Mean, standard deviation, variance, contrast and energy are identified as the very significant feature vectors and used for the classification of thyroid nodules.

k-Nearest neighbor classifier
The k-nearest neighbor (k-NN) algorithm is one of the successful, most widely used machine learning algorithms for classifying patterns based upon the closest training samples in the feature space.In k-NN algorithm, the features of entire training set images are stored in feature library.To classify an unlabeled testing image in testing set, the distance is computed between the feature of test image and each stored feature of training set and the test image is assigned to the class of the nearest neighboring image (Tahir et al., 2007).A widely employed measure of the closeness of two features and the one used here is the standardized Euclidean distance.The performance of the k-NN classifier is primarily determined by the choice of k as well as the distance metric used.Among all distance metrics, Euclidean distance is the most commonly used measurement.In k-NN algorithms, it is an important parameter that influences the classifier performance, since different values of k classify the unlabeled image as different classes (Tahir et al., 2007).For the classification of benign and malignant classes in the testing FNAC image set, we have developed k-NN classifier with k=1 and the classification is carried out based on Euclidean distance between training test features and testing set features.

Support vector machine classifier
SVM classifier is a successful technique for pattern classification problems.Traditional classification approaches perform poorly because of the high dimensionality of the data, but support vector machines can avoid the pitfalls of very high dimensional representations (Rajeesh et al., 2012).The components of SVM are graphically shown in Figure 4.
The kernel-based SVM classifier is used to assess the performance of the diagnostic system for achieving high classification accuracy.The kernel method finds nonlinear boundaries using kernel functions such as Gaussian functions, polynomial functions, and sigmoid functions (Kavitha et al., 2012).The SVM algorithm classifies the positive and negative examples by training a classifier that uses a kernel function to map the input samples onto a high-dimensional space that best differentiates the two classes with a maximal margin and a minimal error.The data that lie on the hyperplane margins are called support vectors (Guan et al., 2009;Rajeesh et al., 2012).In this work, the linear kernel function has been used for binary classification problem with the input vector composed of the texture features derived by the feature extraction methods.In this approach, the optimal boundary passes the midpoint between benign and malignant feature sets.Although the distribution of each set is unknown, this boundary is expected to be the optimal classification of the sets, since this boundary is the most isolated one from both of the sets.

Training and testing phases
The classification problem is solved in two phases: training phase and testing phase.The training and testing phases of the classification process are explained in Figure 5.In training phase, the statistical texture features are calculated from automatically cropped and segmented training set images of benign and malignant thyroid nodules and stored in the feature library.In the testing phase, the same set of statistical texture features are extracted from automatically cropped and segmented testing set images of benign and malignant thyroid nodules.These extracted texture features are compared with the feature library and classified using k-NN and SVM classifiers.
A set of 10 benign and 20 malignant images are used in test data set.Figure 6a) shows a sample image of benign thyroid nodule and Figures 6b) and 6c) show sample images of malignant thyroid nodules.

Results
The available training set images are divided into two groups as benign set and malignant set with 40 images each.These 80 images are trained; statistical texture features are extracted and stored in feature library.In testing phase, 10 benign and 20 malignant images are     From the diagnostic results, it is clearly observed that SVM classifier performed better than the k-NN classifier.The highest diagnostic accuracy of 96.66% is reported with sensitivity of 95% and specificity of 100% by SVM classifier when it uses the results of morphology segmentation and the texture features derived from Gabor filter with wavelength of 4 and angle of 45 as shown in Figure 7.The lowest diagnostic accuracy of 60% is reported by the combination of morphology segmentation, Gabor texture features and k-NN classifier with sensitivity of 60% and specificity of 60% as summarized in Table 1 for λ=8 and θ=0.

Discussion
Figure 7 presents a comparative analysis of diagnostic accuracy (DA), sensitivity and specificity of the classifiers k-NN and SVM with morphology segmentation method and Gabor texture features at λ=4 and θ=45.In this study, it is found that SVM classifier is performing well in association with morphology segmentation method and the texture features derived by Gabor filters.
A highest sensitivity of 100% is also reported by Gabor filter with wavelength of 4 and angle of 135 though the diagnostic accuracy and specificity are 93.33% and 80% respectively.Similarly, a highest specificity of 100% is achieved for the combination of wavelength of 8 and angle of 90 of Gabor filter.
The current study utilizes Gabor filter bank as texture feature extraction method from the segmented thyroid FNAC images and the total number of features extracted for 80 training set images and 30 testing set images becomes huge.Hence, best feature vectors with high significant levels are selected by conducting the statistical analysis using Box Whisker's plot.In Figures 8a-8h, boxplot representation is used to show the distribution of eight feature vectors for benign and malignant groups of thyroid FNAC images.From the boxplot representation, the discrimination power of the features can be estimated based on lower quartile, median, upper quartile values.In this work, the variability between the median values of benign group and malignant group has been compared as shown in Table 2.
It is observed from the boxplot of Figure 8 that there is a significant variation between benign and malignant groups of thyroid FNAC images for the features mean, standard deviation, variance, contrast and energy and these five features have been selected as most promising feature vectors.However, in other three features (homogeneity, entropy, correlation), box plots does not show any significant variability in terms of median values as shown in Table 2.
In conclusion, a texture-based automated diagnostic system was developed to classify benign and malignant thyroid nodules in multi-stained FNAC cytological images using k-NN and SVM classifiers by incorporating mathematical morphology segmentation Gabor filter based feature extraction methods with a highest diagnostic accuracy of 96.7% with sensitivity of 95% and specificity of 100% at wavelength of 4 and angle of 45.The k-NN classifier reported a lowest diagnostic accuracy of 60% with sensitivity of 60% and specificity of 60% at wavelength of 8 and angle of 0 These results conclude that SVM classifier trained with statistical texture features performs better than k-NN classifier for automated diagnosis of benign and malignant thyroid nodules in multi-stained thyroid FNAC cytological images.

Figure 1
Figure 1.a) FNAC Image of Benign Thyroid Nodule, b) FNAC Image of Papillary Carcinoma of Thyroid Nodule, and c) FNAC Image of Medullary Carcinoma of Thyroid Nodule

Figure 3
Figure 3. a) Sample Thyroid FNAC Cytological Image, b) Auto-cropped Image, c) Result of Morphological Opening Operator, d) Result of Morphological Closing Operator, and e) Original Image with Contour Super Imposed

Figure
Figure 8. Boxplot for Statistical Texture Features of the Benign and Malignant Groups