# Deep Learning Model for Automatic Classification and Prediction of Brain Tumor

Authors: Sarang Sharma; Sheifali Gupta; Deepali Gupta; Abhinav Juneja; Harsh Khatter; Sapna Malik; Zelalem Kiros Bitsue
Journal: Journal of Sensors
 (2022)

---

## Abstract

A brain tumor (BT) is an unexpected growth or fleshy mass of abnormal cells. Depending upon their cell structure they could either be benign (noncancerous) or malign (cancerous). This causes the pressure inside the cranium to increase that may lead to brain injury or death. This causes excessive exhaustion, hinders cognitive abilities, headaches become more frequent and severe, and develops seizures, nausea, and vomiting. Therefore, in order to diagnose BT computerized tomography (CT), magnetic resonance imaging (MRI), positron emission tomography (PET), and blood and urine tests are implemented. However, these techniques are time consuming and sometimes yield inaccurate results. Therefore, to avoid such lengthy and time-consuming techniques, deep learning models are implemented that are less time consuming, require less sophisticated equipment, yield results with greater accuracy, and are easy to implement. This paper proposes a transfer learning-based model with the help of pretrained VGG19 model. This model has been modified by utilizing a modified convolutional neural network (CNN) architecture with preprocessing techniques of normalization and data augmentation. The proposed model achieved the accuracy of 98% and sensitivity of 94.73%. It is concluded from the results that proposed model performs better as compared to other state-of-art models. For training purpose, the dataset has been taken from the Kaggle having 257 images with 157 with brain tumor (BT) images and 100 no tumor (NT) images. With such results, these models could be utilized for developing clinically useful solutions that are able to detect BT in CT images.


---

## Body

## 1. Introduction

The nervous system of the human body is controlled by the important organ called as the brain. It consists of 100 billions of nerve cells [1]. If any nerve cells are damaged, it may cause several human health problems which leads to abnormality in the brain of the human body. These damaged cells give an adverse effect on tissues of the brain. Such problem increases the risk of brain tumors in the human body [2]. Primary and metastatic are the two different categories of brain tumors. Primary brain tumors originated inside the brain which includes nerves, blood vessels, or various glands of the brain whereas metastatic brain tumor is developed in the different body parts of the human body like breasts or lungs and migrated into the brain [3]. Tumors are malignant or benign. Malignant brain tumors grow very fast in the body and are also cancerous. The most common malignant brain tumor is glioblastoma [4]. In benign brain tumors, the cells grow at a relatively slow speed are noncancerous too. Such type of tumor does not spread into other parts of the body. If it is removed safely from surgery, it will not come back into the body [5]. If the brain tumors are diagnosed at early stages, it increases the survival rate of the patients. Other primary brain tumors include pituitary tumors which are usually benign and are located near the pituitary glands; pineal gland tumors which could be either malignant or benign; lymphomas located at central nervous system which is malignant; and meningiomas and schwannomas, both of them occur in people in the age group in between 40 and 70 and mostly are benign.According to World Health Organization (WHO), there exist four grades of brain tumors [6]. Grading is the process of segmenting the brain tumor cells on the basis of their identification. The more the abnormal the cells represent, the higher the grade is detected. Grades I and II depict the lower level tumors whereas grade III and IV tumors comprise the most extreme ones [7]. In grade 1, the cells appear to be normal, hence less likely to infect other cells. In grade 2, cells appear to be slowly growing into the adjacent neighboring brain tissue. In grade 3, cells appear to be more abnormal and start spreading to other parts of the brain and central nervous system. In grade 4, cells exhibit more abnormality and start growing into tumors and spread these to other parts of the brain and spinal cord. A benign tumor is of low grade whereas malignant tumor is of high grade [8]. Depending upon the location, type, and size of the tumor, different methods are employed to treat different tumors. Surgery is the most widely recognized treatment of tumor and has no adverse effects [9]. Grade 4 tumors can also lead to neurodegenerative disease such as Alzheimer’s disease, Parkinson’s disease, and Huntington’s disease which lead to inability of basic cognitive and motor functions of the body and may lead to dementia.To detect the progress in modelling process, computed tomography images of the brain are used. Computed tomography (CT) is not only an alternate method for the detection of tumor but also provides more data about the given medical image [10].This paper encloses a novel CNN-based model that classifies BT in two categories, i.e., BT and NT. Moreover, the CNN model is trained and developed for a large dataset. The accuracy of the proposed model has been enhanced by implementing preprocessing techniques like normalization and data augmentation on the dataset. Thus, automated systems like these are helpful in saving time and also improve the efficiency in clinical institutions.


## 2. Related Work

Most of the researchers working on the binary classification of BT are comparatively using a similar dataset to design a CNN-based model that may not be versatile. The authors working on a large dataset have also implemented binary classification only with lesser accuracy. Table1 depicts comparison of existing state-of-art models in which approach used and challenges of the approach are given in details.Table 1
Comparison of existing state-of-art models.
Citation/year of publishingReferenceApproachObjectiveChallenges of the approach[1]/2021FINCDLLC-CNN, VGG19, VGG16To develop brain tumor classification technique by using CDLLC on CNN.Dataset contained 3064 brain tumor images. It implemented binary classification and yielded an accuracy of 96.39%.[2]/2021JAIHCSVM-CNN, VGG16, VGG19To distinguish brain tumor from healthy individuals using SVM with CNN.Dataset contained 1426 brain tumor images. It implemented binary classification and yielded an accuracy of 95.82%.[3]/2021MMTARNGAP-CNN, DenseNet201, VGG16To predict brain tumor from normal individual by RNGAP model on CNN.Dataset contained 3064 brain tumor images. It implemented binary classification and yielded an accuracy of 97.08%.[4]/2021MRT3DCNN, DenseNet201, VGG 16To detect brain tumor on CT scans using 3DCNN technique.Dataset contained 1074 brain tumor images. It implemented binary classification and yielded an accuracy of 92.67%.[5]/2021NCAMSMCNN, DenseNet121, VGG19To automatically classify CT images into brain tumor and normal individuals by using MSMCNN.Dataset contained 374 brain tumor images. It implemented binary classification and yielded an accuracy of 96.36%.[6]/2019BSHSANN, VGG19, DenseNet201To classify BT by using HSANN architecture.Dataset contained 3064 brain tumor images. It implemented binary classification and yielded an accuracy of 97.33%.[7]/2017SIVPELM-CNN, DenseNet201, VGG16To develop an ELM system to early diagnose BT individuals.Dataset contained 1074 brain tumor images. It implemented binary classification and yielded an accuracy of 97.8%.[8]/2020JDI3DCNN, DenseNet201To classify BT analysis by using 3DCNNDataset contained 1074 brain tumor images. It implemented binary classification and yielded an accuracy of 96.49%.[9]/2021JCSDeep-CNN, DenseNet121, DenseNet201To develop Deep-CNN system that can determine BT by using CT scans.Dataset contained 121 brain tumor images. It implemented binary classification and yielded an accuracy of 94.58%.[10]/2021WMPBECNN, VGG16, VGG19, DenseNet201To diagnose BT by using an ensemble system of CNN.Dataset contained 3064 brain tumor images. It implemented binary classification and yielded an accuracy of 84.19%.From Table1, it can be observed that a small size of dataset has been used to train and validate the existing state-of-art models. However, Gu et al. [1], Kumar et al. [3], Abd El Kader et al. [6], and Abiwinanda et al. [10] utilized comparatively larger datasets to validate their models. But, it can be noticed that these studies have worked on mostly binary classification.The proposed model in this research paper is trained on a large size of dataset having 1800 images. The proposed model classifies the brain tumor into two categories that is with brain tumor (BT) and no tumor (NT).


### 2.1. Brain Tumor Prediction Using Pretrained CNN Models

For a wide range of healthcare research and applications, the convolutional neural network models had always demonstrated to acquire higher-grade results. Still, building these pretrained convolutional neural network models from scratch had always been strenuous for prediction of this neurological disease due to restricted access of computed tomography (CT) images [11]. These pretrained models are derived from the concept of transfer learning, in which a trained D.L model from a large dataset is used to elucidate the problem with a smaller dataset [12]. Due to this, not only the requirement for a large dataset is removed but also removes excessive learning time required by various D.L models. This paper encloses four D.L models such as DenseNet121, DenseNet201, VGG16, and VGG19. These models were trained on ImageNet and then fine-tuned over BT images. In the last layer of these pretrained models, the fully connected layer (FCL) is inserted [13]. The architectural description and functional blocks of all architectures are shown in Tables 2(a) and 2(b), parameters are shown in Table 2(c), and Figure 1 displays the diagrammatic representation for these models, respectively.Table 2(a)
Different architectures of CNN: DenseNet121 and DenseNet201
LayersOutput sizeDenseNet121DenseNet201Convolution112×1127×7, stride 27×7, stride 2Pooling56×563×3 maxpool, stride 23×3 maxpool, stride 2Dense block 156×566×1×1conv,3×3conv6×1×1conv,3×3convTransitional layer 156×561×1conv1×1conv28×282×2averagepool,stride22×2averagepool,stride2Dense block 228×2812×1×1conv,3×3conv12×1×1conv,3×3convTransitional layer 228×281×1conv1×1conv14×142×2averagepool,stride22×2averagepool,stride2Dense block 314×1424×1×1conv,3×3conv48×1×1conv,3×3convTransitional layer 314×141×1conv1×1conv7×72×2averagepool,stride22×2averagepool,stride2Dense block 47×716×1×1conv,3×3conv32×1×1conv,3×3convClassification layer1×17×7globalaveragepool7×7globalaveragepool1000Fully connected, SoftmaxFully connected, Softmax(b)
Different architectures of CNN: VGG 16 and VGG 19
LayersOutput sizeVGG 16VGG 19Convolution Block1224×2242×Conv2D2×Conv2D112×112Max pooling 2DMax pooling 2DConvolution Block2112×1122×Conv2D2×Conv2D56×56Max pooling 2DMax pooling 2DConvolution Block356×563×Conv2D4×Conv2D28×28Max pooling 2DMax pooling 2DConvolution Block428×283×Conv2D4×Conv2D14×14Max pooling 2DMax pooling 2DConvolution Block514×143×Conv2D4×Conv2D7×7Max pooling 2DMax pooling 2DClassification layer40963×fullyconnected,Softmax3×fullyconnected,Softmax(c)
Different architectures of CNN and parameters of all the models
Name of modelSize of input layerSize of output layerNumber of layersTrainable parameters (millions)VGG16(224, 224, 3)(4,1)16138VGG19(224, 224, 3)(4,1)19143DenseNet121(224, 224, 3)(4,1)1218DenseNet201(224, 224, 3)(4,1)20110.2Figure 1
Illustration of the major functional blocks of four CNN models.DenseNet121 comprises one convolutional layer (CL), one max pooling layer (MPL), three transition layers (TL), one average pooling layer (APL), one FCL, and one Softmax layer (SML) with 10.2 million trainable parameters. It has also four dense block layers (DBL) in which the third and fourth dense blocks have one CL of stride1×1 and stride 3×3, respectively [14]. DenseNet201 comprises one CL, one MPL, three TL, one APL, one FCL, and one SML with 10.2 million trainable parameters. It has also four DBL in which third and fourth DBL have two CL of stride 1×1 and stride 3×3, respectively [15]. VGG16 comprises thirteen CL, five MPL, three FCL, and one SML with 138 million trainable parameters [16]. VGG19 comprises sixteen CL, five MPL, two FCL, and one SML with 143 million trainable parameters [17].


## 2.1. Brain Tumor Prediction Using Pretrained CNN Models

For a wide range of healthcare research and applications, the convolutional neural network models had always demonstrated to acquire higher-grade results. Still, building these pretrained convolutional neural network models from scratch had always been strenuous for prediction of this neurological disease due to restricted access of computed tomography (CT) images [11]. These pretrained models are derived from the concept of transfer learning, in which a trained D.L model from a large dataset is used to elucidate the problem with a smaller dataset [12]. Due to this, not only the requirement for a large dataset is removed but also removes excessive learning time required by various D.L models. This paper encloses four D.L models such as DenseNet121, DenseNet201, VGG16, and VGG19. These models were trained on ImageNet and then fine-tuned over BT images. In the last layer of these pretrained models, the fully connected layer (FCL) is inserted [13]. The architectural description and functional blocks of all architectures are shown in Tables 2(a) and 2(b), parameters are shown in Table 2(c), and Figure 1 displays the diagrammatic representation for these models, respectively.Table 2(a)
Different architectures of CNN: DenseNet121 and DenseNet201
LayersOutput sizeDenseNet121DenseNet201Convolution112×1127×7, stride 27×7, stride 2Pooling56×563×3 maxpool, stride 23×3 maxpool, stride 2Dense block 156×566×1×1conv,3×3conv6×1×1conv,3×3convTransitional layer 156×561×1conv1×1conv28×282×2averagepool,stride22×2averagepool,stride2Dense block 228×2812×1×1conv,3×3conv12×1×1conv,3×3convTransitional layer 228×281×1conv1×1conv14×142×2averagepool,stride22×2averagepool,stride2Dense block 314×1424×1×1conv,3×3conv48×1×1conv,3×3convTransitional layer 314×141×1conv1×1conv7×72×2averagepool,stride22×2averagepool,stride2Dense block 47×716×1×1conv,3×3conv32×1×1conv,3×3convClassification layer1×17×7globalaveragepool7×7globalaveragepool1000Fully connected, SoftmaxFully connected, Softmax(b)
Different architectures of CNN: VGG 16 and VGG 19
LayersOutput sizeVGG 16VGG 19Convolution Block1224×2242×Conv2D2×Conv2D112×112Max pooling 2DMax pooling 2DConvolution Block2112×1122×Conv2D2×Conv2D56×56Max pooling 2DMax pooling 2DConvolution Block356×563×Conv2D4×Conv2D28×28Max pooling 2DMax pooling 2DConvolution Block428×283×Conv2D4×Conv2D14×14Max pooling 2DMax pooling 2DConvolution Block514×143×Conv2D4×Conv2D7×7Max pooling 2DMax pooling 2DClassification layer40963×fullyconnected,Softmax3×fullyconnected,Softmax(c)
Different architectures of CNN and parameters of all the models
Name of modelSize of input layerSize of output layerNumber of layersTrainable parameters (millions)VGG16(224, 224, 3)(4,1)16138VGG19(224, 224, 3)(4,1)19143DenseNet121(224, 224, 3)(4,1)1218DenseNet201(224, 224, 3)(4,1)20110.2Figure 1
Illustration of the major functional blocks of four CNN models.DenseNet121 comprises one convolutional layer (CL), one max pooling layer (MPL), three transition layers (TL), one average pooling layer (APL), one FCL, and one Softmax layer (SML) with 10.2 million trainable parameters. It has also four dense block layers (DBL) in which the third and fourth dense blocks have one CL of stride1×1 and stride 3×3, respectively [14]. DenseNet201 comprises one CL, one MPL, three TL, one APL, one FCL, and one SML with 10.2 million trainable parameters. It has also four DBL in which third and fourth DBL have two CL of stride 1×1 and stride 3×3, respectively [15]. VGG16 comprises thirteen CL, five MPL, three FCL, and one SML with 138 million trainable parameters [16]. VGG19 comprises sixteen CL, five MPL, two FCL, and one SML with 143 million trainable parameters [17].


## 3. Research Methodology

Many studies and research have been conducted on BT but very less work has been implemented and published on comparative analysis of BT using four D.L models which are VGG16, VGG19, DenseNet121, and DenseNet201. Then, these models results are displayed and compared by plotting graphs of accuracy, loss, and learning curves and determining validation rules [18].


### 3.1. Dataset

For the proposed solution, an open access dataset is used which is available on (https://www.kaggle.com/navoneel/brain-mri-images-for-brain-tumor-detection/) uploaded by Navoneel Chakrabarty on 14th April 2019 and is named as ‘Brain MRI images for Brain Tumor Detection.’ The dataset consists of two categories of with brain tumor (BT) and no brain tumor (NT) images which had a total of 157 and100 images, respectively [19]. All of them are of size 467×586×3. This dataset is simply divided into two parts. One part is known as the training part, and other is known as the validation part [20]. Dataset category description is given in Table 1, and the image of dataset samples are shown in Table 3 and Figure 2.Table 3
Brain tumor dataset description.
S.no.Brain tumorNumber of training imagesNumber of validating images1BT125322NT7921Figure 2
Brain tumor dataset: (a) no tumor and (b) brain tumor.
(a)(b)


### 3.2. Proposed Methodology

The proposed BT detection model is depicted in Figure3. This model classifies BT image into four categories, namely, NT and BT.Figure 3
Overview of the proposed model.


#### 3.2.1. Normalization

The dataset underwent normalization preprocessing technique so as to keep its numerical stability to D.L models. Initially, these CT images are in monochromatic or in grayscale format having pixel values in between 0 and 255. By normalizing the input images, D.L models can be trained faster [21].


#### 3.2.2. Augmentation

In order to improve effectiveness of a D.L model, a large amount of dataset is required. However, accessing these datasets often come along with numerous restrictions [22]. Therefore, in order to surpass these issues, data augmentation techniques are implemented to increase the number of sample images in the sample dataset [23]. Various data augmentation methods such as flipping, rotation, brightness, and zooming are implemented. Both horizontal flipping and vertical flipping techniques are shown in Figure 4.Figure 4
Flipping data augmentation: (a) original, (b) horizontal flipping, and (c) vertical flipping.
(a)(b)(c)Rotation augmentation technique as shown in Figure5 is implemented in clockwise direction by an angle of 90 degree each.Figure 5
Clockwise rotation data augmentation: (a) original, (b) 90-degree anticlockwise, (c) 180-degree anticlockwise, and (d) 270-degree anticlockwise.
(a)(b)(c)(d)Brightness data augmentation technique as shown in Figure6 is also applied on in image dataset by taking brightness factor values such as 0.2 and 0.4.Figure 6
Brightness data augmentation: (a) original image, (b) with brightness factor 0.2, and (c) with brightness factor 0.4.
(a)(b)(c)Training images before and after augmentation are shown in Table4. Further, there is a class imbalance in the input dataset. In order to resolve this imbalance issue, the above data augmentation techniques are applied. After applying these data augmentation techniques, the sample dataset in each class was increased to 700 to 1000 images approximately, and then, the entire sample dataset was updated to 1800 images. Table 4 represents the number of newly updated images.Table 4
Sample images before and after data augmentation.
S.no.Brain tumorNumber of images before augmentationNumber of images after augmentation1BT15711002NT100700


## 3.1. Dataset

For the proposed solution, an open access dataset is used which is available on (https://www.kaggle.com/navoneel/brain-mri-images-for-brain-tumor-detection/) uploaded by Navoneel Chakrabarty on 14th April 2019 and is named as ‘Brain MRI images for Brain Tumor Detection.’ The dataset consists of two categories of with brain tumor (BT) and no brain tumor (NT) images which had a total of 157 and100 images, respectively [19]. All of them are of size 467×586×3. This dataset is simply divided into two parts. One part is known as the training part, and other is known as the validation part [20]. Dataset category description is given in Table 1, and the image of dataset samples are shown in Table 3 and Figure 2.Table 3
Brain tumor dataset description.
S.no.Brain tumorNumber of training imagesNumber of validating images1BT125322NT7921Figure 2
Brain tumor dataset: (a) no tumor and (b) brain tumor.
(a)(b)


## 3.2. Proposed Methodology

The proposed BT detection model is depicted in Figure3. This model classifies BT image into four categories, namely, NT and BT.Figure 3
Overview of the proposed model.


### 3.2.1. Normalization

The dataset underwent normalization preprocessing technique so as to keep its numerical stability to D.L models. Initially, these CT images are in monochromatic or in grayscale format having pixel values in between 0 and 255. By normalizing the input images, D.L models can be trained faster [21].


### 3.2.2. Augmentation

In order to improve effectiveness of a D.L model, a large amount of dataset is required. However, accessing these datasets often come along with numerous restrictions [22]. Therefore, in order to surpass these issues, data augmentation techniques are implemented to increase the number of sample images in the sample dataset [23]. Various data augmentation methods such as flipping, rotation, brightness, and zooming are implemented. Both horizontal flipping and vertical flipping techniques are shown in Figure 4.Figure 4
Flipping data augmentation: (a) original, (b) horizontal flipping, and (c) vertical flipping.
(a)(b)(c)Rotation augmentation technique as shown in Figure5 is implemented in clockwise direction by an angle of 90 degree each.Figure 5
Clockwise rotation data augmentation: (a) original, (b) 90-degree anticlockwise, (c) 180-degree anticlockwise, and (d) 270-degree anticlockwise.
(a)(b)(c)(d)Brightness data augmentation technique as shown in Figure6 is also applied on in image dataset by taking brightness factor values such as 0.2 and 0.4.Figure 6
Brightness data augmentation: (a) original image, (b) with brightness factor 0.2, and (c) with brightness factor 0.4.
(a)(b)(c)Training images before and after augmentation are shown in Table4. Further, there is a class imbalance in the input dataset. In order to resolve this imbalance issue, the above data augmentation techniques are applied. After applying these data augmentation techniques, the sample dataset in each class was increased to 700 to 1000 images approximately, and then, the entire sample dataset was updated to 1800 images. Table 4 represents the number of newly updated images.Table 4
Sample images before and after data augmentation.
S.no.Brain tumorNumber of images before augmentationNumber of images after augmentation1BT15711002NT100700


## 3.2.1. Normalization

The dataset underwent normalization preprocessing technique so as to keep its numerical stability to D.L models. Initially, these CT images are in monochromatic or in grayscale format having pixel values in between 0 and 255. By normalizing the input images, D.L models can be trained faster [21].


## 3.2.2. Augmentation

In order to improve effectiveness of a D.L model, a large amount of dataset is required. However, accessing these datasets often come along with numerous restrictions [22]. Therefore, in order to surpass these issues, data augmentation techniques are implemented to increase the number of sample images in the sample dataset [23]. Various data augmentation methods such as flipping, rotation, brightness, and zooming are implemented. Both horizontal flipping and vertical flipping techniques are shown in Figure 4.Figure 4
Flipping data augmentation: (a) original, (b) horizontal flipping, and (c) vertical flipping.
(a)(b)(c)Rotation augmentation technique as shown in Figure5 is implemented in clockwise direction by an angle of 90 degree each.Figure 5
Clockwise rotation data augmentation: (a) original, (b) 90-degree anticlockwise, (c) 180-degree anticlockwise, and (d) 270-degree anticlockwise.
(a)(b)(c)(d)Brightness data augmentation technique as shown in Figure6 is also applied on in image dataset by taking brightness factor values such as 0.2 and 0.4.Figure 6
Brightness data augmentation: (a) original image, (b) with brightness factor 0.2, and (c) with brightness factor 0.4.
(a)(b)(c)Training images before and after augmentation are shown in Table4. Further, there is a class imbalance in the input dataset. In order to resolve this imbalance issue, the above data augmentation techniques are applied. After applying these data augmentation techniques, the sample dataset in each class was increased to 700 to 1000 images approximately, and then, the entire sample dataset was updated to 1800 images. Table 4 represents the number of newly updated images.Table 4
Sample images before and after data augmentation.
S.no.Brain tumorNumber of images before augmentationNumber of images after augmentation1BT15711002NT100700


## 4. Experiments and Results

An experimental evaluation for detection of BT from CT images using four pretrained CNN models such as DenseNet121, DenseNet201, VGG16, and VGG19 is implemented. The CNN models were implemented using CT images collected from the brain tumor Dataset. For training and validating, 432 training images and 104 testing images were used, respectively. The brain MRI images were initially resized from467×586 to 224×224. An algorithm was implemented using FastAI library. For transfer learning, the models are trained for the batch size 16. Each model was trained for 20 epochs. Both the batch size and number of epochs are determined empirically. Adam optimizer was used to perform training. The learning rate was also empirically decided. The performance of each model was evaluated based on performance metrics such as accuracy, precision, sensitivity, and specificity.


### 4.1. Performance Metrics

The performance metrics are calculated by various parameters of the confusion matrix such as true positive (TP), false positive (FP), true negative (TN), and false negative (FN) [24]. These confusion matrix parameters are shown below:
(a)
Accuracy. Accuracy is defined as the ratio of total number of true predictions to the total number of observed predictions(b)
Precision. Precision is calculated as the number of correct positive predictions divided by the total number of positive predictions(c)
Specificity. Specificity is defined as the number of correct negative predictions divided by the total number of negatives(d)
Sensitivity. Sensitivity is defined as the number of correct positive predictions divided by the total number of positives


### 4.2. The Training Performance Comparison for Different Models

Various performance parameters in terms of training loss, validation loss, and error rate, and validation accuracy are obtained by four different models using different epochs and batch size [25]. The four models such as DenseNet121, DenseNet201, VGG16, and VGG19 were evaluated using 20 epochs with 16 batch size, respectively. For training of all D.L models, Adam optimizer is utilized. From Table 5, it can be seen that the VGG19 model acquired the highest performance in the testing phase with precision of 100%, sensitivity of 94.73%, specificity of 100%, and yielded accuracy of 98% for batch size 16. Table 6 depicts that during training phase also, and VGG19 outperforms the other models because validation loss is minimum, whereas validation accuracy is highest in case of VGG19. It has 19 layers, and 8 million features are comparatively lower than DenseNet121 and DenseNet201 but even then it is outperforming. DenseNet121 and DenseNet201 are almost having the same performance but DenseNet201 has comparatively more layers than DenseNet121 that will cause more processing time. After 20 epochs, the performance parameters of all the models remain similar.Table 5
Confusion matrix parameters of all models with 16 batch size.
ModelPrecision (%)Sensitivity (%)Specificity (%)Accuracy (%)VGG1688.2393.7594.1294VGG1910094.7310098DenseNet12185.7110094.7396DenseNet20193.3393.3397.1496Table 6
Training performance of all models with 16 batch size.
ClassEpochTrain lossValid lossError rateValid accuracy (%)VGG1650.0830.3710.0892.13100.0750.3020.0892.34150.0620.2230.0793.27200.0670.2050.0694.83250.0520.1920.0694.22VGG1950.1030.1260.0694.71100.0890.1050.0595.76150.0720.0930.0495.41200.0350.0830.0396.67250.0260.0810.0396.7150.0420.4810.0792.13DenseNet121100.0350.4430.0693.57150.0290.3530.0594.3200.0230.350.0594.9250.0210.330.0594.9250.0730.1930.0495.98DenseNet201100.0620.0810.0496.17150.0590.0710.0496.4200.0450.0590.0297.98250.0430.0520.0298.2


### 4.3. Confusion Matrices of Different Pretrained Models

The confusion matrices of all D.L models of batch size 16 are shown in Figure7. These matrices represent both correct and incorrect predictions. Each and every column is labelled by its class name such as BT and NT. Diagonal values yield accurate number of images classified by the particular model.Figure 7
Confusion matrix of all models with 16 batch size: (a) VGG-16, (b) VGG-19, (c) DenseNet121, and (d) DenseNet201.
(a)(b)(c)(d)From these confusion matrix, accuracy of all the models is evaluated for batch size 16. The accuracy for all the models is analyzed through the graphs as shown in Figure8. From Figure 8, it is clear that the best performers are VGG19 and DenseNet201 with accuracy achieved 98% and 96%, respectively, for batch size 16. From the results, it is analyzed that VGG19 performs better among all the models.Figure 8
Graphical representation of confusion matrix parameters for (a) VGG16, (b) VGG19, (c) DenseNet121, and (d) DenseNet201.
(a)(b)(c)(d)From the previous discussion, it is analyzed that VGG19 performs better for batch size 16 as compared to other models. Now, the learning rate curve is drawn for VGG19 and DenseNet201 for batch size 16 in Figure9. Learning rate curve controls the model learning rate that decides how slowly or speedily a model learns. As the learning rate increases, a point is generated where the loss stops diminishing and starts to magnify. Ideally, the learning rate should be to the left of lowest point on the graph. For example, in Figure 9(a), learning rate is shown for VGG19 in which the point with the lowest loss lies at point 0.001, so the learning rate for VGG19 should be between 0.0001 and 0.001. Similarly, in Figure 9(b) where the learning rate is shown for DenseNet201, lowest loss point lies at 0.00001. Hence, learning rate for Densenet201 should lie between 0.000001 and 0.00001, which is lowest; it is clear that as the learning rate increases loss also increases.Figure 9
Learning rate vs. loss curve for proposed model with 16 batch size: (a) VGG19 and (b) DenseNet201.
(a)(b)Loss convergence plot for VGG19 and DenseNet201 CNN models for batch size 16 are shown in Figure10. Figure 10 depicts the variations in loss during the course of training the models. As the models learned from the data, the loss started to drop until it could no longer improve during the course of training. Also, validation losses are calculated for each epoch. The validation shows relatively consistent and low loss values with increasing epochs. From Figure 10, it is clear that minimum loss is achieved for VGG19 and DenseNet201 at each epoch for batch size 16. From Figure 10, it is analyzed that at the time where 120 batches are processed, loss obtained for VGG19 is comparatively less than Densenet201. For VGG19, validation and training loss lies between 0 and 0.2, whereas for DenseNet201, it lies between 0.2 and 0.4. Hence, it is clear that VGG19 performs better than DenseNet201 in terms of training and validation loss at batch size 16.Figure 10
Batches processed vs. loss curve for different CNN architectures with 16 batch size: (a) VGG19 and (b) DenseNet201.
(a)(b)


### 4.4. Performance Evaluation with Existing Techniques

Results obtained from the proposed model are shown in comparison with state-of-art models using CT images as shown in Table7. It can be observed that the proposed method achieved higher performance than other existing techniques because of preprocessing techniques applied on the dataset. Compared to most studies, Deepak et al. [2], Rehman et al. [4], Rajasree et al. [5],Bodapati et al. [7], Mzoughi et al. [8], and Sajjad et al. [9] had utilized a small number of dataset to validate their models. However, Gu et al. [1], Kumar et al. [3], Abu El Kader et al. [6], and Abiwinanda et al. [10] utilized comparatively larger datasets to validate their models. Also, it can be noticed that mostly binary classification was performed in all the studies. In the proposed model, VGG19 and DenseNet201 have been proposed with data augmentation and data normalization techniques to enhance their accuracy. The designed model performs better with ADAM optimizer and batch size 16. The proposed model comparison with existing state of state-of-art models is illustrated in Table 7. From Table 7, it can be analyzed that the proposed model performs better as compared to state-of-art models in terms of accuracy as well as size of image dataset.Table 7
Comparison with existing state-of-art models.
StudyDataset sourceNo. of imagesTechnique usedAccuracyGu et al. [1]REMBRANDT3064CDLLC on CNN96.39%Deepak et al. [2]Figshare1426SVM with CNN95.82%Kumar et al. [3]Figshare3064RNGAP model on CNN97.08%Rehman et al. [4]BraTS 201810743DCNN92.67%Rajasree et al. [5]BraTS 2015374MSMCNN96.36%Abd El Kader et al. [6]Figshare3064HSANN97.33%Bodapati et al. [7]BraTS 20181074ELM97.8%Mzoughi et al. [8]BraTS 201810743DCNN96.49%Sajjad et al. [9]Radiopaedia121Deep-CNN94.58%Abiwinanda. et al. [10]Figshare3064CNN84.19%Proposed methodologyKaggle1800VGG1998%


## 4.1. Performance Metrics

The performance metrics are calculated by various parameters of the confusion matrix such as true positive (TP), false positive (FP), true negative (TN), and false negative (FN) [24]. These confusion matrix parameters are shown below:
(a)
Accuracy. Accuracy is defined as the ratio of total number of true predictions to the total number of observed predictions(b)
Precision. Precision is calculated as the number of correct positive predictions divided by the total number of positive predictions(c)
Specificity. Specificity is defined as the number of correct negative predictions divided by the total number of negatives(d)
Sensitivity. Sensitivity is defined as the number of correct positive predictions divided by the total number of positives


## 4.2. The Training Performance Comparison for Different Models

Various performance parameters in terms of training loss, validation loss, and error rate, and validation accuracy are obtained by four different models using different epochs and batch size [25]. The four models such as DenseNet121, DenseNet201, VGG16, and VGG19 were evaluated using 20 epochs with 16 batch size, respectively. For training of all D.L models, Adam optimizer is utilized. From Table 5, it can be seen that the VGG19 model acquired the highest performance in the testing phase with precision of 100%, sensitivity of 94.73%, specificity of 100%, and yielded accuracy of 98% for batch size 16. Table 6 depicts that during training phase also, and VGG19 outperforms the other models because validation loss is minimum, whereas validation accuracy is highest in case of VGG19. It has 19 layers, and 8 million features are comparatively lower than DenseNet121 and DenseNet201 but even then it is outperforming. DenseNet121 and DenseNet201 are almost having the same performance but DenseNet201 has comparatively more layers than DenseNet121 that will cause more processing time. After 20 epochs, the performance parameters of all the models remain similar.Table 5
Confusion matrix parameters of all models with 16 batch size.
ModelPrecision (%)Sensitivity (%)Specificity (%)Accuracy (%)VGG1688.2393.7594.1294VGG1910094.7310098DenseNet12185.7110094.7396DenseNet20193.3393.3397.1496Table 6
Training performance of all models with 16 batch size.
ClassEpochTrain lossValid lossError rateValid accuracy (%)VGG1650.0830.3710.0892.13100.0750.3020.0892.34150.0620.2230.0793.27200.0670.2050.0694.83250.0520.1920.0694.22VGG1950.1030.1260.0694.71100.0890.1050.0595.76150.0720.0930.0495.41200.0350.0830.0396.67250.0260.0810.0396.7150.0420.4810.0792.13DenseNet121100.0350.4430.0693.57150.0290.3530.0594.3200.0230.350.0594.9250.0210.330.0594.9250.0730.1930.0495.98DenseNet201100.0620.0810.0496.17150.0590.0710.0496.4200.0450.0590.0297.98250.0430.0520.0298.2


## 4.3. Confusion Matrices of Different Pretrained Models

The confusion matrices of all D.L models of batch size 16 are shown in Figure7. These matrices represent both correct and incorrect predictions. Each and every column is labelled by its class name such as BT and NT. Diagonal values yield accurate number of images classified by the particular model.Figure 7
Confusion matrix of all models with 16 batch size: (a) VGG-16, (b) VGG-19, (c) DenseNet121, and (d) DenseNet201.
(a)(b)(c)(d)From these confusion matrix, accuracy of all the models is evaluated for batch size 16. The accuracy for all the models is analyzed through the graphs as shown in Figure8. From Figure 8, it is clear that the best performers are VGG19 and DenseNet201 with accuracy achieved 98% and 96%, respectively, for batch size 16. From the results, it is analyzed that VGG19 performs better among all the models.Figure 8
Graphical representation of confusion matrix parameters for (a) VGG16, (b) VGG19, (c) DenseNet121, and (d) DenseNet201.
(a)(b)(c)(d)From the previous discussion, it is analyzed that VGG19 performs better for batch size 16 as compared to other models. Now, the learning rate curve is drawn for VGG19 and DenseNet201 for batch size 16 in Figure9. Learning rate curve controls the model learning rate that decides how slowly or speedily a model learns. As the learning rate increases, a point is generated where the loss stops diminishing and starts to magnify. Ideally, the learning rate should be to the left of lowest point on the graph. For example, in Figure 9(a), learning rate is shown for VGG19 in which the point with the lowest loss lies at point 0.001, so the learning rate for VGG19 should be between 0.0001 and 0.001. Similarly, in Figure 9(b) where the learning rate is shown for DenseNet201, lowest loss point lies at 0.00001. Hence, learning rate for Densenet201 should lie between 0.000001 and 0.00001, which is lowest; it is clear that as the learning rate increases loss also increases.Figure 9
Learning rate vs. loss curve for proposed model with 16 batch size: (a) VGG19 and (b) DenseNet201.
(a)(b)Loss convergence plot for VGG19 and DenseNet201 CNN models for batch size 16 are shown in Figure10. Figure 10 depicts the variations in loss during the course of training the models. As the models learned from the data, the loss started to drop until it could no longer improve during the course of training. Also, validation losses are calculated for each epoch. The validation shows relatively consistent and low loss values with increasing epochs. From Figure 10, it is clear that minimum loss is achieved for VGG19 and DenseNet201 at each epoch for batch size 16. From Figure 10, it is analyzed that at the time where 120 batches are processed, loss obtained for VGG19 is comparatively less than Densenet201. For VGG19, validation and training loss lies between 0 and 0.2, whereas for DenseNet201, it lies between 0.2 and 0.4. Hence, it is clear that VGG19 performs better than DenseNet201 in terms of training and validation loss at batch size 16.Figure 10
Batches processed vs. loss curve for different CNN architectures with 16 batch size: (a) VGG19 and (b) DenseNet201.
(a)(b)


## 4.4. Performance Evaluation with Existing Techniques

Results obtained from the proposed model are shown in comparison with state-of-art models using CT images as shown in Table7. It can be observed that the proposed method achieved higher performance than other existing techniques because of preprocessing techniques applied on the dataset. Compared to most studies, Deepak et al. [2], Rehman et al. [4], Rajasree et al. [5],Bodapati et al. [7], Mzoughi et al. [8], and Sajjad et al. [9] had utilized a small number of dataset to validate their models. However, Gu et al. [1], Kumar et al. [3], Abu El Kader et al. [6], and Abiwinanda et al. [10] utilized comparatively larger datasets to validate their models. Also, it can be noticed that mostly binary classification was performed in all the studies. In the proposed model, VGG19 and DenseNet201 have been proposed with data augmentation and data normalization techniques to enhance their accuracy. The designed model performs better with ADAM optimizer and batch size 16. The proposed model comparison with existing state of state-of-art models is illustrated in Table 7. From Table 7, it can be analyzed that the proposed model performs better as compared to state-of-art models in terms of accuracy as well as size of image dataset.Table 7
Comparison with existing state-of-art models.
StudyDataset sourceNo. of imagesTechnique usedAccuracyGu et al. [1]REMBRANDT3064CDLLC on CNN96.39%Deepak et al. [2]Figshare1426SVM with CNN95.82%Kumar et al. [3]Figshare3064RNGAP model on CNN97.08%Rehman et al. [4]BraTS 201810743DCNN92.67%Rajasree et al. [5]BraTS 2015374MSMCNN96.36%Abd El Kader et al. [6]Figshare3064HSANN97.33%Bodapati et al. [7]BraTS 20181074ELM97.8%Mzoughi et al. [8]BraTS 201810743DCNN96.49%Sajjad et al. [9]Radiopaedia121Deep-CNN94.58%Abiwinanda. et al. [10]Figshare3064CNN84.19%Proposed methodologyKaggle1800VGG1998%


## 5. Conclusion

In this paper, the effectiveness of four most effective D.L models such as VGG16, VGG19, DenseNet121, and DenseNet201 for detection of BT have been thoroughly evaluated. VGG19 and DenseNet201 yield best results as compared with different models using batch size 16. The dataset for BT was acquired from Kaggle via author Navoneel Chakrabarty. The results are obtained after training and analysis of these models. Further, by properly working on batch sizes, optimizers, and epochs, these results demonstrated the effectiveness of the VGG19 model. Accuracy and sensitivity of 98% and 94.73%, respectively, were achieved with the VGG19 for batch size 16 with Adam optimizer. Similarly, accuracy and sensitivity of 96% and 93.33%, respectively, were achieved with the DenseNet201 for batch size 16 with Adam optimizer. These comparative results would be cost effective and would help radiologist take a second opinion tool or simulator. The major purpose of this research is to predict BT as early as possible. This comparative analysis model could become a second opinion tool for radiologists. This study helps for more accurate diagnosis for development of D.L models.Drawback of this proposed study is that only axial dataset of BT samples is used for training and validation purpose. In future, the proposed model can further be generalized by taking coronal and sagittal datasets during training and validation. Also, different pretrained models and optimization techniques could also be implemented to further enhance the effectiveness of the proposed model.



---

*Source: 3065656-2022-04-08.xml*