## 4 Experiments and Discussions
### Analysis of the Results  
Figure 9 shows that the results of training YOLOv5-S and YOLOv5-S on the homemade dataset improve in this paper. As can be seen from the figure, the precision decreases with an increase in recall. This occurs because P represents the ratio of the predicted true positive samples to the total samples predicted as positive by all classifiers. When the recall increases, the model identifies more positive cases as positive, but it also misclassifies more negative cases as positive, leading to a decrease in precision. By conducting a comparison, it is evident that the enhanced network structure discussed in this article achieves significantly higher precision (vertical axis) and recall (horizontal axis) results compared with YOLOv5-S. It also presents specific AP test results for each specific category of object in the dataset. The revised model surpassed the original model in the region enclosed by the P-R curve, both horizontally and vertically, indicating superior generalization performance and stronger feature extraction capabilities. Consequently, mAP experienced a 19.2 percent improvement. Simultaneously, the detection precision for the two categories of gangue, and coal and gangue, was also enhanced. By referring to Figure 9a, it is evident that the YOLOv5-S model exhibited superior identification capability for coal, with a precision as high as 0.926; the recognition performance for coal and gangue was moderate, with a precision of 0.716; and the recognition performance for gangue was the most inferior, with a precision of only 0.561. From Figure 9b, it can be observed that the enhanced YOLOv5-S model presented the best recognition performance for coal and gangue, with a precision as high as 0.919; the recognition performance for coal was moderate, with a precision of 0.896; and the recognition performance for gangue was inferior, with a precision of 0.811. To further validate the above indexes, the improved YOLOv5-S and YOLOv5-S were compared to detect the same batch of gangue materials in the actual production environment. Figure 10a shows the detection of gangue mixture material using the YOLOv5-S network, and Figure 10b shows the detection of the same batch of mixture material using the improved YOLOv5-S with labeled target categories and confidence levels. It was observed  
Figure 9: YOLOv5-S and improved YOLOv5-S average precision and recall rate comparison charts: (a) YOLOv5-S; (b) improved YOLOv5-S.  
that the improved YOLOv5-S network could identify and locate coal, gangue, and coal and gangue with higher confidence compared with the YOLOv5-S network, and had better identification results in the case of dense targets and many small targets. The YOLOv5-S network had a low confidence level, and the phenomenon of repeated recognition also occurred. Thus, the improved YOLOv5-S network had stronger target detection capability. As seen in Figure 11, the confidence level of 0.6 was considered as the reference point. Materials with a confidence level higher than 0.6 were identified as coal, while materials with a confidence level lower than 0.6 were classified as gangue. The DX-YOLOv5 recognition model analyzed the density, composition, and coordinates of the materials and transmitted this information to the host computer. According to the size of the gangue particles, the main computer determined the number of slide boards needed to track and separate the object gangue. It then sent a command to the intelligent slide board controller based on the time it took to identify the material and the velocity of the conveyor belt. When the object gangue reached the end of the belt, the control system activated the intelligent slide plate to extend, catch the gangue, and then retract. The gangue that was caught moved along the slide plate toward the gangue belt, while the coal pieces fell directly onto the coal belt. This process effectively separated the coal from the gangue. Figure 11: Collaborative control of intelligent identification and sorting of coal gangue.