| The crowd counting task refers to the accurate estimation of the number of people in the image,which has high application value in traffic control,safety monitoring and environment research.In recent years,researchers have conducted in-depth research on crowd counting methods based on deep convolutional neural network,and the performance of crowd counting models has become more and more excellent.However,the generalization problem of the crowd counting task is rarely studied,and the application scope of the crowd counting method without generalization is very limited.Based on the above research background,this thesis explores the generalization problem of crowd counting task and proposes generalizable crowd counting methods.The main tasks done in this thesis are as follows:(1)There are style differences between images and fine-grained style differences within images,which reduce the generalization of the crowd counting model.To solve this problem,this thesis proposes the crowd counting method based on fine-grained style attention.First of all,the Instance-batch normalization module is used to filter out the style information.However,the existence of fine-grained style information leads to some content information being filtered out,and the incomplete content information affects the performance of the model.In order to restore the filtered content information,this thesis introduces the ensemble learning and attention mechanism and designs the diverse fine-grained style attention model.The attention map output of each integration sub-branch in the module focuses on the content information in different areas,and all the sub-branches cooperate with each other to extract the content information completely.In addition,since diversity is the key to ensemble learning,this thesis proposes a diversity learning strategy to ensure the output diversity of the diverse fine-grained style attention model.(2)The diverse fine-grained style attention model adopts an integration way that adds up all diverse content features,which may lead to feature redundancy and thus affect the model’s performance.To solve this problem,the crowd counting method based on gated integration is proposed.This thesis introduces the gating mechanism and designs the channel-level binary gating module.The module adaptively selects channel-level features from diverse content features,and selected features participate in integration,so as to avoid the feature redundancy while taking advantage of feature complementarity.In addition,strategies such as input-dependent guidance,diverse feature prior,and density grade classification constraint are proposed to further improve the accuracy and generalization of the channel-level binary gating module.(3)On the public datasets of crowd counting Shanghai Tech_A(SA),Shanghai Tech_B(SB),UCF_QNRF(UQ),and UCF_CCF50(UC),this thesis conducts generalization comparison experiments between the above crowd counting methods and other excellent crowd counting methods,and verifies the effectiveness of the proposed modules and strategies through ablation experiments.The results of the comparation experiments on the crowd counting method based on fine-grained style attention show that the method achieves the best Mean Absolute Error(MAE)and Mean Squared Error(MSE)on the generalization test group SA to SB,SB to SA,and UQ to SB and UC,that is,the best generalization effect is achieved,and the generalization effect is also ranked high in other test groups;the ablation experiments verifies the diverse content features and diversity learning strategy,and the experimental results prove their effectiveness.The results of the comparation experiments on the crowd counting method based on gated integration show that the method achieves the best MAE and best MSE on the generalization test group SA to UC,UQ to SB and the best MSE on test group UQ to UC,and the generalization effect on other test groups is also competitive;the ablation experiment verifies the proposed strategies of input-dependent guidance,diverse feature prior,and density grade classification constraint,and the experimental results show that these strategies improve the performance of the model. |