Abstract
In this research, an improved automated medical prediction system, namely, the Neoplasm Medical Image Classification System (NMICS), is proposed. The proposed NMICS aims to robotically identify whether the given test magnetic resonance image (MRI) belongs to the tumor group or the non-tumor group using machine learning techniques. The proposed NMICS is divided into two stages, namely, the Train Medical Image Model (TMIM) and the Medical Image Prediction Stage (MIPS), respectively. In the TMIM stage, the NMICS performs various distinct operations including improving input medical image data set quality and consistency through standard arithmetic operations; extracting specific features (edge) from every individual medical image in the input medical image set using the CNN method; and separating the feature vector set of the input medical image set into two distinct clusters, namely, tumor and non-tumor, respectively, using the unsupervised k-means clustering technique. In the MIPS stage, the proposed (NMIC) system performs the same types of operations, including preprocessing and feature extraction, on the test medical image samples. Next, the NMICS maps and classifies the feature vector of the test medical image sample against trained medical image data set clusters using a KNN classifier. The investigation results show that the NMICS is well-suited to diagnosing whether the given medical image is grouped into the neoplasm category or the non-neoplasm group.
1. Introduction
Brain tumor detection is a crucial medical process, and it is expected to identify abnormal growths in the brain [1,2,3,4,5]. These growths, known as tumors, can be either benign or malignant and may impact normal brain functions. Detecting brain tumors early is essential for effective treatment. Various imaging techniques, such as MRI scans, play a vital role in identifying the presence, size, and location of tumors. Advanced technologies, including machine learning algorithms, are increasingly employed to enhance the accuracy and speed of detection. Symptoms of brain tumors can vary, ranging from headaches and nausea to changes in cognitive function. Early detection allows healthcare professionals to act quickly, which increases the chances of successful treatment and lowers the risk of complications [6,7,8,9].
The existing system for brain tumor detection employs machine learning techniques to analyze medical imaging data such as MRI scans. These algorithms are trained to identify abnormal patterns and anomalies within the brain, helping radiologists and clinicians to diagnose tumors with greater accuracy and efficiency. By leveraging features like image segmentation and classification, this technology aids in early detection, ultimately improving patient outcomes and reducing the burden on healthcare professionals. Detecting brain tumors is crucial for early intervention and treatment. In this paper, the combined approach allows for a robust analysis of brain MRI for tumor detection. CNNs efficiently capture complex image features, K-means clustering aids in segmentation, and K-NN facilitates precise pattern matching for accurate classification. Integrating these techniques provides a holistic solution, leveraging the strengths of each algorithm to enhance the accuracy and reliability of brain tumor detection in MRI.
2. Proposed NMICS
The proposed NMICS is designed to partition brain MRIs into two clusters through the dynamic identification of centroids using the K-means clustering algorithm. Additionally, it performs the classification of brain MRIs into tumor and non-tumor categories. This process involves multiple stages, including image preprocessing, edge feature extraction, clustering, and classification. The functional stages of the NMICS are visually depicted in Figure 1.
Figure 1.
Proposed (NMICS) System Architecture.
2.1. Data Collection Stage
A set of brain MRIs deployed in an NMICS is represented as ; for , , n, and where indicates the input of the medical image in the MRI deposit with n MRI, denotes the pixel element location of row and column in the MRI in input medical, is the size of the input medical image set , is describing the width of the image, and denotes the height of the input medical image in the input image repository.
2.2. Data Preprocessing Stage
Brain MRIs’ preprocessing involves several steps to enhance the quality of the images. Resizing ensures that you adjust the dimensions of the image while keeping the aspect ratio constant. This helps prevent distortion and ensures that structures in the brain are accurately represented. MRIs might have some level of random noise that can interfere with the interpretation of important features. Gaussian blur is a smoothing technique that helps reduce this noise.
2.2.1. Resizing
The MRIs undergo re-sizing using the aspect ratio preservation technique, ensuring that the original proportions of the images are maintained throughout the process. Aspect ratio preservation maintains the original proportions of the MRI. Re-sizing ensures uniformity in image dimensions. To represent the re-sizing process with aspect ratio preservation mathematically, let us denote the original dimensions of each brain MRI as (width) and (height) of the input image in the medical image set . The aspect ratio of width and height have been given below in Equations (1) and (2)
where is the aspect ratio of the i-th image width, is the aspect ratio of the image height, is the target width of the image, and is the target height of the image. Later resize width and height with the following equation:
where, is the resized width of the image and is the resized height of the image.
2.2.2. Noise Reduction
Gaussian blur is a common technique employed in preprocessing brain MRIs to reduce noise and enhance the clarity of structural information. Mathematically, the Gaussian blur operation involves convolving the image with a Gaussian kernel. The convolution of an image with a 2D Gaussian kernel is given by
where is the value of the Gaussian kernel at position where represents the row index; represents the column index; and is the standard deviation of the Gaussian distribution, controlling the amount of blur, and applying this kernel to the re-sized MRI to obtain a pre-processed MRI by
where is the resulting blurred image or pre-processed brain MRI, and is the set of re-sized MRI for for .
2.3. Feature Extraction Stage
In this stage, the proposed system is currently focused on extracting edge features from brain MRIs with the goal of identifying unique patterns that distinguish tumor regions from non-tumor areas using convolution neural network. In brain tumor detection using Convolutional Neural Networks (CNNs), feature extraction is a critical step. CNNs automatically learn relevant features from input images. In this context, the CNN layers identify distinctive patterns or structures in MRIs that are indicative of tumors. These features may include shapes, textures, or variations in intensity. The network then uses these learned features to classify regions of the image as tumor or non-tumor, making it a powerful tool for automating the detection process and improving diagnostic accuracy. Assuming a single convolutional layer with a filter (kernel) and bias term , the convolution operation for the image can be represented as .
where is the result of a convolution operation, denotes the pre-processed MRI, and is the filter weight at the position of . Subsequently, and are representing the dimensions of the filter. Afterward, the ReLU activation function is performed for the result of the convolution process and it is defined in Equation (8).
In the next step, assuming max pooling with a pooling window of size P × Q, apply the pooling operation for the image to extract the feature from the brain MRI as explained in the following mathematical Equations (7)–(9).
where, is the result of the max pooling operation at position (u,v), is the ReLU-activated value at position (u,v), and the max operation is taken over the pooling window. The set of MRIs, , after feature extraction and pooling, can be represented as . This notation signifies that consists of images obtained after applying the convolutional layer, ReLU activation, and max pooling to each image in X′. The output represents a set of images with extracted features and reduced spatial dimensions. The step-by-step process of feature extraction operation is presented in Algorithm 1.
| Algorithm 1: Feature Extraction |
Output: The set of images with extracted features. Begin
|
2.4. Training Stage
In this stage, the proposed NMICS is iteratively separating the brain MRI set into two clusters, such as (normal) and (tumor) using the k-means technique [10,11,12] based on the feature set of the MRI set, which is carried out at the previous stage through a CNN approach. Each image in is typically represented as a feature vector. Let us denote the feature vector of as for where is the number of features in the feature vector. The first step is to compute the Euclidean distance and between each image’s feature vector and the cluster centroids as (normal) and (tumor).
where and representing the Euclidean distance between a data point and the centroids (tumor) and (no tumor), respectively. During the training process, the image feature set of the input image set is divided into two distinct clusters, namely (normal) and (tumor). In the next step, the assignment of a data point to a cluster is determined by comparing the distances and between the data elements and the cluster centroids. If the distance to is less than or equal to the distance to , the data element is assigned to the cluster . Otherwise, it is assigned to the cluster . The steps involved in the training operation are described in Algorithm 2.
| Algorithm 2: Training Data Model using Clustering |
| Input: The set of images with extracted features. Output: The two distinct clusters (tumor) are obtained. Begin
|
2.5. Testing and Classification Stage
Classification of brain MRIs as tumor and no tumor typically involves using machine learning algorithms. In this context, (normal) and (tumor) clusters likely refer to distinct features or patterns associated with the classes. The algorithm analyzes patterns in the MRIs, using features from (normal) and (tumor) clusters to distinguish between tumor and non-tumor cases. This process aids in accurate classification based on the identified patterns in the images. KNN is used for classification, considering the Euclidean distances between the test sample’s feature vector and the centroids of the tumor and no-tumor clusters. T′ is the feature vector obtained from the CNN output for the test sample, representing the high-level features extracted from the brain MRI , the Euclidean distance between the feature vector T’ and the Centroid of the tumor cluster in Equation (15), is the Euclidean distance between the feature vector and the centroid of the no tumor cluster in Equation (16). The steps involved in the KNN classifier are illustrated in Algorithm 3.
| Algorithm 3: Classification |
| Input: Trained data set with two clusters and feature vector of test sample features Output: KNN classification result either tum as tumor or no tumor. Begin
|
3. Results and Discussion
For demonstration purposes, we have randomly selected a few images from the Kaggle MRI data set [13], and the sample medical pictures are presented in Figure 2. Figure 3 shows that the preprocessing result of the input sample medical image set is illustrated in Figure 2. The proposed NMICS and its preprocessing methods have been described in Section 2.2. The feature extraction results of the pre-processed input MRI set are presented in Figure 4. It is clearly shown in Figure 4 that the proposed NMICS extracts edge features from all MRI samples through the CNN method, which has been discussed in the Algorithm 1 at Section 2.3. Subsequently, in the training stage, the NMICS iteratively separates the MRI sample set into two (K = 2) distinct clusters, namely (normal) and (tumor), based on the feature set of the MRI sample set in Figure 4 through the k-means clustering technique, and the results have been presented in Figure 5. The classification results of the NMICS with different test MRI samples have been presented in Table 1, which is discussed in Algorithm 3 at Section 2.5.
Figure 2.
Input MRI samples with different sizes.
Figure 3.
Result of pre-processed stage over the input MRI samples in Figure 2.
Figure 4.
Result of feature extraction (edge detection) operation conducted on the improved MRI set in Figure 3.
Figure 5.
Training result of the input MRI set in Figure 3.
Table 1.
Classification results of sample MRI tested by proposed NMICS System.
4. Conclusions
In this paper, an improved automated medical prediction system, namely, the Neoplasm Medical Image Classification System (NMICS), is presented, and it is intended to instinctively classify the test medical image into either the tumor group or the non-tumor (normal) group, respectively, through machine learning techniques. The NMICS is divided into two stages, including the Train Medical Image Model (TMIM) and Medical Image Prediction Stage (MIPS). In the TMIM stage, the NMICS separates the input MRI set into two distinct clusters based on the feature set of the MRI set through the k-means technique, and also performs the essential operations before the training process, including preprocessing and feature extraction. In the MIPS, the NMICS performs the same types of operations over the test medical image samples, which are then followed by the TMIM stage, excluding the training operation. Following, the NMICS classifies the feature vector of the test medical image sample with trained medical image data set clusters using a KNN classifier. The investigation outcomes demonstrate that the NMICS is fit to categorize the given test sample of MRI into the neoplasm or non-neoplasm group.
Author Contributions
Conceptualization, S.K.S.; methodology, S.K.S.; software, S.K.S.; formal analysis, S.K.S. and B.K.; investigation, S.K.S.; resources, M.C.R. and S.T.A.; writing—original draft preparation, S.K.S.; writing—review and editing, S.K.S. and S.T.A.; visualization, S.K.S.; supervision, B.K.; project administration, S.K.S. and B.K. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding.
Data Availability Statement
Publicly available datasets were analyzed in this study. This data set is accessed on 10 August 2025 and it can be found here: https://www.kaggle.com/datasets/masoudnickparvar/brain-tumor-mri-dataset?select=Testing.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Guy-Fernand, K.N.; Zhao, J.J.; Sabuni, F.M.; Wang, J. Classification of Brain Tumor Leveraging Goal-Driven Visual Attention with the Support of Transfer Learning. In Proceedings of the Information Communication Technologies Conference, Kigali, Rwanda, 6–8 May 2020; pp. 328–332. [Google Scholar]
- Jayade, S.; Ingole, D.T.; Ingole, M.D. Review of Brain Tumor Detection Concept using MRI Images. In Proceedings of the International Conference on Innovative Trends and Advances in Engineering and Technology, Shegoaon, India, 27–28 December 2019; pp. 206–209. [Google Scholar]
- Patil, D.O.; Hamde, S.T. Monogenic Wavelet Phase Encoded Descriptors for Brain Tumor Image Detection. In Proceedings of the IEEE Third International Conference on Multimedia Processing, Communication & Information Technology, Shivamogga, India, 11–12 December 2020; pp. 40–44. [Google Scholar]
- Gouskir, M.; Zyad, M.A.; Boutalline, M. Automatic Analysis of Brain Tumor from Magnetic Resonance Images based on Geometric Median Shift. In Proceedings of the 2nd International Conference on Knowledge-Based Engineering and Innovation, Beni Mellal, Morocco, 20–21 April 2020; Volume 8, pp. 11–17. [Google Scholar]
- Grampurohit, S.; Shalavadi, V.; Dhotargavi, V.R.; Kudari, M. Brain Tumor Detection Using Deep Learning Models. In Proceedings of the IEEE India Council International Subsections Conference, Visakhapatnam, India, 3–4 October 2020; pp. 129–134. [Google Scholar]
- Kabir, A.; Gyorfi, A.; Kovacs, L.; Szilagyi, L.O. Early-Stage Brain Tumor Detection on MRI Image Using a Hybrid Technique. In Proceedings of the IEEE Region 10 Symposium, Dhaka, Bangladesh, 5–7 June 2020; pp. 1828–1831. [Google Scholar]
- Gyorfi, A.; Sudirman, R.; Wei, S.T.C. A feature ranking and selection algorithm for brain tumor segmentation in multi spectral magnetic resonance image data. In Proceedings of the 2019 41st Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Berlin, Germany, 23–27 July 2019; pp. 804–807. [Google Scholar]
- Chew, K.M.; Yong, C.Y.; Sudirman, R.; Wei, S.T.C. Human Brain Modeling Tumor Detection in 2D and 3D Representation Using Microwave Signal Analysis. In Proceedings of the 2018 IEEE Symposium on Computer Applications & Industrial Electronics (ISCAIE), Penang, Malaysia, 28–29 April 2018; pp. 310–316. [Google Scholar]
- Polly, F.P.; Aziz, A.I.; Rana, M.; Islam, A.; Inum, R. Detection and Classification of HGG and LGG Brain Tumor Using Machine Learning, Expert Systems with Applications. In Proceedings of the 2018 International Conference on Information Networking (ICOIN), Chiang Mai, Thailand, 10–12 January 2018; pp. 813–817. [Google Scholar]
- Kumar, S.; Ahmed, S.T.; Sandeep, S.; Madheswaran, M.; Basha, S.M. Unstructured Oncological Image Cluster Identification Using Improved Unsupervised Clustering Techniques. Comput. Mater. Contin. 2022, 72, 281–298. [Google Scholar] [CrossRef] [Scilit]
- Sreedhar Kumar, S.; Ahmed, S.T.; Fathima, A.S.; Mathivanan, S.K.; Jayagopal, P.; Saif, A.; Gupta, S.K.; Sinha, G. iLIAC: An approach of identifying dissimilar groups on unstructured numerical image dataset using improved agglomerative clustering technique. Multimed. Tools Appl. 2024, 83, 86359–86381. [Google Scholar]
- Ahmed, S.T.; Kumar, S.; Guptha, N.S.; Basha, S.M.; Fathima, A.S. Improving medical image pixel quality using micq unsupervised machine learning technique. Malays. J. Comput. Sci. 2022, 2022, 53–64. [Google Scholar] [CrossRef] [Scilit]
- (Msoud Nickparvar). Available online: https://www.kaggle.com/datasets/masoudnickparvar/brain-tumor-mri-dataset (accessed on 10 August 2025).
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. |
© 2026 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.
























