Abstract
The growing demands of stroke rehabilitation have increased the need for solutions to support autonomous exercising. Virtual coaches can provide real-time exercise feedback from video data, helping patients improve motor function and keep engagement. However, training real-time motion analysis systems demands frame-level annotations, which are time-consuming and costly to obtain. In this work, we present a framework that learns to classify individual frames from video-level annotations for real-time assessment of compensatory motions in rehabilitation exercises. We use a gradient-based technique and a pseudo-label selection method to create frame-level pseudo-labels for training a frame-level classifier. We leverage pre-trained task-specific models - Action Transformer, SkateFormer - and a foundation model - MOMENT - for pseudo-label generation, aiming to improve generalization to new patients. To validate the approach, we use the SERE dataset with 18 post-stroke patients performing five rehabilitation exercises annotated on compensatory motions. MOMENT achieves better video-level assessment results (AUC = 73%), outperforming the baseline LSTM (AUC = 58%). The Action Transformer, with the Integrated Gradient technique, leads to better outcomes (AUC = 72%) for frame-level assessment, outperforming the baseline trained with ground truth frame-level labeling (AUC = 69%). We show that our proposed approach with pre-trained models enhances model generalization ability and facilitates the customization to new patients, reducing the demands of data labeling.
Introduction
Following a stroke, consistent rehabilitation exercises are crucial for motor recovery. However, therapist shortages and high costs limit access to professional guidance. Virtual coaches—automated systems providing real-time exercise feedback—offer a promising solution for home-based rehabilitation. To be effective, these systems must analyze movement frame-by-frame to detect "compensatory motions," which are incorrect adaptive movement patterns. The primary bottleneck in developing such systems is the need for frame-level annotations, which are time-consuming and subjective for medical professionals to produce. This work proposes a framework to train frame-level classifiers using only video-level labels, significantly reducing the data labeling burden.
Methodology
The proposed framework follows a two-stage pipeline to bridge the gap between video-level labels and frame-level assessment.
- Pose Preprocessing: 3D skeletal keypoints (33 joints) are extracted using MediaPipe. These are converted into displacement vectors to focus on movement trajectories rather than absolute positioning.
- Video-Level Classification (Model A): Pre-trained models are fine-tuned on video-level labels to detect compensatory motions. The study compares a baseline LSTM against task-specific models (Action Transformer, SkateFormer) and a time-series foundation model (MOMENT).
- Pseudo-Label Generation: For videos where a compensatory motion is detected, gradient-based feature attribution (Vanilla or Integrated Gradients) generates a saliency map. This map identifies the frames and joints most influential to the model's decision.
- Frame-Level Classification (Model B): A simple Multilayer Perceptron (MLP) is trained on the resulting frame-level pseudo-labels to perform real-time assessment.
Results and Key Insights
The framework was evaluated on the SERE dataset, involving 18 post-stroke patients performing five functional exercises. Evaluation used a Leave-One-Subject-Out (LOSO) strategy to ensure generalization to new patients.
At the video level, the foundation model MOMENT achieved the highest performance with an AUC of 73%, outperforming the LSTM baseline (58%). This suggests that foundation models pre-trained on diverse time-series data generalize better to unseen human motion patterns.
For frame-level assessment, the MLP trained on pseudo-labels from the Action Transformer (AcT) with Integrated Gradients achieved an AUC of 72%. Remarkably, this outperformed the same model trained on human-annotated ground truth (AUC 69%). This improvement is likely due to the consistency of gradient-based maps compared to the subjective and noisy nature of manual human labeling.
Conclusion
This research demonstrates that weakly supervised learning, leveraging pre-trained foundation and task-specific models, can effectively automate the assessment of stroke rehabilitation exercises. By generating high-quality pseudo-labels from video-level data, the approach not only reduces the cost of clinical data annotation but also improves the accuracy and consistency of real-time motion analysis. Future work will explore cross-exercise generalization and broader human motion benchmarks.
Summary updated