Abstract
Stroke is a type of cerebrovascular disorder that has a significant impact on people’s lives and well-being. Quantitative investigation of MRI imaging of the brain plays a critical role in analyzing and identifying therapy for stroke. A block primarily provokes stroke in the brain’s blood supply. Deep learning algorithms can be used to identify strokes in patients in a short period. Proposed deep learning methods are used to classify strokes using magnetic resonance imaging (MRI) images. Early detection enhances treatment opportunities and saves lives, which is the primary motivation of the proposed work. Deep learning methods have emerged as significant research trends in recent years, particularly for classifying different types of stroke such as ischemic and hemorrhagic stroke. A dataset of 13,850 MRI images of stroke patients was collected from various reliable sources, including Madras scans and labs, Radiopaedia, Kaggle datasets, and online databases. Among these images, 7,810 were identified as cases of ischemic stroke, while 6,040 represented hemorrhagic strokes. For training purposes, a total of 9,700 images were used, with 4,150 images employed for testing. A comparative analysis of ANN, SVM, NB, ELM, KNN and Enhanced CNN technique is carried out, and 98.4% of classification accuracy is obtained by using Enhanced CNN. Statistical analysis of parameters such as accuracy, precision, F1-score, and recall was conducted, demonstrating that the Enhanced CNN method outperformed SVM, NB,ELM, KNN and ANN classifiers. The Enhanced CNN method achieved an accuracy of 0.984, precision of 0.949, recall of 0.972, and an F1-score of 0.960 on the training dataset, which is significantly higher than the other classifiers. Furthermore, the Enhanced CNN algorithm’s ability to automatically learn features and efficiently process large datasets enhances its potential as a powerful tool for accurately classifying stroke lesions.
Introduction
Peripheral and central neurological disorders are thought to affect up to a billion people worldwide. Brain tumours, Alzheimer’s disease (AD), dementia, epilepsy, neuroinfectious, traumatic, multiple sclerosis (MS), brain injuries and Parkinson’s disease (PD) are examples of these disorders [1]. Pertaining to the World Health Organization (WHO), the second and fifth leading causes of death are ischemic stroke and Alzheimer’s disorder. Biomedical images provide critical information for the prognosis, treatment and diagnosis of various pathologies. Neuroimaging is one of the most important imaging modalities for studying the brain. Brain MRI image evaluation is useful for a variety of process including lesion segmentation, lesion identification, brain parcellation and tissue segmentation in neonates, infants, and adults. Because it is less susceptible to image artefacts than CT, MRI is recurrently used for visual investigation of the nervous system, posterior fossa anomalies, and spinal cord disorders [2].
When there is a chronic swelling that originate damage and destruction of myelin layer and complicates neurological propagation, white matter hyperintensities (WMH) are recognized as demyelinating–, and categorization of WMH is frequently associated with multiple sclerosis (MS) [3]. Stroke is the most common single-organ disease, claiming the lives of 6.2 million people worldwide each year. A stroke occurs at a rapid rate after the age of 65, so advanced countries with aging populations are gradually bearing a greater social burden as a result of the stroke. Furthermore, because this disease is more likely to strike people in their 30 s and 40 s, it affects people of all ages and is considered extremely dangerous.
Stroke is classified as either an ischemic stroke (when an artery in the brain develops block) or a cerebral haemorrhage (when an artery in the brain bursts) [4]. A stroke happens when blood discharge to a distinct region of the brain is interrupted. Pertaining to the Banford clinical classification system, Ischemic strokes are classified into three types: (1) Partial anterior circulation syndrome (PACS) affects the mid cerebral areas; (2) Lacunar syndrome (LACS) affects the passage that supply blood to the intense location of the brain and (3) Total anterior circulation stroke (TACS) affects the mid of cerebral locations because of an enormous brain stroke [5]. It is a widely known cerebrovascular disorder that is a major reason for death and functional limitations in low to middle-income countries. In developed nations, disorder of ischemia is primarily dependable for 75–80% of strokes, with hemorrhagic brain stroke reporting for 10–15% . Figure 1(a) & (b) shows normal brain image and ischemic & hemorrhagic stroke image taken as an exemplar.

a. Normal Brain image b. Ischemic Stroke image and c. Hemorrhagic Stroke image.
Clinical decisions based on MRI are frequently utilized to detect, identify, classify, and diagnose stroke. With MRI, the existence of small infarcts is very feasible to discover and evaluate the appearance of a stroke in the external and penetrating brain areas with greater accuracy. It is because the stroke area is tiny and easily detectable in MRI images when certainly compared to CT images.
Recently, machine learning (ML) and deep learning (DL) has significant research to develop semiautomatic or fully-automatic systems where techniques or algorithms for detecting disabilities in the brain like tumours, stroke, MS, AD, glioma and so on were inefficient. Several studies have demonstrated that deep learning techniques could be auspiciously employed for medical image segmentation, retrieval, diagnosis, classification and disorder detection. However, quite enough work remains to be performed in order to achieve accurate techniques that produce results comparative to those of experts.
Deep learning algorithms referred to the multi-layer task of neural network generation. Thermal characteristics are derived from a particular range of inputs. Because of their ability to learn for themselves, the most familiar methods in machine learning extract a complex hierarchical order of features from images as opposed to the manually extracted features in traditional DL algorithms. The data for MRI scan training will be quantifiable, with exceptional effectiveness and generalization. The continuous rotating moment and processing of the MRI has enabled the state-of-the-art DL techniques to modify the performance.
This equipped the process of training a large number of images using deep learning techniques, as well as image variation reliability. The MRI scan segments and controls are created in a variety of trials and formations. To generate deep learning controls, all machining applications must be used. CNN techniques were used in the setup of micro scanning machines. The strong signal process was applied to all developed contents and process developments. Geometric structures were created using image processing techniques.
The fundamental components and frameworks of scanned elements were developed by auto-generation code. All of the machine learning code improves performance and stages by utilizing previously developed processing techniques. The features of neural networks were derived by Convolution Neural Network. It generates a protocol for operating on CNN input and signals carrying symmetrical description, visual cortex area performs with independent cortical neurons from the monitoring and do not transmit CNN with feeble signals. CNN nodes are associated, but they really do not reflect fully-featured correlation in a spatial arrangement. Some of the nodes are orderly arranged in the image analysis input layer in order to generate part of the spectrum variations for identifying shapes and elements. All the corresponding frameworks and images (kernel) are deduced. Kernel signals were used to transfer the image to MIR outputs. Excluding computational methodology from CNN algorithms should be the first step toward eliminating human intervention in system selection or design.
The proposed method consists of three main stages. The stages are pre-processing of abnormal cerebral images from MRI, segmentation of Cerebral ischemic and hemorrhagic region and classification of stroke as Ischemic and Hemorrhagic stroke. Pre-processing was implemented using the alpha trimmed mean filter and in the segmentation stage the exact location of the lesion was successfully determined using the Hybrid algorithm and in this article we are focusing on classification of segmented images as Ischemic and Hemorrhagic stroke images by comparing ANN, SVM, NB and enhanced CNN.
The organization of this article is arranged as follows: Section I contains the detailed introduction of brain stroke. Section II explains the literature survey of the previous techniques. Section III describes the materials and methods of the investigations. Section IV depicts the results and discussion. Finally, Section V concludes the research work.
Tyan, Yeu-Sheng, et al (2014), [6] the author proposed a technique for computer-aided tool control and parameter level checking. The coding concepts were generated by all of the stroke identification and scan techniques. The better conceptual stages and ceramal structures are generated by CT scan performed areas. All of the identical prerequisites and errors are successfully recognized. It predicts the radiology methods and procedures for tracking suction rates and duration. The performances of thermal behaviour structures and algorithms are corrected using CT scan images. Image detection identified stroke regions and increased radiology ratios. All of the increased ratios are to keep the stroke behaviours and signals proceeding. The potential signals and structures are carried by all waveforms. The imaging structures were determined by the structures and shapes with the lowest frequency. In order to identify abnormal regions in brain images, an unsupervised region growing algorithm was employed to segment the area corresponding to brain tissue. A comprehensive evaluation of the system was conducted using 90 computed tomography (CT) images obtained from a sample of 26 patients. The system’s performance in detecting stroke regions exhibited a sensitivity of 83% which should be improved.
Endang Purnama Giri et al (2016), [7] the author suggested that deep learning methodology along with CNN is utilized to prove the most effectiveness of the technique for distinguishing EEG data control from EEG stroke data. This study was used in early batch normalization model to shorten the training cycle of a classification process. The 1DCNN leave-one-out state had a less accuracy of 0.86 on average (F-Score of 0.861). Only 200 epochs were completed, and signals took the time of 24 different handcrafted signals. The schematic arrangements and processes have been developed using two EOG and two EEG channels. In order to convey the signal process, ECG is a very powerful signal process methodology. It evolved as a result of the CNN tool technology process. The 1DCNN tool technology is used to calculate all identifications and stroke lengths. The data set consists of only 62 people. The current dataset is relatively small, leading to decreased accuracy in the analysis. Efforts should be made to improve accuracy.
Dou et al. (2016), [8] the authors utilized 3D CNN to recognize cerebral hemorrhage (CMBS) from MRI photographs. This allows them to extract more additional features. When compared to manual feature extraction and 2D CNN, 3D CNN detects with 93.16 percent accuracy. There are different kinds of CNN models for identifying various types of diseases. Thus, the instantaneous growth of deep learning has opened up new opportunities in the area of medicine. Lesion recognition is another significant application of deep learning (DL) in processing medical images. It can actually prospect beneficial information obtained from training data and enhance medical diagnosis accuracy and speed. The data set consists of 325 MRI scans. Expanding the dataset, conducting comparative analyses, getting improved accuracy and exploring the applicability of the proposed approach to other diseases would contribute to a more robust and comprehensive understanding of deep learning techniques in medical image processing.
T. Kooi et al (2017), [9] in this paper a state-of-the-art mammography CAD system is compared with Convolutional Neural Network (CNN) to process the mammogram images. Both the methods are given training on a large dataset (45000 images) and the outcome indicates that the CNN model performs better than the CAD system. The CNN model achieves high sensitivity and specificity. The investigation is based on features like location, patient information, as well as commonly used manual elements that can always satisfy the network. Comparison of CNN with other methods could have been implemented for better results.
Chen-Ying Hung et al. (2017), [10] explores the potential of utilizing machine learning techniques, particularly deep neural network (DNN) and gradient boosting decision tree (GBDT), on a large-scale electronic medical claims (EMCs) dataset for predicting the occurrence of stroke. The results demonstrate promising outcomes, with both DNN and GBDT achieving high prediction accuracies and an encouraging area under the curve (AUC) of 92% . Interestingly, DNN performs well even with lesser amounts of training data compared to GBDT. This approach offers several advantages, including consistent and accurate results, rapid reporting of predictions, and the flexibility to adjust sensitivity and specificity to meet clinical requirements. Additionally, the study highlights that DNN and GBDT outperform logistic regression (LR) and support vector machine (SVM) algorithms in terms of predictive performance and stability. This superiority is attributed to the nonlinear modeling capabilities of DNN and GBDT, which can effectively capture implicit correlations among features in the EMCs dataset. The accuracy and reliability of predictions heavily rely on the quality and representativeness of the EMC dataset. Issues such as missing data, data inconsistencies, and potential biases within the dataset can affect the robustness of the models and their generalizability to real-world scenarios. Also, more comprehensive comparative analysis that includes a wider range of machine learning algorithms would provide a clearer understanding of the relative performance of different techniques in predicting stroke occurrence using EMCs.
Arooj Ahmed Qureshi et al (2018), [11] the author suggested a multi-domain study of EEG brain signals is used to detect ischemic strokes using wearable EEG devices and machine learning. The authors discovered that Bootstrap (Extra-Tree and Decision-Tree) and Multi-Layered Perceptron (MLP) technique achieve 95% accuracy with 0.85 ROC curve utilizing 40 safe and 40 unsafe patient results. While the results are promising, the relatively small sample size may limit the generalizability and robustness of the findings. While the study proposes a method for ischemic stroke detection using wearable EEG devices, the practical implementation and integration of such devices into clinical settings may present challenges. Issues related to device usability, patient compliance, and real-time monitoring need to be addressed for successful implementation.
Weicheng Kuoa et al. (2019), [12] the authors the researchers trained a fully convolutional neural network using a dataset of 4,396 head CT scans from the University of California at San Francisco and affiliated hospitals. They compared the algorithm’s performance to that of four American Board of Radiology (ABR) certified radiologists using an independent test set of 200 randomly selected head CT scans. The algorithm achieved the highest accuracy reported thus far for this clinical application, with a receiver operating characteristic (ROC) area under the curve (AUC) of 0.991±0.006 for identifying examinations positive for acute intracranial hemorrhage. Furthermore, the algorithm outperformed two out of the four radiologists in terms of performance. The study’s findings are based on a specific dataset from a particular institution, which may limit the generalizability of the algorithm’s performance to other settings and populations. Analysis of MRI images might be included.
Weicheng Kuo et al. (2019), [13] conducted a study focusing on the detection and segmentation of acute intracranial hemorrhage in head computed tomography (CT) scans. They proposed a solution that addresses both tasks as a semantic segmentation problem using a patch-based fully convolutional network (PatchFCN). This approach enables accurate localization of hemorrhages while simplifying the complexity associated with object detection. The system developed by the authors achieved competitive performance, comparable to a human expert and the current state-of-the-art, in classification tasks (with 0.976 and 0.966 AUC of ROC on retrospective and prospective test sets) as well as in segmentation tasks (with 0.785 pixel average precision and 0.766 Dice score). Notably, the system achieved these results using a smaller dataset and a simpler system compared to existing approaches. CT scans can be affected by various factors, such as noise, artifacts, and variability in imaging protocols. These variations can impact the accuracy of hemorrhage detection and segmentation, and addressing them is crucial for reliable and robust performance.
The application of enhanced CNN techniques can help mitigate the limitations observed in previous studies by addressing issues such as dataset size, generalizability, interpretability, performance comparison, practical implementation, robustness, and bias. These enhancements would contribute to the development of more reliable and applicable models for medical image processing and prediction tasks.
Materials and methods
Data pre-processing and augmentation
In medical imaging, MRI images often suffer from contrast degradation and noise due to various sources of interference. Image enhancement algorithms play a crucial role in improving image quality and aiding in diagnosis. Preprocessing of medical images is a fundamental step that involves several techniques to enhance image quality, remove noise and artifacts, correct distortions, and prepare the images for further analysis [14]. Common preprocessing operations include image scaling, grayscale conversion, image filtering, and sharpening, which are applied before subsequent steps such as segmentation, feature extraction, and classification. Additionally, augmentation algorithms can be applied to further enhance the data in preprocessed images [15].
Classifiers
SVM
Support Vector Machines (SVM) is a powerful classifier widely used in brain stroke classification due to its ability to handle high-dimensional data. It constructs a hyperplane to separate different stroke patterns, but its performance may be affected by the selection of optimal parameters and the imbalance of the dataset [16].
NB
Naive Bayes (NB) classifier is a probabilistic algorithm commonly used for brain stroke classification. It assumes independence between features and calculates the posterior probability of each class. NB is computationally efficient and requires less training data, but it may oversimplify the relationships among features [17].
ANN
Artificial Neural Networks (ANN) have shown promise in classifying brain strokes by learning complex patterns from a large amount of training data. ANN models, such as deep neural networks, can capture intricate relationships between input features but require careful design, extensive training, and proper regularization to avoid overfitting [18].
KNN
k-Nearest Neighbors (KNN) is a non-parametric algorithm used for brain stroke classification by assigning new data points to the most common class among their k nearest neighbors. KNN is simple to implement and does not require training, but it can be sensitive to the choice of k and is computationally expensive for large datasets [19].
ELM
Extreme Learning Machines (ELM) are a type of feedforward neural network with randomly generated hidden layer weights. ELMs have been applied to brain stroke classification tasks, demonstrating fast training speed and good generalization performance. However, selecting appropriate hidden layer sizes and addressing overfitting challenges remain important considerations [20].
Enhanced CNN
Enhanced Convolutional Neural Networks (CNN) incorporate advanced techniques like data augmentation, transfer learning, and regularization to improve brain stroke classification. These methods can enhance the performance of CNN models by addressing limited training data, mitigating overfitting, and leveraging pre-trained models for feature extraction, leading to more accurate stroke classification results.
Ischemic stroke
An ischemic stroke is one of the most familiar kinds of stroke. It happens when the blood vessels in the brain narrow or block, resulting in hardly decreased blood discharge (ischemia). Fatty deposits that gather in blood vessels as blood clumps or different debris that transit through the lodge and bloodstream cause blocked or narrowed blood vessels. Ischemic stroke occurs when a blood clump known as plaque obstructs an artery supplying blood to the brain. This blockage can transpire in the skull or neck. Clots form in the heart and transit through the circulatory system most of the time. A clot can disperse on its own or become lodged in the body. When a brain artery becomes obstructed, the brain receives insufficient oxygen and blood, then the cells start to perish. An ischemic stroke occurs when plaque splits off from an artery and traverses to the brain. Plaques can even develop in the arteries which supply blood to the brain, restricting them to the pinpoint where an ischemic stroke happens [21]. This is most commonly caused by a heart attack, but it can even be generated by other disorders or possibilities, such as carbon monoxide poisoning. Figure 2 depicts the structure of an image of affected ischemic stroke.

Ischemic Stroke image.
A hemorrhagic stroke takes place when the blood from an artery triggers bleeding inside the brain as a result of a blood vessel explosion. The bleeding forces pressure on the enclosed brain cells, causing them to be damaged [22]. The damaged area loses its ability to function properly. This can result in neurological symptoms and is potentially fatal. The pressure of the blood on the brain cells causes them to be damaged. This may result in neurological symptoms. Hemorrhagic strokes are classified into several types. The most common type is an intracerebral haemorrhage. Inside the brain, bleeding occurs in this type. A subarachnoid haemorrhage serves as the foundation for bleeding among the brain and the membranes [23]. Figure 3 depicts the structure of the affected hemorrhagic stroke image.

Hemorrhagic stroke image.
A stroke happens when an artery leading to the brain becomes blocked or ruptured, resulting in the death of a section of brain tissue due to a lack of supply of blood(cerebral infarction) and the onset of symptoms. However, there is no accurate technique has been discovered. Hence, an enhanced approach is used to precisely identify the cerebral infarction region.
The proposed method for classifying brain strokes consists of three main stages: preprocessing abnormal cerebral images from MRI, segmenting cerebral and hemorrhagic regions, and classifying the stroke type as Ischemic or Hemorrhagic and the work flow diagram is shown in Fig. 4.

Proposed Brain Stroke Classification.
In the first stage, preprocessing plays a crucial role in improving the visual quality of the images to ensure accurate results in subsequent analysis. Various image processing techniques are applied, including scaling, resizing, grayscale conversion, denoising, and image normalization. These techniques aim to enhance the images and prepare them for further analysis. Denoising is particularly important when dealing with cerebral ischemic and hemorrhagic images. Different filters such as mean, median, adaptive median, weighted median, Wiener filter, bilateral filters, and alpha-trimmed mean filter are used to reduce noise. Among these filters, the alpha-trimmed mean filter has shown better performance in terms of lower Mean Squared Error (MSE) and higher Peak Signal-to-Noise Ratio (PSNR), making it a suitable choice for denoising brain-stroke images. This filter effectively preserves the edges and details of the image while removing noise [24].
After preprocessing, the next stage is segmentation, which involves isolating and extracting the region of interest (ROI) from the image. Image segmentation is a critical step in image analysis as it divides the image into meaningful regions, distinguishing between the target region and the background. To achieve efficient segmentation, an enhanced hybrid algorithm is proposed. This algorithm combines multiple techniques, including the K-means algorithm, contextual clustering, and Particle Swarm Optimization (PSO). The K-means algorithm is initially used for segmentation, and then the contextual clustering algorithm refines the initial segmentation by incorporating neighboring pixel information. Finally, the PSO algorithm optimizes the segmentation results by adjusting the segmentation parameters. The proposed hybrid algorithm has been evaluated on various abnormal MRI images, and performance measures such as mean, standard deviation, contrast, stroke area, pixel count, and correlation have been measured. The results demonstrate that the hybrid algorithm outperforms existing algorithms like K-means and contextual clustering in detecting ischemic and hemorrhagic lesions accurately [25].
In the last stage, the segmented images are input into a classification model to classify the type of stroke. Classifying strokes accurately and efficiently is a challenging task. Convolutional Neural Networks (CNNs) have emerged as powerful tools for image classification, surpassing traditional algorithms like Artificial Neural Networks (ANN), Support Vector Machines (SVM), Naive Bayes (NB), Extreme Learning Machines (ELM), and K-Nearest Neighbors (KNN). Enhanced CNNs have been developed by incorporating additional layers, such as pooling and normalization layers, to reduce overfitting and improve the model’s generalization performance. These enhanced CNNs have shown superior performance compared to other classifiers in stroke classification tasks. Statistical analysis of parameters like accuracy, precision, F1 score, and recall further supports the effectiveness of enhanced CNNs in stroke classification. This advancement in classification techniques holds significant clinical implications for stroke diagnosis and treatment.
A dataset of 13850 MRI images of stroke patients was collected from various reliable sources, including Madras scans and labs, Radiopaedia, and Kaggle datasets. Among these images, 7810 were identified as cases of ischemic stroke, while 6040 represented hemorrhagic strokes. For analysis purposes, a single slice with a clear visibility of the stroke lesion was selected from each patient, even though multiple slices were available. For training purposes, a total of 9700 images were employed, while 4150 images were utilized for testing.
The images of cerebral ischemic and cerebral hemorrhages are filtered using an Alpha trimmed mean filter. To enhance the images, a variety of image processing techniques are used, including scaling, grayscale conversion, histogram stretching, histogram equalization, and image sharpening. When processing an image, image noise is a crucial component that has been successfully eliminated using an alpha-trimmed mean filter. Image normalization techniques like histogram stretching, histogram equalization is performed to increase the contrast of the image and Image Sharpening is performed over the image to highlight the fine details and edges in the image Applied various filters to the input image and its PSNR and MSE values are determined.
The performance evaluation of the proposed Alpha-trimmed mean filter involves calculating the average values of Peak Signal-to-Noise Ratio (PSNR) and Mean Squared Error (MSE) for each input class in various databases. The summarized results of these average values are presented in Tables 1 2. It is evident from the results in these tables that the Alpha-trimmed mean filter consistently outperforms other filters, as it consistently achieves higher PSNR values and lower MSE values across all image categories considered in the study. These findings confirm that the proposed Alpha-trimmed mean filter effectively enhances the quality of the images, as demonstrated by the significant improvements in PSNR and MSE metrics.
Average MSE of normal, Ischemic and Hemorrhagic MRI brain image (Images from Madras scan and online)
Average MSE of normal, Ischemic and Hemorrhagic MRI brain image (Images from Madras scan and online)
Average PSNR of normal, Ischemic and Hemorrhagic MRI brain image (Images from Madras scan and online)
Image segmentation is used to split the image into meaningful regions. It is used to distinguish between the region to explore and the region in the background. To segment an image more efficiently, an enhanced hybrid algorithm is performed by combining multiple algorithms together. The hybrid algorithm includes K-means algorithm, Contextual clustering and Particle Swarm Optimization (PSO). The lesion recognized is assessed by performance measures such as mean, standard deviation, contrast, tumor area, pixel count and correlation. The segmentation of the affected brain area with a hybrid combination of K-Means, Contextual clustering and PSO was performed with effective results on a variety of abnormal MRI images. This advanced hybrid algorithm provides a better result compared to existing algorithms such as K-means and a contextual clustering method in detecting ischemic and hemorrhage lesions.
MSN, MSA indicates the normal and abnormal images from the Madras scan systems respectively. ITN and ITA represents normal and abnormal images obtained from online.
In Fig. 5, a series of image processing steps are demonstrated on an MRI scan to identify regions of interest associated with the ischemic condition. The initial input image (Fig. 5(a)) is an MRI scan labeled as “MSA0010” from the Madras scan database. The grayscale representation of the original MRI scan image is shown in Fig. 5(b), where different shades of gray depict brain structures and tissue intensity variations. To reduce noise while preserving the overall structure, an alpha trimmed mean filter is applied to the grayscale image, resulting in the image shown in Fig. 5(c).Skull stripping, depicted in Fig. 5(d), involves removing the skull and non-brain tissues from the original MRI scan. This process isolates and emphasizes the brain regions of interest. The subsequent step involves applying a morphological opening operation to the skull-stripped image, resulting in the morphological opened image shown in Fig. 5(e). This operation helps eliminate small objects or noise while preserving larger structures through erosion and dilation of the image.

(a) Ischemic MRI image named MSA0010 of Madras scan database input image (b) Gray scale Image (c) Alpha trimmed mean filter image (d) Skull stripped image (e) Morphological opened image (f) Segmentation with multiple iteration image (g) Non region of interest image (h) Region of interest image.
Figure 5(f) displays the result of the segmentation process applied to the morphological opened image. Segmentation partitions the image into distinct regions based on certain characteristics or features. Multiple iterations refine the boundaries and separate specific regions of interest. On the other hand, Fig. 5(g) highlights areas of the original MRI scan that are not considered regions of interest for the specific analysis or study. Finally, Fig. 5(h) focuses on the specific regions of interest within the original MRI scan that correspond to the affected or relevant areas in the context of the studied ischemic condition. These processed images and segmentation results aid in the identification and visualization of the regions of interest related to ischemia, enabling further analysis and investigation.
Table 3 shows the segmentation results of ischemic images, hemorrhagic images and normal images of three algorithms namely kmeans, contextual clustering and proposed hybrid method. From the segmentation results, it is determined that when compared to traditional methods like K-means and contextual clustering algorithms, the proposed hybrid algorithm demonstrates superior performance in segmenting the ischemic and hemorrhagic stroke lesion. Abnormalities are properly segmented by proposed hybrid method. Also for normal images, no abnormality is detected in hybrid method. Whereas few abnormalities are detected in k-means and contextual clustering algorithm.
Comparison of segmentation results
Table 4 presents a comparison of various parameters for ischemic stroke images obtained from two sources: Madras scan systems and an online database. It includes the results obtained by applying K-means Clustering, Contextual Clustering, and a Proposed Hybrid Method to MRI ischemic images from three patients: MSA0010, ITA0024, and MSA0055. The parameters were analyzed, and the results indicate that the Proposed Hybrid Method outperforms both K-means and Contextual Clustering algorithms in several aspects. Specifically, it demonstrates better performance in terms of stroke area, pixel count, mean, standard deviation, contrast, and correlation. These parameters provide valuable insights into the characteristics of ischemic strokes. The stroke area and pixel count reflect the size and extent of the stroke, while the mean represents the average pixel intensity value in the image. The standard deviation measures the dispersion or spread of pixel intensities, giving an indication of the variability in the image. Furthermore, contrast quantifies the difference in pixel intensity between neighboring pixels, highlighting the boundaries and details within the stroke. The correlation parameter measures the linear relationship between pixel intensities, enabling a better understanding of the structure and organization of the stroke.
Comparison of few parameters for Ischemic stroke images obtained from Madras scan systems and online database using K-Means, Contextual Clustering and Proposed Hybrid Method
These findings demonstrate the efficacy of the Proposed Hybrid Method in accurately identifying normal brain MRI images by effectively distinguishing them from abnormal cases. The higher correlation and contrast values in the Proposed Hybrid Method further support its ability to accurately represent the distinct characteristics of normal brain images.
Deep learning algorithms can be used to identify strokes in a short span of time. The proposed deep learning methods are used to classify strokes using magnetic resonance imaging. Early detection improves the chances of treatment and saves lives, which is the main motivation for the proposed project. Deep learning methods are research techniques that have emerged in recent years and have been used to differentiate between two different types of strokes, such as ischemic and hemorrhagic stroke.
The workflow diagram in Fig. 6 illustrates the process of the Enhanced CNN classifier. The initial step involves collecting a dataset of brain MRI images for training. These images undergo preprocessing techniques, including resizing, normalization, and noise removal, to enhance their quality. Feature extraction is then performed to capture relevant information from the brain MRI images, focusing on discriminative features that aid in distinguishing different stroke types.

Enhanced CNN Classifier.
The enhanced CNN classifier, which incorporates advanced architectures, is employed for classification. Convolutional neural networks (CNNs) have shown remarkable performance in image classification tasks. The trained CNN utilizes labeled brain MRI images to learn patterns and features associated with specific stroke types. Backpropagation and gradient descent algorithms optimize the network’s parameters during training.
The trained CNN model is then tested on new brain MRI images. During testing, unseen images are inputted into the CNN, and the model provides predictions for their stroke types. The learned features and classification algorithms enable the CNN to determine the stroke type for each test image. The output of the testing phase provides valuable information for clinical diagnosis and treatment planning, including categories such as ischemic stroke and hemorrhagic stroke.
Figure 7 illustrates the CNN architecture used in the enhanced CNN classifier. Prior to feeding the dataset into the CNN, contrast stretching is applied to enhance the visual quality and emphasize image features. The images are further processed through an alpha-trimmed mean filter, reducing noise and improving analysis.

Enhanced-CNN Architecture.
Input: Load MRI dataset images (J)
Output: Classified ischemic and hemorrhagic stroke images (RM)
Step 1: Function RM = Classify (J)
Step 2: Applying contrast stretching
Step 3: Execute the image filtering utilizing alpha trimmed mean filter
Step 4: Divide the dataset into testing and training sets
Step 5: Dataset 256×256×1 is feed into CNN network 2D convolutional layer is operated with 94 filters of 11×11 size ReLU Layer Maxpooling Layer 2D convolutional layer is operated with 15 filters of 5×5 size ReLU Layer Maxpooling Layer Dropout Layer with the probability of 0.1(In order to avoid over fitting as well as maintaining proper sample size) ReLU Layer The Fully Connected Layer is utilized to classify the stroke with the size of 2 outputs Applying Softmax Layer The Classification Layer is utilized to classify the images
The CNN architecture consists of multiple layers, each performing specific operations for feature extraction and stroke type classification. The layers include 2D Convolutional Layers, ReLU Layers for introducing non-linearity, Maxpooling Layers for downsampling and capturing salient features, Dropout Layer for preventing overfitting, and Fully Connected Layer for stroke type classification. The final Classification Layer assigns the predicted stroke type based on the highest probability.
Overall, the enhanced CNN classifier workflow encompasses dataset preparation, preprocessing, feature extraction, CNN training and testing, and the final identification of stroke types in brain MRI images, providing valuable insights for clinical applications.
Methods such as artificial neural networks (ANN), support vector machine (SVM), Naive Bayes (NB), Extreme Learning Machines(ELM), k-Nearest Neighbors (KNN) are compared with the Enhanced-CNN method for classification of Ischemic and Hemorrhagic stroke. The Enhanced-CNN method performs better than ANN, SVM, Extreme Learning Machines(ELM), k-Nearest Neighbors (KNN) and Naive Bayes methods in terms of accuracy, precision, recall and F1_score.
Deep learning techniques play a significant task in medical diagnosis, and despite their substantial training costs, CNNs emerge to contain tremendous potential that could operate as a primary process in designing and executing a system. Nevertheless, brain lesions vary significantly in shape, size, location and intensity, making an automated and exact classification even though stroke is regarded as a challenging task for public practitioners, particularly in rural locations or growing countries where radiologists and neurologists are in short supply. Methods such as artificial neural networks (ANN), support vector machine (SVM), Extreme Learning Machines(ELM), k-Nearest Neighbors (KNN) and Naive Bayes (NB)are compared with the Enhanced-CNN (proposed) method for classification of Ischemic and Hemorrhagic stroke. The Enhanced-CNN method outperforms the ANN, SVM, KNN, ELM and Naive Bayes methods in terms of prediction, quantitative metrics and 98.4% accuracy.
The experiment was carried out on a desktop running Windows 10 Home. The algorithm was implemented in Python 3.7, and the pre-processing algorithm was developed in Python-OpenCV 3.0. This study evaluated the proposed algorithm using data from 1385 stroke patients. 1385 images were used for training and testing: For training, 970 images were employed, and 415 images were utilized for testing. The images were obtained from the Madras scans and labs, radiopaedia and kaggle datasets. To improve the sample size, augmentation is performed and the the training and testing datasets samples are improved, as 9700 and 4150 respectively are described in Table 5.
Training and testing dataset of Abnormal images
Training and testing dataset of Abnormal images
After being converted into 256×256 images, all images were fed into the neural network. The batch size was set to 15. The test was carried out by selecting the model with the lowest cross entropy loss value after 250 epochs. Ground-truth data was recorded in the form of a csv file for each image.
The proposed enhanced CNN method’s performance is evaluated using key parameters such as True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN). The evaluation includes metrics such as Recall (sensitivity or True Positive Rate (TPR)), Precision, accuracy and F1-score. These metrics are derived from the confusion matrix obtained from the classifier’s output and are utilized to assess the effectiveness of the proposed method Recall (also known as True Positive Rate (TPR) or sensitivity): The proportion of actual ischemic cases that are correctly classified as ischemic.
Precision measures the proportion of true positive predictions out of all positive predictions made by the classifier.
Accuracy measures the overall correctness of the classifier’s predictions, taking into account both true positive and true negative predictions.
F1-score is a metric that combines precision and recall (sensitivity) into a single value. It provides a balance between precision and recall.

(a) In training ROC Curve Analysis of Enhanced CNN b) In testing ROC Curve Analysis of Enhanced CNN.
The result of the Enhanced CNN classifier is shown in a 3x3 confusion matrix (Fig. 8).

(a) Confusion matrix of Enhanced CNN classifier for training dataset (b) Confusion matrix of Enhanced CNN classifier for testing dataset.

ROC Curve Analysis of proposed Enhanced CNN with existing classifier.

(a) Performance analysis of different classifiers for training dataset (b) Performance analysis of different classifiers for testing dataset.
Figure 8 illustrates the confusion matrix generated by the Enhanced CNN classifier. In Fig. 8(a), the first two diagonal cells represent the number and percentage of accurately classified images by the trained network. Out of 9700 brain stroke MR images, 4260 are correctly classified as Ischemic, accounting for 43.9% of the total. Similarly, 5280 cases are correctly classified as Hemorrhagic, representing 54.4% of all brain stroke MR images. However, 30 hemorrhagic images are erroneously labeled as Ischemic, corresponding to 0.3% of the entire dataset. Additionally, 130 brain stroke MR images are misclassified as Ischemic, amounting to 1.3% of all the data. Overall, the trained network achieves an accuracy of 98.4%, with 1.6% of predictions being incorrect.
In Fig. 8(b), the first two diagonal cells illustrate the number and percentage of accurately classified images by the testing network. Among the 4150 brain stroke MR images, 1520 are correctly identified as Ischemic, representing 36.6% of the total. Similarly, 2430 cases are correctly classified as Hemorrhagic, corresponding to 58.6% of all brain stroke MR images. However, 70 hemorrhagic images are mistakenly labeled as Ischemic, accounting for 1.7% of the 4150 images. Additionally, 130 brain stroke MR images are incorrectly classified as Ischemic, amounting to 3.1% of the dataset. In total, the testing network achieves an accuracy of 95.2%, with 4.8% of predictions being incorrect.
The results presented in Table 6 demonstrate the Enhanced-CNN method’s outstanding performance, achieving an accuracy of 98.4% on the training dataset. In comparison, the ELM, KNN, SVM, NB, and ANN classifiers achieved accuracies of 61.8%, 62.7%, 63.9%, 71.9%, and 91.2% respectively.
Comparison of performance parameters for various classifiers using training dataset
Similarly, Table 7 displays the results for the testing dataset, further confirming the superiority of the Enhanced-CNN method. It achieved an accuracy of 95.2%, surpassing the accuracies of 57.3%, 59.5%, 61%, 65.1%, and 88.9% achieved by the ELM, KNN, SVM, NB, and ANN classifiers respectively.
Comparison of performance parameters for various classifiers using testing dataset
The deep learning model appears to have successfully predicted stroke based on brain imaging data, with performance comparable to existing clinical methods. The article discusses the distinction between ischemic and hemorrhagic brain stroke. The regions are predicted as a classification problem, wherein a convolution neural network acquires a slice and converts it into an equally-sized probability, predicting which pixels have a stroke core. As a result, this work proposed a deep learning-supported classification scheme to provide the doctor with a preliminary diagnostic report to aid in timely detection. The performance of deep learning techniques namely artificial neural networks (ANN), support vector machine (SVM), Naive Bayes (NB), Extreme Learning Machines (ELM), k-Nearest Neighbors (KNN) and Enhanced-CNN is tested and validated with various parameters, and the results show that Enhanced-CNN provides 98.4% classification accuracy. In the future, training on larger datasets could improve the results, especially if the additional information includes ischemic and hemorrhagic strokes in the regions represented in the current dataset.
