Abstract Under the policy framework of achieving carbon neutrality goals and addressing climate change, the importance of photovoltaic power generation will become more prominent, therefore the detection of defects in photovoltaic panels will become increasingly important. In order to accurately detect defects in photovoltaic panels, this paper proposes an adaptive dimensional feature aggregation algorithm that combines Deformable Convolutional (DCN) and C3 convolutional layers to form C3_ DCN module enhances the generalization ability of convolutional kernels; By incorporating the Cross Modal Transformer Attention Mechanism (CoTAttention) and Context Enhancement Module (CAM) at the output end, the model has the ability to adaptively allocate computing resources and enhance the ability to detect small targets; Using Focal EIoU as the loss function reduces the slow convergence speed and inaccurate results of known box regression methods. The experimental results show that for the PVEL-AD industrial detection dataset, the improved model has an average accuracy of 91.8%, which is 1.5% higher than the original model.