Background Stroke is the third most common cause of death and the fourth most common cause of disability in the world, with 11.9 million incident events each year. Although deep learning methods, particularly convolutional neural networks and transfer-learning-based models, have been increasingly applied to stroke classification, existing approaches face several challenges, including limited cross-modality comparison, class imbalance, low interpretability, and suboptimal accuracy when applied to heterogeneous imaging protocols. Moreover, no existing framework has systematically combined these techniques into modality-specific stroke classification models evaluated separately on both CT and MRI data. Objective To create and test a deep learning architecture that can be used to accurately and interpretably classify stroke from computed tomography and magnetic resonance imaging scans across imaging modalities. Methods The proposed framework comprises a five-component ensemble architecture based on transfer learning from the pre-trained convolutional networks on ImageNet, such as Xception, EfficientNetB7 and ConvNeXtSmall, ensemble voting between different architectures, explainable artificial intelligence using Grad-CAM visualization technique, systematic hyperparameter optimization and adaptive data augmentation. The framework was trained and tested on 1005 computed tomography (CT) images that were taken at Shafa Hospital and 615 magnetic resonance imaging (MRI) images from a public dataset, including three diagnostic classes: hemorrhagic stroke, ischemic stroke and normal. Results On the test set of CT, the ensemble model gave an accuracy of 95.12% with a precision of 97%, a recall of 95%, and an F1 score of 96%. The ensemble attained the highest accuracy of 94.12%, precision of 94%, recall of 95% and F1-score of 95% on MRI. CT ensemble performance was better than any of the single architectures and previous best-known methods. Clinically relevant attention patterns were confirmed with Grad-CAM visualizations, which aligned with the radiologically relevant lesion regions. Conclusion The current study is a system to systematically combine transfer learning, ensemble voting, explainable artificial intelligence, and adaptive augmentation for stroke classification. The framework is clinically interpretable and demonstrated to provide superior performance metrics, thus having the potential to be real-world deployed as a decision-support tool in emergency neuro-imaging workflows. The main contribution of this work is the systematic integration of five complementary components into a modality-specific framework, enabling accurate and clinically interpretable classification for both CT and MRI, with each modality modeled and evaluated independently.
更多