Abstract:To enhance the accuracy of detecting defects in solar panels,an improved YOLOv5 network is proposed for the detection and classification of five common types of defects:scratches,cross hatching,dark spots,black edges,and no electricity.Firstly,the conventional convolutional modules in the backbone network are replaced with an improved ODConv module to reduce the model's parameter count.Secondly,the Bottleneck structure in the C3 module is replaced with a Res2Net containing the ParNet module to increase the receptive field,thereby improving the capability to detect object defects and the overall detection accuracy.Lastly,an adaptive feature fusion structure is introduced before the prediction network to fuse the position and category information of different feature maps,enhancing feature representation and improving the model's robustness.The model is trained,validated,and tested on a custom dataset, and experimental results demonstrate that the improved model successfully recognizes and locates the five common defects.Compared to the original YOLOv5 algorithm,the average detection accuracy is increased by 6.2%,while maintaining the efficiency of the original network.