Real time detection of foreign objects in belt conveyors based on Faster-YOLOv7
-
摘要: 基于深度学习的目标检测算法在异物检测中具有较好的识别效果,但模型内存需求大,检测速度慢;轻量化深度学习网络能够大幅减少模型内存需求,提升检测速度,但在井下弱光环境中检测精度低。针对上述问题,提出了一种基于Faster−YOLOv7的带式输送机异物实时检测算法。通过限制对比度自适应直方图均衡化算法(CLAHE)进行图像增强,提高弱光环境中异物对比度;基于Mobilenetv3对YOLOv7主干网络进行轻量化设计,减少YOLOv7模型的计算量、参数量;添加有效通道注意力机制,缓解因特征通道数减少而导致的高层特征信息丢失问题;采用Alpha−IoU作为损失函数提高异物检测精度。实验结果表明:① Faster−YOLOv7的初始损失为0.143,最终稳定在0.039左右。② Faster−YOLOv7的检测速度可达42帧/s,较YOLOv5、YOLOv7分别提升了17,20帧/s;Faster−YOLOv7内存为14 MiB,较YOLOv5、YOLOv7分别降低了29,57 MiB;检测准确率达91.3%,较YOLOv5提升了8.8%。③ 将SSD、YOLOv5、轻量化YOLOv7、Faster−YOLOv7目标检测算法应用到煤矿井下带式输送机运煤图像及视频中,发现SSD在视频检测时发生了漏检现象,YOLO系列模型均有效地识别出待测异物,且Faster−YOLOv7识别结果的置信度更高。
-
关键词:
- 带式输送机 /
- 异物检测 /
- 图像增强 /
- Faster−YOLOv7 /
- 注意力机制 /
- Alpha−IoU损失函数 /
- 限制对比度自适应直方图均衡化算法
Abstract: The object detection algorithm based on deep learning has good recognition performance in foreign object detection. But the model memory requirement is large and the detection speed is slow. The lightweight deep learning networks can significantly reduce model memory requirements and improve detection speed. But their detection precision is low in weak light environments underground. In order to solve the above problems, a real-time foreign object detection algorithm for belt conveyors based on Faster-YOLOv7 is proposed. By using the contrast limited adaptive histogram equalization (CLAHE) with limited contrast for image enhancement, the contrast of foreign objects in low light environments is improved. Lightweight design of the YOLOv7 backbone network based on Mobilenetv3 is carried out to reduce the computational and parameter load of the YOLOv7 model. By adding an effective channel attention mechanism, the method alleviates the problem of high-level feature information loss caused by a decrease in the number of feature channels. Alpha-IoU is used as the loss function to improve the precision of foreign object detection. The experimental results show the following points. ① The initial loss of Faster-YOLOv7 is 0.143, and the final stability is around 0.039. ② The detection speed of Faster-YOLOv7 can reach 42 frames/s, which is 17 and 20 frames/s higher than YOLOv5 and YOLOv7, respectively. Faster-YOLOv7 has a memory of 14 MiB, which is 29 and 57 MiB lower than YOLOv5 and YOLOv7, respectively. The detection accuracy reaches 91.3%, which is 8.8% higher than YOLOv5. ③Applying SSD, YOLOv5, lightweight YOLOv7, and Faster-YOLOv7 object detection algorithms to the coal conveying images and videos of underground belt conveyors in coal mines, it is found that SSD misses detection during video detection. YOLO series models effectively recognized the foreign objects to be tested, and Faster-YOLOv7 recognition results has a higher confidence level. -
表 1 图像增强评价结果
Table 1. Evaluation results of image enhancement
评价指标 原图 CLAHE Brenner函数值 81.447 152.479 Energy of Gradient函数值 55.311 99.494 Roberts函数值 103.655 186.282 表 2 检测模型性能
Table 2. Detection model performance
模型 检测速度/(帧·s−1) 模型内存/MiB 准确率/% YOLOv5 25 43 82.5 YOLOv7 22 71 94.5 Faster−YOLOv7 42 14 91.3 表 3 消融实验结果
Table 3. Ablation test results
改进策略 准确率/% 检测速度/(帧·s−1) CLAHE ECA Alpha−IoU × × × 83.4 53 √ × × 85.8 49 × √ × 85.9 46 × × √ 85.1 48 √ √ √ 91.3 42 -
[1] 任志玲,朱彦存. 改进CenterNet算法的煤矿皮带运输异物识别研究[J]. 控制工程,2023,30(4):703-711.REN Zhiling,ZHU Yancun. Research on foreign object detection of coal mine belt transportation with improved CenterNet algorithm[J]. Control Engineering of China,2023,30(4):703-711. [2] 杜京义,陈瑞,郝乐,等. 煤矿带式输送机异物检测[J]. 工矿自动化,2021,47(8):77-83. doi: 10.13272/j.issn.1671-251x.2021040026DU Jingyi,CHEN Rui,HAO Le,et al. Coal mine belt conveyor foreign object detection[J]. Industry and Mine Automation,2021,47(8):77-83. doi: 10.13272/j.issn.1671-251x.2021040026 [3] 杜紫薇,周恒,李承阳,等. 面向深度卷积神经网络的小目标检测算法综述[J]. 计算机科学,2022,49(12):205-218. doi: 10.11896/jsjkx.220500260DU Ziwei,ZHOU Heng,LI Chengyang,et al. Small object detection based on deep convolutional neural networks:a review[J]. Computer Science,2022,49(12):205-218. doi: 10.11896/jsjkx.220500260 [4] 吴守鹏,丁恩杰,俞啸. 基于改进FPN的输送带异物识别方法[J]. 煤矿安全,2019,50(12):127-130.WU Shoupeng,DING Enjie,YU Xiao. Foreign body identificati on of belt based on improved FPN[J]. Safety in Coal Mines,2019,50(12):127-130. [5] 郝帅,张旭,马旭,等. 基于CBAM−YOLOv5的煤矿输送带异物检测[J]. 煤炭学报,2022,47(11):4147-4156.HAO Shuai,ZHANG Xu,MA Xu,et al. Foreign object detection in coal mine conveyor belt based on CBAM-YOLOv5[J]. Journal of China Coal Society,2022,47(11):4147-4156. [6] 任国强,韩洪勇,李成江,等. 基于FastYOLOv3算法的煤矿胶带运输异物检测[J]. 工矿自动化,2021,47(12):128-133.REN Guoqiang,HAN Hongyong,LI Chengjiang,et al. Foreign object detection in coal mine belt transportation based on FastYOLOv3 algorithm[J]. Industry and Mine Automation,2021,47(12):128-133. [7] 陈永,卢晨涛,王镇. 基于轻量级网络的铁路感兴趣区域异物侵限检测[J]. 吉林大学学报(工学版),2022,52(10):2405-2418.CHEN Yong,LU Chentao,WANG Zhen. Detection of foreign object intrusion in railway region of interest based on lightweight network[J]. Journal of Jilin University(Engineering and Technology Edition),2022,52(10):2405-2418. [8] 杨锦辉,李鸿,杜芸彦,等. 基于改进YOLOv5s的轻量化目标检测算法[J]. 电光与控制,2023,30(2):24-30. doi: 10.3969/j.issn.1671-637X.2023.02.005YANG Jinhui,LI Hong,DU Yunyan,et al. A lightweight object detection algorithm based on improved YOLOv5s[J]. Electronics Optics & Control,2023,30(2):24-30. doi: 10.3969/j.issn.1671-637X.2023.02.005 [9] 胡璟皓,高妍,张红娟,等. 基于深度学习的带式输送机非煤异物识别方法[J]. 工矿自动化,2021,47(6):57-62,90. doi: 10.13272/j.issn.1671-251x.2021020041HU Jinghao,GAO Yan,ZHANG Hongjuan,et al. Research on the identification method of non-coal foreign object of belt conveyor based on deep learning[J]. Industry and Mine Automation,2021,47(6):57-62,90. doi: 10.13272/j.issn.1671-251x.2021020041 [10] 陈宇梁,董绍江,孙世政,等. 改进YOLOv5的弱光水下生物目标检测算法[J/OL]. 北京航空航天大学学报:1-13[2023-01-11]. https://doi.org/10.13700/j.bh.1001-5965.2022.0322.CHEN Yuliang,DONG Shaojiang,SUN Shizheng,et al. Improved YOLOv5 low light underwater biological target detection algorithm [J/OL]. Journal of Beijing University of Aeronautics and Astronautics:1-13[2023-01-11]. https://doi.org/10.13700/j.bh.1001-5965.2022.0322. [11] WANG C Y,BOCHKOVSKIY Z,LIAO H Y M. YOLOv7:trainable bag-of-freebies sets new state-of-the-art for real-time object detectors[C]. IEEE/CVF Conference on Computer Vision and Pattern Recognition,Vancouver,2023:7464-7475. [12] 戚玲珑,高建瓴. 基于改进YOLOv7的小目标检测[J]. 计算机工程,2023,49(1):41-48.QI Linglong,GAO Jianling. Small object detection based on improved YOLOv7[J]. Computer Engineering,2023,49(1):41-48. [13] 成浪,敬超. 基于改进YOLOv7的X线图像旋转目标检测[J]. 图学学报,2023,44(2):324-334.CHENG Lang,JING Chao. X-ray image rotating object detection based on improved YOLOv7[J]. Journal of Graphics,2023,44(2):324-334. [14] DING Xiaohan,ZHANG Xiangyu,MA Ningning,et al. RepVGG:making VGG-style convnets great again[J]. Computer Vision and Pattern Recognition,2021. DOI: 10.1109/CVPR46437.2021.01352. [15] 赵元龙,单玉刚,袁杰. 改进YOLOv7与DeepSORT的佩戴口罩行人跟踪[J]. 计算机工程与应用,2023,59(6):221-230. doi: 10.3778/j.issn.1002-8331.2210-0479ZHAO Yuanlong,SHAN Yugang,YUAN Jie. Wearing mask pedestrian tracking based on improved YOLOv7 and DeepSORT[J]. Computer Engineering and Applications,2023,59(6):221-230. doi: 10.3778/j.issn.1002-8331.2210-0479 [16] 辛世澳,葛海波,袁昊,等. 改进YOLOv7的轻量化水下目标检测算法[J/OL]. 计算机工程与应用:1-16[2023-01-30]. http://kns.cnki.net/kcms/detail/11.2127.TP.20231025.1722.024.html.XIN Shi'ao,GE Haibo,YUAN Hao,et al. lmproved YOLOv7's lightweight underwater target detection algorithm [J/OL]. Computer Engineering and Applications:1-16[2023-01-30]. http://kns.cnki.net/kcms/detail/11.2127.TP.20231025.1722.024.html. [17] HOWARD A,SANDLER M,CHU G,et al. Searching for MobileNetV3[C]. IEEE/CVF International Conference on Computer Vision (ICCV),Seoul,2019:1314-1324. [18] WANG Qilong,WU Banggu,ZHU Pengfei,et al. ECA-Net:efficient channel attention for deep convolutional neural networks[C]. IEEE/CVF Conference on Computer Vision and Pattern Recognition,Seattle,2020:11534-11542. [19] 苑朝,赵亚冬,张耀,等. 基于YOLO轻量化的多模态行人检测算法[J/OL]. 图学学报:1-12[2023-01-30]. http://kns.cnki.net/kcms/detail/10.1034.T.20231026.1644.002.html.YUAN Chao,ZHAO Yadong,ZHANG Yao,et al. Base on YOLO lightweight multi-modal pedestrian detection algorithm [J/OL]. Journal of Graphics:1-12[2023-01-30]. http://kns.cnki.net/kcms/detail/10.1034.T.20231026.1644.002.html. [20] 王灏文,朴燕,王鈅,等. 改进YOLOv7的无明火森林烟雾检测算法[J/OL]. 计算机工程与应用:1-11[2023-01-30]. http://kns.cnki.net/kcms/detail/11.2127.TP.20231025.1637.020.html.WANG Haowen,PU Yan,WANG Yue,et al. Forest smoke detection method without open flames based on improved YOLOv7 [J/OL]. Computer Engineering and Applications:1-11[2023-01-30]. http://kns.cnki.net/kcms/detail/11.2127.TP.20231025.1637.020.html. [21] 高新阳,魏晟,温志庆,等. 改进YOLOv5轻量级网络的柑橘检测方法[J]. 计算机工程与应用,2023,59(11):212-221.GAO Xinyang,WEI Sheng,WEN Zhiqing,et al. Citrus detection method based on improved YOLOv5 lightweight network[J]. Computer Engineering and Applications,2023,59(11):212-221.