# RML-YOLO: An Insulator Defect Detection Method for UAV Aerial Images
## 2 Materials and Methods  
### Design of Multi Scale Feature Extraction Pyramid Network  
When drones capture inspection images of power objects, significant changes in object size due to variations in shooting angle and distance present a challenge for detection algorithms. Although YOLOv8's feature pyramid network (FPN) can perform some degree of multi-scale feature fusion, its simple top-down and lateral connections may fail to fully capture inter-level dependencies, leading to suboptimal information fusion. Furthermore, traditional FPNs, by upsampling smaller feature maps and merging them with previous layers, overlook the rich semantic information in larger feature layers. This approach limits the model's ability to process small objects, ultimately constraining its multi-scale detection performance. To address these issues, this paper introduces a novel multi-scale feature extraction network MSFENet, which integrates a tiered scale fusion feature (TSFF) module at its core. As shown in Figure 1, MSFENet aims to overcome the limitations of traditional FPN by better exploiting large-scale feature information during fusion. Specifically, the network combines feature maps from multiple scales in a hierarchical manner: it fuses B1 (320 \(\times\) 320), B2 (160 \(\times\) 160), B3 (80 \(\times\) 80), B4 (40 \(\times\) 40), and B5 (20 \(\times\) 20) into new feature maps of progressively smaller sizes. For example, B1, B2, and B3 are fused into a 160 \(\times\) 160 feature map (T2), and so on, ensuring comprehensive information fusion. In contrast with traditional networks, MSFENet incorporates large-scale feature maps, such as B1 and B2, during the fusion process and feeds multi-scale feature levels (P2, P3, P4, and P5) into the detection head for multi-head detection, thereby enhancing small object detection. The core of MSFENet is the TSFF module. In the first half of the module, a scale fusion component is employed to merge multi-scale feature maps gathered from the backbone within the pyramid structure. The second half is composed of deep convolutions in parallel with the inception style, which can capture more extensive and more scale context information without affecting the integrity of local texture features. The detailed structure can be seen in Figure 2.  
The initial segment of the network consists of a scale fusion module. First, divide the features into three different scales: large, medium, and small. For the input large-size fea  
Figure 1: MSFENet structure diagram. Figure 2: TSFF module structure diagram. ture map, perform an average pooling operation first. This operation can smooth the feature map, reduce the influence of noise, and also reduce the spatial size and computational cost of the feature map. Compared with maximum pooling, average pooling can retain more global information and avoid excessive attention to local maxima. Then, the average-pooled feature map is split into two parts along the channel dimension. Each branch contains half the original number of channels. In the two divided parts, one part first performs a \(3\times 3\) maximum pooling to retain the significant local information in the image, highlight important features, and reduce the spatial size, and then a \(1\times 1\) convolution operation is performed to adjust the channel count without altering the spatial resolution. The other part performs a \(3\times 3\) convolution operation with a stride of 2 to extract local features of the image and enhance the capture of details. As a result, both branches produce outputs that are reduced by half in both spatial size and channel count relative to the original large-scale feature input. Finally, the resulting feature maps from both branches are merged via channel-wise concatenation, generating a compact yet informative output feature map of size \((C/2,H,W)\).