  Accurate detection of brain tumors could save lots of lives and increasing
the accuracy of this binary classification even as much as a few percent has
high importance. Neural Gas Networks (NGN) is a fast, unsupervised algorithm
that could be used in data clustering, image pattern recognition, and image
segmentation. In this research, we used the metaheuristic Firefly Algorithm
(FA) for image contrast enhancement as pre-processing and NGN weights for
feature extraction and segmentation of Magnetic Resonance Imaging (MRI) data on
two brain tumor datasets from the Kaggle platform. Also, tumor classification
is conducted by Support Vector Machine (SVM) classification algorithms and
compared with a deep learning technique plus other features in train and test
phases. Additionally, NGN tumor segmentation is evaluated by famous performance
metrics such as Accuracy, F-measure, Jaccard, and more versus ground truth data
and compared with traditional segmentation techniques. The proposed method is
fast and precise in both tasks of tumor classification and segmentation
compared with other methods. A classification accuracy of 95.14 % and
segmentation accuracy of 0.977 is achieved by the proposed method.
