Repetitive action counting (RAC) requires identifying complete cycles in continuous motion, but visual similarity is an unreliable cue for this: a pose can recur within a single cycle, and pauses or static backgrounds produce high similarity without any repetition. We argue that video diffusion models, which must capture how content evolves across frames in order to generate coherent motion, provide a better source of cross-frame relations. We present DiffRAC, which uses a Wan video diffusion transformer, adapted with LoRA and then frozen, as the motion encoder of a counting model. For each video window, DiffRAC reads the query--key attention affinities between time steps of the input clip from several denoiser layers and averages them along temporal lags. Regularly spaced lag responses, summarized by learned lag features, a periodogram, and period templates, yield a posterior over the cycle length. Conditioned on this posterior, a query-based decoder predicts whether the window is repeating (activity) and how fast it repeats (frequency); their product is a local counting rate. Rates from overlapping windows are averaged on the original timeline by coverage normalization, integrated into a count, and calibrated, and an optional evidence-gated refinement step can further update the count. DiffRAC reaches 74.3% off-by-one accuracy (OBO) on RepCount-A and 87.6% on UCFRep. Trained only on RepCount-A, it transfers to UCFRep and Countix with 82.4% and 73.9% OBO.
Figures & tables
Figure 1: Two RAC paradigms. (a) Representative methods regress density maps from feature self-similarity and sum them into counts. (b) DiffRAC uses video diffusion motion priors via cross-frame attention and period-aware readout, integrating local rates into crate before boundary correction and count calibration.
Figure 2: Overview of the DiffRAC query readout. (a) Wan, adapted with LoRA in Stage 1 and then frozen, extracts multi-layer temporal Q–K affinities A from a video window (Sec. 3.2 ). (b) The readout, trained in Stage 2, combines lag, spectral, and template evidence into a period distribution π (Sec. 3.3 ); learned queries read temporal tokens pooled from pair features C together with π and the frame timing, and predict activity aw and frequency fw , whose product is the window rate ρw (Sec. 3.4 ). (c) Overlapping rates are averaged per time bin, integrated, and calibrated into the count cq (Sec. 3.5 ).
Figure 3: From recurrence to count on a 14-second RepCount-A test clip with eight pull-ups , using one trained query readout. (a) Frames of repetitions 6 and 7. (b) Channel-averaged Q–K affinities of window W4. (c) Period posteriors of the five windows; circles mark modes, gold marks W4. (d) Window rates awfw in repetitions per second. (e) Coverage-normalized rate integral and calibrated prediction; the dashed line is the annotated total.
Method
Publication
Family
RepCount-A
Countix
UCFRep
nMAE ↓
OBO ↑
nMAE ↓
OBO ↑
nMAE ↓
OBO ↑
Published results (source-specific protocols)
RepNet [ 1 , 22 ]
CVPR 2020
RGB
0.331
53.29
0.364
69.66
0.209
73.33
TransRAC [ 2 ]
CVPR 2022
RGB
0.443
29.13
–
–
–
–
ESCounts [ 3 ]
ACCV 2024
RGB
0.213
56.30
0.276
67.30
0.216
70.40
IVAC-P2L [ 23 ]
TMM 2025
RGB
0.402
34.44
0.507
43.09
0.503
42.00
Table 1: Repetitive action counting on three benchmarks. OBO is in percent. Bold and underline mark the best and second-best value in each column. Published results follow the metric definitions and evaluation protocols of their sources. † DiffRAC on UCFRep uses action labels, annotated temporal crops, and two fixed per-video routing assignments (Sec. 3.6 ).
Figure 4: Cumulative counts on three RepCount-A test videos. Black: annotated cycle ends; blue dashed: integrated TransRAC density; green: DiffRAC’s coverage-normalized rate integral, with gray bins filled by its mean rate. Below each plot: rounded counts, and DiffRAC’s rate integral and final prediction.
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
Figure S1 : Two-stage training of DiffRAC. Stage 1 adapts Wan through LoRA using the flow-matching objective Ladapt , while keeping the pretrained DiT, VAE, and text encoder frozen. Stage 2 freezes the adapted encoder, including its LoRA parameters, and caches cross-frame Q–K affinities. The period-aware readout and count calibrator are then optimized on these fixed features with Lread , using count and cycle annotations as supervision. Snowflakes indicate frozen modules, and flames indicate trainable modules.
Figure S2 : Coverage-normalized rate integration on a constructed example. (a) Window rates, overlap-weighted bin rates and the resulting bin counts. The shaded interval marks [60,90) . Six bins illustrate the 64-bin grid used by DiffRAC. (b) The fused rate integral gives 8.955 cycles, compared with 12.10 from directly summing window counts. Both quantities precede boundary correction and calibration.
Setting
R1
R2
Input channels
96
96
Width
96
96
Inference window cap
8
8
Learning rate
3×10−4
10−5
Epoch budget
120
20
Selected epoch
88
1
Appendix
Table S1 : Query-readout configurations. R1 and R2 denote the initial and fine-tuned query readouts, respectively. Epoch indices start at zero. R1 uses a batch size of 8. Both runs use AdamW with weight decay 10−4 and gradient clipping at norm 1.
Term
R1
R2
Normalized count
1
1.2
Absolute count
0.02
0.02
Log count
0.30
0.70
Normalized density
0.05
0.10
Raw density
0.02
0.03
Window count
0.20
0.20
Appendix
Table S2 : Query-readout objective coefficients. The augmentation weight scales the additional readout objective evaluated on shuffled inputs.
Contrast
R1
R2
Q–K minus Self, P
[+17.76,+30.26]
[+18.42,+25.00]
Q–K minus Self, no P
[+18.42,+25.66]
[+20.39,+38.16]
Remove P from Q–K
[−13.16,+3.95]
[−8.55,−2.63]
Remove P from Self
[−6.58,−0.66]
[−19.08,−4.61]
Appendix
Table S3 : Variation across paired seeds. Minimum–maximum OBO differences across three matched seeds, in percentage points. Self denotes hidden-feature self-similarity and P the period branch. Removing P reports without minus with P.
Input
Integral ↑
+ Calibration ↑
Self + P
7.89
38.82
Q–K
25.88
57.68
Q–K + P
40.57
64.25
Appendix
Table S4 : R1 aggregation stages. Mean OBO (%) over three matched seeds on all 152 RepCount-A test videos. We hold each trained readout fixed and compare the rate integral with the output after boundary correction and calibration, before external fusion and the fixed count offset. Self denotes hidden-feature self-similarity and P the period branch.
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.
Fanqi Yu, Shengming Ma, Stefano Fiorini +4
AIGO Unit, Istituto Italiano di Tecnologia, Genoa, 16152, Italy · University of Genoa, Genoa, 16152, Italy · Independent Researcher, China +2
Counting how many times something happens is among the simplest questions about a video and among the hardest for video-language models, autoregressive and diffusion alike. The difficulty lies between the frames: a model samples only a few of them, while each repetition unfolds as movement in between. Video codecs already record this movement densely as block displacements, and codec-based video models use it to shape their visual input. We are the first to show that this motion provides direct evidence for the count: a candidate count is a testable motion hypothesis, and unwinding the cycles it implies measures how strongly the observed directions support it. We present CoDiCount, a unified training-free framework that turns this test into a count potential and applies it while a frozen diffusion vision-language model (dVLM) denoises its answer. At every denoising step, structured count messages map each option letter, or each grammar-valid edit of an open integer, to the count it expresses and reweight the model's own probabilities within that set. Consistent gains over the official decoders on MotionBench, TOMATO, and SVCBench demonstrate the broad generalization of CoDiCount across diffusion models, datasets, and diverse counting tasks. With CoDiCount, a 7B dVLM outperforms GPT-5.1 and Gemini-2.5-Pro on MotionBench, surpasses GPT-4o and much larger open models on TOMATO, and matches GPT-5.4 on SVCBench.
Zhuoqin Li, Jiayu Ding, Ge Li
Peking University Shenzhen Graduate School, Peking University · Harbin Institute of Technology, Shenzhen
Repetition counting requires identifying and enumerating action cycles over time. While state-of-the-art video language models describe actions fluently, they fail to reliably count how many times an action repeats. To investigate this limitation, we introduce RepProbe, a benchmark of 42K real and synthetic video clips containing exactly k in [1, 20] complete repetitions, with controls for clip position, temporal coverage, and duration. These controls allow us to study the counting failure directly and locate where in the model it arises. Counting accuracy collapses at high counts across the video language models we evaluate, and controlled experiments show this collapse is not explained by frame sampling alone. We compare model outputs with linear probes trained on the final-layer representations used to generate those outputs. We find a consistent representation-to-output dissociation: substantial count information remains linearly decodable even when models fail to report the correct count. Further analysis shows this failure arises primarily at the output stage, where answers concentrate on a small set of preferred numbers rather than the available count information. The dissociation holds on both real and synthetic videos and is not explained by clip duration, position, or scene content. These results indicate that models encode repetition structure but do not reliably report it in their outputs. Project page: https://arenaa.github.io/RepProbe-webpage/
Mahsa Khoshnoodi, Sarah Adel Bargal
Department of Computer Science, Georgetown University