Foreign object detection and counting method for belt conveyor based on improved YOLOv8n+DeepSORT
-
摘要: 现有带式输送机异物检测方法存在提取目标语义信息能力弱、检测精度差等问题,且仅对异物进行识别检测,不能准确计算异物数量。针对该问题,设计了一种基于改进YOLOv8n+DeepSORT的带式输送机异物检测及计数方法。对YOLOv8n模型进行改进,再使用改进YOLOv8n(MSF−YOLOv8n)模型对带式输送机异物进行识别;将MSF−YOLOv8n模型的异物检测结果作为DeepSORT算法的输入,实现带式输送机异物跟踪和计数。YOLOv8n改进方法:使用C2f_MLCA模块替换主干网络中的C2f模块,提高网络在颜色信息单一环境下的信息提取能力;使用分离和增强注意力模块(SEAM)改进Head部分,以提高异物被遮挡情况下的检测精度;采用Focaler−IoU优化损失函数,解决检测目标形状差异大的问题。MSF−YOLOv8n模型性能验证实验结果表明,MSF−YOLOv8n模型的mAP50达93.2%,相较于基础模型提高了2.1%;参数量仅为2.82×106,比基础模型少了0.19×106,更适合部署到巡检机器人等边缘设备中;检测精度比YOLOv5s,YOLOv7,YOLOv8s算法分别高2.2%,1.3%,0.3%;其帧率虽然比YOLOv8s和YOLOv8n低,但仍可满足视频实时性检测要求。异物检测及计数实验结果表明,DeepSORT算法的准确率达80%,可准确跟踪被遮挡的锚杆及形状差异较大的目标。
-
关键词:
- 带式输送机 /
- 目标检测与跟踪 /
- 异物检测及计数 /
- MSF−YOLOv8n /
- DeepSORT
Abstract: The existing foreign object detection methods for belt conveyors have problems such as weak capability to extract object semantic information, poor detection precision, and only recognizing and detecting foreign objects. The methods cannot accurately calculate the number of foreign objects. In order to solve the above problems, a foreign object detection and counting method for belt conveyors based on improved YOLOv8n+DeepSORT has been designed. The method improves the YOLOv8n model and then uses the improved YOLOv8n model to recognize foreign objects in belt conveyors. The method uses the foreign object detection results of the improved YOLOv8n model as input for the DeepSORT algorithm to achieve foreign object tracking and counting on belt conveyors. YOLOv8n improvement method is replacing the C2f module in the backbone network with the C2f_MLCA module to improve the network's information extraction capability in a single color information environment. The method improves the head section using the separated and enhancement attention module (SEAM) to enhance the detection precision of foreign objects when they are obstructed. The method uses Focaler IoU optimization loss function to solve the problem of large differences in the shape of detection objects. The performance verification experiment results of MSF-YOLOv8n model show that the mAP50 of MSF-YOLOv8n model reaches 93.2%, which is 2.1% higher than the basic model. The parameter count is only 2.82×106, which is 0.19×106 less than the basic model, making it more suitable for deployment in edge devices such as inspection robots. The detection precision is 2.2%, 1.3%, and 0.3% higher than YOLOv5s, YOLOv7, and YOLOv8s algorithms, respectively. Although its frame rate is lower than YOLOv8s and YOLOv8n, it still meets the requirements of real-time video detection. The results of foreign object detection and counting experiments show that the DeepSORT algorithm has an accuracy rate of 80% and can accurately track occluded anchor rods and objects with significant shape differences. -
表 1 MSF−YOLOv8n训练参数设置
Table 1. MSF-YOLOv8n training parameter setting
参数 数值 参数 数值 epochs 300 lr 0.01 batch 8 optimizer SGD imgsz 640 weight_decay 0.0005 workers 8 momentum 0.937 表 2 消融实验结果
Table 2. Ablation experiment results
基础
网络C2f_
MLCADetect_
SEAMFocaler−CIoU mAP50/% 参数
量/106个帧率/
(帧·s−1)√ × × × 91.1 3.01 115 √ √ × × 91.9 3.01 105 √ × √ × 92.7 2.82 93 √ × × √ 89.1 3.01 117 √ √ √ × 92.9 2.82 97 √ √ √ √ 93.2 2.82 101 表 3 不同模型性能对比结果
Table 3. Comparison results of performance of different models
模型 mAP50/% 参数量/106个 帧率/(帧·s−1) YOLOv5s 91.0 9.12 91 YOLOv7 91.9 36.90 69.5 YOLOv8s 92.9 11.12 115 YOLOv8n 91.1 3.01 111 MSF−YOLOv8n 93.2 2.82 101 表 4 带式输送机异物计数结果
Table 4. Foreign object counting results of belt conveyor
算法 人工计数结果 模型计数结果 差值 准确率/% BYTETracker 10 17 7 30 HybridSORT 10 14 4 60 BoT−SORT 10 15 5 50 DeepSORT 10 12 2 80 -
[1] 王国法,杜毅博,徐亚军,等. 中国煤炭开采技术及装备50年发展与创新实践——纪念《煤炭科学技术》创刊50周年[J]. 煤炭科学技术,2023,51(1):1-18.WANG Guofa,DU Yibo,XU Yajun,et al. Development and innovation practice of China coal mining technology and equipment for 50 years:commemorate the 50th anniversary of the publication of Coal Science and Technology[J]. Coal Science and Technology,2023,51(1):1-18. [2] 邓军,李鑫,王凯,等. 矿井火灾智能监测预警技术近20年研究进展及展望[J]. 煤炭科学技术,2024,41(1):154-177.DENG Jun,LI Xin,WANG Kai,et al. Research progress and prospect of mine fire intelligent monitoring and early warning technology in recent 20 years[J]. Coal Science and Technology,2024,41(1):154-177. [3] 葛世荣,胡而已,李允旺. 煤矿机器人技术新进展及新方向[J]. 煤炭学报,2023,48(1):54-73.GE Shirong,HU Eryi,LI Yunwang. New progress and direction of robot technology in coal mine[J]. Journal of China Coal Society,2023,48(1):54-73. [4] 程德强,钱建生,郭星歌,等. 煤矿安全生产视频AI识别关键技术研究综述[J]. 煤炭科学技术,2023,51(2):349-365.CHENG Deqiang,QIAN Jiansheng,GUO Xingge,et al. Review on key technologies of AI recognition for videos in coal mine[J]. Coal Science and Technology,2023,51(2):349-365. [5] 吴守鹏,丁恩杰,俞啸. 基于改进FPN的输送带异物识别方法[J]. 煤矿安全,2019,50(12):127-130.WU Shoupeng,DING Enjie,YU Xiao. Foreign body identification of belt based on improved FPN[J]. Safety in Coal Mines,2019,50(12):127-130. [6] 郝帅,张旭,马旭,等. 基于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. [7] 高涵,赵培培,于正,等. 基于特征增强与Transformer的煤矿输送带异物检测[J]. 煤炭科学技术,2024,52(7):199-208.GAO Han,ZHAO Peipei,YU Zheng,et al. Coal mine conveyor belt foreign object detection based on feature enhancement and Transformer[J]. Coal Science and Technology,2024,52(7):199-208. [8] 蔡腾,陈慈发,董方敏. 结合Transformer和动态特征融合的低照度目标检测[J]. 计算机工程与应用,2024,60(9):135-141.CAI Teng,CHEN Cifa,DONG Fangmin. Low-light object detection combining transformer and dynamic feature fusion[J]. Computer Engineering and Applications,2024,60(9):135-141. [9] 杨豚,郭永存,王爽,等. 煤矿井下无人驾驶轨道电机车障碍物识别[J]. 浙江大学学报(工学版),2024,58(1):29-39.YANG Tun,GUO Yongcun,WANG Shuang,et al. Obstacle recognition of unmanned rail electric locomotive in underground coal mine[J]. Journal of Zhejiang University (Engineering Science),2024,58(1):29-39. [10] 王满利,杨爽,张长森. 基于改进YOLOv8n的立井刚性罐道接头错位检测算法[J/OL]. 煤炭科学技术:1-13[2024-06-23]. http://kns.cnki.net/kcms/detail/11.2402.TD.20231207.0926.002.html.WANG Manli,YANG Shuang,ZHANG Changsen. An improved YOLOv8n based detection algorithm for misalignment of vertical shaft rigid tank channel joints[J/OL]. Coal Science and Technology:1-13[2024-06-23]. http://kns.cnki.net/kcms/detail/11.2402.TD.20231207.0926.002.html. [11] 徐慈强,贾运红,田原. 基于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. [12] 陈伟,江志成,田子建,等. 基于YOLOv8的煤矿井下人员不安全动作检测算法[J/OL]. 煤炭科学技术:1-19[2024-06-23]. http://kns.cnki.net/kcms/detail/11.2402.td.20240322.1343.003.html.CHEN Wei,JIANG Zhicheng,TIAN Zijian,et al. Unsafe movement detection algorithm for coal mine underground personnel based on YOLOv8[J/OL]. Coal Science and Technology:1-19[2024-06-23]. http://kns.cnki.net/kcms/detail/11.2402.td.20240322.1343.003.html. [13] WAN Dahang,LU Rongsheng,SHEN Siyuan,et al. Mixed local channel attention for object detection[J]. Engineering Applications of Artificial Intelligence,2023,123. DOI:10.1016/j.engappai. 2023.106442. [14] 洪炎,汪磊,苏静明,等. 基于改进YOLOv8的煤矿输送带异物检测[J]. 工矿自动化,2024,50(6):61-69.HONG Yan,WANG Lei,SU Jingming,et al. Foreign object detection of coal mine conveyor belt based on improved YOLOv8[J]. Journal of Mine Automation,2024,50(6):61-69. [15] YU Ziping,HUANG Hongbo,CHEN Weijun,et al. YOLO-FaceV2:a scale and occlusion aware face detector[J]. Pattern Recognition,2024,155. DOI: 10.1016/j.patcog.2024.110714. [16] 张新月,胡广锐,李浦航,等. 基于改进YOLOv8n的轻量化红花识别方法[J]. 农业工程学报,2024,40(13):163-170.ZHANG Xinyue,HU Guangrui,LI Puhang,et al. Recognizing safflower using improved lightweight YOLOv8n[J]. Transactions of the Chinese Society of Agricultural Engineering,2024,40(13):163-170. [17] ZHANG Hao,ZHANG Shuaijie. Focaler-IoU:more focused intersection over union loss[EB/OL]. [2024-06-23]. https://arxiv.org/html/2401.10525v1. [18] 贾豆豆. 基于YOLOv5+DeepSort的小目标跟踪方法研究[D]. 太原:中北大学,2022.JIA Doudou. Research on small target tracking method based on YOLOv5+DeepSort[D]. Taiyuan:North University of China,2022. [19] 赵梓杉,桑海峰. 基于改进的YOLOv5的交通锥标检测系统[J]. 电子测量与仪器学报,2023,37(2):56-64.ZHAO Zishan,SANG Haifeng. Traffic cone detection system based on improved YOLOv5[J]. Journal of Electronic Measurement and Instrumentation,2023,37(2):56-64. [20] 程德强,徐进洋,寇旗旗,等. 融合残差信息轻量级网络的运煤皮带异物分类[J]. 煤炭学报,2022,47(3):1361-1369.CHENG Deqiang,XU Jinyang,KOU Qiqi,et al. Lightweight network based on residual information for foreign body classification on coal conveyor belt[J]. Journal of China Coal Society,2022,47(3):1361-1369. [21] 王宏伟,李进,闫志蕊,等. 基于图像与点云融合的巷道锚护孔位识别定位方法[J]. 煤炭科学技术,2024,52(5):249-261.WANG Hongwei,LI Jin,YAN Zhirui,et al. Roadway anchor hole recognition and positioning method based on image and point cloud fusion[J]. Coal Science and Technology,2024,52(5):249-261.