Skip to main content

An End-to-End Transformer Model for Crowd Localization

  • Conference paper
  • First Online:
Computer Vision – ECCV 2022 (ECCV 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13661))

Included in the following conference series:

Abstract

Crowd localization, predicting head positions, is a more practical and high-level task than simply counting. Existing methods employ pseudo-bounding boxes or pre-designed localization maps, relying on complex post-processing to obtain the head positions. In this paper, we propose an elegant, end-to-end Crowd Localization TRansformer named CLTR that solves the task in the regression-based paradigm. The proposed method views the crowd localization as a direct set prediction problem, taking extracted features and trainable embeddings as input of the transformer-decoder. To reduce the ambiguous points and generate more reasonable matching results, we introduce a KMO-based Hungarian matcher, which adopts the nearby context as the auxiliary matching cost. Extensive experiments conducted on five datasets in various data settings show the effectiveness of our method. In particular, the proposed method achieves the best localization performance on the NWPU-Crowd, UCF-QNRF, and ShanghaiTech Part A datasets.

Project page at https://dk-liang.github.io/CLTR/.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 89.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 119.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Here, we ignore the \(\hat{C_j}\) for simply illustrating since heads usually report similar confidence score.

References

  1. Abousamra, S., Hoai, M., Samaras, D., Chen, C.: Localization in the crowd with topological constraints. In: Proceedings of the AAAI Conference on Artificial Intelligence (2021)

    Google Scholar 

  2. Carion, N., Massa, F., Synnaeve, G., Usunier, N., Kirillov, A., Zagoruyko, S.: End-to-end object detection with transformers. In: Vedaldi, A., Bischof, H., Brox, T., Frahm, J.-M. (eds.) ECCV 2020. LNCS, vol. 12346, pp. 213–229. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-58452-8_13

    Chapter  Google Scholar 

  3. Chen, Y., Liang, D., Bai, X., Xu, Y., Yang, X.: Cell localization and counting using direction field map. IEEE J. Biomed. Health Inf. 26(1), 359–368 (2021)

    Article  Google Scholar 

  4. Dosovitskiy, A., et al.: An image is worth 16\(\times \)16 words: transformers for image recognition at scale. In: Proceedings of International Conference on Learning Representations (2020)

    Google Scholar 

  5. Du, D., et al.: VisDrone-CC2020: the vision meets drone crowd counting challenge results. In: Bartoli, A., Fusiello, A. (eds.) ECCV 2020. LNCS, vol. 12538, pp. 675–691. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-66823-5_41

    Chapter  Google Scholar 

  6. Gao, J., Gong, M., Li, X.: Congested crowd instance localization with dilated convolutional swin transformer. arXiv preprint arXiv:2108.00584 (2021)

  7. Gao, J., Han, T., Wang, Q., Yuan, Y.: Domain-adaptive crowd counting via inter-domain features segregation and gaussian-prior reconstruction. arXiv preprint arXiv:1912.03677 (2019)

  8. Gao, J., Han, T., Yuan, Y., Wang, Q.: Learning independent instance maps for crowd localization. arXiv preprint arXiv:2012.04164 (2020)

  9. Gao, J., Wang, Q., Yuan, Y.: Scar: spatial-/channel-wise attention regression networks for crowd counting. Neurocomputing 363, 1–8 (2019)

    Article  Google Scholar 

  10. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In: Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition (2016)

    Google Scholar 

  11. Hu, P., Ramanan, D.: Finding tiny faces. In: Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition (2017)

    Google Scholar 

  12. Hu, Y., et al.: NAS-count: counting-by-density with neural architecture search. In: Vedaldi, A., Bischof, H., Brox, T., Frahm, J.-M. (eds.) ECCV 2020. LNCS, vol. 12367, pp. 747–766. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-58542-6_45

    Chapter  Google Scholar 

  13. Idrees, H., et al.: Composition loss for counting, density map estimation and localization in dense crowds. In: Proceedings of European Conference on Computer Vision (2018)

    Google Scholar 

  14. Kuhn, H.W.: The Hungarian method for the assignment problem. Naval Res. Logist. Q. 2(1–2), 83–97 (1955)

    Article  MathSciNet  Google Scholar 

  15. Laradji, I.H., Rostamzadeh, N., Pinheiro, P.O., Vazquez, D., Schmidt, M.: Where are the blobs: counting by localization with point supervision. In: Proceedings of European Conference on Computer Vision (2018)

    Google Scholar 

  16. Li, Y., Zhang, X., Chen, D.: CSRNet: dilated convolutional neural networks for understanding the highly congested scenes. In: Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition (2018)

    Google Scholar 

  17. Liang, D., Chen, X., Xu, W., Zhou, Y., Bai, X.: Transcrowd: weakly-supervised crowd counting with transformers. Sci. China Inf. Sci. 65(6), 1–14 (2022)

    Article  Google Scholar 

  18. Liang, D., Xu, W., Zhu, Y., Zhou, Y.: Focal inverse distance transform maps for crowd localization and counting in dense crowd. arXiv preprint arXiv:2102.07925 (2021)

  19. Liu, C., Weng, X., Mu, Y.: Recurrent attentive zooming for joint crowd counting and precise localization. In: Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition (2019)

    Google Scholar 

  20. Liu, L., Lu, H., Zou, H., Xiong, H., Cao, Z., Shen, C.: Weighing counts: sequential crowd counting by reinforcement learning. In: Proceedings of European Conference on Computer Vision (2020)

    Google Scholar 

  21. Liu, L., Qiu, Z., Li, G., Liu, S., Ouyang, W., Lin, L.: Crowd counting with deep structured scale integration network. In: Proceedings of IEEE International Conference on Computer Vision (2019)

    Google Scholar 

  22. Liu, W., Salzmann, M., Fua, P.: Context-aware crowd counting. In: Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition (2019)

    Google Scholar 

  23. Liu, X., et al.: End-to-end temporal action detection with transformer. IEEE Trans. Image Process. 31, 5427–5441 (2022)

    Article  Google Scholar 

  24. Liu, Y., Shi, M., Zhao, Q., Wang, X.: Point in, box out: beyond counting persons in crowds. In: Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition (2019)

    Google Scholar 

  25. Liu, Z., et al.: Swin transformer: hierarchical vision transformer using shifted windows. In: Proceedings of IEEE International Conference on Computer Vision, pp. 10012–10022 (2021)

    Google Scholar 

  26. Liu, Z., et al.: Visdrone-cc2021: the vision meets drone crowd counting challenge results. In: Proceedings of IEEE International Conference on Computer Vision, pp. 2830–2838 (2021)

    Google Scholar 

  27. Ma, Z., Wei, X., Hong, X., Gong, Y.: Bayesian loss for crowd count estimation with point supervision. In: Proceedings of IEEE International Conference on Computer Vision (2019)

    Google Scholar 

  28. Meng, D., et al.: Conditional detr for fast training convergence. In: Proceedings of IEEE International Conference on Computer Vision, pp. 3651–3660 (2021)

    Google Scholar 

  29. Ren, S., He, K., Girshick, R., Sun, J.: Faster r-cnn: towards real-time object detection with region proposal networks. In: Proceedings of Advances in Neural Information Processing Systems (2015)

    Google Scholar 

  30. Ribera, J., Güera, D., Chen, Y., Delp, E.J.: Locating objects without bounding boxes. In: Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition (2019)

    Google Scholar 

  31. Sam, D.B., Peri, S.V., Sundararaman, M.N., Kamath, A., Radhakrishnan, V.B.: Locate, size and count: accurately resolving people in dense crowds via detection. IEEE Trans. Pattern Anal. Mach. Intell. 43, 2739–2751 (2020)

    Google Scholar 

  32. Sindagi, V.A., Patel, V.M.: Multi-level bottom-top and top-bottom feature fusion for crowd counting. In: Proceedings of IEEE International Conference on Computer Vision (2019)

    Google Scholar 

  33. Sindagi, V.A., Yasarla, R., Patel, V.M.: Jhu-crowd++: large-scale crowd counting dataset and a benchmark method. IEEE Trans. Pattern Anal. Mach. Intell. 44, 2594–2609 (2020)

    Google Scholar 

  34. Song, Q., et al.: Rethinking counting and localization in crowds: a purely point-based framework. In: Proceedings of IEEE International Conference on Computer Vision, pp. 3365–3374 (2021)

    Google Scholar 

  35. Sun, G., Liu, Y., Probst, T., Paudel, D.P., Popovic, N., Van Gool, L.: Boosting crowd counting with transformers. arXiv preprint arXiv:2105.10926 (2021)

  36. Tian, Y., Chu, X., Wang, H.: Cctrans: simplifying and improving crowd counting with transformer. arXiv preprint arXiv:2109.14483 (2021)

  37. Touvron, H., Cord, M., Douze, M., Massa, F., Sablayrolles, A., Jégou, H.: Training data-efficient image transformers & distillation through attention. In: Proceedings of International Conference on Machine Learning, pp. 10347–10357. PMLR (2021)

    Google Scholar 

  38. Wan, J., Chan, A.: Modeling noisy annotations for crowd counting. Adv. Neural Inf. Process. Syst. 33, 3386–3396 (2020)

    Google Scholar 

  39. Wan, J., Liu, Z., Chan, A.B.: A generalized loss function for crowd counting and localization. In: Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition, pp. 1974–1983 (2021)

    Google Scholar 

  40. Wan, J., Wang, Q., Chan, A.B.: Kernel-based density map generation for dense object counting. IEEE Trans. Pattern Anal. Mach. Intell. 44, 1357–1370 (2020)

    Article  Google Scholar 

  41. Wang, B., Liu, H., Samaras, D., Hoai, M.: Distribution matching for crowd counting. In: Proceedings of Advances in Neural Information Processing Systems (2020)

    Google Scholar 

  42. Wang, Q., Gao, J., Lin, W., Li, X.: Nwpu-crowd: a large-scale benchmark for crowd counting and localization. IEEE Trans. Pattern Anal. Mach. Intell. 43, 2141–2149 (2020)

    Article  Google Scholar 

  43. Wang, Q., Gao, J., Lin, W., Yuan, Y.: Learning from synthetic data for crowd counting in the wild. In: Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition (2019)

    Google Scholar 

  44. Wang, Y., Hou, J., Hou, X., Chau, L.P.: A self-training approach for point-supervised object detection and counting in crowds. IEEE Trans. Image Process. 30, 2876–2887 (2021)

    Article  Google Scholar 

  45. Wen, L., et al.: Detection, tracking, and counting meets drones in crowds: a benchmark. In: Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition, pp. 7812–7821 (2021)

    Google Scholar 

  46. Xu, C., et al.: Autoscale: learning to scale for crowd counting. Int. J. Comput. Vision 130, 1–30 (2022)

    Article  Google Scholar 

  47. Xu, C., Qiu, K., Fu, J., Bai, S., Xu, Y., Bai, X.: Learn to scale: generating multipolar normalized density map for crowd counting. In: Proceedings of IEEE International Conference on Computer Vision (2019)

    Google Scholar 

  48. Zhang, Y., Zhou, D., Chen, S., Gao, S., Ma, Y.: Single-image crowd counting via multi-column convolutional neural network. In: Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition (2016)

    Google Scholar 

Download references

Acknowledgment

This work was supported by National Key R &D Program of China (Grant No. 2018YFB1004602).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xiang Bai .

Editor information

Editors and Affiliations

1 Electronic supplementary material

Below is the link to the electronic supplementary material.

Supplementary material 1 (pdf 214 KB)

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Liang, D., Xu, W., Bai, X. (2022). An End-to-End Transformer Model for Crowd Localization. In: Avidan, S., Brostow, G., Cissé, M., Farinella, G.M., Hassner, T. (eds) Computer Vision – ECCV 2022. ECCV 2022. Lecture Notes in Computer Science, vol 13661. Springer, Cham. https://doi.org/10.1007/978-3-031-19769-7_3

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-19769-7_3

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-19768-0

  • Online ISBN: 978-3-031-19769-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics