Open-access Computer-Aided Polyps Classification from Colonoscopy Using Stacking-Based Deep Learning Model

Abstract

Colorectal cancer is responsible for a high proportion of cancer mortality. The most effective way to avoid colorectal cancer is to have a colonoscopy. However, not every polyp in the colon is prone to cancer. As a result, different techniques are employed to classify polyps. A video endoscopy can diagnose stomach ulcers, bleeding, and polyps. Doctors spend a lot of time reviewing medical video endoscopy images. The challenge of diagnosing images manually has spurred research into computer-assisted methods that can accurately and swiftly assess any created image. The suggested approach develops a framework for identifying digestive problems. The methods and treatment plan would be determined by the gastrointestinal state classification. In the present study, publicly accessible datasets, such as Kvasir, in used. In the Kvasir dataset, 5000 images are evenly distributed across five different digestive tract-related categories: ulcerative colitis, dye-lifted polyps, resection margins, normal cecum, and polyps. Preprocessing is done to improve the quality of the images and reduce the noise. These improved images were employed using deep learning networks. The present study proposes a stacking ensemble approach to boost the model's accuracy for prediction. The ensemble approach included five meticulously tuned deep convolutional neural network architectures, namely Xception, ResNet-101, VGG-19, EfficientNetB2v3, and MobileNetV2. These models were trained using weights obtained from the ImageNet dataset. Highest accuracy of 96.50% was achieved using meta models based on K-nearest neighbour (K-NN) method.

Keywords:
Gastrointestinal disorders; Colonoscopy images; Deep learning; stacking techniques.

HIGHLIGHTS

Proposed a computer-assisted method for accurately and swiftly diagnosing digestive problems from medical video endoscopy images.

stacking ensemble approach proposed to improve the performance of the model.

compare the performance of different deep convolutional neural network architectures for this task.

INTRODUCTION

Worldwide, colon cancer (CRC) ranks second in terms of cancer-related mortality [1]. To detect colon cancer early on, a colonoscopy is one of the best preventative measures. The large intestine (colon) can be examined during a colonoscopy by inserting a flexible tube into the rectum. The doctor can examine the colon thanks to a small camera that is connected to the end of the tube [2]. Colonoscopies can detect and evaluate polyps of different sizes and forms that originate from benign or malignant mucosal surfaces.

A colon polyp is an abnormal growth of malignant tissue in the intestines and digestive tract. Polyps do not cause any symptoms unless they reach a specific size. Polyps, on the other hand, can be avoided and treated if they are discovered at an early stage [3-4]. One study found that endoscopy reduced the mortality rate and improved the diagnosis of colon polyps [4]. Color and texture alterations in the intestinal mucosa can be detected by endoscopy, allowing for the evaluation of polyps' severity [5]. Finding the disease in only a subset of hundreds of gastrointestinal (GI) video images is an impossible task for any clinician. So, the precision of a diagnosis is dependent on the doctor's level of training and expertise. There is a risk of colorectal cancer since over 27% of colonoscopies fail to detect polyps [6]. Polyps with a measurement of 5 mm or less, 5-10 mm, or 10 mm or more had missing rates of 35.4%, 18.8%, and 4.9%, respectively, according to research by Kim and coauthors [42]. The colonoscopist is more prone to missing smaller polyps. Fatalities in patients may occur when polyps go undetected. Reducing the risk of colorectal cancer requires the colonoscopist to identify and remove any polyps that are likely to be malignant.

Human mistakes and practitioner shortages might create false positives. However, computer-aided polyp identification can successfully detect cancer early [65]. In some medical areas, AI algorithms can detect diseases that manual examination cannot detect [7-9]. For instance, AI can extract complex microscopic images and record important endoscopic properties. In therapeutic settings, AI algorithms can distinguish malignant from healthy tissue. Cancer risk can be assessed by tissue removal [10,15]. Tissue features from colonoscopy images can classify ulcerative colitis. The diagnosis is less accurate since intestinal disorders are hard to recognize. For illness identification, machine learning retrieves texture, color, and edge pictures. Deep learning has been shown to be accurate by diagnostic imaging experts [58-64]. Hence, automated endoscopic image diagnosis using deep learning algorithms might outperform human experts [11, 12]. Classification studies of polyps are rare. However, not all polyps pose a threat, therefore proper categorization is essential. It is safer and less expensive to perform endoscopic removal if both cancerous and non-cancerous polyps can be detected. According to this research, polyps can be categorized into five types: dye-lifted, normal cecum, polyps, ulcerative colitis, and dyed resection margins.

Previous polyp categorization investigations employed computer vision and machine learning. Medical diagnostic polyp localization, segmentation, and identification have improved with deep learning algorithms. Thus, deep neural network polyp classification was used in this investigation. Enhancing performance requires preprocessing. For preprocessing, we used CLAHE to boost image contrast. It achieves its goals with five CNN architectures. Combining these five networks increases feature heterogeneity and feature extraction variation, improving performance. A final polyp classification ensemble model was created from the models. Both low and high-level features are extracted and categorized by these models. The following networks are part of the ensemble: VGG19, ResNet, Xception, MobileNetv2, and EfficienentNetB2V3. Multiple neural networks are used to compensate for model flaws. Data augmentation improves stacking ensemble classifier generalizability.

RELATED WORK

However, the emergence of CNN approaches in the field of image processing has surpassed these traditional methodologies, as CNN methods have demonstrated superior performance. These are described in the following subsections:

Handcrafted Features Integrated into Computer-Aided Detection

The initial investigations on computer-aided detection of polyps were conducted in the late 1990s. Localizing, identifying, and segmenting polyps is best with machine learning. Singh and coauthors [13] investigated how machine learning might classify polyp images by texture, color, and form. Binary and multiclass SVM classification were used. However, texture patterns can also be affected by lighting conditions, endoscope position, and mucus or debris on the polyp surface. Color features can be influenced by variations in camera settings, illumination, and tissue characteristics. Shape features rely on accurate segmentation of polyp boundaries, which can be challenging in complex or irregular polyp shapes. These features might not fully capture all relevant characteristics of polyps, potentially leading to misclassifications. Extracting and analyzing texture, color, and form features can be computationally demanding, especially for real-time applications. Using wavelet decomposition, grey level occurrence matrix (GLCM), polyp-based local binary, content-based features, wavelets, and edge image and valley data, Karkanis and coauthors [14] presented color subtraction to detect intestinal polyps. A narrow-band imaging (NBI) camera captured the images. However, wavelet feature extraction and analysis, on the other hand, might be computationally expensive, affecting processing speed and real-time application. The system may misinterpret normal tissue features such as tumors (false positives) or miss actual tumors, particularly small or flat ones (false negatives). This can lead to unnecessary procedures or missed opportunities for early intervention. Pablo Mesejo and coauthors [43] used 3D shape features to classify gastrointestinal lesion adenoma, hyperplastic adenoma, and serrated adenoma and achieved 78% accuracy with random forest on 76 colonoscopy video datasets. Acquiring high-quality 3D scans of gastrointestinal lesions, on the other hand, is not currently routine in clinical practice, which hinders dataset creation and model training. This approach may struggle to detect small, flat, or partially hidden lesions, which are critical for early intervention.

Method involves using CNN

From the beginning of the last decade, numerous deep learning algorithms shaped computer-aided polyp recognition. CNNs have garnered significant research attention for their object detection capabilities. In 2015, Zhu and coauthors [44] introduced a seven-layer CNN feature extractor and SVM classifier to detect endoscopic image anomalies. However, this method might not always capture the most relevant features for anomaly detection in endoscopic images. M Golhar and coauthors [56] proposed a semi-supervised jigsaw approach to classify colonoscopy lesions and achieved an accuracy of 76.76% on a proprietary dataset. This dataset consists of a total of 6649 images, out of which 4045 were labelled and 2554 were unlabeled. Unlabeled data may contain misclassified or ambiguous lesions, which may cause the model to be misled during training and contribute noise into the learning process. This has the potential to reduce accuracy and generalizability. Tajbakhsh and coauthors [45] recommend using pre-trained weights instead of beginning from random weights for polyp detection in AlexNet. However, fine-tuning requires careful hyperparameter tuning for optimal performance. This can be a time-consuming and computationally expensive process, especially for complex CNN architectures.

Research indicates that transfer learning is effective when limited data is available, as seen in the healthcare sector. Polyp detection was pioneered by Mo and coauthors [47] using the unmodified Faster R-CNN architecture. Most polyps can be detected in this manner. Unlike previous models, this one is concealed or close to the camera. The model has been trained on the CVC-ClinicDB dataset. The model can handle variations in illumination as well as circular bubbles. Nonetheless, it misses microscopic polyps and sometimes follows an oval shape too closely and increasing false positives. Shin and coauthors [48] pioneered polyp identification using the unmodified inception-residual neural network (ResNet). The model is trained on ASU-Mayo-Video-DB. Two post-processing methods, false positive learning and offline learning were applied to enhance model performance. The authors aim to enhance the speed, currently at 2.5 frames per second (FPS). However, ResNet has a fixed architecture, which might not be optimal for the complexity of polyp images and the diversity of polyp types. Zachariah and coauthors recommended InceptionResNet-v2 for serrated or adenoma polyp classification. They found that NBI images were better at diagnosing polyps than white light (WL). Their method barely passed 89% accuracy tests [16]. Patel and coauthors [17] used CNN to classify polyps. They studied two datasets with six CNN architectures. Compared to other models, VGG-19 and VGG-19 with batch normalization fared well with 84.80% accuracy. Liu and coauthors [49] compared various back-end models as feature extractors for the SSD architecture in their study. ResNet50, Visual Geometry Group-16 (VGG-16), and InceptionV3 are examples. InceptionV3 generated the most balanced result. The models' advantages include their small size and design, as well as their real-time speed of 30 frames per second. These models are applied on CVC-CLinicDB, CVC-ColonDB, and ETIS-Larib datasets. Nevertheless, InceptionV3 is pre-trained on ImageNet. Medical images, including those of polyps, often have distinct characteristics in terms of texture, contrast, scale, and visual patterns. This domain mismatch can limit the model's ability to capture the most relevant features for polyp classification.

Zhang and coauthors [50] used SSD-GPNet, which is based on SSD architecture, to incorporate lost information for standard pooling layers using customized methods. This solution is quick and delivers real-time capabilities at 50 FPS using SSD architecture. It also has a high recall rate, especially for tiny polyps. The authors intend to extend their methods to other diseases and investigate ways to use image data without increasing model complexity. Zhang and coauthors [50]. lso presented a deep learning method for polyp detection and localization. A multi-box detector-based CNN model with a single shot improved accuracy by reusing displaced information via max-pooling layers. Max-pooling layers, while reducing dimensionality, discard a significant amount of spatial information. This can hinder the model's ability to precisely localize objects and detect fine-grained details, especially for small or densely packed objects. The method detected polyps in real time at 50 frames per second with a mean average precision of up to 90.4%. Custom data was used for model training. By combining the local binary pattern with deep learning features taken from Xception Net, ResNet50, and VGG-16, Muhammad and coauthors [41] were able to attain an accuracy of 95.2% on the Kvasir dataset.

Jha and coauthors [51] also suggested a segmentation, detection, and classification model. The model achieves a mean average precision (mAP) of 81.66 while running at 180 frames per second on an NVIDIA Volta 100 GPU. The Kvasir dataset is used to evaluate the outcomes. Another option is to combine various networks in an ensemble to improve polyp identification even more. While ensemble approaches improve detection system performance greatly, the tradeoff is that these systems typically have high latency. By applying the single shot multi box detector approach to identified polyps and utilizing dynamic histogram equalization to improve the images, Tanwar and coauthors [39] achieved 92% accuracy on a publicly available virtual pathology dataset. However, compared to two-stage detectors with region proposal networks, SSDs rely on a single shot for detection, potentially missing global context in complex colonoscopy images. This might affect accuracy in situations with overlapping polyps or cluttered backgrounds. Sharma and coauthors [40] presented the Ensemble approach for classifying polyps in the Kvasir and Depeca datasets as malignant or noncancerous. They achieved 95% accuracy by integrating the ResNet101, Google Net, and Xception models. The choice of weights assigned to each model's output can significantly impact performance. Finding the optimal weighting scheme can be challenging. Guanghui Yue and coauthors [57] proposed the novel class imbalance method on the public available hyper-kvasir dataset and proprietary dataset and achieved 90.75% and 94.01% accuracy. If classes have significant overlap in feature space, even perfectly balanced data might not guarantee optimal performance. Previous polyp classification approaches did not make use of the many-model efficacy of ensemble technology. Stacking combines predictions from diverse base models, often including different deep learning architectures. This allows it to capture patterns that individual models might miss, leading to potentially better generalization and accuracy. Unlike a single deep learning model that focuses on fitting its own parameters, stacking leverages the insights of multiple models. In addition, data augmentation research has not made the strategy more generalizable, article discusses all these topics. Multiple CNNs in a Stacking technique allow us to extract features from images at different semantic levels, allowing us to identify clear and subtle changes in different classes of images.

MATERIAL AND METHODS

Research on automatic digestive disease diagnosis by computer is promising. This study detects and diagnoses GI diseases early using a stacking-based deep learning algorithm. Figure 1 depicts the study digestive system monitoring system configuration. Image preprocessing removes noise and artefacts, and image augmentation improves training. The next sections will cover the suggested network in more detail.

Figure 1
Proposed Architecture of stacking model

Preprocessing

Preprocessing involves removing noise and artefacts from images to improve their quality. Contrast Limited Adaptive Histogram Equalization (CLAHE) is a popular approach for increasing contrast by breaking the image into tiles and equalizing their histograms. CLAHE inhibits excessive contrast amplification by setting a clip limit on the greatest rise in pixel intensity. This maintains consistent image quality and makes computer learning easier. The efficiency of CLAHE is determined by settings such as block size and clip limit, which control how images are divided into tiles and how much pixel intensity can be modified. The optimal values for these parameters vary based on the image, and changing image contrast can increase readability even more, perhaps benefiting machine learning tasks by ensuring consistent image quality.

Data Augmentation

Data augmentation is critical for increasing the size and diversity of the training dataset, particularly for deep learning models that require a large amount of training data. However, this issue can be addressed through data augmentation, which broadens and diversifies the dataset. Data augmentation reduces overfitting, which occurs when the model gets overly focused on the training data and struggles to generalize to new data. This helps the model to learn underlying patterns in the data rather than memorizing individual training examples, resulting in less overfitting. Furthermore, data augmentation improves model stability in the presence of noise, which refers to any unintended changes in data that can impede learning. Data augmentation enhances overall model performance by instructing the model to ignore noise and instead focus on important data patterns.

In our study, we used multiple data augmentation strategies to prevent overfitting and improve model generalizability. These techniques involve making random modifications to brightness, contrast, rotation, and both vertical and horizontal flipping. After splitting the Kvasir dataset [26] of 2500 images into training (70%), validation (15%), and testing (15%) subsets for evaluation. Apply the augmentation techniques on training dataset and get the 3500 images for training.

Stacking ensemble deep learning Model

Stacking deep learning, also known as stacked generalization, is a sophisticated ensemble method that uses a meta-model to combine predictions from various deep learning models. It works on a two-level framework, with basic models making predictions on input data and the meta-model learning to combine these predictions to generate the final output, as shown in Figure 1. During training, the base models are trained on the training data, and their predictions are used as input for the metamodel. These predictions serve as additional features for training the meta-model, allowing it to understand the relationships between base model predictions and the target variable. When producing predictions, the base models estimate outcomes for new, previously unknown data, which are then fed into the trained meta-model to produce the final ensemble prediction. Stacking deep learning provides several benefits. It improves prediction accuracy by combining complementing insides from many models, reduces overfitting, and increases model robustness. Base model trained independently on the dataset. By expertly merging base model predictions, the meta-model effectively utilizes each individual model's capabilities, resulting in increased overall performance. In the investigation, baseline models with various models were used to make predictions on their respective validation datasets. These predictions were then used to train the meta-model, which were then used to forecast the results of additional, previously unknown test data. Further information about the base models is provided in the following subsections.

VGG19

VGG-19 [19] consists of a total of 16 convolutional layers and 3 fully connected layers. Convolutional layers use ReLU activation functions after 3x3 filters. Pooling layers minimize spatial dimensions with 2x2 filters and 2 strides. Multiple convolutional and pooling layers simplify and standardize network architecture. VGG-19's deep architecture improves tasks. VGG-19's last fully connected layers reason and computed class probabilities using softmax activation. Its feature extraction capabilities make VGG-19 a popular benchmark. It was trained on millions of ImageNet annotated images from over 1,000 classes. VGG19's output layer contains five (5) units that reflect the following classes: dye-lifted polyps, dyed resection margins, normal cecum, polyps, and ulcerative colitis. The output layer's activation function used Softmax, while the remaining FCLs employed ReLU. Adam served as the optimizer throughout training, and the model's training rates ranged from 0.001 (the lowest) to 0.1 (the highest) after every 10 iterations. The other four models likewise employ a lower learning rate during training. An early stop was also implemented to cease training after three iterations of consistent validation accuracy scores obtained from the model. The refined model was terminated after 50 epochs of training due to early stopping. Optimal model weights were also saved during the training procedure. VGG-19 performs well, although its numerous parameters are computationally expensive.

EfficientNetV2B3

The EfficientNetV2B3 [20] architecture is composed of 21 bottleneck blocks, with the first 10 blocks being factorized bottlenecks. The network has a total of 14.5 million parameters and an image resolution of 256 x 256. The network uses a compound scaling method that combines several different scaling techniques to achieve better accuracy and efficiency. It also uses a new activation function called "Swish" that improves the performance of the network. Additionally, it uses a new regularization technique called "DropBlock" that helps prevent overfitting. The fine-tuned EfficientNetV2B3 model training for 50 epochs on the augmented Kvasir dataset.

MobileNetV2

In 2018, Mark Sandler and colleagues released MobileNetV2 [21] for low-powered mobile and embedded devices to improve accuracy and efficiency over MobileNetV1. It uses depth-wise separable convolutions to break the convolution into pointwise and depth-wise layers. Point-wise convolutions aggregate and transform the filtered channels with a 1x1 convolution, while depth-wise convolutions filter each input channel separately. This method provides speed and accuracy. MobileNetV2 further reduces input channels before 3x3 depth-wise convolutions with linear bottlenecks to improve performance. To preserve sophisticated network patterns, the model uses inverted residual blocks with a bottleneck layer with 1x1 convolutions, a depth-wise separable convolution, and an output-channel-increasing convolution. “Linear scaling of activations" lets MobileNetV2 modify input and output tensor sizes for different resolutions and model sizes. It balances accuracy and efficiency for mobile devices with limited computational power and resources with its lightweight design. MobileNetV2 is preferred for mobile and embedded computer vision problems due to its balance, depth-wise separable convolutions, linear bottlenecks, inverted residual blocks, and adaptive activation scaling.

ResNet50 V2

ResNet50, launched in 2015, learns residual functions from inputs using residual learning [22]. It captures complex mappings and reduces overfitting. The architecture has 5 stages with 3 residual blocks. Each residual block has two convolutional layers, batch normalization, and ReLU activation. Overfitting is prevented by adding the first convolutional layer output to the block input as a shortcut. A global average pooling layer generates a 1x1x2048 vector from ResNet50's 2048 feature mappings and final residual block. This vector is then passed through a thick layer with 1000 output neurons for ImageNet's 1000 classes. The dense layer output is softmax activated to build a 1000-class probability distribution. ResNet-50 classified 5,000 images of five lower digestive tract illnesses. The softmax layer classifies these diseases as dye-lifted polyps, dyed resection margins, normal cecum, polyps, and ulcerative colitis.

3.5) Xception

François Chollet founded Xception in 2017 [25]. From "Extreme Inception," "Xception" pushes depth-wise separable convolutions to the limit. The depth-wise separable convolutions in Xception replace CNN convolutional layers. Depth-wise separable convolutions have pointwise and depth-wise layers. Each input channel is convolution-filtered depth-wise. After depth-wise convolution, point-wise convolution linearly mixes filtered channels to generate output channels. This stage gathers and combines depth-wise convolutional features. Xception improves efficiency and performance with depth-wise separable convolutions. While preserving representation power, it reduces parameters and calculations. Capturing local and global dependencies separately optimizes model capacity. Each convolutional block in Xception applies depth-wise separable convolutions, batch normalization, and a non-linear activation function. After stacking the blocks, global average pooling generates the final feature representation.

Meta Model

A meta-model is a higher-level model that takes the predictions of the base models as input and learns to make the final prediction based on these inputs. It plays a crucial role in the stacking ensemble by combining the outputs of the base models to achieve improved predictive performance. Here, we applied logistic regression, decision trees, K-nearest neighbor (K-NN), support vector machine (SVM), and Naïve Bayes Classifier. The choice of the meta-model can have an impact on the overall performance of the stacking ensemble, and it's essential to consider the trade-offs between model complexity, interpretability, and performance.

Stacking Algorithm:Input:Xtrain € R𝑵train*H*W*C ; Training images, where Ntrain is the number of training images, H is the height, W is the width, and C is the number of channels.Ytrain € RNtrain Training labels correspond to one of the five classes.Xval € RNval*H*W*C Validation Images.Yval € RNval Validation labels.Base models: {M1,M2,M3,M4,M5} (e.g., Xception, ResNet50, VGG19, EfficientNetB2, MobileNetV2).Meta-model: Mmodel (e.g., K-NN classifier)Output:Trained meta-model Mmodel1. Data Preprocessing:Preprocess: training and validation imagesXtrain_processed=Preprocess (Xtrain)Xval_processed=Preprocess(Xval)(The preprocessing function adjusts the input image format to the required size, scaling, and normalization for each model type).2. Train Base Models:base model Mi (i = 1, 2, 3, 4, 5) Initialize model Mi with pre-trained weights from ImageNet.Compile model Mi using Adam optimizer and categorical cross-entropy loss:L = CategoricalCrossentropy Loss, O = Adam. Train model Mi on the training data for E epochs:Mi ← Train(Mi, Xtrain_processed, Ytrain)3.Stack Features from All Base Models:Combine the feature vectors extracted from all the base models into a single feature matrixFStacked ← [F1, F2, F3, F4, F5]1. Train Meta-Model (K-NN)Initialize the meta-model M𝒎𝒆𝒕𝒂 (e.g., K-nearest neighbors)Mmeta = KNN (k = 5)Train the meta-model on the stacked feature matrix and labels:Mmeta ← Train (Mmeta, FStacked, Yval).

Dataset

The study's dataset, the Kvasir dataset, which includes hundreds of images, is big enough for deep learning and transfer learning methods. The RGB color model is used to represent the images in the collection, which have dimensions varying from 720 by 576 pixels to 1920 by 1072 pixels. This study's dataset contains 2500 images that are evenly dispersed over five different diseases: normal cecum, polyps, ulcerative colitis, dyed-lifted polyps, and dyed-resection-margins. Figure 2 shows examples taken from the Kvasir dataset. The datasets are available for downloading at https://datasets.simula.no/kvasir/#download.

Figure 2
Sample Images of Kvasir- Dataset [26]

RESULTS

In a Jupyter environment, polyps in colonoscopy images were classified using the proposed stacking method. The development setup included an NVIDIA GeForce ROG-STRIX 256-bit GPU with 8 GB of hardware memory, 16 GB of RAM, and a 2.7 GHz dual-core Intel i7 processor. To facilitate model training and evaluation, the Kvasir dataset was partitioned into three subsets: training set (after augmentation), validation, and testing. This division ensures proper assessment of the model's performance across different data splits and helps prevent overfitting. Various models were applied to the Kvasir dataset in the experiments. The original method did not use ensemble deep learning techniques; instead, it evaluated each state-of-the-art architecture independently. Among these architectures, EfficientNetv2B3 achieved the highest scores in terms of F1 score, accuracy, precision, and recall when applied to the augmented Kvasir dataset, as depicted in Figure 8. Conversely, the Xception model exhibited comparatively lower performance.

For each baseline model, graphs illustrating accuracy versus epochs, loss versus epochs, and confusion matrices are provided in the figures ranging from Figure 3 to Figure 7. These visualizations offer insights into the training and evaluation processes for each model. We have also compared the performance of individual models as shown in Table 7.

Figure 3
VGG19 model (a) Training and Validation accuracy vs Epoch, (b) loss vs Epoch (c) Confusion Matrix.

The performance of each model, as measured by precision, recall, and F1-Score (both with and without confidence intervals), is detailed across five tables. These tables provide a comprehensive view of how each model classifies various colonoscopy images, such as dyed-lifted polyps, dyed-resection-margins, normal cecum, Polyps and ulcerative colitis. The metrics for the VGG19 model are presented in Table 1, while the results for the EfficientNetV2B3, MobileNetV2, Xception, and ResNet50 models are shown in Tables 2, 3, 4, and 5, respectively.

Table 1
Precision, Recall and F1- Score of VGG19.
Table 2
Precision, Recall and F1- Score of EfficientNetV2B3.
Table 3
Precision, Recall and F1- Score of MobileNetV2.
Table 4
Precision, Recall and F1- Score of Xception.
Table 5
Precision, Recall and F1- Score of ResNet50.

In the experiment, three crucial architecture-related parameters (hyperparameters) were selected: (i) filter size, (ii) activation function, and (iii) optimize (iv) learning rate (v) Batch Size, as shown in Table 6.

Table 6
Initial parameters for the proposed base deep learning models
Table 7
Measure the Training, validation, and testing accuracy of each model on Kvasir Dataset

The meta-model essentially acts as a "higher-level" learner, leveraging the knowledge of the base models to make a more informed and accurate final prediction. It learns the relationships between the base models' outputs and the target variable, effectively learning how to "stack" their predictions to improve overall performance. Here, we applied logistic regression, decision trees, K-NN, SVM, and Naïve Bayes classifier, as shown in Figure 8. We obtain the best result by using the K nearest neighbor algorithm as a model as shown in Table 8. Confusion Matrix is shown in Figure 8.

Table 8
Measurement of the Precision, Recall, F1 Score, and accuracy of Meta Model

The measurement of these models in terms of precision, recall, F1 score, and accuracy is shown inTable 8. We also comparison of proposed method with other existing methods for classification of colon lesion as shown in Table 9.

Table 9
Comparison of proposed method with other existing methods for classification of colon lesion

Heatmaps convert complex data into a visually intuitive color gradient, highlighting subtle differences that might be missed with the naked eye. This can be crucial in identifying early-stage lesions or changes that could be indicative of disease. By visualizing spatial patterns in data, heatmaps can reveal hidden relationships and trends that might not be readily apparent through traditional analysis. This can provide valuable insights into the underlying mechanisms of disease and help identify potential targets for therapy. heatmaps are valuable tools for identifying colon lesions by enhancing visualization, improving efficiency, and increasing diagnostic accuracy. They offer a powerful approach for early detection, diagnosis, and management of colon cancer. We applied the heatmap techniques using the stacking model and got the colon lesion as shown in Figure 9.

Figure 4
EfficientNetV2B3 model (a) Training and Validation accuracy vs Epoch, (b) loss vs Epoch (c) Confusion Matrix

Figure 5
MobileNetV2 model: (a) Training and Validation accuracy vs Epoch, (b) loss vs Epoch (c) Confusion Matrix

Figure 6
Xception model: (a) Training and Validation accuracy vs Epoch, (b) loss vs Epoch (c) Confusion Matrix

Figure 7
ResNet50 model; (a) accuracy vs Epoch, (b) Loss vs Epoch (c) Confusion Matrix

Figure 8
Confusion Matrix after applying the meta model (a) Logistic regression (b) SVM (c) Naïve Bayes Classifier (d) Decision Tree (e) K-nearest Neighbor.

Figure 9
The heat map shows that stacking model can accurately identify lesion.

Ablation Analysis of Current Study

In this study, we performed an ablation analysis to evaluate the contribution of individual models to our stacking methodology. We began with a baseline stacking model that incorporated all five base models and best performed meta models (KNN) as shown in table 10. To understand the impact of each component, we systematically removed different model combinations.

Table 10
Ablation study of Proposed model

DISCUSSION

A new stacking deep learning technique for polyp classification in the Kvasir dataset is discussed in this article. This research strengthens the dataset's GI tract disorder classification technique. This study shows that deep learning methods help detect benign tumours early and reduce unnecessary surgery.GI polyp identification is often done with video endoscopy, but human error can occur. To improve classification accuracy and resilience, the study stacks five base deep learning models: VGG19, ResNet50, MobileNetV2, EfficientNetV2B3, and Xception. Table 1 summarises the results after applying the 5 different deep learning models, and EffecientNetV2B3 outperforms in comparison to other models. Several meta-models, including logistic regression, decision trees, K-NN, SVM, and Naive Bayes classifiers, are used in the final prediction, and their performance is evaluated. Table 8 summarizes the results after applying the meta model, and K-NN outperforms in comparison to other models. Preprocessing and image improvement helped cut down on noise and artefacts. The way data augmentation technology works is by increasing the quantity of training images. The current study also utilized the stacking strategy by training a higher-level meta-model to aggregate the outputs of many deep learning models used as base models and achieved 96.5% accuracy in comparison to other state-of-the-art methods, as shown in Table 9. Because of their speed, high performance, and statistical confirmation, the approaches utilized in this work can be used in medical applications. Using the proposed method, new intelligent endoscopic devices could provide early, life-saving diagnosis with objective and reliable forecasts.

CONCLUSION

This paper presents novel and combined stacking ensemble models for the classification of the gastrointestinal system. These models utilize deep learning methods for the base learning process and machine learning algorithms for the meta-learners. Deep learning models get more complex when they are stacked, which is a limitation. Complex models require more computation time and technology and are more difficult to understand, making them more expensive to train and maintain. Model complexity is heavily influenced by hyperparameters. Finding distributed hyperparameters was tough due to the method's multiple hyperparameters. Instead of using distributed hyperparameter search, optimizing hyperparameters improves performance, model complexity, and computation time. To reduce model complexity, use basic, high-performance models with few parameters as base learners. Despite this limitation, the study advocates adopting stacking models since they boost performance. Training on training data prepares the testing phase for usage in the actual world in seconds. As a result, AI health models should prioritize efficiency over complexity. Good models are reliable, objective, and have high forecast accuracy. The current study also utilized the stacking strategy and achieved 96.5% accuracy on the Kvasir dataset. This study has the potential to lessen the strain on experts, save time and money, and eliminate specialist-related misdiagnosis and therapy. In addition to medicinal advantages, the proposed approach can be applied to other medical AI subjects and may provide new high-performance solutions. After the proposed stacking-based deep learning model for polyp classification in colonoscopy images, Explore the potential of more recent and advanced deep learning architectures like Vision Transformers (ViT) and Swin Transformers for improved accuracy and robustness to image variations. Fine-tune the stacking ensemble approach by experimenting with different combinations of base models and meta-models, exploring hyperparameter optimization techniques, and utilizing weighted voting schemes for improved performance. Integrate explainable AI (XAI) methods like LIME and SHAP to understand the rationale behind the model's predictions and gain insights into the features contributing to polyp classification.

Funding:

This research received no external funding.

Ethics approval:

Not applicable.

Availability of data and materials:

The data set used in the experiments can be found on: https://datasets.simula.no/kvasir/

REFERENCES

  • 1 Bray F, Ferlay J, Soerjomataram I, Siegel RL, Torre LA, Jemal A. Global cancer statistics 2018: GLOBOCAN estimates of incidence and mortality worldwide for 36 cancers in 185 countries. CA Cancer J. Clin. 2018; 68:394-24.
  • 2 Hazewinkel Y, Dekker E. Colonoscopy: Basic principles and novel techniques. Nat. Rev. Gastroenterol. Hepatol. 2011; 8:554-64.
  • 3 Liedlgruber M, Andreas Uhl. Computer-aided decision support systems for endoscopy in the gastrointestinal tract: A review. IEEE Reviews in Biomedical Engineering, 2011;4:73-88.
  • 4 Khan A, Gul MA, Alharbi A, Uddin MI, Ali S, Alouffi B. Impact of lexical features on answer detection model in discussion forums. Complexity, 2021.
  • 5 Sasaki Y, Hada R, Munakata A. Computer-aided grading system for endoscopic severity in patients with ulcerative colitis. Digestive Endoscopy, 2003; 15(3):206-9.
  • 6 Mostafiz R, Rahman MM, Uddin MS. Gastrointestinal polyp classification through empirical mode decomposition and neural features. SN Appl Sci. 2020.Available from: https://doi.org/10.1007/s42452-020-2944
    » https://doi.org/10.1007/s42452-020-2944
  • 7 Sasaki Y, Hada R, Yoshimura T, Hanabata N, Mikami T, Fukuda S. Computer-aided estimation for the risk of development of gastric cancer by image processing. Artificial Intelligence in Aeory and Practice III, Springer, Berlin, Germany, 2010;197-204.
  • 8 Amin S, Uddin Iran M, Al-Baity H, Ali Zeb M, Khan Akbar M, Khan Abrar M. Machine learning approach for covid-19 detection on twitter. Comput. Mater. Contin. 2021;68(2):2231-47.
  • 9 Tjoa MP, Krishnan SM. Feature extraction for the analysis of colon status from endoscopic images. BioMedical Engineering Online. 2003;2(1):9-17.
  • 10 Hirasawa T, Aoyama K, Tanimoto T, Ishihara S, Shichijo S, Ozawa T, et al. Application of artificial intelligence using a convolutional neural network for detecting gastric cancer in endoscopic images. Gastric Cancer.2018;21(4):653-60.
  • 11 Sainath TN, Kingsbury B, Saon G, Soltau H, Mohamed AR, Dahl G, et al. Deep Convolutional Neural Networks for large-scale speech tasks. Neural Netw. 2015 Apr; 64:39-48.
  • 12 Pacal I, Karaboga D, Basturk A, Akay B, Nalbantoglu U. A comprehensive review of deep learning in colon cancer. Comput Biol Med. 2020; 126:104003. Available from: https://doi.org/10.1016/j.compbiomed.2020.104003
    » https://doi.org/10.1016/j.compbiomed.2020.104003
  • 13 Singh D, Singh B. Effective and efficient classification of gastrointestinal lesions: combining data preprocessing, feature weighting, and improved ant lion optimization. J Ambient Intell Humaniz Comput. 2020. Available from: https://doi.org/10.1007/s12652-020-02629-0 .
    » https://doi.org/10.1007/s12652-020-02629-0
  • 14 Karkanis SA, Lakovidis DK, Maroulis DE, Karras DA, Tzivras M. Computer-aided tumor detection in endoscopic video using color wavelet features. IEEE Trans Inf Technol Biomed. 2003 Sep;7(3):141-52.
  • 15 Mahmood F, Yang Z, Durr NJ, Chen R, Xu W, Borders D. Polyp segmentation and classification using predicted depth from monocular endoscopy. Medical Imaging, 2019. Available form: https://api.semanticscholar.org/CorpusID:88493618
    » https://api.semanticscholar.org/CorpusID:88493618
  • 16 Zachariah R, Samarasena J, Luba D, Duh E, Dao T, Requa J, et al. Prediction of polyp pathology using convolutional neural networks achieves resect and discard thresholds. Am J Gastroenterol. 2020. Available from: https://doi.org/10.14309/ajg.0000000000000429 .
    » https://doi.org/10.14309/ajg.0000000000000429
  • 17 Patel K, Li K, Tao K, Wang Q, Bansal A, Rastogi A, et al. A comparative study on polyp classification using convolutional neural networks. PloS One. 2020; 15:1-16. Available from:https://doi.org/10.1371/journal.pone.0236452
    » https://doi.org/10.1371/journal.pone.0236452
  • 18 Iakovidis DK, Maroulis DE, Karkanis SA. An intelligent system for automatic detection of gastrointestinal adenomas in video endoscopy. Comput Biol Med. 2006 Oct;36(10):1084-103.
  • 19 Simonyan K, Zisserman A. Very deep convolutional networks for large-scale image recognition. 3rd Int. Conf. Learn. Represent. ICLR 2015.
  • 20 Mingxing Tan, Quoc Le. EfficientNetV2: Smaller Models and Faster Training for Image Classification.2021. Available from: https://arxiv.org/abs/2105.09387
    » https://arxiv.org/abs/2105.09387
  • 21 Sandler Mark, Howard Andrew G, Zhu Menglong, Zhmoginov Andrey, Chen Liang-Chieh. MobileNetV2: Inverted Residuals and Linear Bottlenecks. CVPR 2018:4510-20.
  • 22 Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun, Deep Residual Learning for Image Recognition. 2015. Available from: https://arxiv.org/abs/1512.03385
    » https://arxiv.org/abs/1512.03385
  • 23 Qingge Ji, Jie Huang, Wenjie He, Yankui Sun. Optimized Deep Convolutional Neural Networks for Identification of Macular Diseases from Optical Coherence Tomography Images. Algorithms. 2019;12 (51).
  • 24 François Chollet. Xception: Deep Learning with Depthwise Separable Convolutions. Arxiv.2017. Available from: https://arxiv.org/abs/1610.02357
    » https://arxiv.org/abs/1610.02357
  • 25 Hasan Md Arid , Dey Krishno. Depthwise Separable Convolutions with Deep Residual Convolutions.arXiv.2024. Available form: https://arxiv.org/abs/2411.07544
    » https://arxiv.org/abs/2411.07544
  • 26 Konstantin Pogorelov, Kristin Ranheim Randel, , Carsten Griwodz, Sigrun Losada Eskeland, Thomas de Lange, Dag Johansen. KVASIR: A Multi-Class Image Dataset for Computer Aided Gastrointestinal Disease Detection. Proceedings of the 8th ACM on Multimedia Systems Conference.2017.
  • 27 Luis Perez, Jason Wang. The Effectiveness of Data Augmentation in Image Classification using Deep Learning. arXiv preprint arXiv:1712.04621.2017. Available from: https://arxiv.org/abs/1712.04621
    » https://arxiv.org/abs/1712.04621
  • 28 Suorong Yang, Xiaolin Hu, Zhiqiang Shen. Data augmentation: A comprehensive survey of modern approaches. ScienceDirect, 2022. Available from: https://www.sciencedirect.com/science/article/pii/S2590005622000911
    » https://www.sciencedirect.com/science/article/pii/S2590005622000911
  • 29 Suorong Yang, Xiaolin Hu, Zhiqiang Shen, Jie Yang. Image Data Augmentation for Deep Learning: arXiv preprint arXiv:2204.08610,2022. Available from: https://arxiv.org/abs/2204.08610
    » https://arxiv.org/abs/2204.08610
  • 30 Jie Li, Weisi Lin, Haifeng Chen, A survey on Image Data Augmentation for Deep Learning. J. Big Data.2019. Available from: https://journalofbigdata.springeropen.com/articles/10.1186/s40537-019-0197-0
    » https://journalofbigdata.springeropen.com/articles/10.1186/s40537-019-0197-0
  • 31 Zuiderveld. Contrast Limited Adaptive Histogram Equalization, In Graphics Gems I. Academic Press. 1994.
  • 32 Hossain SMA, Islam MM. A Survey of Contrast Limited Adaptive Histogram Equalization Methods, Pattern Recognition Letters 2014:35(15): 2111-9.
  • 33 Pourreza AH, Mahvi MH, Pourreza MR. Contrast Limited Adaptive Histogram Equalization for Medical Image Enhancement. Computerized Medical Imaging and Graphics. 2011;35(1):3-11.
  • 34 Li K, Fathan MI, Patel K, Zhang T, Zhong C, Bansal A, et al. Colonoscopy polyp detection and classification: Dataset creation and comparative evaluations. PLoS ONE.2021;16(8). Available from: https://doi.org/10.1371/journal.pone 0255809.
    » https://doi.org/10.1371/journal.pone
  • 35 Zhang S, Liu Y, X Wang, Wang P, Zhang J. Polyp Detection and Classification in Colonoscopy Images Using Deep Learning. IEEE Access 2023; 11:10895-906.
  • 36 Das S, Gupta S, Kumar V. RK Mishra A Novel Approach for Polyp Classification in Colonoscopy Images Using Transfer Learning. Comput. Biol. Med. 2023
  • 37 Wang M, An X, Pei Z, Li N, Zhang L, Liu G, et al. An efficient multi-task synergetic network for polyp segmentation and classification. IEEE Journal of Biomedical and Health Informatics. 2023 May 8;28(3):1228-39.
  • 38 Das S, Gupta S, Mishra RK, Kumar V. Rapid Polyp Classification in Colonoscopy Using Textural and Convolutional Features. Comput. Biol. Med. 2023.
  • 39 Tanwar S, Vijayalakshmi S, Sabharwal M, Kaur M, AlZubi AA, Lee HN. Detection and Classification of Colorectal Polyp Using Deep Learning. Biomed Res Int. 2022 Apr 15. Available from: doi: 10.1155/2022/2805607.
    » https://doi.org/10.1155/2022/2805607.
  • 40 Sharma P, Balabantaray BK, Bora K, Mallik S, Kasugai K, Zhao Z. An Ensemble-Based Deep Convolutional Neural Network for Computer-Aided Polyps Identification from Colonoscopy. Front Genet. 2022. Available from: doi: 10.3389/fgene.2022.844391. PMID: 35559018; PMCID: PMC9086187.
    » https://doi.org/10.3389/fgene.2022.844391.
  • 41 Ramzan M, Raza M, Sharif M, Khan MA, Nam Y. Gastrointestinal tract infections classification using deep learning. Comput. Mater. Contin. 2021 Jan 1;69(3):3239-57. Available from: https://doi.org/10.32604/cmc.2021.015920
    » https://doi.org/10.32604/cmc.2021.015920
  • 42 Kim NH, Jung YS, Jeong WS, Yang HJ, Park SK, Choi K, et al. Miss rate of colorectal neoplastic polyps and risk factors for missed polyps in consecutive colonoscopies. Intestinal research. 2017 Jun 12;15(3):411.
  • 43 Mesejo P, Pizarro D, Abergel A, Rouquette O, Beorchia S, Poincloux L, et al. Computer-Aided Classification of Gastrointestinal Lesions in Regular Colonoscopy. IEEE Transactions on Medical Imaging. 2016 Mar 29;35(9):2051-63..
  • 44 Zhu R, Zhang R; Xue D. Lesion detection of endoscopy images based on convolutional neural network features. In Proceedings of the 8th International Congress on Image and Signal Processing (CISP), Shenyang, China,14-15 October 2015;372-76.
  • 45 Tajbakhsh N, Shin JY, Gurudu SR; Hurst RT; Kendall CB, Gotway MB, et al. Convolutional neural networks for medical image analysis: Full training or fine tuning. IEEE Trans. Med. Imaging 2016;(35):1299-312.
  • 46 Yuan Z, Izadyyazdanabadi M, Mokkapati D, Panvalkar R, Shin JY, Tajbakhsh N, et al. Automatic polyp detection in colonoscopy videos. In Proceedings of the Medical Imaging. Image Processing. International Society for Optics and Photonics, Orlando, FL, USA, 24 February 2017.
  • 47 Mo X, Tao K, Wang Q, Wang G. An efficient approach for polyps’ detection in endoscopic videos based on faster R-CNN. In Proceedings of the 2018 24th International Conference on Pattern Recognition (ICPR), Beijing, China; IEEE: Piscataway, NJ, USA, 2018;3929-34.
  • 48 Shin, Y, Qadir HA, Aabakken L; Bergsland J; Balasingham I. Automatic Colon Polyp Detection Using Region Based Deep CNN and Post Learning Approaches. IEEE Access 2018; 6:40950-62.
  • 49 Liu M, Jiang J, Wang Z. Colonic polyp detection in endoscopic videos with single shot detection based deep convolutional neural network. IEEE Access 2019,7:75058-66.
  • 50 Zhang X, Chen F, Yu T, An J, Huang Z, Liu J, et al. Real-time gastric polyp detection using convolutional neural networks. PloS one. 2019 Mar 25;14(3).
  • 51 Jha D, Ali S, Tomar NK, Johansen HD, Johansen D, Rittscher J, et al. Real-time polyp detection, localization and segmentation in colonoscopy using deep learning. IEEE Access. 2021 Mar 4;9:40496-510.
  • 52 Hmoud Al-Adhaileh M, Mohammed Senan E, Alsaade FW, Aldhyani TH, Alsharif N, Abdullah Alqarni, et al. Deep learning algorithms for detection and classification of gastrointestinal diseases. Complexity. 2021.
  • 53 Mohapatra S, Nayak J, Mishra M, Pati GK, Naik B, Swarnkar T. Wavelet Transform and Deep Convolutional Neural Network-Based Smart Healthcare System for Gastrointestinal Disease Detection. Interdiscip. Sci. Comput. Life Sci. 2021;13: 212-28.
  • 54 Yogapriya J, Chandran V, Sumithra MG, Anitha P, Jenopaul P, Suresh Gnana Dhas C. Gastrointestinal Tract Disease Classification from Wireless Endoscopy Images Using Pretrained Deep Learning Model. Comput. Math. Methods Med. 2021.
  • 55 Khan MA, Muhammad K, Wang SH, Alsubai S, Binbusayyis A, Alqahtani A, et al. Gastrointestinal Diseases Recognition: A Framework of Deep Neural Network and Improved Moth-Crow Optimization with DCCA Fusion. Hum. -Cent. Comput. Inf. Sci. 2022.
  • 56 Golhar M, Bobrow TL, Khoshknab MP, Jit S, Ngamruengphong S, Durr NJ. Improving Colonoscopy Lesion Classification Using Semi-Supervised Deep Learning. IEEE Access, 2021;9:631-40. Available from: doi: 10.1109/ACCESS.2020.3047544.
    » https://doi.org/10.1109/ACCESS.2020.3047544.
  • 57 Guanghui Yue, Peishan Wei, Yun Liu, Yu Luo, Jingfeng Du, Tianfu Wang. Automated Endoscopic Image Classification via Deep Neural Network with Class Imbalance Loss. IEEE Transactions on Instrumentation and Measurement, 2023.
  • 58 Hongyu Wang, Dandan Zhang, Jun Feng, Lucia Cascone, Michele Nappi, Shaohua Wan. A multi-objective segmentation method for chest X-rays based on collaborative learning from multiple partially annotated datasets. information Fusion,2024. Available form: doi: https://doi.org/10.1016/j.inffus.2023.102016
    » https://doi.org/10.1016/j.inffus.2023.102016
  • 59 Gangrade S, Sharma PC, Sharma AK, Singh YP. Modified DeeplabV3+ with multi-level context attention mechanism for colonoscopy polyp segmentation. Comput. Biol. Med. 2024 Mar 1;170:108096.
  • 60 Lalinia M, Sahafi A. Colorectal polyp detection in colonoscopy images using YOLO-V8 network. SIViP .2024 2047-58. Available form: https://doi.org/10.1007/s11760-023-02835-1
    » https://doi.org/10.1007/s11760-023-02835-1
  • 61 Gangrade S, Sharma PC, Sharma AK. Colonoscopy Polyp Segmentation using Deep Residual U-Net with Bottleneck Attention Module. Fifth International Conference on Electrical, Computer and Communication Technologies (ICECCT), Erode, India, 2023;1-6, Available form: doi: 10.1109/ICECCT56650.2023.10179818.
    » https://doi.org/10.1109/ICECCT56650.2023.10179818.
  • 62 Gangrade S, Sharma PC, Sharma AK. Colonoscopy Polyp Detection Using Bi-Directional Conv-LSTM U-Net with Densely Connected Convolution. Künstl Intell2024. Available form: https://doi.org/10.1007/s13218-024-00833-0
    » https://doi.org/10.1007/s13218-024-00833-0
  • 63 Gangrade S, Sharma PC, Sharma AK. EfficientNet Deep Learning Model for Computer-Aided Polyps Classification from Colonoscopy Images, Smart Systems: Innovations in Computing.2023. Springer, Singapore. Available form: https://doi.org/10.1007/978-981-97-3690-4_16
    » https://doi.org/10.1007/978-981-97-3690-4_16
  • 64 Gangrade J, Kuthiala R, Gangrade S, Singh YPRM, Solanki S. A deep ensemble learning approach for squamous cell classification in cervical cancer. Sci Rep. 2025 Mar;15(1). Available form: doi: 10.1038/s41598-025-91786-3. PMID: 40025091; PMCID: PMC11873282.
    » https://doi.org/10.1038/s41598-025-91786-3.
  • 65 Altıner S, Aydoğdu YF, Kosmaz K, Durhan A, Senlikci A, Suleyman M, et al. The association between colonic diverticulosis and colorectal polyps in a retrospective cohort study. Int. J. Colorectal Dis. 2025 Apr 5;40(1):88.

Editor-in-Chief:

Alexandre Rasi Aoki

Associate Editor:

Raja Soosaimarian Peter Raj

*

Correspondence: jgangrade@gmail.com - Tel.: +91-8435717932 (J.G.)

Conflict of interests:

The authors declare no conflict of interests.

Publication Dates

  • Publication in this collection
    12 Dec 2025
  • Date of issue
    2025

History

  • Received
    19 Oct 2024
  • Accepted
    18 Oct 2025
location_on
Instituto de Tecnologia do Paraná - Tecpar Rua Prof. Algacyr Munhoz Mader, 3775 - CIC, 81350-010 , Tel: +55 41 3316-3054 - Curitiba - PR - Brazil
E-mail: babt@tecpar.br
rss_feed Acompanhe os números deste periódico no seu leitor de RSS
Ir para o topo