为解决采用人工手段检测船体焊缝速度慢、准确度低的问题,提出基于改进YOLOv5的船体焊缝缺陷自动检测方法。利用相机采集船体焊缝图像,使用正弦灰度变换对焊缝图像进行处理,避免焊缝图像特征消失,提高正常焊缝与存在缺陷焊缝间的对比度,将处理后焊缝图像作为YOLOv5网络的输入样本,经网络Backbone、Neck以及Head部分处理,输出焊缝缺陷自动检测结果,并使用GhostNet替换YOLOv5网络主体部分的一般卷积层(CBS),降低网络进行船体焊缝缺陷检测的计算量和资源消耗量。实验结果表明,采用正弦灰度变换后的图像更加清晰,可突出显示焊缝缺陷特征,提升焊缝缺陷检测结果精准。改进后网络训练损失函数为0.15,平均准确率为98%,可实现不同焊缝位置的缺陷检测。
To solve the problems of slow speed and low accuracy in manually detecting ship welds, an improved YOLOv5 based automatic detection method for ship weld defects is proposed. Using a camera to collect images of ship welds, using sine grayscale transformation to process the weld image to avoid the disappearance of weld image features and improve the contrast between normal welds and defective welds. The processed weld image is used as an input sample for the YOLOv5 network, and processed by the Backbone, Neck, and Head sections of the network to output automatic weld defect detection results, and use GhostNet to replace the general convolutional layer (CBS) of the main part of YOLOv5 network, reducing the computational and resource consumption of the network for detecting ship weld defects. The experimental results show that the image obtained by using sine grayscale transformation is clearer, highlighting the characteristics of weld defects, and improving the accuracy of weld defect detection results. The improved network training loss function is 0.15, with an average accuracy of 98%. It can achieve defect detection at different weld positions.
2023,45(19): 185-188 收稿日期:2023-04-07
DOI:10.3404/j.issn.1672-7649.2023.19.035
分类号:TG441.7
基金项目:河南省高等学校重点科研项目计划(教科技〔2021〕383号)(22B520018);河南理工大学鹤壁工程技术学院校重点课题(2022-KJZD-006)
作者简介:杜玉红(1979-),女,副教授,研究方向为人工智能、网络技术及图像处理等。
参考文献:
[1] 岳颖, 李丛, 张勇, 等. 全站仪测量系统在船舶建造中的应用[J]. [J]. 测绘科学技术学报, 2020, 37(3): 258-263.
YUE Ying, LI Cong, ZHANG Yong, et al. Application of total station measurement system in ship construction[J]. Journal of Geomatics Science and Technology, 2020, 37(3): 258-263.
[2] 杨先威, 张发军, 曹磊, 等. 船舶焊接末端受电抖振及其电频细化[J]. 船舶工程, 2020, 42(9): 99-104.
YANG Xian-wei, ZHANG Fa-jun, CAO Lei, et al. Electric Shaking at welding end of ship and its electrical frequency refinement[J]. Ship Engineering, 2020, 42(9): 99-104.
[3] 朱小俊, 薛延华, 曾广会, 等. 小尺度船舶密闭舱室舱壁升温传热及温度分布试验研究[J]. 中国造船, 2020, 61(4): 123-132.
ZHU Xiao-jun, XUE Yan-hua, ZENG Guang-hui, et al. Experimental research of heat transfer and temperature distribution of bulkhead in scale ship's sealed cabin[J]. Shipbuilding of China, 2020, 61(4): 123-132.
[4] 张人杰, 陈卫彬, 孙宏伟, 等. 基于AP聚类和深度卷积网络的船舶焊缝缺陷检测[J]. 船舶工程, 2021, 43(8): 131-137.
ZHANG Ren-jie, CHEN Wei-bin, SUN Hong-wei, et al. Ship Weld defect detection based on AP clustering and deep convolutional Network[J]. Ship Engineering, 2021, 43(8): 131-137.
[5] 高翌飞, 邱志超, 章林寒, 等. FPSO弯管焊缝相控阵超声检测工艺及装备开发[J]. 船舶工程, 2020, 42(S1): 415-419.
GAO Yi-fei, QIU Zhi-chao, ZHANG Lin-han, et al. Development of phased array ultrasonic testing Technology and equipment for bent pipe welds in FPSO[J]. Ship Engineering, 2020, 42(S1): 415-419.
[6] 余鸿晖, 郑积仕, 张世文, 等. 基于改进YOLOv5的整车原木数量检测方法[J]. 林业工程学报, 2022, 7(4): 135-143.
YU Hong-hui, ZHENG Ji-shi, ZHANG Shi-wen, et al. Estimation of volume for logs on a vehicle using improved YOLOv5 algorithm[J]. Journal of Forestry Engineering, 2022, 7(4): 135-143.
[7] 游达章, 陶加涛, 张业鹏, 等. 基于灰度变换及改进Retinex的低照度图像增强[J]. 红外技术, 2023, 45(2): 161-170.
YOU Da-zhang, TAO Jia-tao, ZHANG Ye-peng, et al. Low-light image enhancement based on gray scale transformation and improved retinex[J]. Infrared Technology, 2023, 45(2): 161-170.
[8] 吕晓玲, 杨胜月, 张明路, 等. 改进YOLOv5网络的鱼眼图像目标检测算法[J]. 计算机工程与应用, 2023, 59(6): 241-250.
LV Xiao-ling, YANG Sheng-yue, ZHANG Ming-lu, et al. Improved fisheye image target detection algorithm based on YOLOv5 Network[J]. Computer Engineering and Applications, 2023, 59(6): 241-250.