| In the past decade,solar energy,as a clean energy source,has received great attention worldwide,and the cumulative installed capacity of photovoltaic power generation in the world has continued to grow rapidly.In photovoltaic power generation,affected by factors such as manufacturing process,transportation and natural exposure,the surface of photovoltaic cells is prone to various defects.Effectively identifying whether there are defects on the surface of photovoltaic cells and accurately locating the location of defects plays a key role in the healthy operation and maintenance of photovoltaic systems,that is,image classification tasks and object detection tasks in the field of computer vision.However,it is challenging to achieve efficient defect classification and accurate defect object detection due to few samples,complex background,and various defect shapes.To this end,based on the deep learning method,this paper proposes effective solutions to the above two problems.The main contents are as follows:1)For the problem of photovoltaic cell defect classification under unbalanced types,few samples and complex background interference,this paper proposes a fusion model based on ResNetl52-Xception.Firstly,the data augmentation strategy is used to expand the training set;secondly,the main features are extracted by ResNet152 and Xception models respectively,and the features are reduced and fused by hybrid pooling to avoid the loss of important features by single pooling;then,in the feature map,CA attention mechanism is inserted in the figure to highlight the feature expression of defective regions;finally,a category weight strategy is introduced in the classification layer to reduce the impact of sample imbalance.Experimental results show that the proposed fusion model can accurately classify photovoltaic cell surface defects.2)Aiming at the problem of photovoltaic cell defect detection under small targets,various defect shapes and complex background interference,this paper proposes a detection model based on improved YOLOX.First,SENet attention is inserted into the three feature mps extracted by the CSPDarknet network to highlight the importance of small target defects and suppress irrelevant background features;then,the upsampling method in the PAFPN network is improved to a bicubic interpolation algorithm to enhance the upsampling effect,more than that the ASFF strategy which can adaptively learn the features of each scale is introduced at the end of the network to enhance the effect of feature fusion;finally,replace the IoU loss function with EIoU to improve model accuracy and speed up convergence,and the binary cross entropy loss unction is replaced by VariFocal Loss to balance the number of samples in different categories.Experimental results show that the proposed improved model achieves excellent detection results.3)A defect classification and detection system for photovoltaic cells is designed and implemented.Firstly,the significance of system development and the functions of each module are explained;secondly,the requirement analysis is carried out from two aspects of function and performance;then,the flow chart of the system and the design of functional modules are introduced;finally,integrate the model into the Django framework to complete the system development. |