## 4 Experimental Results and Analyses
### Ablation Experiment
#### 4.3.2 Ablation Experiments Introducing EMA and EEMA into the Backbone Network  
EEMA is proposed based on EMA. For EMA, we made the following optimizations: First, after the two one-dimensional global pooling operations in the 1 \(\times\) 1 branch, a multi-head attention mechanism is added. This design avoids excessive reliance on linear enhancement while learning the relative importance of different positions in the same direction in a nonlinear way. Secondly, in the 3 \(\times\) 3 branch, an additional asymmetric convolution is introduced to enhance the branch's ability to understand spatial structure. These improvements further enhance EEMA's ability to capture feature relationships and process spatial information. To verify the effectiveness of the proposed EEMA, we designed three sets of experiments for testing. It should be noted that we classify the truncated VGG16 structure, MSFA module, and DMR module as \"Others\" and use \"MSE + Multi-level SSIM\" as the multi-level supervision method. Table 8 shows the model parameter amount and counting error under different settings. As can be seen from the table, the introduction of the attention mechanism has little effect on the increase in the number of parameters but can significantly reduce the counting error. Comparing the results of the first setting (no attention mechanism) with the last two settings (adding EMA and EEMA, respectively), it can be found that introducing the attention mechanism in the shallow feature network is effective because the shallow features contain more spatial information, which can help the model better distinguish the background from the object. Further analysis of the results of the last two settings shows that EEMA performs better than EMA, indicating that it has more advantages in capturing feature relationships and suppressing noise. To further provide an explanatory and intuitive understanding of this experiment, we show the heatmaps generated by the model under different attention mechanism settings in Figure 11. These heatmaps reflect the model's attention to different regions through the depth of color, and the darker the color, the higher the model's attention. The first column shows the original input image, and the next three columns correspond to the visualization results of the truncated VGG16 structure without using the attention mechanism, using EMA, and using EEMA. The experiments were conducted on grayscale images and color images to verify the applicability of the model under different input types, further enhancing the reliability of the experimental results. From the comparison of heat maps, it is evident that without the attention mechanism, the model exhibits minimal distinction in its attention to the head region and similar background areas. This issue is particularly pronounced in grayscale images, where the absence of key color features makes the model more susceptible to interference, such as leaves. Such interference results in dispersed attention areas or even misjudments. In contrast, incorporating the attention mechanism significantly enhances the model's focus on the head region, with EEMA demonstrating the most notable improvement. For instance, in the third image, the heat map without the attention mechanism shows the model's attention spreading to the circular stone carving on the white fence on the left and the leaf area in the center. When EMA is introduced, this interference is mitigated, though \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Setting**} & \multirow{2}{*}{**Params (M)**} & \multicolumn{2}{c}{**ShanghaiTech PartA**} & \multicolumn{2}{c}{**DTH**} \\ \cline{3-5}  & & **MAE** & **RMSE** & **MAE** & **RMSE** \\ \hline Others (Baseline) & 14.63 & 62.9 & 96.0 & 3.5 & 4.7 \\ Others + EMA & 14.72 & 59.4 & 89.8 & 3.3 & 4.7 \\ Others + EEMA (Ours) & 14.77 & **57.3** & **85.2** & **2.9** & **4.1** \\ \hline \hline \end{tabular} Note: the best results are highlighted in **bold**.  
\end{table}