| 注册
首页|期刊导航|机械科学与技术|改进YOLOv7的PCB缺陷检测算法

改进YOLOv7的PCB缺陷检测算法

王玲 向北平 张晓勇

机械科学与技术2025,Vol.44Issue(1):9-18,10.
机械科学与技术2025,Vol.44Issue(1):9-18,10.DOI:10.13433/j.cnki.1003-8728.20240185

改进YOLOv7的PCB缺陷检测算法

An Improved YOLOv7 Algorithm for PCB Defect Detection

王玲 1向北平 1张晓勇1

作者信息

  • 1. 西南科技大学制造科学与工程学院,四川绵阳 621010
  • 折叠

摘要

Abstract

In the task of detecting defects on printed circuit boards(PCB),general object detection algorithms always struggle to distinguish target defects from the background,resulting in issues such as low detection accuracy.In order to solve these problems,an improved YOLOv7 model for PCB surface defect detection is proposed.Firstly,the ELAN module is replaced with the transformer-style convolutional network(Conv2Former)module in the backbone extraction network,which preserves spatial information,strengthens global correlations,and effectively reduces the number of parameters.Secondly,to retain more information on small targets,the 20x20 layer is removed,and a 160x160 layer is added.Additionally,the introduction of the similarity-based attention mechanism(SimAM)in the feature fusion network enhances detection accuracy without introducing additional parameters.Finally,the Focal-CIoU Loss function,a combination of Focal Loss and CIoU Loss,optimizes weight allocation for high-quality and low-quality samples,and the detection effectiveness is enhanced.The improved YOLOv7 PCB surface defect detection algorithm achieves a mean average precision(mAP)of 95.3%,a 3.6%boost over the original model,with just 10.97 MB parameters and only a third of the original model.This refined model identifies PCB defects more precisely,significantly reducing leakage and false detections.

关键词

PCB表面缺陷检测/YOLOv7/Conv2Former/SimAM/Focal-CIoU

Key words

PCB surface defect detection/YOLOv7/Conv2Former/SimAM/Focal-CIoU

分类

信息技术与安全科学

引用本文复制引用

王玲,向北平,张晓勇..改进YOLOv7的PCB缺陷检测算法[J].机械科学与技术,2025,44(1):9-18,10.

基金项目

四川省科技厅重点研发计划(23ZDYF0471) (23ZDYF0471)

机械科学与技术

OA北大核心

1003-8728

访问量0
|
下载量0
段落导航相关论文