1 Introduction

It is believed that liver cancer forms in liver tissues and spreads there from other body parts [1]. When liver cancer is not detected promptly, it can cause severe complications and even death. Over 700,000 people die each year from liver cancer [2]. As a result, it is the leading cause of cancer death worldwide, and males have twice as high a risk as females [3, 4]. Radiologists and oncologists detect liver abnormalities with computed tomography (CT) and magnetic resonance imaging (MRI) [5]. The capture process of electronic devices produces distorted unclear objects, non-uniform intensity, and vague boundaries in CT scans or MRI images [6].

Tissues surround liver tumours; it is difficult for radiologists to determine their location. Performing a manual liver tumour diagnosis is time-consuming and inaccurate, delaying diagnosis and efficiency. The method is error-prone when it comes to classifying liver tumours. Noise, blurriness, and vague boundaries are common characteristics of medical images. There is inaccuracy and uncertainty in the edges of the different tumours in the liver image and in the descriptions of the tumours.

Using computer-assisted diagnosis (CAD) improves the accuracy of the characterization of liver tumours and lesions [1]. CAD systems help physicians diagnose liver lesions automatically, but it is difficult to identify their exact size. Applying soft computing and fuzzy logic could provide more clarity on tumours [7]. Soft computing techniques have been proposed for the extraction of liver features in some studies. Particle swarm optimization was applied to classify liver lesion features based on a bidirectional empirical mode decomposition [8]. Using edge-enhancing diffusion filtering and intensity-based registration, another study used anisotropic filtering followed by adaptive thresholding to segment tumours [9].

It used a region of interest (ROI)-based histogram for segmentation and a grey-level co-occurrence matrix to classify liver tumours to extract features from the liver images [10]. In [11], authors proposed an improved support vector machine (SVM) algorithm to cope with the underfitting and overfitting problems, but they encountered problems with linear mapping. The linear mapping of the score vector causes the SVM classifier to exaggerate data fitting issues. Fuzzy SVM calculates the feature scores for the ROI parts, which helps get better classification results and efficiently differentiate tumours.

The liver lesions are diagnosed into three categories such as meningioma, hepatocellular carcinoma, and metastatic carcinoma. To segment liver tumours, unsupervised machine learning-derived metastatic unsupervised segmentation is used [12]. Using SVM-based ANOVA and Modified Extreme Learning (MEL), liver cancers were classified, and region segmentation was used to segment liver CT abdomen images [13, 14]. There is more uncertainty in type 2 fuzzy set-based FCM when compared to type 1 fuzzy set-driven FCM [15]. A variant of FCM is proposed to eliminate noise, and the term credibility is introduced [16]. Using the entropy and hesitation degree of the membership function, an intuitionistic fuzzy set theory was presented [17].

It is susceptible to noise and results from incorrect segmentation, which makes fuzzy clustering with C-Means (FCM) ideal for many clustering problems [18]. FCM algorithms use Euclidian distance for finding the distance between data points and cluster centres, but the Euclidian distance can only detect spherical clusters. This study compared liver images with those in existing studies based on fuzzy logic. Fuzzy entropy was applied to map the original liver image, then its characteristics were considered. We enhanced the liver image using local information by extracting textual and edge information later.

Hyper tangent FCM (HTFCM) was proposed as an improved version of FCM; it computes data point distance from cluster canters using hyper tangent distance, enhancing the quality of liver image diagnosis with fuzzy segmentation. We reduced the noise in liver images by improving the Type 2 fuzzy concept. After hyper tangent segmentation has been applied, liver images are segmented using hyper tangents. Features are extracted to distinguish the tumours, and FSVM is used to classify the tumours.

1.1 Research contribution

The main contribution of the present study is:

  1. 1.

    In this study, we considered the LiTS, CHAOS and custom tumour dataset for liver tumours classification

  2. 2.

    To detect liver cancer in the CT scan liver image, we applied state-of-the-art segmentation models such as FCM, KPCM, IFCM and PFCM. We propose a hyper tangent FCM model and compare the proposed with the state-of-the-art segmentation models.

  3. 3.

    We applied the intensity and the textual feature extraction techniques

  4. 4.

    The experimental results are compared with the baseline classification models like SVM and Random Forest. We compared the proposed with the state-of-the-art classification models using the accuracy, sensitivity, and specificity classification performance metrics.

  5. 5.

    The proposed model surpassed the state-of-the-art models by 2–12% accuracy and processing time by 2-25 ms.

We organized the rest of the paper as follows. Section 2 goes with the material collection and the novelty followed in this research. Section 3 describes the experimental results, analyses the proposed improved optimization model behavior, and presents the results. Section 4 discusses the antecedents of diabetic retinopathy and their limits and overcome that limitation in the present research. Section 5 concludes the paper.

2 Materials and methodology

2.1 Materials

We collected 1200 CT images from LiTS [19], 3DIRCADb-1 (https://www.ircad.fr/research/data-sets/liver-segmentation-3d-ircadb-01/), CHAOS (https://explore.openaire.eu/search/dataset?pid=10.5281%2fzenodo.3362845), custom dataset. The collected dataset consists of all stages of liver cancer: 200 normal images, meningioma hepatocellular 300, and 300 metastatic CT images. We split the dataset as 80% for training and 20% for testing. The distribution of the collected dataset with CT categorical classification can be found in Table 1.

Table 1 Dataset distribution for this study

2.2 Methodology

The main objective of this study is to classify liver lesions into meningioma, hepatocellular carcinoma, and metastatic carcinoma. The proposed study is organized into four stages: Image preprocessing, segmentation, feature extraction and classification. Figure 1 shows the block diagram of the proposed study.

Fig. 1
figure 1

Block diagram of the proposed research

The noise and outliers in the liver images are removed, and the contrast of the liver image is improved in the image preprocessing stage. Next, the liver and the lesion regions are segmented. Later from the segmented liver images, features are extracted from the liver and the tumour. Finally, based on the extracted feature differences, the tumours are classified using the classifier. Figure 2 shows the flow of the present research,

Fig. 2
figure 2

Flow diagram of the proposed study

2.2.1 Image enhancement

First, we converted all the liver images to grey-level images. Then the image enhancement is categorized as image normalization, image fuzzification, edge information and textual extraction. Figure 3 shows the difference between before performing the image processing and after image preprocessing.

Fig. 3
figure 3

(a) Before preprocessing (b) After preprocessing

Image normalization

The range of the intensities in the liver image vary largely. So, we normalize the liver images by mapping the image intensity levels into the range [\({O}_{min,}{O}_{max}\)]

$$\mathrm{O}(x,y)={O}_{min} +\frac{\left({O}_{max}-{O}_{min}\right)*{(O}_{g}\left(x,y\right)-{O}_{gmin})}{{O}_{gmax}-{O}_{gmin}}$$
(1)

where \({O}_{min}=0 and {O}_{max}=255.{ O}_{gmax}\) and \({O}_{gmin}\) are the maximum and the minimum intensity levels of the original liver image. \({O}_{max} and{ O}_{min}\) are the maximum and the minimum intensity levels of the normalized liver image.O (\(i,j\)) and \({(O}_{g}\left(i,j\right)\) are the liver image levels of pixels(x,y) after and the before the normalization.

Image fuzzification

We applied the S-membership function [20] to the gray level liver images which maps all the elements of into the real numbers in [0,1].

$$\mathrm{S}(r:\mathrm{i},j,m)=\left\{\begin{array}{c}0;r\le i\\ \frac{\left(g-i\right)}{\left(j-i\right)(m-i)};i\le r\le j\\ 1-\frac{\left(r-m\right)}{\left(m-j\right)\left(m-i\right)};j\le r\le m\\ 1;r\ge m\end{array}\right.$$
(2)

The values in the above specified membership function represent the brightness of the pixel intensities of the liver image.

In liver images, the tissues and the tumors belong to the foreground and the all the remaining are considered as the background. From Eq. (2), the middle point j is determined as the image background classification [21] using the entropy [22]

Let \({B}_{x}\) be the gray level probability distribution \(x\),\(x\) =1, 2…N.\({T}_{b}\) is the below the threshold h,\({T}_{a}\) is the above the threshold with maximum intensity N of the liver image. The output distribution is determined using the entropy and it is mathematically represented as:

$${T}_{b}\left(h\right)=-\sum\nolimits_{x=1}^{b}\frac{{b}_{x}}{{B}_{b}}\mathit{ln}\frac{{b}_{x}}{{B}_{b}}$$
(3)
$${T}_{a}\left(h\right)=-\sum\nolimits_{x=a+1}^{N}\frac{{b}_{x}}{1-{B}_{b}}\mathit{ln}\frac{{b}_{x}}{{1-B}_{b}}$$
(4)
$$\begin{array}{cc}\mathrm{where}& {B}_{b}= \sum_{x=1}^{b}{b}_{x}\end{array}$$
(5)

The entropy is represented as

$${h}^{*}=Ar\;gma{x}_{x=1}^{N}\left\{{B}_{a}\left(t\right)+{B}_{b}\left(t\right)\right\}$$
(6)

Here \({h}^{*}\) is the S member function middle point optimal threshold. Later we converted the image into the fuzzy domain using the S member function

$$\beta \left(x,y\right)=\mathrm{ S}(\mathrm{O}(x,y):i,{h}^{*},m)$$
(7)
$${g}_{h}\left(p\right)=\sum\nolimits_{p=0}^{\begin{array}{c}0\le y<\le B-1\\ \begin{array}{c}\mathrm{max}\left(O\left(x,y\right)\right)\\ 0\le x\le B-1\end{array}\end{array}}\delta \left(O\left(x,y\right)-p\right)$$
(8)
$$\delta \left(h\right)=\left\{\begin{array}{l}0;\;h=0\\ 1;\;otherwise\end{array}\right.$$
(9)

where \(O\left(x,y\right)\) pixel intensity for pixel \(\left(x,y\right)\), \({g}_{h}\left(p\right)\) is the liver gray image histogram, \(p\) is the gray level.

Edge normalization

We applied the edge operator to the fuzzified liver image to extract the edge features of the liver images. The mathematical form of the edge operator is:

$${d}_{\beta }\left(x,y\right)=\frac{{\delta }_{\beta }(x,y)-{\delta }_{\beta min}}{{\delta }_{\beta max}-{\delta }_{\beta min}}$$
(10)

where \({\delta }_{\beta min}\)=min(\({\delta }_{\beta }(x,y)\)) and \({\delta }_{\beta max}\)= max(\({\delta }_{\beta }(x,y)\)) 0 \(\le x\le height-1\), 0 \(\le y\le width-1\), width and height are the liver images width and height.\({\delta }_{\beta }(x,y)\) computed using the sobel operator [23].

Masking

We applied four masks to determine the region of interest to highlight the edge and spot features. For this we used three vectors A = (1,3,5,3,1) B = (-1,0,2,0,-1) C = (-1,-2,0,2,1)

$${A}^{T}B=\left[\begin{array}{ccccc}1& 0& 2& 0& -1\\ -3& 0& 6& 0& -3\\ -5& 0& 10& 0& -5\\ -3& 0& 6& 0& -3\\ -1& 0& 2& 0& -1\end{array}\right]$$
(M1)
$${A}^{T}C=\left[\begin{array}{ccccc}1& -2& 0& 2& 1\\ -3& -6& 0& 6& 3\\ -5& -10& 0& 10& 5\\ -3& -6& 0& 6& 3\\ -1& -2& 0& 2& 1\end{array}\right]$$
(M2)
$${B}^{T}A=\left[\begin{array}{ccccc}1& -3& -5& -3& -1\\ 0& 0& 0& 0& 0\\ 2& 6& 10& 6& 2\\ 0& 0& 0& 0& 0\\ -1& -3& -5& -3& -1\end{array}\right]$$
(M3)
$${C}^{T}A=\left[\begin{array}{ccccc}-1& -3& -5& -3& -1\\ -2& -6& -10& -6& -2\\ 0& 0& 0& 0& 0\\ 2& 6& 10& 6& 2\\ 1& 3& 5& 3& 1\end{array}\right]$$
(M4)
$${f}_{\beta }\left(x,y\right)=\frac{abs\left({f}_{\beta {A}^{\mathrm{\top }}B}\left(p,q\right)\right)}{{f}_{\beta {A}^{\mathrm{\top }}{B}_{max}}}* \frac{abs\left({f}_{\beta {A}^{\mathrm{\top }}C}\left(p,q\right)\right)}{{f}_{\beta {A}^{\mathrm{\top }}{C}_{max}}} * \frac{abs\left({f}_{\beta {B}^{\mathrm{\top }}A}\left(p,q\right)\right)}{{f}_{\beta {B}^{\mathrm{\top }}{A}_{max}}} *\frac{abs\left({f}_{\beta {C}^{\mathrm{\top }}A}\left(p,q\right)\right)}{{f}_{\beta {C}^{\mathrm{\top }}{A}_{max}}}$$
(11)

where \(f_{\beta A^\top B_{max}}=max(abs\left(f_{\beta A^\top B}\left(p,q\right)\right))\) and \({f}_{\beta {A}^{\mathrm{\top }}{C}_{\mathrm{max}}}=\mathrm{max}({f}_{\beta {A}^{\mathrm{\top }}{C}_{\mathrm{max}}})\) and \({f}_{\beta {B}^{\mathrm{\top }}{A}_{\mathrm{max}}}=\mathrm{max}(abs\left({f}_{\beta {B}^{\mathrm{\top }}A}\left(p,q\right)\right))\) and \({f}_{\beta {C}^{\mathrm{\top }}{A}_{\mathrm{max}}}=\mathrm{max}({f}_{\beta {C}^{\mathrm{\top }}{A}_{\mathrm{max}}})\) 0 \(\le q\le height-1\), 0 \(\le p\le width-1\)

Contrast enhancement

We measured the local mean of the texture and edge extraction in the fuzzy domain to improve the contrast of the image

$${C}_{\beta }\left(x,y\right)=\frac{\left|\beta (x,y)-{\overline{\beta }}_{d}(x,y)\right|}{\left|\beta (x,y)+{\overline{\beta }}_{d}(x,y)\right|};$$
(12)
$${\overline{\beta }}_{h}\left(x,y\right)=\frac{\sum_{p=x-\frac{(h-1)}{2}}^{x+\frac{(h-1)}{2}}\sum_{q=y-\frac{(h-1)}{2}}^{y+\frac{(h-1)}{2}}\beta \left(p,q\right)*{f}_{\beta }\left(p,q\right)*{d}_{\beta }(p,q)}{\sum_{p=x-\frac{(h-1)}{2}}^{x+\frac{(h-1)}{2}}\sum_{q=y-\frac{(h-1)}{2}}^{y+\frac{(h-1)}{2}}{f}_{\beta }\left(p,q\right)*{d}_{\beta }(p,q)};$$
(13)

where \({\overline{\beta }}_{d}\left(x,y\right)\) is the window local mean centered at location \(\left(x,y\right)\) with size \(h\) X \(h\).

Defuzzification

The enhanced pixel intensity can be obtained by the inverse function \({S}^{-1}\)(\({\beta }{\prime}\left(x,y\right)\):\(i,j,m\))

$$\begin{array}{l}{O}^{\mathrm{^{\prime}}}\left(x,y\right)= {S}^{-1}({\beta }^{\mathrm{^{\prime}}}\left(x,y\right):\mathrm{i},j,m)\\\;\;\;\;\;\;\;\;\;\;\;\;\;\; ={O}_{min}+\frac{{O}_{max}-{O}_{min}}{m-i}\sqrt{{\beta }^{\mathrm{^{\prime}}}\left(i,j\right)*(j-i)(m-i)} ; 0{\le \beta }^{\mathrm{^{\prime}}}\left(i,j\right)\le \frac{j-i}{m-i}\\ \;\;\;\;\;\;\;\;\;\;\;\;\;\;={O}_{min}+\frac{{O}_{max}-{O}_{min}}{m-i}(m-i-\sqrt{{1-\beta }^{\mathrm{^{\prime}}}\left(i,j\right)*(m-j)(m-i)} ; \frac{j-i}{m-i}{\le \beta }^{\mathrm{^{\prime}}}\left(i,j\right)\le 1\end{array}$$
(14)

2.2.2 Tumor segmentation

HTFCM is the alternative solution to the limitations of the FCM.HTFCM clusters the data based on the hyperbolic distance between the data points and the cluster centres. Next, it allocates the membership values to the data points and these points are assigned to the clusters that are the highest membership degree. The mathematical form of the HTFCM is

$$\begin{array}{l}g\left(x\right)=\sum_{p=1}^{m}\sum_{q=1}^{k}{\beta }_{pq}^{n}{\delta }_{{c}_{pq}^{2}};\\ \;\;\;\;\;\;\;\;=\sum_{p=1}^{m}\sum_{q=1}^{k}{\beta }_{pq}^{n}{\Vert \delta \left({a}_{q}\right)-\delta \left({b}_{p}\right)\Vert }^{2};\\ \;\;\;\;\;\;\;\;=\sum_{p=1}^{m}\sum_{q=1}^{k}{\beta }_{pq}^{n}{\Vert 1-K\left({{a}_{q},b}_{p}\right)\Vert }^{2};\end{array}$$
(15)
$$\mathrm{Where}\;K\left({a_q,b}_p\right)=1-tanh\left(-\frac{{\Arrowvert a_q-b_p\Arrowvert}^2}{\sigma^2}\right)$$
(16)
$${\beta }_{pq}=\frac{1}{\sum_{p=1}^{m}\left(\frac{{\delta }_{{C}_{pm}^{2}}}{{\delta }_{{C}_{pm}^{2}}}\right)\frac{1}{n-1}}$$
(17)
$$\mathrm{and}\;b_q=\frac{\sum_{q=1}^k\beta_p^n\cdot a_p}{\sum_{q=1}^k\beta_p^n}$$
(18)

and \({a}_{q}\) is the data point.

Algorithm 1 gives the details about the proposed HTFCM, and Fig. 4 shows its flow diagram.

Fig. 4
figure 4

Flow chart for the proposed segmentation

Algorithm 1
figure a

Proposed HTFCM

2.2.3 Feature extraction

The feature extraction phase characterizes the lesion in the liver images. For liver images, the tissues surround the tumour region, and to signify the difference, we use the intensity and texture features. Intensity features are mean, standard deviation, skewness, and kurtosis and the Texture features are wavelet and Gabor energy.

2.2.4 Intensity features

  1. (a)

    Mean

    $$\mathrm{Mean}(\mathrm{E})=\frac{1}{M}\sum_{\left(pq\right)\in R}T\left(p,q\right);$$
    (19)

    where M is the total no: of pixels in the liver image, T is the total no: of pixels in region of interest (p,q) are the pixel gray level at position p and q.

  2. (b)

    Standard deviation

    $$\mathrm{S}=\sqrt{\frac{{\sum_{\left(pq\right)\in R}(T\left(p,q\right)-E)}^{2}}{M};}$$
    (20)

    E is the mean of the liver image.

  3. (c)

    Kurtosis

    $$\mathrm{Kurtosis}=\frac{1}{M}\frac{{\sum_{\left(pq\right)\in ROI}(T\left(p,q\right)-E)}^{4}}{{S}^{4}}$$
    (21)
  4. (d)

    Skewness

    $$\mathrm{Skewness}(\mathrm{N})=\frac{1}{M}\frac{{\sum_{\left(pq\right)\in ROI}(T\left(p,q\right)-E)}^{3}}{{S}^{3}}$$
    (22)

2.2.5 Tumor classification

The extracted features are the input to the fuzzy SVM [24] to classify the liver tumour images. We categorized the tumours into meningioma, hepatocellular carcinoma, and metastatic carcinoma. The fuzzy SVM uses feature vectors to calculate the feature score for ROI, which helps in classifying the tumours.

For a classification set with fuzzy membership function F = {(\({p}_{1},{q}_{1},{\beta }_{1}\)),….(\({p}_{i},{q}_{i},{\beta }_{i},\)),…….(\({p}_{n},{q}_{n},{\beta }_{n}\))} where \({p}_{i}\epsilon {\mathbb{R}}^{n}\) and \({q}_{i}\in Q\),\(Q\)={+ 1,-1},\({\beta }_{i}\) is the membership function for the sample \({p}_{i}\) belonging to \({q}_{i}\) and \(0\le {\beta }_{i}\le 1\) and the hyperplane is defined as \({T}^{W}\cdot \phi \left(p\right)+a=0\) to separate the samples and maximize the margin.

The mathematical representation of the FVSM classifier is

$$g\left(p\right)=S\left|\sum_{j=1}^{m}{{q}_{i}\beta }_{i}^{*}K({p}_{i}.p)+{a}^{*}\right|;$$
(23)

where \({a}^{*}{and \beta }_{i}^{*}\) and represents the bias and the Lanrange multiplier and \({\beta }_{i}^{*}\)>0 is the support vector.

For multi class classifier one against other(OAO) [23] is defined in this study. For a set of n classes,(\({p}_{i},{q}_{i},{\beta }_{i},\)), i = 1,2,…..\({p}_{i}\epsilon {\mathbb{R}}^{n}\) and \({q}_{i}\in Q\),\(Q\)={+ 1,-1}.

The steps for OAO procedure are:

  1. 1.

    One class is taken as the positive class and the remining (n-1) classes are considered as negative class.

  2. 2.

    Construct a binary FSVM classifier and name it as FSVM1;

  3. 3.

    Exclude the first class and turn to (n-1) class for classification and later construct FSVM classifier for the remaining (n-1) classes

  4. 4.

    (n-1) FSVMs has been constructed for n class classification

For each training sample calculate the fuzzy membership based on the distance between it and classification hyperplane and cluster center.

$${\beta }_{i}=\left\{\begin{array}{c}1-\frac{c({p}_{i})}{m+\delta };c({p}_{i})\le C\\ \left(1-\frac{C}{m+\delta }\right).\left(\frac{1}{1+c\left({p}_{i}\right)-C}\right);c({p}_{i})>C\end{array}\right.$$
(24)

where \({\beta }_{i}\) represents the fuzzy membership for the sample \({p}_{i}\). \(c({p}_{i})\) is the distance between the sample \({p}_{i}\) and the cluster center \({p}_{0}\) and it is represented as ||\({p}_{i}-{p}_{0}\)||. M represents the radius of the sample cluster and it is represented as max||\({p}_{i}-{p}_{0}\)|| where \({p}_{0}\) is the hyperplane and \({p}_{i}\) locates on the same side of\({p}_{0}\). \(\delta\)=0.1 and C is the distance between the hyperplane and the cluster center.

Algorithm 2 gives the details about the improved algorithm used for the classification in this research and the Fig. 5 shows the flowchart for the flow of that algorithm.

Fig. 5
figure 5

Flow chart for IFSVM

Algorithm 2
figure b

Proposed FSVM

3 Experimental results

All the experiments are implemented using python on a computer with configuration Intel core i7@2.00 GHz, 8 GB RAM. A model was built for testing the conventional fivefold cross validation was taken into account.

3.1 Evaluation metrics

$$\mathrm{DICE}=\frac{2*\left|TP\right|}{\left|TP\right|+\left|FN\right|+\left|FP\right|}$$
(25)
$$\mathrm{Rand}\;\mathrm{Index}=\frac{Correct\;similar\;pairs+correct\;dissimilar\;pairs}{Total\;number\;of\;pairs}$$
(26)
$$\mathrm{Hausdroff}\;\mathrm{distance}=\max(\begin{array}{c}max\\p\in P\end{array}\begin{array}{c}min\\q\in Q\end{array}{\Arrowvert p-q\Arrowvert}_2,\begin{array}{c}max\\q\in Q\end{array}\begin{array}{c}min\\p\in P\end{array}{\Arrowvert p-q\Arrowvert}_2)$$
(27)
$$\mathrm{Accuracy}=\frac{\left|TP\right|+\left|TN\right|}{\left|TP\right|+\left|FN\right|+\left|TN\right|+\left|FP\right|}$$
(28)
$$\mathrm{Precision}=\frac{\left|TP\right|}{\left|TP\right|+\left|FP\right|}$$
(29)
$$\mathrm{Recall}=\frac{\left|TN\right|}{\left|TN\right|+\left|FP\right|}$$
(30)
$$\mathrm{F}1-\mathrm{score}=\frac{2*Precision*Recall}{\left|Precision\right|+\left|Recall\right|}$$
(31)

3.2 Liver tumor segmentation evaluation

Due to the vagueness of the medical images, all the state-of-the-art models except the proposed model cannot detect blood clots. Figure 6 compares the segmented region of interest proposed with the state-of-the-art models. The proposed model rejects the unwanted tissues and areas and detects the tumour regions only. Figure 4 shows that the proposed model could obtain the segmentation results almost closer to the ground truth. Figure 6 shows that the PFCM model does not precisely recognize the tumour region. After comparing all model results with the ground truths, we identified that the proposed model almost accurately detects the exact shape and size of the tumour region. The proposed model surpasses every state-of-the-art model in that the remaining models detect the tumour regions in the liver image. However, the size and shape of the tumour are not accurate compared to the ground truth.

Fig. 6
figure 6

Comparison of segmented ROI of proposed with the state-of-the-art models for Custom dataset (a) Original Image (b) Ground truth (c) Proposed (d) IPFCM (e) PFCM

Figure 7 represents the performance analysis of the proposed segmentation results for the dataset 3DIRCADb01, LiTS, CHAOS, custom. We evaluated the different experiments by considering various measures, including Dice, rand index accuracy, precision, recall and accuracy. We also assessed the five experimental results.

Fig. 7
figure 7

Segmentation analysis of the dataset (a) 3DIRCADb01 (b) LiTS (c) CHAOS (d) custom

We compared the segmented region of interest proposed with the state-of-the-art models and tabulated the results in Table 2. We compared the segmentation results of liver tumours proposed with the otsu, FCM, IFCM, PFCM, IPFCM, HDensenet, and K-Means. Table 2 tabulated the accuracy and the processing time of the state-of-the-art models. For 3DIRCADb01, the proposed obtained an accuracy of 99.18%, followed by Resnet with an accuracy of 99.02%, then Otsu with an accuracy of 98.51% and IPFCM with an accuracy of 97.84%. The processing time for the proposed segment of the liver image is 8 s, followed by Resnet and IPFCM at 9 s and PFCM at 10 s. The accuracy of the proposed model surpasses other existing state-of-the-art models by 2–10% and reduces the processing time by 2-14 s.

Table 2 Comparison of accuracy and processing time of segmented image of the proposed with state of the art models

3.3 Liver tumor classification evaluation

The tumour’s crucial features are tested and trained by FSVM. All the features are extracted from the collected region of interest. Later the feature selection process is carried out to optimize the feature set. Finally, the optimized features are used to train and test the FSVM. Figure 8 shows the confusion matrix for performing the multiclass classification of liver diseases.

Fig. 8
figure 8

Confusion matrix

After the segmentation of the liver tumour region, features are extracted separately. The classifier classifies the liver tumour from the obtained features into meningioma, hepatocellular carcinoma, and metastatic carcinoma. We compared the proposed classification performance with the state-of-the-art models and tabulated the results in Table 3.The classification accuracy obtained by the state of the art models(Random forest, Randomized tree, J48, KNN, SVM, Naïve Bayes) are 90.74%, 94.71%, 95.47%, 91.43%, 96.48%, 91.84%.The proposed HTFCM with FSVM achieved the uppermost classification accuracy. The proposed model achieved precision and Recall of 98.36% and 1.00%.

Table 3 Classification comparison of proposed with state of the art models

The requirement for training and the testing time of various algorithms are tabulated in Table 4. From the results, we observed that the proposed model has less movement and testing time for input liver images.

Table 4 Training and Testing analysis

The analysis is carried out on various k-fold cross-validations. Table 5 tabulates the values of the study of the proposed model with the state-of-the-art models by considering different cross-validations. The table tabulates the other splits of the training and testing sets with cross-validation analysis. The results show that the proposed achieved an accuracy of 98.73% for a 70-30 split, 99.58% for an 80-20 division and 99.29% for a 90-10 split. This reveals that the split plays a vital role in classification accuracy.

Table 5 Cross validation analysis

4 Discussion

The study aimed to detect liver cancer and classify tumours using CT scans. Early lung cancer indicators include enlarged and widened nodules, the primary visual features radiologists observe. When lung cancer is in its early stages, the inside structure and the borders of the lungs appear very subtle. As a result, diagnosis becomes very challenging, and identifying abnormal and normal regions becomes difficult.

A hyper tangent FCM was proposed to segment the liver images to detect the tumour region from a CT scan liver tumour. This study first processed the noise in the liver images using fuzzy image preprocessing and converted the liver images to a fuzzy set. The processed image is segmented using the proposed hyper tangent FCM to detect the tumours in the liver images. The proposed model ceases the effect of outliers during the clustering process. The proposed HTFCM is evaluated and compared its performance with state-of-the-art FCM models. This analysis proves that the proposed model surpassed the other state-of-the-art models. Finally, classified the extracted features and compared the classification accuracy with the state-of-the-art models.

Liver image enhancement is critical for radiologists and CAD systems. By using fuzzy logic and liver image characteristics, we implemented image enhancement. We identified tumour features scattered throughout the liver image using edge and texture information and mapped them to maximum fuzzy entropy. When the FCM considers membership categories category-wise, data points are abnormal. A traditional clustering method cannot handle noise and outliers in medical images. We used hyper tangent clustering to segment medical images. Unfortunately, the image could not be extracted in its entirety.

FSVM performance was compared with classical SVM, and all features were used for the classifiers in these experiments. In FSVM, every training image is assigned a membership, which weakens the influence of noise and outliers on classification accuracy. In the current input features and data, the fuzzy theory improves the classification performance of SVM better than classical SVM.

Standard FCM does not eliminate the noise and outliers in the medical images. A hyper tangent FCM enables the recognition of outliers, minimises the outliers' effect, and ceases it. It further detects and extracts the outliers in the medical image segmentation. The proposed framework delivered excellent results very quickly and efficiently. It can also be tried with tumours other than liver tumours, as the hyper tangent FCM showed promising results.

Chlebus et al. [34] classified DR using Random forest and achieved accuracy of 90.74%, sensitivity of 75.46%, specificity of 89.46%, F1-score of 78.83%. Jansen et al. [35] used the Randomized tree and achieved accuracy of 94.71%, sensitivity of 77.94%, specificity of 92.54%, F1-score of 77.95%. Das et al. [11] proposed a hybrid model WGDL+ GMM+DNN and achieved accuracy of 99.38%, sensitivity of 77.33%, specificity of 92.78%, F1-score of 78.14%. Dong et al. [36] proposed a novel model HFCNN and achieved accuracy of 97.22%, sensitivity of 78.48%, specificity of 92.98%, F1-score of 78.27%. Soler et al. [37] developed a CascadedCNN model and achieved accuracy of 94.21%, sensitivity of 91.43%, specificity of 97.38%, F1-score of 84.73%. Othman et al. [38] proposed a novel DeeplapV3 model and achieved accuracy of 99.50%, sensitivity of 89.45%, specificity of 93.56%, F1-score of 79.78%.

The proposed framework correctly detects most parts of the tumour with an accuracy of 99.18% for tumour segmentation and 98.58% for tumour classification. But still, some false positives could be improved by applying false positive filters on a large dataset. The framework could be improved to handle all types of datasets and will make more widely accepted by hospitals or other institutes. In addition, we considered a limited dataset, and future research should be carried out to increase the dataset size.

5 Conclusion

This study proposed a hyper tangent FCM to segment the liver images to detect the tumour region from a CT scan liver tumour. This study first processed the noise in the liver images using fuzzy image preprocessing and converted the liver images to a fuzzy set. The processed image is segmented using the proposed hyper tangent FCM to detect the tumours in the liver images. The proposed model ceases the effect of outliers during the clustering process. The proposed HTFCM is evaluated and compared its performance with state-of-the-art FCM models. This analysis proves that the proposed model surpassed the other state-of-the-art models. Finally, classified the extracted features and compared the classification accuracy with the state-of-the-art models.

The tumours exist in different shapes and sizes; we will try to plug a mechanism to incorporate the position and the channel feature information and capture more spatial information in the intra-slices and inter-slices of the 3D medical data. Due to the different layer thicknesses of the data, there is an individual difference in the abdominal features there is a need to solve the continuity of adjacent layers. It is necessary to standardize the imaging parameters and collect more data to establish training in future datasets to optimize further and improve the segmentation results. In future work, the segmentation and classification accuracy could be improved by introducing different research models for segmentation and classification.