Count What You Want: Exemplar Identification and Few-shot Counting of Human Actions in the Wild
Yifeng Huang, Duc Duy Nguyen, Lam Nguyen, Cuong Pham, Minh Hoai
TL;DR
This work tackles counting specific human actions in wearable sensor data when the action class is not fixed. It introduces an exemplar-based framework where users vocalize predetermined counts ('one','two','three') to specify exemplars, then uses a multi-stage pipeline—exemplar extraction, per-window embeddings, exemplar similarity, exemplar-infused embedding, and density estimation—to produce a moment-by-moment density map whose sum yields the final count. Key contributions include a constrained exemplar extraction mechanism with dynamic programming, a distance-preserving loss to maintain embedding geometry, an exemplar-based data synthesis strategy, and a new Diverse Wearable Counting (DWC) dataset with synchronized audio and multi-modal data. Empirical results on DWC show the proposed method achieves substantially lower counting errors than frequency-based, RepNet, and TransRAC baselines, demonstrating strong generalization to unseen classes and subjects and highlighting practical viability for real-world wearable counting tasks.
Abstract
This paper addresses the task of counting human actions of interest using sensor data from wearable devices. We propose a novel exemplar-based framework, allowing users to provide exemplars of the actions they want to count by vocalizing predefined sounds ''one'', ''two'', and ''three''. Our method first localizes temporal positions of these utterances from the audio sequence. These positions serve as the basis for identifying exemplars representing the action class of interest. A similarity map is then computed between the exemplars and the entire sensor data sequence, which is further fed into a density estimation module to generate a sequence of estimated density values. Summing these density values provides the final count. To develop and evaluate our approach, we introduce a diverse and realistic dataset consisting of real-world data from 37 subjects and 50 action categories, encompassing both sensor and audio data. The experiments on this dataset demonstrate the viability of the proposed method in counting instances of actions from new classes and subjects that were not part of the training data. On average, the discrepancy between the predicted count and the ground truth value is 7.47, significantly lower than the errors of the frequency-based and transformer-based methods. Our project, code and dataset can be found at https://github.com/cvlab-stonybrook/ExRAC.
