The mechanical performance of the bolted connection is related to pretightening torque, thread pair contaction and friction of contact surfaces [
6,
7,
8]. In order to explore the mechanism of bolt loosening, Goodier et al. [
9] tested the behavior of bolted connections under dynamic load. They explained that bolt loosening is caused by relative motion between screw threads and fasteners. Junker [
10] designed classic experimental equipment to reveal that the relative motion between screw threads and fasteners is the main cause of bolt loosening. The decrease in pretightening torque and the rotation of bolts or nuts are the main phenomena of loosening. Jiang et al. [
11] investigated the decline in preload in the loading cycle. The ratio relationship between the current preload and the initial preload was obtained. At the same time, Junker’s experimental equipment was improved, and a component was added to measure the relative angle between the bolt and the nut. The pretightening torque and the relative angle become important in the detection of bolt loosening. Yin [
12] and Huo et al. [
13] proposed a new bolt loosening detection method based on a piezo-electric transducer (PZT). The actual contact area can be determined by detecting the ultrasonic wave energy transmitted between contact surfaces. Experimental results show that there is an approximately linear relationship between the signal peak value and pretightening torque of the bolt under a saturation problem, which can be used to monitor bolt loosening. Xu et al. [
14] proposed an improved time reversal method to monitor bolt loosening, which reconstructs the phase and amplitude of the signal. If there is a phase shift and amplitude difference between the signal generated by the structure in the healthy state and the reconstructed signal, it indicates that the structure is damaged. Experiments show that this method can realize quantitative monitoring of bolt preload with higher precision and sensitivity. Zhao et al. [
15] combined PZT with the time reversal method for real-time health monitoring of bolted connections in wood structures. A bolt pretightening torque loss index of wood structure was proposed based on wavelet analysis design, which can reflect the looseness of bolts in wood structures. Zhang et al. [
16] proposed a bolt loosening detection method based on audio classification. By recording and extracting hammer sounds of bolted connections at different loosening degrees, support vector machine (SVM) was used to train and test datasets, and quantitative detection results of bolt loosening were finally obtained. This method has high recognition accuracy and strong anti-noise ability. Wang et al. [
17] proposed a new vibroacoustic method (VAM) for detecting the looseness of multi-bolt connections. The above detection methods can basically achieve unmanned online monitoring of bolted connections. However, these detection methods all need specific sensors to collect signals [
18,
19,
20] and will undoubtedly increase the cost and difficulty of monitoring in the bolted connection structures due to the increasing number of sensors.
With the development of camera and image processing technology, structural health monitoring methods based on machine vision have been developed rapidly. Kromanis et al. [
21] proposed a vision-based test method for measuring deformation and cracks of reinforced concrete structures. In addition, Kromanis also proposed a damage detection technique for bridge structure based on computer vision-derived parameters [
22]. Cameras were used to collect the image frames of the bridge model under traffic loads, and the nodal displacements of the bridge model were computed from each image frame by an image processing algorithm. Structural responses such as deflection and strain were calculated according to the nodal displacements. Finally, the damage of the bridge structure was detected by analyzing the structural response. Kromanis’ research shows that the machine vision-based methods for structure health monitoring are more efficient and less costly than traditional monitoring methods. Many researchers have studied the loosening of bolt connections based on machine vision and image processing technology. Huynh et al. [
23] proposed a method to identify the rotation angle of the nut using the Hough transform algorithm and to detect whether the bolt is loose by comparing the angle changes before and after. This method based on visual image can detect the nut rotation angle with an accuracy of ±2.6°. With the rapid development of deep learning, various neural networks have emerged with high recognition accuracy. For example, AlexNet [
24] used GPU to accelerate computing for the first time, and other networks such as VGGNet [
25], R-CNN [
26], Fast R-CNN [
27], GoogleNet [
28] and Faster R-CNN [
29] have continuously improved the recognition accuracy of target detection. In addition, YOLO [
30] and SSD [
31] considered the speed and accuracy of recognition. Compared with traditional methods, methods based on deep learning can autonomously learn the characteristics of data [
32,
33,
34,
35,
36]. In the field of bolt loosening detection, Zhuang et al. [
37] combined the time reversal method with deep learning methods to classify the ultrasonic signals in the bolted connections of wood structures, thus realizing the prediction of residual preload on bolted connections. Cha and Choi et al. [
38,
39,
40] combined machine vision with support vector machine (SVM) to automatically distinguish tight bolts and loose bolts by detecting horizontal and vertical lengths of bolt heads in images. Huynh et al. [
41] used R-CNN to detect and cut plausible bolts in bolt images, and then the Hough linear transformation (HLT) image processing algorithm was used to automatically estimate the angle of bolt loosening from bolt images. Zhao et al. [
42] used SSD to identify bolt heads and the numbers on bolt heads, and the included angle of the center coordinates of the two predicted boxes was calculated. The monitoring of bolt loosening can be realized by measuring the change of the angle. The minimum identifiable angle of the method is 10°, and the angle of bolt loosening can be detected by 360°. Zhang et al. [
43,
44] used Faster R-CNN to train different screw heights after bolt loosening to determine whether bolts are tight or loose, and the recognition accuracy reached 95.03%. Pham et al. [
45] used composite bolt images generated by graphical models as datasets trained by a neural network, which is helpful in reducing the time and cost of collecting high-quality training data. Pal et al. [
46] extracted identification features using convolutional neural network (CNN) from time-frequency scale images based on vibration to detect bolt loosening. The average accuracy of the method is respectively 100% and 98.1%. Pan et al. [
47] proposed an RTDT-bolt method by combining YOLOv3-tiny with optical flow method. The method achieved real-time detection and tracking of bolt rotation with an accuracy of more than 90%. Yuan et al. [
48] used MASK R-CNN to complete the identification and classification of bolt loosening in near real time through a webcam. The minimum identifiable screw height was 4 mm. Gong et al. [
49] proposed a bolt loosening detection method combining deep learning with geometric imaging theory, which can accurately calculate the length of exposed bolts. First, the exposed bolt was located using Faster R-CNN, and then, five key points on the exposed bolt were identified using CPN. Finally, the length of the exposed bolt was calculated by a length calculation module. The mean measurement error of this method is only 0.61 mm. The above detection methods combine deep learning with machine vision, which can not only identify various features of bolted connections but can also detect bolt loosening more intuitively and with higher precision. However, some of the above methods can only distinguish tight bolts and loose bolts, failing to determine the loosening degree of bolted connections. When the bolt loosening angle is tiny, the above methods cannot realize the early monitoring of bolt loosening. Therefore, it is necessary to investigate the detection method of bolt loosening angle.
Bolt loosening in engineering structures can be transformed into a target detection problem. Combining deep learning with machine vision, a bolt-loosening detection method based on a neural network is proposed. By adding two different circular markers on the bolted connection, a neural network is used to detect the included angles between the markers. The detection of bolt loosening can be realized by calculating the rotation angle of the nut against the bolt. Due to the small size of the markers on the bolt, YOLOv5 is effective and more efficient in detecting small targets. Compared with YOLOv3 [
50,
51] and v4, the network structure of YOLOv5 can extract deeper features and achieve better detection results. First, bolt images were collected using a smartphone and were trained by YOLOv5. Then, the trained model was used to detect the rotation angle of the nut against the bolt, and experiments were carried out in different environments to verify the detection accuracy of the proposed method.