| Many components on the bridge are connected by hexagonal bolts,which are prone to loosen after being subjected to impact loads and repeated loads.At present,maintainers are usually arranged for inspection and maintenance.In order to solve the problems of untimely detection,poor detection accuracy,and high cost in traditional detection methods,this thesis proposes an automatic bolt loosening detection method based on deep learning and computer image processing.The specific research content is as follows:1.Images of connecting bolts of bridge components were collected,and the bolt object detection training dataset built by labelling images was divided into five parts according to the image quality and the relative size of the bolts.Then the SSD,YOLO V5 m and YOLO V5 s bolt object detection neural networks were built based on the deep learning library Py Torch.Finally,the performance of the trained network was analyzed on the test dataset.The result shows that in the 50 th cycle,the m AP_0.5 index of the YOLO V5 m and YOLO V5 s network is around 0.75,and the recall rate is around 0.7;the m AP_0.5 of the SSD network is only 0.3,and the recall rate is around 0.1 when training dataset5 which consists of the most small bolt targets and the worst image quality.In conclusion,the YOLO V5 network has high recognition accuracy and fast detection speed,which is suitable for real-time detection of small targets such as bolts.Among them,YOLO V5 s has a smaller file size,so the overall performance is the best.2.A bolt rotation recognition method based on image processing was proposed.Firstly,bolt pictures were preprocessed and inputted into the YOLO V5 s network for bolt target detection,then the ROI area was automatically cropped based on the target detection bounding box information.Secondly,the pictures were binarized and segmented to obtain the outline and position information of the bolt body.Perspective correction was performed by matching with the template in order to remove errors caused by different shooting angles.Then the corner points of the bolt outline were extracted,consequently outline direction vector was extracted using the error ellipse principle,and the bolt rotation angle was calculated.Finally,the loose bolts were identified by comparing the changes in the bolt rotation angle during the detection process.3.The feasibility,accuracy and stability of the rotation recognition algorithm were tested by pictures of bolts gusset plate specimens.In the algorithm feasibility test,the method had been verified by experiments with a total of 64 bolts in four working conditions.The result shows that this method has high recognition accuracy.If the photo defects are not considered,the maximum angle recognition error can be controlled within ±3°,and the average error is-0.12°.The correlation coefficient between the measured and the algorithm identification values of each bolt angle is as high as 0.997.The time consumption of running this algorithm to detect an image is within two seconds,which preliminarily proves the feasibility of the algorithm design.In the algorithm accuracy test,the shooting horizontal angle,shooting distance,ambient light and bolt background rust were controlled to evaluate the performance of the algorithm when extracting the bolt head side and bolt+nut side.The result shows that when the shooting distance is within 1.5m,and the shooting horizontal angle is within 20°,the algorithm’s rotation angle recognition accuracy of the bolt head side can be high,and the recognition error can be basically controlled within ±2°.As for the bolt+nut side,the shooting distance should be greater than 1m,and the shooting horizontal angle should be less than 10°.Ambient light has little influence on the algorithm’s recognition effect,and ideal results can be achieved in both dark and bright environments.However,the recognition accuracy of the algorithm is easily affected by the rust traces in the bolt background.The result of the algorithm stability test shows that when the algorithm recognizes the bolt side with the shooting distance less than 1m and the shooting horizontal angle less than 20°,the result is stable,the maximum standard deviation of the recognition value fluctuation is 1.67.The stability of the obtained results is poor when the algorithm shoots the bolt+nut side,and the standard deviation of the identification value fluctuation can reach 12.28.4.The size of YOLO V5 s model was compressed to its half using weight quantization and model pruning,with no loss of model detection accuracy.Then the model was transplanted to the neural network forward calculation framework NCNN,which is used for small devices with low computing power.Finally,the code was encapsulate based on the Gradle tool of Android Studio,and a mobile terminal bolt target detection program that can run on Android smartphones was compiled. |