A method of coal gangue detection based on deep learning
-
摘要: 针对选煤场的煤矸分离中基于计算机视觉的煤矸石检测方法需要复杂的人工特征设计过程,在YOLOv3目标检测模型基础上,提出一种基于深度学习的端到端煤矸石检测方法。采用深度可分离卷积以及转置卷积对模型的骨干网络进行改进,以缩减模型大小并提高模型运行速度;加入空间金字塔池化模块,改善模型的特征融合能力;引入平衡L1损失函数和距离交并比损失函数,加速模型收敛并提高定位准确性。研究结果表明,所提算法能够实时精准地检测出煤与矸石混合体中的矸石,为提高煤炭质量、改进分拣效率提供有效保障。Abstract: In view of the requirement to separate gangue from coal in coal preparation factory and avoid complex artificial feature design process based on computer vision in the past, an end-to-end gangue detection method by deep learning based on YOLOv3 is proposed.In order to reduce the size and speed up the operation of YOLOv3, depth-wise separable convolution and transpose convolution are used to improve the backbone network of YOLOv3.In order to improve feature integration from different levels, the spatial pyramid pooling layer is added to the model.For the purpose of accelerating convergence and accurately locating objects in the model, balanced L1 loss and distance-IoU loss are introduced.The results show that the proposed algorithm can accurately detect the gangue from the mixture of coal and gangue in real time, which provides an effective guarantee for improving the quality of coal and sorting efficiency.
-
Key words:
- deep learning /
- YOLOv3 /
- balanced L1 loss function /
- distance-IoU loss function /
- coal gangue detection
-
表 1 Darknet-53中的残差块与Darknet-Squeeze中的fire module模块比较
Table 1. Comparison between the residual block in Darknet-53 and the fire module in Darknet-Squeeze
Darknet-53中残差块 Darknet-squeeze中fire module模块 输入 运算 输出 输入 运算 输出 h×w×k
h×w×k′1×1 Conv,Leaky
3×3 Conv,Leakyh×w×k′
h×w×k′h×w×k
$h \times w \times \frac{k^{\prime}}{2}$1×1 Conv
1×1 Conv +
3×3 Dwise,Leaky$h \times w \times \frac{{{k^\prime }}}{2}$
h×w×k′表 2 Darknet-53与Darknet-Squeeze比较
Table 2. Comparison between Darknet-53 and Darknet-Squeeze
骨干网络 P R F1 mAp 帧率/FPS Latency/ms FLOPs/G Params/M Darknet-53 52.3 81.4 63.7 66.8 30 33.3 32.7 61.5 Darknet-Squeeze 45.3 82.2 58.4 67.5 93 10.7 15.4 32.4 表 3 精度、速度和大小比较
Table 3. Comparisons of accuracy, speed and size
骨干网络 P R F1 mAp 帧率/FPS Latency/ms FLOPs/G Params/M Darknet-53 52.3 81.4 63.7 66.8 30 33.3 32.7 61.5 Darknet-Squeeze(DS) 45.3 82.2 58.4 67.5 93 10.7 15.4 32.4 DS + SPP 65.9 77.8 71.3 69.2 89 11.2 17 34.8 表 4 最终模型的检测结果
Table 4. Detection results of final model
骨干网络(Backbone) P R F1 mAp 帧率/FPS Latency/ms FLOPs/G Params/M Darknet-53 52.3 81.4 63.7 66.8 30 33.3 32.7 61.5 Darknet-Squeeze(DS) 45.3 82.2 58.4 67.5 93 10.7 15.4 32.4 DS + SPP 65.9 77.8 71.3 69.2 89 11.2 17 34.8 DS + SPP + BL1 +DIoU 57.3 83.7 68 72.7 89 11.2 17 34.8 -
[1] 孙继平. 煤矿安全生产监控与通信技术[J]. 煤炭学报, 2010, 35(11): 1925-1929. https://www.cnki.com.cn/Article/CJFDTOTAL-MTXB201011034.htmSun Jiping. Technologies of monitoring and communication in the coal mine[J]. Journal of China Coal Society, 2010, 35(11): 1925-1929. https://www.cnki.com.cn/Article/CJFDTOTAL-MTXB201011034.htm [2] 宋曦, 丁文梅, 宁云才, 等. 煤矿安全生产管理体系优化研究: 以陕西某煤矿为例[J]. 矿业科学学报, 2019, 4(2): 187-194. https://www.cnki.com.cn/Article/CJFDTOTAL-KYKX201902012.htmSong Xi, Ding Wenmei, Ning Yuncai, et al. Research on the optimization of coal mine safety production management system—take a coal mine in Shaanxi as an example[J]. Journal of Mining Science and Technology, 2019, 4(2): 187-194. https://www.cnki.com.cn/Article/CJFDTOTAL-KYKX201902012.htm [3] 杨捷, 武继龙, 晋俊宇. 矸石、粉煤灰高浓度料浆矸石颗粒悬浮性研究[J]. 矿业科学学报, 2019, 4(2): 127-132. https://www.cnki.com.cn/Article/CJFDTOTAL-KYKX201902005.htmYang Jie, Wu Jilong, Jin Junyu. Study on the suspended properties of gangue particles with high concentration of gangue and fly ash[J]. Journal of Mining Science and Technology, 2019, 4(2): 127-132. https://www.cnki.com.cn/Article/CJFDTOTAL-KYKX201902005.htm [4] 王卫东, 张楠, 靳立章. 超声波同步处理强化煤泥浮选的试验研究[J]. 矿业科学学报, 2019, 4(4): 357-364. https://www.cnki.com.cn/Article/CJFDTOTAL-KYKX201904010.htmWang Weidong, Zhang Nan, Jin Lizhang. Experiment study on fine coal slime flotation with simultaneous ultrasonic treatment[J]. Journal of Mining Science and Technology, 2019, 4(4): 357-364. https://www.cnki.com.cn/Article/CJFDTOTAL-KYKX201904010.htm [5] 程健, 王东伟, 杨凌凯, 等. 一种改进的高斯混合模型煤矸石视频检测方法[J]. 中南大学学报: 自然科学版, 2018, 49(1): 118-123. https://www.cnki.com.cn/Article/CJFDTOTAL-ZNGD201801016.htmCheng Jian, Wang Dongwei, Yang Lingkai, et al. An improved Gaussian mixture model for coal gangue video detection[J]. Journal of Central South University: Science and Technology, 2018, 49(1): 118-123. https://www.cnki.com.cn/Article/CJFDTOTAL-ZNGD201801016.htm [6] Huang S R, Bergström N, Yamakawa Y, et al. Applying high-speed vision sensing to an industrial robot for high-performance position regulation under uncertainties[J]. Sensors, 2016, 16(8): 1195. doi: 10.3390/s16081195 [7] Nandi C S, Tudu B P, Koley C. A machine vision-based maturity prediction system for sorting of harvested mangoes[J]. IEEE Transactions on Instrumentation and Measurement, 2014, 63(7): 1722-1730. doi: 10.1109/TIM.2014.2299527 [8] Bao S Q, Chung A C S. Multi-scale structured CNN with label consistency for brain MR image segmentation[J]. Computer Methods in Biomechanics and Biomedical Engineering: Imaging & Visualization, 2018, 6(1): 113-117. [9] Uijlings J R R, Sande K, Gevers T, et al. Selective search for object recognition[J]. International Journal of Computer Vision, 2013, 104(2): 154-171. doi: 10.1007/s11263-013-0620-5 [10] 刘富强, 钱建生, 王新红, 等. 基于图像处理与识别技术的煤矿矸石自动分选[J]. 煤炭学报, 2000, 25(5): 534-537. doi: 10.3321/j.issn:0253-9993.2000.05.020Liu Fuqiang, Qian Jiansheng, Wang Xinhong, et al. Automatic separation of waste rock in coal mine based on image procession and recognition[J]. Journal of China Coal Society, 2000, 25(5): 534-537. doi: 10.3321/j.issn:0253-9993.2000.05.020 [11] 于国防, 邹士威, 秦聪. 图像灰度信息在煤矸石自动分选中的应用研究[J]. 工矿自动化, 2012, 38(2): 36-39. https://www.cnki.com.cn/Article/CJFDTOTAL-MKZD201202013.htmYu Guofang, Zou Shiwei, Qin Cong. Application research of image gray information in automatic separation of coal and gangue[J]. Industry and Mine Automation, 2012, 38(2): 36-39. https://www.cnki.com.cn/Article/CJFDTOTAL-MKZD201202013.htm [12] Otsu N. A threshold selection method from gray-level histograms[J]. IEEE Transactions on Systems, Man, and Cybernetics, 1979, 9(1): 62-66. doi: 10.1109/TSMC.1979.4310076 [13] Canny J. A computational approach to edge detection[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 1986, 8(6): 679-698. http://www.researchgate.net/publication/301840781_A_computational_approach_to_edge_detection_IEEE_Transactions_on_Pattern_Analysis_and_Machine_Intelligence [14] Redmon J, Farhadi A. YOLOv3: an incremental improvement[EB/OL]. [2020-08-10]https://arxiv.org/abs/1804.02767,2018. [15] He K M, Zhang X Y, Ren S Q, et al. Deep residual learning for image recognition[C]//2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR). June 27-30, 2016, Las Vegas, NV, USA: IEEE, 2016: 770-778. [16] Iandola F N, Han S, Moskewicz M W, et al. SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and < 0.5MB model size[C]//International Conference on Learning Representations(ICLR), 2017. [17] Howard A G, Zhu M L, Chen B, et al. MobileNets: efficient convolutional neural networks for mobile vision applications[EB/OL]. [2020-08-19]https://arxiv.org/abs 1704.04861, 2017. [18] He K M, Zhang X Y, Ren S Q, et al. Spatial pyramid pooling in deep convolutional networks for visual recognition[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2015, 37(9): 1904-1916. doi: 10.1109/TPAMI.2015.2389824 [19] Liu S T, Huang D, Wang Y H. Learning spatial fusion for single-shot object detection[EB/OL]. [2020-08-19]https://arxiv.org/abs1911.09516,2019. [20] Cipolla R, Gal Y, Kendall A. Multi-task learning using uncertainty to weigh losses for scene geometry and semantics[C]//2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. June 18-23, 2018, Salt Lake City, UT, USA: IEEE, 2018: 7482-7491. [21] Pang J M, Chen K, Shi J P, et al. Libra R-CNN: towards balanced learning for object detection[C]//2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Long Beach, CA, USA: IEEE, 2019: 821-830. [22] Girshick R, Donahue J, Darrell T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation[C]//2014 IEEE Conference on Computer Vision and Pattern Recognition. Columbus, OH, USA. IEEE, 2014: 580-587. [23] Yu J H, Jiang Y N, Wang Z Y, et al. UnitBox: an advanced object detection network[C]// Proceedings of the 24th ACM international conference on Multimedia. Amsterdam The Netherlands. New York, NY, USA: ACM, 2016. [24] Rezatofighi H, Tsoi N, Gwak J, et al. Generalized intersection over union: a metric and a loss for bounding box regression[C]//2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR). Long Beach, CA, USA: IEEE, 2019: 658-666. [25] Zheng Z H, Wang P, Liu W, et al. Distance-IoU loss: faster and better learning for bounding box regression[J]. Proceedings of the AAAI Conference on Artificial Intelligence, 2020, 34(7): 12993-13000. doi: 10.1609/aaai.v34i07.6999