留言板

尊敬的读者、作者、审稿人, 关于本刊的投稿、审稿、编辑和出版的任何问题, 您可以本页添加留言。我们将尽快给您答复。谢谢您的支持!

姓名
邮箱
手机号码
标题
留言内容
验证码

改进的EfficientDet及直方图均衡化的工件检测算法研究

石林坤 田怀文 杨玉洁

石林坤,田怀文,杨玉洁. 改进的EfficientDet及直方图均衡化的工件检测算法研究[J]. 机械科学与技术,2023,42(9):1445-1454 doi: 10.13433/j.cnki.1003-8728.20220095
引用本文: 石林坤,田怀文,杨玉洁. 改进的EfficientDet及直方图均衡化的工件检测算法研究[J]. 机械科学与技术,2023,42(9):1445-1454 doi: 10.13433/j.cnki.1003-8728.20220095
SHI Linkun, TIAN Huaiwen, YANG Yujie. Study on Algorithm of Workpiece Detection via Improved EfficientDet and Histogram Equalization[J]. Mechanical Science and Technology for Aerospace Engineering, 2023, 42(9): 1445-1454. doi: 10.13433/j.cnki.1003-8728.20220095
Citation: SHI Linkun, TIAN Huaiwen, YANG Yujie. Study on Algorithm of Workpiece Detection via Improved EfficientDet and Histogram Equalization[J]. Mechanical Science and Technology for Aerospace Engineering, 2023, 42(9): 1445-1454. doi: 10.13433/j.cnki.1003-8728.20220095

改进的EfficientDet及直方图均衡化的工件检测算法研究

doi: 10.13433/j.cnki.1003-8728.20220095
详细信息
    作者简介:

    石林坤(1997−),硕士研究生,研究方向为深度学习,153604363@qq.com

    通讯作者:

    田怀文,教授,硕士生导师,hwtian@home.swjtu.edu.cn

  • 中图分类号: TP301

Study on Algorithm of Workpiece Detection via Improved EfficientDet and Histogram Equalization

  • 摘要: 针对流水线加工作业环境下工业机器人对工件检测及定位率较低,速度慢等问题,提出基于改进的EfficientDet工件检测神经网络模型。采用EfficientNet作为主干特征提取网络,利用Triplet Attention注意力机制代替原始的SE Attention机制,同时借鉴循环特征融合思想,采用Recursive-BiFPN循环特征融合网络结构。针对正负样本不均等问题,采用generalized focal loss改进原始focal loss损失函数。考虑到机械加工特定生产环境,采用直方图均衡化思想对数据进行对比度提高。最后利用工业相机建立自制数据集并进行模型训练,在复杂工业生产情况下,改进后的EfficientDet在mAP上较原始网络提高6.1%,同时速度提高到72 帧/s。最后实验结果表明,该算法在生产环境下能快速准确地对工件进行定位检测,为实际生产需要提供新的解决思路
  • 图  1  EfficientNet-B0网络结构图

    Figure  1.  EfficientNet-B0 network structural diagram

    图  2  MBConv卷积块结构图

    Figure  2.  MBConv convolutional block structure

    图  3  Triplet Attention结构

    Figure  3.  Triplet Attention structure

    图  4  FPN结构

    Figure  4.  FPN structure

    图  5  BiFPN结构

    Figure  5.  BiFPN structure

    图  6  Recursive-BiFPN结构

    Figure  6.  Recursive-BiFPN structure

    图  7  部分工件数据集

    Figure  7.  Partial workpiece dataset

    图  8  mixup增强结果

    Figure  8.  Mixup augmentation results

    图  9  IoU示意图

    Figure  9.  IoU schematic diagram

    图  10  AP结果模型对比图

    Figure  10.  AP comparison diagram of different model results

    图  11  注意力机制热力图

    Figure  11.  Heatmap of the attention mechanism

    图  12  对比度增强前

    Figure  12.  Image before contrast enhancement

    图  13  对比度增强后

    Figure  13.  Image after contrast enhancement

    图  14  算法流程图

    Figure  14.  Algorithm flowchart

    图  15  增强前后检测对比图

    Figure  15.  Detection comparison before and after enhancement

    图  16  不同网络模型检测结果对比

    Figure  16.  Comparison of the detection results of different network models

    图  17  相似性零件检测效果图

    Figure  17.  Similarity detection results

    表  1  工件检测模型对比

    Table  1.   Comparison of workpiece detection models

    模型 PRmAPIoUFPS
    SSD0.7930.8010.8230.81928.5
    Faster R-CNN0.8320.8380.8520.86512.05
    YOLOv30.7790.7490.7510.82134
    EfficientDet0.8580.8970.8210.86466
    Ours0.9360.9330.8820.90272
    下载: 导出CSV

    表  2  混淆矩阵计算结果

    Table  2.   Confusion matrix computation results

    工件 轴承螺栓垫片螺母螺钉弹簧
    轴承18506500
    螺栓022003220
    垫片30190301
    螺母05317530
    螺钉019042270
    弹簧00310192
    下载: 导出CSV

    表  3  增强前后mAP及IoU对比

    Table  3.   Comparison of mAP and IoU before andafter enhancement

    mAPIoU
    EfficientDet0.8210.864
    Ours without HE0.8400.873
    Ours with HE0.8820.902
    下载: 导出CSV
  • [1] 刘敬华, 钟佩思, 刘梅. 基于改进的SURF_FREAK算法的工件识别与抓取方法研究[J]. 机床与液压, 2019, 47(23): 52-55.

    LIU J H, ZHONG P S, LIU M. Research on workpiece recognition and grabbing method based on improved SURF_FREAK algorithm[J]. Machine Tool & Hydraulics, 2019, 47(23): 52-55. (in Chinese)
    [2] 江波, 徐小力, 吴国新, 等. 轮廓Hu不变矩的工件图像匹配与识别[J]. 组合机床与自动化加工技术, 2020(9): 104-107. doi: 10.13462/j.cnki.mmtamt.2020.09.023

    JIANG B, XU X L, WU G X, et al. Workpiece recognition and matching based on Hu invariant moment of workpiece contour[J]. Modular Machine Tool & Automatic Manufacturing Technique, 2020(9): 104-107. (in Chinese) doi: 10.13462/j.cnki.mmtamt.2020.09.023
    [3] 王卉, 徐小力, 左云波, 等. 基于多特征融合的HL-S工件识别算法[J]. 电子测量与仪器学报, 2019, 33(12): 94-99. doi: 10.13382/j.jemi.B1902522

    WANG H, XU X L, ZUO Y B, et al. HL-S workpiece identification algorithm based on multi-feature fusion[J]. Journal of Electronic Measurement and Instrumentation, 2019, 33(12): 94-99. (in Chinese) doi: 10.13382/j.jemi.B1902522
    [4] GIRSHICK R, DONAHUE J, DARRELL T, et al. Rich feature hierarchies for accurate object detection and semantic segmentation[C]//Proceedings of IEEE Conference on Computer Vision and Pattern Recognition. Columbus: IEEE, 2014: 580-587
    [5] REN S Q, HE K M, GIRSHICK R, et al. FasterR-CNN: towards real-time object detection with region proposal networks[C]//Proceedings of the 28th International Conference on Neural Information Processing Systems. Montreal: MIT Press, 2015: 91-99
    [6] REDMON J, FARHADI A. YOLOv3: an incremental improvement[EB/OL]. (2018-04-08).https://arxiv.org/abs/1804.02767
    [7] LIU W, ANGUELOV D, ERHAN D, et al. SSD: single shot MultiBox detector[C]//Proceedings of the 14th European Conference on Computer Vision. Amsterdam: Springer, 2016: 21-37
    [8] 孙乔, 温秀兰, 姚波, 等. 工业场景下基于深度学习的散乱堆叠工件识别[J]. 南京工程学院学报(自然科学版), 2020, 18(3): 1-5. doi: 10.13960/j.issn.1672-2558.2020.03.001

    SUN Q, WEN X L, YAO B, et al. Recognition of scattered stacked workpieces based on deep learning in industrial scenarios[J]. Journal of Nanjing Institute of Technology (Natural Science Edition), 2020, 18(3): 1-5. (in Chinese) doi: 10.13960/j.issn.1672-2558.2020.03.001
    [9] 李佳禧, 邱东, 杨宏韬, 等. 基于改进的YOLOv3的工件识别方法研究[J]. 组合机床与自动化加工技术, 2020(8): 92-96.

    LI J X, QIU D, YANG H T, et al. Research on identification method of workpiece based on improved YOLOv3 and deep separable convolutional networks[J]. Modular Machine Tool & Automatic Manufacturing Technique, 2020(8): 92-96. (in Chinese)
    [10] LAW H, DENG J. CornerNet: detecting objects as paired keypoints[J]. International Journal of Computer Vision, 2020, 128(3): 642-656. doi: 10.1007/s11263-019-01204-1
    [11] ZHOU X Y, WANG D Q, KRÄHENBÜHL P. Objects as points[EB/OL]. (2019-04-25).https://arxiv.org/abs/1904.07850
    [12] TAN M X, PANG R M, LE Q V. EfficientDet: scalable and efficient object detection[C]//IEEE/CVF Conference on Computer Vision and Pattern Recognition. Seattle: IEEE, 2020: 10778-10787
    [13] TAN M X, LE Q V. EfficientNet: rethinking model scaling for convolutional neural networks[C]//Proceedings of the 36th International Conference on Machine Learning. Long Beach: PMLR, 2019: 6105-6114
    [14] HU J, SHEN L, ALBANIE S, et al. Squeeze-and-excitation networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2020, 42(8): 2011-2023. doi: 10.1109/TPAMI.2019.2913372
    [15] SANDLER M, HOWARD A, ZHU M L, et al. MobileNetV2: inverted residuals and linear bottlenecks[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 4510-4520
    [16] WOO S, PARK J, LEE J Y, et al. CBAM: convolutional block attention module[C]//Proceedings of the 15th European Conference on Computer Vision (ECCV). Munich: Springer, 2018: 3-19
    [17] MISRA D, NALAMADA T, ARASANIPALAI A U, et al. Rotate to attend: convolutional triplet attention module[C]//Proceedings of the IEEE Winter Conference on Applications of Computer Vision (WACV). Waikoloa: IEEE, 2021: 3138-3147
    [18] LIN T Y, GOYAL P, GIRSHICK R, et al. Focal loss for dense object detection[C]//Proceedings of the IEEE International Conference on Computer Vision (ICCV). Venice: IEEE, 2017: 2999-3007
    [19] LI X, WANG W H, WU L J, et al. Generalized focal loss: learning qualified and distributed bounding boxes for dense object detection[C]//Proceedings of the 34th International Conference on Neural Information Processing Systems. Vancouver: Curran Associates Inc., 2020: 1763
    [20] LIN T Y, DOLLÁR P, GIRSHICK R, et al. Feature pyramid networks for object detection[C]//Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR). Honolulu: IEEE, 2017: 936-944
    [21] LIU S, QI L, QIN H F, et al. Path aggregation network for instance segmentation[C]//Proceedings of 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition. Salt Lake City: IEEE, 2018: 8759-8768
    [22] ZHAO Q J, SHENG T, WANG Y T, et al. M2Det: a single-shot object detector based on multi-level feature pyramid network[C]//Proceedings of the 33rd AAAI Conference on Artificial Intelligence. Honolulu: AAAI, 2019: 9259-9266
    [23] GHIASI G, LIN T Y, LE Q V. NAS-FPN: learning scalable feature pyramid architecture for object detection[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. Long Beach: IEEE, 2019: 7029-7038
    [24] ZHANG H Y, CISSE M, DAUPHIN Y N, et al. Mixup: beyond empirical risk minimization[C]//6th International Conference on Learning Representations. Vancouver: OpenReview. net, 2018
  • 加载中
图(17) / 表(3)
计量
  • 文章访问数:  159
  • HTML全文浏览量:  94
  • PDF下载量:  14
  • 被引次数: 0
出版历程
  • 收稿日期:  2021-07-30
  • 刊出日期:  2023-09-30

目录

    /

    返回文章
    返回