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.