YOLOv8-based bolt looseness detection method, system, equipment, medium and program

By improving the YOLOv8 model, the introduction of C2f-DCNv2 convolutional layer and SEAM attention mechanism is solved, the problem of incomplete bolt feature extraction in the existing technology is achieved, faster and more accurate bolt loosening detection is achieved, and the reliability and efficiency of the detection system is improved.

CN119579525APending Publication Date: 2025-03-07CNNC HUACHEN CONSTR ENG CO LTD +2
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411627195.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

Existing bolt loose detection based on deep learning networks is difficult to deal with irregular shapes or deformed objects, resulting in incomplete extraction of bolt features and affecting the accuracy of detection results.

Method used

Using the improved YOLOv8 model, the feature extraction and processing process is optimized to improve the model's adaptability to complex scenarios by introducing C2f-DCNv2 convolutional layer into the backbone network and the SEAM attention mechanism in the detection head.

Benefits of technology

It significantly improves the speed and accuracy of bolt loose detection, ensures high-precision identification of bolt status monitoring in complex environments, and enhances the overall reliability and efficiency of the detection system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119579525A_ABST
    Figure CN119579525A_ABST
Patent Text Reader

Abstract

The invention discloses a bolt looseness detection method, system and device based on YOLOv8, a medium and a program, and belongs to the technical field of mechanical engineering. The method comprises the following steps: acquiring bolt image data of a to-be-detected area to obtain bolt image data; and inputting the bolt image data into a pre-trained YOLOv8 model for identification to obtain an identification result. According to the invention, the speed and accuracy of bolt looseness detection are improved, and high-precision identification of bolt state monitoring in a complex environment is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of mechanical engineering technology, and in particular to a bolt loosening detection method, system, equipment, medium and program based on YOLOv8. Background Art

[0002] Tower cranes are common heavy machinery equipment on construction sites and are widely used for lifting and transporting materials in high-rise buildings and large engineering projects. The tower crane has a complex structure and consists of multiple components, including booms, tower bodies, foundations, slewing mechanisms, etc. In order to ensure the safe operation of the tower crane, these components are connected by a large number of bolts to ensure the stability of the structure. As mechanical connectors, bolts are subjected to huge stress and vibration during the operation of the tower crane. These stresses and vibrations can cause the bolts to loosen, which in turn affects the overall structural safety of the tower crane. If the loose bolts are not discovered and handled in time, it may lead to the failure or collapse of the tower crane components, causing serious safety accidents. Therefore, the detection of loose bolts is crucial for the safe operation of the tower crane. At present, road defect detection includes manual inspection methods, sensor detection, and detection based on deep learning networks.

[0003] Manual inspection methods mainly rely on manual operation and have many limitations. First, this method is inefficient, especially in the inspection process of large tower cranes, where manual operation is cumbersome and time-consuming. Second, since the inspection results are affected by the experience, technical level and attention of the inspectors, there is a risk of negligence and misjudgment, and human factors have a significant impact on the inspection results. In addition, the tower crane has a complex structure and some bolt positions are difficult to access or inspect, making it difficult to achieve full coverage inspection.

[0004] Sensor detection detects looseness through sensors installed on bolts. Although it improves the automation level of detection, it also has some shortcomings. First, the sensors need to be calibrated and maintained regularly, which increases the maintenance cost and workload in the later stage. Second, the large amount of data generated by the vibration sensor needs to be processed and analyzed in a complex manner, and real-time monitoring is difficult, which puts higher requirements on technology and equipment.

[0005] Although detection based on deep learning networks can achieve full coverage inspection and perform a large amount of data analysis and processing. However, existing detection based on deep learning networks uses fixed sampling positions through convolution, which limits the adaptability of the convolution kernel to geometric deformations in the image, making it unable to accurately capture these features when dealing with irregularly shaped or deformed objects. Secondly, when dealing with objects with complex shapes, traditional convolution may not be able to fully cover the features of these shapes, resulting in incomplete feature extraction, which in turn affects recognition accuracy. At the same time, the incomplete capture of spatial information and the neglect of the relationship between channels will affect the network's ability to process complex features. Summary of the invention

[0006] In view of the problem that the detection of deep learning networks in the prior art cannot process irregularly shaped or deformed objects, resulting in incomplete feature extraction of bolts and affecting the detection results of bolt faults, the present invention provides a bolt loosening detection method based on YOLOv8, which improves the speed and accuracy of bolt loosening detection and ensures high-precision identification of bolt status monitoring in complex environments.

[0007] In order to achieve the above object, the present invention provides the following technical solutions.

[0008] In a first aspect, the present invention provides a method for detecting loose bolts based on an improved YOLOV8, comprising: Collecting bolt image data of the area to be detected to obtain bolt image data; Input the bolt image data into the pre-trained YOLOv8 model for recognition and obtain the recognition result; The training method of the pre-trained YOLOv8 model includes: Collect image data of the area to be inspected and perform preprocessing to obtain a bolt image data set; The training set in the bolt image dataset is input into the YOLOv8 model, and the pre-training weights are obtained through training and optimization of the neural network in the YOLOv8 model; Train the YOLOv8 model based on the pre-trained weights to obtain a trained YOLOv8 model; The test set in the bolt image dataset is input into the trained YOLOv8 model for verification and recognition, and the recognition result of the bolt status is obtained.

[0009] As a further improvement of the present invention, the image data of the area to be detected is collected and preprocessed to obtain a bolt image data set, including: Capture images of the bolts in the inspection area to obtain images of the bolts; Annotate the bolt images and divide the images into bolt tightening and bolt loosening states to obtain a bolt image dataset of bolt states; The bolt image dataset of bolt status is divided into training set, validation set and test set.

[0010] As a further improvement of the present invention, the training set in the bolt image data set is input into the YOLOv8 model, and the pre-training weights are obtained by training and optimizing the neural network in the YOLOv8 model, including: Improve the neural network of the YOLOv8 model, including replacing the C2f convolution layer in the last output layer of the backbone network with the C2f-DCNv2 convolution layer, and introducing the SEAM attention mechanism in the detection head to obtain the improved YOLOv8 model; The training set of the bolt image dataset is input into the improved YOLOv8 model for training, and the corresponding training weights are generated after each round of training; After the training is completed, among the corresponding training weights generated after each round of training, the training weights with the best training effect are selected as pre-training weights.

[0011] As a further improvement of the present invention, the step of inputting the training set of the bolt image data set into the improved YOLOv8 model for training includes: The training set of the bolt image dataset is input into the backbone network of the improved YOLOv8 model, and the backbone network features are extracted through C2f-DCNv2; Use modulatable deformable convolution and deformable RoI pooling to process the backbone network features and obtain feature maps; The feature map is fed into the neck network of the improved YOLOv8 model, and PANet is used to perform multi-scale feature fusion to obtain the fused feature map. The fused feature map is input into the detection head of the improved YOLOv8 model, and the SEAM attention mechanism module is introduced to generate enhanced feature maps through point-by-point convolution and depth-wise separable convolution; The enhanced feature map is input into the fully connected layer, and the loss function is calculated to obtain the loss result.

[0012] As a further improvement of the present invention, the YOLOv8 model is trained based on the pre-trained weights to obtain the trained YOLOv8 model, including: Train the YOLOv8 model according to the pre-trained weights to obtain a pre-trained YOLOv8 model; Input the validation set of the bolt image dataset into the pre-trained YOLOv8 model for evaluation and obtain the evaluation results; If the evaluation results meet the set requirements, the trained YOLOv8 model is obtained; If the evaluation result does not meet the set requirements, the pre-training weights are obtained again.

[0013] As a further improvement of the present invention, the test set in the bolt image data set is input into the trained YOLOv8 model for verification and recognition to obtain the recognition result of the bolt state, including: The test set in the bolt image dataset is input into the trained YOLOv8 model to perform bolt verification and recognition, and obtain the recognition result of the bolt status; The identification result of the bolt status includes the looseness status of the bolt and the bolt position information.

[0014] In a second aspect, the present invention provides a bolt loosening detection system based on an improvement of YOLOV8, comprising: Data acquisition module: used to acquire bolt image data of the area to be detected and obtain bolt image data; Recognition result module: used to input bolt image data into the pre-trained YOLOv8 model for recognition and obtain recognition results; The training system of the pre-trained YOLOv8 model includes: Data processing module: used to collect image data of the area to be inspected and perform preprocessing to obtain a bolt image data set; Training weight module: used to input the training set in the bolt image dataset into the YOLOv8 model, and obtain the pre-training weights through training and optimization of the neural network in the YOLOv8 model; Training model module: used to train the YOLOv8 model based on the pre-trained weights to obtain the trained YOLOv8 model; Verification and recognition module: It is used to input the test set in the bolt image dataset into the trained YOLOv8 model for verification and recognition to obtain the recognition result of the bolt status.

[0015] In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the improved bolt loosening detection method based on YOLOV8 when executing the computer program.

[0016] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the improved bolt loosening detection method based on YOLOV8 are implemented.

[0017] In a fifth aspect, the present invention provides a computer program product, characterized in that it includes computer instructions, which, when executed by a processor, implement the steps of the improved bolt loosening detection method based on YOLOV8.

[0018] Compared with the prior art, the present invention has the following beneficial effects: The present invention can more quickly and accurately identify the state of the bolt, including whether it is loose, by adopting the pre-trained YOLOv8 model. The YOLOv8 model, with its efficient network structure and optimized training algorithm, can significantly improve the detection speed while ensuring the detection accuracy, which is crucial for real-time monitoring and rapid response to the problem of bolt loosening. Traditional deep learning networks often perform poorly when processing objects with irregular shapes or deformations, and the present invention enables the YOLOv8 model to better adapt to such situations through specific training methods and data preprocessing, so that the features of the bolts can be more completely extracted and the reliability of the detection results can be improved. Monitoring of the bolt state often faces great challenges, such as changes in illumination and cluttered backgrounds. The present invention optimizes the training process of the YOLOv8 model so that it can maintain high-precision recognition in these complex environments, thereby ensuring the accuracy and stability of bolt state monitoring. The present invention can significantly improve the overall reliability and efficiency of the bolt loosening detection system. By monitoring the bolt state in real time and accurately, potential loosening problems can be discovered and handled in a timely manner, avoiding safety accidents and equipment damage caused thereby, while reducing maintenance costs and time. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The drawings described herein are for illustrative purposes only and are not intended to limit the scope of the present disclosure in any way. In the drawings: Figure 1 It is a flow chart of a bolt loosening detection method based on YOLOv8 of the present invention; Figure 2 A schematic diagram of a training method for a pre-trained YOLOv8 model of the present invention; Figure 3 A schematic diagram of a specific process of a bolt loosening detection method based on YOLOv8 in the present invention; Figure 4 The schematic diagram of the architecture of the C2f-DCNv2 convolutional layer in the improved yolov8 model of the present invention; Figure 5 This is a schematic diagram of the SEAM attention mechanism module architecture in the improved yolov8 model of the present invention; Figure 6 This is a comparison diagram of the effects of the present invention before and after the improvement of yolov8; Figure 7 It is a structural schematic diagram of a bolt loosening detection system based on YOLOv8 of the present invention; Figure 8 A schematic diagram of the structure of the training system of the pre-trained YOLOv8 model of the present invention; Fig. 9 It is a schematic diagram of an electronic device in a specific embodiment of the present invention. DETAILED DESCRIPTION

[0020] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the present invention will be clearly and completely described below in conjunction with the drawings in the present invention. The described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present invention.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0022] The existing deep learning network detection in the prior art cannot process irregularly shaped or deformed objects, resulting in incomplete feature extraction of bolts, which affects the detection results of bolt faults. The present invention provides a bolt loosening detection method based on YOLOv8, such as Figure 1 As shown, the method includes: S100: collecting bolt image data of the area to be detected to obtain bolt image data; S200: input the bolt image data into the pre-trained YOLOv8 model for recognition to obtain a recognition result; like Figure 2 As shown, the training method of the pre-trained YOLOv8 model includes: S210: collecting image data of the area to be inspected and performing preprocessing to obtain a bolt image data set; S220: input the training set in the bolt image data set into the YOLOv8 model, and perform training optimization through the neural network in the YOLOv8 model to obtain pre-trained weights; S230: Train the YOLOv8 model based on the pre-trained weights to obtain a trained YOLOv8 model; S240: Input the test set in the bolt image dataset into the trained YOLOv8 model for verification and recognition, and obtain the recognition result of the bolt status.

[0023] The present invention realizes rapid and accurate extraction of target feature information by optimizing feature extraction and processing flow, thereby improving the speed and accuracy of bolt loosening detection.

[0024] The main purpose of the present invention is to provide a bolt loosening detection method based on an improved YOLOv8 architecture. The method aims to achieve rapid and accurate extraction of target feature information by optimizing feature extraction and processing procedures, thereby improving the speed and accuracy of bolt loosening detection. The present invention not only improves detection efficiency, but also ensures high-precision identification in complex environments, providing a reliable technical solution for bolt state monitoring in practical applications.

[0025] The present invention is achieved through the following technical solutions: An improved bolt loosening detection method based on YOLOV8, such as Figure 3 As shown, the method includes: S1: Determine the installation position of the tower crane bolts. Tighten the bolts and the hardware connected to them in the inspection area, and draw a marking line at the connection between the bolts and the hardware. The marking line is used to clarify the connection status between the bolts and the hardware, so as to serve as a reference standard in the subsequent inspection process.

[0026] S2: For different states of bolts, we collected image datasets including bolts after tightening and loosening. During the acquisition process, we adjusted the shooting angle and distance and considered the different corrosion levels that may exist on the bolt surface, and obtained a total of 1,000 image datasets. This dataset contains a variety of possible bolt state changes, aiming to provide comprehensive sample coverage for model training.

[0027] S3: The collected dataset is annotated using the Makesense tool, and divided into two states, "tight_state" (bolt tightened) and "loose_state" (bolt loosened), using the YOLO format. It is then divided into a training set, a validation set, and a test set in a ratio of 7:2:1.

[0028] S4: Input the images of the bolts in tightened and loose states collected in S3 into the improved YOLOv8 model for training. During each training process, the neural network of the YOLOv8 model will be gradually optimized, and the corresponding weight files will be generated after each round of training. These weight files record the model's ability to recognize different bolt states.

[0029] Specifically, the neural network of the YOLOv8 model was optimized.

[0030] In the YOLOv8 model configuration file, replace the C2f convolutional layer in the last output layer of the backbone network with the C2f-DCNv2 convolutional layer, as shown in Figure 4 As shown in Figure 2, at the same time, the SEAM attention mechanism is introduced in the detection head, as shown in Figure 2. Figure 5 shown.

[0031] S4.1: When the image to be detected is input into the trained YOLOv8 neural network, it is first resized to a fixed size of 640x640 pixels to meet the input requirements of the model. Next, the image passes through the initial convolution layer, using a 3x3 convolution kernel and a convolution operation with a step size of 2, which quickly reduces the spatial resolution of the image and extracts low-level features such as edges and corners. After this step, the input image changes from 640x640x3 (RGB three channels) to a smaller feature map of 520x320x32, where 32 represents the number of convolution kernels, that is, the number of channels.

[0032] S4.2: The image enters the YOLOv8 backbone network and passes through a series of convolutional blocks consisting of convolutional layers, activation functions, and batch normalization layers. In the last layer of the backbone network, C2f-DCNv2 is used to replace c2f convolution. The unique mediation mechanism of C2f-DCNv2 can be given The convolution kernel of sampling positions is and Respectively represent The weights and pre-specified offsets of the positions represent the features of position p in the input feature map x and the output feature map y, respectively.

[0033] S4.3: Use modulated deformable convolution as shown in formula (1) to calculate: and They are learnable offsets and weight scalars for positions, The range is [0,1], and the offset value is still calculated using bilinear interpolation. and Calculated through the same bypass convolution layer, the bypass output channel is , is the convolution kernel size of the backbone, The dimensions are the x and y offsets of each position, and The weight of each position. The parameters of the bypass convolution are initially 0, so and Initially, they are 0 and 0.5, and the learning rate is 0.1 times the backbone learning rate. The network can use this formula to dynamically adjust the position and feature response of the convolution kernel, thereby enhancing the adaptability of the convolution operation to different features. At the same time, the deformable RoI pooling is calculated as shown in Formula 2 below. The calculation of a single bin of the modulatable deformable RoI pooling is as shown in Formula (2). is the total number of pixels in the bin, and Corresponding to the offset and weight of the entire bin. The dimension is the normalized bin offset value, which is multiplied by the RoI area to obtain the final bin offset value. The weight, initialization and learning rate of each bin are consistent with the above, allowing the model to give greater weight to more important sampling points on the feature map, thereby enhancing sensitivity to the target shape and posture. Finally, in these convolution blocks, a 3x3 convolution kernel is used for feature extraction, and a 1x1 convolution kernel is used to adjust the number of channels. Between or after each convolution block, the network performs a maximum pooling operation, using a 2x2 pooling window and a step size of 2 to further reduce the spatial size of the feature map while retaining the most significant features. The size of the feature map after the pooling operation is reduced by half, from 320*320*32 to 160*160*32.

[0034] (1) In the formula, For the The weight of a position; P is the position; For the A pre-specified offset for each position; for A learnable offset value for the position; for Scalar weight for the position.

[0035] (2) In the formula, and Corresponding to the offset and weight of the entire bin, is the total number of pixels in the bin S4.4: After the feature extraction of the backbone network, the feature map enters the neck network of the improved YOLOv8. This part of the structure usually uses PANet for multi-scale feature fusion. Through upsampling and downsampling operations, PANet can effectively fuse feature maps of different scales, thereby enhancing the model's detection ability for objects of different sizes.

[0036] S4.5: The fused feature maps are input into the detection head, where the SEAM attention mechanism module is introduced. First, point-wise convolution is performed with a 1x1 convolution kernel to fuse the feature maps from the S4 layer and expand the number of channels. Subsequently, each channel is convolved separately using a depth-wise separable convolution. Next, these convolved feature maps are multiplied with the original feature maps to generate enhanced feature maps. Finally, the enhanced feature maps are flattened into a one-dimensional vector and input into one or more fully connected layers, which further process the features to learn the correspondence between these features and the target categories and bounding box positions.

[0037] S4.6: Finally, the output results are divided into two parts: the first part generates the category probability distribution of each candidate region through the Softmax function for classification. The calculation of the classification loss function is shown in formula (3), where q represents the IoU between the predicted box and the true box. If q>0, the predicted box overlaps with the true box and is defined as a positive sample; if q = 0, there is no overlap and it is defined as a negative sample. p represents the confidence of the model prediction, that is, the probability of predicting a loose or non-loose category. The second part generates the bounding box coordinates of each candidate region through the activation function, and uses formula (4) to calculate the Euclidean distance between the center point of the predicted box and the true box, and normalizes the distance with the ratio of the square of the diagonal length of the minimum circumscribed rectangle containing the predicted box and the true box. Finally, the bounding box loss function for regression is calculated. In order to obtain the final detection result, the YOLOv8 model filters the redundant detection boxes through the non-maximum suppression (NMS) method and retains only the most likely bolt loosening detection results.

[0038] (3) In the formula, The model predicts the confidence that the sample is the foreground (target). When q=0, VFL has a hyperparameter for negative samples. To prevent over-inhibition, It will reduce the contribution of negative samples (4) Where: It is defined as the ratio of the intersection area of ​​two boxes to the union area. Prediction box The center point and the real frame The Euclidean distance between the center points of The square of the diagonal distance of the bounding box.

[0039] S5: After the training is completed, select the weight file with the best training effect and save it to the YOLOv8 model to obtain the pre-trained YOLOv8 model. And evaluate the pre-trained YOLOv8 model through the validation set to determine whether the pre-trained YOLOv8 model meets the requirements.

[0040] If the requirements are met, the test set is input into the pre-trained YOLOv8 model, and the model is evaluated using the test set. After the evaluation is qualified, the trained YOLOv8 model is obtained.

[0041] Input the bolt image to be detected into the trained YOLOv8 model, and the model will automatically detect the target and determine whether the bolt is loose.

[0042] If the requirements are not met, reselect the weight file with the best training effect and re-adjust the YOLOv8 model.

[0043] The present invention solves the problem of insufficient feature extraction for complex scenes and multi-scale targets in target detection, and overcomes the limitations of traditional convolutional networks in processing target shape changes and occlusion. Figure 6 As shown in the figure, it combines deformable convolution (C2F-DCNv2) and enhanced attention module (SEAM) to accurately capture and optimize multi-scale features, further improving the accuracy of detection; by dynamically adjusting the convolution kernel position and attention weight, it effectively handles target deformation, occlusion and complex background to improve the robustness and accuracy of detection and reduce false detection and missed detection. In short, this method not only improves the detection capability of diverse targets, but also enhances the expressiveness and robustness of the network in complex scenes.

[0044] In summary, the present invention provides a bolt loosening detection method based on YOLOv8, which improves the YOLOv8 network architecture and introduces a C2F-DCNv2 module in its backbone network. The module adopts a multi-scale feature extraction strategy from coarse to fine, and can efficiently capture detail information in the image at different scales. At the same time, the module utilizes the deformable convolution technology, allowing the convolution kernel to adaptively adjust its shape and position according to the changes in the image content, so as to more accurately capture the morphology and position changes of the target object. The introduction of this deformable convolution significantly improves the network's ability to detect the position and state of bolts in complex scenes. In addition, in the detection head part of the network, the present invention further introduces an attention mechanism module (SEAM), through which the model can pay more attention to the important spatial areas in the image, significantly improving the ability to capture and express key features. Through the precise capture and analysis of spatial information, SEAM effectively improves the accuracy and reliability of bolt loosening detection. Combined with the synergistic effect of the C2F-DCNv2 module and the SEAM attention mechanism, the present invention enhances the detection effect of bolt loosening in complex backgrounds and achieves higher detection accuracy and robustness.

[0045] The C2f-DCNv2 module is used to replace the C2f module in the backbone of the existing YOLOv8 network, and a deformable convolution layer is established in the C2f-DCNv2 module. A learnable offset is introduced through the deformable convolution layer, so that the sampling position of the convolution kernel can be dynamically adjusted according to the image content. This flexibility enables the model to better adapt to geometric deformations in the image, so that features can be extracted more accurately when dealing with irregularly shaped or deformed objects. Secondly, deformable convolution performs better when dealing with multi-scale and multi-shape targets in complex scenes. The fixed sampling position of traditional convolution may not be able to effectively capture the details of these targets, while deformable convolution can more comprehensively cover the target features of different scales and shapes by adjusting the sampling points. Furthermore, when facing complex backgrounds, deformable convolution can better distinguish between targets and backgrounds because its dynamic sampling position can focus more on target features and reduce the interference of background noise. Finally, due to its flexible feature extraction capabilities, deformable convolution improves the performance of the model in various visual tasks, especially in tasks that require processing complex image content such as object detection and instance segmentation, showing higher accuracy and robustness. These advantages make deformable convolution more effective than traditional convolution in complex visual tasks.

[0046] The SEAM attention mechanism module takes advantage of the deep separable convolution and residual connection. The deep separable convolution operates on a channel basis. By processing each channel separately, it can effectively learn the importance of different channels and significantly reduce the number of network parameters. On this basis, the SEAM attention mechanism module further uses two layers of fully connected networks to fuse the combined channel information. The fully connected network can fully explore and enhance the relationship between all channels, effectively integrate the contextual information in the image, and enhance the model's understanding of global and local information by focusing on spatial relationships and the relative positions of objects, thereby improving the network's ability to model complex relationships. Through this design, the SEAM module enhances the model's ability to capture and express spatial features, effectively improving the model's performance in the task of detecting loose bolts on tower cranes.

[0047] The second object of the present invention is to propose a bolt loosening detection system based on YOLOV8 improvement, such as Figure 7 As shown, including: Data collection module 100: used to collect bolt image data of the area to be detected to obtain bolt image data; Recognition result module 200: used to input bolt image data into the pre-trained YOLOv8 model for recognition to obtain recognition results; like Figure 8 As shown, the training system of the pre-trained YOLOv8 model includes: Data processing module 210: used to collect image data of the area to be detected and perform preprocessing to obtain a bolt image data set; Training weight module 220: used to input the training set in the bolt image data set into the YOLOv8 model, and obtain pre-training weights through training optimization of the neural network in the YOLOv8 model; Training model module 230: used to train the YOLOv8 model based on the pre-trained weights to obtain a trained YOLOv8 model; Verification and recognition module 240: used to input the test set in the bolt image data set into the trained YOLOv8 model for verification and recognition, and obtain the recognition result of the bolt state.

[0048] like Fig. 9 As shown, the third object of the present invention is to provide an electronic device, the electronic device comprising: a processor 301, a memory 302 and a display screen 303. Among them, the memory 302 and the display screen 303 are connected to the processor 301, such as through a bus 304. Optionally, the electronic device may also include a transceiver 305. It should be noted that in actual applications, the transceiver 305 is not limited to one, and the structure of the electronic device does not constitute a limitation on the embodiments of the present application.

[0049] The processor 301 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. The processor 301 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0050] The bus 304 may include a path to transmit information between the above components. The bus 304 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus 304 may be divided into an address bus, a data bus, a control bus, etc.

[0051] The memory 302 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0052] The memory 302 is used to store the application code for executing the solution of the present application, and the execution is controlled by the processor 301. The processor 301 is used to execute the application code stored in the memory 302 to implement the contents shown in the above method embodiment.

[0053] Fig. 9 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0054] The fourth object of the present invention is to provide a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein the computer program is stored thereon, and when the program is executed by a processor, the aforementioned Figures 1 to 3 The various processes of the method embodiment shown in the figure include, for example, a memory including instructions, and the instructions can be executed by a processor of an electronic device to complete the method.

[0055] A computer-readable storage medium may be a tangible device that holds and stores instructions used by an instruction execution device. A computer-readable storage medium may be, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof. Specifically, a computer-readable storage medium may be a portable computer disk, a hard disk, a USB flash drive, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a lectern random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, an optical disk, a magnetic disk, a mechanical encoding device, and any combination thereof.

[0056] A fifth object of the present invention is to provide a computer program product, comprising computer instructions, which, when executed by a processor, implement the above Figures 1 to 3 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0057] Many embodiments and many applications beyond the examples provided will be apparent to those skilled in the art upon reading the above description. Therefore, the scope of the present teachings should not be determined with reference to the above description, but rather with reference to the preceding claims and the full scope of equivalents to which such claims are entitled. For the purpose of comprehensiveness, all articles and references, including disclosures of patent applications and publications, are incorporated herein by reference. The omission of any aspect of the subject matter disclosed herein in the preceding claims is not intended to be a disclaimer of such subject matter, nor should it be considered that the applicants did not consider such subject matter to be part of the disclosed inventive subject matter.

[0058] The above content is a further detailed description of the present invention. It cannot be determined that the specific implementation methods of the present invention are limited to these. For ordinary technicians in the technical field to which the present invention belongs, without departing from the concept of the present invention, they can also make several simple deductions or substitutions, which should be regarded as belonging to the protection scope of the present invention determined by the submitted claims.

Claims

1. A bolt loosening detection method based on YOLOV8 improvement, characterized in that: include: Collecting bolt image data of the area to be detected to obtain bolt image data; Input the bolt image data into the pre-trained YOLOv8 model for recognition and obtain the recognition result; The training method of the pre-trained YOLOv8 model includes: Collect image data of the area to be inspected and perform preprocessing to obtain a bolt image data set; The training set in the bolt image dataset is input into the YOLOv8 model, and the pre-training weights are obtained through training and optimization of the neural network in the YOLOv8 model; Train the YOLOv8 model based on the pre-trained weights to obtain a trained YOLOv8 model; The test set in the bolt image dataset is input into the trained YOLOv8 model for verification and recognition, and the recognition result of the bolt status is obtained.

2. According to the improved bolt loosening detection method based on YOLOV8 of claim 1, it is characterized in that: The image data of the area to be detected is collected and preprocessed to obtain a bolt image data set, including: Capture images of the bolts in the inspection area to obtain images of the bolts; Annotate the bolt images and divide the images into bolt tightening and bolt loosening states to obtain a bolt image dataset of bolt states; The bolt image dataset of bolt status is divided into training set, validation set and test set.

3. According to the improved bolt loosening detection method based on YOLOV8 of claim 1, it is characterized in that: The training set in the bolt image data set is input into the YOLOv8 model, and the pre-training weights are obtained by training and optimizing the neural network in the YOLOv8 model, including: Improve the neural network of the YOLOv8 model, including replacing the C2f convolution layer in the last output layer of the backbone network with the C2f-DCNv2 convolution layer, and introducing the SEAM attention mechanism in the detection head to obtain the improved YOLOv8 model; The training set of the bolt image dataset is input into the improved YOLOv8 model for training, and the corresponding training weights are generated after each round of training; After the training is completed, among the corresponding training weights generated after each round of training, the training weights with the best training effect are selected as pre-training weights.

4. The bolt loosening detection method based on improved YOLOV8 according to claim 3 is characterized in that: The step of inputting the training set of the bolt image data set into the improved YOLOv8 model for training includes: The training set of the bolt image dataset is input into the backbone network of the improved YOLOv8 model, and the backbone network features are extracted through C2f-DCNv2; Use modulatable deformable convolution and deformable RoI pooling to process the backbone network features and obtain feature maps; The feature map is fed into the neck network of the improved YOLOv8 model, and PANet is used to perform multi-scale feature fusion to obtain the fused feature map. The fused feature map is input into the detection head of the improved YOLOv8 model, and the SEAM attention mechanism module is introduced to generate enhanced feature maps through point-by-point convolution and depth-wise separable convolution; The enhanced feature map is input into the fully connected layer, and the loss function is calculated to obtain the loss result.

5. The bolt loosening detection method based on improved YOLOV8 according to claim 1 is characterized in that: The YOLOv8 model is trained based on the pre-trained weights to obtain a trained YOLOv8 model, including: Train the YOLOv8 model according to the pre-trained weights to obtain a pre-trained YOLOv8 model; Input the validation set of the bolt image dataset into the pre-trained YOLOv8 model for evaluation and obtain the evaluation results; If the evaluation results meet the set requirements, the trained YOLOv8 model is obtained; If the evaluation result does not meet the set requirements, the pre-training weights are obtained again.

6. The bolt loosening detection method based on improved YOLOV8 according to claim 1 is characterized in that: The test set in the bolt image data set is input into the trained YOLOv8 model for verification and recognition, and the recognition result of the bolt state is obtained, including: The test set in the bolt image dataset is input into the trained YOLOv8 model to perform bolt verification and recognition, and obtain the recognition result of the bolt status; The identification result of the bolt status includes the looseness status of the bolt and the bolt position information.

7. A bolt loosening detection system based on YOLOV8, characterized in that: include: Data acquisition module: used to acquire bolt image data of the area to be detected and obtain bolt image data; Recognition result module: used to input bolt image data into the pre-trained YOLOv8 model for recognition and obtain recognition results; The training method of the pre-trained YOLOv8 model includes: Data processing module: used to collect image data of the area to be inspected and perform preprocessing to obtain a bolt image data set; Training weight module: used to input the training set in the bolt image dataset into the YOLOv8 model, and obtain the pre-training weights through training and optimization of the neural network in the YOLOv8 model; Training model module: used to train the YOLOv8 model based on the pre-trained weights to obtain the trained YOLOv8 model; Verification and recognition module: It is used to input the test set in the bolt image dataset into the trained YOLOv8 model for verification and recognition to obtain the recognition result of the bolt status.

8. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the improved bolt loosening detection method based on YOLOV8 as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the improved bolt loosening detection method based on YOLOV8 as described in any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that It includes computer instructions, which, when executed by a processor, implement the steps of an improved bolt loosening detection method based on YOLOV8 as described in any one of claims 1 to 6.

Citation Information

Cited By

  • Disease intelligent detection method and device for steel structure bolt and medium

    CN121280353A