Research on coal gangue recognition algorithm based on HGTC-YOLOv8n model
-
摘要: 现有基于深度学习的煤矸识别方法在煤矿井下低照度、高噪声及运动模糊等复杂工况下存在煤矸识别精度低、小目标煤矸容易漏检、模型参数量和运算量大,难以部署到计算资源有限的设备中等问题,提出了一种基于HGTC−YOLOv8n模型的煤矸识别算法。采用HGNetv2网络替换YOLOv8n的主干网络,通过多尺度特征的有效提取,提高煤矸识别效果并减少模型的存储需求和计算资源消耗;在主干网络中嵌入三重注意力机制模块Triplet Attention,捕获不同维度间的交互信息,增强煤矸图像目标特征的提取,减少无关信息的干扰;选用内容感知特征重组模块(CARAFE)来改进YOLOv8n颈部特征融合网络上采样算子,利用上下文信息提高感受视野,提高小目标煤矸识别准确率。实验结果表明:① HGTC−YOLOv8n模型的平均精度均值为93.5%,模型的参数量为2.645×106,浮点运算量为8.0×109 ,帧速率为79.36帧/s。② 平均精度均值较YOLOv8n模型提升了2.5%,参数量和浮点运算量较YOLOv8n模型分别下降了16.22%和10.11%。③ 与YOLO系列模型相比,HGTC−YOLOv8n模型的平均精度均值最高,且参数量和浮点运算量最少,检测速度较快,综合检测性能最佳。④ 基于HGTC−YOLOv8n模型的煤矸识别算法在煤矿井下复杂工况下,改善了煤矸识别精度低、小目标煤矸容易漏检等问题,满足煤矸图像实时检测要求。
-
关键词:
- 煤矸识别 /
- 小目标识别 /
- YOLOv8n /
- 内容感知特征重组模块 /
- 三重注意力机制 /
- Triplet Attention /
- HGNetv2
Abstract: The existing deep learning based coal gangue recognition methods have problems in complex working conditions such as low lighting, high noise, and motion blur in coal mines, such as low precision of coal gangue recognition, easy omission of small target coal gangue, large model parameter and computational complexity, and difficulty in deploying to devices with limited computing resources. A coal gangue recognition algorithm based on the HGTC-YOLOv8n model is proposed. The method replaces the backbone network of YOLOv8n with HGNetv2 network, effectively extracts multi-scale features to improve coal gangue recognition performance and reduces model storage requirements and computational resource consumption. The method embeds a Triplet Attention mechanism module in the backbone network to capture interaction information between different dimensions. The method enhances the extraction of target features in coal gangue images, and reduces the interference of irrelevant information. The method selects the content aware reassembly of features(CARAFE) to improve the upsampling operator of YOLOv8n neck feature fusion network, utilizing contextual information to enhance perceptual field of view and improve the accuracy of small target coal gangue recognition. The experimental results show the following points.① The average precision of the HGTC-YOLOv8n model is 93.5%, the parameters number of the model is 2.645×106, the number of floating-point operation is 8.0×109, and the frame rate is 79.36 frames/s. ② The average precision of the YOLOv8n model has increased by 2.5% compared to the YOLOv8n model, and the number of parameters and floating-point operations have decreased by 16.22% and 10.11%, respectively. ③ The comparison results with the YOLO series models show that the HGTC-YOLOv8n model has the highest average precision, the least number of parameters and floating-point operations, fast detection speed, and the best overall detection performance. ④ The coal gangue recognition algorithm based on the HGTC-YOLOv8n model has improved the low precision of coal gangue recognition and the easy omission of small target coal gangue under complex working conditions in coal mines. The method meets the requirements of real-time detection of coal gangue images. -
表 1 训练过程中数据增强的超参数
Table 1. Hyperparameters of data enhancement during training
超参数 值 色调增强 0.015 饱和度增强 0.7 亮度增强 0.4 随机缩放 0.5 水平翻转 0.5 水平平移 0.1 Mosic数据增强 1.0 表 2 消融实验结果
Table 2. Ablation experiment results
模型 HGNetv2 Triplet Attention CARAFE mAP/% 参数量/106 浮点运算量/109 帧速率/(帧·s−1) YOLOv8n × × × 91.0 3.157 8.9 81.96 优化模型1 √ × × 92.0 2.503 7.7 84.74 优化模型2 × √ × 92.8 3.157 8.9 80.00 优化模型3 × × √ 92.8 3.297 9.1 80.00 优化模型4 √ √ × 92.7 2.504 7.7 82.64 优化模型5 √ × √ 92.1 2.644 8.0 81.30 优化模型6 × √ √ 93.1 3.298 9.1 77.51 优化模型7 √ √ √ 93.5 2.644 8.0 79.36 表 3 不同模型的煤矸识别结果
Table 3. Coal gangue recognition results of different models
模型 参数量/106 浮点运算量/109 mAP/% 帧速率/(帧·s−1) YOLOv5s 7.025 16.0 92.7 73.52 YOLOv7−tiny 6.018 13.2 90.8 68.96 YOLOv8n 3.157 8.9 91.0 81.96 YOLOv8s 11.167 28.8 91.9 78.12 HGTC−YOLOv8n 2.645 8.0 93.5 79.36 -
[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]. 煤炭学报,2020,45(6):1909-1924.WANG Guofa,DU Yibo,REN Huaiwei,et al. Top level design and practice of smart coal mines[J]. Journal of China Coal Society,2020,45(6):1909-1924. [3] 冯来宏,李克相,顾雷雨,等. 我国井下智能干选技术装备发展及展望[J]. 煤炭工程,2023,55(9):11-15.FENG Laihong,LI Kexiang,GU Leiyu,et al. Development and prospect of underground intelligent dry separation technology and equipment in China[J]. Coal Engineering,2023,55(9):11-15. [4] 张创业,王晓川,刘庆军,等. 近全岩保护层开采煤矸井下分选及充填一体化技术研究与应用[J]. 煤炭工程,2023,55(10):6-11.ZHANG Chuangye,WANG Xiaochuan,LIU Qingjun,et al. Integrated technology of coal gangue underground separation and filling in full rock protection seam mining[J]. Coal Engineering,2023,55(10):6-11. [5] WANG Yuanbin,WANG Yujing,DANG Langfei. Video detection of foreign objects on the surface of belt conveyor underground coal mine based on improved SSD[J]. Journal of Ambient Intelligence and Humanized Computing,2020,14:5507-5516. [6] 王家臣,李良晖,杨胜利. 不同照度下煤矸图像灰度及纹理特征提取的实验研究[J]. 煤炭学报,2018,43(11):3051-3061.WANG Jiachen,LI Lianghui,YANG Shengli. Experimental study on gray and texture features extraction of coal and gangue image under different illuminance[J]. Journal of China Coal Society,2018,43(11):3051-3061. [7] 张红,李晨阳. 基于光学图像的煤矸石识别方法综述[J]. 煤炭工程,2022,54(7):159-163.ZHANG Hong,LI Chenyang. Review on coal gangue identification methods based on optical images[J]. Coal Engineering,2022,54(7):159-163. [8] 郜亚松,张步勤,郎利影. 基于深度学习的煤矸石识别技术与实现[J]. 煤炭科学技术,2021,49(12):202-208. doi: 10.3969/j.issn.0253-2336.2021.12.mtkxjs202112025GAO Yasong,ZHANG Buqin,LANG Liying. Coal and gangue recognition technology and implementation based on deep learning[J]. Coal Science and Technology,2021,49(12):202-208. doi: 10.3969/j.issn.0253-2336.2021.12.mtkxjs202112025 [9] 李娟莉,魏代良,李博,等. 基于深度学习轻量化的改进SSD煤矸快速分选模型[J]. 东北大学学报(自然科学版),2023,44(10):1474-1480.LI Juanli,WEI Dailiang,LI Bo,et al. Improved SSD rapid separation model of coal gangue based on deep learning and light-weighting[J]. Journal of Northeastern University(Natural Science),2023,44(10):1474-1480. [10] 李博,王学文,庞尚钟,等. 煤与矸石图像特征分析及试验研究[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. [11] 郭永存,王希,何磊,等. 基于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 [12] 徐志强,吕子奇,王卫东,等. 煤矸智能分选的机器视觉识别方法与优化[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. [13] 徐慈强,贾运红,田原. 基于MES−YOLOv5s的综采工作面大块煤检测算法[J]. 工矿自动化,2024,50(3):42-47,141.XU Ciqiang,JIA Yunhong,TIAN Yuan. Large block coal detection algorithm for fully mechanized working face based on MES-YOLOv5s[J]. Journal of Mine Automation,2024,50(3):42-47,141. [14] 张磊,王浩盛,雷伟强,等. 基于YOLOv5s−SDE的带式输送机煤矸目标检测[J]. 工矿自动化,2023,49(4):106-112.ZHANG Lei,WANG Haosheng,LEI Weiqiang. Coal gangue target detection of belt conveyor based on YOLOv5s-SDE[J]. Journal of Mine Automation,2023,49(4):106-112. [15] 邓天民,程鑫鑫,刘金凤,等. 基于特征复用机制的航拍图像小目标检测算法[J]. 浙江大学学报(工学版),2024,58(3):437-448.DENG Tianmin,CHENG Xinxin,LIU Jinfeng,et al. Small target detection algorithm for aerial images based on feature reuse mechanism[J]. Journal of Zhejiang University(Engineering Science),2024,58(3):437-448. [16] WANG Gang,CHEN Yanfei,AN Pei,et al. UAV-YOLOv8:a small-object-detection model based on improved YOLOv8 for UAV aerial photography scenarios[J]. Sensors,2023,23(16). DOI: 10.3390/S23167190. [17] ZHANG Lei,ZHENG Jiachun,LI Chaopeng,et al. CCDN-DETR:a detection transformer based on constrained contrast denoising for multi-class synthetic aperture radar object detection[J]. Sensors,2024,24(6). DOI: 10.3390/S24061793. [18] VORUGUNTI C S,PULABAIGARI V,GORTHI R K S S,et al. Osvfusenet:online signature verification by feature fusion and depth-wise separable convolution based deep learning[J]. Neurocomputing,2020,409:157-172. doi: 10.1016/j.neucom.2020.05.072 [19] 何凯,程刚,王希,等. 基于CED−YOLOv5s模型的煤矸识别方法研究[J]. 工矿自动化,2024,50(2):49-56,82.HE Kai,CHENG Gang,WANG Xi,et al. Research on coal gangue recognition method based on CED-YOLOv5s model[J]. Journal of Mine Automation,2024,50(2):49-56,82. [20] SHIMAA S,KHALID A,PAWEL P,et al. Graph convolutional network with triplet attention learning for person re-identification[J]. Information Sciences,2022,617:331-345. doi: 10.1016/j.ins.2022.10.105 [21] 王瑞婷,王海燕,陈晓,等. 基于混合卷积与三重注意力的高光谱图像分类网络[J]. 智能系统学报,2023,18(2):260-269.WANG Ruiting,WANG Haiyan,CHEN Xiao,et al. Hyperspectral image classification based on hybrid convolutional neural network with triplet attention[J]. CAAI Transactions on Intelligent Systems,2023,18(2):260-269. [22] WANG Jiaqi,CHEN Kai,LIU Ziwei,et al. Carafe++:unified content-aware reassembly of features[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence,2021,44(9):4674-4687. [23] 单慧琳,王硕洋,童俊毅,等. 增强小目标特征的多尺度光学遥感图像目标检测[J]. 光学学报,2024,44(6):382-394.SHAN Huilin,WANG Shuoyang,TONG Junyi,et al. Multi-scale optical remote sensing image target detection based on enhanced small target features[J]. Acta Optica Sinica,2024,44(6):382-394. [24] QIU Yongsheng,LU Yuanyao,WANG Yuantao,et al. IDOD-YOLOV7:image-dehazing YOLOV7 for object detection in low-light foggy traffic environments[J]. Sensors,2023,23(3). DOI: 10.3390/S23031347.