Computer Engineering and Applications ›› 2025, Vol. 61 ›› Issue (16): 315-323.DOI: 10.3778/j.issn.1002-8331.2410-0455

• Engineering and Applications • Previous Articles     Next Articles

ZZX-YOLO: Improved YOLOv7-tiny Steel Defect Detection Algorithm

ZHOU Zhaoxuan, CAO Yan   

  1. 1.School of Mechanical and Electrical Engineering, Xi’an Technological University, Xi’an 710021, China
    2.School of Computer Science and Engineering, Xi’an Technological University, Xi’an 710021, China
  • Online:2025-08-15 Published:2025-08-15

ZZX-YOLO:改进YOLOv7-tiny的钢材缺陷检测算法

周赵轩,曹岩   

  1. 1.西安工业大学 机电工程学院,西安 710021
    2.西安工业大学 计算机科学与工程学院,西安 710021

Abstract: Aiming at the problems that the traditional defect detection methods are prone to missing detection, low detection efficiency and difficult to be deployed in mobile devices, due to the large size variation of steel surface defects and not obvious image features, a lightweight steel surface defect detection method for industrial environment ZZX-YOLO is proposed. To solve the problem of large convolution computation, a new lightweight convolution technique ZZXConv is proposed, which can enhance the texture features of feature graphs, suppress redundant information, and improve detection accuracy and speed. Based on ZZXConv, a new ZZX residual module is designed to realize richer feature aggregation and enhance feature extraction capability. In addition, ZZX_CSPC module replaces ELAN-tiny in YOLOv7-tiny neck structure to improve feature expression ability and weaken irrelevant feature information, so as to achieve higher computing cost effectiveness. K-means++ algorithm is used to re-cluster and generate prior boxes to improve detection accuracy and speed. Experimental results show that the average accuracy of the improved algorithm on the dataset reaches 63.13%, compared with the original algorithm, the accuracy is increased by 7.70 percentage points, the number of parameters is reduced by 8.53%, which proves the effectiveness of ZZX-YOLO.

Key words: lightweight steel surface defect detection, YOLOv7-tiny, ZZXConv, ZZX_CSPC module, ZZX-YOLO

摘要: 针对钢材表面缺陷尺寸变化大,采集图像特征不明显,导致传统缺陷检测方法在实际应用中容易出现漏检、检测效率低和不易部署在移动端设备中等问题,提出了一种面向工业环境的轻量化钢材表面缺陷检测方法ZZX-YOLO。针对普通卷积计算量大的问题,提出一种新的轻量级卷积技术ZZXConv,增强了特征图的纹理特征,抑制了冗余信息,促进了检测精度和速度的提升;基于ZZXConv设计了一种全新的ZZX残差模块,实现了更丰富的特征聚合,增强了特征提取能力,并且设计了ZZX_CSPC模块取代YOLOv7-tiny颈部结构中的ELAN-tiny,提高特征的表达能力和弱化无关的特征信息,以实现更高的计算成本效益。使用K-means++算法重新聚类生成先验框,提高了检测精度和检测速度。实验结果表明,改进的算法在数据集上的平均精度达到了63.13%,相比于原算法,精确度提高了7.70个百分点,参数量下降了8.53%,证明了ZZX-YOLO的有效性。

关键词: 轻量化钢材表面缺陷检测, YOLOv7-tiny, ZZXConv, ZZX_CSPC模块, ZZX-YOLO