## 3 System Overall Process
### Decoder
#### 3.3.2 Localization Decoder  
In order to optimize multi-scale feature fusion, this study's Neck module is inspired by the Feature Pyramid Network (FPN) and Path Aggregation Network (PAN) designs in YOLOv5. As shown in Figures 8 and 9, FPN transfers high-level semantic information (e.g., P5, P4) to lower-level features (e.g., P3, P2) through a top-down pathway, thereby effectively enhancing the detection of small objects. Meanwhile, PAN passes lower-level features (e.g., N2, N3) upward to higher-level features (e.g., N4, N5) via a bottom-up pathway, strengthening the support of low-level details for higher-level semantics. The blue boxes on the right represent the fused multi-scale feature maps at each level, and the black arrows on the far right lead to the detection head for the final localization task. Through multiple up-sampling and down-sampling operations, the Neck module processes the feature maps from the Backbone so they can handle target localization tasks of various scales. This design effectively addresses the challenge that single-scale features often struggle to detect both large and small objects, while maintaining high efficiency and robustness. Consequently, it provides multi-scale, semantically enriched feature representations for object detection. Figure 8: Schematic diagram of the Feature Pyramid Network (FPN). Figure 9: Schematic diagram of the Path Aggregation Network (PAN). To further enhance the performance of the Neck module in multi-scale feature fusion in this study, we introduced the Efficient Channel Attention (ECA) mechanism [15] to more efficiently enhance the channel-wise weight distribution of features. ECA is a lightweight attention mechanism that strengthens the model's focus on critical features by introducing local cross-channel interaction operations. This is achieved without significantly increasing computational complexity, thereby further improving the performance of classification and localization tasks. As shown in Figure 10, the ECA attention mechanism utilizes global average pooling to extract global information from each channel and combines it with local cross-channel interactions to assign weights to each channel. Its core characteristic is improving the computational efficiency of channel attention without substantially increasing complexity, thereby effectively enhancing the deep neural network's ability to represent key features. Compared with traditional attention mechanisms, ECA avoids redundant computations through simpler operations, enabling the network to focus more on important channel features while maintaining computational efficiency. In this study, ECA was integrated into the multi-scale feature fusion process of the Neck module, further optimizing the channel weight distribution of features. Combined with FPN and PAN, the ECA mechanism strengthened the collaboration between high-level semantic information and low-level detailed features, enabling the model to focus more precisely on the salient characteristics of targets. Specifically, the introduction of ECA dynamically adjusted channel importance during the generation of multi-scale feature maps, helping the model to efficiently capture prominent regions of tiny defects while reducing interference from background noise. As shown in Figure 11, which illustrates the architecture diagram of the model in this paper, our localization decoder adopts the anchor-based multi-scale detection scheme from the YOLOv5 network. This approach, known for its computational efficiency and excellent detection performance, has become one of the mainstream methods in the field of object detection. The anchor-based multi-scale detection scheme uses predefined anchors to preliminarily frame targets in the image. These anchors are then filtered using the Intersection over Union (IoU) method to classify them into positive and negative samples. Anchors identified as positive samples are treated as target boxes for training, while negative samples are directly ignored.