# Rotating Target Detection Method of Concrete Bridge Crack Based on YOLO v5
## 1 Introduction
### Related Work  
With the rapid advancement of computer hardware and software technology, an increasing number of researchers are utilizing machine vision algorithms for detecting cracks in concrete bridge structures. [PERSON] et al. [5] proposed an arc length method that effectively captures the shape of bridge cracks and identifies features such as crack length, width, and angle. [PERSON] et al. [6] designed a hybrid image filtering protocol based on the moth-flame optimization algorithm, demonstrating excellent denoising performance on bridge defect images. [PERSON] et al. [7] introduced a multi-view geometric 3D reconstruction method, addressing challenges in surface crack identification, damage localization, and deformation recognition. Compared to manual inspection, machine vision offers objectivity, accuracy, and efficiency. It can also be combined with unmanned aerial vehicles for aerial inspections [8] and integrated with climbing robots [9], significantly enhancing the safety and economic benefits of inspections. In recent years, deep learning technology has become mainstream, eliminating the cumbersome preprocessing steps of traditional image processing methods while enhancing detection accuracy. This technology has greatly expanded the capability of vision-based concrete crack detection [10]. [PERSON] et al. [11] integrated region-based Faster R-CNN (FRCNN) with Structured Random Forest Edge Detection (SRFED), achieving both crack detection with bounding boxes and crack identification within boxes. [PERSON] et al. [12], using the Faster R-CNN approach, successfully identified and located various damage types, including concrete cracks, different levels of corrosion, and layering. [PERSON] et al. [13] developed a comprehensive automatic crack detection and crack depth assessment framework for concrete structures using images captured with portable devices. Among these, the YOLO series [14; 15], being one of the most popular object detection algorithms, has been employed by numerous researchers in fields such as medicine [16; 17], autonomous driving [18; 19], and aerospace [20; 21]. In the field of concrete crack detection, due to the inherent irregularity in the morphology of cracks, the original network's performance in comparison to other object recognition tasks is not as satisfactory. Therefore, a multitude of scholars have undertaken improvements. [PERSON] et al. [22] employed an enhanced YOLOv3 network and introduced the K-Means  
Figure 1: Inspectors from the US Army Corps of Engineers rappel down a Tainter gate to inspect for surface damage [4].  
clustering algorithm to address the issue of original anchor sizes not being suitable for bridge crack detection. [PERSON] et al. [23] employed YOLO v3 combined with depthwise separable convolutions and attention mechanisms to propose a lightweight detection network for the real-time detection of surface cracks on bridges. [PERSON] et al. [24] combined YOLO v5 with the UNet3+ algorithm to develop an integrated intelligent bridge crack detection method. [PERSON] et al. [25] improved the DeepLabv3+ model by introducing YOLOF and ResNet modules, significantly enhancing its accuracy compared to the original model. However, the YOLO series has a fatal flaw when used for crack detection. There is a significant amount of background information within the horizontally oriented detection boxes, making it challenging to accurately capture the essence of the cracks. This leads to difficulties in subsequent localization and quantification. To address this challenge, this paper explores a novel crack image rotation-based automatic detection method (R-YOLO v5). It replaces horizontal rectangular anchor boxes with rotated rectangular anchor boxes, introduces rotation regression variables to the original anchor framework, and redefines the loss function. Additionally, it incorporates an attention mechanism module to enhance the model's recognition accuracy, providing a new approach for crack detection and change monitoring.