# Brain Tumor Classification Using Meta-Heuristic Optimized Convolutional Neural Networks

^{1}

^{2}

^{3}

^{4}

^{5}

^{6}

^{7}

^{*}

## Abstract

**:**

## 1. Introduction

- Edge loss minimization while segmenting tumor region by using candidate region from MRI.
- Use of an optimization algorithm that updates the network parameters and normalizes the classification process.
- Maximizing brain tumor detection rate using the optimized segmentation process and classification algorithm.

## 2. Related Work

## 3. Meta-Heuristic Optimized Convolution Neural Network for Brain Tumor Detection

#### 3.1. Workflow

#### 3.2. Dataset

#### 3.3. Pre-Processing

#### 3.4. Segmentation

#### 3.5. Feature Extraction

#### 3.6. Cancer Classification

## 4. Results and Discussion

## 5. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Appendix A

features=[]; | |

i = imread(‘img.jpg’); | |

subplot(1,3,1) | |

imshow(i); | |

title(‘Original Image’); | |

gray=rgb2gray(i); | |

subplot(1,3,2) | |

imshow(gray); | |

title(‘Converted to Grayscale image’); | |

glcm=graycomatrix(gray) | |

A=glcm; | |

num_rows=size(A,1) | |

num_cols=size(A,2) | |

for i=1:num_rows | |

for j=1:num_cols | |

trans(i,j)=A(j,i); | |

End | |

End | |

for i=1:1:num_rows | |

for j=1:1:num_cols | |

A(i,j)=A(i,j)+trans(i,j); | |

End | |

End | |

factor=sum(sum(A)); | |

for i=1:1:num_rows | |

for j=1:1:num_cols | |

A(i,j)=A(i,j)/factor; | |

End | |

End | |

disp(A); | |

energy=0; | |

for i=1:1:num_rows | |

for j=1:1:num_cols | |

energy = energy + A(i,j)^2; | |

End | |

End | |

disp(energy); | |

%Second Contrast | |

contrast=0; | |

for i=1:1:num_rows | |

for j=1:1:num_cols | |

contrast = contrast + A(i,j).*((i-j)^2); | |

End | |

End | |

disp(contrast); | |

%Third Homogeneity | |

homogeneity=0; | |

for i=1:1:num_rows | |

for j=1:1:num_cols | |

homogeneity = homogeneity + A(i,j).*(1/(1+(i-j)^2)); | |

End | |

End | |

disp(homogeneity); | |

%Fourth Entropy | |

for i=1:1:num_rows | |

for j=1:1:num_cols | |

B(i,j)=log(A(i,j)); | |

End | |

End | |

entropy=0; | |

for i=1:1:num_rows | |

for j=1:1:num_cols | |

entropy = entropy - ( A(i,j)*B(i,j) ); | |

End | |

End | |

disp(entropy); | |

features=[energy,contrast,homogeneity,entropy] | |

x=0:0.33:1; | |

subplot(1,3,3) | |

plot(x,features,’r--s’) | |

xlabel(‘X’) | |

ylabel(‘Texture Features Values’) | |

title(‘Plot of the energy,contrast,homogeneity,entropy’) |

## Appendix B

load Trainset | |

% parameter setting | |

alpha = 0.1; % learning rate | |

beta = 0.01; % scaling factor for sigmoid function | |

train_size = size(train_set); | |

N = train_size(1); % number of training samples | |

D = train_size(2); % dimension of feature vector | |

n_hidden = 300; % number of hidden layer units | |

K = 10; % number of output layer units | |

% initialize all weights between -1 and 1 | |

W1 = 2*rand(1+D, n_hidden)-1; % weight matrix from input layer to hidden layer | |

W2 = 2*rand(1+n_hidden, K)-1; % weight matrix from hidden layer to ouput layer | |

max_iter = 100; % number of iterations | |

Y = eye(K); % output vector | |

% training | |

for i=1:max_iter | |

disp([num2str(i), ‘ iteration’]); | |

for j=1:N | |

% propagate the input forward through the network | |

input_x = [1; train_set(j, :)’]; | |

hidden_output = [1;sigmf(W1’*input_x, [beta 0])]; | |

output = sigmf(W2’*hidden_output, [beta 0]); | |

% propagate the error backward through the network | |

% compute the error of output unit c | |

delta_c = (output-Y(:,train_label(j)+1)).*output.*(1-output); | |

% compute the error of hidden unit h | |

delta_h = (W2*delta_c).*(hidden_output).*(1-hidden_output); | |

delta_h = delta_h(2:end); | |

% update weight matrix | |

W1 = W1 - alpha*(input_x*delta_h’); | |

W2 = W2 - alpha*(hidden_output*delta_c’); | |

End | |

End | |

% testing | |

test_size = size(test_set); | |

num_correct = 0; | |

for i=1:test_size(1) | |

input_x = [1; test_set(i,:)’]; | |

hidden_output = [1; sigmf(W1’*input_x, [beta 0])]; | |

output = sigmf(W2’*hidden_output, [beta 0]); | |

[max_unit, max_idx] = max(output); | |

if(max_idx == test_label(i)+1) | |

num_correct = num_correct + 1; | |

End | |

End | |

% computing accuracy | |

accuracy = num_correct/test_size(1); |

## References

- Nazir, M.; Khan, M.A.; Saba, T.; Rehman, A. Brain tumor detection from MRI images using multi-level wavelets. In Proceedings of the 2019 International Conference on Computer and Information Sciences (ICCIS), Aljouf, Saudi Arabia, 3–4 April 2019; IEEE: New York, NY, USA, 2019; pp. 1–5. [Google Scholar]
- Mortezaee, K. Organ tropism in solid tumor metastasis: An updated review. Futur. Oncol.
**2021**, 17, 1943–1961. [Google Scholar] [CrossRef] - Amin, J.; Sharif, M.; Raza, M.; Saba, T.; Rehman, A. Brain tumor classification: Feature fusion. In Proceedings of the 2019 International Conference on Computer and Information Sciences (ICCIS), Aljouf, Saudi Arabia, 3–4 April 2019; IEEE: New York, NY, USA, 2019; pp. 1–6. [Google Scholar]
- Abrams-Pompe, R.S.; Fanti, S.; Schoots, I.G.; Moore, C.M.; Turkbey, B.; Vickers, A.J.; Walz, J.; Steuber, T.; Eastham, J.A. The role of magnetic resonance imaging and positron emission tomography/computed tomography in the primary staging of newly diagnosed prostate cancer: A systematic review of the literature. Eur. Urol. Oncol.
**2021**, 4, 370–395. [Google Scholar] [CrossRef] - Joy, J.S.; Rahul, T.; Joby, J. A review of brain tumor segmentation on mri image using machine learning algorithm. Cancer Res.
**2021**, 1, 495. [Google Scholar] - Bacanin, N.; Bezdan, T.; Venkatachalam, K.; Al-Turjman, F. Optimized convolutional neural network by firefly algorithm for magnetic resonance image classification of glioma brain tumor grade. J. Real-Time Image Process.
**2021**, 18, 1085–1098. [Google Scholar] [CrossRef] - Fonseca, N.A.; Gregório, A.C.; Mendes, V.M.; Lopes, R.; Abreu, T.; Gonçalves, N.; Manadas, B.; Lacerda, M.; Figueiredo, P.; Pereira, M.; et al. GMP-grade nanoparticle targeted to nucleolin downregulates tumor molecular signature, blocking growth and invasion, at low systemic exposure. Nano Today
**2021**, 37, 101095. [Google Scholar] [CrossRef] - Droby, A.; Thaler, A.; Giladi, N.; Hutchison, R.M.; Mirelman, A.; Ben Bashat, D.; Artzi, M. Whole brain and deep gray matter structure segmentation: Quantitative comparison between MPRAGE and MP2RAGE sequences. PLoS ONE
**2021**, 16, e0254597. [Google Scholar] [CrossRef] - Li, J.; Zou, B.; Xu, Z.; Liu, Q. Multi-branch Multi-task 3D-CNN for Alzheimer’s Disease Detection. In Proceedings of the Chinese Conference on Pattern Recognition and Computer Vision (PRCV), Shenzhen, China, 4–7 November 2022; Springer: Cham, Switzerland, 2021; pp. 618–629. [Google Scholar]
- Khan, M.Z.; Gajendran, M.K.; Lee, Y.; Khan, M.A. Deep Neural Architectures for Medical Image Semantic Segmentation: Review. IEEE Access
**2021**, 9, 83002–83024. [Google Scholar] [CrossRef] - Amin, J.; Sharif, M.; Yasmin, M.; Saba, T.; Raza, M. Use of machine intelligence to conduct analysis of human brain data for detection of abnormalities in its cognitive functions. Multimedia Tools Appl.
**2019**, 79, 10955–10973. [Google Scholar] [CrossRef] - Yang, D.; Pan, H.; Cui, Q.; Bian, X.; Teng, T.; Wang, B. Few-shot segmentation method for multi-modal magnetic resonance images of brain Tumor. J. Comput. Appl.
**2021**, 41, 1049. [Google Scholar] - Saeidifar, M.; Yazdi, M.; Zolghadrasli, A. Performance Improvement in Brain Tumor Detection in MRI Images Using a Combination of Evolutionary Algorithms and Active Contour Method. J. Digit. Imaging
**2021**, 34, 1209–1224. [Google Scholar] [CrossRef] - Abunadi, I.; Senan, E.M. Multi-Method Diagnosis of Blood Microscopic Sample for Early Detection of Acute Lymphoblastic Leukemia Based on Deep Learning and Hybrid Techniques. Sensors
**2022**, 22, 1629. [Google Scholar] [CrossRef] - Larabi-Marie-Sainte, S.; Aburahmah, L.; Almohaini, R.; Saba, T. Current Techniques for Diabetes Prediction: Review and Case Study. Appl. Sci.
**2019**, 9, 4604. [Google Scholar] [CrossRef] - Nadeem, M.W.; Al Ghamdi, M.A.; Hussain, M.; Khan, M.A.; Khan, K.M.; Almotiri, S.H.; Butt, S.A. Brain Tumor Analysis Empowered with Deep Learning: A Review, Taxonomy, and Future Challenges. Brain Sci.
**2020**, 10, 118. [Google Scholar] [CrossRef] [Green Version] - Bin Tufail, A.; Ma, Y.-K.; Kaabar, M.K.A.; Martínez, F.; Junejo, A.R.; Ullah, I.; Khan, R. Deep Learning in Cancer Diagnosis and Prognosis Prediction: A Minireview on Challenges, Recent Trends, and Future Directions. Comput. Math. Methods Med.
**2021**, 2021, 9025470. [Google Scholar] [CrossRef] - Melekoodappattu, J.G.; Kadan, A.B.; Anoop, V. Early detection of breast malignancy using wavelet features and optimized classifier. Int. J. Imaging Syst. Technol.
**2021**, 31, 1551–1563. [Google Scholar] [CrossRef] - Rajinikanth, V.; Kadry, S.; Nam, Y. Convolutional-Neural-Network Assisted Segmentation and SVM Classification of Brain Tumor in Clinical MRI Slices. Inf. Technol. Control
**2021**, 50, 342–356. [Google Scholar] [CrossRef] - Saba, T.; Bokhari, S.T.F.; Sharif, M.; Yasmin, M.; Raza, M. Fundus image classification methods for the detection of glaucoma: A review. Microsc. Res. Tech.
**2018**, 81, 1105–1121. [Google Scholar] [CrossRef] - Heidari, A.A.; Mirjalili, S.; Faris, H.; Aljarah, I.; Mafarja, M.; Chen, H. Harris hawks optimization: Algorithm and applications. Futur. Gener. Comput. Syst.
**2019**, 97, 849–872. [Google Scholar] [CrossRef] - Jouhari, H.; Lei, D.; Al-Qaness, M.; Elaziz, M.; Damaševičius, R.; Korytkowski, M.; Ewees, A. Modified Harris Hawks Optimizer for Solving Machine Scheduling Problems. Symmetry
**2020**, 12, 1460. [Google Scholar] [CrossRef] - Ali, M.H.; Jaber, M.M.; Abd, S.K.; Rehman, A.; Awan, M.J.; Vitkutė-Adžgauskienė, D.; Damaševičius, R.; Bahaj, S.A. Harris Hawks Sparse Auto-Encoder Networks for Automatic Speech Recognition System. Appl. Sci.
**2022**, 12, 1091. [Google Scholar] [CrossRef] - Balamurugan, R.; Ratheesh, S.; Venila, Y.M. Classification of heart disease using adaptive Harris hawk optimization-based clustering algorithm and enhanced deep genetic algorithm. Soft Comput.
**2022**, 26, 2357–2373. [Google Scholar] [CrossRef] - Kaveh, M.; Mesgari, M.S. Application of Meta-Heuristic Algorithms for Training Neural Networks and Deep Learning Architectures: A Comprehensive Review. Neural Process. Lett.
**2022**, 1–104. [Google Scholar] [CrossRef] - Irmak, E. Multi-Classification of Brain Tumor MRI Images Using Deep Convolutional Neural Network with Fully Optimized Framework. Iran. J. Sci. Technol. Trans. Electr. Eng.
**2021**, 45, 1015–1036. [Google Scholar] [CrossRef] - Rehman, A.; Khan, M.A.; Saba, T.; Mehmood, Z.; Tariq, U.; Ayesha, N. Microscopic brain tumor detection and classification using 3D CNN and feature selection architecture. Microsc. Res. Tech.
**2020**, 84, 133–149. [Google Scholar] [CrossRef] - Garg, G.; Ritu, G. Brain tumor detection and classification based on hybrid ensemble classifier. arXiv
**2021**, arXiv:2101.00216. [Google Scholar] - Addeh, A.; Moshtagh, I. Brain tumor type classification using deep features of MRI and optimized RBFNN. ENG Trans.
**2021**, 2, 1–7. [Google Scholar] - Islam, K.; Ali, S.; Miah, S.; Rahman, M.; Alam, S.; Hossain, M.A. Brain tumor detection in MR image using superpixels, principal component analysis and template based K-means clustering algorithm. Mach. Learn. Appl.
**2021**, 5, 100044. [Google Scholar] [CrossRef] - Zhang, W.; Yang, G.; Huang, H.; Yang, W.; Xu, X.; Liu, Y.; Lai, X. ME-Net: Multi-encoder net framework for brain tumor segmentation. Int. J. Imaging Syst. Technol.
**2021**, 31, 1834–1848. [Google Scholar] [CrossRef] - Munir, K.; Fabrizio, F.; Antonello, R. Brain tumor segmentation using 2D-UNET convolutional neural network. In Deep Learning for Cancer Diagnosis; Springer: Singapore, 2021; pp. 239–248. [Google Scholar]
- Biratu, E.S.; Schwenker, F.; Debelee, T.G.; Kebede, S.R.; Negera, W.G.; Molla, H.T. Enhanced Region Growing for Brain Tumor MR Image Segmentation. J. Imaging
**2021**, 7, 22. [Google Scholar] [CrossRef] - Chahal, P.K.; Pandey, S. A hybrid weighted fuzzy approach for brain tumor segmentation using MR images. Neural Comput. Appl.
**2021**, 1–15. [Google Scholar] [CrossRef] - Maqsood, S.; Damasevicius, R.; Shah, F.M. An Efficient Approach for the Detection of Brain Tumor Using Fuzzy Logic and U-NET CNN Classification. In Computational Science and Its Applications—ICCSA 2021; Springer International Publishing: Cham, Switzerland, 2021; pp. 105–118. [Google Scholar] [CrossRef]
- Maqsood, S.; Damaševičius, R.; Maskeliūnas, R. Multi-Modal Brain Tumor Detection Using Deep Neural Network and Multiclass SVM. Medicina
**2022**, 58, 1090. [Google Scholar] [CrossRef] - Rajinikanth, V.; Kadry, S.; Damasevicius, R.; Sujitha, R.A.; Balaji, G.; Mohammed, M.A. Glioma/Glioblastoma Detection in Brain MRI using Pre-trained Deep-Learning Scheme. In Proceedings of the 2022 3rd International Conference on Intelligent Computing, Instrumentation and Control Technologies: Computational Intelligence for Smart Systems, ICICICT 2022, Kannur, India, 11–12 August 2022; pp. 987–990. [Google Scholar] [CrossRef]
- Badjie, B.; Ülker, E.D. A Deep Transfer Learning Based Architecture for Brain Tumor Classification Using MR Images. Inf. Technol. Control
**2022**, 51, 332–344. [Google Scholar] [CrossRef]

**Figure 2.**MRI samples Normal Brain MRI (Y1 to Y8) Benign tumor MRI (Y9 to Y15) Malignant tumor MRI (Y16 to Y21).

MRI | Pre-Processed Images | Image Histogram | Contrast Improved Images |
---|---|---|---|

Enhanced Image | Edge Detected Image | Segmented Image | |
---|---|---|---|

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Kurdi, S.Z.; Ali, M.H.; Jaber, M.M.; Saba, T.; Rehman, A.; Damaševičius, R.
Brain Tumor Classification Using Meta-Heuristic Optimized Convolutional Neural Networks. *J. Pers. Med.* **2023**, *13*, 181.
https://doi.org/10.3390/jpm13020181

**AMA Style**

Kurdi SZ, Ali MH, Jaber MM, Saba T, Rehman A, Damaševičius R.
Brain Tumor Classification Using Meta-Heuristic Optimized Convolutional Neural Networks. *Journal of Personalized Medicine*. 2023; 13(2):181.
https://doi.org/10.3390/jpm13020181

**Chicago/Turabian Style**

Kurdi, Sarah Zuhair, Mohammed Hasan Ali, Mustafa Musa Jaber, Tanzila Saba, Amjad Rehman, and Robertas Damaševičius.
2023. "Brain Tumor Classification Using Meta-Heuristic Optimized Convolutional Neural Networks" *Journal of Personalized Medicine* 13, no. 2: 181.
https://doi.org/10.3390/jpm13020181