Abstract:Aiming at the current problems of defect detection in power equipment, such as complex image background, low detection accuracy and poor recognition effect, a surface defect detection method for power equipment based on improved YOLOv8n is proposed. The method introduces the SaE attention mechanism in the C2f module to enhance the backbone network's ability to extract key defect features; optimizes the feature fusion layer using BiFPN in the neck network to achieve cross-scale fusion of features, which improves the model's performance of multi-scale defect detection; designs the M-Detect detection head incorporating the MSDA attention mechanism to strengthen the model's accuracy of target localization; and uses WIoU as a loss function to improve the model's detection performance for difficult samples. The experimental results show that the mAP of the improved model reaches 83.8%, which is 1.7% higher than that of the original YOLOv8n model, and meets the real-time detection requirements, which confirms the effectiveness of the method in the detection of surface defects on power equipment.