Skip to main content

A hybrid deep CNN model for brain tumor image multi-classification

Abstract

The current approach to diagnosing and classifying brain tumors relies on the histological evaluation of biopsy samples, which is invasive, time-consuming, and susceptible to manual errors. These limitations underscore the pressing need for a fully automated, deep-learning-based multi-classification system for brain malignancies. This article aims to leverage a deep convolutional neural network (CNN) to enhance early detection and presents three distinct CNN models designed for different types of classification tasks. The first CNN model achieves an impressive detection accuracy of 99.53% for brain tumors. The second CNN model, with an accuracy of 93.81%, proficiently categorizes brain tumors into five distinct types: normal, glioma, meningioma, pituitary, and metastatic. Furthermore, the third CNN model demonstrates an accuracy of 98.56% in accurately classifying brain tumors into their different grades. To ensure optimal performance, a grid search optimization approach is employed to automatically fine-tune all the relevant hyperparameters of the CNN models. The utilization of large, publicly accessible clinical datasets results in robust and reliable classification outcomes. This article conducts a comprehensive comparison of the proposed models against classical models, such as AlexNet, DenseNet121, ResNet-101, VGG-19, and GoogleNet, reaffirming the superiority of the deep CNN-based approach in advancing the field of brain tumor classification and early detection.

Peer Review reports

Introduction

Brain tumors stand as one of the leading causes of death in the modern world. These tumors can manifest in various regions of the brain, often remaining asymptomatic until later stages of life. Symptoms of brain disease encompass a wide array of issues, including personality changes, memory difficulties, communication impairments, hearing or speech challenges, chronic migraines, and even vision loss [1]. Notable examples of brain tumors include meningiomas, gliomas, pituitary adenomas, and acoustic neuromas. According to medical observations, meningiomas, gliomas, and pituitary tumors account for approximately 15%, 45%, and 15% of all brain tumors, respectively. A brain tumor can have long-lasting psychological effects on the patient. These tumors originate from primary abnormalities in the brain or central spine tissue that disrupt normal brain function. Brain tumors are classified into two main categories: benign and malignant. Benign tumors grow slowly and are non-cancerous; they are relatively rare and do not metastasize. In contrast, malignant brain tumors contain cancerous cells, typically originating in one region of the brain before swiftly spreading to other areas of the brain and spinal cord [2]. Malignant tumors pose a significant health risk. The World Health Organization (WHO) classifies brain tumors into four grades based on their behavior within the brain: grades 1 and 2 are considered low-grade or benign tumors, while grades 3 and 4 are categorized as high-grade or malignant tumors. Several diagnostic methods, such as CT scanning and EEG, are available for detecting brain tumors, but magnetic resonance imaging (MRI) is the most reliable and widely utilized. MRI generates detailed internal images of the body’s organs by employing strong magnetic fields and radio waves [3]. Essentially, CT or MRI scans can distinguish the affected brain region due to the tumor from the healthy tissue. Biopsies, clinical tests that extract brain cells, can be conducted as a prelude to cerebral surgery. Precision is paramount in measuring tumor cells or arriving at accurate diagnoses. The emergence of machine learning (ML) presents an opportunity to assist radiologists in furnishing precise disease status information [4]. The proliferation of novel technologies, particularly artificial intelligence and ML, has left an indelible mark on the medical field, equipping various medical departments, including medical imaging, with indispensable tools to enhance their operations. As MRI images are processed to aid radiologists in decision making, a diverse array of automated learning strategies is employed for classification and segmentation purposes. While supervised methods for classifying brain tumors hold immense promise, they demand specialized expertise to optimize the feature extraction and selection techniques [5]. In navigating and analyzing vast datasets, expert medical professionals benefit from the support of machine assistance. Furthermore, the failure to accurately identify life-threatening tumors could potentially result in treatment delays for patients. The utilization of deep-learning (DL) techniques in detecting brain tumors and extracting meaningful insights from data patterns has a longstanding history. DL’s capability to classify and model brain cancers is widely recognized [6]. Effectively treating brain tumors hinges on early and precise disease diagnosis. Decisions regarding treatment methods are influenced by factors such as the tumor’s pathological type, grade, and stage at diagnosis. Neuro-oncologists have harnessed computer-aided diagnostic (CAD) tools for various purposes, including tumor detection, categorization, and grading within the realm of neurology [7].

A glioma is a type of tumor that originates in brain tissue, distinct from nerve cells or blood vessels. In contrast, meningiomas develop from the protective membranes that envelop the brain and central nervous system, while pituitary tumors grow within the confines of the skull. Among these three tumor types, meningiomas are relatively rare and generally benign. Conversely, gliomas constitute the most prevalent form of malignant brain tumors. Even though pituitary tumors may be benign, they can still give rise to significant medical complications [8]. Brain tumors rank as a leading cause of mortality worldwide. Research underscores the significance of early and accurate identification, coupled with prompt treatment, in improving survival rates for patients with cancerous tumors. In certain instances, healthcare professionals may encounter the need to differentiate between strokes and tumors. Hence, the early detection of brain tumors assumes pivotal importance for providing effective care and potentially extending the affected individual’s lifespan [9]. Convolutional neural networks (CNNs), distinguished by their multi-layered architecture and high diagnostic accuracy when provided with ample input images, currently stand as a highly effective approach in image processing. Neural networks, including auto-encoders, an unsupervised learning technique, are harnessed for representation learning [10]. Magnetic resonance imaging (MRI) emerges as an exceptional tool for obtaining clear and detailed visualizations within the human body. Unlike X-rays or CT scans that involve ionizing radiation, MRI offers significantly enhanced contrast between various soft tissues. Moreover, MRI technology furnishes detailed images from multiple angles, providing radiologists with abundant data on human soft-tissue anatomy [11]. The aim of this paper is to introduce three fully automatic CNN models designed for the multi-classification of brain tumors, utilizing publicly available datasets. To the best of the authors’ knowledge, this represents the first endeavor in multi-classifying brain tumors from MRI images using CNNs, wherein nearly all the hyperparameters are automatically tuned through the grid search optimizer. The rest of this paper is organized as follows: Introduction Section: this section provides a comprehensive overview of various tumor types and their diagnostic methods; Related work Section: in this section, we delve into recent articles, examining their methods, outcomes, and applications; Materials and methods Section: here, we detail the utilization of datasets and describe the proposed model architectures; Experimental study Section: this section centers on a comparative analysis of the accuracies achieved by our proposed method and other state-of-the-art approaches;  Conclusions Section: this section offers the concluding remarks and insights related to our proposed model.

Related work

The author’s goal was to devise a classification approach that is notably more accurate, cost-effective, and self-training, utilizing an extensive collection of authentic datasets rather than augmented data. The customized VGG-16 (Visual Geometry Group) architecture was employed to classify 10,153 MRI images into three distinct classes (glioma, meningioma, and pituitary). The network demonstrated a remarkable performance, achieving an overall accuracy of 99.5% and precision rates of 99.4% for gliomas, 96.7% for meningiomas, and 100% for pituitaries [12]. The proposed model’s efficacy was assessed using three CNN models: AlexNet, Visual Geometry Group (VGG)-16, and VGG-19. AlexNet achieved a peak detection accuracy of 99.55% using 349 images sourced from the Reference Image Database to Evaluate Response (RIDER) neuro MRI database. For brain tumor localization, employing 804 3D MRIs from the Brain Tumor Segmentation (BraTS) 2013 database, a Dice score of 0.87 was achieved [13]. In the investigation of brain tumor categorization, an array of deep- and machine-learning techniques, including softmax, Random Forest, Support Vector Machine (SVM), K-Nearest Neighbors, and the ensemble method, were employed. These outcomes were compared with existing methods. Notably, the Inception-v3 model exhibited the highest performance, attaining a test accuracy of 94.34%. This advancement holds the potential to establish a prominent role in clinical applications for brain tumor analysis [14]. An effective approach was proposed for categorizing brain MRIs into four classes: normal and three forms of malignant brain tumors (glioblastoma, sarcoma, and metastatic bronchogenic carcinoma). The method integrates the discrete wavelet transform (DWT) with a deep neural network (DNN). Employing a deep neural network classifier, one of the DL designs, a dataset of 66 brain MRIs was classified into the specified categories. The integration of DWT, a powerful feature extraction technique, principal component analysis (PCA), and the classifier yielded commendable performances across all evaluation metrics [15]. The author introduced a strategy involving a CNN to distinguish brain tumors from 2D MRI scans of the brain. This initial separation is subsequently followed by the application of conventional classifiers and DL techniques. In addition, an SVM classifier, along with various activation algorithms, such as softmax, RMSProp, and sigmoid, were employed to validate and cross-check the proposed approach. The implementation of the author’s suggested solution was executed using TensorFlow and Keras in the Python programming language, chosen for its robust capabilities in expediting tasks. The achieved accuracy rate for the CNN model stood at an impressive 99.74% [16]. This paper presents a brain tumor classification approach employing open-access datasets and CNN techniques. The methodology utilizes open-access datasets to classify tissue as either tumor or non-tumor through a distinctive framework that combines discrete cosine transform-based image fusion, CNN super-resolution, and a classifier. Employing super-resolution and the ResNet50 architecture, the framework attained an impressive accuracy of 98.14% [17].

A novel approach for dimensionality reduction is proposed, utilizing the Grey Wolf Optimizer (GWO) and rough-set theory. This method identifies relevant features from extracted images, distinguishing between high-grade (HG) and low-grade (LG) glioblastoma multiforme (GBM) while accommodating feature correlation constraints to eliminate redundant attributes. Additionally, the article introduces a dynamic architecture for multilevel layer modeling in a Faster R-CNN (MLL-CNN) approach. This is achieved using a feature weight factor and a relative description model to construct selected features, thereby streamlining the processing and classifying of long-tailed files. This advancement leads to improved training accuracies for CNNs. The findings illustrate that the overall survival prediction for GBM brain growth achieves a higher accuracy of 95% and a lower error rate of 2.3% [18]. The work involves the classification of 253 high-resolution brain MR images into normal and pathological classes. To efficiently and accurately train deep neural models, MR images were scaled, cropped, pre-processed, and enhanced. The Lu-Net model is compared against LeNet and VGG-16 using five statistical metrics: precision, recall, specificity, F-score, and accuracy. The CNN models were trained on enhanced images and validated on 50 sets of untrained data. LeNet, VGG-16, and the proposed approach achieved accuracy rates of 88%, 90%, and 98%, respectively [19]. MIDNet18 outperformed AlexNet in categorizing brain tumor medical images. The proposed MIDNet18 model demonstrated effective learning, achieving a binary classification accuracy exceeding 98%, which is statistically significant (independent-sample t-test, p < 0.05). MIDNet18 excelled across all the performance indicators for the dataset used in this study [20].

The objective of this study was to facilitate accurate early-stage diagnoses by medical professionals. Three DL architectures—AlexNet, GoogLeNet, and ResNet50—were employed to identify brain tumor images. Among them, the ResNet50 architecture demonstrated the highest accuracy rates. The experimental results yielded an accuracy of 85.71%, with the potential for further enhancement in future research [21]. In the realm of Alzheimer’s disease diagnosis, the CNN approach was utilized to detect patients using MRSI and supplementary MRI data. High Matthews Correlation Coefficient (MCC) scores were achieved, with area-under-the-curve values of 0.87 and 0.91 for MRSI and MRI, respectively. A comparative analysis highlighted the superiority of Partial Least Squares and Support Vector Machines. The proposed system automatically selected critical spectral regions for diagnosis, corroborating findings with literature biomarkers [22]. CNNs, ML pipelines inspired by biological neural processes, have been extensively studied. The author’s approach involved first acquiring an understanding of CNNs, followed by a literature search for a segmentation pipeline applicable to brain tumor segmentation. Additionally, the potential future role of CNNs in radiology was explored. The application of CNNs was demonstrated in predicting survival and medication responses through analyses of the brain tumor shape, texture, and signal intensity [23]. In this paper, the state-of-the-art object detection framework YOLO (You Only Look Once) was employed to identify and classify brain tumors using DL. YOLOv5, a revolutionary object detection algorithm, stood out for its computational efficiency. The RSNA-MICCAI brain tumor radiogenomics classification BraTS 2021 dataset served as the basis. YOLOv5 achieved an 88% precision rate [24]. The primary aim of this method is to classify brain images as healthy or tumorous using test MRI data. MRI-based brain tumor research offers superior internal imaging compared to CT scans. The approach involves denoising MRI images with an anisotropic diffusion filter, segmenting using morphological operations, and classifying via a five-layer CNN-based hybrid technique, outperforming other methods. The developed model, utilizing the publicly available KAGGLE brain MRI database, achieved an accuracy rate of 88.1% [25]. The adoption of AI-powered computer systems can assist doctors in making more accurate diagnoses. In this research, we developed a brain tumor diagnostic system based on CNN technology, utilizing Ranger optimization and the extensive pre-processing of data from the EfficientNetv2 architecture [26]. This research introduces a novel topology for a parallel deep CNN (PDCNN) designed to extract both global and local features from two parallel stages. Overfitting is addressed through the utilization of dropout regularization and batch normalization. Unlike conventional CNNs that collect features randomly without considering local and global contexts, our proposed PDCNN architecture aims to capture a comprehensive range of features [27]. This study focuses on the classification of meningiomas, gliomas, and pituitary tumors using MRI imaging. The Dual VGG-16 CNN, equipped with a proprietary CNN architecture, constitutes the DCTN mode [28]. The importance of the early detection of brain tumors cannot be overstated. Biopsies of brain tumors, the gold standard for diagnosis, are only possible during life-altering brain surgery. Methods based on computational intelligence can aid in the diagnosis and categorization of brain tumors [29]. The author employed a DL model to classify MRI scans into glioma and normal categories, preceded by the extraction of scan information. Convolutional recurrent neural networks (CRNNs) were utilized for generating the classifications. This suggested method significantly improved the categorization of brain images within a specified input dataset [30]. The network was trained and tested using BraTS2019 data. The approach was evaluated using the Dice similarity coefficient (DSC), sensitivity (Sen), specificity (Spec), and Hausdorff distance (HD). The DSCs for the entire tumor, tumor core, and enhancing tumor were 0.934, 0.911, and 0.851, respectively. The subregion Sen values were 0.922, 0.911, and 0.867. The Spec and HD scores were 1.000, 1.000, and 3.224, 2.990, 2.844, respectively [31]. The cancer region segmentation from brain images is achieved using Deep K-Net, a hybrid approach that combines K-Net and utilizes Deep Joint Segmentation with Ruzicka similarity. The K-Net is trained using a Driving Training Taylor (DTT) algorithm. The DTT algorithm optimizes the Shepard CNN (ShCNN) for classification [32].

The author provided an overview of contemporary computer-aided detection methods that utilize WCE images as input, distinguishing them as either diseased/abnormal or disease-free/normal. We conducted an evaluation of approaches designed for the detection of tumors, polyps, and ulcers, as these three conditions are categorized similarly. Furthermore, because general abnormalities and bleeding within the GI tract could be indicative of these disorders, we made an effort to shed light on the research conducted for the identification of abnormalities and bleeding within WCE images [33]. Author have included several research studies, each accompanied by detailed descriptions of their techniques, findings, and conclusions. Additionally, we provide a discussion and comparison of previous review articles, which serves as a reference point for the current survey, while also highlighting its limitations [34]. To enhance feature extraction, our proposed deep CNN model introduces an innovative approach by incorporating multiple convolutional kernels with varying window widths within the same hidden layer. This architecture is designed to be lightweight, consisting of 16 convolutional layers, 2 fully connected layers (FCN), and a softmax layer serving as the output layer. The activation function employed in the first 15 layers is MISH, followed by the Rectified Linear Unit (ReLU) activation function. This combination not only facilitates profound information propagation but also offers self-regularized, smoothly non-monotonic characteristics, while effectively mitigating saturation issues during training. The authors present a comprehensive set of experimental results, comparing our model’s performance against benchmarks like the MICCAI 2015 challenge and other publicly available datasets. Our findings demonstrate that the proposed model excels in terms of accuracy, sensitivity, the F1-score, the F2-score, and the Dice coefficient [35].

Materials and methods

Materials

The study used four different datasets that can be found in freely accessible databases. The Figshare dataset is the name of the first dataset. From 19 patients with glioblastomas (G-IV), MRI multi-sequence images were taken and added to the Figshare dataset, which is a targeted collection of data. There are a total of 70,221 images contained within this collection. The name of the second collection of data is the Repository of Molecular Brain Neoplasia Data (REMBRANDT) [36]. This set of data has MRI images of gliomas with grades II, III, and IV from 133 patients, and it has 109,021 images in total.

The Cancer Genome Atlas Low-Grade Glioma dataset is the third dataset that was analyzed (TCGA-LGG) [37], and it has 242,185 MRI images of patients with low-grade gliomas (G-I and G-II) and incorporates data from 198 patients. These three datasets are part of the Cancer Imaging Archive (TCIA) project [38]. In each instance, multimodal imaging was performed, including T1-contrast-enhanced and FLAIR images [39]. The last collection of data used in this investigation consists of 3067 T1-weighted, contrast-improved images from 243 patients with three different types of brain tumors: gliomas (1427 slices), meningiomas (709 slices), and pituitary tumors (931 slices). Figure 1 depicts the different grades of brain tumors from the dataset. Totally, 3165 images are collected for the Classification-1 mode, 1743 of which are malignant tumors and 1422 of which are not. For the Classification-2 mode, 4195 images are collected. There are 910 normal images, 985 glioma images, 750 meningioma images, 750 pituitary images, and 800 metastatic images. For the Classification-3 mode, we obtain a total of 4720 images: 1712 G-II, 1296 G-III, and 1712 G-IV. Table 1 represents the dataset split-up details for the proposed model.

Fig. 1
figure 1

a Manual tumor segmentation; b WHO grade II (first row), grade III (second row), and grade IV (third row) brain tumors

Table 1 Number of MRI images in the dataset

Methods

Convolutional neural network

The CNN is the neural network DL model that is most frequently employed. A common CNN model has two components: classification and feature extraction. A CNN architecture has five key layers: the input layer, convolution layer, pooling layer, fully connected layer, and classification layer. The CNN provides the extraction and classification of features using successively arranged trainable layers. Convolutional and pooling layers are typically included in the feature extraction phase of a CNN, whereas fully connected and classification layers are typically included in the classification part. This proposed study suggests creating three fully automatic CNN models for classifying different types of brain tumors using MRI images. Grid search optimization tunes the key hyperparameters of the CNN models automatically. The primary of these CNN models determines whether a particular MRI image of a patient has a tumor or not, as it is employed to diagnose brain tumors. Throughout this study, this mode will be referred to as “Classification 1” (C-1). According to Fig. 2, the proposed CNN model for C-1 consists of thirteen weighted layers: one input layer, two convolution layers, two ReLU layers, one normalization layer, two max-pooling layers, two fully connected layers, one dropout layer, one softmax layer, and one classification layer.

Fig. 2
figure 2

Proposed CNN model architecture for “C-1” mode

The initial CNN model is meant to classify an image into two groups, and it has two neurons in the output layer. Finally, a softmax classifier is fed the output of the fully connected layer (a two-dimensional feature vector) to determine whether a tumor is present or not. Table 2 illustrates detailed information on the CNN model. There are five distinct forms of brain tumors that are distinguished by the second CNN model: benign, malignant, meningioma, pituitary, and metastatic. Throughout this study, this mode will be referred to as “Classification 2” (C-2). As shown in Fig. 3, the proposed CNN model for C-2 contains a total of 25 weighted layers: 1 input layer, 6 convolution layers, 6 ReLU layers, 1 normalization layer, 6 max-pooling layers, 2 fully connected layers, 1 dropout layer, 1 softmax layer, and 1 classification layer. The output layer of the second CNN model has five neurons as a result of the model’s intention to classify each given image into five distinct categories. The final prediction of the tumor type is made using a softmax classifier, which receives as input the five-dimensional feature vector generated by the final fully connected layer. Table 3 illustrates detailed information on the CNN model. The third proposed CNN framework divides glioma brain tumors into three grades, which are called G-II, G-III, and G-IV. Throughout this study, this mode will be referred to as “Classification 3” (C-3). As can be seen in Fig. 4, the proposed CNN model for C-3 consists of a total of sixteen weighted layers: one input layer, three convolution layers, three ReLU layers, one normalization layer, three max-pooling layers, two fully connected layers, one dropout layer, one softmax layer, and one classification layer. The most recent CNN model has three neurons in the output layer because it is meant to divide every image into three groups. The final fully connected layer, which is a three-dimensional feature vector, is sent to the softmax classifier as an input. The softmax classifier then makes a final prediction about the tumor grade. Table 4 illustrates detailed information on the CNN model.

Table 2 Detailed information on CNN model employed for “C-1” mode
Fig. 3
figure 3

Proposed CNN model architecture for “C-2” mode

Table 3 Detailed information on CNN model employed for “C-2” mode
Fig. 4
figure 4

Proposed CNN model architecture for “C-3” mode

Table 4 Detailed information on CNN model employed for “C-3” mode

Performance metric evaluation

It is essential to analyze the classification performance in image classification research to provide a rational foundation for the outcomes of the investigation. Many different performance evaluation metrics have been used for an extended period in studies involving image classification and that have evolved into standard performance evaluation metrics in studies that are similar to the prior. The proposed model used different parametric methods for evaluation, such as precision, sensitivity, and accuracy. These measures, which are generally acknowledged as standard performance evaluation metrics in image classification research, are also employed in this article in order to measure the accuracy and reliability of the classification process. Furthermore, the receiver operation characteristic (ROC) curve area, also known as the AUC of the ROC curve, is used to evaluate the models’ performance. The following are the equations containing the corresponding formulas for each of these measurements:

$$Accuracy=\frac{\varnothing +\beta }{\varnothing +\beta +\alpha +\gamma }$$
(1)
$$Specificity=\frac{\beta }{\beta +\alpha }$$
(2)
$$Precision=\frac{\varnothing }{\varnothing +\alpha }$$
(3)
$$Sensitivity=\frac{\varnothing }{\varnothing +\gamma }$$
(4)

where ø is true positive, β is true negative, α is false positive, and γ is false negative.

Experimental Study

We implemented the proposed classification model in MATLAB2021a on a computer with the specifications of 32 GB RAM and an Intel E3-1245v6 @3.70GHz CPU.

Optimization of the Hyperparameters

There have been several developments in the field of medical image processing that have led to the increased use of CNNs, and, as a result, some challenges have arisen in their use. The designs designed to obtain more effective outcomes are deeper, and the input images are becoming higher-quality, which leads to an increase in the amount of processing resources required. Sufficient hardware and tuning the network’s hyperparameters are essential for lowering these computing costs and maximizing results. As a result, the proposed CNN models have nearly all of their essential hyperparameters automatically set using the grid search optimization technique. When the search space for possible values is small, grid search optimization is a great way to improve a CNN’s hyperparameter optimizations. The grid search can select the superior one by training the network through a wide range of possible combinations. CNN models have architectures that are quite complicated and that have a lot of hyperparameters. In most cases, these hyperparameters can be arranged into two distinct categories: architectural hyperparameters and fine-adjustment hyperparameters. Architectural hyperparameters include the following: the number of convolutional pooling layers, the number of fully connected layers, the number of filters, the filter sizes, and the activation function. The regularization, momentum, minibatch size, and learning rate are among the fine-adjustment hyperparameters. In the current analysis, the hyperparameters of the architecture are initially tuned using Algorithm 1.

figure a

Algorithm 1. Architectural hyperparameters will be optimized using a grid search algorithm

After determining the architectural hyperparameters, Algorithm 2 is used to optimize the fine-adjustment hyperparameters. In this proposed study, the grid search is carried out on the training set employing a fivefold cross-validation method. The dataset is split into five different sets. Four of these sets are used for training, and the fifth set is used for testing. For the Classification-1 mode, there are 3165 images, for the Classification-2 mode, there are 4195 images, and for the Classification-3 mode, there are 4720 images. For each classification mode, the dataset is randomly split into a training set, a validation set, and a test set, with the ratio being 60:20:20. Basically, the grid search method goes through each possible setting for each parameter and finds the one that gives the best performance. In order to obtain the highest possible degree of accuracy with Algorithm 1, there are five parameters that need to be improved.

figure b

Algorithm 2. Architectural hyperparameters will be optimized using a grid search algorithm

Many possible combinations for these parameters, including 4, 4, 7, 5, and 4, correspondingly. As a result, the total number of possible permutations to be examined is 4 × 4 × 7 × 5 × 4, which equals 2240. Because 2240 combinations need to be checked using the fivefold cross-validation technique, the grid search algorithm created to optimize the CNN model hyper-parameters is carried out 11,200 times. Similar to the first algorithm, the second algorithm has four parameters that need to be optimized to achieve the highest level of accuracy. A wide range of permutations are possible in these parameters, for example, 4, 4, 5, and 4. As a result, the total number of possible permutations that need to be examined is 4 × 4 × 5 × 4, which equals 320. Because 320 different possible combinations need possible combinations that need to be tested using the fivefold cross-validation method, the grid search technique developed to improve the correction hyperparameters of the CNN model is carried out a total of 1600 times. As shown in Tables 5, 6 and 7, the grid search optimization algorithm found the best possible values for the hyperparameters of the C-1, C-2, and C-3 modes.

Table 5 The grid search-yielded optimal results for the hyperparameters for the C-1 mode
Table 6 The grid search-yielded optimal results for the hyperparameters for the C-2 mode
Table 7 The grid search-yielded optimal results for the hyperparameters for the C-3 mode

Optimized Convolutional Neural Network Outcomes

The fivefold cross-validation approach for the C-1 mode is utilized to conduct the proposed model's performance analysis. The dataset is partitioned into five different sets, four of which are utilized for training purposes, while the fifth set is placed to use for testing purposes. There are five total iterations of the experiments, and the classification performance of the mode is evaluated for each fold, and then the overall model’s average classification performance is computed. High accuracy results from the training and validation phases are meaningless if the trained and hyperparameter-tuned CNN is not tested on its ability to predict samples that have not yet been seen. Hence, to assess the effectiveness of the trained CNN to assess the trained CNN's effectiveness on predicting samples, a test dataset is randomly allocated and segregated alongside the training and validation datasets. If this step is skipped, the high accuracy may result from biased dataset assignment. Table 8 displays the results of randomly splitting the 3165 images from the study into the training, validation, and test sets in the ratio of 60:20:20 for the C-1 mode.

Table 8 Training, validating, and testing phases of proposed CNN model

A total of 299 images are taken randomly from the dataset for each category, and then those images are used for testing. The activations of the CNN’s convolution layers can be displayed for a better view of the features that the CNN has learned due to its training. With this representation, the researcher may easily observe the network’s progress. Figures 5 and 6 each depict the activations of the first and second convolutional layers. One of the images in the grid serves as a representation of the channel’s outcome. White areas represent highly positive activations, while grey areas represent moderately activated channels. While the first convolutional layer of the CNN is used to learn features such as color and edges, the second convolutional layer is used to learn more complex information, such as the borders of brain tumors. The succeeding (deeper) convolutional layers build up their features by merging the features learned by the earlier convolutional layers.

Fig. 5
figure 5

First CNN activation layer for C-1 mode

Fig. 6
figure 6

Second CNN activation layer for C-1 mode

Figure 5 shows 96 of the 128 channels in the CNN’s first convolutional layer running in C-1 mode. This layer contains a total of 128 channels. Figure 6 shows an image of the second convolutional layer of the network, which has 96 channels. Every layer of the CNN is composed of channels, which are arrays in two dimensions. One of the images in Fig. 5 represents the output of each channel in the first convolutional layer. In these images, strong positive activations are shown by white pixels, and strong negative activations are shown by black pixels. Similarly, grey pixels on the input image indicate channels that are not highly active. Figure 7 depicts the activations of a particular channel and the channel with the most significant activation in the first convolutional layer. The presence of white pixels in the channel of Fig. 7 demonstrates that this channel is highly activated at the tumor's location. Although the CNN was never instructed to learn about tumors, it is possible to conclude that it has picked up on the fact that tumors have distinguishing qualities that allow it to differentiate between different categories of images.

Fig. 7
figure 7

C-1-mode strongest and moderate images from original input image

These CNNs are able to discover helpful characteristics on their own, unlike earlier artificial neural network methods that typically required manual design to fit a particular mode. In this proposed article, learning to recognize tumors improves the ability to distinguish between a tumor image and non-tumor image. After the process of classification has been completed, the efficiency of the CNN models must be evaluated using different reliable approaches. The metrics, like the specificity, sensitivity, precision, and accuracy measures, as well as the area under the ROC curve, are used to perform the performance evaluation of the proposed model. The proposed CNN’s loss and accuracy plots for the C-1 mode are shown in Fig. 8. After 340 iterations, the model proposed for C-1 was able to classify with a 99.53% accuracy. It is pretty clear, as shown in Fig. 8, that approximately 250 iterations are required to reach an almost perfect level of accuracy. Figure 9 depicts the confusion matrix for the Classification-1 mode. As can be seen in Fig. 10, the area under the ROC curve has a value of 0.9995 for its AUC. The results presented here demonstrate that the recommended CNN model is capable of identifying brain tumors. Table 9 shows the measures of the accuracy, such as the true positive (TP), true negative (TN), false positive (FP), false negative (FN), accuracy (Acc), specificity (Sp), sensitivity (Se), and precision (Pr). Figure 10 depicts the ROC curve for the Classification-1 (C-1) task.

Fig. 8
figure 8

C-1-mode accuracy and loss curves

Fig. 9
figure 9

C-1 confusion matrix

Fig. 10
figure 10

C-1-mode average of ROC curve

Table 9 Proposed CNN model parameter metric outcomes for all classification modes

Figure 11 shows the results of the classification and the predicted probabilities for each of the four tests conducted in C-1 mode. Implementing the fivefold cross-validation method for the C-2 mode evaluates the effectiveness of the proposed framework. The dataset is partitioned into five sets, four of which are utilized for training purposes, while the fifth set is placed for testing purposes. There are five total iterations of the experiments. The classification performance of the job is evaluated for each fold, and then the overall model’s average classification performance is computed. As indicated in Table 8, there are sufficient images for the C-2-mode training, validation, and test sets to be randomly divided in a ratio of 60:20:20 for a sample size of 4195. From the dataset of each class that will be used to test the model, 158 images are randomly selected to be removed. The accuracy and loss plots of the suggested CNN model for the C-2 task are displayed in Fig. 12. The proposed CNN method for the C-2 mode achieves a 93.81% accuracy in classification after 294 iterations. As shown in Fig. 13, the area under the ROC curve has a value of 0.9981. These findings demonstrate the proposed CNN model's capability to classify brain tumor types. Figure 14 depicts a confusion matrix, and Table 9 lists the many measures of precision, such as TP, TN, FP, FN, Acc, Sp, Se, and Pr. According to Table 9, an accuracy of 97.26% is attained when classifying a glioma, 97.50% when classifying a meningioma, 96.86% when classifying metastasis, 97.99% when classifying a healthy brain, and 95.59% when classifying the pituitary tumor type for the C-2 mode. Figure 14 depicts the ROC curve for the Classification-2 (C-2) task.

Fig. 11
figure 11

The results of classification and predictions for the probabilities of four different test images for the C-1 mode

Fig. 12
figure 12

C-2-mode accuracy and loss curves

Fig. 13
figure 13

C-2-mode average of ROC curve

Fig. 14
figure 14

C-2 confusion matrix

The fivefold cross-validation process for the C-3 mode is utilized to evaluate the efficacy of the proposed models. The dataset is partitioned into five different sets, out of which four are used for training and the fifth is used for testing. There are five total iterations of the experiments. Following an analysis of the classification performance of the mode for each fold, an average classification performance for the model is computed. For the C-3 mode, sufficient images can be randomly divided into training, validation, and test sets in the proportions 60:20:20, as indicated in Table 8, randomly excluding three hundred and five images from the dataset of each class to be utilized to evaluate the model. The loss and accuracy graphs of the proposed CNN for the C-3 mode are shown in Fig. 15. Figure 16 depicts the confusion matrix for the C-3 mode. The proposed approach for the C-3 mode obtains a classification accuracy of 98.16% after 344 iterations. Figure 17 depicts the ROC curve for the Classification-3 (C-3) task. Table 9 shows that an accuracy of 98.16% is reached when classifying grade II, 100% when classifying grade III, and 98.17% when classifying grade IV for brain tumor grades in the C-3 mode. The three different classification outcomes of the proposed CNN model were compared with other conventional CNN approach outcomes to evaluate the proposed system classification ability. To achieve this goal, the same experiments were performed with the same dataset, utilizing well-known and popular pretrained CNN models, such as AlexNet, DenseNet121, ResNet-101, VGG-16, and GoogleNet. Table 10 illustrates the performance metric outcome comparison of the proposed CNN model with existing CNN approaches. Figure 18 depicts the graphical representation of the proposed and existing models’ result comparison.

Fig. 15
figure 15

C-3-mode accuracy and loss curves

Fig. 16
figure 16

C-3 confusion matrix

Fig. 17
figure 17

C-3-mode average of ROC curve

Table 10 Performance metric outcome comparison of the proposed CNN model with existing CNN approaches
Fig. 18
figure 18

Graphical illustration of proposed and existing models’ outcome comparison

The results shown in Table 10 illustrate that the proposed CNN models outperform other networks in every classification mode. The pretrained DenseNet121 model, which obtains a 93.89% classification accuracy in the brain tumor detection test (C-1 mode), is the model that is closest to the suggested model. The pretrained VGG-16 model obtains an 89.19% accuracy in the brain tumor-type classification mode (C-2 mode). It is the model that is closest to the proposed CNN model. After the proposed CNN model, the pretrained GoogleNet model achieves a classification accuracy of 95.12%, making it the best network available for grading tumors (C-3 mode). It is clear that the proposed CNN models are better than the pretrained networks, which were built and trained using generic datasets and methods for a wide range of image classification tasks. Table 11 illustrates the proposed and existing model outcome comparison. The proposed CNN models, conversely, were designed to deal with more specific issues, like identifying and defining various types and stages of brain tumors. Finally, MRI images of brain tumors are used to train and evaluate the proposed models.

Table 11 Comparison of the proposed model with existing studies

Conclusions

In this research, we propose a multi-classification method for identifying brain tumors at an early stage using (CNN) models, in which nearly all the hyperparameters are automatically optimized via grid search. By using publicly available medical imaging datasets, three reliable CNN models have been designated to perform three distinct brain tumor classification tasks. A high level of accuracy, such as 99.53%, can be attained in the process of detecting brain tumors. In addition, a remarkable accuracy of 93.81% is achieved when classifying brain MR images into the categories of glioma, meningioma, pituitary, normal brain, and metastatic. The final step is grading glioma brain tumors, which can be performed with an accuracy of 98.56% for grades II, III, and IV. A good number of medical images are used to train and test the CNN models that are being proposed. Results from the proposed CNN models and comparisons with current methods show that CNN models made with the proposed optimization framework work well. In this work, CNN models were made that can help clinicians and radiologists check primary screenings for multiple types of brain tumors.

Availability of data and materials

The datasets used during the current study are available from the corresponding author upon reasonable request.

References

  1. Abiwinanda N, Hanif M, Hesaputra ST, Handayani A, Mengko TR. Brain tumor classification using convolutional neural network. IFMBE Proc. 2019;68:183–9.

    Article  Google Scholar 

  2. Ayadi W, Elhamzi W, Charfi I, Atri M. Deep CNN for brain tumor classification. Neural Process Lett. 2021;53:671–700.

    Article  Google Scholar 

  3. Badža MM, Barjaktarović MČ. Classification of brain tumors from MRI images using a convolutional neural network. Appl Sci. 1999;2020:10.

    Google Scholar 

  4. Saravanan S, Kumar VV, Sarveshwaran V, Indirajithu A, Elangovan D, Allayear SM. Computational and Mathematical Methods in Medicine Glioma Brain Tumor Detection and Classification Using Convolutional Neural Network. Comput Math Methods Med. 2022;2022:4380901.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  5. Ge C, Gu IYH, Jakola AS, Yang J. Deep semi-supervised learning for brain tumor classification. BMC Med Imaging. 2020;20:87.

    Article  PubMed  PubMed Central  Google Scholar 

  6. Cinar A, Yildirim M. Detection of tumors on brain MRI images using the hybrid convolutional neural network architecture. Med Hypotheses. 2020;139: 109684.

    Article  PubMed  Google Scholar 

  7. Pei L, Vidyaratne L, Rahman MM, Iftekharuddin KM. Context aware deep learning for brain tumor segmentation, subtype classification, and survival prediction using radiology images. Sci Rep. 2020;10:19726.

    Article  CAS  PubMed  PubMed Central  Google Scholar 

  8. Balasooriya NM, Nawarathna R.D. A sophisticated convolutional neural network model for brain tumor classification. In Proceedings of the 2017 IEEE International Conference on Industrial and Information Systems, Peradeniya, Sri Lanka, 15–16  2017; pp. 1–5

  9. Deepak VK, Sarath R. Multi-Class Brain Cancer Classification Using Deep Learning Convolutional Neural Network. PalArch’s J Archaeol Egypt/Egyptol. 2020;17:5341–60.

    Google Scholar 

  10. Khan HA, Jue W, Mushtaq M, Mushtaq MU. Brain tumor classification in MRI image using convolutional neural network. Math Biosci Eng. 2020;17:6203–16.

    Article  PubMed  Google Scholar 

  11. Islam R, Imran S, Ashikuzzaman M, Khan MMA. Detection and Classification of Brain Tumor Based on Multilevel Segmentation with Convolutional Neural Network. Biomed Sci Eng. 2020;13:45–53.

    Article  Google Scholar 

  12. Reza AW, Hossain MS, Wardiful MA, Farzana M, Ahmad S, Alam F, Nandi RN, Siddique N. A CNN-Based Strategy to Classify MRI-Based Brain Tumors Using Deep Convolutional Network. Appl Sci. 2023;13:312.

    Article  CAS  Google Scholar 

  13. Abd-Ellah MK, Awad AI, Khalaf AA, Hamed HF. Two-phase multi-model automatic brain tumor diagnosis system from magnetic resonance images using convolutional neural networks. EURASIP J Image Video Process. 2018;97:1–10.

    Google Scholar 

  14. Noreen N, Palaniappan S, Qayyum A, Ahmad I, Alassafi MO. Brain Tumor Classification Based on Fine-Tuned Models and the Ensemble Method. Comput Mater Contin. 2023;67:3967–82. https://doi.org/10.32604/cmc.2021.014158.

    Article  Google Scholar 

  15. Mohsen H, El-Dahshan ESA, El-Horbaty ESM, Salem ABM. Classification using deep learning neural networks for brain tumors. Future Comput Inform J. 2018;3:68–71.

    Article  Google Scholar 

  16. Chattopadhyay A, Maitra M. MRI-based brain tumor image detection using CNN based deep learning method. Neurosci Inform. 2022;2:100060.

    Article  Google Scholar 

  17. Deshpande A, Estrela VV, Patavardhan P. The DCT-CNN-ResNet50 architecture to classify brain tumors with super-resolution, convolutional neural network, and the ResNet50. Neurosci Inform. 2021;1:100013.

    Article  Google Scholar 

  18. Wankhede DS, Selvaran R. Dynamic architecture based deep learning approach for glioblastoma brain tumor survival prediction. Neurosci Inform. 2022;2:100062.

    Article  Google Scholar 

  19. Rai HM, Chatterjee K. Detection of brain abnormality by a novel Lu-Net deep neural CNN model from MR images. Mach Learn Appl. 2020;2:100004.

    Google Scholar 

  20. Ramya M, Kirupa G, Rama A. Brain tumor classification of magnetic resonance images using a novel CNN-based medical image analysis and detection network in comparison with AlexNet. J Popul Ther Clin Pharmacol. 2022;29:e97–108. https://doi.org/10.47750/jptcp.2022.898.

    Article  PubMed  Google Scholar 

  21. Bingol H, Alatas B. Classification of Brain Tumor Images using Deep Learning Methods. Turk J Sci Technol. 2021;16:137–43.

    Google Scholar 

  22. Acquarelli J, van Laarhoven T, Postma GJ, Jansen JJ, Rijpma A, van Asten S, Heerschap A, Buydens LMC, Marchiori E. Convolutional neural networks to predict brain tumor grades and Alzheimer’s disease with MR spectroscopic imaging data. PLoS ONE. 2021;7:e0268881.

    Google Scholar 

  23. Bhandari A, Koppen J, Agzarian M. Convolutional neural networks for brain tumor segmentation. Insights Imaging. 2020;11:1–9.

    Article  Google Scholar 

  24. Shelatkar T, Urvashi D, Shorfuzzaman M, Alsufyani A, Lakshmanna K. Diagnosis of Brain Tumor Using Light Weight Deep Learning Model with Fine-Tuning Approach. Comput Math Methods Med. 2022;2022:285884.

    Article  Google Scholar 

  25. Shwetha V, Madhavi CR, Nagendra KM. Classification of Brain Tumors Using Hybridized Convolutional Neural Network in Brain MRI images. Int J Circuits Syst Signal Process. 2022;16:561–70.

    Article  Google Scholar 

  26. Anagun Y. Smart brain tumor diagnosis system utilizing deep convolutional neural networks. Multimed Tools Appl. 2023;675:1–27.

    Google Scholar 

  27. Rahman T, Islam MS. MRI brain tumor detection and classification using parallel deep convolutional neural networks. Meas Sens. 2023;26:100694.

    Article  Google Scholar 

  28. Al-Zoghby AM, Al-Awadly EMK, Moawad A, Yehia N, Ebada AI. Dual Deep CNN for Tumor Brain Classification. Diagnostics. 2023;13:2050.

    Article  PubMed  PubMed Central  Google Scholar 

  29. Saeedi S, Rezayi S, Keshavarz HR, Niakan Kalhori S. MRI-based brain tumor detection using convolutional deep learning methods and chosen machine learning techniques. BMC Med Inform Decis Mak. 2023;23:1–17.

    Article  Google Scholar 

  30. Srinivasan S, Bai PSM, Mathivanan SK, Muthukumaran V, Babu JC, Vilcekova L. Grade Classification of Tumors from Brain Magnetic Resonance Images Using a Deep Learning Technique. Diagnostics. 2023;13:1153.

    Article  PubMed  PubMed Central  Google Scholar 

  31. Yin Z, Gao H, Gong J, Wang Y. WD-UNeXt: Weight loss function and dropout U-Net with ConvNeXt for automatic segmentation of few shot brain gliomas. IET Image Process. 2023;17:3271–80.

    Article  Google Scholar 

  32. Prasad V, Vairamuthu S, Selva Rani B. K-Net-Deep joint segmentation with Taylor driving training optimization based deep learning for brain tumor classification using MRI. The Imaging Sci J. 2023. https://doi.org/10.1080/13682199.2023.2208963.

    Article  Google Scholar 

  33. Barboriak D. Data from RIDER_NEURO_MRI. Cancer Imag Arch. 2015. https://doi.org/10.7937/K9/TCIA.2015.VOSN3HN1.

    Article  Google Scholar 

  34. Lisa S, Flanders Adam E, Mikkelsen JR, Tom Andrews DW. Data From REMBRANDT. Arch: Cancer Imag; 2015. https://doi.org/10.7937/K9/TCIA.2015.588OZUZB.

    Book  Google Scholar 

  35. Pedano N, Flanders AE, Scarpace L, Mikkelsen T, Eschbacher JM, Hermes B, Ostrom Q. Radiology data from the cancer genome atlas low grade glioma [TCGA-LGG] collection. Cancer Imag Arch. 2016. https://doi.org/10.7937/K9/TCIA.2016.L4LTD3TK.

    Article  Google Scholar 

  36. Clark K, Vendt B, Smith K, Freymann J, Kirb J, Koppel P, Moore S, Phillips S, Maffitt D, Pringle M. The cancer imaging archive (TCIA): Maintaining and operating a public information repository. J Digit Imaging. 2013;26:1045–57.

    Article  PubMed  PubMed Central  Google Scholar 

  37. Cheng J, Huang W, Cao S, Yang R, Yang W, Yun Z, Wang Z, Feng Q. Enhanced performance of brain tumor classification via tumor region augmentation and partition. PLoS ONE. 2015;10: e0140381.

    Article  PubMed  PubMed Central  Google Scholar 

  38. Rahim T, Usman MA, Shin SY. A survey on contemporary computer-aided tumor, polyp, and ulcer detection methods in wireless capsule endoscopy imaging. Comput Med Imaging Graph. 2020;85: 101767.

    Article  PubMed  Google Scholar 

  39. Rahim T, Hassan SA, Shin SY. A deep convolutional neural network for the detection of polyps in colonoscopy images. Biomed Signal Process Control. 2021;68: 102654.

    Article  Google Scholar 

Download references

Acknowledgements

Not applicable.

Institutional Review Board Statement

Not applicable.

Human Participants Research Checklist:

Complete the following if your study involved human participants or human participants’ data. These questions should be addressed for prospective and retrospective studies.

1. Did you obtain ethics approval for this study?

• If yes, please upload (file type “Other”) the original approval document you received from your ethics committee. If the original document is in another language, please also provide an English translation.

Response: N/A

• If you did not obtain ethical approval, please explain why this was not required below.

2. If you prospectively recruited human participants for the study for example, you conducted a clinical trial, distributed questionnaires, or obtained tissues, data or samples for the purposes of this study, please report in the Methods:

i. the day, month and year of the start and end of the recruitment period for this study.

ii. whether participants provided informed consent, and if so, what type was obtained (for instance, written or verbal, and if verbal, how it was documented and witnessed). If your study included minors, state whether you obtained consent from parents or guardians. If the need for consent was waived by the ethics committee, please include this information.

Response: N/A

3. If you are reporting a retrospective study of medical records or archived samples, please report in the Methods section:

i. the day, month and year when the data were accessed for research purposes

ii. whether authors had access to information that could identify individual participants during or after data collection

Response: N/A

Funding

This research received no external funding.

Author information

Authors and Affiliations

Authors

Contributions

Conceptualization, S.S. and D.F.; methodology, S.K.M. and H.R.; valida-tion, H.R. and M.A.S.; data curation, B.D.S.; writing—original draft, S.S. and D.F.; writing—review and editing, S.K.M. and H.R.; visualization, B.D.S; supervision S.K.M., and M.A.S.; project ad-ministration, S.K.M., and M.A.S. All authors have read and agreed to the published version of the manuscript.

Corresponding author

Correspondence to Mohd Asif Shah.

Ethics declarations

Consent for publication

Not applicable.

Competing of interests

The authors declare no competing interests.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/. The Creative Commons Public Domain Dedication waiver (http://creativecommons.org/publicdomain/zero/1.0/) applies to the data made available in this article, unless otherwise stated in a credit line to the data.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Srinivasan, S., Francis, D., Mathivanan, S.K. et al. A hybrid deep CNN model for brain tumor image multi-classification. BMC Med Imaging 24, 21 (2024). https://doi.org/10.1186/s12880-024-01195-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s12880-024-01195-7

Keywords