Research on coal gangue recognition method based on CED-YOLOv5s model
-
摘要: 由于煤矿井下高噪声、低照度、运动模糊的复杂工况和煤矸易聚集现象,导致煤矸目标检测模型特征提取困难及煤矸分类、定位不准确问题。针对该问题,提出一种基于CED−YOLOv5s模型的煤矸识别方法。首先,在YOLOv5s主干网络中引入坐标注意力 (CA) 机制,通过将坐标信息嵌入信道关系和长程依赖关系中对特征图进行编码,充分利用通道注意力信息和空间注意力信息,使模型更加关注重要特征,抑制无用信息。其次,在YOLOv5s的检测头部引入EIoU回归损失函数,将目标框与锚框的宽高差异最小化,以增强目标的位置和边界信息,提高模型在密集目标下的定位精度和收敛速度;最后,在YOLOv5s的检测头部引入轻量化解耦头,解耦出单独的特征通道,分别用于分类任务和回归任务,解决了原模型中耦合头部分类任务与回归任务的相互干扰问题,进一步提升了模型的并行运算效率与检测精度。实验结果表明: CED−YOLOv5s模型与其他YOLO系列目标检测模型相比,综合性能最佳,平均检测精度达94.8%,相较于YOLOv5s模型提升了3.1%,检测速度达84.8 帧/s,可充分满足煤矿井下煤矸实时检测需求。Abstract: Due to the complex working conditions of high noise, low illumination, and blurred movement in coal mines underground, as well as the phenomenon of coal gangue easily gathering, it is difficult to extract features from coal gangue object detection models. The classification and positioning of coal gangue are inaccurate. In order to solve the above problems, a coal gangue recognition method based on the CED-YOLOv5s model is proposed. Firstly, the coordinate attention (CA) mechanism is introduced into the YOLOv5s backbone network, which encodes feature maps by embedding coordinate information into channel relationships and long-range dependencies. The method fully utilizes channel attention information and spatial attention information to make the model focus more on important features and suppress irrelevant information. Secondly, the EIoU regression loss function is introduced in the detection head of YOLOv5s to minimize the width and height difference between the object box and anchor box. It enhances the position and boundary information of the object, improves the positioning precision and convergence speed of the model in dense objects. Finally, a lightweight decoupling head is introduced in the detection head of YOLOv5s, decoupling separate feature channels for classification and regression tasks. It solves the interference problem between the coupling head part of the class task and the regression task in the original model, further improving the parallel operation efficiency and detection precision of the model. The experimental results show that the CED-YOLOv5s model has the best overall performance compared to other YOLO series object detection models. It has an average detection precision of 94.8%, an improvement of 3.1% compared to the YOLOv5s model, and a detection speed of 84.8 frames/s. The results can fully meet the real-time detection requirements of coal gangue in coal mines.
-
表 1 消融实验结果
Table 1. Results of ablation experiments
模型 P/% R/% mAP/% T/ms A(YOLOv5s) 89.8 86.6 91.7 11.4 B(模型 A+CA) 91.0 88.8 93.2 9.8 C(模型 B+ EIoU) 91.6 88.2 93.9 10.0 D(模型 C+ Decoupled_ Detect) 91.7 90.9 94.8 11.8 表 2 对比实验结果
Table 2. Comparative experimental results
模型 mAP/% FPS Volume /MiB YOLOv5n 88.8 119.5 3.9 YOLOv5s 91.7 87.7 18.4 YOLOv5l 93.1 70.4 92.9 YOLOv7−tiny 89.1 88.5 12.3 YOLOv7 93.9 58.8 74.8 CED−YOLOv5s 94.8 84.8 24.6 -
[1] 谢和平,任世华,谢亚辰,等. 碳中和目标下煤炭行业发展机遇[J]. 煤炭学报,2021,46(7):2197-2211.XIE Heping,REN Shihua,XIE Yachen,et al. Development opportunities of the coal industry towards the goal of carbon neutrality[J]. Journal of China Coal Society,2021,46(7):2197-2211. [2] 王国法,刘峰,孟祥军,等. 煤矿智能化(初级阶段)研究与实践[J]. 煤炭科学技术,2019,47(8):1-36.WANG Guofa,LIU Feng,MENG Xiangjun,et al. Research and practice on intelligent coal mine construction(primary stage)[J]. Coal Science and Technology,2019,47(8):1-36. [3] 王国法,刘峰,庞义辉,等. 煤矿智能化——煤炭工业高质量发展的核心技术支撑[J]. 煤炭学报,2019,44(2):349-357.WANG Guofa,LIU Feng,PANG Yihui,et al. Coal mine intellectualization:the core technology of high quality development[J]. Journal of China Coal Society,2019,44(2):349-357. [4] 刘峰,曹文君,张建明. 持续推进煤矿智能化 促进我国煤炭工业高质量发展[J]. 中国煤炭,2019,45(12):32-36. doi: 10.3969/j.issn.1006-530X.2019.12.006LIU Feng,CAO Wenjun,ZHANG Jianming. Continuously promoting the coal mine intellectualization and the high-quality development of China's coal industry[J]. China Coal,2019,45(12):32-36. doi: 10.3969/j.issn.1006-530X.2019.12.006 [5] 王国法,任世华,庞义辉,等. 煤炭工业“十三五”发展成效与“双碳”目标实施路径[J]. 煤炭科学技术,2021,49(9):1-8.WANG Guofa,REN Shihua,PANG Yihui,et al. Development achievements of China's coal industry during the 13th Five-Year Plan period and future prospects[J]. Coal Science and Technology,2021,49(9):1-8. [6] 刘峰,曹文君,张建明,等. 我国煤炭工业科技创新进展及“十四五”发展方向[J]. 煤炭学报,2021,46(1):1-15.LIU Feng,CAO Wenjun,ZHANG Jianming,et al. Current technological innovation and development direction of the 14(th) Five-Year Plan period in China coal industry[J]. Journal of China Coal Society,2021,46(1):1-15. [7] PU Yuanyuan,APEL D B,SZMIGIEL A,et al. Image recognition of coal and coal gangue using a convolutional neural network and transfer learning[J]. Energies,2019,12(9). DOI: 10.3390/en12091735. [8] 雷世威,肖兴美,张明. 基于改进YOLOv3的煤矸识别方法研究[J]. 矿业安全与环保,2021,48(3):50-55.LEI Shiwei,XIAO Xingmei,ZHANG Ming. Research on coal and gangue identification method based on improved YOLOv3[J]. Mining Safety & Environmental Protection,2021,48(3):50-55. [9] 徐志强,吕子奇,王卫东,等. 煤矸智能分选的机器视觉识别方法与优化[J]. 煤炭学报,2020,45(6):2207-2216.XU Zhiqiang,LYU Ziqi,WANG Weidong,et al. Machine vision recognition method and optimization for intelligent separation of coal and gangue[J]. Journal of China Coal Society,2020,45(6):2207-2216. [10] 郭永存,王希,何磊,等. 基于TW−RN优化CNN的煤矸识别方法研究[J]. 煤炭科学技术,2022,50(1):228-236. doi: 10.3969/j.issn.0253-2336.2022.1.mtkxjs202201023GUO Yongcun,WANG Xi,HE Lei,et al. Research on coal and gangue recognition method based on TW-RN optimized CNN[J]. Coal Science and Technology,2022,50(1):228-236. doi: 10.3969/j.issn.0253-2336.2022.1.mtkxjs202201023 [11] 李博,王学文,庞尚钟,等. 煤与矸石图像特征分析及试验研究[J]. 煤炭科学技术,2022,50(8):236-246.LI Bo,WANG Xuewen,PANG Shangzhong,et al. Image characteristics analysis and experimental study of coal and gangue[J]. Coal Science and Technology,2022,50(8):236-246. [12] 赵明辉. 一种煤矸石优化识别方法[J]. 工矿自动化,2020,46(7):113-116.ZHAO Minghui. A coal-gangue optimization identification method[J]. Industry and Mine Automation,2020,46(7):113-116. [13] 沈科,季亮,张袁浩,等. 基于改进YOLOv5s模型的煤矸目标检测[J]. 工矿自动化,2021,47(11):107-111,118.SHEN Ke,JI Liang,ZHANG Yuanhao,et al. Research on coal and gangue detection algorithm based on improved YOLOv5s model[J]. Industry and Mine Automation,2021,47(11):107-111,118. [14] 张磊,王浩盛,雷伟强,等. 基于YOLOv5s−SDE的带式输送机煤矸目标检测[J]. 工矿自动化,2023,49(4):106-112.ZHANG Lei,WANG Haosheng,LEI Weiqiang,et al. Coal gangue target detection of belt conveyor based on YOLOv5s-SDE[J]. Journal of Mine Automation,2023,49(4):106-112. [15] LIN T-Y,DOLLAR P,GIRSHICK R B,et al. Feature pyramid networks for object detection[C]. IEEE Conference on Computer Vision and Pattern Recognition,Honolulu,2017:936-944. [16] LIU Shu,QI Lu,QIN Haifang,et al. Path aggregation network for instance segmentation[C]. IEEE/CVF Conference on Computer Vision and Pattern Recognition,Salt Lake City,2018:8759-8768. [17] HOU Qibin,ZHOU Daquan,FENG Jiashi. Coordinate attention for efficient mobile network design[C]. IEEE/CVF Conference on Computer Vision and Pattern Recognition,Nashville,2021:13708-13717. [18] ZHENG Zhaohui,WANG Ping,LIU Wei,et al. Distance-IoU loss:faster and better learning for bounding box regression[EB/OL]. [2023-08-12]. https://arxiv.org/abs/1911.08287v1. [19] ZHANG Yifan,REN Weiqiang,ZHANG Zhang,et al. Focal and efficient IOU loss for accurate bounding box regression[J]. Neurocomputing,2022,506:146-157. doi: 10.1016/j.neucom.2022.07.042 [20] SONG Guanglu,LIU Yu,WANG Xiaogang. Revisiting the sibling head in object detector[EB/OL]. [2023-08-12]. https://arxiv.org/abs/2003.07540. [21] WU Yue,CHEN Yinpeng,YUAN Lu,et al. Rethinking classification and localization for object detection[C]. IEEE/CVF Conference on Computer Vision and Pattern Recognition,Seattle,2020:10183-10192. [22] GE Zheng,LIU Songtao,WANG Feng,et al. YOLOX:exceeding YOLO series in 2021[EB/OL]. [2023-08-12]. https://arxiv.org/abs/2107.08430.