Gramformer: Learning Crowd Counting via Graph-Modulated Transformer
Hui Lin, Zhiheng Ma, Xiaopeng Hong, Qinnan Shangguan, Deyu Meng
Abstract
Transformer has been popular in recent crowd counting work since it breaks the limited receptive field of traditional CNNs. However, since crowd images always contain a large number of similar patches, the self-attention mechanism in Transformer tends to find a homogenized solution where the attention maps of almost all patches are identical. In this paper, we address this problem by proposing Gramformer: a graph-modulated transformer to enhance the network by adjusting the attention and input node features respectively on the basis of two different types of graphs. Firstly, an attention graph is proposed to diverse attention maps to attend to complementary information. The graph is building upon the dissimilarities between patches, modulating the attention in an anti-similarity fashion. Secondly, a feature-based centrality encoding is proposed to discover the centrality positions or importance of nodes. We encode them with a proposed centrality indices scheme to modulate the node features and similarity relationships. Extensive experiments on four challenging crowd counting datasets have validated the competitiveness of the proposed method. Code is available at https://github.com/LoraLinH/Gramformer .
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext aeea9ce1-b2e5-4721-8531-08fec9d9bcbcCited by top-tier papers7
- Generative Adversarial Perturbations with Cross-paradigm Transferability on Localized Crowd CountingAlabi Mehzabin Anisha, Guangjing Wang, Sriram ChellappanCVPR 2026 · 1 citation
- Decoupling What to Count and Where to See for Referring Expression CountingYuda Zou, Zijian Zhang, Yongchao XuAAAI 2026
- 2D Gaussians Spatial Transport for Point-supervised Density RegressionMiao Shang, Xiaopeng HongAAAI 2026
- Beyond Strict Pairing: Arbitrarily Paired Training for High-Performance Infrared and Visible Image FusionYanglin Deng, Tianyang Xu, Chunyang Cheng, Hui Li et al.CVPR 2026
- Dual Mamba for Node-Specific Representation Learning: Tackling Over-Smoothing with Selective State Space ModelingXin He, Yili Wang, Yiwei Dai, Xin WangAAAI 2026
Builds on17
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Recipe for a General, Powerful, Scalable Graph TransformerLadislav Rampásek, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu et al.NeurIPS 2022 · 1,216 citations
- Vision GNN: An Image is Worth Graph of NodesKai Han, Yunhe Wang, Jianyuan Guo, Yehui Tang et al.NeurIPS 2022 · 668 citations
- Graph Neural Networks with Learnable Structural and Positional RepresentationsVijay Prakash Dwivedi, Anh Tuan Luu, Thomas Laurent, Yoshua Bengio et al.ICLR 2022 · 464 citations
- Representing Long-Range Context for Graph Neural Networks with Global AttentionZhanghao Wu, Paras Jain, Matthew A. Wright, Azalia Mirhoseini et al.NeurIPS 2021 · 450 citations
Related papers
- Clusformer: A Transformer Based Clustering Approach to Unsupervised Large-Scale Face and Visual Landmark RecognitionXuan-Bac Nguyen, Duc Toan Bui, Chi Nhan Duong, Tien D. Bui et al.CVPR 2021
- Learning Action-guided Spatio-temporal Transformer for Group Activity RecognitionWei Li, Tianzhao Yang, Xiao Wu, Xian-Jun Du et al.ACM MM 2022 · 21 citations
- Boosting Crowd Counting via Multifaceted AttentionHui Lin, Zhiheng Ma, Rongrong Ji, Yaowei Wang et al.CVPR 2022 · 229 citations
- Leveraging Contrastive Learning for Enhanced Node Representations in Tokenized Graph TransformersJinsong Chen, Hanpeng Liu, John E. Hopcroft, Kun HeNeurIPS 2024 · 23 citations
- T-former: An Efficient Transformer for Image InpaintingYe Deng, Siqi Hui, Sanping Zhou, Deyu Meng et al.ACM MM 2022 · 58 citations
