• CN:11-2187/TH
  • ISSN:0577-6686

机械工程学报 ›› 2025, Vol. 61 ›› Issue (2): 46-55.doi: 10.3901/JME.2025.02.046

• 仪器科学与技术 • 上一篇    

扫码分享

基于深度学习和生成对抗网络的发动机缸体表面缺陷检测方法

曾治霖, 瞿昊, 杜正春   

  1. 上海交通大学机械与动力工程学院 上海 200240
  • 收稿日期:2024-01-23 修回日期:2024-07-12 发布日期:2025-02-26
  • 作者简介:曾治霖,男,2000年出生,博士研究生。主要研究方向为智能机床。E-mail:cough-youyou@sjtu.edu.cn;杜正春(通信作者),男,1973年出生,博士,副教授,博士研究生导师。主要研究方向为数控机床误差测量、建模与补偿,精密检测与加工,计算机图像测量。E-mail:zcdu@sjtu.edu.cn

An Engine Cylinder Surface Defect Detection Algorithm Based on the YOLOv5 Network and Pix2Pix Model

ZENG Zhilin, QU Hao, DU Zhengchun   

  1. School of Mechanical Engineering, Shanghai Jiao Tong University, Shanghai 200240
  • Received:2024-01-23 Revised:2024-07-12 Published:2025-02-26

摘要: 针对某企业发动机缸体表面缺陷检测的工业视觉应用中,由于缺陷样本数据集较少导致的识别准确率低,检测速度慢的问题,设计了一套基于深度学习的机器视觉表面缺陷检测系统。采用生成对抗网络pix2pix模型增强缺陷图片数据集,结合灰度增强、带通滤波等传统图像预处理方法突出表面缺陷特征,利用YOLOv5深度学习识别网络进行缺陷识别算法开发,并根据上述框架搭建了缸体表面缺陷检测软硬件系统。将所搭建的检测系统在企业生产线进行应用验证,结果显示,缺陷总体识别准确率高达98.4%,单张图片识别耗时小于0.5 s。所提方法解决了原有小样本数据集难以支撑深度学习训练的难题,提高了缸体表面缺陷的识别精度和识别效率,在工业检测的应用中具有巨大的潜力。

关键词: 发动机缸体, 缺陷检测, YOLOv5, pix2pix

Abstract: In the industrial vision application for engine cylinder surface defect detection, the lack of defect datasets leads to low detection accuracy and efficiency. An engine cylinder surface defect detection algorithm based on the YOLOv5 network and Pix2Pix model is proposed. The generative adversarial network pix2pix model is used for dataset enhancement. The image pre-processing methods, such as the grayscale enhancement method and band-pass filtering method, are used to highlight the surface defect features. The defect detection algorithm is developed based on the YOLOv5 model. Then a cylinder surface defect detection hardware and software system is established using the above framework. Experimental validation is conducted on the production line in the industry. Results show that the detection accuracy of the proposed method is 98.4%. Single image detection takes less than 0.5 s. This research has the capacity to deal with the lack of datasets in deep learning training, which improves the detection accuracy and efficiency of engine cylinder surface defect detection. The proposed method shows great potential for industrial inspection applications.

Key words: engine cylinder, defect detection, YOLOv5, pix2pix

中图分类号: