Abstract:Foreign body detection is a critical component of power grid inspection and maintenance, as it plays an essential role in power transmission. However, detecting foreign objects in transmission lines with small sample data under complex environmental conditions remains a challenging task. This paper proposes a Meta-Learning-based Double Coding Target Detection Network (ML-DCTDN), combining a Swin Transformer Network and a Convolutional Neural Network (CNN). The innovation of this network lies in two key aspects: firstly, the Swin Transformer network enhances its generalization feature extraction ability through a two-stage meta-learning process. In the first stage, it learns transmission line features, while in the second stage, it focuses on foreign object features, improving performance for target detection tasks on small sample datasets. Secondly, the double coding network uses both RGB and grayscale images as inputs, and employs a Layered Fusion Module (LFM) and a Feature Pyramid Network (FPN) to achieve multi-modal feature fusion. This approach leverages the rich color and texture information of RGB images while also utilizing the robustness of grayscale images against lighting variations and fine details. The model′s anti-interference and detection capabilities are thus strengthened in complex backgrounds. Ablation experiments reveal that the meta-learning strategy significantly improved the Mean Average Precision (mAP), with grayscale image input increasing the mAP by at least 4%. Comparative experiments with SSD, Faster RCNN, YOLOv5, and YOLOv8 algorithms demonstrate that the proposed meta-learning strategy and double coding network structure greatly enhance detection accuracy in foreign body detection tasks for transmission lines with small sample datasets. The mAP50 and mAP75 values achieved were 98.6% and 64.7%, respectively.