Segmenting the Lesion Area of Brain Tumor using Convolutional Neural Networks and Fuzzy K-Means Clustering

Brain tumor Segmentation is one of the most crucial methods of medical image processing. Non-automatic segmentations are broadly used in clinical diagnosis and medication. However, this kind of segmentation does not have accuracy in medical images, especially in terms of brain tumors, and it provides a low level of reliability. The primary objective of this paper is to develop a methodology for brain tumor segmentation. In this paper, a combination of Convolutional Neural Network and Fuzzy K-means algorithm has been presented to segment the lesion area of brain tumor. It contains three phases, Image preprocessing to reduce computational complexity, Attribute extraction and selection and Segmentation. At first, the database images are pre-processed using adaptive filters and wavelet transform in order to recover the image from the noise state and reduce the computational complexity. Then feature extraction is performed by the proposed deep neural network. Finally, it is processed through the Fuzzy K-Means algorithm to segment the tumor region separately. The innovation of this article is related to the implementation of deep neural network with optimal parameters, identification of related features and removal of unrelated and repetitive features with the aim of observing a subset of features that describe the problem well and with minimal reduction in efficiency. This results in reduced feature sets, storage of data collection resources during operation, and overall data reduction to limit storage requirements. This proposed segmentation approach has been verified on BRATS dataset and produces the accuracy of 98.64%, sensitivity of 100% specificity of 99%. doi : 10.5829/ije.2023.36.08b.15


A B S T R A C T
Brain tumor Segmentation is one of the most crucial methods of medical image processing. Nonautomatic segmentations are broadly used in clinical diagnosis and medication. However, this kind of segmentation does not have accuracy in medical images, especially in terms of brain tumors, and it provides a low level of reliability. The primary objective of this paper is to develop a methodology for brain tumor segmentation. In this paper, a combination of Convolutional Neural Network and Fuzzy Kmeans algorithm has been presented to segment the lesion area of brain tumor. It contains three phases, Image preprocessing to reduce computational complexity, Attribute extraction and selection and Segmentation. At first, the database images are pre-processed using adaptive filters and wavelet transform in order to recover the image from the noise state and reduce the computational complexity. Then feature extraction is performed by the proposed deep neural network. Finally, it is processed through the Fuzzy K-Means algorithm to segment the tumor region separately. The innovation of this article is related to the implementation of deep neural network with optimal parameters, identification of related features and removal of unrelated and repetitive features with the aim of observing a subset of features that describe the problem well and with minimal reduction in efficiency. This results in reduced feature sets, storage of data collection resources during operation, and overall data reduction to limit storage requirements. This proposed segmentation approach has been verified on BRATS dataset and produces the accuracy of 98.64%, sensitivity of 100% specificity of 99%. doi: 10 Image segmentation is defined as dividing a digital image into several sections (a collection of pixels also, known as superpixel). The purpose of segmentation is to simplify or/and create a change in displaying pixels to those that are more meaningful and simpler for analysis. Segmentation is usually used for finding the location of objects and boundaries (lines, curves, etc.) in the image. In other words, image segmentation means the process, in which a label is allocated to each pixel so that the pixels with the same labels have similar features. Cancer can be defined as abnormal and uncontrolled growth and division of body cells. This occurrence means the abnormal growth and divisions of the cells in the brain tissues as a mass, and it is called a brain tumor. Brain tumors are not very common; however, they are from very deadly types of cancers [1]. Brain tumors might have various shapes and sizes, and they grow enough until the diagnosis time. The most common brain tumor among adults is glioma which is made of glial cells and has the highest rate of mortality prevalence [2]. This type of brain tumor is divided into High-Grade Glioma and Low-Grade Glioma based on the severity of the glioma and its origin [3]. Low-Grade Glioma has a less aggressive effect and penetration compared to High-Grade Glioma [4]. At the moment, brain tumor segmentation usually depends on the personal and scientific experience of the doctor. This situation presents various segmentation results due to the different professional knowledge of the doctors, in addition to wasting much time and human mistakes. Further, brain tumor segmentation is challenging because of the different shapes and similarities of the Gray Level between the tumor tissue and its adjacent organs. Thus, the method of accurate and efficient segmentation of brain tumors has been a critical research method using deep neural networks [5]. Recognizing the tissues of brain lesions and determining the situation of these tissues in the medical images are accounted as significant issues in medical images. Analyzing the pathology presents an important role in diagnosing, predicting, and medical planning for brain tumors. Today, great achievements have been provided by studies about brain tissues and their molecular understanding. At the present, some tools can be created for analyzing these complicated images automatically, using digital pathology, such as digital scanning and saving the tumor tissue sections in patients. Therefore, analyzing image data has attracted a lot of attention in recent years. Kernel segmentation from the tissue images is necessary, especially for the approaches relevant to the biological characteristics. The type of tissue, the difference in color, and the type of cell present various visual features, and they lead to many difficulties for segmentation algorithms of the traditional images that work appropriately for all of these cases.
The non-automatic analysis of the many sampled slides of the tissue by the doctors is an intensive and expensive process. Thus, the computerized diagnosis systems that are being converted into influential tools are used by doctors to discover and diagnose tumors [6,7]. The most common method for brain tumor medication is surgery. However, some methods, such as radiotherapy and chemotherapy are used to reduce the speed of tumor growth. Brain tumor segmentation in images might have a significant effect in diagnosing the tumor properly, predicting its growth speed, and also, planning for the medication. Some tumors, such as meningioma can be easily segmented. Nevertheless, defining the location of tumors such as glioma is much more difficult. These tumors are always more scattered with swelling around them, and they have poor contrast with the healthy tissues around themselves. In addition, they spread with tentacle-like structures that make their segmentation difficult. The other basic problem in brain tumor segmentations is their different shapes and sizes anywhere in the brain [8]. Brain tumor segmentation performed by seasoned radiologists is considered a standard reference. However, the semi-automatic and full-automatic computer segmentation methods result in improving the speed of segmentation and reproducibility of the results. Moreover, the full-automatic segmentation removes inconsistency between the observer and within the observer as the result of some factors, such as differences in expertise, attention, and errors due to visual fatigue [9][10][11]. Besides, significant progress has been achieved in increasing the similarity of segmentation in the manual and automatic methods with segmentation algorithms using deep neural networks [12].
Healthy brains are usually made of three types of tissue: white matter, gray matter, and cerebrospinal fluid. The purpose of brain tumor segmentation is to diagnose the area and prevent the development of the tumor area, meaning the tissue area of active tumor of necrotic and edema. This action is performed by identifying the abnormal areas compared to the natural tissue [13,14].
In this study, the researchers segment the MRI (BRATS) images, in which the data are directly controlled as a section of the learning process of the neural network via the proposed deep neural network architecture. Afterward, we observed more accuracy with increasing speed by comparing this model to several common algorithms used in this field.
In this research, by using the fuzzy K-means clustering method, structural similarity is considered as an index and this index is used as an important parameter to find the similarity between segmented results and ground truth images.
Next, in order to select the appropriate feature, we extract the feature that contains information around the target and define a set of features that have a high correlation with the target feature as a suitable set. This definition of the Deep Neural Network with optimal parameters and high learning power at a suitable speed is one of the innovative aspects of this research.
One of the advantages of using deep neural networks is the automatic adjustment of parameters and weights at every moment of training. The mechanism of sharing the weights in each feature also makes it possible that the number of parameters in each layer of the neural network is reduced and the computational load on the processor is avoided.
The structure of this study is as follows: Section two reviews some studies that have been conducted in this field, section three introduces the proposed method, and section four presents the results of this study. Finally, this study ends with a general conclusion in section five.

RELATED WORKS
Many methods have been introduced by researchers for automatic and semi-automatic segmentation of brain tumors in recent years. Making difference among the body tissues in medical images manually is boring and results in human mistakes. The crucial purpose of each method is to identify and classify the tumor area properly. Many studies have been carried out about the automatic segmentation of brain tumors using deep learning considering the success of deep neural networks in terms of medical image processing.
Toğaçar et al. [15] have performed the process of feature extraction for effective segmentation using the architectures of ALEXnet and VGG16. Thus, in the first stage, they enhanced the outstanding features via Hyper column technique, and in the second stage, they combined the extracted features from both architectures. In this method, recurrent feature elimination was utilized to select the most appropriate features. Ultimately, a support vector machine was applied for the segmentation. This method eventually reported 96% accuracy for this study.
Amin et al. [16] used a deep learning algorithm by focusing on preprocessing and MRI image segmentation before presenting it as an input. Their idea was to sharpen the images; thus, they used the median filter which is one of the non-linear filters in digital filtering to remove noise. After that, the tumor area was segmented with accurate adjustment using the growing area to give it as the input to a model of stacked sparse autoencoders (SSAE). This model was trained and examined on the collection of BRATS data. The results indicated the accuracy and sensitivity improvement of the proposed techniques compared to other methods.
Islam et al. [17] focused on multi-level segmentations, and first, they preprocessed the database images to extract the efficient features from the MRI scans of the brain tumors. Afterward, they segmented the areas of brain tumors using methods of thresholding, watershed algorithm, and morphological operations. In this method, the features were extracted from the convolution, and the database images were classified as two cancer and non-cancer classes via the K-SVM method. The proposed algorithm reported an accuracy of 87.4%.
Zhang et al. [18] investigated brain tumor segmentation from MRI images via multiple encoders. This model reduced the difficulty of feature extraction by defining several encoders and improving segmentation accuracy. Besides, this model presented Categorical Dice Loss which provided various weights for different areas of segmentation to solve the problem of unbalanced data. The proposed method illustrated the accuracy of 88.2% for the segmentation.
Hasan et al. [19] proposed an improved model of Unet which was introduced by substituting an inverse convolution stage with an algorithm that was the nearest neighbor for the increased sample. Besides, an elastic transformation was used to enhance the collection of training data to empower the model for database image segmentation.
Rajan and Sundar [20] implemented a system based on a combination of K-Means with FCM methods, and they used the active contour as a post-processing for brain tumor segmentation. Standardizing the image severity was the main purpose of using active contour. The function of the proposed method was evaluated based on the black-and-white pixels and the tumor locations. This study provided a comparable function to other approaches.
The other effective study was conducted by Begum and Lakshmi [21] with the title of combining statistical wavelets and recurrent neural networks for brain tumor segmentation. This study classified and segmented the brain tumor via statistical features. To do so, it preprocessed the images for noise removal, and then, it extracted the statistical features, using longitudinal navigation of tissue and GLCM matrix. Afterward, the features were reduced via gravitational search algorithm (OGSA) and were given to the recurrent neural network to classify the images as tumor and non-tumor classes. After that, the images were entered into the next implementation step for the area segmentation. In this case, the algorithm of modified region growing was used for the segmentation stage.
Thaha et al. [22] introduced the enhanced convolution neural network (E-CNN) by Loss function optimization and using the BAT algorithm to segment the abnormalities from the MRI images of the brain. Therefore, the results of accuracy improvement of the segmentation were shown via intelligent optimization.
Gao and Qian [23] focused on one of the methods of artificial neural networks called as DeepLab. This method made difference between lesion and background using the semantic-based and patch-based segmentation approaches. In the following, it accurately adjusted the borders of the lesion area by combining some other methods, such as conditional random fields (CRF).
Emadi et al. [24] have proposed a new method for improving brain tumor segmentation accuracy based on super-pixel and fast primal dual (PD) algorithms. The proposed method detects brain tumor tissue in Flair-MRI imaging in BRATS2012 dataset. This method detects the primary borders of tumors using a super-pixel algorithm, and improves brain tumor borders using fast PD in Markov random field optimization. Then, postprocessing processes are used to delete white brain areas. Finally, an active contour algorithm was employed to display tumor area. Different experiments were carried on the proposed method and qualitative and quantitative criteria such as sensitivity, accuracy and F-measure were used for evaluation. The obtained results showed the efficiency of the proposed method in the accuracy and sensitivity are 86.59% and 88.57% and F1-Measure 86.37%.
Azimi et al. [25] presented a fully-automated method based on graph shortest path layer segmentation and fully convolutional networks (FCNs) for fluid segmentation.
This research presented a fully-automated method for fluid segmentation based on fully convolutional networks (FCNs) applied to OCT scans and their corresponding regions of interest computed by graph shortest path in neutrosophic (NS) domain. From the results of this research, it can be concluded that in the future will be train FCN with augmented training data by random translation, reflection, rotation, flipping and cropping to achieve more accurate results.
Khan et al. [26] have presented the segmentation process for brain tumor images by using the K-Means clustering method and deep learning by increasing the combined data, focusing on the non-invasive feature of MRI images and better display of internal tumor information.
Rai et al. [27] merged CNN with the full fuzzy specialist (NS-CNN) neutrosophic, confident entropy to diagnose brain tumors. These images were then added to the CNN for the extraction of characteristics and finally, extracted features are fed in the SVM classification to be classified as benign or malignant with an averaged 95.62% accuracy.
We carefully find out in related works that the reported methods often used traditional approaches and pre-trained networks and researchers try to classify the created classes and finally the desired segmentation. The proposed method tries to provide an efficient technique with high accuracy and applicable at a suitable speed on ordinary processors. Therefore, we define the proposed research in 3 sections: pre-processing, feature extraction and selection, and segmentation. In the pre-processing stage, a method is presented to remove noise and reduce computational complexity, and further, by using the concepts of deep learning and the definition of convolutional neural network, the high-level features of medical images are extracted, which can be of great help in accurate segmentation. Finally, using the Fuzzy K-Means algorithm, we will try to minimize the distortion and the best clustering for the final segmentation of the images.

THE PROPOSED METHOD
Algorithm 1 illustrates the general segmentation process of the lesion area of a brain tumor. First, in the proposed method, the proposed CNN extracted the critical features of the images from the preprocessed images by the adaptive filters. Afterward, the features with high significance were selected via correlation-based feature selection. Finally, the tumor area was extracted from the primary images via the fuzzy K-Means algorithm.
In algorithm 1, database images that are manually segmented are considered as input.
Algorithm 1: Algorithm of the proposed method. Input: 1) trainImgSet: The medical images Set, with segmented brain tumor areas manually in theirs; 2) targets = The segmented brain tumor areas manually in trainImgSet.
1. get N = The number of images in trainImgSet 2. get wavelet = The wavelet transform according to Equation (1,2) 3. get th_w = The threshold limit of wavelet transform 4. get CNN = Our Convolutional Neural Netwprk 5. get FKM = The fuzzy-kmeans algorithm 6. get K = The number of clusters needed to feature clustering in FKM 7. get th_k = The threshold limit of FKM RI=Divide Im_wt[i] into 9 equal areas 13.
for region in the RI do : 15.
The designed convolution network was regarded based on Table 1, and the N variable was the number of training images. The k variable was the number of required clusters for clustering the image pixels (with and without tumors).
th_w is the threshold limit of the defined wavelet transform, and th_k equaled the threshold limit of K-Means of X variable for each parameter or other network that has been already determined in this study. The wavelet transform on the image has been applied according to formulas 1 and 2. Afterward, the coefficients less than the y parameter were removed, and the inverse wavelet transform (denoised image) was applied. Correspondingly, the image was divided into nine equal areas. The selected features were chosen based on the formula of eight and nine references by applying CNN transform to each area and extracting the features. The fuzzy K-Means were applied to the selected features based on k and z (dividing them into two classes). Ultimately, the output of an image similar to the original image, in which the tumor pixels were determined was displayed as the final purpose of this study.

1. Preprocessing
Pre-processing steps, including normalization in order to prevent to lose features and wavelet transformation, a process that reduces unnecessary information for the convolutional neural network and leads to optimal use of the proposed convolutional neural network. And finally, the structure of the adaptive filter, which is used with fixed and predetermined specifications for pre-processing operations in order to reduce the computational complexity.
First, we cut the images relevant to the database in this study to reduce the computational complexity and create a model for better evaluation. After that, we adjusted the image brightness to understand the proposed network from the database images better. Adaptive filters are filters that can change their parameters in some ways despite the traditional filters with fixed and predetermined specifications. Therefore, they can respond to the changes in their surrounding environment, considering specific purposes. Wavelet transform is a method for displaying the image in two dimensions of time and frequency. All the wavelet functions have been made of a wavelet called a mother wavelet. Wavelet transform is a function of scale that is related to the inverse frequency and transform which has been shown in Equation (1).
The modified and extended versions of the mother wavelet can be demonstrated as the signal wavelet transform of x (t) with the mother wavelet function of ψ(t) [28].
Signal wavelet transform of x (t) and wavelet function of , are displayed as follows [28]: Wavelet transform is a combination of two low-pass and high-pass filters that are applied to the input image during various stages. Two small and large scales were used to introduce the high and low frequencies in these transforms. The purpose of small scales was to achieve the short-term behaviors of the image, and the purpose of large scales was to access the long-term behavior of the image. To do so, this transform used an image and selected one mother wavelet that this study had used a Daubechies wavelet. Correspondingly, wavelet transform presented images with high frequency, representing image details, and images with low frequency, approximately representing input image in each stage. Therefore, the input image was achieved from the output of the approximation low-pass filter, and details of the input image were achieved from the output of the high-pass filter in this study. These filters reported the wavelet coefficient and scaling function. Sub-band coding, including the sequence of the filtering process and reduction of sampling rate, was used in this study. In the first stage, the input image was filtered by two highpass and low-pass filters. After that, the output of both filters was reduced in sampling by factor 2. In the second stage, the output of the low-pass filter in the first stage was filtered by those low-pass and high-pass filters and its rate was reduced by factor 2 so that the output sequence was produced with a length of N/4. This process of filtering the output of the low-pass filter and rate reduction continued. The database images were decomposed into the wavelet coefficient, using wavelet transform. To do so, the Daubechies wavelet of db2 was used to extract the features. Wavelet thresholding was performed to recover the image from the noisy mode in the wavelet transform method. Therefore, the small coefficient of the wavelet was adjusted to zero, and the coefficients compatible with the image remained. This process decreases the unnecessary information for the CNN, and it leads to optimized use of the proposed CNN. Figure 1 shows the block diagram of image preprocessing and deep neural network training in order to reduce computational complexity and to create a better evaluation model.
The block diagram of Figure 1 shows the combination of pre-processing and deep network training. The purpose of normalization in this section is that all features are involved in our decision-making and features with large values do not remove other features. Wavelet transform parameters are changed in such a way that they are able to respond to the changes in their surroundings according to specific goals and the short-term and longterm behaviors of the images are known. In this block diagram, suitable features are extracted using deep neural network and after denormalization, the output is provided to the K-means Fuzzy algorithm for segmentation.

2. The Proposed Deep Neural Network
In this section, the proposed method based on CNN has been introduced to extract the appropriate features of brain tumors. Training network is minimizing the error function based on the real outputs of the network compared to the appropriate outputs of the network. This process was done by modifying free network parameters, meaning weights and biases. The method of training used in the current proposed structure was the training method with an observer. Thus, a supervisor observed the behavior of the learners and reminded them to do the proper action. In other words, the learner system is a set of data pairs, consisting of network input and appropriate output. After applying the network input, its output was compared to the appropriate output. Besides, the learning error of computation was used to modify the network parameters in a way that if it was given to those input networks once again, the network output was closer to the appropriate output. The Loss function should have reached its lowest limit despite being non-linear to train the CNN. In the following, a sliding window (filter) was considered in all the image sections to make difference between the normal areas and tumor areas or the cancer cell nucleus. Therefore, each area of the image Figure 1. Block diagram of preprocessing the image and training the deep neural network determined the local tissue from the image pixels via these windows and introduced them to the CNN. All the information and features received from the local tissues determined by the windows helped identify the tumor area and cancer cell nucleus more accurately. Further, a more accurate decision could be made to identify the healthy and damaged tissues from that image by putting the features of these sections together. In this case, the brain tumor tissues were completely observable. In this stage, the features were extracted from the determined areas of each image using the proposed CNN. The filter size in the convolution layers was considered 3*3; thus, the image resolution might have decreased during this path. Each feature vector of O was related to one or several kernels, concerning the convolution filters. The feature vector was achieved from the following equation [29]: X was the ℎ input channel, W was the kernel for input, * showed the convolution operator, and b was considered the bias number. In other words, the convolution operation was performed for each feature vector. The collection of convolution filters was added to each pixel by the sum of one number as bias that provided the location of each pixel. However, feature extraction in the traditional methods depended on one fixed instruction. The excellence of the proposed CNN to these methods was due to their ability in learning weights and extracting specific features in particular jobs. Correspondingly, a non-linear element was applied to the convolution results to achieve the transformed non-linear features of the input. In this study, an activation function of ReLU was used because the network could train more quickly without making difference in accuracy due to computational efficiency. This function was very effective in terms of computation and let the network be converged quickly. The reason was that its relationship was linear; thus, it was faster than the Sigmoid and Tanh functions.
The mathematical relation of this function was as follows: Parameter X was the input to the ReLU function, and here, the values of computed pixels were in the convolution layer [30].
The purpose of using non-linear activation functions in the proposed CNN was to create a complex mapping between the inputs and outputs. In other words, these functions provided our model the possibility to adapt itself to complex and non-linear data. The pooling layer was periodically put among the convolution layers in the proposed CNN at certain intervals after each convolution layer. The purpose of putting the pooling layers in this study was to decrease the mapping size of features and CNN Normalization + Input DWT Denormalization Output for segmentation parameters of the deep neural network. The function of this layer was to reduce the spatial size of the image to decrease the parameter numbers and computations inside the network, and finally, to control the overfitting. The most common form of using this layer was using the layers with filters by size and Max_Pooling. The Max_Pooling layer was used after the activation function. This action selected the maximum value in each window of the feature vectors. Thus, it kept the number of feature pages; however, the size of the feature page decreased. The computation relation of this action has been stated in relations 5 and 6 [29]: , , = max{ , , , +1, , , … , + −1, , } , , = max , + , + In relation 5, the p symbol indicated the size of the Max_Pooling window. Max_Pooling actions reduced the size of feature vectors. This action was performed under the built-in windows by controlling the regarded pooling size and the steps in the vertical and horizontal modes. Figure 2 shows one stage of the blocks of the convolution layer, activation functions, and pooling layer. The convolution networks could extract a hierarchy of increasingly complex features that made them more attractive. This process was performed by processing the feature vectors achieved from the output of a convolution layer that was used as the input of the lateral convolution sublayers. As it is obvious from the fully-connected layer, all the neurons of this layer were connected to the previous layer. The main duty of the fully-connected layer was combining the local feature in the bottom layer, especially the local feature in the top layers. Dropout was used to prevent overfitting in the fully-connected layer. The way of working this layer was that in each stage of training, some nodes of the network were removed with the probability of p-1, and other nodes remained with the probability of p. Therefore, a decreased network remained that prevented overfitting.
Loss function was used in this study, and it was tried to reach in minimum in training and testing. To do so, Categorical Cross-entropy has been used. The C symbol  Table 1 illustrates the used layers in the architecture of the deep neural network. The size of digital filters of all layers was considered 3*3 in this study. First, the Max_Pooling layer was used after three convolution layers and an activation function. The size of the steps was 1*1 in the convolution layer, and 2*2in the Max_Pooling layer. If we define these layers as a box, another box is made of the three convolution layers and the activation function same as the first box in the following. Ultimately, two fully-connected layers and no network overfitting were used.

Feature Selection
Feature selection can be defined as the procedure of identifying relevant features and removing irrelevant and repetitive features. Correspondingly, the purpose is to observe a subset of features that defines the issue clearly with a minimal reduction in efficiency degree. This method has various advantages that have been explained in this study as folows: ▪ Improving the efficiency of machine learning algorithms ▪ Understanding the data, achieving knowledge about the procedure, and helping its visualization ▪ Decreasing the general data, limiting requirements, and saving and probably helping costs decrease ▪ Decreasing the features collection, saving the resources in the following period, and collecting data during the use ▪ Having the simplicity and capability of using simpler models and gaining speed To recognize a feature relevant to the issue, this definition was used so that one feature is relevant if it has information about the purpose.
The method of correlation-based selection feature was used in this study. In this method of feature selection, the subsets of features were considered good subsets, in which the features had a high correlation with the target feature on one hand, and they were uncorrelated on the other hand. The merit or being good of a subset of features was computed via the following relation in this study [32].
In this relationship, ̄ was the correlation mean value that was computed between the target feature and all the features in the data set. Further, ̄ was the oneto-one mean value of correlation computed among the features. Finally, the correlation-based method was formulated as follows [32]: In this relation, the variables of and were regarded as the correlation variables. Further, the correlation-based method was used to select the best features.

4. Segmentation by Fuzzy K-Means
This method was considered an exclusive and flat method in this study. Different forms have been defined for this algorithm; however, all of them had a repetitive procedure that tried to estimate the following items for a fixed number of clusters.
Gaining some points as the cluster centers. These points were actually those point means that belonged to each cluster.
Attributing each given data to a cluster where the data had the shortest distance to the center.
This method was used to reduce distortion [33].
In this relation, the N indicated the number of data points, and the m showed the fuzzy parameter which equaled 2. The cluster numbers were displayed as the K symbol that represented the square of Euclidean distance between selected pixels in the image with a clustering center.
should have regarded this limitation for the above relation according to this relation [33].
Reducing the Euclidean distance was the first priority of this study to segment the database images, considering that the purpose of Euclidean distance was the target function. Therefore, the distortion was reduced in the target function. The FKM algorithm started clustering by a collection of the primary centers in a way that these centers have been selected completely randomly, and none of the two or several clusters had the same cluster center. Afterward, the function components were updated to compute the new centers using the Euclidean distance. A group was made between those image pixels and the nearest center of the cluster after computing the new centers. Thus, a repetitive procedure was done. The new cluster centers changed their locations for each repetition until the cluster center was stable. Correspondingly, the fuzzy K-Means algorithm reduced the Euclidean distance between image pixels and cluster centers which were our target function. By minimizing the Euclidean distance, the distortion reached its lowest degree. Therefore, the distortions were reduced in the target function. In this technique, the function of the new membership was determined by gaining the value mean of the previous membership function. 2 www.kaggle.com/datasets/dschettler8845/brats-2021-task1 The K-Means algorithm worked in a way that it first, selected a set of primary clusters randomly and adjusted P=1. Afterward, the square of the Euclidean distance of was computed, and the membership function of was updated using mathematical relations [33].
In this mode, l j, if the <, and = 1 is adjusted, where the  is a positive and small number. In the next step, the new set of cluster centers was computed using the following equation [33].
Finally, ‖ − −1 ‖  is stopped for repeating j=1 to N, otherwise, p+1→p was adjusted, and the second stage was repeated.
The computation complexity for the third step was higher than the fourth step. In this algorithm, the ideal condition was provided, and the repetition stopped after 10 stages of repetition 4. RESULTS

1. Database
The purposive evaluation received from numerous and new methods of brain tumor image segmentation was more difficult. However, a widely accepted criterion was used for the automatic segmentation of brain tumors to develop the BRATS criteria. At the moment, purposive comparison of numerous methods of brain tumor segmentation was possible, using this common database. The BRATS database contains 274 MRI scans of glioma patients, which are divided into HGG and LGG levels, this version was segmented by an expert manually so that the proposed system function was evaluated by these scans. The image dimensions were decreased to 254*254 pixels to increase the processing speed. Some examples of the database are shown in Figure 3 2 .

2. Evaluation Criteria
In this section, the output data of deep learning was compared to the Figure 3. Some Examples of the Database Images [2] diagnostic data in society by specialist doctors, and finally, the efficiency of the proposed methods was validated. Ultimately, the function of the proposed brain tumor segmentation was evaluated by using various criteria, such as sensitivity and accuracy.
TN: Represented the number of records, of which the real cluster was negative, and classification algorithms recognized their cluster as negative properly.
TP: Represented the number of records, of which the real cluster was positive, and classification algorithms recognized their cluster as positive properly.
FP: Represented the number of records, of which the real cluster was negative, and classification algorithms recognized their cluster as positive by mistake.
FN: Represented the number of records, of which the real cluster was positive, and classification algorithms recognized their cluster as positive by mistake.
The ability to assess the sick and healthy cases from other cases was called accuracy. The following relation has illustrated this concept [33].
The accuracy criteria did not make difference between FN and FP. Thus, the precision criterion was defined to solve this problem.
The ability of one method to find sick cases, lesion areas, and cancer nuclei is called sensitivity. To compute the sensitivity of a test, the proportion of the true positive rate to the sum of the true positive rate and negative false should be computed which is been shown in the following relation [34].

3. The Output Results
In this section, the efficiency of the proposed method was compared to other methods that indicated effective parameter improvement in database image segmentation. The purpose of using the K-Means algorithm in the proposed method was to implement this algorithm easily and quickly. Considering the sensitivity of this algorithm to the primary cluster centers, it could produce a locally optimal response. This algorithm was one of the valid methods of clustering that performed clustering means based on the shortest distance of each data from a cluster center. Table 2 shows the implementation of segmenting lesion areas of brain tumors by various methods that depended on selecting features from the images. It was observed that the proposed method had more segmentation accuracy and precision compared to other methods. This was related to the method of high-level feature extraction, using CNN and the correlation-based feature selection among the feature.  Figures 4 and 5 report the increasing procedure of accuracy and Loss function minimization in two stages of training and testing. The purpose of using fuzzy logic in this study was to develop the classical set theories in mathematics. The elements' membership followed a zero pattern and a binary pattern. However, the theory of fuzzy  sets developed this concept and introduced graded membership. Therefore, one element could be a member of a set to some degree and not completely. This concept helped increase image segmentation accuracy and Loss function minimization. Figures 4 and 5 show the process of maximizing the accuracy of the proposed method and minimizing the loss pan. In this process, there is a period or epoch when the entire data set is transferred back and forth through the neural network only once. Since an era is too large to be entered into the system at once, we divide it into several smaller categories called epochs.
In this study, the fuzzy neural networks clusterer was used as the best separator, and training the network was based on using images segmented and indexed by the K-Means algorithm as the input in this network. Afterward, computing the white points of various brain areas, diagnosing the different brain areas, estimating the tumor area, and diagnosing the exact location of the brain tumor were done by fuzzy clustering. Therefore, the exact location of the tumor could be computed by extracting the best features from the image. In this study, it was tried to help the doctors' diagnosis via computer techniques and tools due to the high significance of diagnosing brain tumors in the later stages of treating the patient. Figures  6 and 7 illustrate the output of this research, showing the lesion area and the area of different tumor types in advanced mode.
In Figure 6, only the tumor and non-tumor area are specified. This figure shows the original image, the image diagnosed by the medical doctor, and the final output image segmented by the proposed method, which shows a more comprehensive and accurate diagnosis than the one specified by the medical doctor. Meanwhile in Figure 7, in addition to identifying the tumor area, different types of tumors are also identified.
In this research, convolutional neural network is trained in order to extract suitable features in database images. In the following, by defining the feature selection method based on correlation, a subset of features are created that have correlation with the target feature and are not correlated with each other. We consider this type of feature selection as the process of identifying related features and removing unrelated and repetitive features. The use of fuzzy logic enables a process-oriented view of the result along with the use of various conditions. Since fuzzy K-Means segmentation is important in this research from the point of view that in the images, we consider points as cluster centers, and the average points belong to the cluster. This increases the accuracy of segmentation. On the other hand, in this case, we assign each data sample that has the smallest distance to the cluster centers to that cluster, which increases the speed of segmentation. The advantage of this regularization method under the Gaussian criterion is to obtain suitable cluster centers, which reduces non-homogeneous interference and better segmentation.

CONCLUSION
In clinical practice, segmenting the area of a brain tumor in the image still depends on the human operators; nevertheless, manual segmentation is a time-consuming process, and its quality completely depends on the operator's experience. In this field, finding a complete automatic segmentation method is necessary to determine the brain tumor area in measuring the tumor exactly. Some progresses have recently been done in the semi-automatic and fully-automatic algorithms to segment brain tumor. However, there are main challenges for this process due to the many varieties of brain tumors in size, shape, location, and heterogenous appearance. The diagnosis speed presented in the method is much faster than the proposed methods in other studies that use low-level learning methods. In addition, the diagnosis method is performed by a person. This subject can be known as the result of using hierarchy learning of the proposed method that led to deep learning. Further, selecting features with high significance by the method of correlation-based feature selection and decreasing the size of the feature vector were other consequences. The modern world has made it possible to receive and store images digitally. Sometimes, in order to obtain better results, it is necessary to make changes for the purpose of processing, analyzing and understanding the image. In this context, using the science of mathematics and needs assessment in the field of medicine with the use of artificial intelligence, goals such as optimizing deep learning networks through a combined method, considering algorithms to minimize the variance of images with the aim of reducing the avoidable differences in terms of the fact that the network needs less data for training and focusing on optimal feature selection can be considered as a research approach for researchers.