Abstract:Crack defect detection in solar panels can prevent energy conversion inefficiency and the risk of short circuits causing fires.In this paper,we propose a two-stage self-supervised crack detection method based on a siamese network to address the limitations of existing contrastive learning methods,such as slight crack omission leading to low detection accuracy and heavy reliance on constructing negative samples.In the first stage,a pre-trained encoder model based on CNN and Transformers is proposed to learn fine-grained feature representations of samples using the siamese network architecture,thereby improving the feature representation capability for micro-cracks in solar panels.In the second stage,a classifier is learned based on the pre-trained model with a small amount of annotated samples to distinguish defect samples.Additionally,a separate classification head is added to further differentiate longitudinally oriented cracks that do not affect the functionality of the solar panels.Experimental results on the ELPV dataset demonstrate that the proposed method outperforms other related detection methods in terms of test accuracy,achieving an accuracy of 83.26%with only a small amount of annotated data,the detection time of single sheet was 6.1 ms,and a recall rate of 76.7%for detecting longitudinally oriented cracks in crack images.