To address the issues of low detection accuracy, poor real-time performance and high model complexity of the existing insulator defect detection model, an improved insulator defect detection model based on YOLOv7-tiny is proposed. At the same time, based on Dronekit UAV development library, PyQT5 interface development library, F450 UAV, wireless mapping module and other hardware and software, a set of autonomous inspection system for insulator defect detection is developed. Firstly, a new network with a multiple detection head is developed to extract features at different scales. In addition, a novel model combined with dilated convolutions and Swin Transformer was designed and incorporated into the enhanced feature extraction network to improve the model’s receptive field. Moreover, based on the squeeze and excitation attention mechanism, improvements were made to the efficient layer aggregation network modules of both backbone and enhanced feature extraction networks. The ablation and comparison experiments were conducted on our constructed dataset based on the public Chinese Power Line Insulator Dataset (CPLID). The experimental results show that the mean average precision of the improved YOLOv7-tiny model reaches 89.6%, which is about 8% higher than that of the original YOLOv7-tiny model. In addition, our improved YOLOv7-tiny model has higher accuracy and lower parameter scale in detecting insulator-defects and partially-occluded insulators in complex backgrounds compared with other traditional models.