A side scan sonar image target detection method and system based on shadow features

By introducing a shadow feature enhancement module into the YOLOv5 network, the problems of unclear features and susceptibility to background interference in side-scan sonar underwater target detection are solved, achieving efficient and accurate target detection and improving the reliability and adaptability of detection.

CN116740528BActive Publication Date: 2025-12-23WUHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310619507.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-25
Publication Date
2025-12-23
Estimated Expiration
2043-05-25

AI Technical Summary

Technical Problem

Existing side-scan sonar underwater target detection methods are prone to false detections in the presence of strong background noise, and the features are not clear, resulting in high detection difficulty, poor generalization ability, and difficulty in achieving fast and accurate target detection.

Method used

A shadow feature enhancement module was added to the YOLOv5 network. By collecting underwater echo data from side-scan sonar, a training sample set was constructed, and the shadow feature enhancement module was introduced into the network to train the target detection model. The shadow feature enhancement module was used to enhance the features of sub-images of a preset fixed size. Finally, the network parameters were optimized by the stochastic gradient descent algorithm.

Benefits of technology

It improves the reliability and accuracy of target detection in side-scan sonar images, enhances adaptability to different target sizes, has good generalization ability and portability, and replaces the traditional complex feature design process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116740528B_ABST
    Figure CN116740528B_ABST
Patent Text Reader

Abstract

The application provides a side scan sonar image target detection method and system based on shadow features, and belongs to the technical field of surveying and mapping engineering, and comprises the following steps: collecting side scan sonar underwater echo data, obtaining a training sample set according to the side scan sonar underwater echo data; obtaining a YOLOv5 network, adding a shadow feature enhancement module in the YOLOv5 network to obtain a side scan sonar original target detection model, training the side scan sonar original target detection model by using the training sample set, and obtaining a side scan sonar target detection model; inputting to-be-detected side scan sonar underwater echo data into the side scan sonar target detection model to obtain a side scan sonar target detection result. By adding the shadow feature enhancement module in the YOLOv5 network model used in the side scan sonar image target detection network model, the problems of insufficient feature extraction and neglecting the shadow characteristics of the side scan sonar image target are solved, and the reliability and accuracy of the side scan sonar image target detection are effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of surveying and mapping engineering, and in particular to a side scan sonar image target detection method and system based on shadow features. BACKGROUND

[0002] For underwater target detection, side scan sonar is a commonly used detection technology. At present, the method for underwater target detection of side scan sonar mainly detects and judges according to the shape profile of the target, mainly including target detection based on high-order statistics, texture recognition by frequency domain Fourier transform, foreground and background separation based on K-means clustering and Laplacian kernel function, and window detection based on Markov random field model.

[0003] The above-mentioned methods mainly complete the detection of the target based on the target contour information of the image, but in the case of strong background noise, there will be a serious false detection phenomenon. These methods do not have good generalization performance for target detection in complex background, and there are certain defects in technical operation, time and application range. Even the same target in the side scan sonar image, due to the different positions, depths and angles of the sonar, the morphological features of the target in the sonar image will also be different. In addition, due to the serious noise interference in the side scan sonar imaging environment, the target features in the side scan sonar image are not clear, and it is difficult to realize accurate side scan sonar image target detection. The previous method usually manually selects features, which can only achieve good detection effect for the target with simple seabed background, and is time-consuming and laborious and does not have good generalization ability.

[0004] With the hot development of deep learning, the target detection algorithm in the sonar image also gradually progresses towards a more rapid and accurate direction. The existing mainstream acoustic image target recognition algorithm is usually based on a large number of manual feature selection for recognition, and this kind of method will consume a lot of time and the generalization ability and adaptability of the algorithm are poor. Therefore, how to use deep learning method to complete accurate target detection in a large area in a short time is the research hotspot of underwater target recognition of acoustic image at present. At present, the application of deep learning method in many fields has achieved excellent results, and in recent years, many new deep learning neural networks have been proposed. Artificial intelligence deep learning method is developing more and more mature, and gradually begins to be applied in the field of intelligent equipment manufacturing, and the related research of underwater side scan sonar target detection also moves towards the direction of intelligent detection. Therefore, it is imperative to study the underwater side scan sonar image target detection based on deep learning, and to apply intelligent and efficient methods to side scan sonar image target detection, so as to quickly and accurately detect the target, assist the staff to judge and rescue work. SUMMARY

[0005] The application provides a side scan sonar image target detection method and system based on shadow features to solve the defects of unclear target features, high detection difficulty, and misjudgment and missed detection caused by background interference in the prior art.

[0006] In a first aspect, the application provides a side scan sonar image target detection method based on shadow features, comprising:

[0007] Collecting side scan sonar underwater echo data, and obtaining a training sample set according to the side scan sonar underwater echo data;

[0008] Obtaining a YOLOv5 network, adding a shadow feature enhancement module to the YOLOv5 network to obtain a side scan sonar original target detection model, training the side scan sonar original target detection model using the training sample set, and obtaining a side scan sonar target detection model;

[0009] Inputting the side scan sonar underwater echo data to be detected into the side scan sonar target detection model to obtain a side scan sonar target detection result.

[0010] According to the side scan sonar image target detection method based on shadow features provided by the application, side scan sonar underwater echo data is collected, a training sample set is obtained according to the side scan sonar underwater echo data, and the method comprises the following steps:

[0011] Collecting side scan sonar underwater echo data of an underwater scene;

[0012] Converting the side scan sonar underwater echo data into side scan sonar waterfall chart data using side scan sonar data processing software;

[0013] Labeling the target position and category label of the side scan sonar waterfall chart data, and determining label information based on the target position and the category label;

[0014] Packing the side scan sonar waterfall chart data and the label information into the training sample set.

[0015] According to the side scan sonar image target detection method based on shadow features provided by the application, a convolutional neural network YOLOv5 network is obtained, a shadow feature enhancement module is added to the YOLOv5 network to obtain a side scan sonar original target detection model, the side scan sonar original target detection model is trained using the training sample set, and a side scan sonar target detection model is obtained, and the method comprises the following steps:

[0016] Cutting the side scan sonar waterfall chart data in the training sample set into a preset fixed-size sub-image;

[0017] obtaining a backbone network, a neck structure and a head structure of the YOLOv5 network, adding the shadow feature enhancement module between the neck structure and the head structure, and forming the side scan sonar original target detection model;

[0018] training the side scan sonar original target detection model by using the preset fixed-size sub-image, and obtaining the side scan sonar target detection model.

[0019] According to the side scan sonar image target detection method based on a shadow feature provided by the application, a backbone network, a neck structure and a head structure of the YOLOv5 network are obtained, the shadow feature enhancement module is added between the neck structure and the head structure, and the side scan sonar original target detection model is formed, which comprises the following steps:

[0020] The backbone network comprises a convolution layer Conv0, a convolution layer Conv1, a convolution layer CSP1, a convolution layer Conv2, a convolution layer CSP2, a convolution layer Conv3, a convolution layer CSP3, a convolution layer Conv4, a convolution layer CSP4 and a pooling layer SPPF connected in sequence;

[0021] The neck structure comprises a convolution layer Conv5, an up-sampling layer Upsample1, a connection layer Concat1, a convolution layer CSP5, a convolution layer Conv6, an up-sampling layer Upsample2, a connection layer Concat2, a convolution layer CSP6, a convolution layer Conv7, a connection layer Concat3, a convolution layer CSP7, a convolution layer Conv8, a connection layer Concat4 and a convolution layer CSP8 connected in sequence, the connection layer Concat1 is connected with the convolution layer CSP3, and the connection layer Concat2 is connected with the convolution layer CSP2;

[0022] The shadow feature enhancement module comprises a first shadow feature enhancement sub-module, a second shadow feature enhancement sub-module and a third shadow feature enhancement sub-module, the first shadow feature enhancement sub-module is connected after the convolution layer CSP6, the second shadow feature enhancement sub-module is connected after the convolution layer CSP7, and the third shadow feature enhancement sub-module is connected after the convolution layer CSP8, and the preset fixed-size sub-image is subjected to shadow feature enhancement by using the shadow feature enhancement module;

[0023] The convolution layer Conv9 in the head structure is connected with the first shadow feature enhancement sub-module, the convolution layer Conv10 is connected with the second shadow feature enhancement sub-module, and the convolution layer Conv11 is connected with the third shadow feature enhancement sub-module, thereby forming the side scan sonar original target detection model.

[0024] According to the side-scan sonar image target detection method based on shadow features provided by the application, the preset fixed-size sub-image is subjected to shadow feature enhancement by using the shadow feature enhancement module, and the method comprises the following steps:

[0025] After the original feature map of the preset fixed-size sub-image is sequentially input into a convolution layer Conv1 and a mask matrix mask, the original feature map is multiplied with the processed feature map and a scaling factor respectively, so that a processed feature map is obtained;

[0026] The processed feature map and the original feature map are input into a connection layer Concat for connection respectively, and then are input into a convolution layer Conv2, so that an enhanced feature is obtained.

[0027] The candidate region of the original feature map is obtained based on the top edge coordinates, the bottom edge coordinates and the height parameter of the original feature map, the mask matrix mask is equal to the height of the candidate region, and the mask matrix mask comprises first elements corresponding to the candidate region and second elements corresponding to the non-candidate region.

[0028] According to the side-scan sonar image target detection method based on shadow features provided by the application, the preset fixed-size sub-image is subjected to shadow feature enhancement by using the shadow feature enhancement module, and the method comprises the following steps:

[0029] The real box area, the predicted box area, the real box center point, the predicted box center point, the Euclidean distance, the diagonal line length of the two minimum bounding rectangles surrounding the predicted box and the real box, the rectangular width and the rectangular height of the two minimum bounding rectangles surrounding the predicted box and the real box, the predicted box width, the real box height, the predicted box height and the real box height of the preset fixed-size sub-image are obtained.

[0030] The first loss function is obtained based on the real box area and the predicted box area.

[0031] The second loss function is obtained based on the first loss function, the Euclidean distance, the real box center point, the predicted box center point, the diagonal line length, the rectangular width, the rectangular height, the predicted box width, the real box height, the predicted box height and the real box height.

[0032] The third loss function is obtained based on the second loss function and the preset natural logarithm.

[0033] The first loss function, the second loss function and the third loss function are iteratively solved to minimize the network parameters by using the stochastic gradient descent algorithm, so that the side-scan sonar target detection model is obtained.

[0034] According to the shadow feature-based side-scan sonar image target detection method provided in the application, the side-scan sonar underwater echo data to be detected is input into the side-scan sonar target detection model, and after obtaining the side-scan sonar target detection result, the method further comprises the following steps of:

[0035] The performance evaluation index is used to quantitatively evaluate the side-scan sonar target detection result, and an accuracy evaluation result is output.

[0036] In a second aspect, the application further provides a shadow feature-based side-scan sonar image target detection system, comprising:

[0037] The acquisition module is configured to acquire side-scan sonar underwater echo data and obtain a training sample set according to the side-scan sonar underwater echo data.

[0038] The training module is configured to obtain a YOLOv5 network, add a shadow feature enhancement module to the YOLOv5 network to obtain a side-scan sonar original target detection model, train the side-scan sonar original target detection model by using the training sample set, and obtain a side-scan sonar target detection model.

[0039] The detection module is configured to input the side-scan sonar underwater echo data to be detected into the side-scan sonar target detection model to obtain a side-scan sonar target detection result.

[0040] In a third aspect, the application further provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the shadow feature-based side-scan sonar image target detection method according to any one of the above aspects when executing the program.

[0041] In a fourth aspect, the application further provides a non-transitory computer-readable storage medium, which stores a computer program, and the computer program is executable on a processor to implement the shadow feature-based side-scan sonar image target detection method according to any one of the above aspects.

[0042] The shadow feature-based side-scan sonar image target detection method and system provided in the application solve the problems of insufficient feature extraction and neglecting the shadow feature of a side-scan sonar image target by adding a shadow feature enhancement module to a YOLOv5 network model used in a side-scan sonar image target detection network model, have portability and strong generalization ability, can effectively replace the complex feature design process in a traditional method, have strong adaptability to different side-scan sonar target size differences, effectively utilize the shadow feature of a side-scan sonar image target, and thus improve the reliability and accuracy of side-scan sonar image target detection. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to make the technical solutions in the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the accompanying drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0044] Figure 1 is a flowchart of the shadow feature-based side-scan sonar image target detection method provided by the present application;

[0045] Figure 2 is a network model overall structure diagram provided by the present application;

[0046] Figure 3 is a network model specific structure diagram provided by the present application;

[0047] Figure 4 is a shadow feature enhancement module structure diagram provided by the present application;

[0048] Figure 5 is a structure diagram of the shadow feature-based side-scan sonar image target detection system provided by the present application;

[0049] Figure 6 is a structure diagram of the electronic device provided by the present application. DETAILED DESCRIPTION

[0050] In order to make the technical solutions in the present application or the prior art clearer, the accompanying drawings needed in the embodiments or prior art description will be briefly introduced below. Obviously, the accompanying drawings in the following description are some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0051] Figure 1 is a flowchart of the shadow feature-based side-scan sonar image target detection method provided by the present application, as shown in Figure 1 , comprising:

[0052] Step 100: Collecting side-scan sonar underwater echo data, and obtaining a training sample set according to the side-scan sonar underwater echo data;

[0053] Step 200: Obtaining a YOLOv5 network, adding a shadow feature enhancement module in the YOLOv5 network to obtain a side-scan sonar original target detection model, training the side-scan sonar original target detection model by using the training sample set, and obtaining a side-scan sonar target detection model;

[0054] Step 300: inputting the to-be-detected side-scan sonar underwater echo data into the side-scan sonar target detection model to obtain a side-scan sonar target detection result.

[0055] Specifically, the embodiment of the present application first constructs a training sample set, including collecting waterfall chart data of the side-scan sonar of the underwater scene, labeling target positions and category labels, and packaging the side-scan sonar image data and the corresponding label information as a data set; then a side-scan sonar image target detection network model based on shadow features is designed, the side-scan sonar image target detection network model adopts a convolutional neural network model YOLOv5 network, a shadow feature enhancement module is added in the network to solve the problem of insufficient feature extraction and not taking into account the shadow features of the side-scan sonar image target, the network model is trained based on the training sample set to obtain a trained side-scan sonar target detection model; finally, the to-be-detected side-scan sonar underwater echo data is input into the trained side-scan sonar target detection model to obtain a side-scan sonar target detection result.

[0056] The present application solves the problems of insufficient feature extraction and not taking into account the shadow features of the side-scan sonar image target by adding a shadow feature enhancement module in the YOLOv5 network model used in the side-scan sonar image target detection network model, effectively improving the reliability and accuracy of side-scan sonar image target detection.

[0057] Based on the above embodiment, the side-scan sonar underwater echo data is collected, and the training sample set is obtained according to the side-scan sonar underwater echo data, including:

[0058] Collecting side-scan sonar underwater echo data of an underwater scene;

[0059] Converting the side-scan sonar underwater echo data into side-scan sonar waterfall chart data by using a side-scan sonar data processing software;

[0060] Labeling target positions and category labels of the side-scan sonar waterfall chart data, and determining label information based on the target positions and the category labels;

[0061] Packaging the side-scan sonar waterfall chart data and the label information as the training sample set.

[0062] Specifically, when obtaining the training sample set, the embodiment of the present application takes the side-scan sonar as the data source, obtains the side-scan sonar echo data of the underwater scene, opens and outputs the original side-scan sonar echo intensity data as a waterfall chart by using a side-scan sonar data processing software, labels each target with a label frame by using LabelIamge labeling software, finally stores the side-scan sonar image data with the labeled labels, and finally packages all the labeled side-scan sonar image data to construct the training sample set.

[0063] Based on the above embodiment, a convolutional neural network YOLOv5 network is obtained, a shadow feature enhancement module is added in the YOLOv5 network to obtain a side scan sonar original target detection model, the side scan sonar original target detection model is trained by using the training sample set to obtain a side scan sonar target detection model, and the side scan sonar target detection model comprises the following steps:

[0064] The waterfall chart data of the side scan sonar in the training sample set is cropped into a preset fixed-size sub-image; a backbone network, a neck structure and a head structure of the YOLOv5 network are obtained, the shadow feature enhancement module is added between the neck structure and the head structure to form the side scan sonar original target detection model;

[0065] The side scan sonar original target detection model is trained by using the preset fixed-size sub-image to obtain the side scan sonar target detection model.

[0066] The backbone network comprises convolutional layers Conv0, Conv1, CSP1, Conv2, CSP2, Conv3, CSP3, Conv4, CSP4 and a pooling layer SPPF connected in sequence;

[0067] The neck structure comprises convolutional layers Conv5, an up-sampling layer Upsample1, a connection layer Concat1, a convolutional layer CSP5, a convolutional layer Conv6, an up-sampling layer Upsample2, a connection layer Concat2, a convolutional layer CSP6, a convolutional layer Conv7, a connection layer Concat3, a convolutional layer CSP7, a convolutional layer Conv8, a connection layer Concat4 and a convolutional layer CSP8 connected in sequence, the connection layer Concat1 is connected with the convolutional layer CSP3, and the connection layer Concat2 is connected with the convolutional layer CSP2;

[0068] The shadow feature enhancement module comprises a first shadow feature enhancement sub-module, a second shadow feature enhancement sub-module and a third shadow feature enhancement sub-module, the first shadow feature enhancement sub-module is connected after the convolutional layer CSP6, the second shadow feature enhancement sub-module is connected after the convolutional layer CSP7, and the third shadow feature enhancement sub-module is connected after the convolutional layer CSP8, and the preset fixed-size sub-image is subjected to shadow feature enhancement by using the shadow feature enhancement module;

[0069] The shadow feature enhancement module comprises a first shadow feature enhancement sub-module, a second shadow feature enhancement sub-module and a third shadow feature enhancement sub-module, the first shadow feature enhancement sub-module is connected after the convolutional layer CSP6, the second shadow feature enhancement sub-module is connected after the convolutional layer CSP7, and the third shadow feature enhancement sub-module is connected after the convolutional layer CSP8, and the preset fixed-size sub-image is subjected to shadow feature enhancement by using the shadow feature enhancement module;

[0070] The convolutional layer Conv9 in the head structure is connected to the first shadow feature enhancement submodule, the convolutional layer Conv10 is connected to the second shadow feature enhancement submodule, and the convolutional layer Conv11 is connected to the third shadow feature enhancement submodule, thus forming the side-scan sonar original target detection model.

[0071] The shadow feature enhancement module is used to enhance the shadow features of the preset fixed-size sub-image, including:

[0072] The original feature map of the preset fixed-size sub-image is sequentially input into the convolutional layer Conv1 and the mask matrix mask, and then multiplied with the original feature map channel by channel and multiplied with the scaling factor to obtain the processed feature map.

[0073] The processed feature map is connected to the original feature map in the Concat connection layer, and then input into the Conv2 convolutional layer to obtain the enhanced feature map.

[0074] The candidate regions of the original feature map are obtained based on the top edge coordinates, bottom edge coordinates, and height parameters of the original feature map. The mask matrix has the same height as the candidate regions and includes a first element corresponding to the candidate regions and a second element corresponding to the non-candidate regions.

[0075] Specifically, the YOLOv5 network was chosen, such as... Figure 2 As shown, the network mainly consists of three parts: a backbone network, a neck layer, and a head layer, as well as a SEM part, where the head layer is the detection layer and output part. First, the original waterfall image is cropped into images of a fixed size, for example, divided into sub-images no larger than 640×640 pixels; Figure 3 The network structure shown includes:

[0076] The backbone network employs four cascaded convolutional layers, each generating a feature map after each operation, and is finally connected to a spatial pyramid pooling layer; for example... Figure 3 As shown, there are convolutional layers Conv0, Conv1, CSP1, Conv2, CSP2, Conv3, CSP3, Conv4, CSP4 and SPPF pooling layer in sequence.

[0077] The neck layer employs three cascaded upsampling and convolutional layers, connecting the final feature map generated in each layer to a feature map of the same size in the backbone network. This is followed by two downsampling layers, which then connect the resulting feature map to a feature map of the same size from the upsampling, allowing the network to simultaneously acquire detailed features at different scales. Figure 3The U-shaped structure of the neck feature pyramid and the path aggregation structure combination includes a convolution layer Conv5, an up-sampling layer Upsample1, a connection layer Concat1, a convolution layer CSP5, a convolution layer Conv6, an up-sampling layer Upsample2, a connection layer Concat2, a convolution layer CSP6, a convolution layer Conv7, a connection layer Concat3, a convolution layer CSP7, a convolution layer Conv8, a connection layer Concat4, and a convolution layer CSP8.

[0078] Further, the three different size feature maps output from the neck are input into the shadow feature enhancement module SEM. After the feature map input, the target position is first predicted, and a mask matrix of the shadow position is given and multiplied with the original feature map. Then, the original feature map is connected in the channel dimension. Finally, a convolution layer is used to restore the channel number of the feature map.

[0079] As shown in Figure 4 , the shadow feature enhancement module is mainly composed of a convolution layer Conv1, a connection layer Concat, and a convolution layer Conv2. The effect of model positioning and recognition depends on the response value of the pixels in the final feature image. The purpose of the shadow enhancement module SEM is to enable the final output of the model to have a higher feature value for the real position of the side scan sonar target and reduce the pixel response value of other positions. The information in the high response area of the shadow is used to improve the response effect of the target area, thereby helping the model to classify. When the high feature value area of the shadow is stripped to the channel dimension, the model can use this area according to the final detection requirements.

[0080] It can be understood that the shadow feature matching rule of the shadow feature enhancement module is: obtaining the coordinates (y l , y2) of the top edge and the bottom edge of the object from the target position parameters, the range of the target area is y2-y l , and the feature map in the range of y2-y1 is directly taken as the candidate area. Since the height of some shadows in the training data set is slightly greater than the object, a height parameter a is introduced to adjust the height of the area. The final height of the area should be a*(y2-y1). After obtaining the candidate area, a mask matrix with the same width and height as the feature map is generated, 1 is set for the candidate area, and 0 is set for the non-candidate area, as shown in Figure 4 , the mask matrix is multiplied by the scaling factor f element by element, and then multiplied by the input feature map element by element in each channel. The feature values in the non-candidate area can be suppressed, the feature values in the candidate area can be amplified, and a feature map with the same size as the original feature map and containing shadow features is output. The newly generated feature map will be concatenated with the original feature map to increase the shadow feature map to the channel dimension of the original feature map for subsequent feature fusion.

[0081] The application uses a deep learning method to automatically learn the side scan sonar image training sample based on a shadow feature enhancement convolutional neural network to obtain an end-to-end image target detection model. The model does not need artificial feature design and is applicable to data collected by different collection devices and in different geographic locations, and has strong portability and generalization capability. The model can effectively replace the complex feature design process in the traditional method. In addition, in the design of the structure of the network model, the feature maps of different levels are connected, the high-level features with strong semantics and the low-level features with high resolution are fused, the adaptability of the network model to different size targets in a complex underwater scene is strengthened, and the underwater targets with different sizes can be flexibly and effectively detected.

[0082] Based on the above embodiment, the side scan sonar original target detection model is trained by using the preset fixed size sub-image to obtain the side scan sonar target detection model, including:

[0083] The real box area, the predicted box area, the real box center point, the predicted box center point, the Euclidean distance, the diagonal line length of the two minimum circumscribed rectangles surrounding the predicted box and the real box, the rectangular width and the rectangular height of the two minimum circumscribed rectangles surrounding the predicted box and the real box, the predicted box width, the real box height, the predicted box height and the real box height of the preset fixed size sub-image are obtained.

[0084] Based on the real box area and the predicted box area, a first loss function is obtained.

[0085] Based on the first loss function, the Euclidean distance, the real box center point, the predicted box center point, the diagonal line length, the rectangular width, the rectangular height, the predicted box width, the real box height, the predicted box height and the real box height, a second loss function is obtained.

[0086] Based on the second loss function and a preset natural logarithm, a third loss function is obtained.

[0087] The first loss function, the second loss function and the third loss function are iteratively solved to minimize the network parameters by using a stochastic gradient descent algorithm to obtain the side scan sonar target detection model.

[0088] Specifically, the shadow feature enhancement module with explicit attention to the shadow feature is used to solve the problem of not fully considering the target accompanying shadow feature, the network model is trained based on a training sample set to obtain a trained target detection model, and the training process includes:

[0089] Firstly, the following three loss functions are defined:

[0090] LCEIOU=3ln3-3ln(2+EIOU)

[0091]

[0092]

[0093] wherein, parameters A and B represent the areas of the real box and the predicted box respectively; b and b gt represent the center points of the predicted box and the real box respectively; p represents the Euclidean distance; c represents the length of the diagonal line of the two minimum circumscribed rectangles surrounding the predicted box and the real box, c w and c h represent the width and height of the two minimum circumscribed rectangles surrounding the predicted box and the real box, w and w gt represent the width of the predicted box and the real box, h and h gt represent the height of the predicted box and the real box.

[0094] Next, using the stochastic gradient descent algorithm, the network parameters minimizing the loss function loss are iteratively solved to obtain the trained side-scan sonar target detection model, wherein the network parameters include the convolution kernel, offset and other parameters in the convolutional neural network, which are obtained by automatic learning and adjustment of the network by minimizing the loss function.

[0095] Based on the above embodiment, after inputting the to-be-detected side-scan sonar underwater echo data into the side-scan sonar target detection model and obtaining the side-scan sonar target detection result, the following steps are further included:

[0096] The side-scan sonar target detection result is quantitatively evaluated by using the performance evaluation index, and an accuracy evaluation result is output.

[0097] Specifically, after obtaining the side-scan sonar target detection result, the final detection result is quantitatively evaluated by using the classical performance evaluation indexes of precision P and recall R, and the calculation method is as follows:

[0098]

[0099]

[0100] wherein TP represents the case that the predicted sample is positive and the actual sample is also positive; FP represents the case that the predicted sample is positive and the actual sample is negative; and FN represents the case that the predicted sample is negative and the actual sample is positive.

[0101] The target detection accuracy changes before and after adding the shadow enhancement module are shown in Table 1:

[0102] Table 1

[0103] Shadow enhancement module mAP(0.5) × 0.743 √ 0.805

[0104] The symbol represents a shadow enhancement module, the symbol represents no shadow enhancement module, and mAP (0.5) is a common index of target detection accuracy.

[0105] It can be seen from the automatic detection result of the side scan sonar image collected by the underwater environment according to the present application that the present application can stably and accurately perform automatic detection on targets with different types, quantities and sizes.

[0106] The side scan sonar image target detection system based on shadow features provided by the present application is described below, and the side scan sonar image target detection system based on shadow features described below can be correspondingly referred to the side scan sonar image target detection method based on shadow features described above.

[0107] Figure 5 is a structural schematic diagram of the side scan sonar image target detection system based on shadow features provided by the embodiment of the present application, as shown in Figure 5 It includes an acquisition and acquisition module 51, a construction and training module 52 and a detection module 53, wherein:

[0108] The acquisition and acquisition module 51 is used to acquire side scan sonar underwater echo data, and to acquire a training sample set according to the side scan sonar underwater echo data; the construction and training module 52 is used to acquire a YOLOv5 network, to add a shadow feature enhancement module in the YOLOv5 network to obtain a side scan sonar original target detection model, to train the side scan sonar original target detection model by using the training sample set, and to obtain a side scan sonar target detection model; and the detection module 53 is used to input the side scan sonar underwater echo data to be detected into the side scan sonar target detection model to obtain a side scan sonar target detection result.

[0109] Figure 6 An example of an entity structure schematic diagram of an electronic device is shown in Figure 6As shown, the electronic device can include a processor 610, a communications interface 620, a memory 630, and a communications bus 640, wherein the processor 610, the communications interface 620, and the memory 630 complete mutual communication through the communications bus 640. The processor 610 can invoke a logic instruction in the memory 630 to execute a side-scan sonar image target detection method based on a shadow feature, which includes: collecting side-scan sonar underwater echo data, obtaining a training sample set according to the side-scan sonar underwater echo data; obtaining a YOLOv5 network, adding a shadow feature enhancement module in the YOLOv5 network to obtain a side-scan sonar original target detection model, training the side-scan sonar original target detection model using the training sample set to obtain a side-scan sonar target detection model; inputting to-be-detected side-scan sonar underwater echo data into the side-scan sonar target detection model to obtain a side-scan sonar target detection result.

[0110] In addition, the logic instruction in the memory 630 described above can be implemented in the form of a software function unit and sold or used as an independent product, which can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application or parts of the present application that essentially contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various media that can store program codes.

[0111] On the other hand, the present application also provides a non-transitory computer readable storage medium having a computer program stored thereon, which is executed by a processor to implement a side-scan sonar image target detection method based on a shadow feature provided by the above-mentioned method, which includes: collecting side-scan sonar underwater echo data, obtaining a training sample set according to the side-scan sonar underwater echo data; obtaining a YOLOv5 network, adding a shadow feature enhancement module in the YOLOv5 network to obtain a side-scan sonar original target detection model, training the side-scan sonar original target detection model using the training sample set to obtain a side-scan sonar target detection model; inputting to-be-detected side-scan sonar underwater echo data into the side-scan sonar target detection model to obtain a side-scan sonar target detection result.

[0112] The device embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.

[0113] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software and the necessary general hardware platform, and of course can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0114] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A side scan sonar image target detection method based on shadow features, characterized in that, The method comprises the following steps: Collecting side scan sonar underwater echo data, and obtaining a training sample set according to the side scan sonar underwater echo data; Obtaining a convolutional neural network YOLOv5 network, adding a shadow feature enhancement module to the YOLOv5 network to obtain a side scan sonar original target detection model, training the side scan sonar original target detection model by using the training sample set, and obtaining a side scan sonar target detection model; Inputting side scan sonar underwater echo data to be detected into the side scan sonar target detection model to obtain a side scan sonar target detection result; The method for obtaining the convolutional neural network YOLOv5 network, adding the shadow feature enhancement module to the YOLOv5 network to obtain the side scan sonar original target detection model, training the side scan sonar original target detection model by using the training sample set, and obtaining the side scan sonar target detection model comprises the following steps: Cutting side scan sonar waterfall chart data in the training sample set into a preset fixed-size sub-image; Obtaining a backbone network, a neck structure and a head structure of the YOLOv5 network, adding the shadow feature enhancement module between the neck structure and the head structure to form the side scan sonar original target detection model, comprising: The backbone network comprises a convolutional layer Conv0, a convolutional layer Conv1, a convolutional layer CSP1, a convolutional layer Conv2, a convolutional layer CSP2, a convolutional layer Conv3, a convolutional layer CSP3, a convolutional layer Conv4, a convolutional layer CSP4 and a pooling layer SPPF connected in sequence; The neck structure comprises a convolutional layer Conv5, an up-sampling layer Upsample1, a connection layer Concat1, a convolutional layer CSP5, a convolutional layer Conv6, an up-sampling layer Upsample2, a connection layer Concat2, a convolutional layer CSP6, a convolutional layer Conv7, a connection layer Concat3, a convolutional layer CSP7, a convolutional layer Conv8, a connection layer Concat4 and a convolutional layer CSP8 connected in sequence, the connection layer Concat1 is connected with the convolutional layer CSP3, and the connection layer Concat2 is connected with the convolutional layer CSP2; The shadow feature enhancement module comprises a first shadow feature enhancement submodule, a second shadow feature enhancement submodule and a third shadow feature enhancement submodule, the first shadow feature enhancement submodule is connected after the convolutional layer CSP6, the second shadow feature enhancement submodule is connected after the convolutional layer CSP7, and the third shadow feature enhancement submodule is connected after the convolutional layer CSP8, and the shadow feature enhancement module is used for performing shadow feature enhancement on the preset fixed-size sub-image; The convolutional layer Conv9 in the head structure is connected with the first shadow feature enhancement submodule, the convolutional layer Conv10 is connected with the second shadow feature enhancement submodule, the convolutional layer Conv11 is connected with the third shadow feature enhancement submodule, and the side scan sonar original target detection model is formed. The side scan sonar original target detection model is trained by using the preset fixed size sub-image, and the side scan sonar target detection model is obtained. 2.The shadow-feature-based side-scan sonar image target detection method of claim 1, wherein, The side scan sonar underwater echo data of an underwater scene is collected, and a training sample set is obtained based on the side scan sonar underwater echo data, including: Collecting side scan sonar underwater echo data of an underwater scene; The side scan sonar underwater echo data is converted into side scan sonar waterfall chart data by using a side scan sonar data processing software; The target position and category label of the side scan sonar waterfall chart data are labeled, and label information is determined based on the target position and the category label; The side scan sonar waterfall chart data and the label information are packaged into the training sample set. 3.The shadow-feature-based side-scan sonar image target detection method of claim 1, wherein, The shadow feature enhancement module is used to enhance the shadow feature of the preset fixed size sub-image, including: The original feature map of the preset fixed size sub-image is input into the convolution layer Conv1 and the mask matrix mask in turn, and then multiplied with the original feature map and a scaling factor respectively to obtain a processed feature map; The processed feature map and the original feature map are input into the connection layer Concat for connection, and then input into the convolution layer Conv2 to obtain an enhanced feature; The candidate region of the original feature map is obtained based on the top edge coordinates, the bottom edge coordinates and the height parameter of the original feature map, the mask matrix mask is equal to the height of the candidate region, and the mask matrix mask includes the first element corresponding to the candidate region and the second element of the non-candidate region. 4.The shadow-feature-based side-scan sonar image target detection method of claim 1, wherein, The side scan sonar original target detection model is trained by using the preset fixed size sub-image, and the side scan sonar target detection model is obtained, including: The real box area, the predicted box area, the real box center point, the predicted box center point, the Euclidean distance, the diagonal line length of the two minimum bounding rectangles enclosing the predicted box and the real box, the rectangular width and the rectangular height of the two minimum bounding rectangles enclosing the predicted box and the real box, the predicted box width, the real box height, the predicted box height and the real box height of the preset fixed size sub-image are obtained; Based on the real box area and the predicted box area, a first loss function is obtained; Based on the first loss function, the Euclidean distance, the real box center point, the predicted box center point, the diagonal line length, the rectangular width, the rectangular height, the predicted box width, the real box height, the predicted box height and the real box height, a second loss function is obtained; Based on the second loss function and a preset natural logarithm, a third loss function is obtained; The first loss function, the second loss function and the third loss function are iteratively solved to minimize the network parameters by using a stochastic gradient descent algorithm, and the side scan sonar target detection model is obtained. 5.The shadow-feature-based side-scan sonar image target detection method of claim 1, wherein, After the side scan sonar underwater echo data to be detected is input into the side scan sonar target detection model, the side scan sonar target detection result is obtained, and further including: The performance evaluation index is used to quantitatively evaluate the side scan sonar target detection result, and the precision evaluation result is output.

6. A shadow feature-based side-scan sonar image target detection system based on the shadow feature-based side-scan sonar image target detection method according to any one of claims 1 to 5, characterized by Including: The acquisition module is configured to acquire side-scan sonar underwater echo data and obtain a training sample set according to the side-scan sonar underwater echo data; The training module is configured to obtain a YOLOv5 network, add a shadow feature enhancement module to the YOLOv5 network to obtain a side-scan sonar original target detection model, train the side-scan sonar original target detection model by using the training sample set, and obtain a side-scan sonar target detection model; The detection module is configured to input side-scan sonar underwater echo data to be detected into the side-scan sonar target detection model to obtain a side-scan sonar target detection result.

7. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the shadow feature-based side-scan sonar image target detection method according to any one of claims 1 to 5.

8. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the shadow feature-based side-scan sonar image target detection method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Side-scan sonar image domain adaptive learning real-time segmentation method based on AUV

    CN112613518A

  • Efficient side-scan sonar image generation method

    CN115937444A