摘要
针对光伏板铝合金边框表面划痕检测中存在的小样本、背景复杂等问题,提出了一种基于改进YOLOv5s的深度学习检测方法。先通过k-means聚类算法训练锚框数据,再引入SPPFCSPC模块,融合AKConv卷积,并采用Shape-IoU损失函数与Soft-NMS算法。实验选用73张工业现场采集的划痕图像(训练集66张,验证集7张),在有限算力环境下进行训练。结果表明,改进后的YOLOv5s-KSASS模型在平均精度、精确率和召回率上分别达到0.93211、0.99975和0.85714,较原始YOLOv5s模型提升了126.3%、16.2%和100.7%,有效解决了小样本条件下复杂背景干扰和微弱缺陷检测难题,为工业场景中的高精度表面缺陷检测提供了轻量化解决方案。未来将进一步优化模型对低对比度划痕的敏感性,并扩展至多类别缺陷检测任务。
To address the issues of small sample size and complex backgrounds in scratch detection on photovoltaic panel aluminum frames,this paper proposes a detection method based on an improved YOLOv5s.Firstly,the anchor box data is trained through the k-means clustering algorithm.Then,the SPPFCSPC module is introduced,the AKConv convolution is integrated,and the Shape-IoU loss function and the Soft-NMS algorithm are adopted.Experiments were conducted with 73 scratch images collected in an industrial setting(66 for training,7 for validation)in a limited computing environment.Results show that the improved YOLOv5s-KSASS model achieves 0.93211 mAP@0.5,0.99975 precision,and 0.85714 recall,representing increases of 126.3%,16.2%,and 100.7%over the original YOLOv5s.This effectively solves the problem of detecting weak defects under complex backgrounds with small samples,offering a lightweight solution for high-precision industrial surface defect detection.Future work will focus on enhancing sensitivity to low-contrast scratches and expanding to multi-category defect detection.
作者
刘骞
陈茂林
LIU Qian;CHEN Maolin(The School of Mechanical Engineering,Tongji University,Shanghai 201804,China)
出处
《机械与电子》
2025年第8期47-53,60,共8页
Machinery & Electronics