Basketball detection based on YOLOv8

Z Zeyu Liang (State Key Laboratory of Synergistic Chem-Bio Synthesis, Frontiers Science Center for Transformative Molecules, School of Chemistry and Chemical Engineering, School of Biomedical Engineering, National Engineering Research Center of Advanced Magnetic Resonance Technologies for Diagnosis and Therapy (NERC-AMRT), National Center for Translational Medicine) J Jiuyuan Wang T Tianhao Huang Z Zilong Sang J Jia Zhang

Abstract

Accurate and timely detection of basketballs is crucial for ensuring fairness in games, enhancing the precision of data analysis, optimizing tactical planning for coaches, and improving the spectator experience. However, current basketball detection technologies face challenges such as variations in target scale, scene complexity, and changing camera angles, which limit automated systems’ accuracy and real-time performance. To address these issues, this study introduces a novel real-time basketball detection model, BGS-YOLO, incorporating several key innovations. First, the model integrates a BiFPN (Bidirectional Feature Pyramid Network) that enhances detection accuracy by efficiently merging feature maps across different resolutions, allowing for more effective feature extraction from basketball targets. Second, the Global Attention Mechanism (GAM) dynamically adjusts the model’s focus, optimizing feature attention in complex or partially occluded scenes, boosting recall in occluded scenarios by 3.2%, thereby improving localization precision. Finally, SimAM-C2f increases the model’s robustness in high-interference environments by calculating similarity features between the target and the background, reducing false positives by 15%, ensuring more reliable detection. Experimental results show that BGS-YOLO surpasses existing models across key metrics such as precision, recall, F1 score, and mean average precision (mAP), achieving a mAP of 93.2%. All improvements were statistically significant (p < 0.001). These advancements significantly enhance the accuracy and robustness of basketball detection, offering valuable technical support for intelligent sports analytics.

Article Details

Journal PLoS ONE
Volume / Issue Vol. 20, Issue 8
Published August 26, 2025
Pages e0326964
ISSN 1932-6203
Publisher Public Library of Science

Journal Info

PLoS ONE

Public Library of Science

ISSN: 1932-6203 Open Access Health Sciences

Authors (5)

Z

Zeyu Liang

State Key Laboratory of Synergistic Chem-Bio Synthesis, Frontiers Science Center for Transformative Molecules, School of Chemistry and Chemical Engineering, School of Biomedical Engineering, National Engineering Research Center of Advanced Magnetic Resonance Technologies for Diagnosis and Therapy (NERC-AMRT), National Center for Translational Medicine

J

Jiuyuan Wang

T

Tianhao Huang

Z

Zilong Sang

J

Jia Zhang