Abstract
Spinal diseases and frozen shoulder are prevalent health problems in Asian populations. Early assessment and treatment are very important to prevent the disease from getting worse and reduce pain. In the field of computer vision, it is a challenging problem to assess the range of motion. In order to realize efficient, real-time and accurate assessment of the range of motion, an assessment system combining MediaPipe and YOLOv5 technologies was proposed in this study. On this basis, Convolutional Block Attention Module (CBAM) is introduced into the YOLOv5 target detection model, which can enhance the extraction of feature information, suppress background interference, and improve the generalization ability of the model. In order to meet the requirements of large-scale computing, a client/server (C/S) framework structure is adopted. The evaluation results can be obtained quickly after the client uploads the image data, providing a convenient and practical solution. In addition, a game of "Picking Bayberries" was developed as an auxiliary treatment method to provide patients with interesting rehabilitation training.
Introduction
Spinal diseases and frozen shoulder are increasingly prevalent, particularly in Asian populations due to lifestyle habits and work-related stress. Traditional diagnostic methods rely heavily on manual observation and subjective judgment by doctors, which is time-consuming, costly, and prone to inconsistency. While computer vision offers a path toward automation, assessing the range of motion accurately in real-time is challenging. Models often struggle with background interference, insufficient feature extraction in complex environments, and the high computational demands required for large-scale deployment. This paper seeks to bridge the gap between deep learning research and practical clinical application.
Methodology
The proposed system leverages a hybrid pipeline that combines object detection with high-fidelity pose estimation.
Improved YOLOv5 for Target Detection
The system first uses YOLOv5 to identify the patient and define a "region of interest" (ROI). To improve performance, the authors introduced the Convolutional Block Attention Module (CBAM). CBAM applies both channel and spatial attention, allowing the model to focus on critical body features while suppressing irrelevant background noise.
Pose Estimation via MediaPipe
Once the target is localized, the system employs MediaPipe to extract 33 skeletal keypoints. This allows for the calculation of specific joint angles and spinal curvature, which are essential for assessing Range of Motion (ROM).
System Architecture and Gamification
To handle the computational load, the authors implemented a Client/Server (C/S) framework using Spring Cloud. Users upload image or video data via a client (PC or smartphone), and the heavy lifting is performed on a server equipped with high-end GPUs (RTX 3090 Ti), returning results via WebSockets. Additionally, a "Picking Bayberries" game was developed to provide real-time feedback during rehabilitation exercises, making the recovery process more engaging.
Key Insights
- Efficiency through Fusion: By using YOLOv5 to crop the image down to the person before running MediaPipe, the system significantly reduces computational complexity. It avoids analyzing the entire frame for keypoints, which speeds up response times and reduces false positives.
- The Power of Attention: The inclusion of CBAM was pivotal. By weighting feature maps spatially and across channels, the model became much more robust at extracting "pose defect" information.
Results
The combined MediaPipe + YOLOv5 system demonstrated superior performance compared to using standard models in isolation:
- Accuracy: The system achieved a mean Average Precision (mAP) of 94.6%, a significant jump from the 90.3% achieved by YOLOv5 alone.
- Precision and Recall: Precision reached 95.3% with a recall of 90.2%.
- Speed: The detection speed was clocked at 35ms per image, making it fully capable of real-time video processing.
- Specific Actions: The model was particularly effective at identifying "Bend" and "Stretch" postures, with mAPs of 98.2% and 98.6%, respectively.
Conclusion and Future Work
While the results are promising, the current dataset is relatively small (under 500 annotated images). Expanding this to include thousands of diverse environments would improve generalization. Future iterations could leverage MediaPipe’s Z-axis data more deeply to assess complex 3D spinal rotations. Finally, long-term clinical trials are needed to quantify the effectiveness of the "Picking Bayberries" game in improving patient outcomes compared to traditional physical therapy.
Summary updated