Abstract:The appearance of defects on the surface of solar cells will seriously affect the efficiency of solar energy conversion, accurate detection of defects on the surface of solar cells and timely treatment can effectively improve power generation efficiency. Aiming at the demand for high precision and real-time surface defect detection in the solar cell production process, this paper proposes a solar cell surface defect detection algorithm based on the improved YOLOv5s. The algorithm firstly replaces the C3 module in the network with a C3CA module in the backbone feature extraction network, and incorporates the CBAM attention mechanism to improve the feature extraction capability of the network; secondly, introduces the BiFPN network structure in the feature fusion network to improve the feature fusion capability of different semantic and scale information in the network; lastly, introduces a decoupled head in the output end, which improves the convergence speed of the modeled network with the detection accuracy. The experimental results show that the improved model has an average precision of 66.4% on the EL dataset of photovoltaic cells with an mAP@0.5∶0.95, which is 7.1% higher than the original network. It realizes the fast and effective localization and identification of defects on the surface of solar cell wafers, which has certain practical application value in the industrial production process of solar cells.