Detecting a brain tumor in real time can mean the difference between life and death. A research team tested four pre‑trained neural networks – DeiT3, Xception41, Inception v4 and Swin Tiny – to automatically classify MRI images into four categories: glioma, meningioma, pituitary and no tumor. The public Brain Tumor MRI Msoud dataset, with over 7 000 images, was split into training and test sets, then reduced to 25‑75 % to see how much data is really needed. After careful cleaning and data‑augmentation, Swin Tiny achieved 99.24 % accuracy using 75 % of the training data, outperforming the other models and handling class imbalance well. The novelty continues: the model was ported to edge devices like Jetson AGX Xavier and Orin Nano, proving real‑time inference can happen directly in hospitals without cloud servers. This approach promises faster diagnoses, lower energy costs, and broader AI accessibility in clinical settings. In the future, such solutions could be integrated into radiologists' workflows, making MRI reading quicker and more reliable for every patient.
The evaluated architectures belong to two families: classic CNNs (Xception41, Inception_v4) and Vision Transformers (DeiT3, Swin_Tiny). Vision Transformers process images by splitting them into patches, treating them as tokens in a sequence, similar to natural language models. Swin_Tiny uses a hierarchical window‑based attention that reduces computational complexity from O(N^2) to O(N), where N is the number of patches, making it suitable for resource‑constrained devices. Transfer learning was crucial: ImageNet‑pretrained weights provided low‑level representations (edges, textures) already optimized, allowing rapid convergence with limited medical data. Data augmentation included random rotations, horizontal flips, brightness variations, and Gaussian noise, increasing robustness to MRI protocol variations. Evaluation employed stratified five‑fold cross‑validation, ensuring class distribution was preserved in each fold. ROC curves showed AUC > 0.99 for all classes, indicating excellent discrimination. Finally, deployment on Jetson AGX Xavier (Volta GPU) and Orin Nano (Ampere GPU) yielded image latency below 30 ms, meeting real‑time requirements for clinical applications.
