## 4 Experimental Results and Analysis
### Experimental Findings and Analysis of the Enhanced Network Model  
#### 4.3.1 Analysis of Experimental Results Introducing SimAM Attention Mechanism  
Three groups of contrastive experiments were conducted in this study to investigate the effectiveness of integrating the attention mechanism into the ShuffleNetv2 network model for non-coal foreign object recognition. The ShuffleNetv2 model, which is about to introduce the SimAM attention mechanism, is compared with the YOLOv8n model and baseline model YOLOv8n after replacing the backbone network with the ShuffleNetv2 network (abbreviated as YOLOv8n-SM, YOLOv8n, and YOLOv8n-shuffle, respectively). Then, the effects of embedding the SimAM attention module at positions 1, 2, and 3 in Figure 7 were discussed separately. Through the comparison of results in Table 2, it was observed that by using the lightweight convolutional network ShuffleNetv2 as the backbone of YOLOv8, the parameter count and FLOPs were reduced by 48.4% and 42.0%, respectively, while maintaining recognition accuracy. Subsequently, by introducing the SimAM attention mechanism after the two ShuffleNetv2 basic units' \(1\times 1\) convolutional modules, there was no escalation in parameters or computational intricacy. However, the precision, recall, and mAP were improved by 0.5%, 2%, and 0.2%, respectively. Based on Figure 8a,b, and in combination with Table 2, it can be obtained that the YOLOv8n-shuffle model and YOLOv8n-SM model show better convergence performance compared to the baseline YOLOv8n network model. They both reach a stable state after approximately 60 iterations. The YOLOv8n-SM model achieves a precision of 95.3% (an improvement of 1.5%), a recall of 90.0% (an improvement of 2.2%), and the highest recognition accuracy of 93.8% (an improvement of 1.5%). The activation heatmap provides clear visual evidence for the model's classification results, where deeper colors indicate that the model has focused more on the relevant regions, resulting in more accurate detection of the foreign object targets. This article extracts the thermal maps of YOLOv8n, YOLOv8n-shuffle, and YOLOv8-SM networks on the same layer (the sixth layer of YOLOv8n network; the sixth layer of YOLOv8n-shuffle and YOLOv8-SM networks: Stage3 layer). \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Models** & **Precision (\%)** & **Recall (\%)** & **mAP (\%)** & **Parameters (M)** & **FLOPs (G)** \\ \hline YOLOv8n & 93.8 & 87.8 & 92.3 & 3.1 & 8.1 \\ YOLOv8n-shuffle & 94.8 & 88.0 & 93.5 & 1.6 & 4.7 \\ YOLOv8n-SM 1 & 95.0 & 89.4 & 93.6 & 1.6 & 4.7 \\ YOLOv8n-SM 1 2 & 95.2 & 89.7 & 93.8 & 1.6 & 4.7 \\ YOLOv8n-SM 1 2 3 & **95.3** & **90.0** & **93.8** & **1.6** & **4.7** \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The results after introducing SimAM. Figure 8: The result curves of the three network models. (**a**) mAP result curve; (**b**) validation set classification loss curve. In the figure, the first row represents images of coal gangue, and the second row shows images of nuts. Figure 9 illustrates that the YOLOv8n model places greater emphasis on other object features, such as conveyor belts and rollers, which results in an increased inference speed and overall computational complexity during feature extraction. However, when using the lightweight ShuffleNetv2 network as the backbone, the model starts to pay attention to the feature regions where materials are conveyed on the conveyor belt. With the integration of the SimAM into the ShuffleNetv2 model, the attention is concentrated on the relevant feature regions of non-coal foreign objects, enhancing its ability to discern key features of the foreign objects. Additionally, Figure 9 demonstrates that the model with the introduced SimAM module can more accurately extract the feature information of non-coal foreign objects while effectively avoiding interference from non-essential features, such as background environments.