| Solar photovoltaic technology is an important driving force for green development in China.The utilization of Photoluminescence(PL)and Electroluminescent(EL)imaging to detect defects in solar cells is critical for ensuring the quality of photovoltaic products and providing diagnosis feedback.Due to the diverse types,imbalanced scales,and complex morphologies of solar cell defects,traditional machine vision methods are difficult to achieve sufficient accuracy.In recent years,with the continuous development of artificial intelligence,deep learning-based intelligent recognition approaches have been widely applied in solar cell defect detection.However,the issues of imbalanced categories and uneven scales of local defects in solar cell image datasets also pose challenges for attaining high precision and generalization of deep learning algorithms.Therefore,this paper employs deep learning algorithms to investigate the classification of solar cell images and the detection of local defect regions under data imbalance.The main research contents and contributions are as follows:(1)Due to the category imbalance issues,traditional classification methods tend to be biased towards the majority classes during the learning process and misclassify the samples of minority cla sses into the majority classes,resulting in low precision of the majority classes and low recall of the minority classes.Therefore,to address the severe category imbalance issues of solar cell images,a deep category representation-based image classification algorithm with a voting mechanism is proposed in this paper.Firstly,a resampling and training method is developed to achieve balanced sampling and data augmentation.Secondly,a weak classification framework based on the improved convolutional neural network(CNN)is designed to enhance the performance and robustness of the classification model.Finally,a voting-based prediction approach is employed to obtain the final results and further improve the accuracy.Visualization results of t-SNE and comparison research demonstrate that the proposed algorithm possesses superior clustering and generalization abilities compared with traditional methods.It effectively addresses the problem of over-fitting and insufficient classification performance caused by imbalance issues,and thus improves comprehensive precision.Finally,the proposed algorithm reaches a state-of-the-art F1 score of 0.982 and a total accuracy of 98.04% in the classification of the PL dataset.Moreover,the proposed method is demonstrated to have strong versatility and generalization capabilities in its application to the EL dataset.(2)Due to the scale imbalance issues,traditional object detection methods using a single feature map for prediction are difficult to make full use of shallow features with more detail and position information and deep features with more global and semantic information.It can easily lead to low performance in predicting multi-scale defects,especially small defects.Therefore,a local defect detection method based on multilevel feature fusion,MLF R-CNN,is proposed to improve the comprehensive performance of the model for predicting multi-scale defects.Firstly,the proposed algorithm utilizes the attention module and deformable convolution to improve the feature extraction ability of the backbone CNN.Moreover,a path aggregation network is designed to make full use of feature maps in different levels of CNN feature extractor and predict multi-scale defects through fused features.In addition,the regression loss of the model is optimized to improve the precision of bounding box localization.Finally,the online hard sample mining(OHEM)strategy is utilized to optimize the model by learning samples with high error rates or low accuracy,and further alleviate imbalance issues in the training process.Experimental results demonstrate that the proposed algorithm achieves high precision in detecting bounding boxes of local defects with multiple scales.Finally,the proposed MLF R-CNN achieves 78.4 m AP in detecting local defects with nine classes in PL images,particularly improving the detection performance of small defects.In addition,the algorithm can maintain an inference speed of exceeding 20 FPS during the detection process,satisfying the speed requirements of solar cell defect detection.Furthermore,the proposed MLF R-CNN algorithm has also demonstrated to have significant improvement when applied to EL defect detection with four classes,achieving an accuracy of 89.3 m AP,which proves its strong versatility and generalization ability. |