Your new experience awaits. Try the new design now and help us make it even better

ORIGINAL RESEARCH article

Front. Med.

Sec. Precision Medicine

This article is part of the Research TopicArtificial Intelligence in Imaging, Pathology, and Genetic Analysis of Brain Tumor in the Era of Precision MedicineView all 6 articles

ESA-YOLOv5m: A Lightweight Spatial and Improved Attention-Driven Detection for Brain Tumor MRI Analysis

Provisionally accepted
Maram  Fahaad AlmufarehMaram Fahaad Almufareh1*Noshina  TariqNoshina Tariq2Mamoona  HumayunMamoona Humayun3*Haya  AldossaryHaya Aldossary4Meshal  AlharbiMeshal Alharbi5
  • 1Jouf University Computer and Information Sciences, Sakaka, Saudi Arabia
  • 2National University of Computer and Emerging Sciences, Islamabad, Pakistan
  • 3University of Roehampton London, Roehampton, United Kingdom
  • 4Imam Abdulrahman Bin Faisal University, Dammam, Saudi Arabia
  • 5Prince Sattam bin Abdulaziz University, Al Kharj, Saudi Arabia

The final, formatted version of the article will be published soon.

The early and accurate detection of brain tumors is vital for improving patient outcomes, enabling timely clinical interventions, and reducing diagnostic uncertainty. Despite advances in deep learning, conventional Convolutional Neural Network (CNN)-based models often struggle with small or low-contrast tumors. They also remain computationally demanding for real-time clinical deployment. This study presents an Enhanced Spatial Attention (ESA)-integrated You Only Look Once v5 medium (YOLOv5m) architecture, a lightweight and efficient framework for brain tumor detection in MRI scans. The ESA module, positioned after the Spatial Pyramid Pooling-Fast (SPPF) layer, enhances feature discrimination by emphasizing diagnostically relevant regions while suppressing background noise, thereby improving localization accuracy without increasing computational complexity. Experiments were conducted on the Figshare brain tumor MRI dataset containing three tumor classes: glioma, meningioma, and pituitary. ESA-YOLOv5m achieved a Precision of 90%, Recall of 90%, and mean Average Precision (mAP)@0.5 of 91%, surpassing the baseline YOLOv5m by approximately 11-12%. An ablation study further confirmed that placing the ESA module after the SPPF layer yields the highest performance (mAP@0.5 = 0.91), while earlier integration produced marginally lower results. Class-wise analyses demonstrated consistent gains (mAP range 0.87-0.98), and five-fold cross-validation showed stable performance (mAP@0.5 = 0.910 ± 0.006). Efficiency tests revealed negligible overhead, with less than a Sample et al. ESA-YOLOv5m 4.3% increase in parameters and an average latency below 10 ms per image. Overall, the results validate that integrating a lightweight spatial attention mechanism significantly enhances tumor localization and model generalization while preserving real-time inference. The proposed ESA-YOLOv5m framework provides a reliable and scalable solution for automated brain tumor detection, suitable for clinical decision-support systems and edge healthcare applications.

Keywords: YOLOv5m, Enhanced Spatial Attention (ESA), Brain tumor detection, medical imaging, deep learning, Precision and recall, Map, Figshare MRI Dataset

Received: 27 Oct 2025; Accepted: 28 Nov 2025.

Copyright: © 2025 Almufareh, Tariq, Humayun, Aldossary and Alharbi. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

* Correspondence:
Maram Fahaad Almufareh
Mamoona Humayun

Disclaimer: All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.