# EER-DETR: An Improved Method for Detecting Defects on the Surface of Solar Panels Based on RT-DETR
## 1 Introduction
To enhance the performance of RT-DETR in photovoltaic panel defect detection, we integrated and improved the following key modules: By adding the WDBB reparameterization module, we obtained the RepaNet feature extraction network, which is more conducive to the convergence of the network and enables it to learn more information during the training of small targets. It learns richer feature representations and, to some extent, solves the problem that traditional methods suffer from a severe loss of small target information in low-resolution feature maps. The advantage of structural reparameterization lies in the fact that the multi-branch structure during training can learn more comprehensive feature representations, while the single-branch structure during inference can maintain efficiency. During the training phase, the WDBB module can effectively capture the key information of small targets, even if this information is relatively weak in low resolution. During inference, through parameter merging without increasing the computational burden, the detection performance is improved. In the inference process, only one branch is used for inference, thereby reducing the memory usage and computational complexity during the inference process. The enhanced multi-scale feature pyramid network (EHFPN) is designed, inspired by BIFPN and MAF-YOLO, aiming to enhance the feature expression ability of the model through multi-scale feature fusion and efficient convolution. Firstly, BiFPN can compensate for the important information that may be lost during the feature extraction process of the RT-DETR backbone network. And our designed EHFPN builds a multi-scale efficient convolution module and a global heterogeneous kernel selection mechanism on this basis. Research on the Trident network indicates that a network with a larger receptive field is more suitable for detecting larger objects, while smaller-scale targets benefit from a smaller receptive field. Therefore, in the FPN stage, we select different multi-scale convolution kernels for different scale feature layers to adapt and gradually obtain multi-scale perception field information. We draw on the multi-scale feature-weighted fusion in BIFPN and replace Concat with Add to reduce the number of parameters and computational cost. Moreover, it can perform self-adaptive weighted fusion based on the importance of different scale features. Thus, our model not only has efficient detection performance but also reduces redundant computations and, to a certain extent, solves the problem that DETR requires a large amount of computational resources and has poor real-time detection performance. To further address the issue of large computational resources in RT-DETR, we added an efficient upsampling convolution block (EUCB) module. The EUCB employs an efficient upsampling strategy, using deep convolution instead of standard convolution to prevent the loss of important information during upsampling, especially for the details of small targets. At the same time, it reduces the number of channels through \(1\times 1\) convolution to maintain computational efficiency and reduce redundant features. This optimized the computational burden encountered by the model when performing upsampling on images while maintaining high accuracy. Key improvements and innovations:  
Significant improvement in detection accuracy: By combining the WDBB module and the EHFPN module, the detection accuracy of the model in handling multi-scale defects and fine-grained defects was significantly improved, particularly in complex scenarios where photovoltaic panel backgrounds and defects are intertwined. Lightweight and efficient architecture: EHFPN reduces the number of model parameters through efficient feature fusion, making it lightweight and suitable for real-time deployment and large-scale photovoltaic panel automated detection tasks.