TReViS: Temporal Repetition Structure Aware Video Synthesis for Self-supervised Repetitive Action Counting

Fanqi Yu, Shengming Ma, Stefano Fiorini, Vito Paolo Pastore, Xuan Qi, Vittorio Murino, Cigdem BeyanarXiv 2026

TL;DR

TReViS is a fully label-free, self-supervised framework for repetitive action counting that trains models using automatically synthesized videos. By extracting temporal structure statistics from an unlabeled video's self-similarity matrix, it generates high-quality training samples with accurate pseudo-labels, matching the performance of supervised baselines without requiring manual annotations.

What Problem Does This Paper Address?

Repetitive Action Counting (RAC) is a vital task for applications like fitness tracking, physical rehabilitation, and industrial surveillance. While fully supervised models achieve high accuracy, they rely on dense, frame-by-frame manual annotations of cycle boundaries—a process that is incredibly tedious and difficult to scale.

To avoid manual labeling, existing self-supervised learning (SSL) methods try to adapt models at test-time or train them on synthetic data. However, test-time adaptation requires retraining a model for every single new video, making real-time deployment impossible. On the other hand, traditional synthetic data approaches simply stitch random video clips together, creating artificial motion patterns that fail to capture the true statistical properties of real-world repetitions. TReViS bridges this gap by generating synthetic training data that explicitly preserves the natural temporal structure of real videos.

Methods

Instead of proposing a brand-new neural network architecture, the authors introduce TReViS (Temporal Repetition Structure Aware Video Synthesis), a model-agnostic framework that transforms unlabeled real videos into high-quality training data for any existing RAC model.

The pipeline operates in three main stages:

  1. Temporal Self-Similarity Matrix (TSSM) Construction: An unlabeled video is divided into short, uniform chunks. A pretrained Video Swin Transformer extracts features for each chunk, and a 2D similarity matrix is constructed by calculating pairwise inner products. This matrix maps how visually similar each part of the video is to every other part over time.
  2. Stochastic Structure Estimation: Rather than attempting to predict an exact count immediately, TReViS randomly samples multiple "anchor" rows within the TSSM. By applying an adaptive threshold to the similarity peaks, it extracts coarse, video-dependent statistics for cycle length and repetition count. These statistics are fitted to a Gaussian distribution to capture the video's natural rhythm while introducing controlled variability.
  3. Structure-Aware Video Synthesis: Guided by the sampled statistics, a single representative motion cycle is extracted from the video and replicated. To make the video realistic, non-repetitive segments (randomly cropped from unrelated videos) are probabilistically injected between cycles to simulate real-world pauses or interruptions.

The final synthesized videos are paired with automatically generated pseudo-labels to train downstream RAC models from scratch.

Figure 1: Overview of the entire pipeline. During training, we use our synthesized videos, while at test time, the trained model is directly applied to real videos without any additional fine-tuning. In TReViS, starting from an unlabeled input repetitive video, we first split it into multiple video clips and pass each through a pretrained video encoder to obtain clip-level feature embeddings. These embeddings are aggregated into a Temporal Self-Similarity Matrix that measures pairwise similarity between all video clips.

Datasets

The framework was validated using three prominent RAC benchmarks:

  • RepCount-A: Contains 1,451 videos of fitness and sports activities with explicit cycle boundary annotations. TReViS utilizes its training split (758 videos) without using any of the human labels.
  • UCFRep: A dataset of 526 videos derived from UCF101, offering controlled conditions to evaluate model performance in low-variability scenarios.
  • Countix: A massive, challenging open-world dataset from YouTube containing nearly 9,000 videos with highly diverse actions, camera motions, and only coarse video-level counts.

Key Insights and Ideas

  • Structure over Visual Realism: You don't need complex, computationally heavy generative models (like video diffusion models) to train a robust counter. Preserving the coarse temporal statistics (how long a cycle lasts and how often it repeats) of the source video is enough to provide effective supervision.
  • The Power of Strategic Interruptions: Simply looping a video clip creates an unnaturally perfect periodic pattern. By probabilistically injecting random, non-repetitive background segments between cycles, TReViS forces the downstream model to learn robust boundary transitions, significantly boosting real-world generalization.
  • Embracing Helpful Bias: The stochastic estimation process naturally introduces a mild bias toward lower-frequency repetitions. This actually benefits downstream models because densely packed, high-frequency cycles are notoriously difficult for neural networks to differentiate cleanly.

Key Results

  • Outperforming Prior SSL: On the RepCount-A dataset, TReViS combined with a SimPer backbone achieved a Mean Absolute Error (MAE) of 0.4671, drastically outperforming prior video-synthesis baselines like RepNet (MAE: 0.9950).
  • Competitive with Supervised Baselines: TReViS closely approaches fully supervised performance. For instance, a fully supervised TransRAC model achieves an MAE of 0.4431, while TReViS + TransRAC achieves 0.4955 completely label-free.
  • Excellent Cross-Dataset Generalization: When trained on RepCount-A and directly evaluated on the highly complex Countix dataset, TReViS + IVAC-P2L achieved an MAE of 0.5220, demonstrating that the structure-aware synthesis prevents the model from overfitting to a single dataset domain.
  • Zero Inference Overhead: Because TReViS is strictly a data-generation framework used during the training phase, the final deployed model runs at standard inference speeds with no extra computational cost at test time.

Limitations and Future Work

While TReViS marks a significant step forward for label-free video analysis, the authors note a few limitations:

  • Coarse Temporal Modeling: The synthesis process focuses primarily on global statistics (total counts and average cycle lengths). It currently misses finer details like intra-cycle dynamics, phase progressions, and fluid cycle-to-cycle continuity.
  • Hyperparameter Sensitivity: The framework still relies on manually defined hyperparameters for chunk size ($c$), similarity thresholding ($\tau$), and segment insertion probability ($q$).

Future work will focus on developing adaptive temporal estimation techniques that automatically tune themselves to video-specific motion characteristics, as well as exploring structure-conditioned generative models to improve visual realism.

Summary updated

Abstract

Fully supervised repetitive action counting (RAC) has achieved strong performance, but requires dense temporal annotations that are costly and difficult to scale. We propose TReViS, a self-supervised video synthesis framework that enables training RAC models without any repetition labels. TReViS estimates the underlying temporal repetition structure of an unlabeled video via a Temporal Self-Similarity Matrix, infers its cycle statistics, and synthesizes new training sequences that preserve realistic repetition patterns while introducing controlled temporal variability. These synthesized videos are paired with pseudo-labels and used to train existing RAC architectures from scratch. Across multiple datasets and backbones, TReViS consistently outperforms prior self-supervised methods and achieves performance competitive with several supervised baselines, while remaining fully label-free, demonstrating the effectiveness of structure-aware video synthesis for label-free RAC. The source code is available at https://github.com/yfqi/TReViS.
BibTeX
@misc{yu2026trevis,
  author = {Fanqi Yu and Shengming Ma and Stefano Fiorini and Vito Paolo Pastore and Xuan Qi and Vittorio Murino and Cigdem Beyan},
  title = {{TReViS: Temporal Repetition Structure Aware Video Synthesis for Self-supervised Repetitive Action Counting}},
  year = {2026},
  eprint = {2609.24367},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.24367},
}
Figure