摘要
针对目前光伏板航拍缺陷检测中还存在小目标检测率低、检测速度慢等问题,提出一种基于改进DetectionTransformer(DETR)的光伏板缺陷检测方法。首先,对于光伏板缺陷在航拍图像上相对较小的问题,引入相对位置编码来提高模型对元素位置的感知,增强对小目标的检测能力;其次,利用动态稀疏注意力(DSA)模块降低DETR自注意力计算复杂度,进而提高检测速度;最后,针对航拍模式下存在的一些较难分类的样本,采用FocalLoss改进分类样本的损失,增加对难分类样本的权重,提升模型对此类样本的检测效果。实验结果表明:改进后的DETR算法对光伏板航拍缺陷检测的平均精度均值达94.7%,较原算法提高了5.1%,与其他主流检测算法相比具有一定优势。
To address the challenges of low small-object detection rates and slow detection speeds in current aerial inspection of photovoltaic panels,an improved defect detection method based on the Detection Transformer(DETR)is proposed.First,to mitigate the issue of relatively small defects in aerial images,relative position encoding is introduced to enhance the model's sensitivity to element positions,thereby improving its ability to detect small targets.Second,a Dynamic Sparse Attention(DSA)module is incorporated to reduce the computational complexity of the DETR self-attention mechanism,which accelerates detection speed.Finally,to improve classification performance on difficult-to-classify samples,Focal Loss is applied to adjust the loss function,increasing the weight of hard-to-classify samples and enhancing detection accuracy for these challenging cases.Experimental results demonstrate that the proposed method achieves an average precision(AP)of 94.7%for defect detection in aerial images of photovoltaic panels,a 5.1%improvement over the original DETR algorithm.The proposed method also outperforms several mainstream detection algorithms,highlighting its effectiveness in practical applications.
作者
文梦洋
付晓刚
彭程瑞
WEN Mengyang;FU Xiaogang;PENG Chengrui(School of Electrical Engineering,Shanghai Dianji University,Shanghai 201306,China)
出处
《上海电机学院学报》
2024年第6期331-336,共6页
Journal of Shanghai Dianji University
关键词
光伏板
深度学习
DETR
神经网络
目标检测
photovoltaic panels
deep learning
DETR
neural network
object detection