# Optimization Algorithm for Surface Defect Detection of Aircraft Engine Components Based on YOLOv5
## 6 Conclusions and Future Work  
To achieve efficient and accurate detection of surface defects on aviation engine components, this paper proposes an improved YOLOv5 optimization algorithm. Targeting the defect features of the aviation engine component defect dataset, a Biformer module is added. By using a Bi-level routing attention mechanism, it simultaneously focuses on the local features and global relationships of the detection targets, effectively improving the overall detection accuracy. Based on the FasterNet network, the C3-Faster module is proposed to replace the original C3 module, enhancing robustness, ensuring accuracy, and achieving model light-weight design. The NWD detection metric is introduced, using normalized Gaussian Wasserstein distance to enhance the detection accuracy of small targets. Additionally, a versatile and lightweight CARAFE upsampling operator is added to recombine local information features, expand the receptive field, and improve content-awareness performance. Experimental results demonstrate that the improved YOLOv5 model achieves significant improvements in detection accuracy compared to the original YOLOv5 model. It elevates the recognition of targets with poor performance in the original algorithm to a usable level, while also significantly reducing the model's parameter quantity and weight volume. Furthermore, it exhibits noticeable advantages in accuracy, speed, and volume compared to mainstream algorithms. This approach can effectively enhance work efficiency and reduce labor demands in the field of aviation engine component detection, providing a high application value.  
In future work, the content of our dataset will continue to increase. The present study only includes four types of defects, but in reality, there may be many more types of defects. We will further supplement the defect types in the dataset. To enhance the algorithm's generalization ability in practical applications, we will consider adding defect image data captured under different lighting conditions, exposures, and other complex environments. Currently, the algorithm model only supports real-time detection when connected to a computer. In the future, efforts will be made to deploy it on portable devices such as bore scopes to increase detection flexibility and efficiency. Once the dataset is fully developed, we plan to explore additional algorithm types to continuously improve detection accuracy and speed, maximizing its applicability in safeguarding and maintenance work for aircraft engines.  
Conceptualization, C.W.; methodology, Y.Q.; software, Y.Q.; validation, Y.Q.; formal analysis, Y.X.; investigation, Y.X. and J.Y.; resources, Y.X. and X.C.; data curation, Y.K.; writing--original draft preparation, Y.Q. and Y.K.; writing--review and editing, C.W.; visualization, Y.Q. and J.Y.; supervision, C.W.; project administration, C.W.; funding acquisition, C.W. All authors have read and agreed to the published version of the manuscript.  
This research was funded by Natural Science Basic Research Program of Shaanxi, Program number 2023-JC-QN-0696.  
The data that support the findings of this research are openly available at [[http://faculty.neu.edu.cn/songkechen/zh_CN/zhym/263269/list/index.htm](http://faculty.neu.edu.cn/songkechen/zh_CN/zhym/263269/list/index.htm)]([http://faculty.neu.edu.cn/songkechen/zh_CN/zhym/263269/list/index.htm](http://faculty.neu.edu.cn/songkechen/zh_CN/zhym/263269/list/index.htm)) (accessed on 15 September 2023).  
The authors declare no conflict of interest.  
List of abbreviations.  
YOLO 24.9  
SSD 46.6  
R-CNN  Regions with CNN features  
CBAM  Convolutional block attention module  
FPN  Feature pyramid network  
PAN  Path aggregation network  
PConv  Partial convolution