# Coal Ganguue Target Detection Based on Improved YOLOv5s
## 3 Experimental Results and Analysis
### Experimental Results and Analysis  
The loss function curve of the training process is shown in Figure 8, which shows that the improved network has a smaller loss function value during training than the original network and has a faster convergence rate.  
To further validate the effectiveness of the proposed method in this paper, a comparison was made with YOLOv5s, YOLOv5m, YOLOv5l, YOLOv5x, YOLOv7, YOLOv7x, SSD and SSD and Faster-RCNN [25; 26; 27]. The experimental parameters were uniformly set, with a training batch size of 16 and training period epoch of 60, and the validation set precision curve is shown in Figure 9. As can be seen from the figure, compared with other networks, DGSV-YOLOv5s-SA shows better performance under the same training period.  
The evaluation metrics of the experimental results were compared, as shown in Table 2. Compared with Yolov5s, YOLOV5m, YOLOV5l, YOLOv5x, Yolov7, YOLOv7x, SSD and Faster-RCNN, the _mAP_ value of DGSV-YOLOv5s-SA increased by 6.1%, 5.5%, 5.3%, 3.6%, 5.8%, 5.2%, 6.1% and 7.9%, respectively. In addition, inference speed, recall rate and \(F1\) value in the test set were also significantly improved.  
Figure 8: Training loss curve.  
Figure 7: Dataset images.  
The relationship between precision and inference speed is shown in Figure 10. YOLO series and SSD have faster inference speeds as single-stage detection networks, while Faster-RCNN, which is a two-stage target detection algorithm, performs poorly in terms of precision. This is largely due to the fact that the convolution volume of Faster-RCNN is too large, and the feature map obtained via the feature extraction network is a single one, which lacks the fusion of multi-level features. More convolution or pooling can result in a larger receptive field, but the coal gangue is close to the color of the conveyor belt, the edges of the target are not clear, and the over-convolution or pooling may also result in a loss of information, thus affecting the precision. It can be concluded that DGSV-YOLOV55-SA can enhance the feature extraction and fusion ability of the whole network and improve the performance of the network more comprehensively, resulting in higher detection precision of the coal gangue target and faster inference speed.  
To further validate the effectiveness of the method, ablation experiments were carried out on the proposed model to analyze the effect of each improvement module, and the experimental results are shown in Table 3. The compatibility of Slim-neck and SimAM with the coal gangue sorting dataset leads to faster inference speed, and the decoupled head reduces the inference speed somewhat due to a large number of parameters.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Model** & **F1 (\%)** & **R (\%)** & **FPS** & _[EMAIL_ADDRESS]:0.95(\%)_ \\ \hline YOLOv5s & 98.8 & 98.8 & 83.3 & 84.2 \\ YOLOv5m & 98.4 & 98.5 & 52.3 & 84.8 \\ YOLOv5l & 98.5 & 98.7 & 34.6 & 85.0 \\ YOLOv5x & 99.2 & 99.3 & 22.3 & 86.7 \\ YOLOv7 & 98.8 & 99.1 & 28 & 84.5 \\ YOLOv7x & 99.1 & 99.3 & 21.1 & 85.1 \\ SSD & 99.2 & 99 & 58.6 & 84.2 \\ Faster-RCNN & 98 & 99.4 & 7.9 & 82.4 \\ DGSV-YOLOv5s-SA & 99.7 & 99.7 & 86.6 & 90.3 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Comparison of experimental results by network.  
Figure 9: Training precision curve of each network.  
In order to further explore the training process of the neural network and observe the effect of the improved module more intuitively, the Grad-CAM [28] heat map algorithm was used for the visualization of the algorithm's feature map. As can be seen in Figure 11, the improved network model pays more attention to the global features and increases the receptive field; at the same time, irrelevant information about the background is suppressed. Moreover, the feature extraction is more comprehensive, which in turn improves the precision of coal gangue target detection.