Underwater target detection method, system, equipment and medium

By introducing a lightweight feature extraction module and a multi-feature fusion strategy into the underwater target detection model, combined with the edge-aware loss function, the problem of low accuracy in underwater target detection is solved, and efficient recognition of low-contrast, small targets and targets with blurred boundaries is achieved.

CN120808131AActive Publication Date: 2025-10-17NORTHWESTERN POLYTECHNICAL UNIV

Patent Information

Application Number
CN202511299401.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-12
Publication Date
2025-10-17
Estimated Expiration
2045-09-12

AI Technical Summary

Technical Problem

Existing underwater target detection models lack feature extraction capabilities, resulting in low detection accuracy. They are difficult to deploy on UUVs with limited computing resources and have insufficient recognition capabilities for low-contrast, small targets, or targets with blurred boundaries.

Method used

The lightweight CBS module and LWC2F module are used for feature extraction, combined with the ShuffleNetV2 module for mid-level feature extraction, and the detection capability is enhanced through multi-feature fusion strategy and edge-aware CIoU loss function.

Benefits of technology

It improves the accuracy and efficiency of underwater target detection, enhances the recognition ability of low-contrast, small targets and targets with blurred boundaries, and is suitable for resource-constrained UUV platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120808131A_ABST
    Figure CN120808131A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of target detection, and discloses an underwater target detection method, system and device and a medium. The method comprises the following steps: acquiring an underwater MFLS image; the MFLS image is input into an underwater target detection model, feature extraction of different scales and different depths is carried out on the MFLS image, and shallow layer features, middle layer features and deep layer features with different scales are obtained; dividing the channels of the deep features into a plurality of groups, carrying out convolution on the features of each group of channels, carrying out rearrangement on the features of each group of channels after convolution, enabling the features of each group of channels after convolution to interact, and obtaining global features; extracting local features of different receptive fields of the deep features, fusing the local features of the different receptive fields with the global features, supplementing local details of the global features, and obtaining target deep features of the MFLS image; and performing underwater target detection on the MFLS image according to the shallow layer feature, the middle layer feature and the target deep layer feature of the MFLS image.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of target detection, and in particular relates to an underwater target detection method, system, device and medium. BACKGROUND

[0002] With the progress of marine technology and the growing demand for underwater resource utilization, unmanned underwater vehicles (UUVs) have become an indispensable platform in modern marine exploration, surveillance and combat missions. In this complex and dynamic underwater environment, the navigation and target detection capabilities of UUVs play a crucial role in ensuring mission efficiency and combat success. However, the unique challenges brought by the underwater environment, such as weak light conditions, strong scattering effects and blurred target features, make traditional optical vision-based sensors less effective for reliable detection. In contrast, multi-beam forward-looking sonar (MFLS) actively emits sound waves to construct images with depth perception, showing strong adaptability in turbid waters and providing great application potential for underwater target detection tasks.

[0003] Due to the challenges of low resolution, limited texture features and complex background noise of MFLS image data, higher requirements are placed on target detection models. The continuous progress of image processing technology has driven the development of many traditional sonar image target detection models (i.e. MFLS image target detection models). Traditional sonar image detection models mainly rely on the collection and processing of echo signals, generating underwater target images through beamforming and signal reconstruction techniques. These models usually use artificial feature extraction methods such as template matching and edge detection to identify and locate targets. This traditional target detection model has made significant progress in general visual tasks, but its detection accuracy and robustness often fail to meet actual needs when dealing with MFLS images.

[0004] With the rapid development of deep learning technology, sonar image recognition has emerged as a new opportunity. Deep learning-based recognition models have made breakthroughs in various visual tasks due to their powerful feature extraction and pattern recognition capabilities. However, existing models in underwater MFLS image detection mostly use single-scale or shallow feature fusion strategies, which have limited feature extraction capabilities, resulting in low underwater target detection accuracy. SUMMARY

[0005] The present application aims to provide an underwater target detection method, system, device and medium, which can solve the problem of low underwater target detection accuracy caused by insufficient feature extraction capability of existing models.

[0006] To solve the above technical problems, an embodiment of the present invention provides an underwater target detection method, comprising the following steps: Acquire underwater multi-beam forward-looking sonar MFLS images; The MFLS image is input into the trained underwater target detection model, and features of different scales and depths are extracted from the MFLS image to obtain shallow features, middle features, and deep features of the MFLS image with different scales. Divide the channels of deep features into several groups, perform convolution on the features of each group of channels, and rearrange the features of each group of channels after convolution so that the features of each group of channels after convolution interact to obtain global features; Extract local features of different receptive fields of deep features, fuse the local features of different receptive fields with the global features, supplement the local details of the global features, and obtain the target deep features of the MFLS image; Underwater target detection is performed on MFLS images based on shallow layer features, middle layer features and deep layer features of targets.

[0007] Optionally, the network structure of the underwater target detection model includes: a shallow feature extraction module composed of a CBS module and a LWC2F module, a middle feature extraction module composed of a CBS module and a ShuffleNetV2 module, and a deep feature extraction module composed of a CBS module and a LWC2F module; Among them, the CBS module includes a convolution layer, a batch normalization layer, and a SiLU activation function layer to extract features of the corresponding scale of the shallow feature extraction module, the middle feature extraction module, or the deep feature extraction module; The LWC2F module processes the features output by the CBS module of the shallow feature extraction module or the deep feature extraction module through a convolutional layer, and divides the processed features into two parts. One part of the features is extracted again through the reverse residual block and then fused with the other part of the features of the short connection. The fused features are integrated through a convolutional layer to obtain shallow features or deep features. The ShuffleNetV2 module is used to extract the global features of the features output by the CBS module of the middle-level feature extraction module as the middle-level features.

[0008] Optionally, the loss function of the underwater target detection model includes a first loss function and a second loss function; The first loss function is constructed based on the matching degree between the predicted box and the true box, and the second loss function is constructed based on the influence of the edge information of the MFLS image on the matching degree between the predicted box and the true box.

[0009] Optionally, the loss function of the underwater target detection model is: ; In the formula, is a first loss function, is a second loss function, is a preset weight parameter, used to control the influence of the second loss function on the loss function of the underwater target detection model; ; In the formula, is a weight of each edge pixel in the MFLS image, N is the number of edge pixels, is a weight matrix of edge pixels of the MFLS image, is a loss function; ; ; ; ; ; In the formula, is the Euclidean distance between the center points of the prediction box and the real box, c is the minimum diagonal length of the boundary box containing the prediction box and the real box, and are the prediction box and the real box respectively, is the width of the real box, is the height of the real box, is the width of the prediction box, is the height of the prediction box.

[0010] Optionally, the weight matrix of the edge pixels of the MFLS image is obtained by the following steps: de-noising the gray image of the MFLS image to obtain a smooth image; calculating the horizontal gradient and the vertical gradient of the smooth image, and obtaining the gradient amplitude and the gradient direction of each pixel in the smooth image according to the horizontal gradient and the vertical gradient; for each pixel, obtaining the gradient amplitudes of adjacent pixels along the gradient direction of the pixel, and retaining the pixel when the gradient amplitudes of the adjacent pixels are local maximum values, so as to perform edge thinning on the smooth image; dividing the remaining pixels into two categories of strong edge pixels and weak edge pixels according to the gradient amplitudes, and taking the strong edge pixels as the edge pixels and taking the pixels connected with the strong edge pixels in the weak edge pixels as the edge pixels; assigning a weight to each edge pixel according to the gradient amplitude of the edge pixel to obtain the weight matrix of the edge pixels of the MFLS image.

[0011] Optionally, the reverse residual block comprises a convolutional layer for expanding the channel dimension, a depth separable convolutional layer for extracting spatial features, and a convolutional layer for compressing the channel dimension.

[0012] Optionally, before the convolution of the features of each group of channels, the method further comprises: dimensionally reducing the deep features through a convolution operation.

[0013] Embodiments of the present application also provide an underwater target detection system, comprising: an image acquisition module configured to acquire a multi-beam forward-looking sonar (MFLS) image under water; a first feature extraction module configured to input the MFLS image into a trained underwater target detection model, and extract features of different scales and different depths from the MFLS image to obtain shallow features, middle features and deep features of different scales of the MFLS image; a second feature extraction module configured to divide the channels of the deep features into a plurality of groups, convolve the features of each group of channels, rearrange the features of each group of channels after the convolution, and interact the features of each group of channels after the convolution to obtain global features; a third feature extraction module configured to extract local features of different receptive fields of the deep features, and fuse the local features of different receptive fields with the global features to supplement local details of the global features, so as to obtain target deep features of the MFLS image; a target detection module configured to detect underwater targets in the MFLS image according to the shallow features, the middle features and the target deep features of the MFLS image.

[0014] Embodiments of the present application also provide a computer device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above-mentioned underwater target detection method.

[0015] Embodiments of the present application also provide a computer-readable storage medium storing a computer program, and the computer program is executed by a processor to implement the above-mentioned underwater target detection method.

[0016] The underwater target detection method provided by the present application has at least the following beneficial effects: By inputting the underwater sonar image (i.e., the MFLS image) into the trained underwater target detection model, the model extracts different depth features of the MFLS image: shallow features, middle features, and deep features, and the feature scales extracted by the shallow features, the middle features, and the deep features are also different; then, for the deep features, the grouping convolution and the channel reorganization operation (dividing the channels of the deep features into several groups, performing convolution on the features of each group of channels, and rearranging the features of each group of channels after convolution to make the features of each group of channels after convolution interact) are combined, the grouping convolution reduces the computational load and the memory access cost, so that the model can run efficiently in a resource-limited scenario, and the channel reorganization promotes the fusion of features between groups to make up for the information island problem that may be caused by the grouping convolution, thereby enhancing the extraction ability of long-distance dependencies and obtaining global features; in order to supplement the local details in the global features, such as the boundaries and shapes of targets, local features of different receptive fields of the deep features are also extracted.

[0017] The underwater target detection is performed based on the features obtained through the above operations, compared with the strategy of using single-scale or shallow feature fusion, not only the multi-scale features are combined, but also the local detail information and the global semantic information of the MFLS image are combined, which can improve the feature extraction ability of the MFLS image and further improve the underwater target detection accuracy. BRIEF DESCRIPTION OF DRAWINGS

[0018] The drawings described herein are used to provide further understanding of the present application, and form a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A flowchart of a method for underwater target detection provided by the present application; Figure 2 A network structure diagram of a Lightweight-YOLOv8 provided by the present application; Figure 3 A network structure diagram of a YOLOv8; Figure 4 A module structure diagram of a Lightweight-YOLOv8 provided by the present application; Figure 5 An appearance and working principle diagram of a device provided by the present application; Figure 6 An experimental environment and a simulated target used in the experiment provided by the present application; Figure 7 A detection result diagram of a Lightweight-YOLOv8 on a USI dataset provided by the present application Figure 1 ; Figure 8 A detection result diagram of a Lightweight-YOLOv8 provided by the present application on a USI data set Figure 2 ; Figure 9 A detection result diagram of a Lightweight-YOLOv8 provided by the present application on a USI data set Figure 2 . DETAILED DESCRIPTION

[0019] In order to make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be described clearly and completely below in combination with specific embodiments of the present application and corresponding drawings. Obviously, the described embodiments are only some of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0020] Current underwater target detection methods include the following: i. Scheme 1: Underwater target detection is an important aspect of monitoring aquaculture resources to protect the marine ecosystem. In most cases, weak light and scattered light conditions pose challenges to underwater target detection based on computer vision. To solve these problems, this scheme studies the color enhancement technology of underwater images, proposes an underwater image color enhancement technology to improve the visibility of small, multiple, and dense objects, and then uses YOLOv4 for underwater object detection. The main feature of the underwater image color enhancement technology is to use convolutional flow to extract multiple features, feature fusion to facilitate information flow, and to retain context information by discarding irrelevant features and increasing color through appropriate feature selection.

[0021] Defects: 1. YOLOv4 is used as the detector, the model is heavy and difficult to deploy to resource-constrained underwater platforms. 2. Lack of full use of multi-scale feature fusion limits its ability to perceive weak targets in complex backgrounds. The loss function still uses the traditional IoU series, which is difficult to accurately depict the fuzzy boundaries in sonar images.

[0022] ii. Scheme 2: Due to the complexity of the underwater environment, low resolution of sonar image data, small sample size, and other limitations, traditional image recognition algorithms are difficult to achieve accurate recognition of sonar images. This scheme is based on YOLOv7 and designs a new fast recognition model for sonar images - a dual attention mechanism YOLOv7 model. To address the problem of insufficient sonar image samples, the method of transfer learning is used. Through pre-training on a large-scale underwater target detection dataset, the model obtains initial weights, and fine-tuning is performed on a smaller general sonar target detection dataset, thereby reducing the risk of overfitting.

[0023] Defects: 1. The newly proposed model structure is too complex, resulting in excessive time and computing resource costs, and unable to efficiently process large-scale data sets. 2. The model has high requirements for data sets and poor adaptability to new targets. 3. The effect is not ideal when detecting sonar images with complex backgrounds and relatively vague content.

[0024] iii. Scheme 3: MFLS plays an important role in underwater target detection, but the research of MFLS in underwater target detection faces the following challenges: first, there is a lack of available data sets; second, sonar images are usually processed at the pixel level and converted into fan-shaped representations for human visual habits, to address these challenges, the present scheme proposes a new data set-sonar target detection data set, which is composed of more than 9000 MFLS images captured by sonar. The data set provides the original data of the sonar image and labels 10 types of target objects. In order to verify the practicability of the data set, the data set is applied to the most advanced detection model, and the corresponding precision and efficiency benchmarks are provided.

[0025] Defects: 1. There are fewer comparative models, making it difficult to prove the practicability of the data set. 2. The comparative model used is relatively complex and requires a large number of parameters, making it difficult for platforms with high real-time requirements to train and deploy models based on the constructed data set. 3. The fuzzy edges of the sonar image are not preprocessed, affecting the final detection effect of the model.

[0026] Therefore, in the existing target detection method: (1) the parameter quantity is large, the inference speed is slow, and it is difficult to deploy on a UUV with limited computing resources; (2) the recognition ability of low contrast, small targets or fuzzy boundary targets is insufficient; (3) the perception ability of the edge region is weak, especially in sonar images, the object edge is fuzzy, resulting in inaccurate target frame positioning.

[0027] In view of the problem that the model parameter quantity is large, the inference speed is slow, and it is difficult to deploy on a UUV with limited computing resources, the present application proposes a lightweight C2F module, which greatly reduces the model parameter quantity while ensuring the feature expression ability, improves the flexibility and inference speed of the model deployment; in view of the problem that the single scale or shallow feature fusion strategy cannot effectively combine local detail information and global semantic information, resulting in insufficient recognition ability of low contrast and fuzzy boundary targets, the present application proposes a multi-feature fusion strategy, which significantly improves the detection ability of small targets in sonar images, and enhances the adaptability of the model to low-quality images; in view of the problem that the CIoU loss function mainly focuses on the overlap and center distance of the target frame, but the edge region perception ability of the sonar image is weak, the present application proposes an edge perception CIoU loss function, which enhances the perception ability of the model to fuzzy edge targets and improves the positioning accuracy of the target frame.

[0028] The technical solutions provided by the embodiments of the present application are described in detail below with reference to the drawings.

[0029] One embodiment of the present application relates to an underwater target detection method, and a specific process of the underwater target detection method of the present embodiment can be as shown in the figure. Figure 1 Step 101: Obtain a multi-beam forward-looking sonar (MFLS) image under water.

[0030] Step 102: Input the MFLS image into a trained underwater target detection model, and extract features of different scales and depths from the MFLS image to obtain shallow features, middle features and deep features of different scales of the MFLS image.

[0031] Step 103: Divide the channels of the deep features into several groups, perform convolution on the features of each group of channels, rearrange the features of each group of channels after convolution, and interact the features of each group of channels after convolution to obtain global features.

[0032] Step 104: Extract local features of different receptive fields of the deep features, and fuse the local features of different receptive fields with the global features to supplement local details of the global features, so as to obtain target deep features of the MFLS image.

[0033] Step 105: Perform underwater target detection on the MFLS image according to the shallow features, the middle features and the target deep features of the MFLS image.

[0034] The implementation details of the underwater target detection system of the present embodiment are described in detail below, and the following content is only provided for the convenience of understanding, and is not necessary for implementing the present solution.

[0035] MFLS image detection of UUV has important significance in underwater detection, ocean monitoring and target recognition. However, sonar images are usually accompanied by low signal-to-noise ratio, complex background and blurred target features, which brings great challenges to target detection. In this case, the model not only needs to be sensitive to detailed information, but also needs to extract robust global features in complex background, and needs to consider the calculation efficiency and resource constraints.

[0036] ​YOLOv8 is a powerful version of the YOLO series, combining efficiency and real-time performance, and performs well in many target detection tasks. However, according to the characteristics of MFLS images, YOLOv8 still has certain limitations. First, the backbone module is insufficient in extracting detailed features from complex backgrounds and is easily disturbed by noise. Second, the C2F module used in the deep feature extraction module has high computational overhead and is not suitable for embedded platforms and resource-constrained environments. In addition, YOLOv8 does not fully integrate local and global functions and lacks the ability to model global information. Finally, its loss function cannot effectively combine environmental perception information when regressing the bounding box, affecting the fitting accuracy.

[0037] To address the above limitations, the present embodiment proposes Lightweight-YOLOv8 (i.e., the network structure of the underwater target detection model of the embodiment), aiming to improve the performance of YOLOv8 in MFLS image detection. The structure of Lightweight-YOLOv8 of the present embodiment is shown in Figure 2 As shown in the figure, Lightweight-YOLOv8 is composed of three main parts: Backbone, Neck, and Head.

[0038] First part, Backbone: The Backbone of Lightweight-YOLOv8 adopts a hierarchical design, focusing on solving the efficiency and accuracy of feature extraction. In the shallow feature extraction part, the original Convolution-Batch Normalization-Sigmoid linear unit (CBS) module of YOLOv8 (the structure of YOLOv8 is shown in Figure 3 The size of the input image is (640, 640, 3). After processing by two CBS modules, the size of the feature map becomes (320, 320, 64) and (160, 160, 128), respectively. Then, to further reduce the complexity and computational cost of the model while maintaining high detection accuracy, the present embodiment enhances the C2F module in the original YOLOv8 and proposes a lightweight C2F (LWC2F) module. The original C2F module achieves efficient feature extraction through cross-level part connection and feature fusion, but its use of the Bottleneck structure has high computational cost and parameter quantity. The present embodiment adopts lightweight design, replacing the Bottleneck in the C2F module with a reverse residual block to obtain the LWC2F module, which greatly reduces the computational cost while preserving key feature information. The use of these shallow features contains rich edge and texture information, providing a foundation for subsequent feature fusion.

[0039] In YOLOv8, the CBS module is the cornerstone of the entire network. The lightweight design of the CBS module balances detection performance and inference speed, making YOLOv8 widely applicable to tasks with high real-time requirements. The CBS module consists of three core components: convolution, batch normalization, and SiLU activation function. The convolution layer is used to extract local spatial features from the input feature map, and the receptive field is controlled by convolution kernels of different sizes. The batch normalization layer normalizes the feature map output by the convolution to reduce the impact of bias and scaling. In YOLOv8, the introduction of batch normalization is mainly to stabilize network training, avoid gradient explosion or gradient disappearance, and speed up convergence. The SiLU activation function introduces nonlinearity, preserving negative gradient information less than zero, thereby improving the model's expression ability and gradient flow. The SiLU activation function is defined as: .

[0040] The design of the LWC2F module retains the multi-level characteristics of the original C2F module, but makes key adjustments in structure. Specifically, the LWC2F module first processes the input features through a standard convolution layer, then divides the features into two parts. One part extracts deep features through a lightweight reverse residual block, and the other part maintains the integrity of shallow features through a short connection. After processing, the two parts of features are fused through Concat. Finally, a 1x1 convolution is used to further integrate information between channels to generate the final output features. The reverse residual block is the core module of MobileNetV2. Its design philosophy is to extract features by expanding dimensions, and then recover the original dimensions through layer-by-layer compression. The module includes a 1x1 convolution for expanding the channel dimension, a depth separable convolution for extracting spatial features, and a 1x1 convolution for compressing channels. This design greatly reduces the parameter and computational cost, making the module very suitable for real-time detection. The structure of the reverse residual block and LWC2F is shown in (a) of Figure 4 and (b) of Figure 4 .

[0041] In the middle layer feature extraction part, Lightweight-YOLOv8 replaces the original YOLOv8 C2F module with a ShuffleNetV2 module. ShuffleNetV2 not only effectively reduces the computational cost, but also maintains strong feature extraction ability. In the (80, 80, 256) and (40, 40, 512) size middle feature extraction, ShuffleNetV2 significantly improves computational efficiency through lightweight design, making it very suitable for resource-constrained scenarios. The structure of the ShuffleNetV2 module is shown in (c) of Figure 4 , and ShuffleNetV2 is designed through group convolution and channel shuffling to fully extract global features while maintaining computational efficiency.

[0042] In the deep feature extraction part, the embodiment proposes a multiple feature fusion (MFF) strategy combining local features and global features. First, the SPPF module is used to extract deep local features, and the feature map size is (20, 20, 512). Then, the feature map is reduced to (20, 20, 256) through 1x1 convolution, and the ShuffleNetV2 is used to extract global features. The local features and global features are fused into a feature map with a size of (20, 20, 256) through Concat operation. Finally, the dimension is restored through 1x1 convolution to form the final feature output.

[0043] In combination Figure 3 , Figure 4 and the above description, it can be seen that the Backbone of the embodiment includes: a shallow feature extraction module composed of a CBS module and a LWC2F module, a middle feature extraction module composed of a CBS module and a ShuffleNetV2 module, and a deep feature extraction module composed of a CBS module and a LWC2F module; the CBS module can extract features of corresponding scales of the shallow feature extraction module, the middle feature extraction module or the deep feature extraction module; the LWC2F module obtains shallow features or deep features by processing the features output by the CBS module of the shallow feature extraction module or the deep feature extraction module; the ShuffleNetV2 module extracts global features of the features output by the CBS module of the middle feature extraction module as middle features.

[0044] As for the deep features, after being processed by the corresponding CBS module and LWC2F module, the MFF strategy is used to further enhance the feature representation capability. In the MFLS image detection task of the UUV, features of different scales are important for target recognition. Shallow features contain rich boundary information and are helpful for small target detection. Deep features contain higher-level semantic information and are suitable for detecting large targets. Due to the characteristics of low resolution and noise interference of sonar images, it is difficult to fully represent target information with a single feature expression. Therefore, the present application proposes an MFF strategy that combines global feature extraction and local feature enhancement to improve the detection performance of the model in complex underwater environments. The core concept of the MFF strategy is to obtain a more comprehensive representation of target features by fusing information from different scales and receptive fields. This strategy introduces global feature extraction and local feature enhancement into deep feature processing and enhances the detection effect through an efficient fusion method.

[0045] The MFF strategy can be described as: The first part is input and dimension reduction: Deep feature maps carry a large amount of semantic information, but direct processing will bring high computational cost. To this end, first reduce the channel number from 512 to 256 through 1x1 convolution to obtain reduced features . This operation not only retains the main semantic information, but also significantly reduces the cost, as follows: ; , that is, the deep features (before the MFF strategy is executed).

[0046] The second part is global feature extraction: In the MFLS image, the target may be blocked by complex background noise or underwater targets, but the global context information is particularly important for accurate target recognition. This embodiment uses a lightweight ShuffleNetV2 module to extract the reduced global features and generate a global feature map . ShuffleNetV2 is designed through grouped convolution and channel shuffling to fully extract long-range dependencies while maintaining computational efficiency.

[0047] .

[0048] The third part is local feature enhancement: In order to supplement the local details in the global features, especially to improve the description ability of the target boundary and shape, this embodiment uses a Spatial Pyramid Pooling Fast (SPPF) module to process the deep feature map. SPPF captures local features of different receptive fields through multi-scale max pooling operations and generates local enhanced features . The structure of the SPPF module is shown in Figure 2 (d), and the operation is as follows: .

[0049] The fourth part is feature fusion: The global features and local features are spliced according to the channel dimension to generate fusion features . Then use 1x1 convolution to restore the fused features to the original channel number to produce the final deep feature output , which is used for subsequent target classification and regression, as follows: ; ; Through dimension reduction and lightweight module design, the MFF strategy effectively reduces the computational complexity of deep feature processing, enabling Light-weight-YOLOv8 to run efficiently on embedded devices and real-time detection tasks.​

[0050] The second part Neck: The Neck module further interacts and fuses multi-scale features to enhance detection performance for objects of varying sizes. Lightweight-YOLOv8's Neck utilizes a lightweight design. During the feature transfer phase, the Neck plays a crucial role in connecting the Backbone and Head. Its core function is to fuse multi-scale feature maps to enhance the model's detection capabilities for objects of varying scales.

[0051] Specifically, Neck's input consists of feature maps from Backbone at three different resolution levels: shallow, mid, and deep. To balance high-level semantic information with low-level edge details, Neck employs both bottom-up and top-down bidirectional feature fusion paths. In terms of structural design, each feature fusion unit in Neck uses a LWC2F module, replacing the original C2F structure in YOLOv8. This replacement not only significantly reduces computational cost but also ensures full feature representation. For low-resolution feature maps, nearest neighbor interpolation is used for upsampling to restore spatial information. For high-resolution feature maps, downsampling is achieved through 3×3 convolutions with a stride of 2 during the downward pass to align scales. Subsequently, channel-wise feature concatenation is performed and input to the LWC2F module for fusion and enhancement. This structural design effectively improves the perception of small objects and blurred boundaries while maintaining a balance between compactness and computational efficiency.

[0052] Part 3 Head: The Head module is responsible for the final object detection task, including category prediction and bounding box regression. Lightweight-YOLOv8 inherits the detector design of YOLOv8 and efficiently connects it with the improved Backbone and Neck modules. It outputs the object category distribution and bounding box information through the classification head and regression head, respectively.

[0053] In addition, the loss function of the underwater target detection model of this embodiment includes a first loss function and a second loss function; wherein, the first loss function is constructed according to the degree of matching between the predicted box and the real box, and the second loss function is constructed according to the degree of influence of the edge information of the MFLS image on the degree of matching between the predicted box and the real box.

[0054] In the MFLS image detection task, sonar images often exhibit target boundary blur, complex background, and diverse target shapes. Traditional regression loss functions have some shortcomings when dealing with this specific task: (1) The IoU loss function only focuses on the geometric overlap between the predicted box and the true box, ignoring the edge information of the target. In sonar images, the boundary between the target and the background is usually blurred, and ignoring the edge will lead to inaccurate description of the true target in the regression process. (2) In complex sonar scenes, there may be background noise, obstacles, and similar non-target regions around the target. The regression quality of the predicted box will be significantly affected by these environmental factors, and the CIoU loss function fails to consider these effects. To address these shortcomings, the present invention proposes an EACIoU loss function that improves the detection performance of the model in complex underwater sonar environments by introducing an edge-aware term. The implementation process of the EACIoU loss function is as follows: IoU is a widely used loss function in target detection tasks, defined as the ratio of the intersection area between the predicted box and the true box to their joint area: ; Based on this, the CIoU loss function (i.e., the first loss function) is defined as: ; ; ; ; where, is the Euclidean distance between the center points of the predicted box and the true box, c is the minimum diagonal length of the bounding box containing the predicted box and the true box, and are the predicted box and the true box, is the width of the true box, is the height of the true box, is the width of the predicted box, is the height of the predicted box, v is the consistency measure of the aspect ratio, is the weight coefficient.

[0055] To improve the sensitivity of the loss to the target boundary, the present embodiment introduces an edge-aware term (i.e., the second loss function) into the loss function. Edge information is particularly important for target detection, especially in cases where the target boundary is blurred and the background noise is complex in sonar images. The present invention uses the classic Canny edge detection algorithm to extract edge features from the predicted box and the true box. For each frame of the sonar image, the detection algorithm extracts edge features through the following steps: (1) Gaussian smoothing: After inputting a grayscale image, a Gaussian filter is used to eliminate noise and obtain a smoothed image. Since raw sonar images often contain noise, direct edge detection can easily misidentify noise points as edges. Therefore, a Gaussian filter is used to blur the image, which can effectively smooth out noise interference while preserving the main image structure, thus providing a more stable input for subsequent gradient calculations.

[0056] Among them, the Gaussian filter equation is: ; Where, x , y is the horizontal and vertical coordinate offset value of the current pixel relative to the center of the Gaussian kernel, is the standard deviation, which controls the width of the distribution.

[0057] (2) Gradient calculation: The Sobel operator is used to calculate the horizontal and vertical gradients of the image ( and ), this step aims to identify areas of the image with the most dramatic grayscale changes—those known as edge candidates. The Sobel operator is used to calculate the horizontal and vertical gradients of the image, and then the gradient magnitude (i.e., edge strength) and gradient direction (i.e., edge orientation) of each pixel are calculated.

[0058] The calculation formula of the gradient G is: ; ; 3) Non-maximum suppression: This method suppresses the magnitude of the gradient along the direction of the gradient, retaining only local maxima to ensure edge refinement. This "thinning" of the edge preserves only the true edge centerline. Specifically, for each pixel, the gradient magnitude of neighboring pixels along its gradient direction is checked. Only if the current pixel is a local maximum is the pixel retained; otherwise, it is suppressed to 0. This strategy effectively removes redundant and blurred edge information, resulting in clearer and more precise edges.

[0059] (4) Dual-threshold detection: Set a high threshold and a low threshold to distinguish strong edges from weak edges. In this step, a high threshold and a low threshold are set to classify pixels into three categories based on their gradient magnitude: strong edges (above the high threshold), weak edges (between the high and low thresholds), and non-edges (below the low threshold). This allows for a preliminary screening of obvious edge regions while retaining a portion of "candidate pixels" that may be true edges but whose gradients are not strong enough.

[0060] (5) Edge connection: strong edges are directly left as edges. Weak edges are only retained as edges when connected with strong edges, otherwise they are deleted. This step is used to finally confirm whether the weak edge pixels should be retained. The specific strategy is: if a weak edge pixel is directly connected with a strong edge pixel, it is retained as a real edge; otherwise, it is deleted. This "strong leading weak" way can effectively exclude isolated pixels caused by noise while maintaining edge continuity, improving the reliability and integrity of the edge map.

[0061] (6) Feature output: Assign weights to edge pixels according to the edge detection result. After obtaining the edge weight matrix, the calculation formula of the edge-aware term is: ; In the formula, is the weight of each edge pixel in the MFLS image, N is the number of edge pixels, is the edge weight matrix of the MFLS image.

[0062] The edge weight matrix helps guide the model to pay more attention to the target boundary, thereby enhancing its detection ability for targets with fuzzy edges. In the target boundary area, a lower IoU leads to a higher weight, which guides the model to pay more attention to the target edge. Weighted summation can comprehensively evaluate the model's attention to all target edges, not just one target.

[0063] After incorporating the edge-aware term into the original CIoU loss function, the calculation formula of the EACIoU loss function (i.e. the loss function of the underwater target detection model) is as follows: ; In the formula, is a weight parameter used to control the influence of the second loss function on the loss function of the underwater target detection model.

[0064] The following is a specific experimental simulation embodiment to illustrate the technical effects of the underwater target detection method of the present application: (1) Experimental data set: i. Recording equipment: MFLS is an advanced underwater exploration device that uses multi-beam technology to produce high-resolution images with a wide viewing angle after a single sound wave is emitted. This type of device is widely used in underwater navigation, terrain measurement, and target detection. Unlike traditional mechanical sonar, multi-beam sonar has no moving parts and can generate sonar images in real time, avoiding image distortion caused by mechanical scanning. Its unique forward-looking function allows operators to intuitively understand the environment in front of the water surface and provides critical collision avoidance and navigation support, which is particularly important in complex or unknown waters.

[0065] As a typical representative of MFLS technology, M750d is a high-performance device designed specifically for underwater detection and fine imaging. It adopts a dual-frequency working mode, balancing large-scale search and high-resolution imaging. M750d not only has strong imaging capability, but also stands out with flexible operation and solid design. The device supports a maximum working depth of 500 meters, and weighs only 360 grams in water. The built-in water pressure and water temperature sensors can adjust the sound speed in real time, ensuring the accuracy of the data. Users can achieve real-time image display, data recording and playback, and adjust multiple parameters such as gain, frequency, palette, etc. through ViewPoint software to optimize the imaging effect. Therefore, M750d MFLS is used for image data acquisition experiments of underwater sonar image (USI) dataset. The main parameters of M750d are shown in Table 1, and its appearance and working principle are shown in Figure 5

[0066] Table 1 Main parameters of M750d

[0067] ii. Acquisition device: Due to the complexity and diversity of the marine environment, it is crucial to collect high-quality and representative data for model training and verification. Therefore, in order to meet the needs of various tasks of UUV, including target detection, scene classification and target positioning, this embodiment constructs a MFLS dataset: USI dataset, which contains a variety of simulated targets and a variety of environments. All data in this dataset are collected in a science and technology experimental field in Hebei Province. The experimental environment and simulated targets used in the experiment are shown in Figure 6

[0068] During the experiment, initially, M750d was fixed on a hard support on the shore of the experimental field and immersed in water. After M750d was powered on, it could work normally at a working frequency of 1.2 MHz, and then the ball and autonomous underwater vehicle (AUV) model were fixed on the floating platform through the Kevlar rope, the target water depth was controlled, and the target was clearly visible in the control software. Finally, by adjusting the detection range of the sonar and manipulating the floating platform to reposition the target, sonar images of the target at different distances and orientations were collected. After each acquisition, the recorded data, including sonar echo images of different targets, will be exported, analyzed and processed. The working frequency of M750d was adjusted to 750 kHz, and the same method was used to experiment on all models.

[0069] iii. Data collection and preprocessing: ​​This example uses Oculus M750d MFLS device for data collection. This device is designed for underwater tasks, with real-time imaging, high resolution, and multi-beam features, generating high-quality underwater sonar images, providing strong data support for underwater target detection. M750d supports dual-frequency devices, i.e. low-frequency mode 750kHz, high-frequency mode 1.2MHz. When the device is working, it emits sound waves into the water and receives the echoes reflected by underwater targets. Then the target distance is calculated according to the propagation time of the sound wave, and the echo intensity is mapped into the sonar image. This process is completed by the beamforming algorithm of the device, which produces 512 independent beams, and can generate high-quality images at a speed of up to 40 frames per second. The sonar device can automatically compensate for the change of sound velocity caused by the change of water salinity, temperature and depth during transmission and reception. The integrated sensor monitors these parameters in real time to ensure the accuracy of distance measurement and image.

[0070] During data collection, the sonar is configured using the ViewPoint software that comes with the device. This software supports real-time viewing and storage of data, and can adjust key parameters (such as gain, range and frequency) to adapt to different environmental conditions. The collected data is stored as Oculus format files, which contain timestamp information.

[0071] In order to make the collected sonar data effectively used for model training, the original sonar data is preprocessed in this invention. First, the Oculus file collected is converted into BIN file, and further converted into JPG file, then the image file is labeled in JPG format and the label file is exported in XML format. During the labeling process, images with poor imaging effect and unidentifiable targets are deleted. Finally, 4313 images are obtained, including 1456 images of torpedo model, 1686 images of ball, and 1171 images of AUV model. The final data set is named as USI data set. In addition, during model training, the data set is first divided into training set and test set in the ratio of 9:1. Subsequently, the training set is further divided into training set and validation set in the ratio of 9:1.

[0072] (2) Parameter setting: During model training, parameter setting directly affects the convergence speed and final performance. In order to maximize the ability of the model to achieve the best results, the key parameters are fine-tuned according to the data characteristics and task requirements in this invention. Since the input size of YOLOv8 is 640x640, in order to let the input image participate in training normally, the image size is automatically adjusted before training of Lightweight-YOLOv8. In order to improve the generalization ability of the model and prevent overfitting, mosaic and mixup methods are used to enhance the input image. The main parameter settings of Lightweight-YOLOv8 are shown in Table 2: Table 2 Main parameter settings of Lightweight-YOLOv8

[0073] To verify the excellent performance of Lightweight-YOLOv8 in sonar image detection, the present application uses some mainstream detection models as comparison models, including Faster RCNN, Center Net, YOLOv4, YOLOv5, YOLOv7, YOLOv7 tiny and YOLOv8. The backbone networks and parameter settings of these mainstream detection models are shown in Table 3: Table 3 Backbone networks and parameter settings of mainstream detection models

[0074] (3) Evaluation index: In the MFLS image detection task, in order to comprehensively evaluate the performance of Lightweight-YOLOv8, this experiment adopts a set of commonly used evaluation indexes. These indexes cover the evaluation of detection accuracy, target capture ability, model complexity and computational efficiency, which can analyze the model from different dimensions. These evaluation indexes include Precision, Recall, F1, mAP@0.5, Params and GFLOPS, and their calculation methods are as follows: i. Precision: Precision represents the ratio of correctly predicted positive samples to total predicted positive samples, indicating the accuracy of the model in identifying positive targets.

[0075] ; In the formula, TP and FP are the number of positive targets of correctly and incorrectly detected positive samples, respectively.

[0076] ii. Recall: Recall represents the proportion of actual positive samples correctly predicted as positive, highlighting the model's ability to capture positive samples.

[0077] ; In the formula, FN is the number of targets that are actually positive samples but not detected.

[0078] iii. F1: F1 is the harmonic mean of Precision and Recall, serving as a comprehensive index that balances the Precision and Recall of the model.

[0079] .

[0080] iv. mAP@0.5: mAP@0.5 is a key indicator for object detection, used to evaluate the overall performance of the model under different detection thresholds. It calculates the average Precision of all classes, i.e. the area under the Precision-Recall curve when the IoU threshold is set to 0.5.

[0081] ; where, is the Precision-Recall curve, and n is the number of classes.

[0082] v. Params and GFLOPS: Params represents the total number of trainable parameters in the model, serving as an indicator of its complexity. GFLOPS measures the computational workload of the model, representing the number of floating-point operations performed per second during training. The smaller the GFLOPS, the more suitable the model is for hardware environments with limited resources.

[0083] (4) Comparative experiment: i. Based on different data sets: In order to fully verify the detection performance of Lightweight-YOLOv8 model in different scenarios, the present invention selects several representative data sets as experimental benchmarks. These data sets cover various application scenarios, including underwater target detection, ship target detection, and MFLS image detection tasks. Through experiments on different data sets, the performance of Lightweight-YOLOv8 in handling diversified image features and detecting target complexity can be evaluated, and its robustness and applicability in real environments can be verified. The data sets selected in this experiment are URPC2021, Seaships, TRASH-ICRA19, SCTD, and UATD, which are described in detail as follows. The detection results of Lightweight-YOLOv8 based on different data sets are shown in Table 4. The detection results and loss curves of Lightweight-YOLOv8 on USI data set are shown in Figures 7 to 9 .

[0084] 1. URPC2021 data set: URPC2021 is a data set specially designed for underwater target detection and segmentation, widely used in underwater robot research. The data set is composed of images collected from real underwater scenes, containing various complex underwater environments such as different lighting conditions, turbidity, and occlusion, fully reflecting the actual challenges of underwater tasks. It mainly includes four types of targets: sea cucumbers, spiny lobsters, scallops, and starfish, and provides annotation information for each target.

[0085] 2. Seaships Dataset: Seaships is a large-scale, accurately annotated ship detection dataset designed to support object detection research in computer vision. The dataset contains 31,455 images covering six types of target ships. Furthermore, the dataset features diverse characteristics, including varying weather conditions, lighting, backgrounds, object sizes, and numbers, and exhibits high scene complexity. It is suitable for tasks such as ship detection and image segmentation, helping researchers address the challenges of ship detection in real-world scenarios.

[0086] 3. TRASH-ICRA19 dataset: TRASH-ICRA19 contains 1,144 images and their corresponding labels, making it ideal for maritime object detection tasks. The dataset includes three categories: plastic, bio, and rov, annotated in the PASCAL VOC dataset format, making it easy to directly train and evaluate object detection models. Furthermore, the relatively balanced data across categories prevents training issues caused by data imbalance and enhances model generalization.

[0087] 4. SCTD dataset: SCTD is a multi-class public dataset designed for object detection in sonar images. It contains 497 high-resolution sonar images from three imaging modes: side-scan sonar, forward-looking sonar, and interferometric synthetic aperture sonar. The dataset contains 596 objects, classified into three categories: shipwrecks (461 objects), aircraft (90 objects), and humans (45 objects). SCTD data has been manually annotated by several groups to reduce human error. The dataset is available in both Pascal VOC and MS COCO formats for further study.

[0088] 5. UATD dataset: UATD is a high-quality dataset specifically designed for MFLS image detection. It covers ten target categories, including cubes, spheres, cylinders, cages, and Bluerov objects, with a total of 9,200 annotated images. The dataset was collected using MFLS equipment and covers a variety of complex underwater scenarios, including lakes and shallow waters, taking into account the noise interference and environmental diversity encountered in real-world applications. UATD provides raw sonar echo intensity data, preserving its integrity and authenticity, making it suitable for model performance evaluation and underwater target detection research.

[0089] Table 4 Lightweight-YOLOv8 detection results based on different datasets

[0090] As shown in Table 4, the performance of Lightweight-YOLOv8 on multiple datasets verifies the effectiveness of its innovative modules. By introducing a lightweight network, the model achieves efficient multi-scale feature extraction in complex scenarios, thereby greatly improving detection accuracy while maintaining low computational cost. The application of MFF strategy effectively enhances the model's ability to identify weak targets, with accuracy reaching 97.47% and 98.45% on UATD and USI datasets, respectively. The EACIoU loss function further optimizes the accuracy of target positioning, with the model's mAP@0.5 exceeding 95% on multiple datasets, reaching 99.57% and 98.70% on Seaships and USI datasets, respectively. In addition, the development of the USI dataset provides a more realistic test benchmark for underwater weak target detection, verifying the model's robustness in high noise and complex backgrounds.

[0091] Figure 7 The AP of the torpedo model is 98.04%, the AP of the ball is 98.84%, and the AP of the AUV model is as high as 99.23%, showing extremely high detection accuracy. From the shape of the curve, the Precision and Recall of the three targets are balanced at a high level in most cases. Especially in the high Recall area, the Precision decreases very little, indicating that the model has strong anti-noise ability while maintaining high Recall.

[0092] Figure 8 The F1 of the torpedo model and the AUV model is 0.96, while the F1 of the ball is the highest, reaching 0.98. From the shape of the curve, the F1 of the three target classes is close to the maximum at low confidence thresholds, indicating that the model can well balance Precision and Recall at low thresholds. As the confidence threshold increases, F1 gradually decreases and rapidly approaches zero at higher thresholds. In summary, when the threshold reaches around 0.5, these curves almost reach the highest point and are relatively flat. Therefore, the invention selects 0.5 as the threshold is reliable.

[0093] Figure 9 (a) in (b) shows the label distribution of the three classes in the test set. The number of balls is the most, followed by the AUV model and the torpedo model. Figure 9 (b) in (b) shows the logarithmic average miss rate of the three target classes, which indicates the strong detection performance of the model on sonar images. Figure 9 (c) in (c) shows that after 50 training iterations, the loss curves of the training set and the test set are stable, proving the fast convergence and strong generalization ability of the model. In summary, Lightweight-YOLOv8 has high universality and reliability in the UUVMFLS image detection task.

[0094] ii. Mainstream detection model: To evaluate the performance of Lightweight-YOLOv8, this experiment compares it with several mainstream detection models, including Faster R-CNN, CenterNet, YOLOv4, YOLOv5, YOLOv7, YOLOv7-Tiny, and YOLOv8. Faster R-CNN is a classic two-stage object detection model that first generates candidate regions using a region proposal network and then performs fine-grained classification and regression adjustment on each candidate region. In contrast, CenterNet is a single-stage detection model that identifies the center point of the target as a key feature and uses it to generate the target's bounding box. Compared with two-stage models, it has higher detection speed and better detection accuracy. YOLOv4 optimizes the network structure, introduces data augmentation strategies, and improves the loss function, achieving a good balance between detection speed and accuracy. YOLOv5, as the successor of YOLOv4, further improves the detection performance while maintaining lightness and has higher computational efficiency. YOLOv7 is one of the latest products in the YOLO series. By introducing various optimization modules, it has refreshed the performance indicators of the YOLO series in terms of accuracy and speed. YOLOv7 tiny is a lightweight version of YOLOv7 designed for resource-limited devices, which can significantly reduce model parameters and computational complexity while ensuring certain detection accuracy. The detection results of different models are shown in Table 5. Table 5 Detection results of different models

[0095] From Table 5, it can be seen that compared with mainstream object detection models, Lightweight-YOLOv8 proposed in this invention has significantly improved in various indicators, with a Precision as high as 98.45%. This is mainly due to the lightweight network structure that reduces the parameter and computational complexity, and the MFF strategy that enhances the combination of local and global information, improving the weak target detection capability. In addition, the EACIoU loss function optimizes the target boundary position and ensures more accurate target frame regression. Overall, Lightweight-YOLOv8 achieves more accurate and robust target detection while maintaining efficient computation, verifying its effectiveness and application potential in sonar image detection tasks.

[0096] iii. Ablation experiment: To comprehensively evaluate the contribution of each improved module of Lightweight-YOLOv8 to the final detection performance, the experiment designed a detailed ablation experiment, which mainly focused on lightweight network, MFF strategy, EACIoU loss function, and constructed baseline models and several variant models with different module combinations. On the basis of the baseline, the independent influence and synergistic effect of each module on the model performance were analyzed by introducing specific modules respectively. The detection results of the ablation experiment are shown in Table 6.

[0097] Table 6 Detection results of ablation experiment

[0098] As can be seen from Table 6, Lightweight-YOLOv8 has comprehensively optimized the traditional target detection model by introducing multiple innovative modules. The introduction of lightweight network significantly reduces the parameters and computational complexity of the model. Compared with the baseline model, the parameters of Lightweight-YOLOv8 are reduced from 11.18M to 7.60M, and the GFLOPS are reduced from 12.92G to 7.53G. This improvement greatly reduces the resource requirements of the model, making it more suitable for deployment in UUV devices with limited computing resources, while maintaining excellent detection performance. The introduction of MFF strategy improves the accuracy and robustness of detection. The precision of Base B model is improved to 94.65%, and mAP@0.5 is improved to 94.17%, indicating that the MFF strategy effectively integrates multi-scale features and enhances the adaptability to complex backgrounds and weak targets. After introducing EACIoU, the recall rate and mAP@0.5 are increased to 92.06% and 93.91% respectively. This improvement alleviates the shortcomings of CIoU loss function in target boundary regression. The final Lightweight-YOLOv8 integrates the above modules, and the comprehensive performance is better than the independent improved version, indicating that these improvements have a synergistic effect in improving the performance of the model.

[0099] In summary, Lightweight-YOLOv8 achieves a balance between performance and efficiency in UUV sonar image detection by introducing lightweight design, feature fusion strategy and EACIoU loss function. This model not only improves the target detection capability in complex underwater environment, but also significantly reduces the computational and storage requirements of the model, providing a new technical solution for underwater weak target detection.

[0100] The step division of the above methods is only for clear description, and can be combined into one step or split some steps into multiple steps in implementation, as long as the same logical relationship is included, which is within the protection scope of the present application; adding irrelevant modifications or introducing irrelevant designs in the algorithm or process, but not changing the core design of the algorithm and process are within the protection scope of the present application.

[0101] Another embodiment of the present application relates to an underwater target detection system, and implementation details of the underwater target detection system in the embodiment are specifically explained as follows. The implementation details are provided for the convenience of understanding, and are not necessary for implementing the present application. The underwater target detection system in the embodiment comprises: an image acquisition module configured to acquire a multi-beam forward-looking sonar (MFLS) image under water; a first feature extraction module configured to input the MFLS image into a trained underwater target detection model, and extract shallow features, middle features and deep features of different scales of the MFLS image; a second feature extraction module configured to divide channels of the deep features into a plurality of groups, convolve features of each group of channels, and rearrange the features of each group of channels after convolution, so that the features of each group of channels after convolution are interacted to obtain global features; a third feature extraction module configured to extract local features of different receptive fields of the deep features, and fuse the local features of different receptive fields with the global features to supplement local details of the global features, so as to obtain target deep features of the MFLS image; a target detection module configured to detect underwater targets in the MFLS image according to the shallow features, the middle features and the target deep features of the MFLS image.

[0102] It can be found that the present embodiment is a system embodiment corresponding to the above-mentioned method embodiment, and the present embodiment can be implemented in cooperation with the above-mentioned method embodiment. The related technical details and technical effects mentioned in the above-mentioned embodiments are still valid in the present embodiment. In order to reduce repetition, they will not be described here. Correspondingly, the related technical details mentioned in the present embodiment can also be applied in the above-mentioned embodiments.

[0103] It is worth mentioning that each module involved in the present embodiment is a logical module. In actual application, one logical unit can be one physical unit, or a part of one physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of the present application, units not closely related to solving the technical problems proposed in the present application are not introduced in the present embodiment, but this does not mean that there are no other units in the present embodiment.

[0104] Another embodiment of the present application relates to a computer device, comprising: at least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the underwater target detection method in each of the above-mentioned embodiments.

[0105] The bus can include any number of interconnecting buses and bridges, allowing for a variety of configurations of peripheral devices, processors, and memories. The bus also can include various other circuits and devices such as power management, clock, and other control circuits. The bus interface provides an interface between the bus and the transceiver. The transceiver can be a single device or a plurality of devices, such as a plurality of receivers and transmitters, which provide for communication with various other devices over a transmission medium. Processors are responsible for managing the bus and general processing, including the execution of software stored on the storage medium. The storage medium can be used for storing data that is placed into or retrieved from the processors.

[0106] The processor is also responsible for managing the bus and general processing, including the execution of software stored on the storage medium. The storage medium can be used for storing data that is placed into or retrieved from the processors.

[0107] Another embodiment of the present application relates to a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement the method embodiments.

[0108] That is, those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by a program instructing relevant hardware, and the program is stored in a storage medium, including a plurality of instructions for causing a device (which can be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.

[0109] Those skilled in the art can understand that the above-mentioned embodiments are specific embodiments for implementing the present application, and in actual applications, various changes can be made in form and details without departing from the spirit and scope of the present application.

Claims

1. A method for underwater target detection, characterized in that: The method comprises: Acquire underwater multi-beam forward-looking sonar MFLS images; The MFLS image is input into the trained underwater target detection model, and features of different scales and depths are extracted from the MFLS image to obtain shallow features, middle features, and deep features of the MFLS image with different scales. Divide the channels of deep features into several groups, perform convolution on the features of each group of channels, and rearrange the features of each group of channels after convolution so that the features of each group of channels after convolution interact to obtain global features; Extract local features of different receptive fields of deep features, fuse the local features of different receptive fields with the global features, supplement the local details of the global features, and obtain the target deep features of the MFLS image; Underwater target detection is performed on MFLS images based on shallow layer features, middle layer features and deep layer features of targets.

2. The underwater target detection method according to claim 1, characterized in that: The network structure of the underwater target detection model includes: a shallow feature extraction module composed of a CBS module and a LWC2F module, a middle feature extraction module composed of a CBS module and a ShuffleNetV2 module, and a deep feature extraction module composed of a CBS module and a LWC2F module; Among them, the CBS module includes a convolution layer, a batch normalization layer, and a SiLU activation function layer to extract features of the corresponding scale of the shallow feature extraction module, the middle feature extraction module, or the deep feature extraction module; The LWC2F module processes the features output by the CBS module of the shallow feature extraction module or the deep feature extraction module through a convolutional layer, and divides the processed features into two parts. One part of the features is extracted again through the reverse residual block and then fused with the other part of the features of the short connection. The fused features are integrated through a convolutional layer to obtain shallow features or deep features. The ShuffleNetV2 module is used to extract the global features of the features output by the CBS module of the middle-level feature extraction module as the middle-level features.

3. The underwater target detection method according to claim 1, characterized in that: The loss function of the underwater target detection model includes a first loss function and a second loss function; The first loss function is constructed based on the matching degree between the predicted box and the true box, and the second loss function is constructed based on the influence of the edge information of the MFLS image on the matching degree between the predicted box and the true box.

4. The underwater target detection method according to claim 3, characterized in that: The loss function of the underwater target detection model is: ; Where, is the first loss function, is the second loss function, is a preset weight parameter used to control the influence of the second loss function on the loss function of the underwater target detection model; ; Where, is the weight of each edge pixel in the MFLS image, N is the number of edge pixels, is the sum of the weights of all edge pixels of the MFLS image, for Loss function; ; ; ; ; ; Where, is the Euclidean distance between the center points of the predicted box and the true box, c is the minimum diagonal length of the bounding box containing the predicted box and the true box, and are the predicted box and the true box respectively, is the width of the real frame, is the height of the real frame, is the width of the prediction box, is the height of the prediction box.

5. The underwater target detection method according to claim 4, characterized in that: The weight matrix of the edge pixels of the MFLS image is obtained by the following steps: Denoise the grayscale image of the MFLS image to obtain a smooth image; Calculate the horizontal gradient and vertical gradient of the smoothed image, and obtain the gradient magnitude and gradient direction of each pixel in the smoothed image based on the horizontal gradient and vertical gradient; For each pixel, the gradient magnitude of the neighboring pixels is obtained along the gradient direction of the pixel, and the pixel is retained when the gradient magnitude of the neighboring pixels is the local maximum to refine the edge of the smoothed image; The remaining pixels are divided into two categories according to the gradient amplitude, namely strong edge pixels and weak edge pixels, and the strong edge pixels are regarded as edge pixels, and the pixels connected to the strong edge pixels among the weak edge pixels are regarded as edge pixels; A weight is assigned to each edge pixel according to the gradient magnitude of the edge pixel, and the weight matrix of the edge pixels of the MFLS image is obtained.

6. The underwater target detection method according to claim 2, characterized in that: The reverse residual block includes a convolution layer for expanding the channel dimension, a depth-separable convolution layer for extracting spatial features, and a convolution layer for compressing the channel dimension.

7. The underwater target detection method according to claim 1, characterized in that: Before dividing the channels of the deep features into several groups and performing convolution on the features of each group of channels, the method further includes: The deep features are reduced in dimensionality through convolution operations.

8. An underwater target detection system, characterized in that: The system comprises: Image acquisition module, used to acquire underwater multi-beam forward-looking sonar MFLS images; The first feature extraction module is used to input the MFLS image into the trained underwater target detection model and extract features of different scales and depths on the MFLS image to obtain shallow features, middle features and deep features of the MFLS image with different scales; The second feature extraction module is used to divide the channels of deep features into several groups, convolve the features of each group of channels, and rearrange the features of each group of channels after convolution so that the features of each group of channels after convolution interact to obtain global features; The third feature extraction module is used to extract local features of different receptive fields of deep features, and fuse the local features of different receptive fields with the global features to supplement the local details of the global features to obtain the target deep features of the MFLS image; The target detection module is used to detect underwater targets in the MFLS image based on the shallow features, middle features and deep features of the target in the MFLS image.

9. A computer device, characterized in that: include: at least one processor; And, a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the underwater target detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the underwater target detection method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Area pre-detection-based underwater suspended sonar target identification method

    CN115810144A

  • Sonar image classification method based on neural architecture search

    CN118097304A

  • Underwater moving target detection method and system based on lightweight improved Yolov8

    CN118968274A

  • Improved YOLOv8n-based grape cluster young fruit lightweight detection method

    CN119339367A

  • Seabed static small target detection method suitable for underwater vehicle

    CN119805468A

Cited By

  • A phased feature enhancement semantic segmentation method for underwater sonar image

    CN122473467A