FOREX Press I. J. of Electrical & Electronics Research
Support Open Access

Research Article |

Classification & Feature extraction of Brain tumor from MRI Images using Modified ANN Approach

Author(s) : Harendra Singh 1 ,Roop Singh Solanki2

Publisher : FOREX Publication

Published : 30 June 2021

e-ISSN : 2347-470X

Page(s) : 10-15

In such a modern day’s there is no expectation to live a good life without healthy body organs. According to World Health Organization (W.H.O) brain tumors are the most widely recognized disease and worldwide more than 4 lakhs of human beings are diagnosed with the brain tumor per year. Radiologists and doctors required a large amount of time to diagnose the tumorous cells in MRI images and exact labeling of tumorous cells is also a more typical and time-consuming task. Cell generation and dead cell replacement is a process that is controlled by the human body, if this process is failed due to some malfunctioning of the human body then a large number of cells are generated. If these extra generated cells in the place of one cell gain some mass, then called a tumor. So tumor is the uncontrolled growth of cells due to malfunctioning of the human body. There are mainly two types of tumor; Benign (Non-Cancerous) and malignant (cancerous) tumors. Benign tumors are noncancerous means they cannot spread to another part of the body. The extra generated cells are covered by a membrane and easily removed by a small surgery. If these cells are diagnosed in an early stage, then chances to suffered by the cancer of human being is reduced. The malignant tumor is cancerous and they are easily traveled to the other part of the body through the bloodstream. In the last decades, lots of techniques are developed to diagnose brain tumor cells but still, there is a chance to improve the accuracy and precision. In this approach, the error is removed by using 2d filtering then main features are extracted using DWT, and further the ANN model is designed to classify the type of tumor according to provided features. This proposed model takes less time to predict the type of tumor with a higher order of accuracy and precision.

The proposed model is a hybrid model for brain tumor classification and segmentation that consists mainly; MRI Image Pre-processing, Discrete Wavelet Transformation (DWT), Principal Component Analysis (PCA), Artificial Neural Network (ANN). The proposed model classifies the New MRI image into 4 stages only are; Noise removal, feature extraction, feature reduction, and classification. The Proposed model has been illustrated in figure 1.

Figure 1: Block diagram representing different stages of the proposed methodology

2.1 MRI Dataset and Image Pre-processing

The MRI dataset is collected from open source,, in grayscale form i.e. intensity range from 0 to 255. A set of eight images are selected randomly for experimental purpose. The sample of input MRI images is shown in figure 2.

Figure 2: Sample data set of Brain MRI Images

The main purpose of pre-processing step in tumor diagnosis from MRI image to enhance the quality of the image in terms of black and white pixels. The noise of the Mri image is reduced using a median filter then the corresponding histogram is constructed to visualize the frequency distribution. A sample of eight image histograms after pre-processing is shown in figure 3.

Fig.3 Histogram of a Pre-processed set of Brain MRI Images

2.2 Feature Extraction Reduction from MRI Image

Discrete Wavelet Transform (DWT), used to convert time domain data into a discrete wavelet domain. It provides time and frequency analysis of an MRI image [23] and is used for feature extraction, with the help of DWT MRI images are easily analyzed at different levels of resolution. Further PCA technique is used for feature reduction, to reduce the complexity of the model as well as unused features of input MRI images. [1, 2].

The continuous wavelet transform (t) is defined as:



m = dilation factor

n= translation parameter

DWT can be given as:

DWT (n) =

d j,k =detail component of signal x(n)

a j,k= approximation component of signal x(n)

h(n)= coefficients of the high-pass filter

g(n)= coefficients of the low-pass filter

j, k = wavelet scale & translation factor [1, 13].

The 2D DWT having four sub-bands “LL, LH, HL, HH”. The first image is passed through h(n) and g(n) filters which results in a further four sub-bands. Where; LL= approximation component of the image and LH, HL, HH= detailed component of the image. It has also been illustrated in Figure. 4.

Fig.4. Schematic diagram of 2D DWT with four sub-bands

Table 1 shows the sample of extracted features using 2D DWT for input MRI image numbers 3 & 4.

Table 1. Extracted features from MRI Image


Value(Fig 3)

Value (Fig 4)




Standard Deviation

































An artificial Neural Network is a layered network consist mainly of three layers; the Input layer, Hidden Layer and Output Layer. Every layered has some pre-processing unit, called a node. The number of a node in the input layer is equal to the number of features and the number of nodes in the output layer is equal to the number of labels or classes. This model is used to classify the input data in one of the pre-defined labeled classes after training the model with hues amount of the same type of classes labeled data. The neural network mainly deals with human brain learning and it consists of a neuron that is responsible to create the layers in the ANN model. These neurons are also called tuned parameters. The structure of a single neuron is shown below in figure 5.

Fig. 5 Artificial Neuron with three input parameters & Bias

Fig. 6 Number of images of Benign & Malignant Tumor used for model training

In this proposed model total of 12 features are extracted from the input MRI image using 2D-DWT with one label (Benign= ‘0’ or Malignant= ‘1’). Before training the ANN model the whole dataset is divided into two parts; training & testing. So, in this model, a ratio of 90:10 is used to achieve better

The Proposed ANN model for the Brain Tumor classification algorithm is implemented using the software Python 3.7.9 and the configuration of the used system for implementation is; Intel Core i5 7th Gen CPU with 2.5 GHz Processor, 4 GB graphics, and 8 GB RAM. Figure 7, shows the training and losses of the proposed ANN model for brain tumor classification. The proposed model gives a training accuracy of model 98.7 % with a hyper parameter; Batch size=150, Epoch = 200, Step size per epoch=25

Fig. 7 Training accuracy and loss of proposed ANN Model

4.1 Confusion Matrix

The performance measures of the proposed ANN model are measured with the help of confusion matrix parameters. Figure 8 (a) & (b) shows a confusion matrix in which, the x-axis of shows the predicted labels (model output) and the y-axis represents the true labels and corresponding heat map for predicted values.

Fig. 8 (a) & (b) shows a confusion matrix and heat map for predicted values.

Some ANN model performance parameters are calculated is calculated by using given equations (4), (5), (6), (7) as under: (5) (6) (7) (8) (9) The accuracy of different performance parameters like ‘Precision’, ‘Sensitivity’, ‘Specificity’, and ‘Accuracy’ of the proposed ANN model are shown below in Table 2.

Type of Tumor

True Positive

True Negative

False Positive

False Negative


























Table 2: Accuracy metrics of performance parameters

These performance parameters are extracted from the ‘Confusion Matrix’. The highest performance of ‘precision’, ‘sensitivity’, ‘specificity’, and ‘accuracy’ for the benign and malignant tumor are shown in the table. The overall accuracy of the proposed ANN model for tumor classification is 98.70 %.

4.2 Receiver Operating Characteristic (ROC) and Area Under the ROC Curve (AUC)

ROC is used to plot the performance of the classification of the proposed model by plotting True Positive Rate (TPR) and False Positive Rate (FPR). The probability model performance measure is represented by the Area covered under the receiver operating characteristic curve. Figure 9 shows a ROC curve of the proposed ANN model with AUC 0.9863 which means the proposed model can predict correctly up to 98.63 %.

Fig. 9 Receiver Operating Characteristic Curve

In this paper, a simple hybrid ANN model is proposed based on 2D-DWT and ANN to classify benign and malignant tumors using MRI images. First, the 12 most important features are extracted from MRI images after pre-processing and segmentation then these features are used to train the proposed ANN model. Before the training, the proposed model, collected features for all 3762 is divided into two parts training and testing in the ratio 90:10 means model is trained with 90 percent of the whole dataset after applying seven data augmentation operators to avoid the shortage of datasets during training face. The model is tested with the remaining 10 percent of the whole dataset that gives better accuracy of 98.70 %. In the future, brain tumor localization and segmentation algorithms may be developed for detecting brain tumors in 3-D MRI images.

Harendra Singh , Research Scholar, Department of Electronics & Communication, MVN University, Palwal, Haryana, India

Roop Singh , Research Scholar, Department of Electronics & Communication, Uttarakhand Technical University, Dehradun, India ; Email:

[1] Shelke, S.M., Mohod, S.W., “Automatic Segmentation and Detection of Brain Tumor from MRI”, In: Int’l CONFERENCE 2018, ICACCI, pp. 2120-2126, IEEE, Bangalore (2018).

[2] Dhanwani, D. C., Bartere, M.B., “Survey on Various Techniques of Brain Tumor Detection from MRI Images”, Int’l Journal of Computational Engineering Research 4(1), 24-26(2014).

[3] Joseph, R.P., Singh, C.S., Manikandan, M., “Brain tumor MRI image segmentation and detection in image processing”, Int’l Journal of Research in Engineering and Technology (3), 1-5(2014).

[4] Kaushal, S.: An efficient brain tumor detection system based on segmentation technique for MRI brain images. Int’l Journal of advanced research in computer science 8(7), 1131-1136(2017).

[5] Tjahyaningtijas, A.P. H., “Brain Tumor Image Segmentation in MRI Image”, In: 2 nd Int’l CONFERENCE 2017, ICVEE, vol. 336, pp. 336-339, IOP Conference Series, Indonesia (2017).

[6] Said, M.A., Ibrahim, S.F.: Comparative Study of Segmentation Technology for Detection of Tumor Based on MRI Images. Int’l Journal of bioscience, biochemistry, and bioinformatics 8(1), 1-10 (2018).

[7] Kavita, A.R., Chellamuthu, C., Rupa, Kr.: An Efficient Approach for Brain Tumor Detection Based on Modified Region Growing and Network in MRI Images. In: Int’l CONFERENCE 2012, ICCEET, vol. 9(2), pp.1087-1095, IEEE Trans. on Information Forensics and Security, Tamil nadu (2012).

[8] Hassanpour, H., Samadiani, N., Salehi, S.M.M.: Using morphological transformation to enhance the contrast of medical images. Journal of Egyptian Society of Radiology and Nuclear Medicine (46), 481-489(2015).

[9] Ratan, R., Kholi, P. G., Sharma, S. K., Kholi, A.K. :Un-supervised segmentation and quantization of malignancy from breast MRI images. Journal of the National Science Foundation of Sri Lanka 44(4), 437-442(2016).

[10] Zawish, M., Siyal, A.A., Shahani, S.H., Junejo, A. A., Khalil, A.: Brain Tumor Segmentation through Regionbased Supervised and Unsupervised Learning Methods. Journal of biomedical engineering and medical imaging 6 (2), 8-13(2019).

[11] Tra, P. N. H., Hai, N. T., Mai, T.T.: Image Segmentation for Detection of Benign and Malignant Tumors. In: Int’l CONFERENCE 2016, BME-HUST, vol.3, pp. 51-54, Proc. IEEE, Vietnam(2016).

[12] Selvankumar, J., Lakshmi, A., Arivoli, T.: Brain Tumor Segmentation and Its Area Calculation in Brain MR Images using K- Means Clustering and Fuzzy C- Means Clustering. In: Int’l CONFERENCE 2012, ICAESM, vol.1, pp. 186-190, Tamilnadu (2012).

[13] Xian, G.M.: An identification method of malignant and benign liver tumors from Ultrasonography based on GLCM texture features and fuzzy SVM. Journal of Elsevier Expert Systems with Applications 37(10), 6737– 6741(2007).

[14] Vijay, J.F., Subhashini, J.: An efficient brain tumor detection methodology using a k-means clustering algorithm. In: Int’l CONFERENCE 2016, ICCSP, pp.653-657, IEEE, Tamilnadu (2013).

[15] Saraswat, M., Arya, K.V.: Automatic microscopic image analysis for leukocytes identification. Journal of Elsevier micron, 65, pp. 20-33, April 2014.

[16] Yang, Y., Su, Z., Sun, L.: Medical image enhancement algorithm based on wavelet transform. IEEE Electron Lett 46 (2), 1-2, (2010).

[17] Thai Hoang Le, Applications of Artificial Neural Networks to Facial Image Processing, Artificial Neural Networks - Application, Dr. Chi Leung Patrick Hui (Ed.), ISBN: 978-953-307-188-6, InTech, Available from:, 2011, pp. 213-240

[18] Le Hoang Thai, Tran Son Hai, Facial Expression Classification Based on Multi Artificial Neural Network, International conference on Advance Computing and Applications, 2010, Volume of Extended Abstract, pp. 125-133.

[19] Janki Naik , Prof Sagar Patel , Tumor Detection and Classification using Decision Tree in Brain MRI, lJEDR, ISSN: 2321-9939,2013.

[20] Dr. R. J. Ramteke and Khachane Monali Y, "Automatic Medical Image Classification and Abnormality Detection Using KNearest Neighbor", International Journal of Advanced Computer Research, Volume-2 Number-4 Issue-6 December-2012.

[21] Hari Babu Nandpuru, Dr. S. S. Salankar, Vibha Bora, "MRI BRAIN CANCER CLASSIFICATION USING SUPPORT VECTOR MACHINE". 2014 IEEE Students' Conference on Electrical, Electronics and Computer Science

[21] Hari Babu Nandpuru, Dr. S. S. Salankar, Vibha Bora, "MRI BRAIN CANCER CLASSIFICATION USING SUPPORT VECTOR MACHINE". 2014 IEEE Students' Conference on Electrical, Electronics and Computer Science

[22] M. F. B. Othman, N. B. Abdullah, N. F. B. Kamal, "MRI brain classification using Support vector machine", IEEE, Centre for Artificial Intelligence & Robotics (CAIRO), Universiti Teknologi Malaysia, 2011.

[23] Singh, L., Chetty, G., Sharma, D. A novel machine learning approach for detecting the brain abnormalities from mri structural images. In IAPR International Conference on Pattern Recognition in Bioinformatics, 2012 : 94-105. Springer Berlin Heidelberg.

[24] avitha A.R., Chitra L., kanaga R. Brain Tumor Segmentation using Genetic Algorithm with SVM Classifier. International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering, 2016 5(3): 1468-1471.

[25] Zhou, X., Yu, K., Zhang, T., & Huang, T. “Image classi¿cation using super-vector coding of local image descriptors.” In ECCV,2010..

[26] K. Sudharani, Dr.T.C. Sarma and Dr. K. Satya Prasad (2016), Brain Tumor Detection Using Texture Characterisation and Classification Based on the Grey-Level CoOccurrence Matrix. IJEER 4(2), 57-61. DOI: 10.37391/IJEER.040204.

Harendra singh and Roop Singh Solanki (2021), Classification & Feature extraction of Brain tumor from MRI Images using Modified ANN Approach. IJEER 9(2), 10-15. DOI: 10.37391/IJEER.090202.