Weld seam recognition method based on fully convolutional neural network
-
摘要: 在机器人自动化焊接中,精准高效的焊缝识别是实现高质量焊接的关键。针对现有视觉检测方法效率低、精度差的问题,提出了一种基于全卷积神经网络的焊缝识别方法。该方法首先采集数据对全卷积神经网络进行训练,得到最佳的网络参数;然后采用训练好的全卷积神经网络和最佳网络参数对焊缝图片进行语义分割,将焊缝所在区域与背景进行分离;然后对分割出的焊缝区域,进行骨架提取,得到接近单像素宽度的焊缝;之后根据自定义的直线度参数对焊缝形状进行判定,确定该焊缝是否为直线,用最小二乘法进行直线或曲线拟合,得到最终的焊缝轨迹。实验结果表明,所提方法能够快速准确地识别出焊缝位置和形状,可以作为自动焊接机器人轨迹自主规划和控制的技术基础。Abstract: In robot automatic welding, accurate and efficient weld identification is the key to achieve high quality welding. Aiming at the problems of low efficiency and poor accuracy of the existing visual inspection methods, a welding seam recognition method based on full convolutional neural network was proposed. Firstly, the method collects data to train the full convolutional neural network and obtains the best network parameters. Then, the trained fully convolutional neural network and the best network parameters were used to semantically segment the weld images, and the weld area was separated from the background. Then, the skeleton of the segmented weld area was extracted to obtain the weld with a width close to a single pixel. Then, the shape of the weld is determined according to the self-defined straightness parameters to determine whether the weld is a straight line, and the least square method is used to carry out the line or curve fitting to get the final weld trajectory. The experimental results show that the proposed method can quickly and accurately identify the weld position and shape, which can be used as the technical basis for the automatic welding robot trajectory planning and control.
-
表 1 二分类模型性能评价表
预测为正样本 预测为负样本 正样本 TP FN 负样本 FP TN 表 2 部分实验数据
实验编号 焊缝类型 焊缝长度/像素 平均误差/像素 1 直线 128 0.08 2 曲线 92 0.07 3 曲线 259 0.05 4 直线 237 0.09 表 3 程序运行时间统计
区域分割
时间/s骨架提取
时间/s轨迹拟合
时间/s总时间/s 第一次 19.247 25.818 19.295 64.360 第二次 18.758 26.072 19.139 63.969 第三次 18.654 25.901 19.175 63.730 第四次 18.725 25.974 19.273 63.972 第五次 18.827 25.850 19.116 63.793 平均值 18.842 25.923 19.120 63.965 -
[1] 中国焊接协会成套设备与专用机具分会, 中国机械工程学会焊接学会机器人与自动化专业委员会[M]. 北京: 机械工业出版社, 2014. [2] 李祥瑞. 机器视觉研究进展及工业应用综述[J]. 数字通信世界, 2021(11): 79-80,146. doi: 10.3969/J.ISSN.1672-7274.2021.11.031 [3] 胡丹, 张艳喜, 王静静, 等. 焊缝成形线结构光视觉检测方法研究[J]. 制造技术与机床, 2022(3): 132-137. doi: 10.19287/j.cnki.1005-2402.2022.03.023 [4] 刘洪伟, 马立东, 马自勇, 等. 基于线结构光的型钢自动焊接位置检测技术[J]. 焊接, 2022, 587(5): 1-7, 13. [5] 王树强, 周游, 陈昊雷, 等. 基于激光视觉的钢结构焊缝图像处理系统[J]. 焊接学报, 2022, 43(2): 101-105, 112, 120. doi: 10.12073/j.hjxb.20210603001 [6] Xu P Q, Xu G X, Tang X H, et al. A visual seam tracking system for robotic arc welding[J]. The International Journal of Advanced Manufacturing Technology, 2008, 37(1-2): 70-75. doi: 10.1007/s00170-007-0939-6 [7] 刘东来, 崔亚飞, 罗辉, 等. 基于机器视觉的弧焊机器人焊缝识别及路径生成研究[J]. 制造技术与机床, 2021(12): 26-32. doi: 10.19287/j.cnki.1005-2402.2021.12.004 [8] Shi F H, Lin T, Chen S B. Efficient weld seam detection for robotic welding based on local image processing[J]. The Industrial Robot, 2009, 36(3): 277-283. doi: 10.1108/01439910910950559 [9] Deng H G, Cheng Y, Feng Y X, et al. Industrial laser welding defect detection and image defect recognition based on deep learning model developed[J]. Symmetry, 2021, 13(9): 1731. doi: 10.3390/sym13091731 [10] 樊丁, 胡桉得, 黄健康, 等. 基于改进卷积神经网络的管焊缝X射线图像缺陷识别方法[J]. 焊接学报, 2020, 41(1): 7-11,97. [11] Long J , Shelhamer E , Darrell T. Fully convolutional networks for semantic segmentation[J]. IEEE transactions on pattern analysis and machine intelligence, 2017, 39(4): 640-651. doi: 10.1109/TPAMI.2016.2572683 [12] Simonyan K, Zisserman A. Very deep convolutional networks for large-scale image recognition[C]. 27th IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR 2014), 2014. [13] Huang G, Liu Z, vander Maaten L. Densely connected convolutional networks[C]. 30th IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR 2017), 2017. [14] Zhang T Y, Suen C Y. A fast parallel algorithm for thinning digital patterns[J]. Communications of the ACM, 1984, 27(3): 236-239. doi: 10.1145/357994.358023