Computer Vision Approach for Liver Tumor Classification Using CT Dataset

ABSTRACT The liver tumor is one of the most foremost critical causes of death in the world. Nowadays, Medical Imaging (MI) is one of the prominent Computer Vision fields (CV), which helps physicians and radiologists to detect and diagnose liver tumors at an early stage. Radiologists and physicians use manual or semi-automated systems to read hundreds of images, such as Computed Tomography (CT) for the diagnosis. Therefore, there is a need for a fully-automated method to diagnose and detect the tumor early using the most popular and widely used imaging modality, CT images. The proposed work focuses on the Machine Learning (ML) methods: Random Forest (RF), J48, Logistic Model Tree (LMT), and Random Tree (RT) with multiple automated Region of Interest (ROI) for multiclass liver tumor classification. The dataset comprises four tumor classes: hemangioma, cyst, hepatocellular carcinoma, and metastasis. Converted the images into gray-scale, and the contrast of images was improved by applying histogram equalization. The noise was reduced using the Gabor filter, and image quality was improved by applying an image sharpening algorithm. Furthermore, 55 features were acquired for each ROI of different pixel dimensions using texture, binary, histogram and rotational, scalability, and translational (RST) techniques. The correlation-based feature selection (CFS) technique was deployed to obtain 20 optimized features from these 55 features for classification. The results showed that RF and RT performed better than J48 and LMT, with an accuracy of 97.48% and 97.08%, respectively. The proposed novel framework will help radiologists and physicians better diagnose liver tumors.


Introduction
The liver is an important human body organ to perform basic functions. World Health Organization (WHO) reported that the liver is an organ with a high tumor rate, which is the cause of death (Meng, Tian, and Bu 2020;Seo et A Machine Learning-based classification model was proposed to classify liver tumors into benign and malignant tumor classes. The proposed model employed the Otsu threshold segmentation approach on ten optimized features were extracted from 256 hybrid features to deploy ML classifiers along with 10fold cross-validation. Multilayer Perception (MLP) classifier produces 99% results among SVM, RF, and J.48 (Naeem et al. 2020). A CNN-based segmentation model was proposed to segment hepatocellular carcinoma and metastasis. Dataset was preprocessed using Gaussian filter noise removal, standardization, and down sampling. The model produced promising results with dice value of 0.689, based on three quantitative indicators: Dice, Hausdorff distance, and an average distance for validation. (Meng, Tian, and Bu 2020). Furthermore, a hybrid hash-based CNN model proposed using hash function to extract features from images. The model produced promising results to classify tumors into benign and malignant classes (Özyurt et al. 2019). A CNN based multi-organ classification model was proposed. It is useful tool for diagnosis of cancer. It helps for early detection of liver cancer and avoid unnecessary biopsies process (Kaur, Chauhan, and Aggarwal 2021). A semantic image segmentation model based was introduced to classify hepatic tumors using the 3D-IRCADb-01 CT images dataset. Segnet based deep convolutional encode-decoder model used VGG-16 to classify tumor (Almotairi et al. 2020). Similarly, Segnet-based deep learning model was used to classify liver lesions into benign and malignant classes. For lesion segmentation, the model used (SEGNET -UNET -ABC Algorithm), and (LENET-5/ABC Algorithm) used for lesion classification. The Dice index, correlation coefficient, and Jacquard index for the Radiopaedia dataset were 0.96, 0.968, and 0.962, respectively. (Ghoniem 2020). A fully automated CAD system was proposed to diagnose heptacecullar carcinoma. ANN produced 98.4% accuracy, while SVM produced 98.7% accuracy (Li and Zhu 2020). A Computer Aided Diagnosis System proposed to classify benign & malignant tumors using adaptive threshold liver segmentation. Texture features extracted using Curvelet Transform. Tumor region Segmented using Fuzzy C-mean clustering which produces 94.3% accuracy (Kumar and Moni 2010). Different approaches for image retrieval based on color, shape and texture features. Another important method is Content based Image Retrieval (CBIR) (Arora and Aggarwal 2018).A modified fully connected Neural Network was used to diagnose tumors using variable pooling kernel scheme for segmentation (Pang et al. 2019). Furthermore, a watershed based segmentation approach was adopted to diagnose liver tumor. Unsupervised Fuzzy C-Mean algorithm using adaptive threshold and morphological operations produces promising results (Anter and Hassenian 2019). Similarly, a multichannel & multiscale CNN model proposed to diagnose liver lesion into lesion and non-lesion classes with three fold cross validation the model produced 82% accuracy (Todoroki et al. 2017). Furthermore, a novel level-set unsupervised fuzzy C-Mean Clustering method was adopted to diagnose hepatocellular carcinoma tumors using the LiTS CT images dataset. A 2D-UNET model used for Liver Segmentation (Zheng et al. 2018). Similarly, a liver tumor segmentation and classification model proposed using level-set segmentation and adaptive threshold. Fuzzy centroid region growing algorithm used for tumor segmentation. The model extract normal and abnormal regions (Rela, Nagaraja Rao, and Ramana Reddy 2021). Furthermore, an automatic liver tumor segmentation model proposed with region based level set techniques. The model produced promising results (Alirr 2020). A Watershed Segmentation-based model was adopted to diagnose Cyst liver tumor using statistical features. The model produces 89% accuracy. (Naeemah 2019). Furthermore, a feed forward neural network based classification model was proposed using Watershed algorithm for segmentation. The model produced promising results (Hemalatha and Sundar 2021). A semiautomated model was introduced to extract liver tumors from CT images. Entropy-based fuzzy region growing technique produced promising results (Baâzaoui et al. 2017). A texture features based classification model proposed to extract liver tumor without using any segmentation technique. The model produced promising results using Support Vector Machine Classifier as compare to K-Nearest Neighbor and Ensemble classifier (Siddiqi, Khawaja, and Hashmi 2020). A Computer-Aided diagnosis system was proposed to extract liver tumor from CT images. The model produced 81.2% accuracy using Binary Logistic Regression Analysis with Leave -one -out cross validation approach (Chang et al. 2017). A classification model proposed using Deep Lab V-3 and pix2pix generation adaptive modules to diagnose liver tumors. The model classified tumors with better accuracy (Xia et al. 2018). Similarly, a hybrid cascading segmentation network was adopted to diagnose liver tumors using the LiTS CT images dataset, based on 2D and 3D neural network models. Histogram segmentation was applied to 130 CT images. The model produces promising results (Dey and Hong 2019).
As discussed above literature, it was observed that there is a need for an efficient and reliable system to identify liver tumors at an early stage. This will help physicians to diagnose liver tumors timely and accurately.

Materials and Methods
As mentioned above, the focus of this study is to introduce a system that will identify liver tumors at an early stage. We proposed a novel multi-class liver tumor identification (MLTI) framework. The MLTI framework uniquely identifies the four liver tumor classes using the CT dataset. It comprises four steps. In the first step, the dataset was preprocessed. Secondly, multi-features were extracted. In the third step, these features were optimized. Finally, for classification, ML algorithms were employed to acquire better accuracy. To validate the ground truth of dataset, expert radiologists of different hospitals manually examined all liver tumor CT images.
The MLTI framework is described in given section below.

Proposed Methodology
The proposed MLTI algorithm is presented in detail, including all steps.
For each image in CT Dataset do 4.
End For 8.
Return liver tumor classification accuracy 10.
End function

Data Acquisition
The primary task of the MLTI framework was the collection of a liver plain CT images dataset. The dataset had two categories of liver tumor CT images: benign and malignant. The benign liver tumor further included two types (hemangioma and cyst). The malignant liver tumor also had two types (hepatocellular carcinoma and metastasis). Liver tumor CT dataset are shown in Figure 1. Hundred patient's CT images were selected for experiments. We included 10 scans of each patient's liver tumor CT image of size (512 × 512). Therefore, the dataset contains (100 × 10 = 1000 images) converted into a 24-bit JPEG format to obtain quality results. The image data acquisition was performed at the radiology department of Nishter Medical University, Multan, Pakistan Nishtar Medical University -Multan (nmu.edu.pk). These images were captured using the Toshiba Aquilion Prime TSX-303A machine with a 0.39-0.45 mm resolution. These images were manually examined by experienced radiologists and all results were shared and verified by the radiology department.
CT images are widely used as a diagnostic tool for making decisions on tumor detection in lungs, kidney, liver, and other organs instead of other imaging techniques. The contrast enhanced computed tomography (CECT) images using invasive approach while unenhanced CT images involved noninvasive approach (Balagourouchetty et al. 2018).

Image Preprocessing
After collecting the dataset, the second step is pre-processing of images. In this step, firstly, all images were converted into grayscale. Grayscale conversion is significant because it reduces the computational cost of the algorithm and simplifies the algorithm due to its single-dimensional representation as compared to the three-dimensional representation of color images (Kanan, Cottrell, and Ben-Jacob 2012;Macêdo, Melo, and Kelner 2015). Equation (1) shows the grayscale conversion.
Where I is an image in grayscale obtained by calculating the mean of R, G, and B (red, green, and blue) layers (Dwipayana, Arnia, and Musliyana 2018). The visual quality of an image is essential to acquire promising results. Normally, images may be captured in various lighting conditions, including bright, dark, or uncontrolled environments and sometimes too bright and too dark, so image enhancement is required to produce a better image. Therefore, after converting the image into grayscale, Histogram Equalization (HE) employed on the dataset HE is a contrast enhancement technique for improving image quality in a simple and effective way (Hussain et al. 2018). Mathematical representation of histogram equalization is shown in Equation (2) where M n i ð Þ represents the number of pixels and H n i ð Þ represents the pixel to which the intensity value will be assigned as n i ð Þ (Dwipayana, Arnia, and Musliyana 2018).
The major concern in computer vision and image processing is unwanted noise reduction that distorts the vision and images. For noise removal wavelet is better technique by using the threshold value at every level of decomposition (Thukral, Kumar, and Arora 2019). As a result, noise removal was accomplished using the "Gabor Filter." A Gabor is a Gaussian filter modulated with a function that is the product of a Gaussian and an exponential value (Bovik 1991;Weldon, Higgins, and Dunn 1996). Gabor filter mathematical representation is shown in Equation (3) as below.
Finally, a spatial and frequency domain image smoothing, and sharpening technique was deployed to generate the high-quality image enhancement (Pérez-Benito et al. 2017). All image preprocessing phases are shown in Figure 2.

Multi-Class Feature Extraction
After preprocessing, the images were segmented to find the tumor's exact location by selecting Region of Interest (ROI) segmentation. There are many methods for extraction of ROI, some are automated, and some are semiautomated. For liver CT images multi-featured dataset, four types of features were extracted as histogram features, texture features, binary features and rotational, scalability and translational (RST) features.

Histogram Features
The intensity of each pixel was used to calculate histogram features. Firstorder histogram features were another name for these features. For this study, five first-order histogram features were calculated. Equation 4 describes the first-order histogram probability L(I).
T denotes the total number of pixels, and L (e) denotes the instance of the grayscale value of e. The first-order histogram features of mean, Standard Deviation (SD), skewness, energy, entropy, and others were calculated.
SD ¼ ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi Energy ¼ The mean represented the average value, as shown in Equation 5. The SD determined the image contrast as shown in Equation 6. Skewness was the asymmetry that arises when there is no symmetry around the center value, as shown in Equation 7. The energy was a distribution of grayscale values as illustrated in Equation 8, and Entropy was the total of image data content as shown in Equation 9.

Texture Features
These features are also called second-order statistical features, which are based on Gray level co-occurrence matrix (GLCM). This study comprised five texture features, which are described in equations.
The image's texture features were extracted. Equation 10 described energy.
The correlation was defined as pixel similarity at a given pixel distance, as shown in Equation 11. As stated in Equation 12, entropy represents the overall content of the image. The inverse difference shown in Equation 13 is the image's local homogeneity. The inertia was defined by the contrast, as illustrated in Equation 14.

Binary Features
Shape features are another name for binary features, which are projection, thinness, aspect ratio, Euler, center area. For this study, eight binary features are calculated with the pixel projection of 10 pixel widthwise and 10 pixel height wise. There are total 28 features computed for this study.
Area ¼ The concept of defining object area is shown in Equation 15. Centroid, which is defined as the center of the graph in terms of row and column coordinates, is described in Equations 16 and 17. Orientation is the angel between x-axis and the major axis, which is described in Equation 18 Perimeter The perimeter constitutes the image boundaries using number of pixels as indicated in Equation 19. The Euler number is the difference between the number of objects and the number of holes as shown in Equation 20.
Projection provides valuable knowledge about the object's shape, as shown in Equations 21 and 22.

Rotation, Scaling, and Translation (RST) Features
For this work, seven RST features (invariant features) were acquired. Structured information and a histogram description were used to extract these features. Domain-based features are also called spectral characteristics. Texture-based image classification can benefit from these features. These features were calculated in terms of power in various regions. Equation 23 defined Spectral region power below Multi-class features dataset for this work requires five histogram, five texture, 28 binary and seven RST features were extracted. In this way, a total of 55 multi-featured datasets was developed for each ROI. Five nonoverlapping ROIs of different pixel dimensions, 11 × 11, 13 × 13, 15 × 15, 17 × 17, 19 × 19, respectively, were developed to retain the full information of each CT image of liver tumor. A total of 55000 (1000 × 55) multi-feature dataset was produced for each ROI size based on these multi-features.

Feature Selection
Feature selection is a more significant part of ML research. This process's major objective is to select more significant features and remove less important features from the dataset. During this research, it was observed that a multi-feature dataset contains many useless features that are not valuable for liver tumor classification. This large-scale multifeatured dataset consumes a lot of processing time (Iqbal et al. 2018). This issue was resolved by making our multi-feature dataset optimized, persistent, and appropriate for error-free classification results (Abdel-Basset et al. 2020). The Principal Component Analysis (PCA) techniques produce promising results on data separated linearly since PCA supports the transformation of input data (Sarker, Abushark, and Khan 2020), also used as feature selection. The most important feature set was acquired using PCA, which contained less functionality than the original feature vector space (FVS) (Taguchi 2019). Different image fusion techniques, such as Principal Component Analysis (PCA), Discrete Wavelet Transform (DWT), and Stationary Wavelet Transform (SWT), were used by (Srivastava and Aggarwal 2018). PCA results were not impressive as compare to SWT and DWT (Srivastava, Singhal, and Aggarawal 2019). Unfortunately, because PCA could not handle massive discrete data, the optimized feature set did not accurately represent the entire dataset; moreover, the PCA approach was unsupervised, but our liver tumor CT images dataset was labeled. PCA produced less impressive results on the labeled dataset. A correlation-based feature selection (CFS) technique extracted the best feature set from the high-dimensional feature set data. This technique was better as compared to PCA and helped to produce a dataset with optimal characteristics. CFS technique was shown in Equation 24 as below: In the above equation 24, is the heuristic of subset feature T with the D feature space. Simultaneously, it described the correlation of the features and showed the average inter-correlation feature value. Projection of the with-in-class features was expressed by numerator in Equation 24, and redundancy in features was defined through the denominator of Equation 24. CFS was used in a multi-featured dataset of liver tumor CT images. It produced 20 optimized feature spaces of each liver tumor CT image. The FVS was reduced from 55000 (1000 × 55) multi-features to 20000 (1000 × 20) FVS. Finally, this optimized multiclass dataset of liver tumor CT images was used by deploying different ML classifiers with 10-fold cross-validation. Twenty optimized features were shown in Table 1.
The proposed multi-class liver tumor identification (MLTI) framework was shown in Figure 3.

Classification
Classification is the important segment during ML implication (Chauhan n.d.). For this study, we had acquired four types of liver tumor dataset and to acquire better classification accuracy four supervised ML classifiers were deployed. These classifiers are, namely, J48, RF, RT, and LMT. The RF and RT classifiers performed best among the implemented classifiers. A tree-based classifier used a random vector sampled input vector independently, and each tree cast a unit vote for the most popular class to classify an input vector (Pal 2020).
The RF classifier employed in this study grows a tree by randomly selecting features at each node. The Gini Index was employed as an attribute selection measure by the RF classifier, which quantifies the impurity of an attribute in relation to the class (Pal 2020).
Gini Index is shown in the following Equation 25 X is the probability of selected value that may belong to a class M j All experimental results are described in section 5. This section consist of results of relative experimentation previously performed and their comparison with this state of the art MLTI technique.

Results & Discussion
This study covers the use of four ML classifiers named J48, RF, RT, and LMT, which were deployed on the features using ten-fold cross-validation. For experiments, different size of ROI's were taken for each liver CT image. These four ML classifiers were deployed on 11 � 11, 13 � 13, 15 � 15, 17 � 17, 19 � 19 and 21 � 21 ROI dimensions.
It was observed that these all four classifiers produced lower accuracy of less than 35% on ROI size 11 � 11. After that, ROI size 13 � 13 was taken to deploy ML classifiers. It was observed that J48, LMT, RF, and RT produced 60.25%, 61.70%, 65.10%, and 64.52%, respectively. The accuracy produced by ML classifiers on ROI size 13 � 13 was improved as compare to ROI size 13 � 11. Among all four classifiers, RF produced better accuracy of 65.10%.
Furthermore, experiments were extended to improve classification results. These four ML classifiers were deployed on ROI size 15 � 15. The results showed that 90.10%, 91.50%, 95.08%, and 94.70% accuracy was achieved by J48, LMT, RF, and RT classifiers, respectively. The experiment on ROI size 15 � 15 produced promising results as compare to the results achieved on ROI size 11 � 11 and 13 � 13. The experiments were extended to achieve better accuracy. For this, 17 � 17 ROI size was taken and four ML classifiers were deployed. The results showed that J48, LMT, RF, and RT classifiers produced accuracy of 95.86%, 94.40%, 97.48%, and 97.08%, respectively. The classification results on ROI size 17 � 17 were more promising as compare to results on ROI size 11 � 11, 13 � 13 and 15 � 15.
Moreover, the experiments continued to produce better accuracy. For this purpose, ROI size 19 � 19 and 21 � 21 were taken. All four ML classifiers deployed for each ROI size separately. It was observed that on ROI size 19 � 19 the accuracy results decreased. All four ML classifiers produced accuracy between 80% and 85%. The ML classifiers accuracy more decreased on ROI size 21 � 21.
During experiments ML classifiers performance was evaluated for each ROI size taken. Accuracy factor was observed more critically among all other performance evaluation factor. These factors, namely, Kappa, True Positive (TP), False Positive (FP), Receiver Operating Curve (ROC), Recall, F-Measures, Precision, Root Mean Square Error (RMSE), and Mean Absolute Error (MAE). Were calculated to observe the overall performance of MLTI. Kappa statistics, which compare observed and expected accuracy, was used to assess the overall performance MLTI outcome with the deployed four ML classifiers. TP represented the MLTI outcome when predicting positive class correctly, and FP represented the MLTI outcome when miss predicting positive class, and precision relates reproduction and repetitions shown in Equation 26, and recall shows the actual retrieved amount of relevant instances, shown in Equation 27.
Finally, precision and recall were used to calculate the f-measure (f-score) of MLTI. Mathematical representation of f-measure is shown in Equation 28.
TP and FP rates represent using a graphical plot called receiver operating characteristics (ROC). The difference between observed and predicted values is known as root mean squared error (RMSE). Mean absolute error (MAE) measures how close forecasted results are to the eventual outcomes. This happened due to the threshold of classifiers refinement, confusion matrix, and time complexity. For this study, results on ROI size 13 × 13 were shown in Table 2. The four ML classifiers, namely, J48, LMT, RF, and RT produces accuracy results 60.25%, 61.70%, 65.10%, and 64.52%, respectively.
The graphical representation of accuracy to classify liver tumors using CT images on ROIs size 13 × 13 showed in Figure 4, A confusion matrix describes the performance of the ML classifiers. Table 3 shows the performance of RF classifiers, which produces promising results among other ML classifiers on ROIs size 13 × 13.    Furthermore, the results on ROI size 15 × 15 were shown in Table 4. The four ML classifiers, namely, J48, LMT, RF, and RT produces accuracy results 90.10%, 91.50%, 95.08%, and 94.70%, respectively.
The graphical representation of accuracy to classify liver tumors using CT images on ROIs size 15 × 15 showed in Figure 5.
A confusion matrix describes the performance of the ML classifiers. Table 5 shows the performance of RF classifiers, which produces promising results among other ML classifiers on ROIs size 15 × 15.
Moreover, the results on ROI size 17 × 17 were taken using ML classifiers. The results were shown in Table 6 below. It was observed that RF and RT classifiers produce promising results on ROIs size 17 × 17 compared to other ML classifiers.
The graphical representation of the accuracy achieved by different classifiers on ROI size 17 × 17 were showed in Figure 6    A confusion matrix of ROIs size 17 × 17 describes the performance of the ML classifiers. Table 7 shows the performance of RF classifiers which produces promising results among other ML classifiers. A comparison between current and the proposed techniques are shown in Table 8.
Finally, this study concluded that, performance of four ML classifiers observed. These classifiers, namely, J48, LMT, RF, and RT deployed on different ROIs size 11 � 11, 13 � 13, 15 � 15, 17 � 17, 19 � 19 and 21 � 21. Accuracy factor was used to evaluate the performance of each ML classifier. The results showed that encouraging accuracy was achieved on ROI size 13 � 13, 15 � 15, 17 � 17. ML classifiers could not achieve promising results on ROI size 11 � 11, 19 � 19 and 21 � 21 due to unwanted region of liver tumor. These unwanted regions decreased the accuracy of ML classifiers. It was also observed among all four classifiers RF and RT produced encouraging results for each ROI size 13 � 13, 15 � 15, 17 � 17. The graphical representation of accuracy achieved by RF and RT showed in Figure 7 below.
As mentioned earlier, RF and RT produced promising results on ROIs size 13 � 13, 15 � 15, 17 � 17. Among these two classifiers RF produced higher accuracy on ROI size 17 � 17 using multi-featured liver CT images dataset. Therefore, our proposed framework MLTI produced promising results for the classification of liver tumor using CT images dataset. Our proposed framework MLTI classify liver tumor into benign (hemangioma and cyst) and malignant (hepatocellular carcinoma and   Table 8 showed the comparison of MLTI with already existing techniques already deployed for the classification of liver tumor. Therefore, in the comparison Table 8, our proposed framework MLTI classifies liver tumors using multi-feature dataset of liver CT images more accurately. This will help physicians to identify liver tumors more accurately.