# Spatial and Channel Similarity-Aware Attention-Enhanced Network for Object Counting
## 5 Conclusions  
To address the challenge of feature extraction under few-shot conditions caused by the diversity of object angles, this study proposes SCSAEN. In response to the limitation of limited training samples, the network adopts a similarity-matching strategy, which significantly enhances its effectiveness. The network architecture is mainly composed of three key components: a backbone, a similarity feature extraction and processing module,  
Figure 6: Visualisation of similarity maps for FamNet and SCSAEN. From left to right: query image, similarity map by FamNet, and our result. and a density map prediction module. Within the similarity feature extraction and processing module, two novel components, the SSA and the CAE, are introduced. SSA extracts object features across multiple directions in the comparison space by employing slice-wise convolutions. Just as the human visual system can observe objects from various angles, SSA overcomes the difficulties in feature extraction caused by angular variations of objects in the spatial dimension. Using four publicly available datasets, SSA helps the model to capture features more comprehensively, resulting in a more accurate representation of objects with different orientations. CAE, as a complementary module to SSA in the channel dimension, leverages attention mechanisms to strengthen critical channel features. It further enhances the model's ability to capture object characteristics. In the experiments, CAE improves the model's sensitivity to important channels, which is reflected in the better discrimination ability of different object features. Extensive experiments conducted on four public datasets demonstrate that the SCSAEN achieves an outstanding counting performance. Specifically, compared with several methods such as FamNet, FCN, VLCounter, CSRNet, and SAFECount, the SCSAEN reduces both the MAE and the RMSE to varying degrees. These results offer a novel and effective solution for accurate object counting under challenging conditions, especially in scenarios with few-shot samples and diverse object angles. Conceptualization, R.L. and C.W. ; methodology, R.L. ; software, R.L. ; validation, R.L. ; formal analysis, J.L. ; investigation, W.Z. ; resources, W.Z. ; data curation, W.Z. ; writing--original draft preparation, R.L. ; writing--review and editing, C.W. ; visualization, W.Z. ; supervision, J.L. ; project administration, C.W. ; funding acquisition, C.W. All authors have read and agreed to the published version of the manuscript. This research was supported by grants from the Natural Science Foundation of Shandong Province, China (ZR2020 MF136), the Qingdao Natural Science Foundation (23-2-1-162-zyyd-jch), the First Karamay City Science and Technology Innovation Talent-Core Science and Technology Innovation Talent, and the National Natural Science Foundation of China (No. 62176182). Not applicable. The datasets used for the proposed method are the publicly available TRANCOS dataset ([[https://gram.web.uah.es/data/datasets/trancos/index.html](https://gram.web.uah.es/data/datasets/trancos/index.html)]([https://gram.web.uah.es/data/datasets/trancos/index.html](https://gram.web.uah.es/data/datasets/trancos/index.html))), CARPK dataset ([[https://lafi.github.io/LPN/](https://lafi.github.io/LPN/)]([https://lafi.github.io/LPN/](https://lafi.github.io/LPN/))), PUCPR+ dataset ([[https://lafi.github.io/LPN/](https://lafi.github.io/LPN/)]([https://lafi.github.io/LPN/](https://lafi.github.io/LPN/))) and UCSD dataset ([[http://www.svcl.ucsd.edu/projects/anomaly/dataset.htm](http://www.svcl.ucsd.edu/projects/anomaly/dataset.htm)]([http://www.svcl.ucsd.edu/projects/anomaly/dataset.htm](http://www.svcl.ucsd.edu/projects/anomaly/dataset.htm))).