基于弱监督学习的太阳能电池EL图像缺陷检测模型

Weakly Supervised Learning-Based Defect Detection Model for Solar Cell EL Images

  • 摘要: 针对太阳能电池电致发光(EL)图像缺陷检测中难以平衡精度与像素级标注成本高昂的问题,提出一种基于图像级标签的弱监督检测方法。该方法以DenseNet-121为主干网络,在每个过渡层后嵌入卷积块注意力模块(CBAM),构建多层次特征校准机制,增强模型对缺陷区域的聚焦能力。采用改进的类激活映射(CAM)技术,设计动态权重融合策略合并两层全连接层权重,提升特征通道与分类目标的语义关联性,并利用自适应阈值与形态学后处理生成高质量伪掩码,进一步通过轮廓检测与最小外接矩形自动输出YOLO格式检测框。在训练阶段,引入加权采样、组合损失函数(Focal Loss + 标签平滑)和OneCycle学习率调度策略,有效缓解类别不平衡问题,提升细粒度分类性能。在南京工业大学提供的实际产线EL图像数据集上进行四分类任务(污染、划痕、结构缺陷、吸盘印)实验,该数据集共5389张样本,仅使用图像级标签。实验结果表明,本文方法取得了0.8057的宏平均F1分数与81.17%的准确率,优于多种全监督基线模型;消融实验验证了各核心组件的有效性,定位可视化展示了模型在弱监督条件下生成合理检测框的能力。该方法在保持良好检测性能的同时显著降低了标注成本,为工业光伏组件缺陷的高效质量检测提供了可行技术方案。

     

    Abstract: To address the trade-off between accuracy and the prohibitive cost of pixel-level annotation in electroluminescence (EL) image defect detection of solar cells, a weakly supervised detection method based on image-level labels is proposed. This method employs DenseNet-121 as the backbone and embeds a convolutional block attention module (CBAM) after each transition layer, constructing a multi-level feature calibration mechanism to enhance the focus on defect regions. An improved class activation mapping (CAM) technique is adopted, where a dynamic weight fusion strategy merges the weights of two fully connected layers to strengthen the semantic relevance between feature channels and classification targets. Adaptive thresholding and morphological post-processing are applied to generate high-quality pseudo masks, and YOLO-format bounding boxes are automatically produced via contour detection and minimum bounding rectangles. During training, weighted sampling, a combined loss function (focal loss + label smoothing), and the onecycle learning rate schedule are introduced to mitigate class imbalance and improve fine-grained classification performance. Experiments are conducted on a real production-line EL image dataset provided by Nanjing Tech University for a four-class task (dirty, scratch, structural defects, sucker mark), comprising 5389 images with only image-level labels. Experimental results show that the proposed method achieves a macro-average F1 score of 0.8057 and an accuracy of 81.17%, outperforming several fully supervised baselines. Ablation studies verify the effectiveness of each core component, and localization visualizations demonstrate the model's ability to generate reasonable bounding boxes under weak supervision. The method significantly reduces annotation costs while maintaining satisfactory detection performance, offering a feasible technical pathway for efficient quality inspection in industrial photovoltaic modules.

     

/

返回文章
返回