Target defect detection on overhead lines is critical for safe and reliable grid operation. When targeting line images with complex backgrounds, there are significant challenges in detecting defective insulators. A detection model of overhead line insulators with an improved YOLOv5s network is proposed to improve the detection efficiency of target defects. First, MobileNetV3 is used to lighten the YOLOv5s backbone network and reduce the network parameters; second, an improved ASFF adaptive feature fusion structure is used to equalize the inconsistency of different feature layers; then a CBAM attention mechanism is added to the head network to increase the weight of the target information to improve the model accuracy; finally, the edge loss function is adopted as EIOU_Loss loss function, to accelerate the convergence of the network. The experimental results show that the GFLOPs of the improved YOLOv5s algorithm is 11.6G, which is 1.3% higher compared with the YOLOv5s algorithm, and the Map_0.5 is 97%, which is 0.2 percentage point higher than the YOLOv5s algorithm, so the proposed improved YOLOv5s algorithm has higher detection speed while ensuring the model detection accuracy, and can meet the requirements of detection accuracy in light-weight target detection scenarios.