An enhanced RT-DETR (Real-Time Detection Transformer) model, RT-DETR-Pro, is proposed to address the problem of low recognition rates for visual detection of PV (photovoltaic) module defects by traditional object detection methods. Firstly, an EMA (Efficient Multi-Scale Attention) module is integrated into the vanilla RT-DETR model to optimize feature representation by reshaping the channel and batch dimensions of feature maps. Secondly, an improved neck feature fusion strategy is adopted, which not only improves feature representation capability but also reduces computational costs and model complexity. Finally, a PV module image dataset is constructed using production line data from a PV module production factory. Both the original RT-DETR model and our RT-DETR-Pro model are trained and evaluated on this dataset. Experimental results demonstrate that RT-DETR-Pro can increase detection accuracy for hard-to-identify defects. The results show that while the original RT-DETR model exhibited missed detections for subtle small-target defects, our RT-DETR-Pro model shows significant enhancement in detecting such inconspicuous defects, with 86.9% mAP50, outperforming the original RT-DETR by 4.5%. Additionally, our RT-DETR-Pro model achieves 144 FPS in inference, meeting the requirements of both accuracy and real-time performance for industrial PV module quality inspection. The proposed method provides an effective solution for automated PV module quality inspection, demonstrating strong potential for industrial applications.