Abstract
In this paper, we tackle the problem of video alignment, the process of matching the frames of a pair of videos containing similar actions. The main challenge in video alignment is that accurate correspondence should be established despite the differences in the execution processes and appearances between the two videos. We introduce an unsupervised method for alignment that uses global and local features of the frames. In particular, we introduce effective features for each video frame by means of three machine vision tools: person detection, pose estimation, and VGG network. Then the features are processed and combined to construct a multidimensional time series that represent the video. The resulting time series are used to align videos of the same actions using a novel version of dynamic time warping named Diagonalized Dynamic Time Warping (DDTW). The main advantage of our approach is that no training is required, which makes it applicable for any new type of action without any need to collect training samples for it. Additionally, our approach can be used for framewise labeling of action phases in a dataset with only a few labeled videos. For evaluation, we considered video synchronization and phase classification tasks on the Penn action and subset of UCF101 datasets. Also, for an effective evaluation of the video synchronization task, we present a new metric called Enclosed Area Error (EAE). The results show that our method outperforms previous state-of-the-art methods, such as TCC, and other self-supervised and weakly supervised methods.
Introduction
Video alignment involves the "temporal matching" of two sequences depicting similar actions. For instance, in two videos of individuals performing a bench press, the speed, environment, and camera angles may vary significantly. The objective is to identify corresponding frames in both videos that represent the same phase of the action.
The primary challenges in this field include intra-class variation (differences in how individuals perform the same action) and environmental changes (lighting, background, camera perspective). While existing state-of-the-art methods often rely on heavy supervision or complex self-supervised losses requiring extensive training, this paper proposes a "plug-and-play" unsupervised method that works across various actions without action-specific training.
Proposed Method
The proposed pipeline treats a video as a multidimensional time series, utilizing a hybrid feature extraction method and a novel alignment algorithm.
Hybrid Feature Extraction
To capture both the actor's movements and the surrounding context, the method combines three distinct feature types for every frame:
- Local Static Features: Utilizing YOLOv5 for person detection and MeTRAbs for 3D pose estimation to capture joint positions.
- Local Dynamic Features: Calculating displacement vectors of bounding boxes and joints between successive frames to capture movement velocity.
- Global Features: Using a pre-trained VGG16 network. To minimize background noise, a Gaussian weight mask centered on the detected person is applied, focusing the network on the actor and relevant equipment (like a barbell) while retaining some context.
Diagonalized Dynamic Time Warping (DDTW)
Standard Dynamic Time Warping (DTW) can sometimes produce non-physical alignment paths, such as temporal "jumps." The authors introduce DDTW, which incorporates a penalty coefficient for paths that deviate significantly from the diagonal. This constraint leverages the intuition that human actions generally progress linearly over time, even if the execution speed varies.
Evaluation and Results
The method was evaluated on the PennAction and UCF9 (a subset of UCF101) datasets, focusing on phase classification and video synchronization.
Key Metrics and Performance
- Phase Classification: On the PennAction dataset, the unsupervised method achieved an accuracy of 80.92%, outperforming established self-supervised methods like TCC (69.6%) and GTA (76.3%).
- Enclosed Area Error (EAE): A new metric, EAE, was introduced to measure the area between the predicted alignment path and the ground-truth linear path. The proposed method demonstrated lower error and a higher "Correct Phase Rate" compared to prior state-of-the-art models.
- Robustness: The method proved significantly more effective than trivial linear alignment in scenarios where videos contain "idle time" (e.g., a person standing still) before or after the action starts.
Conclusion
This research presents a versatile, training-free approach to video alignment. By combining local pose features with masked global context, the system achieves high accuracy across diverse actions. While the method depends on the reliability of underlying pre-processors like person detectors, its unsupervised nature makes it highly applicable for automated labeling of large, unannotated datasets. Future work may extend this framework to more complex multi-person interactions.
Summary updated