A 3D Maze Rehabilitation Game for Upper Limb Stroke Recovery Based on MediaPipe and SVM
DOI:
https://doi.org/10.61173/c0bnsz10Keywords:
Hand rehabilitation, gesture recognition, MediaPipeAbstract
This study addresses key challenges in upper limb rehabilitation for stroke patients, including the dependence on third-party assistance, the high cost of smart devices, and the lack of multisensory stimulation in traditional methods. This paper proposes a 3D maze rehabilitation game system based on gesture recognition. The system is built on a dual architecture consisting of a Python-based gesture recognition endpoint and a Unity-based game interaction endpoint. To reduce costs, the hardware relies on a standard computer camera, eliminating the need for depth sensors. On the software side, the MediaPipe framework is employed to track 21 3D hand keypoints in real-time. Three feature types, relative coordinates, finger angles, and relative distances, are extracted and normalized to mitigate distance and scale interference. Using publicly available datasets and an Support Vector Machine algorithm, this study developed a model to classify 10 distinct gestures. The system ensures cross-platform communication via UDP, and Unity is used to create dual scenes, fully mapping gestures to game controls, enabling patients to interact with the game through hand gestures during rehabilitation training. Experimental results show that the system achieves 100% accuracy at an optimal recognition distance of 25 cm. However, accuracy decreases for complex gestures when the distance increases to 45 cm or in low-light conditions, due to the impact of image quality. This system offers a low-cost, immersive rehabilitation solution for stroke patients and provides insights into the development of intelligent rehabilitation technologies.
References
[1] Xu Jiayun, Zhou Liping. Effect of finger fine motor training on hand function in stroke convalescent patients with hemiplegic hand dysfunction. Chinese Journal of Modern Drug Application (in Chinese), 2024, 18(17): 156-159. DOI:10.14164/j.cnki.cn11- 5581/r.2024.17.043.
[2] Yan Cheng, Chen Cheng, Zhang Xiang, et al. Design of hand rehabilitation training system based on mirror neuron theory. Chinese Medical Equipment Journal (in Chinese), 2021, 42(01): 26-31. DOI:10.19745/j.1003-8868.2021005.
[3] Yeng, Angelina Chow Mei, et al. Hand gesture controlled Dean&Francis ISSN 2959-6157 game for hand rehabilitation. Proceedings of the International Conference on Computer, Information Technology and Intelligent Computing (CITIC 2022). Amsterdam, The Netherlands: Atlantis Press, 2022.
[4] Zhang Xiaoxuan, Chen Xiang. Design practice of hand rehabilitation training products based on Kano-Pugh. Packaging Engineering (in Chinese), 2024, 45(22): 76-83. DOI:10.19554/ j.cnki.1001-3563.2024.22.008.
[5] Bayındır, Ozun, Gülseren Akyüz, and Nimet Sekban. The effect of adding robot-assisted hand rehabilitation to conventional rehabilitation program following stroke: A randomized-controlled study. Turkish Journal of Physical Medicine and Rehabilitation, 2022, 68(2): 254.
[6] Barria P, Riquelme M, Reppich H, et al. Hand rehabilitation based on the RobHand exoskeleton in stroke patients: A case series study. Frontiers in Robotics and AI, 2023, 10: 1146018.
[7] Baniqued, Paul Dominick E., et al. Brain–computer interface robotics for hand rehabilitation after stroke: a systematic review. Journal of NeuroEngineering and Rehabilitation, 2021, 18(1): 15.
[8] Li Yang, Chen Enwei, Wu Di, et al. Research on hand rehabilitation interaction system based on perceptual feedback. Journal of Hefei University of Technology (Natural Science Edition) (in Chinese), 2025, 48(05): 583-590.
[9] Xie Yinggang, Wang Quan. Survey of dynamic hand gesture recognition based on vision. Computer Engineering and Applications (in Chinese), 2021, 57(22): 68-77.
[10] Meng Jie, Yang Pengcheng, Yang Zhao, et al. Design of natural gesture interaction system for phantom imaging device based on Mediapipe. Foreign Electronic Measurement Technology (in Chinese), 2023, 42(03): 116-122. DOI:10.19652/ j.cnki.femt.2204392.
[11] Mavi, A. A New Dataset and Proposed Convolutional Neural Network Architecture for Classification of American Sign Language Digits. arXiv preprint, 2020: arXiv:2011.08927 [cs.CV].
[12] Liu Defa. Digital gesture recognition based on MediaPipe. Electronic Production (in Chinese), 2022, 30(14): 55-57. DOI:10.16589/j.cnki.cn11-3571/tn.2022.14.015.
[13] Lugaresi, Camillo, et al. Mediapipe: A framework for perceiving and processing reality. Third Workshop on Computer Vision for AR/VR at IEEE Computer Vision and Pattern Recognition (CVPR), 2019.
[14] Lin Zhitao. Research on Quantitative Assessment System for Hand Virtual Rehabilitation Based on Dynamic Gesture Recognition. Master’s thesis, Nanchang University (in Chinese), 2024. DOI:10.27232/d.cnki.gnchu.2024.001298.
[15] Islam M R, Rahman R, Ahmed A, et al. NFS: A hand gesture recognition based game using MediaPipe and pygame. arXiv preprint, 2022: arXiv:2204.11119.
[16] Google AI. MediaPipe Hand Landmark Detection. [Online]. Available: https://ai.google.dev/edge/mediapipe/solutions/vision/ hand_landmarker?hl=zh-cn
[17] Fu Zhikai, Li Wenxin, Luo Xinkui. A survey of dynamic gesture recognition technology based on vision. Computer Measurement & Control (in Chinese), 2025, 33(01): 9-19. DOI:10.16526/j.cnki.11-4762/tp.2025.01.002.
[18] Abdullah, Dakhaz Mustafa, and Adnan Mohsin Abdulazeez. Machine learning applications based on SVM classification a review. Qubahan Academic Journal, 2021, 1(2): 81-90.
[19] Abbass, Mahmoud Abdelkader Bashery, and Hyun-Soo Kang. Drone elevation control based on python-unity integrated framework for reinforcement learning applications. Drones, 2023, 7(4): 225.
Downloads
Published
Issue
Section
License
Copyright (c) 2025 by the authors.

This work is licensed under a Creative Commons Attribution 4.0 International License.
