第39卷第2期2024年2月Vol.39No.2Feb.2024液晶与显示ChineseJournalofLiquidCrystalsandDisplays改进的YOLOv5s太阳能电池片缺陷检测算法彭雪玲1,2,林珊玲1,2*,林志贤1,2,郭太良2(1.福州大学先进制造学院,福建泉州362252;2.中国福建光电信息科学与技术实验室,福建福州350116)摘要:针对太阳能电池片缺陷检测方法存在精度低的问题,提出一种基于改进的YOLOv5s太阳能电池片表面缺陷检测算法。首先,为了解决电池片小目标缺陷检测问题,提出了上下文Transformer网络(CoT),可以为小目标提供全局上下文信息,帮助模型更好地预测小目标。其次,将CBAM注意力加入到Head部分的C3模块,能够更好地捕捉输入特征图的重要通道和空间位置,提高模型的性能和鲁棒性。接着,使用轻量级的通用上采样算子CARAFE减少上采样过程中特征信息的损失,保证了特征信息的完整性。最后,使用WIoU作为边界框损失函数,大幅提升了回归的准确性,并且有助于快速实现模型的收敛。实验结果显示,改进后的YOLOv5s相较于原始算法在Precision、Recall、mAP@0.5三个指标上分别提高了5.5%、4.1%、3.3%,检测速度达到了76FPS,满足太阳能电池片缺陷检测要求。关键词:太阳能电池片;YOLOv5s;上下文Transformer网络;CARAFE;损失函数中图分类号:TP391文献标识码:Adoi:10.37188/CJLCD.2023-0249DefectdetectionalgorithmofimprovedYOLOv5ssolarcellPENGXueling1,2,LINShanling1,2*,LINZhixian1,2,GUOTailiang2(1.SchoolofAdvancedManufacturing,FuzhouUniversity,Quanzhou362252,China;2.FujianScienceandTechnologyInnovationLaboratoryforPhotoelectricInformation,Fuzhou350116,China)Abstract:Aimingattheproblemoflowaccuracyofthemethodforsolarcelldefectdetection,asurfacedefectdetectionalgorithmbasedontheimprovedYOLOv5ssolarcellisproposed.First,inordertosolvetheproblemofsmalltargetdefectdetectiononthecellsheet,theContextualTransformerNetwork(CoT)isproposed,whichcanprovideglobalcontextualinformationforsmalltargetsandthemodelbetteratpredictingsmalltargets.Secondly,byaddingCBAMattentiontotheC3moduleintheHeadpart,theimportantchannelsandspatiallocationsoftheinputfeaturemapscanbebettercapturedtoimprovetheperformanceandrobustnessofthemodel.Next,theintegrityoffeatureinformationisensuredbyusingC...