Text-Guided Object Counting via Residual-Gated Shuffle Attention and Frequency Refinement
摘要
Text-guided object counting (TGOC) aims to estimate the number of target objects in real-world scenes using natural language descriptions. While transformer-based models have made progress in aligning text and visual data, they still face two key challenges. First, converting 2D visual features into 1D sequences disrupts spatial continuity and weakens local structural relationships. Second, methods focusing only on spatial information often miss valuable cues from frequency-based patterns, which are especially important in complex or cluttered scenes with overlapping objects. To address these issues, we propose FSA-Counter (Frequency-aware Shuffle Attention Counter), a new architecture that combines a Residual-Gated Shuffle Attention (RGSA) module with frequency-domain learning. The RGSA module enhances spatial feature learning through channel shuffling and group-wise gating, helping model long-range dependencies and suppress noise. Meanwhile, the Frequency-domain Information Enhancement (FIE) module transforms intermediate features into the frequency domain using Fast Fourier Transform. It separates the features into magnitude and phase components, applying affine transformations only to the magnitude to highlight useful spectral patterns, while preserving the original phase due to its sensitivity to noise. Experimental results on the FSC-147 and CARPK benchmarks show that FSA-Counter achieves state-of-the-art performance, significantly improving both accuracy and robustness compared to existing TGOC methods.