Computer Vision-Based Tennis Ball Tracking Using You Only Look Once for Training Analytics †
Abstract
1. Introduction
2. Related Work
2.1. YOLOv12
2.2. MobileNetV2
2.3. KF
3. Methodology
3.1. Dataset Preparation
3.1.1. Datasets for YOLOv12
3.1.2. Datasets for MobileNetV2
3.2. Ball Trajectory Tracking Algorithm
| Algorithm 1: Two-Stage Tennis Ball Detection and Tracking | |||
| Input: Video frames from a tennis wall practice | |||
| Output: Estimated ball positions(), velocity() | |||
| 1 | Initialize KF with state vector: | ||
| 2 | for each frame (time step ): | ||
| 3 | Predict ball state using KF; | ||
| 4 | Stage 1—YOLOv12 detection: Detect candidate bounding boxes = ; | ||
| 5 | Stage 2—MobileNetV2 classification: validate candidates with probability ≥ | ||
| 6 | Select with highest prob_ball and tracking confidence; | ||
| 7 | Update KF with selected position; | ||
| 8 | if valid exist: | ||
| 9 | ; | ||
| 10 | ; | ||
| 11 | Return Estimated ball positions(), velocity(); | ||
| 12 | else: | ||
| 13 | Return previous state() and velocity(); | ||
| 14 | end if | ||
| 15 | end for | ||
3.3. Ball-to-Wall Collision Detection
4. Results and Discussions
4.1. Evaluation of Wall Impact Point Detection
4.2. Model Evaluation
5. Conclusions and Future Works
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Naik, B.T.; Hashmi, M.F.; Bokde, N.D. A Comprehensive Review of Computer Vision in Sports: Open Issues, Future Trends and Research Directions. Appl. Sci. 2022, 12, 4429. [Google Scholar] [CrossRef]
- Öztürker, C.; Şahan, A.; Erman, K.A. Impact of Mental Fatigue on Tennis Players’ Attention and Groundstroke Performance. Front. Psychol. 2025, 16, 1544785. [Google Scholar] [CrossRef] [PubMed]
- Tian, Y.; Ye, Q.; Doermann, D. YOLOv12: Attention-Centric Real-Time Object Detectors. arXiv 2025, arXiv:2502.12524. [Google Scholar]
- Zhang, Y.; Xiao, Q.; Liu, X.; Wei, Y.; Xue, J. Method for Reconstructing Safety and Arming Motion Process by Integrating Kalman Filter and KCF. Sci. Rep. 2025, 15, 8334. [Google Scholar] [CrossRef] [PubMed]
- Khanam, R.; Hussain, M. A review of YOLOv12: Attention-based Enhancements vs. Previous Versions. arXiv 2025, arXiv:2504.11995. [Google Scholar] [CrossRef]
- Ge, T.; Ning, B.; Xie, Y. YOLO-AFR: An Improved YOLOv12-based Model for Accurate and Real-time Dangerous Driving Behavior Detection. Appl. Sci. 2025, 15, 6090. [Google Scholar] [CrossRef]
- Abbas, K.; Khan, M.I.; Saeed, M.; Ahmed, K.; Wang, H.; Mahmood, A. Front Pitch View Shot Extraction and Ball Tracking in Cricket using Deep Learning. IEEE Access 2025, 13, 110941–110954. [Google Scholar] [CrossRef]
- Lokhande, H.; Ganorkar, S.R. Object Detection in Video Surveillance using MobileNetV2 on Resource-constrained Low-Power Edge Devices. Bull. Electr. Eng. Inform. 2025, 14, 357–365. [Google Scholar] [CrossRef]
- Ooi, Y.M.; Chang, C.C.; Su, Y.M.; Chang, C.M. Vision-based UAV Localization on Various Viewpoints. IEEE Access 2025, 13, 38317–38324. [Google Scholar] [CrossRef]
- Yang, J.; Jin, Y.J.; Kim, R.Y.C. Multi-Person Fall Detection Using Data Assimilation Method With Kalman Filter. IEEE Access 2025, 13, 104692–104705. [Google Scholar] [CrossRef]
- Madhukar, P.S.; Madhukar, S. Kalman Filters in Different Biomedical Signals—An Overview. In Proceedings of the International Conference on Smart Electronics and Communication (ICOSEC), Trichy, India, 10–12 September 2020; pp. 1268–1272. [Google Scholar]
- Deng, W.; Xie, G. Image Contrast Enhancement and Brightness Preservation based on An Adaptive Histogram Correction Framework. Appl. Opt. 2025, 64, 3502–3515. [Google Scholar] [CrossRef] [PubMed]
- Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.C. MobileNetV2: Inverted Residuals and Linear Bottlenecks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–23 June 2018; pp. 4510–4520. [Google Scholar]
- Wong, P.; Myint, H.; Hopgood, A. A Multi-View Automatic Table Tennis Umpiring Framework. Proc. Inst. Mech. Eng. Part P J. Sports Eng. Technol. 2023, 238, 339–351. [Google Scholar] [CrossRef]


| Model | True Positive | False Positive | False Negative | Precision | Recall | F1-Score |
|---|---|---|---|---|---|---|
| YOLOv12 | 3351 | 98 | 276 | 97.2% | 92.4% | 94.7% |
| YOLOv12 + MobileNetV2 (Two-Stage) | 2774 | 18 | 647 | 99.4% | 81.1% | 89.3% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Lin, P.-J.; Lin, Y.-T.; Lin, Y.-L.; Lee, Y.-P.; Chang, S.-W. Computer Vision-Based Tennis Ball Tracking Using You Only Look Once for Training Analytics. Eng. Proc. 2026, 134, 25. https://doi.org/10.3390/engproc2026134025
Lin P-J, Lin Y-T, Lin Y-L, Lee Y-P, Chang S-W. Computer Vision-Based Tennis Ball Tracking Using You Only Look Once for Training Analytics. Engineering Proceedings. 2026; 134(1):25. https://doi.org/10.3390/engproc2026134025
Chicago/Turabian StyleLin, Pei-Jung, Yu-Tsen Lin, Yong-Liang Lin, Yi-Ping Lee, and Shao-Wei Chang. 2026. "Computer Vision-Based Tennis Ball Tracking Using You Only Look Once for Training Analytics" Engineering Proceedings 134, no. 1: 25. https://doi.org/10.3390/engproc2026134025
APA StyleLin, P.-J., Lin, Y.-T., Lin, Y.-L., Lee, Y.-P., & Chang, S.-W. (2026). Computer Vision-Based Tennis Ball Tracking Using You Only Look Once for Training Analytics. Engineering Proceedings, 134(1), 25. https://doi.org/10.3390/engproc2026134025
