Rapid identification method for underwater clogging object in front of gate based on deep learning

By constructing a rapid identification model for underwater silt in front of gates based on deep learning, the problem of underwater silt identification is solved, and efficient and accurate identification of branches and stones is achieved, which is suitable for complex underwater environments.

CN120451896APending Publication Date: 2025-08-08CHANGJIANG SURVEY PLANNING DESIGN & RES CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510529183.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-25
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The prior art is difficult to effectively identify underwater silt in front of the gates of deep underwater drainage buildings in reservoir dams, especially branches and stones, resulting in damage to the opening and closing equipment and safety hazards.

Method used

Using a deep learning-based method, a rapid identification model for underwater blockage in front of the gate is constructed, and video data is obtained using an underwater robot. The C2f module is replaced with FasterNet's FasterBlock module through the YOLOv8s architecture and embedded the EMA attention mechanism. The MPDIoU loss function is used for training to achieve efficient identification of branches and stones.

Benefits of technology

It realizes rapid and accurate identification of underwater silt blockages, improves treatment efficiency and generalization, reduces missed and missed detection, and is suitable for complex underwater environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120451896A_ABST
    Figure CN120451896A_ABST
Patent Text Reader

Abstract

The invention discloses a deep learning-based method for quickly identifying underwater clogging in front of a gate, and relates to the technical field of operation detection of reservoir release structures. The method comprises the following steps: extracting an image from an underwater exploration video in front of a gate; a gate front underwater clogging object rapid identification model based on deep learning is constructed; and identifying and outputting the type and position information of the underwater clogging by using the model. According to the rapid identification model for the underwater clogging in front of the gate, on the architecture of YOLOv8s, a C2fFaster NetEMA module is used for replacing C2f modules in a backbone network and a neck network in the YOLOv8s, and MPDIOU is used for replacing CIoU to serve as bounding box loss; and the C2fFaster Net EMA module is obtained by replacing a Bottleneck module in a C2f module in the YOLOv8s with a Faster Block module of Faster Net and embedding an EMA attention mechanism into the Faster Block module of the Faster Net. The invention provides a deep learning-based rapid identification method for underwater clogging in front of a gate, solves the problem that the underwater clogging in front of the gate is difficult to effectively identify in the prior art, and can effectively identify the underwater clogging in front of the gate through a rapid identification model for the underwater clogging in front of the gate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of reservoir discharge structure operation detection technology, and specifically to a method for quickly identifying underwater blockages in front of a gate based on deep learning. Background Art

[0002] Ensuring the proper opening of gates in reservoir dam spillways, especially those located deep underwater, is crucial for dam safety. However, underwater obstructions such as branches and rocks can severely disrupt the proper operation of these gates. Flexible objects like branches can easily become entangled in the gate's opening and closing mechanisms, burdening them, increasing the force required, and potentially damaging them. Hard objects like rocks can easily become lodged between the gate and the slot, hindering its proper opening and closing. These conditions not only shorten the gate's service life but can also cause deformation and prevent it from closing properly, posing a significant safety hazard to the overall stability of the sluice system and flood control in downstream areas. Therefore, rapid identification and diagnosis of underwater obstructions such as branches and rocks in front of the gates is crucial.

[0003] Underwater detection of blockages can define the scope of cleaning and provide decision-making for the selection of appropriate cleaning measures. It is a prerequisite for underwater blockage cleaning. Currently, blockage detection technologies mainly include underwater visual inspection, underwater laser imaging, underwater high-definition camera technology, underwater sonar imaging, and underwater robot (ROV) technology. Underwater sonar imaging is divided into multi-beam bathymetry systems, side-scan sonar, and three-dimensional imaging sonar according to its function and scanning method. The three-dimensional imaging sonar system can provide a more detailed description of the outline of underwater targets and is currently a relatively advanced means of detecting underwater detailed structures. Underwater robot (ROV) technology is a comprehensive underwater detection technology that can use multiple detection methods such as optics and acoustics to verify each other. It has the advantages of flexible operation and high accuracy, and is suitable for detecting blockages in deep water and complex underwater environments.

[0004] Data collected by underwater robotic vehicles (ROVs) is mostly in the form of images or videos. Using traditional digital image processing techniques or machine learning algorithms can lead to low processing efficiency, poor generalization, and frequent misjudgments, making it difficult to effectively identify underwater obstructions. To overcome these limitations, the applicant considered introducing deep learning methods and constructed a rapid identification model for underwater obstructions in front of gates, effectively detecting underwater obstructions such as branches and rocks in front of gates. Summary of the Invention

[0005] In order to overcome the shortcomings of the above-mentioned technology, the purpose of the present invention is to provide a method for quickly identifying underwater blockages in front of the gate based on deep learning, so as to solve the problem that the existing technology is difficult to effectively identify underwater blockages in front of the gate.

[0006] To achieve the above object, the technical solution adopted by the present invention is as follows:

[0007] A method for quickly identifying underwater obstructions in front of a gate based on deep learning is special in that it includes the following steps:

[0008] a) Obtaining underwater exploration videos in front of the gate and extracting images from the underwater exploration videos in front of the gate;

[0009] b) Build a deep learning-based model for rapid identification of underwater blockages in front of the gate;

[0010] c) using the underwater blockage rapid recognition model in front of the gate to identify the underwater blockage in the image, and outputting the underwater blockage category and the location information of the underwater blockage in the image.

[0011] As a preferred solution, the underwater obstructions include branches and / or stones.

[0012] As a preferred solution, the underwater exploration video in front of the gate is a video obtained by using an underwater robot equipped with a high-definition camera to detect underwater blockages in front of the gate.

[0013] Furthermore, the original sampling data of the underwater exploration video in front of the gate is an avi format video with a sampling frame rate of 30 frames per second.

[0014] Furthermore, the image extraction method includes: extracting images by intercepting one picture every five frames of the underwater exploration video in front of the gate.

[0015] As a preferred solution, the rapid identification model of underwater blockages in front of the gate uses the C2f_FasterNet_EMA module to replace the original C2f modules in the backbone network and neck network of YOLOv8s on the YOLOv8s infrastructure, and replaces CIoU with MPDIoU as the bounding box loss function; the C2f_FasterNet_EMA module is obtained by replacing the original Bottleneck module in the C2f module in YOLOv8s with the FasterBlock module of FasterNet and embedding the EMA attention mechanism.

[0016] A method for constructing a rapid identification model for underwater obstructions in front of a gate is characterized in that it includes the following steps:

[0017] 1) Obtain a public dataset of tree branch and stone images to construct a tree branch-stone dataset; obtain images of underwater blockages in front of the gate containing tree branches and / or stones to construct an underwater blockage dataset; the underwater blockage dataset covers both tree branches and stones;

[0018] 2) annotating the underwater silt blockage image and dividing the underwater silt blockage dataset into a training set and a test set;

[0019] 3) Model Construction: Based on YOLOv8s, the FasterBlock module of FasterNet is used to replace the original Bottleneck module of the C2f module in YOLOv8s. At the same time, the EMA attention mechanism is introduced to construct the C2f_FasterNet_EMA module and replace all the original C2f modules in the backbone network and neck network of YOLOv8s. The loss function of YOLOv8 is divided into classification loss, bounding box loss and distribution focus (DFL) loss. The classification loss and distribution focus loss both use the cross entropy function, and the bounding box loss is replaced by the MPDIoU loss function instead of the CIoU loss function in YOLOv8s.

[0020] Model training: Based on the transfer learning strategy and the Mosaic data enhancement method, the model is trained with a training set and a test set to obtain a model for rapid identification of underwater blockages in front of the gate. The model for rapid identification of underwater blockages in front of the gate, after inputting an image, outputs an image containing underwater blockages, as well as information on the category and location of the underwater blockages in the image.

[0021] As a preferred embodiment, in step 1), the images of branches and stones in the branch-stone dataset include a public dataset containing branches and / or stones collected from the Internet, and the branch-stone dataset covers two categories: branches and stones; the image of underwater blockage in front of the gate is an image containing branches and / or stones obtained by extracting and screening an underwater exploration video in front of the gate obtained from the underwater blockage exploration work in front of the gate; the method for obtaining the underwater exploration video in front of the gate includes: using an underwater robot equipped with a high-definition camera to explore underwater blockages in front of the gate, the original sampling data is an avi format video, and the sampling frame rate is 30 frames per second; the method for extracting images from the video includes: extracting images by intercepting one picture every 5 frames of the video.

[0022] As a preferred solution, in step 2), the annotation includes the blockage category and blockage area. Each underwater blockage image is annotated with the blockage category and blockage area. The annotated dataset is divided into a training set and a test set. The training set is used to evaluate the model training process, and the test set is used to verify and test the model's recognition performance.

[0023] Furthermore, the labeling process is performed using the visual labeling software LabelImg to generate a txt file containing the underwater blockage category and the coordinates of the upper left and lower right corners of the labeled rectangular box; wherein, the underwater blockage category includes branches and stones, and the category information is uniformly numbered, "branches" are 0, and "stones" are 1.

[0024] Furthermore, the ratio of the training set to the test set in the underwater silt blockage dataset in front of the gate is 8:2.

[0025] As a preferred solution, in step 3), the MPDIoU loss function is calculated as follows:

[0026] L MPDIoU =1-MPDIoU

[0027]

[0028] Where: IoU is the intersection over union ratio between the predicted box and the true box; h and w are the height and width of the input image respectively; d1 and d2 are the distances between the upper left corner and lower right corner of the predicted box and the true box respectively. The calculation method is as follows:

[0029]

[0030] Where: and are the coordinates of the upper left corner and lower right corner of the real box respectively; and are the upper left and lower right corner coordinates of the prediction box respectively.

[0031] YOLOv8s's original CIoU loss function struggles with underwater obstruction detection, such as tree branches and large rocks, when dealing with objects with widely varying aspect ratios. To better address underwater obstruction detection, the MPDIoU loss function is used in the model's head network, replacing the original CIoU loss function.

[0032] As a preferred solution, in step 3), the training process of the model includes:

[0033] Use the tree branch-stone dataset for pre-training;

[0034] The model is trained using the training and test sets using the pre-trained weights of the model.

[0035] As a preferred solution, in step 3), the Mosaic data enhancement method is used to increase the diversity of data and improve the robustness of the model, including the following steps:

[0036] Four images and corresponding labels are randomly extracted from the dataset each time, and the splicing reference points are randomly selected. The four images are randomly flipped, scaled, and color gamut transformed.

[0037] Place the four images in the upper left, upper right, lower left, and lower right positions of the reference point in sequence and stitch them together into a new composite image;

[0038] Process the detection box coordinates that exceed the boundary and generate the label of the combined image.

[0039] The present invention also provides a deep learning-based rapid identification system for underwater obstructions in front of a gate, which is used to implement the above-mentioned deep learning-based rapid identification method for underwater obstructions in front of a gate. The system is special in that it includes:

[0040] An image acquisition module is used to extract images from underwater exploration videos in front of the gate;

[0041] Model building module, used to build and train the model to obtain a rapid identification model for underwater blockages in front of the gate;

[0042] An underwater blockage recognition module is used to use the trained model for rapid identification of underwater blockages in front of the gate to identify whether there are underwater blockages in the image extracted by the image acquisition module;

[0043] The image output module is used to output images containing underwater silt blockages, and output the category of the underwater silt blockages and the location information of the underwater silt blockages in the image.

[0044] The present invention also provides a computer program product, including computer instructions, the special feature of which is that the computer instructions are used to enable a computer to execute the above-mentioned deep learning-based method for quickly identifying underwater blockages in front of a gate or the above-mentioned method for constructing a model for quickly identifying underwater blockages in front of a gate.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] Due to the complex underwater environment and the diverse forms of underwater obstructions such as branches and rocks, there is currently a lack of a method that can be applied to the rapid identification of underwater obstructions in front of sluice gates. This invention provides a method for rapid identification of underwater obstructions in front of sluice gates based on deep learning, addressing the existing difficulty in effectively identifying underwater obstructions in front of sluice gates. This method, using a rapid identification model for underwater obstructions in front of sluice gates, can effectively identify underwater obstructions in front of sluice gates. The method has the advantages of being lightweight, highly efficient, and generally applicable.

[0047] Based on YOLOv8s, the present invention introduces the FasterBlock efficient feature extraction module and EMA attention mechanism of FasterNet to construct the C2f_FasterNet_EMA module and replace all C2f modules in the backbone network and the neck network. This module can efficiently capture the irregular edges of branches and the texture features of boulders. MPDIoU is used instead of CIoU as the bounding box loss to reduce the missed detection of dense small boulders and improve the bounding box positioning stability of branches under partial occlusion, thus realizing the rapid identification of underwater blockages such as branches and stones.

[0048] The modules in this paper are proposed based on the diverse morphological characteristics of underwater obstructions such as branches and stones. The C2f_FasterNet_EMA module can efficiently capture the irregular edges of branches and the texture features of stones, ensuring that the model maintains high accuracy while running more efficiently. The MPDIoU loss function is suitable for detection targets of different sizes, which can reduce the problem of missed detection in environments where underwater obstructions are concentrated and improve the confidence of the bounding box. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 This is a flow chart of a method for rapidly identifying underwater blockages in front of a gate based on deep learning in a specific embodiment of the present invention;

[0050] Figure 2 Schematic diagram of a model for quickly identifying underwater blockages in front of a sluice gate according to the present invention;

[0051] Figure 3 This is the C2f_FasterNet_EMA module diagram of the present invention;

[0052] Figure 4 This is an example diagram of the MPDIoU function of the present invention;

[0053] Figure 5 Schematic diagram of the process of constructing a rapid identification model of underwater blockages in front of a gate in the present invention;

[0054] Figure 6 This is the recognition effect of the method of the present invention in actual detection tasks. DETAILED DESCRIPTION

[0055] In order to better explain the present invention, the main contents of the present invention are further illustrated below with reference to the accompanying drawings and specific embodiments, but the contents of the present invention are not limited to the following embodiments.

[0056] Example 1

[0057] like Figure 1 As shown, the present invention provides a method for constructing a rapid identification model of underwater blockages in front of a gate, comprising the following steps:

[0058] 1) Collect public datasets containing branches and stones online to construct a branch-stone dataset for model pretraining. The branch-stone dataset covers both branches and stones. At the project site, obtain videos of underwater blockages in front of the gates. Extract and filter images containing branches and / or stones from the videos to construct the underwater blockage dataset.

[0059] The underwater blockage video is obtained by using an underwater robot equipped with a high-definition camera to detect underwater blockages in front of the gate. The original sampling data is in avi format with a sampling frame rate of 30 frames per second. The image is obtained by capturing one image every five frames, and the images are screened to construct a dataset of underwater blockages in front of the gate, covering two categories: branches and stones.

[0060] 2) Each underwater obstruction image is labeled with the obstruction category and obstruction area, and the labeled dataset is divided into a training set and a test set in an 8:2 ratio. The training set is used for model training, and the test set is used to verify and test the model's recognition performance.

[0061] The labeling process uses the visual labeling software LabelImg to label each image in the dataset and generate a txt file containing the underwater blockage category and the coordinates of the upper left and lower right corners of the labeled rectangular box. The category information is uniformly numbered, with "branch" being 0 and "stone" being 1.

[0062] 3) Based on YOLOv8s as the basic architecture, a rapid identification model for underwater blockages in front of the gate was constructed. Transfer learning strategy and Mosaic data enhancement were introduced during the training process to obtain the trained rapid identification model for underwater blockages in front of the gate.

[0063] like Figure 2 As shown in the figure, the rapid identification model of underwater blockages in front of the gate is mainly composed of three parts: the backbone network, the neck network and the head network. The backbone network includes multiple convolutional layers (Conv) and C2f_FasterNet_EMA (CFE) modules as well as a spatial pyramid pooling (SPFF) module that aggregates multi-scale features. The neck network connects features of different levels through multiple upsampling (Upsample) and concatenation fusion (Concat) operations, and enhances feature expression in combination with the CFE module. The head network contains three detection heads of different scales, which are used to process the fused features and output the category and coordinate information of the target.

[0064] The specific steps include:

[0065] 3.1) Based on YOLOv8s, the FasterBlock module of FasterNet is used to replace the original Bottleneck module of the traditional C2f module. At the same time, the EMA attention mechanism is introduced before the first FasterBlock module to build Figure 3 The C2f_FasterNet_EMA module shown in Figure 1 is used to replace all C2f modules in the backbone network and the neck network.

[0066] 3.2) The traditional YOLOv8 loss function consists of multiple components, including classification loss, bounding box loss, and distribution focus (DFL) loss. Both classification and distribution focus losses use the cross-entropy function, while the bounding box loss uses the CIoU function. However, when detecting underwater obstructions, CIoU has difficulty handling situations where underwater obstructions have large aspect ratios, such as tree branches and large rocks. Therefore, to better meet the needs of underwater obstruction detection, the MPDIoU loss function is used in the model head network instead of the CIoU function. Its calculation method is:

[0067] L MPDIoU =1-MPDIoU

[0068]

[0069] Where: IoU is the intersection over union ratio between the predicted box and the true box; h and w are the height and width of the input image respectively; d1 and d2 are the distances between the upper left corner and lower right corner of the predicted box and the true box respectively. The calculation method is as follows:

[0070]

[0071] Where: and are the coordinates of the upper left corner and lower right corner of the real box respectively; and are the upper left and lower right corner coordinates of the prediction box respectively.

[0072] The MPDIoU function example is Figure 4As shown in the figure, the underwater obstruction is a tree branch. The yellow box is the ground truth box, and the red box is the predicted box. The MPDIoU function reduces the loss by shortening the absolute distance between the two foot points. This solves the problem that the existing CIoU loss function cannot effectively optimize the predicted and ground truth boxes with the same aspect ratio but different length and width values. This method has simple calculation steps and can adapt to detection targets of different sizes. It can identify obstructions such as branches and rocks with large aspect ratio differences in complex underwater environments. In underwater environments where obstructions are concentrated, it can quickly form prediction boxes and accurately select different obstructions, improving the confidence level of the bounding boxes, ensuring precise positioning of the prediction boxes and accurate prediction results, and reducing false detections due to incorrect prediction box positioning.

[0073] 3.3) Model training was performed using a transfer learning strategy and the Mosaic data augmentation method to obtain a rapid identification model for underwater obstructions in front of sluice gates. This model takes an input image and outputs an image containing the underwater obstruction, along with the obstruction's category and location within the image.

[0074] A transfer learning strategy was used to train a model for rapid underwater blockage identification. The process involved two key steps: first, pre-training the model on a publicly available dataset containing both branches and rocks, enabling it to gain a broad understanding of general branch and rock characteristics, thereby establishing a robust foundation for subsequent learning. Second, the model's pre-trained weights were used for further training on the established underwater blockage dataset. This approach ensured that the model not only mastered general branch and rock characteristics but also adapted well to the detailed features of underwater blockages. This innovative strategy aimed to achieve high-accuracy underwater blockage detection using only a small number of labeled blockage images.

[0075] The specific process of the Mosaic data augmentation method is to first randomly extract four pictures and corresponding labels from the dataset each time, where the label of the picture refers to the annotation information, including the blockage category and the coordinates of the upper left and lower right corners of the rectangular box; then randomly select the splicing reference points, flip, scale and / or color gamut conversion operations on the four pictures respectively, and place them in the upper left, upper right, lower left and lower right positions of the reference points in turn to splice them into a new combined image. Finally, the coordinates of the detection boxes that exceed the boundary are processed to generate the label of the combined image to increase the diversity of the data and improve the robustness of the model. The label of the combined image includes the blockage category and the coordinates of the upper left and lower right corners of the target rectangular box.

[0076] Table 1: Performance indicators of different models for each category

[0077]

[0078] The recognition performance of a baseline model (YOLOv8s) and the proposed method for each category was compared in terms of accuracy, model complexity, and inference speed. The results are shown in Table 1. In terms of recognition accuracy, the proposed method improved the mean average precision (mAP50) for branches, stones, and all categories by 2.8%, 3.2%, and 1.0%, respectively, compared to the baseline model. This demonstrates good generalization and effective discrimination of underwater obstructions such as branches and stones. In terms of model size, the proposed method reduced the size by 3.2MB compared to the baseline model, making the model more portable and more suitable for deployment on underwater robotic platforms. In terms of detection speed, although the proposed method slightly slowed down the detection speed compared to the baseline model, it still achieved an FPS of 120.63 fps, exceeding the 60 fps of common cameras and meeting the real-time requirements of underwater inspections.

[0079] Example 2

[0080] like Figure 5 As shown, the present invention also provides a method for quickly identifying underwater blockages in front of a gate based on deep learning, comprising the following steps:

[0081] a) Obtaining underwater exploration videos in front of the gate and extracting images from the underwater exploration videos in front of the gate;

[0082] b) Construct a rapid identification model of underwater blockages in front of the gate according to the above method;

[0083] c) Use the underwater blockage rapid recognition model in front of the gate to identify the underwater blockage in the image, and output the underwater blockage category and the location information of the underwater blockage in the image.

[0084] Underwater obstructions include branches and rocks. The underwater exploration video in front of the gate was captured using an underwater robot equipped with a high-definition camera. The original sampling data for the underwater exploration video in front of the gate is in AVI format, with a frame rate of 30 frames per second. The image capture method includes extracting one image every five frames of the underwater exploration video in front of the gate.

[0085] The unlabeled image extracted from the underwater exploration video in front of the gate is detected by the method of this embodiment, and the category of underwater silt blockage and the location information of underwater silt blockage in the image are output. The results are as follows: Figure 6 As shown in the figure, the rapid identification model of underwater blockages in front of the gate can accurately identify the type of underwater blockages and mark them.

[0086] Example 3

[0087] The present invention also provides a deep learning-based rapid identification system for underwater blockages in front of a gate, comprising:

[0088] An image acquisition module is used to extract images from underwater exploration videos in front of the gate;

[0089] Model building module, used to build and train the model to obtain a rapid identification model for underwater blockages in front of the gate;

[0090] An underwater blockage recognition module is used to use the trained model for rapid identification of underwater blockages in front of the gate to identify whether there are underwater blockages in the image extracted by the image acquisition module;

[0091] The image output module is used to output images containing underwater silt blockages, and output the category of the underwater silt blockages and the location information of the underwater silt blockages in the image.

[0092] Example 4

[0093] The present invention also provides a computer program product, including computer instructions, which are used to enable a computer to execute the above-mentioned deep learning-based method for quickly identifying underwater blockages in front of a gate or the above-mentioned method for constructing a model for quickly identifying underwater blockages in front of a gate.

Claims

1. A method for rapidly identifying underwater obstructions in front of a gate based on deep learning, characterized by: The following steps are involved: a) Obtaining underwater exploration videos in front of the gate and extracting images from the underwater exploration videos in front of the gate; b) Build a deep learning-based model for rapid identification of underwater blockages in front of the gate; c) using the underwater blockage rapid recognition model in front of the gate to identify the underwater blockage in the image, and outputting the underwater blockage category and the location information of the underwater blockage in the image.

2. The method for quickly identifying underwater blockages in front of a gate according to claim 1 is characterized by: The underwater obstructions include branches and / or rocks.

3. The method for quickly identifying underwater blockages in front of a gate according to claim 1 is characterized by: The underwater exploration video in front of the gate is a video obtained by using an underwater robot equipped with a high-definition camera to explore underwater blockages in front of the gate.

4. The method for quickly identifying underwater blockages in front of a gate according to claim 3 is characterized by: The original sampling data of the underwater exploration video in front of the gate is an avi format video with a sampling frame rate of 30 frames per second.

5. The method for quickly identifying underwater blockages in front of a sluice gate according to claim 1 is characterized by: The image extraction method includes: extracting images by intercepting one picture every five frames of the underwater exploration video in front of the gate.

6. The method for quickly identifying underwater blockages in front of a gate according to any one of claims 1 to 5, characterized in that: The model for rapid identification of underwater obstructions in front of sluice gates is based on the YOLOv8s infrastructure. The C2f_FasterNet_EMA module is used to replace the original C2f modules in the backbone network and neck network of YOLOv8s, and MPDIoU is used to replace CIoU as the bounding box loss function. The C2f_FasterNet_EMA module is obtained by replacing the original Bottleneck module in the C2f module of YOLOv8s with the FasterBlock module of FasterNet and embedding the EMA attention mechanism.

7. A method for constructing a rapid identification model for underwater obstructions in front of a gate, characterized by: The following steps are involved: 1) Obtain a public dataset of tree branch and stone images and construct a tree branch-stone dataset; Acquire an image of underwater obstructions in front of a gate, including branches and / or stones, and construct an underwater obstruction dataset; the underwater obstruction dataset includes two categories: branches and stones; 2) annotating the underwater silt blockage image and dividing the underwater silt blockage dataset into a training set and a test set; 3) Model Construction: Based on YOLOv8s, the FasterBlock module of FasterNet is used to replace the original Bottleneck module of the C2f module in YOLOv8s. At the same time, the EMA attention mechanism is introduced to construct the C2f_FasterNet_EMA module and replace all the original C2f modules in the backbone network and neck network of YOLOv8s. The loss function of YOLOv8 is divided into classification loss, bounding box loss and distribution focus (DFL) loss. The classification loss and distribution focus loss both use the cross entropy function, while the bounding box loss is replaced by the MPDIoU loss function instead of the CIoU loss function in YOLOv8s. Model training: Based on the transfer learning strategy and the Mosaic data enhancement method, the model is trained with a training set and a test set to obtain a model for rapid identification of underwater blockages in front of the gate. The model for rapid identification of underwater blockages in front of the gate, after inputting an image, outputs an image containing underwater blockages, as well as information on the category and location of the underwater blockages in the image.

8. The method for constructing a rapid identification model for underwater obstructions in front of a sluice gate according to claim 7, characterized in that: In step 1), the images of branches and stones in the branch-stone dataset include a public dataset containing branches and / or stones collected from the Internet, and the branch-stone dataset covers two categories: branches and stones; the image of underwater blockage in front of the gate is an image containing branches and / or stones obtained by extracting and screening the underwater exploration video in front of the gate obtained from the underwater blockage exploration work in front of the gate.

9. The method for constructing a rapid identification model for underwater obstructions in front of a sluice gate according to claim 7, characterized in that: In step 2), the annotation content includes the blockage type and the blockage area.

10. The method for constructing a rapid identification model for underwater obstructions in front of a sluice gate according to claim 7, characterized in that: The labeling process is performed using the visual labeling software LabelImg to generate a txt file containing the underwater blockage category and the coordinates of the upper left and lower right corners of the labeled rectangular box; the underwater blockage categories include branches and stones, and the category information is uniformly numbered, with "branches" being 0 and "stones" being 1.

11. The method for constructing a rapid identification model for underwater obstructions in front of a sluice gate according to claim 7, characterized in that: The ratio of the training set and the test set in the underwater silt blockage dataset in front of the gate is 8:

2.

12. The method for constructing a rapid identification model for underwater silt blockages in front of a sluice gate according to claim 7, characterized in that: In step 3), the MPDIoU loss function is calculated as follows: L MPDIoU =1-MPDIoU Where: IoU is the intersection over union ratio between the predicted box and the true box; h and w are the height and width of the input image respectively; d1 and d2 are the distances between the upper left corner and lower right corner of the predicted box and the true box respectively. The calculation method is as follows: Where: and are the coordinates of the upper left corner and lower right corner of the real box respectively; and are the upper left and lower right corner coordinates of the prediction box respectively.

13. The method for constructing a rapid identification model for underwater obstructions in front of a sluice gate according to claim 7, characterized in that: In step 3), the training process of the model includes: Use the tree branch-stone dataset for pre-training; The model is trained using the training and test sets using the pre-trained weights of the model.

14. The method for constructing a rapid identification model for underwater obstructions in front of a sluice gate according to any one of claims 7 to 13, characterized in that: In step 3), the Mosaic data augmentation method is used to increase the diversity of data and improve the robustness of the model, including the following steps: Four images and corresponding labels are randomly extracted from the dataset each time, and the splicing reference points are randomly selected. The four images are randomly flipped, scaled, and color gamut transformed. Place the four images in the upper left, upper right, lower left, and lower right positions of the reference point in sequence and stitch them together into a new composite image; Process the detection box coordinates that exceed the boundary and generate the label of the combined image.

15. A deep learning-based system for rapidly identifying underwater silt in front of a gate, used to implement the deep learning-based method for rapidly identifying underwater silt in front of a gate as claimed in any one of claims 1 to 6, characterized in that: include: An image acquisition module is used to extract images from underwater exploration videos in front of the gate; Model building module, used to build and train the model to obtain a rapid identification model for underwater blockages in front of the gate; An underwater blockage recognition module is used to use the trained model for rapid identification of underwater blockages in front of the gate to identify whether there are underwater blockages in the image extracted by the image acquisition module; The image output module is used to output images containing underwater silt blockages, and output the category of the underwater silt blockages and the location information of the underwater silt blockages in the image.

16. A computer program product comprising computer instructions, characterized in that: The computer instructions are used to enable a computer to execute any one of claims 1 to 6 of the method for quickly identifying underwater blockages in front of a gate based on deep learning or any one of claims 7 to 14 of the method for constructing a model for quickly identifying underwater blockages in front of a gate.