# Adaptive Attention-Enhanced Yolo for Wall Crack Detection
###### Abstract  
With the advancement of social life, the aging of building walls has become an unavoidable phenomenon. Due to the limited efficiency of manually detecting cracks, it is especially necessary to explore intelligent detection techniques. Currently, deep learning has garnered growing attention in crack detection, leading to the development of numerous feature learning methods. Although the technology in this area has been progressing, it still faces problems such as insufficient feature extraction and instability of prediction results. To address the shortcomings in the current research, this paper proposes a new Adaptive Attention-Enhanced Yolo. The method employs a Swin Transformer-based Cross-Stage Partial Bottleneck with a three-convolution structure, introduces an adaptive sensory field module in the neck network, and processes the features through a multi-head attention structure during the prediction process. The introduction of these modules greatly improves the performance of the model, thus effectively improving the precision of crack detection. wall crack detection; Yolov5; swin transformer; adaptive receptive field; multi-head attention +
Footnote †: journal: Applied  
_Applied_  
_sciences_  
**Citation:** [PERSON]; [PERSON]; [PERSON] Adaptive Attention-Enhanced Yolo for Wall Crack Detection. _Appl. Sci._**2024**, _14_, 74078. [[https://doi.org/10.3390/app14177478](https://doi.org/10.3390/app14177478)]([https://doi.org/10.3390/app14177478](https://doi.org/10.3390/app14177478))  
**Citation:** [PERSON]; [PERSON]; [PERSON] Adaptive Attention-Enhanced Yolo for Wall Crack Detection. _Appl. Sci._**2024**, _14  
This study involves to the application of computer vision technology in crack detection, and its core objective is to improve the model's adaptability and reliability in complex environments. To achieve this objective, we subdivided the task into feature extraction, staged prediction, and feedback optimization. By introducing three cutting-edge modules to enhance feature extraction, we evaluate the overall performance of the model and optimize it through ablation studies. In this study, we propose an object detection model that incorporates the strengths of YOLOv5 and Transformer, called Adaptive Attention-Enhanced Yolo (AAEY). The model demonstrated efficiency and accuracy when performing object detection in complex environments. The AAEY model first utilizes Yolo for the initial processing of the image. Then, the concept of Swin Transformer is introduced in the backbone network and the Multi-head Self-Attention (MSA) mechanism [8] is used to improve the feature extraction capability. In the neck stage of the model, the model adjusts the weights of the three different perceptual domains through a Fully Connected Layer (FCL) [9] to achieve the dynamic fusion of information. When prediction is performed, the features undergo an attention mechanism that combines the different dimensions to achieve accurate object detection. The model in this paper makes the following main contributions. * AAEY effectively improves the accuracy of object detection. By incorporating Transformer's self-attention, the model is able to more accurately recognize long-distance dependencies in the image, thus integrating the information of each component more comprehensively. This improvement effectively reduces the detection error rate and enhances the model's performance and stability in crack detection tasks. * AAEY improves object detection precision through the integration of Transformer's attention mechanism. This enhancement allows the model to better capture long-range dependencies within the image. As a result, it integrates information from each component more effectively. Its feature processing strategy in both spatial and channel dimensions leads to improved performance in crack detection. * In this experiment, Precision, Recall, and F1-Score [10] were used to evaluate the detection ability of the model, while mean average precision (mAP) [11] was referenced as an auxiliary index.