留言板

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

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

基于改进SSD的工件定位算法

李琳 符明恒 张铁 邹焱飚

李琳,符明恒,张铁,等. 基于改进SSD的工件定位算法[J]. 北京航空航天大学学报,2023,49(6):1260-1269 doi: 10.13700/j.bh.1001-5965.2021.0442
引用本文: 李琳,符明恒,张铁,等. 基于改进SSD的工件定位算法[J]. 北京航空航天大学学报,2023,49(6):1260-1269 doi: 10.13700/j.bh.1001-5965.2021.0442
LI L,FU M H,ZHANG T,et al. A workpiece location algorithm based on improved SSD[J]. Journal of Beijing University of Aeronautics and Astronautics,2023,49(6):1260-1269 (in Chinese) doi: 10.13700/j.bh.1001-5965.2021.0442
Citation: LI L,FU M H,ZHANG T,et al. A workpiece location algorithm based on improved SSD[J]. Journal of Beijing University of Aeronautics and Astronautics,2023,49(6):1260-1269 (in Chinese) doi: 10.13700/j.bh.1001-5965.2021.0442

基于改进SSD的工件定位算法

doi: 10.13700/j.bh.1001-5965.2021.0442
基金项目: 广东省科技计划(2020A0103010)
详细信息
    通讯作者:

    E-mail:merobot@scut.edu.cn

  • 中图分类号: TP391.7;TP249

A workpiece location algorithm based on improved SSD

Funds: Science and Technology Program of Guangdong Province (2020A0103010)
More Information
  • 摘要:

    工业机器人完成工件的拾取、分拣与装配等任务,需要获得准确的位置信息。而目标检测算法的回归损失函数的设定会直接影响预测框的定位准确性。针对SSD原始回归损失函数忽略4个边界信息的相关性及与评价指标IoU变化不匹配等问题,提出了一种基于改进SSD的工件定位算法。所提算法以高效交并比(EIoU)为SSD的回归损失函数,将4个边界信息作为一个整体,并添加了中心点损失和边长损失2个惩罚项分别表征预测框与真实框的中心点相对距离和边长差异,解决了边框回归不准确的问题。实验结果表明:所提算法能把定位平均误差控制在0.18 mm以内,误差峰值控制在0.76 mm以内。所提算法能有效提高工件的定位精度,适用于不同类型的工件或其他类似的定位任务,具有良好的工业应用前景。

     

  • 图 1  边框回归的IoU损失

    Figure 1.  IoU loss for bounding box regression

    图 2  预测框与真实框不相交的比较

    Figure 2.  Comparison of non-intersect between prediction box and ground truth box

    图 3  边框回归的GIoU损失

    Figure 3.  GIoU loss for bounding box regression

    图 4  不同的相对位置比较

    Figure 4.  Comparison of different relative positions

    图 5  不同的预测框形状比较

    Figure 5.  Comparison of different shapes of prediction boxes

    图 6  边框回归的CIoU损失

    Figure 6.  CIoU loss for bounding box regression

    图 7  边框回归的EIoU损失

    Figure 7.  EIoU loss for bounding box regression

    图 8  不同回归损失函数的比较

    Figure 8.  Comparison of different regression loss functions

    图 9  SSD网络结构

    Figure 9.  Network structure of SSD

    图 10  边框回归

    Figure 10.  Regression of bounding box

    图 11  不同类型的工件

    Figure 11.  Different kinds of workpieces

    图 12  标注流程

    Figure 12.  Flow chart of annotation

    图 13  定位误差

    Figure 13.  Location error

    图 14  不同类型工件的定位误差

    Figure 14.  Location errors of different kinds of workpieces

    图 15  工件定位实验平台及各部分之间的联系

    Figure 15.  Experimental platform of workpiece location and relationship between various parts

    图 16  工件定位流程

    Figure 16.  Flowchart of workpiece location

    图 17  工件中心点偏差预测

    Figure 17.  Prediction of workpiece center point offset

    图 18  不同损失函数的定位平均误差

    Figure 18.  Average location error of different regression loss functions

    表  1  不同类型回归损失函数工件定位性能的比较

    Table  1.   Comparisons of performance of different regression loss functions on workpiece location

    回归损失函数平均误差/mm最大误差/mm推理速度/fps
    Smooth L10.291.1917.74
    GIoU0.241.4514.12
    CIoU0.210.9814.51
    EIoU0.180.7614.31
     注:fps表示帧/s。
    下载: 导出CSV

    表  2  本文算法与原始SSD算法的定位误差比较

    Table  2.   Comparison of location errors with original SSD algorithm %

    类型最大误差相对降低比例平均误差相对降低比例
    GIoUCIoUEIoUGIoUCIoUEIoU
    类型-Ⅰ403843615861
    类型-Ⅱ202436253134
    类型-Ⅲ−5252601832
    类型-Ⅳ−67−1321−30−713
    下载: 导出CSV
  • [1] 杨桂华, 刘志毅, 王晓文. 基于机器视觉多目标工件分类识别和定位研究[J]. 机床与液压, 2021, 49(11): 82-86.

    YANG G H, LIU Z Y, WANG X W. Research on classification, recognition and localization of multi-objectiveworkpiece based on machine vision[J]. Machine Tool & Hydraulics, 2021, 49(11): 82-86(in Chinese).
    [2] 闫磊, 王萌, 韩章. 基于Halcon的工件定位抓取系统设计与开发[J]. 制造业自动化, 2020, 42(10): 46-48. doi: 10.3969/j.issn.1009-0134.2020.10.011

    YAN L, WANG M, HAN Z. Design and development of workpiece positioning and grabbing system based on Halcon[J]. Manufacturing Automation, 2020, 42(10): 46-48(in Chinese). doi: 10.3969/j.issn.1009-0134.2020.10.011
    [3] 李致金, 武鹏, 乔治, 等. 基于机器视觉的机器人工件定位系统[J]. 组合机床与自动化加工技术, 2019(12): 127-130. doi: 10.13462/j.cnki.mmtamt.2019.12.031

    LI Z J, WU P, QIAO Z, et al. Industrial robot positioning system based on machine vision[J]. Modular Machine Tool & Automatic Manufacturing Technique, 2019(12): 127-130(in Chinese). doi: 10.13462/j.cnki.mmtamt.2019.12.031
    [4] 钟佩思, 刘敬华, 刘梅, 等. 基于改进的加速鲁棒特征算法的工件定位方法[J]. 科学技术与工程, 2019, 19(5): 197-202. doi: 10.3969/j.issn.1671-1815.2019.05.030

    ZHONG P S, LIU J H, LIU M, et al. Workpiece positioning method of local fitting of orthogonal function based on binocular vision[J]. Science Technology and Engineering, 2019, 19(5): 197-202(in Chinese). doi: 10.3969/j.issn.1671-1815.2019.05.030
    [5] 陈岚萍, 刘寒寒, 马正华. 基于Halcon的普通工件目标检测方法[J]. 计算机工程与设计, 2018, 39(8): 2576-2581. doi: 10.16208/j.issn1000-7024.2018.08.031

    CHEN L P, LIU H H, MA Z H. Target detection method of common mechanical parts based on Halcon[J]. Computer Engineering and Design, 2018, 39(8): 2576-2581(in Chinese). doi: 10.16208/j.issn1000-7024.2018.08.031
    [6] 胡明星, 王小兰. 模板匹配优化耦合图像校正的旋转工件目标定位算法[J]. 组合机床与自动化加工技术, 2016(6): 35-38. doi: 10.13462/j.cnki.mmtamt.2016.06.009

    HU M X, WANG X L. The research and application on the rotary workpiece recognition based on canny detect and SIFT features[J]. Modular Machine Tool & Automatic Manufacturing Technique, 2016(6): 35-38(in Chinese). doi: 10.13462/j.cnki.mmtamt.2016.06.009
    [7] 罗辉, 崔亚飞. 基于机器视觉的工件识别与定位系统设计与实现[J]. 组合机床与自动化加工技术, 2021(1): 101-105. doi: 10.13462/j.cnki.mmtamt.2021.01.024

    LUO H, CUI Y F. Design and implementation of workpiece recognition and positioning system based on machine vision[J]. Modular Machine Tool & Automatic Manufacturing Technique, 2021(1): 101-105(in Chinese). doi: 10.13462/j.cnki.mmtamt.2021.01.024
    [8] 卜琰, 朱世强, 王志, 等. 基于改进形状上下文特征的工件识别与定位[J]. 机械工程与自动化, 2016(6): 40-41. doi: 10.3969/j.issn.1672-6413.2016.06.016

    BU Y, ZHU S Q, WANG Z, et al. Workpiece recognition and localization based on improved shape context features[J]. Mechanical Engineering & Automation, 2016(6): 40-41(in Chinese). doi: 10.3969/j.issn.1672-6413.2016.06.016
    [9] 刘信君, 林浒, 郑飂默, 等. 深度学习技术在工件自动检测中的应用[J]. 小型微型计算机系统, 2020, 41(4): 710-714. doi: 10.3969/j.issn.1000-1220.2020.04.007

    LIU X J, LIN H, ZHEN L M, et al. Application of deep learning in workpieces’ automatic detection[J]. Journal of Chinese Computer Systems, 2020, 41(4): 710-714(in Chinese). doi: 10.3969/j.issn.1000-1220.2020.04.007
    [10] ZHANG Z K, QI L. Object detection of artifact threaded hole based on Faster R-CNN[J]. Journal of Measurement Science and Instrumentation, 2021, 12(1): 107-114.
    [11] REN S, HE K M, GIRSHICK R, et al. Faster R-CNN: Towards real-time object detection with region proposal networks[J]. IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017, 39(6): 84-90.
    [12] 周伟亮, 王红军, 邹湘军. 基于视觉与激光结合的堆叠工件快速定位方法[J]. 组合机床与自动化加工技术, 2020(2): 101-104. doi: 10.13462/j.cnki.mmtamt.2020.02.024

    ZHOU W L, WANG H J, ZOU X J. Fast positioning method for stacked workpieces based on vision and laser[J]. Modular Machine Tool & Automatic Manufacturing Technique, 2020(2): 101-104(in Chinese). doi: 10.13462/j.cnki.mmtamt.2020.02.024
    [13] LIU W, ANGUELOV D, ERHAN D, et al. SSD: Single shot multibox detector[C]//Proceedings of European Conference on Computer Vision. Berlin: Springer, 2016: 21-37.
    [14] LI L, FU M H, ZHANG T, et al. Research on workpiece location algorithm based on improved SSD[J]. Industrial Robot, 2022, 49(1): 108-119. doi: 10.1108/IR-01-2021-0005
    [15] ZHANG Y F, REN W, ZHANG Z, et al. Focal and efficient IOU loss for accurate bounding box regression[C]//Proceedings of IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2021: 4321-4330.
    [16] YU J, JIANG Y, WANG Z, et al. UnitBox: An advanced object detection network[C]//Proceedings of the 24th ACM International Conference on Multimedia. New York: ACM, 2016: 516-520.
    [17] REZATOFIGHI H, TSOI N, GWAK J, et al. Generalized intersection over union: A metric and a loss for bounding box regression[C]//Proceedings of IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2019: 658-666.
    [18] ZHENG Z H, WANG P, LIU W, et al. Distance-IoU loss: Faster and better learning for bounding box regression[C]//AAAI Conference on Artificial Intelligence, 2020: 12993-13000.
    [19] 沈记全, 陈相均, 翟海霞. 改进交并比边界框回归损失的YOLOv3检测算法[J]. 计算机工程, 2022, 48(3): 236-243.

    SHEN J Q, CHEN X J, ZHAI H X. Improved bounding box regression loss of intersection over union for YOLOv3 detection algorithm[J]. Computer Engineering, 2022, 48(3): 236-243(in Chinese).
    [20] ZHENG T, ZHAO S, LIU Y, et al. SCALoss: Side and corner aligned loss for bounding box regression[C]//Proceedings of IEEE Conference on Computer Vision and Pattern Recognition. Piscataway: IEEE Press, 2021.
    [21] SUN D, YANG Y, LI M, et al. A scale balanced loss for bounding box regression[J]. IEEE Access, 2020, 8: 108438-108448. doi: 10.1109/ACCESS.2020.3001234
    [22] GIRSHICK R. Fast R-CNN[C]//Proceedings of the IEEE International Conference on Computer Vision. Piscataway: IEEE Press, 2015: 1440-1448.
  • 加载中
图(18) / 表(2)
计量
  • 文章访问数:  308
  • HTML全文浏览量:  67
  • PDF下载量:  59
  • 被引次数: 0
出版历程
  • 收稿日期:  2021-08-04
  • 录用日期:  2022-04-10
  • 网络出版日期:  2022-05-09
  • 整期出版日期:  2023-06-30

目录

    /

    返回文章
    返回
    常见问答