科技创新与应用2026,Vol.16Issue(30):17-21,5.DOI:10.19981/j.CN23-1581/G3.2026.30.004
基于YOLOv5算法的小目标缺陷检测算法改进
Improvement of Small Target Defect Detection Algorithm Based on YOLOv5 Algorithm
郑思远 1郭宏 1赵小龙 1任慧祥 1米静雯1
作者信息
- 1. 太原科技大学 机械工程学院,太原 030024
- 折叠
摘要
Abstract
In response to the challenge of detecting small target defects(pixel size≤32×32)in industrial appearance inspection,a multi-dimensionally improved YOLOv5 algorithm is proposed.To enhance fine-grained feature capture,a C3-CA+SE dual attention mechanism is introduced into the backbone network,enabling the model to focus more effectively on small target regions.The BiFPN structure is adopted to reconstruct the neck network,facilitating adaptive weighted fusion of multi-scale features and preserving critical shallow-layer information.A combined EIoU and NWD loss function is designed,with dynamic weight adjustment based on target size to mitigate gradient vanishing for small objects.The ASFF-Detect head is integrated to improve localization consistency across scales.Experiments on the Tianshan aluminum profile defect dataset demonstrate that the improved algorithm increases mAP50%from 0.774 to 0.818,validating its effectiveness and practicality in industrial small-target defect detection tasks.关键词
小目标缺陷检测/YOLOv5/自适应损失函数/工业外观检测/双重注意力机制Key words
small target defect detection/YOLOv5/adaptive loss function/industrial appearance inspection/dual attention mechanism分类
信息技术与安全科学引用本文复制引用
郑思远,郭宏,赵小龙,任慧祥,米静雯..基于YOLOv5算法的小目标缺陷检测算法改进[J].科技创新与应用,2026,16(30):17-21,5.