American Journal of Bioinformatics Research

p-ISSN: 2167-6992    e-ISSN: 2167-6976

2021;  11(1): 32-37


Received: Apr. 21, 2021; Accepted: May 14, 2021; Published: May 26, 2021


IoT Framework for Brain Tumor Classification Using Optimized CNN-MRFO Model

Omar Adil Kamil, Shaymaa W. Al-Shammari

Department of Computer Engineering, Al-Nahrain University, Baghdad, Iraq

Correspondence to: Omar Adil Kamil, Department of Computer Engineering, Al-Nahrain University, Baghdad, Iraq.


Copyright © 2021 The Author(s). Published by Scientific & Academic Publishing.

This work is licensed under the Creative Commons Attribution International License (CC BY).


Recently, researchers have shown an increased interest in achieving accurate brain tumor classification using the Internet of Things (IoT). The brain is one of the most complex organs in the human body, with billions of cells. A brain tumor is caused by uncontrolled, abnormal cell growth that disrupts normal brain function and destroys healthy cells. The study aims to achieve a simple application for classifying brain tumors and improve the accuracy of the classification methods. The suggested classification system adopts the idea of optimizing the convolutional neural network (CNN) model using the optimization approach and extracting features from brain MRI images. The accuracy of this proposed method on the test set is 98.57%, and it was proven to be better in terms of accuracy. The second part of the proposed system is the IoT, which makes the system applicable for everyone anywhere everywhere to get accurate classification for brain tumors.

Keywords: Brain tumor, Convolutional neural network, Internet of Things

Cite this paper: Omar Adil Kamil, Shaymaa W. Al-Shammari, IoT Framework for Brain Tumor Classification Using Optimized CNN-MRFO Model, American Journal of Bioinformatics Research, Vol. 11 No. 1, 2021, pp. 32-37. doi: 10.5923/j.bioinformatics.20211101.02.

1. Introduction

Many people nowadays use the internet to find the medical care they need. As a result, the Internet of Things (IoT) is now commonly used in a variety of applications, and its significance in our daily lives is growing. IoT technology is also evolving in the healthcare system to provide patients with efficient services [1]. classifying a brain tumor requires an accurate and prompt diagnosis of the tumor type because the selection of successful treatment method depending mostly on the pathological type, however the conventional method for the identification and classification of MRI brain tumors is through human observation, which relies heavily on the expertise of radiologists who study and interpret image characteristics. Computer-aided diagnostic methods are highly desirable for these issues [2]. An IoT system based on an optimized CNN model with an MRFO algorithm is proposed to enable the radiologist and the patient to obtain a precise brain tumor classification.
As presented in a previous work, the CNN model can be optimized using MRFO [3]. In this method, the hyper-parameters' optimal value will be found by the MRFO algorithm. Another method was presented by Afshar, P., K.N. Plataniotis, and A. Mohammadi [4] using CapsNet architecture, the proposed architecture makes CapsNet focus on the main area of the tumor and the surrounding tissues at the same time. Some researchers [5] introduced a new hybrid method using Neutrosophy with Convolutional Neural Network (NS-CNN) to classify the segmented tumor region. While others [6] have introduced a new algorithm for classifying brain tumor. In this method, A Kernel Extreme Learning Machines [KEML] used as classifiers with CNN model [KE-CNN].
Some new methods were presented by employing Genetic algorithm [7] with artificial neural network (ANN) and with a support vector machine (SVM) (GA-SVM and GA-ANN) for the classification of brain tumors. Other workers introduced a new CNN model [8] where the architecture is designed through experiments on MRI images and fine-tuned for brain tumors classification. Another interesting hybrid method [9] used CNN to extract the features with K-Nearest Neighbor (KNN) as a classifier; this method achieved accuracy equal to 96.25%. A faster Region-based Convolutional Neural Network [10] was used to yield an accuracy of 91.66% by classifying three types of tumors. Ganesan, M., et al. [11] introduced another method for classifying benign and malignant brain tumor with IoT using an Optimal Dense Convolutional Network (ODEN) and produce 99.37% accuracy. Sajjad, M., [12] presented a work to classify the brain tumor grade using fine-tune VGG–19 with SoftMax as a classifier. The accuracy achieving is 90.67%. Zacharaki [13] proposed a new method to classify brain tumors using SVM and ANN with 80% accuracy.
The proposed work in this paper aims to present a method that can categorize brain tumors accurately into different pathological categories (meningioma, optical nerves glioma and pituitary), which, compared to binary classification (normal and abnormal), is generally a relatively difficult and challenging issue. The proposed method incorporates CNN as a classifier and the Manta ray foraging optimization (MRFO) hyper-parameter selection algorithm with high precision and less loss to a particular CNN architecture. Experimental results indicate a 98.57% accuracy rate for the final CNN model archives.

2. Research Method

Project creation is carried out using a computer with the following specifications: GPU NVIDIA GeForce MX 150 4G, CPU intel core i7-8550U 1.80 GHz, HDD 2T, Ram 16 GB, System type 64-bit, Operating system windows 10.

2.1. Dataset

For our experiments, the dataset used has been collected from the internet and Iraqi hospitals. The dataset contains 889 images includes three classes of tumors: optical nerves glioma (81 images), Pituitary (406 images), and Meningioma (402 images) tumors 78% for training and 22% for testing. The images were taken from different angles. Examples of various types of tumors are shown in Figure 1, as well as the different angles.
Figure 1. Shows different angels of the MRI images
• Pre-processing
Some pre-processing steps must be taken before the neural network model of convolution is trained. First, most datasets contain images of varying size, so that the image loaded and resized to 224 x 224 pixels to ensure that all images in the dataset have the same size, the image input must be square. Most of the images must be cropped, skull stripping, and brain location adjustment.
• Data augmentation
The best way to generalize and decrease the likelihood of overfitting is to train a machine learning model on larger datasets [14]. It is easy and straightforward to create fake data and add it to the dataset, and this is done in the step of data augmentation. In the method proposed, some manipulated images were added to increase the training collection by adding random changes to the original data. Ten clockwise or counterclockwise rotation, scaling, horizontal flip and a mixture of these adjustments were made, and the resulting images were added to the initial datasets [14].

2.2. Hybrid Method

In this work, the convolution neural network model optimized [3] by MRFO algorithm to accurately classify brain tumors. This optimization is achieved by selecting the specific hyper-parameters and improve the accuracy. The algorithm starts by initializing the hyperparameters chosen and then updating the position depending on the MRFO strategies to get the best position (optimum hyper-parameters), as shown in Figure 2. The MRFO-CNN method is developed using Python programming language, an open-source development environment Spyder and Keras libraries.
Figure 2. Show the flow chart of the Hybrid method

2.3. IoT Service

An IoT framework was proposed with cloud management for the brain tumor classification process. Since the cloud is a distributed environment, it is the best solution for a medical system that allows doctors to access data more easily [15]. The proposed IoT-based healthcare system includes a service where a radiologist will diagnose a tumor type simply by uploading an MRI and receiving classification results in few seconds. The report is sent to the patient's doctor to determine the best treatment options. Figure 4 show the structure of an IoT healthcare system for the proposed hybrid method. In this work Heroku platform was used to implement the proposed IoT framework. Furthermore, the application can be used locally without requiring an internet connection, and the response time is as follows:
• Around 4s locally
• Around 7s in the platform approximately (which is affected by the speed of the internet connection)
An algorithm is used to check the integrity of the cloud implementation for the proposed application as shown in algorithm 1.
Figure 3. Pseudo code to check the integrity of the system
Figure 4. Shows the system structure
The implemented cloud-based application was tested to check the integrity of the system. This was achieved by checking the representational state transfer (REST) response for the GET request.
Figure 5 illustrates the system's response time when more than 100 users access it at the same time remotely. These results were achieved using apache JMeter application. Figure 6 show the web page of the application to upload the brain tumor image and then display the result of the classification.
Figure 5. Shows response time with the number of users
Figure 6. Show the front-end of the application (a) Ask to upload the image (b) Classification result

3. Results and Discussion

This section presents the results obtained from optimizing different CNN models using MNIST and Cifer10 as benchmark datasets, which allowed the authors to compare the obtained results and specify the best-optimized model for the brain image classification, as shown in the following subsections.

3.1. Experiment 1 MRFO for ResNet Model

In this experiment, the ResNet model was optimized by the MRFO algorithm. The optimal hyper-parameters were chosen by the optimization algorithm are shown in table (1):
Table 1. Shows the change in hyper-parameters values for ResNet model
The results of the model are obtained after training for 15 epochs, as shown in figure 7. The figures show a comparison after optimization (ResMRFO) and before using the MRFO optimization method algorithm. It can be noticed that there was an apparent enhancement in terms of accuracy and loss.
Figure 7. Shows (a) the loss (b) the accuracy values before and after using the MRFO optimization method for ResNet model with cifar10 dataset
The model is re-trained with Mnist dataset, and the results are shown in Figure 8. The figure shows a comparison after optimization (ResMRFO) and before using the MRFO optimization method algorithm.
Figure 8. Shows (a) the loss (b) the accuracy values before and after using the MRFO optimization method for ResNet model with Mnist dataset

3.2. Experiment 2 MRFO for Pre-Trained Models

VGG 16 and VGG 19 pre-trained models are used in this experiment.
3.2.1. VGG 16
Table 2 shows the optimal value for each chosen hyper-parameter in VGG16 model. The table shows the change in the hyper-parameters of VGG16 after considering the optimization algorithm with the upper and lower boundaries for each hyper-parameter.
Table 2. Show the change in hyper-parameters values in VGG16 model
The results of the optimized model are shown in Figure 9.
Figure 9. Shows (a) the accuracy (b) the loss values before and after using the MRFO optimization method for pre-train VGG16 model with cifar10 dataset
3.2.2. VGG 19
Configuration of the VGG 19 model optimized by the MRFO algorithm is shown in table 3.
Table 3. Shows the change in hyper-parameters values in VGG19 model
The results for the accuracy and loss before and after applying the MRFO optimization method to the VGG19 model are shown in figure 10:
Figure 10. Shows (a) the accuracy (b) the loss values before and after using the MRFO optimization method for pre-train VGG19 model with cifar10 dataset

3.3. Experiment 3 ResNet with Brain Tumor Dataset

In this experiment, we use the optimized ResNet model from experiment 1 with the brain tumor dataset. After training the model for 50 epochs, it produces 98.57% classification accuracy with a 0.95% loss, as shown in the confusion matrix.
Table 4. Show Confusion Matrix for the ResNet model
Performance metrics shown in equations 1-4 are calculated using the obtained results. In order to calculate these values, the confusion matrix parameters are considered, which are: TP (True Positive), TN (True Negative), FP (False Positive), and FN (False Negative). The obtained values for these parameters are shown in table 5.
Table 5. Show Performance metrics for ResNet model

3.4. Discussion

Table 6 shows that, when compared to the models outlined in Section II, the proposed method classified tumors with high accuracy in almost all cases. By examining table 6, it is clear that the proposed method has provided superior results, achieving high accuracy of 98.57%. This value showed how the optimized model was efficient at classifying MRI brain images. A trade-off is taken into consideration when evaluating the achieved accuracy values in comparison with the results achieved in previous research. Although the results achieved by Ganesan M. [11] was higher than 98.57%, however, they considered only two types of tumor. In contrast, in this paper, three types of brain tumor were considered to be classified.
Table 6. Show the comparison with other methods

4. Conclusion and Futur Work

In this paper, a new IoT framework was presented for brain tumor classification using an optimized CNN-MRFO model. which it makes the tumor classification instantly and very precise for patient and radiologist. Experiments using multi-class datasets (MNIST and CIFAR-10), revealed that MRFO effectively produces consistent and high-quality results over multiple experiments, clearly outperforming human expertise when optimizing an existing CNN model developed by experts. The adjustment of the hyperparameter values has a direct effect on the achieved classification results. This has been approved by studying different benchmark datasets. As seen in the previous results, the proposed method with brain tumor dataset produces accuracy higher than other methods which its accuracy is 98.57%. So, the MRFO method helped to improve the accuracy value.
Future work will focus on increasing the number of tumors types to be classified and modify the optimization method to select the number of layers in the model, in addition to use object recognition for the tumor to accurately label the region of tumor.


[1]  Mohammadi, M., et al., Deep learning for IoT big data and streaming analytics: A survey. IEEE Communications Surveys & Tutorials, 2018. 20(4): p. 2923-2960.
[2]  Abbas, S. and A.M. Mahmoud, Deep Learning-aided Brain Tumor Detection: An Initial Experience based Cloud Framework. Indonesian Journal of Electrical Engineering and Informatics (IJEEI), 2020. 8(4): p. 770-780.
[3]  Kamil, O.A. and S.W. Al-Shammari. Manta Ray Foraging Optimization for Hyper-Parameter Selection in Convolutional Neural Network. in IOP Conference Series: Materials Science and Engineering. 2020. IOP Publishing.
[4]  Afshar, P., K.N. Plataniotis, and A. Mohammadi. Capsule networks for brain tumor classification based on MRI images and coarse tumor boundaries. in ICASSP 2019-2019 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP). 2019. IEEE.
[5]  Özyurt, F., et al., Brain tumor detection based on Convolutional Neural Network with neutrosophic expert maximum fuzzy sure entropy. Measurement, 2019. 147: p. 106830.
[6]  Pashaei, A., H. Sajedi, and N. Jazayeri. Brain tumor classification via convolutional neural network and extreme learning machines. in 2018 8th International conference on computer and knowledge engineering (ICCKE). 2018. IEEE.
[7]  Sachdeva, J., et al., A package-SFERCB-“Segmentation, feature extraction, reduction and classification analysis by both SVM and ANN for brain tumors”. Applied soft computing, 2016. 47: p. 151-167.
[8]  Balasooriya, N.M. and R.D. Nawarathna. A sophisticated convolutional neural network model for brain tumor classification. in 2017 IEEE International
[9]  Srinivas, B. and G.S. Rao, A Hybrid CNN-KNN model for MRI brain tumor Classification. Int J Recent Technol Eng (IJRTE), 2019. 8(2).
[10]  Salçin, K., Detection and classification of brain tumours from MRI images using faster R-CNN. Tehnički glasnik, 2019. 13(4): p. 337-342.
[12]  Sajjad, M., et al., Multi-grade brain tumor classification using deep CNN with extensive data augmentation. Journal of computational science, 2019. 30: p. 174-182.
[13]  Zacharaki, E.I., et al., Classification of brain tumor type and grade using MRI texture and shape in a machine learning scheme. Magnetic Resonance in Medicine: An Official Journal of the International Society for Magnetic Resonance in Medicine, 2009. 62(6): p. 1609-1618.
[14]  Anaraki, A.K., M. Ayati, and F. Kazemi, Magnetic resonance imaging-based brain tumor grades classification and grading via convolutional neural networks and genetic algorithms. biocybernetics and biomedical engineering, 2019. 39(1): p. 63-74.
[15]  Bashar M. Nema, Y.M.M., Nadia Mahmood Hussien, Nael Ali Hussein, COVID-19 knowledge-based system for diagnosis in Iraq using IoT environment. Indonesian Journal of Electrical Engineering and Computer Science, 2020. 21: p. 328-337.