In order to prevent the economic losses caused by large-scale power outages and the life safety losses caused by circuit failures, the main purpose of this paper is to improve the efficiency, accuracy, and reliability of transmission line defect detection, and the main innovation is to propose a transmission line defect detection method based on YOLOv7 and the multi-UAV collaboration platform. First, a novel multi-UAV collaboration platform is proposed, which improved the search range and detection efficiency for defect detection. Second, YOLOv7 is used as a detector for multi-UAV collaboration platform, and several improvements improved the efficiency of defect detection under complex backgrounds. Finally, a complete transmission line defect images dataset is constructed, and the introduction of several defect images such as insulator self-blast and cracked insulators avoids the problem of low application value of single defect detection. The results indicate that the proposed method not only enhances the detection range and efficiency but also improves the detection accuracy. Compared with YOLOv5-S, which has good detection performance, YOLOv7 improves accuracy by 1.2%, recall by 4.3%, and mAP by 4.1%, and YOLOv7-Tiny achieves the fastest speed 1.2 ms and the smallest size 11.7 Mb. Even if the images contain complex backgrounds and noises, a mAP of 0.886 can still be obtained. Therefore, the proposed method provides effective support for transmission line defect detection and has broad application scenarios and development prospects.