Underwater bolt state detection method and device, electronic equipment and storage medium
By using YOLOv10 neural network model and image preprocessing technology in underwater bolt detection, the problems of image blurring and low detection efficiency in underwater environments are solved, and accurate and efficient detection of the state of underwater bolts is achieved, and for underwater engineering, it is carried out. Provides safe and stable support.
Patent Information
- Application Number
- CN202411421540.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-02-21
AI Technical Summary
When detecting the state of underwater bolts in an underwater environment, problems such as blurred image, slow detection speed, large resource consumption, and complex training affect the accuracy and efficiency of detection.
The YOLOv10 neural network model is used to build an image detection model and pre-process the underwater bolt image, including rotation, flip, scaling, color correction, image repair and enhancement, improve image quality, and combine the efficient reasoning ability of the YOLO model to achieve water Accurate detection of the health status of the lower bolt.
Accurate detection of the health status of underwater bolts is achieved, the speed and efficiency of detection is improved, resource consumption is reduced, and strong support is provided for the safety and stability of underwater projects.
Smart Images

Figure CN119494815A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of deep learning technology, and in particular to an underwater bolt status detection method, device, electronic device and storage medium. Background Art
[0002] At present, with the widespread use of bolt fasteners in underwater environments, especially in key areas such as flange connections of oil pipelines, installation of offshore wind power equipment foundations, and fixation of submarine cables, the health status of underwater bolts has received increasing attention.
[0003] In the related technology, machine vision is usually used to detect underwater bolts. However, in actual applications, it is found that the image is blurred due to the particularity of the underwater environment, and the current detection model has problems such as slow detection speed, high resource consumption, and complex training.
[0004] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the invention
[0005] The embodiments of the present application provide a method, device, electronic device and storage medium for detecting the status of underwater bolts, which can accurately detect the health status of underwater bolts and provide strong support for the safety and stability of underwater projects.
[0006] On the one hand, an embodiment of the present application provides a method for detecting the state of an underwater bolt, comprising the following steps:
[0007] Acquire underwater bolt images;
[0008] Preprocessing the underwater bolt image to obtain a target image;
[0009] Inputting the target image into an image detection model to obtain an underwater bolt status detection result output by the image detection model;
[0010] Among them, the image detection model is built based on the YOLOv10 neural network model.
[0011] Optionally, preprocessing the underwater bolt image to obtain a target image includes:
[0012] Performing image processing on the underwater bolt image to obtain a first image; the image processing includes rotation, flipping, scaling and color correction;
[0013] Performing image restoration on the first image to obtain a second image;
[0014] Perform image enhancement on the second image to obtain the target image.
[0015] Optionally, performing image restoration on the first image to obtain the second image includes:
[0016] Using a bilateral filtering algorithm, image adversarial training is performed on the first image to obtain the second image.
[0017] Optionally, performing image enhancement on the second image to obtain the target image includes:
[0018] Through the super-resolution model, a generative adversarial network is constructed;
[0019] According to the generative adversarial network, image enhancement is performed on the second image to obtain the target image.
[0020] Optionally, the image detection model is trained based on the following steps:
[0021] Acquire multiple target images, and acquire underwater bolt status detection results corresponding to the multiple target images;
[0022] Taking each of the target images as a sample, taking the underwater bolt state detection result corresponding to each of the target images as a sample label corresponding to the sample, and constructing a training data set;
[0023] The image detection model is pre-trained using the training data set.
[0024] Optionally, an attention feature fusion module is provided in the image detection model.
[0025] Optionally, the underwater bolt status detection result includes a normal underwater bolt status and an abnormal underwater bolt status;
[0026] After inputting the target image into the image detection model to obtain the underwater bolt status detection result output by the image detection model, the method further includes:
[0027] When the underwater bolt state detection result is that the underwater bolt state is normal, after a first preset time interval, returning to the step of acquiring the next underwater bolt image until the underwater bolt state detection result of the next underwater bolt image is determined;
[0028] When the underwater bolt state detection result is that the underwater bolt state is abnormal, the underwater bolt image whose underwater bolt state detection result is that the underwater bolt state is abnormal is highlighted.
[0029] On the other hand, an embodiment of the present application provides an underwater bolt status detection device, the device comprising:
[0030] An image acquisition module, used for acquiring underwater bolt images;
[0031] An image processing module, used for preprocessing the underwater bolt image to obtain a target image;
[0032] A state detection module, used for inputting the target image into an image detection model to obtain an underwater bolt state detection result output by the image detection model;
[0033] Among them, the image detection model is built based on the YOLOv10 neural network model.
[0034] On the other hand, an embodiment of the present application provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned underwater bolt status detection method when executing the computer program.
[0035] On the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned underwater bolt status detection method is implemented.
[0036] The embodiment of the present application constructs an image detection model through the YOLOv10 neural network model, improves the image quality by preprocessing the underwater bolt image, and combines the efficient reasoning ability of the YOLO model to achieve accurate detection of the health status of underwater bolts, providing strong support for the safety and stability of underwater engineering. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a schematic diagram of an implementation environment of an underwater bolt status detection method provided in an embodiment of the present application;
[0038] Figure 2 It is a flow chart of an underwater bolt status detection method provided in an embodiment of the present application;
[0039] Figure 3 It is a schematic diagram of a process of pre-training an image detection model provided in an embodiment of the present application;
[0040] Figure 4 It is a structural schematic diagram of an image detection model provided in an embodiment of the present application;
[0041] Figure 5 It is a structural schematic diagram of an underwater bolt status detection device provided in an embodiment of the present application;
[0042] Figure 6 It is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0044] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0045] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0046] 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 this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0047] At present, with the widespread use of bolt fasteners in underwater environments, especially in key areas such as flange connection of oil pipelines, installation of offshore wind power equipment foundations, and fixation of submarine cables. However, the complexity of the underwater environment poses a great challenge to the stability of bolts. Multiple factors such as seawater corrosion, ocean current impact, biological attachment, geological movement, etc. can cause bolts to loosen, rust, or even fail, thereby threatening the safety of the entire engineering structure. This problem may not only cause serious engineering accidents, but also bring huge economic losses. Therefore, the health status of underwater bolts has received more and more attention.
[0048] In related technologies, machine vision is usually used to detect underwater bolts. However, in actual applications, it is found that the image is blurred due to the particularity of the underwater environment. For example, the "sea snow" phenomenon seriously interferes with the image quality. The "sea snow" phenomenon refers to the noise caused by suspended particles in the water (such as plankton, silt, etc.) during imaging, which makes the image present a large number of noise and blurred parts, seriously affecting the accuracy and effectiveness of the detection system; and the current detection model has problems such as slow detection speed, high resource consumption, and complex training.
[0049] In view of this, an underwater bolt status detection method, device, electronic device and storage medium are provided in the embodiments of the present application. An image detection model is constructed by using the YOLOv10 neural network model, and the image quality is improved by preprocessing the underwater bolt image. Combined with the efficient reasoning ability of the YOLO model, accurate detection of the health status of underwater bolts can be achieved, providing strong support for the safety and stability of underwater projects.
[0050] The specific implementation of the embodiment of the present application is described in detail below in conjunction with the accompanying drawings. First, an underwater bolt status detection method provided in the embodiment of the present application is described in conjunction with the accompanying drawings.
[0051] Please refer to Figure 1 , Figure 1 The schematic diagram of the implementation environment of an underwater bolt status detection method provided by the embodiment of the present application is shown. In the implementation environment, the main software and hardware entities involved include a terminal processor 110 and a server 120.
[0052] Specifically, the terminal processor 110 may be installed with a relevant underwater bolt status detection control program, and the server 120 is a background server of the control program. The terminal processor 110 and the background server 120 are connected in communication. The underwater bolt status detection method provided in the embodiment of the present application may be executed on the terminal processor 110 side.
[0053] Server 120 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0054] In addition, the server 120 may also be a node server in the blockchain network.
[0055] The terminal processor 110 and the server 120 may establish a communication connection through a wireless network. The wireless network uses standard communication technology and / or protocols, and the network may be set to the Internet, or any other network, such as but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, or any combination of a wireless network, a private network, or a virtual private network. Moreover, the above-mentioned software and hardware entities may use the same communication connection mode or different communication connection modes, and this application does not impose any specific restrictions on this.
[0056] Of course, it is understandable that Figure 1 The implementation environment in the embodiment of the present application is only some optional application scenarios of the underwater bolt status detection method provided in the embodiment of the present application, and the actual application is not fixed. Figure 1 The software and hardware environment shown is not specifically limited in this application.
[0057] like Figure 2 As shown, Figure 2 It is a flow chart of an underwater bolt status detection method provided in an embodiment of the present application, which specifically includes but is not limited to steps S100 to S300.
[0058] Step S100: Acquire underwater bolt images.
[0059] In the embodiment of the present application, the underwater bolt image can be acquired by an underwater robot equipped with a high-resolution camera and a camera auxiliary device, by continuously shooting and collecting at multiple angles along the surface of the underwater structure. Among them, the camera auxiliary equipment can be a lighting device, so when the underwater robot performs shooting operations in deep water areas, the lighting device can be used to illuminate, which can better improve the image quality of the underwater bolt image acquired.
[0060] For example, in shallow water areas, underwater workers can use handheld waterproof cameras or packaged cameras to take pictures.
[0061] Of course, it can be understood that the above optional implementation methods of acquiring underwater bolt images are only used for illustrative purposes and are not meant to limit the actual implementation methods of acquiring underwater bolt images. They can be selected independently according to the actual usage scenario.
[0062] Step S200: pre-process the underwater bolt image to obtain a target image.
[0063] In an embodiment of the present application, since image quality is often impaired in an underwater environment due to the high refractive index of water, the influence of suspended matter (such as sea snow) and low light conditions, the present application improves image quality by preprocessing the underwater bolt image to obtain the target image to be detected.
[0064] Optionally, the underwater bolt image can be preprocessed by color correction, defogging, deturbidity removal, denoising, and edge enhancement. Among them, underwater images often cause color distortion due to light absorption and scattering problems, so color correction can better overcome this defect; due to the influence of suspended particles in the underwater environment, the image may appear foggy or turbid, so removing the haze effect can make the image clearer; underwater images are usually accompanied by noise, especially noise in low-light environments, and denoising can improve the detection accuracy of subsequent models; in order to more clearly identify the outline of underwater bolts, the image can be edge enhanced to make the edge of the target object more obvious.
[0065] Specifically, as an optional implementation manner, preprocessing the underwater bolt image to obtain a target image includes:
[0066] Performing image processing on the underwater bolt image to obtain a first image; the image processing includes rotation, flipping, scaling and color correction;
[0067] Performing image restoration on the first image to obtain a second image;
[0068] Perform image enhancement on the second image to obtain the target image.
[0069] In an embodiment of the present application, when preprocessing the underwater bolt image to improve the image quality and obtain the target image, the underwater bolt image can first be processed, and the preliminary image processing process can include rotation, flipping, scaling and color correction.
[0070] It can be understood that by rotating, flipping, scaling and color correcting the underwater bolt image, the amount of data can be effectively expanded, and original underwater bolt images of various sizes can be obtained as the first image.
[0071] Furthermore, the first image is restored to obtain the second image. It can be understood that the image sea snow degree can be reduced, noise can be eliminated, and details can be restored through image restoration.
[0072] Specifically, as an optional implementation manner, performing image restoration on the first image to obtain the second image includes:
[0073] Using a bilateral filtering algorithm, image adversarial training is performed on the first image to obtain the second image.
[0074] In an embodiment of the present application, a bilateral filtering algorithm can be used to perform image adversarial training on the first image to reduce the noise caused by bubbles and algae in the image and obtain a low sea snow image.
[0075] Among them, the bilateral filtering algorithm ensures that the important edges in the image are not blurred during the filtering process by considering the spatial distance and color similarity between pixels. The specific algorithm principle is as follows:
[0076]
[0077] Where I′(x) is the pixel value at position x of the first image after bilateral filtering; I(x) is the pixel value at position x of the original first image; Ω is the two-dimensional neighborhood of pixel x; x i is the pixel position of Ω in the two-dimensional neighborhood; f s (xx i ) is the spatial weight function, which is a Gaussian function in the spatial domain; f r (I(x)-I(x i )) is the intensity weight function, which is a Gaussian function on the grayscale difference.
[0078] Optionally, the spatial weight function f s (xx i ) can be expressed as follows:
[0079]
[0080] Among them, σ s To control the weight of spatial smoothing, for example, the position x and the neighboring position x i The farther the distance between them, the greater the weight σ s The smaller.
[0081] Optionally, the intensity weight function f r (I(x)-I(x i )) can be expressed as follows:
[0082]
[0083] Among them, σ r To control the weight of color similarity, for example, position x and neighboring position x i The greater the difference in grayscale values between s The smaller.
[0084] It can be understood that bilateral filtering can effectively retain the edges of the image while removing noise by combining the weights of spatial distance and color difference, thereby avoiding edge blurring. The calculation of bilateral filtering is relatively direct, requiring only two Gaussian functions for weight calculation, and is easy to understand and implement. Therefore, the present application uses a bilateral filtering algorithm to perform image restoration on the first image, which can effectively reduce the noise caused by bubbles and algae in the picture, and obtain a low sea snow image as the second image.
[0085] Furthermore, the second image is enhanced to obtain a target image. In an embodiment of the present application, a method based on a generative adversarial network (GAN) can be used to repair the degraded image of the bolt and the image blur problem generated during the processing, and key semantic information such as threads and nut edges can be improved, thereby enhancing image quality and detail recovery.
[0086] Specifically, as an optional implementation manner, performing image enhancement on the second image to obtain the target image includes:
[0087] Through the super-resolution model, a generative adversarial network is constructed;
[0088] According to the generative adversarial network, image enhancement is performed on the second image to obtain the target image.
[0089] In the embodiment of the present application, image enhancement can be achieved by adopting a generative adversarial network and a super-resolution reconstruction algorithm. The generative adversarial network can enhance key semantic information such as threads and nut edges, which is beneficial to improving the accuracy of underwater bolt status detection.
[0090] Optionally, a super-resolution model can be selected to construct a generative adversarial network. For example, the real-esrgan-x4plus super-resolution model can be selected as the model basis of the generative adversarial network.
[0091] Among them, the real-esrgan-x4plus super-resolution model can accept low-resolution images of any size as input and upgrade them to 4 times high-resolution output, while retaining image details and reducing blur and distortion. For example, for a 256x256 input image, the output will be a 1024x1024 super-resolution image. For images containing noise and compression artifacts, the real-esrgan-x4plus super-resolution model can also effectively remove them. Through fine perceptual loss and adversarial loss, the model can generate super-resolution images with high visual quality.
[0092] Therefore, by selecting a super-resolution model to construct a generative adversarial network, it is possible to reduce noise and artifact problems in the enlargement process while maintaining the natural details of the second image, thereby obtaining a target image with better image quality.
[0093] Of course, it can be understood that the above optional implementation methods of constructing a generative adversarial network are only used for illustrative purposes and are not meant to limit the actual implementation methods of constructing a generative adversarial network. They can be selected independently according to the actual usage scenario.
[0094] Step S300, inputting the target image into an image detection model to obtain an underwater bolt status detection result output by the image detection model;
[0095] Among them, the image detection model is built based on the YOLOv10 neural network model.
[0096] In an embodiment of the present application, the image detection model is constructed based on the YOLOv10 neural network model, wherein the YOLOv10 neural network model has an efficient processing speed, can achieve real-time target detection, and through improvements in accuracy and recall rate, can more accurately detect the health status of underwater bolts.
[0097] Specifically, as an optional implementation, the image detection model is trained based on the following steps:
[0098] Acquire multiple target images, and acquire underwater bolt status detection results corresponding to the multiple target images;
[0099] Taking each of the target images as a sample, taking the underwater bolt state detection result corresponding to each of the target images as a sample label corresponding to the sample, and constructing a training data set;
[0100] The image detection model is pre-trained using the training data set.
[0101] In an embodiment of the present application, target images of multiple underwater bolts and underwater bolt status detection results of multiple target images in a historical detection process can be obtained, and then any target image is used as a sample and any target image of the any target image is used as a sample The corresponding sample label is formed into a group of training samples, and a training data set is constructed by obtaining multiple training samples. The training data set is then input into an image detection model, and the model parameters in the image detection model are adjusted according to each output result of the image detection model, and finally the pre-training process of the image detection model is completed.
[0102] The pre-training process of the image detection model may be considered completed after reaching a preset number of pre-training times; or the pre-training process of the image detection model may be considered completed when the training output results of the image detection model converge.
[0103] In practical applications, after constructing the training data set, it can also be divided into training set, validation set and test set. The training set accounts for 80% of the training data set, the validation set accounts for 10% of the training data set, and the test set accounts for 10% of the training data set. The training set is used for model training, and the validation set and test set are used for model verification.
[0104] Optionally, see Figure 3 , Figure 3 It is a flow chart of pre-training of an image detection model provided in an embodiment of the present application. In the embodiment of the present application, when pre-training the image detection model, a plurality of underwater bolt images can be first acquired through an underwater robot, and the acquired underwater bolt images can be further subjected to adversarial and enhancement processing to obtain target images, and then a YOLOv10 neural network model is constructed as an image detection model, and the bolt status of each target image is annotated as a sample label to construct a training data set.
[0105] Furthermore, the training data set is input into the YOLOv10 neural network model for pre-training. During the pre-training process, the learning result of the YOLOv10 neural network model is verified, and the learning rate is gradually attenuated until an image detection model with optimal weights is obtained, thereby completing the pre-training process of the YOLOv10 neural network model.
[0106] Specifically, as an optional implementation, an attention feature fusion module is provided in the image detection model.
[0107] In the embodiments of the present application, the YOLOv10 neural network model generally performs well in target detection speed. However, since the YOLOv10 neural network model divides the image into a grid system and performs target prediction in each grid, the low-resolution grid may make it difficult to capture the features of small targets. Therefore, in order to overcome this limitation, the present application enhances the perception ability of the YOLOv10 neural network model for small targets by setting an attention feature fusion module (AFF), thereby improving the accuracy and robustness of the YOLOv10 neural network model in detecting the state of underwater bolts in a complex underwater environment.
[0108] Among them, the AFF attention mechanism refers to calculating the similarity or correlation between features X and Y, which is usually calculated using an attention function Att, which can be expressed as follows:
[0109] Score ij =Att(x i ,y j );
[0110] Among them, x iis the i-th feature in feature X; y j is the jth feature in feature Y; Score ij For x i and j The correlation score between .
[0111] Optionally, see Figure 4 , Figure 4 It is a structural diagram of an image detection model provided in an embodiment of the present application. The YOLOv10 neural network model provided in an embodiment of the present application is divided into three parts: backbone, neck, and head, which are responsible for feature extraction, feature fusion and detection.
[0112] Among them, the backbone part includes several Conv convolutional layers, a C2f module for better capturing the complex features in the image, an SCDown module for decoupling space and channels for downsampling, an SPPF module for multi-scale feature extraction of feature maps using pooling operations of different scales, and an efficient local self-attention module PSA module.
[0113] The neck part includes FPN (feature pyramid network) and PANet (path enhancement network), which are used for feature fusion of different scales to help the model better capture targets of different sizes. Specifically, it includes the C2fAFF module with an attention feature fusion module AFF, the Concat module for connecting feature information, the Upsample module for upsampling operations, the C2f module for better capturing complex features in the image, the convolutional layer Conv, the SCDown module for decoupling space and channels for downsampling, and the C2fCIB module for further enhancing the expressiveness of feature maps.
[0114] The final detection output head part includes several detection heads V10Detect, among which a one-to-one detection head and a one-to-many detection head are set, which can effectively improve the reasoning efficiency of the YOLOv10 neural network model. In addition, during the training process, the one-to-many detection head assigns multiple positive samples to each target, while the one-to-one detection head only assigns one positive sample to each target; during reasoning, the model only uses the one-to-one detection head for prediction, which can reduce the additional reasoning cost and achieve end-to-end deployment.
[0115] Therefore, the YOLOv10 neural network model provided in the embodiment of the present application, by introducing a more sophisticated feature extraction module and an optimized AFF attention mechanism, can more effectively handle the complex background and noise interference in underwater images, thereby improving the performance in detecting subtle targets such as loose bolts.
[0116] Specifically, as an optional implementation, the underwater bolt state detection result includes a normal underwater bolt state and an abnormal underwater bolt state;
[0117] After inputting the target image into the image detection model to obtain the underwater bolt status detection result output by the image detection model, the method further includes:
[0118] When the underwater bolt state detection result is that the underwater bolt state is normal, after a first preset time interval, returning to the step of acquiring the next underwater bolt image until the underwater bolt state detection result of the next underwater bolt image is determined;
[0119] When the underwater bolt state detection result is that the underwater bolt state is abnormal, the underwater bolt image whose underwater bolt state detection result is that the underwater bolt state is abnormal is highlighted.
[0120] In the embodiment of the present application, after the underwater bolt state detection result corresponding to the underwater bolt image is detected by the image detection model, further adjustment schemes can be executed according to the underwater bolt state detection result. The underwater bolt state detection result includes the underwater bolt state being normal and the underwater bolt state being abnormal.
[0121] It is understandable that when the underwater bolt status detection result is that the underwater bolt status is normal, it means that the underwater bolt corresponding to the current underwater bolt image is in good health and can be used normally. Then, after the first preset time interval, the next underwater bolt image can be re-acquired, and the underwater bolt image can be pre-processed to obtain the target image, and then input into the image detection model, so as to obtain the underwater bolt status detection result corresponding to the next underwater bolt image output by the image detection model, thereby realizing the continuous status detection operation of multiple underwater bolt images without manual intervention. Among them, the first preset time interval can be independently defined by the user according to the specific scene usage requirements, and this application does not impose specific restrictions on this.
[0122] Furthermore, when the underwater bolt status detection result is that the underwater bolt status is abnormal, it indicates that the underwater bolt corresponding to the current underwater bolt image may be loose, failed, or other abnormal conditions. The underwater bolt image whose underwater bolt status detection result is abnormal can be highlighted to facilitate subsequent reminders to relevant personnel to repair the underwater bolt, thereby effectively ensuring the safety and stability of large-scale underwater projects.
[0123] It is understandable that underwater bolt images corresponding to multiple underwater bolts in any large underwater engineering area can be selected, and the underwater bolt images can be numbered and sorted according to the position of each underwater bolt, and then the underwater bolt images can be input into the image detection model one by one to detect the underwater bolt status. If the detection result is normal, the next underwater bolt image can be obtained after a first preset time interval until the underwater bolt status detection result of the underwater bolt image is determined; if the detection result is abnormal, the underwater bolt image is highlighted, and the next underwater bolt image is continued to be obtained after the first preset time interval until all underwater bolt images in the area are traversed and detected, and all highlighted underwater bolt images are used as a set of abnormal underwater bolts, so that relevant personnel can quickly understand the specific location information of underwater bolts that may have abnormal conditions in the large underwater engineering area based on the numbering information of the relevant images, which helps to improve the efficiency of subsequent underwater bolt repair operations.
[0124] Below, in combination with a specific application implementation process, the underwater bolt status detection method provided in the present invention is described and explained in detail:
[0125] In an embodiment of the present application, a method for detecting the status of underwater bolts is provided. The method can be applied to the detection scenario of the health status of underwater bolts on the seabed. An image detection model is constructed by using a YOLOv10 neural network model. The image quality is improved by preprocessing the underwater bolt image. Combined with the efficient reasoning ability of the YOLO model, accurate detection of the health status of underwater bolts can be achieved, providing strong support for the safety and stability of underwater projects.
[0126] Specifically, before performing underwater bolt status detection, an image detection model can be constructed based on the YOLOv10 neural network model, and the image detection model can be pre-trained, that is, the target images of multiple underwater bolts and the underwater bolt status detection results of multiple target images in the historical detection process can be obtained, and then any target image is used as a sample and any target image of the target image is used as a sample label corresponding to the sample to form a group of training samples. A training data set is constructed by obtaining multiple training samples, and then the training data set is input into the image detection model for training. For example, the training cycle can be set to 80 epochs, and the first learning rate can be set. At the end of each cycle, that is, after processing 80 images, the trained image detection model is compared with the verification set, and the learning rate is adjusted based on this to avoid overfitting or underfitting of the model. The learning rate will be gradually trained and decayed to the second learning rate according to the sample processing volume of the preset sample, where the learning rate and the stochastic gradient descent (SGD) strategy are specifically as follows:
[0127]
[0128] Among them, θ t is the parameter vector of the image detection model at the tth iteration; θ t+1 is the parameter vector after the next iteration; η is the learning rate; is the gradient of the random loss function, reflecting how to adjust the parameter θ t To minimize losses.
[0129] Furthermore, the decay of the learning rate satisfies the following formula:
[0130]
[0131] Among them, η 0 is the initial learning rate; k is the decay rate; t is the number of iterations; η t is the learning rate of the image detection model at the tth iteration.
[0132] Furthermore, the above learning process is repeated until the learning rate of the image detection model decays to a preset third learning rate, which is considered to complete the pre-training process of the image detection model.
[0133] Furthermore, an underwater bolt image is obtained by an underwater robot, and the underwater bolt image is preprocessed, specifically, the underwater bolt image is rotated, flipped, scaled and color corrected to obtain a first image, and then image adversarial training is performed on the first image according to the bilateral filtering algorithm to obtain a second image, and then a generative adversarial network is constructed through the real-esrgan-x4plus super-resolution model, and the second image is enhanced to obtain the target image.
[0134] Finally, the target image is input into the trained image detection model to obtain the underwater bolt status detection result output by the image detection model. If the underwater bolt status detection result is that the underwater bolt status is normal, then after a first preset time interval, the process returns to the step of obtaining the next underwater bolt image until the underwater bolt status detection result of the next underwater bolt image is determined; if the underwater bolt status detection result is that the underwater bolt status is abnormal, the underwater bolt image is highlighted, which helps to remind relevant personnel to repair the underwater bolts and ensure the safety and stability of underwater projects.
[0135] See also Figure 5 The embodiment of the present application further provides an underwater bolt status detection device, which can implement the above-mentioned underwater bolt status detection method, and the device includes:
[0136] An image acquisition module 510 is used to acquire underwater bolt images;
[0137] An image processing module 520 is used to pre-process the underwater bolt image to obtain a target image;
[0138] A state detection module 530 is used to input the target image into an image detection model to obtain an underwater bolt state detection result output by the image detection model;
[0139] Among them, the image detection model is built based on the YOLOv10 neural network model.
[0140] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0141] Please refer to Figure 6 , Figure 6 The hardware structure of the electronic device provided in the embodiment of the present application is illustrated, and the electronic device includes:
[0142] The processor 601 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0143] The memory 602 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 602 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 602, and the processor 601 calls and executes the underwater bolt status detection method of the embodiment of this application;
[0144] Input / output interface 603, used to implement information input and output;
[0145] Communication interface 604, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0146] Bus 605 , which transmits information between various components of the device (e.g., processor 601 , memory 602 , input / output interface 603 , and communication interface 604 );
[0147] The processor 601 , the memory 602 , the input / output interface 603 and the communication interface 604 are connected to each other in communication within the device via a bus 605 .
[0148] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned underwater bolt status detection method is implemented.
[0149] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0150] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0151] The embodiments of the present application provide a method, device, electronic device and storage medium for detecting the status of underwater bolts. The method constructs an image detection model through a YOLOv10 neural network model, improves the image quality by preprocessing the underwater bolt image, and combines the efficient reasoning ability of the YOLO model to accurately detect the health status of underwater bolts, thereby providing strong support for the safety and stability of underwater engineering.
[0152] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0153] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0154] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0155] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0156] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0157] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0158] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0159] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0160] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0161] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0162] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A method for detecting underwater bolt status, characterized in that: The method comprises the following steps: Acquire underwater bolt images; Preprocessing the underwater bolt image to obtain a target image; Inputting the target image into an image detection model to obtain an underwater bolt status detection result output by the image detection model; Among them, the image detection model is built based on the YOLOv10 neural network model.
2. The underwater bolt status detection method according to claim 1, characterized in that: The preprocessing of the underwater bolt image to obtain a target image includes: Performing image processing on the underwater bolt image to obtain a first image; the image processing includes rotation, flipping, scaling and color correction; Performing image restoration on the first image to obtain a second image; Perform image enhancement on the second image to obtain the target image.
3. The underwater bolt status detection method according to claim 2, characterized in that: The performing image restoration on the first image to obtain a second image includes: Using a bilateral filtering algorithm, image adversarial training is performed on the first image to obtain the second image.
4. The underwater bolt status detection method according to claim 2, characterized in that: The performing image enhancement on the second image to obtain the target image includes: Through the super-resolution model, a generative adversarial network is constructed; According to the generative adversarial network, image enhancement is performed on the second image to obtain the target image.
5. The underwater bolt status detection method according to claim 1, characterized in that: The image detection model is trained based on the following steps: Acquire multiple target images, and acquire underwater bolt status detection results corresponding to the multiple target images; Taking each of the target images as a sample, taking the underwater bolt state detection result corresponding to each of the target images as a sample label corresponding to the sample, and constructing a training data set; The image detection model is pre-trained using the training data set.
6. The underwater bolt status detection method according to claim 1, characterized in that: An attention feature fusion module is provided in the image detection model.
7. The underwater bolt status detection method according to claim 1, characterized in that: The underwater bolt status detection result includes a normal underwater bolt status and an abnormal underwater bolt status; After inputting the target image into the image detection model to obtain the underwater bolt status detection result output by the image detection model, the method further includes: When the underwater bolt state detection result is that the underwater bolt state is normal, after a first preset time interval, returning to the step of acquiring the next underwater bolt image until the underwater bolt state detection result of the next underwater bolt image is determined; When the underwater bolt state detection result is that the underwater bolt state is abnormal, the underwater bolt image whose underwater bolt state detection result is that the underwater bolt state is abnormal is highlighted.
8. An underwater bolt status detection device, characterized in that: The device comprises: An image acquisition module, used for acquiring underwater bolt images; An image processing module, used for preprocessing the underwater bolt image to obtain a target image; A state detection module, used for inputting the target image into an image detection model to obtain an underwater bolt state detection result output by the image detection model; Among them, the image detection model is built based on the YOLOv10 neural network model.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the underwater bolt status detection method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the underwater bolt status detection method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Underwater target detection method, device and equipment based on sonar image and medium
CN119992307A