# Optimization Algorithm for Surface Defect Detection of Aircraft Engine Components Based on YOLOv5
## 5 Results
### Comparison of Detection Performance on Public Datasets  
To further verify the improved algorithm proposed in this paper, we conducted experiments on the steel surface defect dataset (NEU-DET) created by the team led by [PERSON] [32]. The dataset contains six defect categories: crazing, inclusion, patches, pitted surface, rolled in scale, and scratches. There are 300 identification images for each type of defect, and the defect annotation information for each category is saved in an XML file. Figure 8: Comparison of detection effect of improved models. In total, the dataset contains 1800 grayscale images and 4189 bounding boxes of detected defects. The 1800 images in the dataset were divided into training, validation, and test sets in an 8:1:1 ratio, resulting in 1440 training images and 180 validation and test images each. The defect images for each category in the dataset are shown in Figure 9, the location of one of the defective targets has been marked with a red box for easy viewing. with the location of the defect target indicated by the red box. The experiments were conducted with exactly identical training parameters for each improvement scheme, and the detection performance of each model on the NEU-DET dataset was compared and analyzed through ablation experiments. The results are shown in Table 2.  
Through analyzing the experimental results in the table above, it can be concluded that the four improvement points proposed in this paper have clear advantages in different fields, optimizing the feature representation ability of the detection model. Based on the different improvement points, the following conclusions can be drawn: \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline
**Biformer** & **C3-Faster** & **NWD** & **CARAFE** & **Parameters** & **GFLOPS** & **P/\%** & **R/\%** & **AP50/\%** & **Weight/KB** & **FPS/s** \\ \hline \hline \multirow{3}{*}{\(\surd\)} & & & & 7,030,417 & 16 & 81.1 & 42.2 & 52.3 & 14,126 & 131.58 \\  & & & & 7,296,145 & 26.3 & 66.9 & 61.5 & 59.5 & 14,649 & 97.09 \\ \cline{3-11}  & \(\surd\) & & & 5,799,889 & 12.8 & 51.6 & 60.7 & 51.6 & 11,717 & 117.65 \\ \cline{3-11}  & & \(\surd\) & & 7,030,417 & 16 & 68.4 & 58.4 & 56.1 & 14,126 & 128.21 \\ \cline{3-11}  & & & \(\surd\) & 7,030,417 & 16 & 67.3 & 50.6 & 55.4 & 14,126 & 129.87 \\ \cline{3-11}  & \(\surd\) & \(\surd\) & \(\surd\) & 6,206,049 & 23.5 & 53.3 & 64.5 & 62.9 & 12,525 & 101.01 \\ \hline \end{tabular} \(\surd\) indicates the application of this improvement.  
\end{table} 
Table 2: Various types of improved model performance data (NEU-DET). Figure 9: Partial target of the NEU-DET dataset. Adding a dual-layer routing attention mechanism can improve the detection accuracy of the network, but it also increases the overall computational complexity and weight volume. This means that more computing resources and storage space are needed to obtain more accurate detection results. By adding the NWD detection metric and the CARAFE upsampling operator, the network can improve detection accuracy while ensuring computational resources and weight volume. This means that, by introducing these improvement points, performance of target detection can be improved under the same hardware conditions. The C3-Faster module performs well in the NEU-DET dataset, enabling the model to achieve significant detection improvement while remaining lightweight. This means that, in scenarios where speed, accuracy, and model size are all required, the C3-Faster module is an effective choice. When these four improvement points are used together, they can complement each other and achieve the optimal improvement in detection effect. However, this integrated optimization will also be accompanied by an increase in the model's computational complexity and weight volume. In summary, the optimized model proposed in this paper can also improve the detection effect on datasets in other fields, and each improvement point has obvious characteristics.