Side-scan sonar shipwreck image target detection method
By constructing an improved CCS-YOLO network model, the problem of missed detection and speed in side-scan sonar shipwreck image detection is solved, higher detection accuracy and speed are achieved, and it is suitable for low computing power platforms.
Patent Information
- Application Number
- CN202411022408.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-10-22
AI Technical Summary
Existing side-scan sonar shipwreck image detection methods suffer from missed detections and low detection speed, making it difficult to adapt to the needs of low-computing power platforms.
Construct an improved network model of CCS-YOLO, by replacing the convolution module of the backbone network, the heavy parameter module and detection head of the feature fusion network, to enhance the feature representation ability, reduce the computational complexity, and use the SCDH detection head to reduce the amount of parameters and calculation Quantity, combined with Mosaic online data enhancement method for training.
It improves detection accuracy and speed, reduces the number of parameters and computational complexity, significantly improves the problem of missed detection, and is suitable for low computing power platforms.
Smart Images

Figure CN118823328A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image detection, and in particular to a side-scan sonar shipwreck image target detection method. Background Art
[0002] As one of the important technologies in the field of marine surveying and mapping, underwater shipwreck identification technology is of great significance for underwater cultural relics archaeology, detection and search and rescue of shipwrecks at sea, and verification of river obstacles. It directly affects the progress and effectiveness of these detection tasks, and sonar technology is a commonly used means.
[0003] Sonar target detection technology is mainly divided into traditional methods and deep learning methods. Traditional methods include frame difference method, elimination method, constant false alarm rate detection algorithm (CFAR), and methods based on solving speckle noise and texture features. In recent years, deep learning methods have made significant progress in the field of sonar target detection. Common deep learning models are divided into one-stage detection algorithms and two-stage detection algorithms. In two-stage detection algorithms, such as R-CNN, FastR-CNN and Faster R-CNN, although the overall accuracy is better than traditional methods, it needs to select candidate boxes and classification, resulting in the training of multiple models affecting the detection speed and making it difficult to meet real-time requirements. In contrast, one-stage detection algorithms such as SSD, YOLO series and DETR series, due to their characteristics of directly regressing the target border and category on the original image, improve the detection speed while maintaining a high accuracy. Therefore, when the two-stage detection algorithm encounters a bottleneck in real-time, the one-stage detection algorithm performs outstandingly in sonar image detection tasks by virtue of its regression characteristics.
[0004] However, the above algorithms all have some problems. Side scan sonar targets vary widely, and there are some challenges and problems in target detection. These problems include the complexity of side scan sonar images leading to missed detections, and the low detection speed that makes it difficult to adapt to the needs of low computing power platforms. Summary of the invention
[0005] The present application provides a side-scan sonar shipwreck image target detection method to solve the problems of missed detection and low detection speed in existing side-scan sonar shipwreck image detection solutions, which are difficult to adapt to the needs of low computing power platforms.
[0006] The method comprises:
[0007] Acquire a target data set for side scan sonar shipwreck detection, wherein the target data set includes a plurality of shipwreck images;
[0008] An improved network model of CCS-YOLO is constructed, wherein the improved network model is constructed based on the YOLOv8 network model, wherein the conventional convolution modules of the first layer, the second layer, the fifth layer and the seventh layer of the backbone network in the improved network model are replaced by the improved convolution modules, the conventional re-parameter modules of the 12th layer, the 15th layer, the 18th layer and the 21st layer in the feature fusion network in the improved network model are replaced by the improved re-parameter modules, and the detection head in the detection head network in the improved network model is replaced by the SCDH detection head; the improved convolution module is used to enhance the feature representation capability, the improved re-parameter module is used to reduce the computational complexity and maintain the feature flow under the premise of ensuring the effective extraction of spatial features, and the SCDH detection head is used to reduce the amount of parameters and the amount of calculation;
[0009] Using the target data set to train the improved network model to obtain a target network model;
[0010] A real-time data set of side-scan sonar shipwreck detection is acquired, and target detection is performed on the real-time data set using the target network model.
[0011] Preferably, the step of obtaining a target data set for side scan sonar shipwreck detection comprises:
[0012] Acquire an initial dataset of side-scan sonar wreck detections;
[0013] Using LabelImg to label the initial data set to obtain a first data set, wherein the labeling process includes marking the category, object name, and bounding box coordinates of each picture in the initial data set;
[0014] Performing sample expansion processing on the first data set to obtain a second data set, wherein the sample expansion processing includes a random rotation operation, a noise addition operation, a brightness change operation, an image flip operation, a grayscale operation, and a random erasing operation;
[0015] The second data set is divided according to a preset ratio to obtain the target data set, and the target data set includes a training set and a validation set after the division process.
[0016] Preferably, the improved convolution module includes a conventional convolution layer, a dynamic convolution layer, a splicing layer, a normalization layer, an activation function layer, a fully connected layer and a global average pooling layer;
[0017] The improved convolution module processes the feature map in the following steps:
[0018] Perform conventional convolution processing with a convolution kernel of 1 on the feature map to obtain a first feature map;
[0019] The first feature map is differentiated, and conventional convolution with a convolution kernel of 3 and dynamic convolution with a convolution kernel of 3 are respectively performed on the differentiated feature map, and the feature map after the conventional convolution and the dynamic convolution are spliced to obtain a second feature map;
[0020] The second feature map is sequentially subjected to batch normalization processing, parameterized linear processing, global average pooling layer processing, and two fully connected layer processing to obtain a third feature map.
[0021] Preferably, the improved re-parameter module includes a convolution layer, a cutting layer, several layers of partial convolution layers and a splicing layer;
[0022] The step of improving the re-parameter module to process the feature map includes:
[0023] Perform convolution on the data set to obtain the fourth feature map;
[0024] Performing a cutting process on a portion of the fourth feature map, performing a plurality of partial convolution processes on the feature map after the cutting process, and performing a splicing process on the fourth feature map that has not been cut and the fourth feature map after the cutting process to obtain a fifth feature map;
[0025] Perform convolution processing on the fifth feature map to obtain a sixth feature map.
[0026] Preferably, the convolutional planning layer in the SCDH detection head is replaced by an improved conventional convolutional layer with group normalization function;
[0027] The SCDH detection head detects the characteristic graph in the following steps:
[0028] Performing an improved conventional convolution layer with a convolution kernel of 1 on each feature map respectively to obtain a seventh feature map;
[0029] The seventh feature map is processed twice by an improved conventional convolution layer with a convolution kernel of 3 to obtain a plurality of position features corresponding to the shipwreck in the feature map and a type feature corresponding to each position feature;
[0030] All the position features are scaled to obtain the target position features corresponding to the sunken ship in the feature map.
[0031] Preferably, the step of using the target data set to train the improved network model includes:
[0032] Performing image preprocessing on the target data set to obtain a preprocessed data set;
[0033] Setting an optimization function of the improved network model;
[0034] The preprocessed data set is used to perform weight training on the improved network model, and the parameters in the improved network model are updated.
[0035] Preferably, the step of training the improved network model using the target data set further comprises:
[0036] Modify the size of all shipwreck images in the training set to 640×640;
[0037] The SGD function is set as the optimization function of the improved network model, and the batch training number of the SGD function is set to 300, the batch size is 16, and the initial learning rate is 0.01;
[0038] The Mosaic online data enhancement method is used to randomly scale, crop, cut and randomly splice the resized shipwreck images to obtain the training generated atlas.
[0039] The initial training quantity of the SGD function is set to 0, and the improved network model is weighted trained by using the training generated atlas. The weight training is stopped when the initial training quantity of the SGD function is 300, and the parameters in the improved network model are updated according to the weight training. During the weight training process, the parameters in the improved network model are updated by using the weights obtained from each batch training.
[0040] Preferably, after the step of using the target data set to train the improved network model, the step further includes:
[0041] Using the validation set, the improved network model and the original YOLOv8 network model to perform prediction comparison, obtain comparison results, and perform accuracy assessment on the comparison results;
[0042] If the comparison result does not meet the accuracy assessment, continue to train the improved network model;
[0043] If the comparison result meets the accuracy assessment, the improved network model is saved as the target network model.
[0044] Preferably, after the step of using the target data set to train the improved network model, the step further includes:
[0045] Selecting a number of shipwreck images from the verification set, annotating and visualizing the images, and obtaining a target verification set;
[0046] Inputting half of the shipwreck images in the target verification set into the YOLOv8 network model and the improved network model for prediction respectively, to obtain first verification data and second verification data, wherein the first verification data and the second verification data both include detection conditions of the shipwreck images, category names of the detection targets, confidence scores, and target frame coordinate information;
[0047] The first verification data and the second verification data are compared to obtain a comparison result.
[0048] Preferably, after the step of using the target data set to train the improved network model, the step further includes:
[0049] The precision, recall rate, average precision mean, F1 score, number of floating-point operations and number of parameters are compared based on the first verification data and the second verification data respectively; the F1 score is the harmonic mean of the precision and the recall rate.
[0050] It can be seen from the above content that the present application provides a side-scan sonar shipwreck image target detection method, the method comprising obtaining a target data set for side-scan sonar shipwreck detection, the target data set comprising a plurality of shipwreck images; constructing an improved network model of CCS-YOLO, the improved network model being constructed based on the YOLOv8 network model, the conventional convolution modules of the first layer, the second layer, the fifth layer and the seventh layer of the backbone network in the improved network model being replaced by the improved convolution modules, the conventional convolution modules of the 12th layer, the 15th layer, the 18th layer and the 21st layer in the feature fusion network in the improved network model being replaced by the improved convolution modules, The parameter module is replaced by an improved re-parameter module, and the detection head in the detection head network in the improved network model is replaced by an SCDH detection head; the improved convolution module is used to enhance the feature representation capability, the improved re-parameter module is used to reduce the computational complexity and maintain feature flow while ensuring effective extraction of spatial features, and the SCDH detection head is used to reduce the amount of parameters and the amount of calculation; the improved network model is trained using the target data set to obtain a target network model; a real-time data set for side-scan sonar shipwreck detection is obtained, and the target network model is used to perform target detection on the real-time data set. This application solves the problem of missed detection in existing side-scan sonar shipwreck image detection schemes and the problem of low detection speed that makes it difficult to adapt to the needs of low computing power platforms through the above method. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0052] Figure 1A flow chart of a side scan sonar shipwreck image target detection method for this application;
[0053] Figure 2 A schematic diagram of an improved network model in a side-scan sonar shipwreck image target detection method in this application;
[0054] Figure 3 A schematic diagram of an improved convolution module in a side-scan sonar shipwreck image target detection method in this application;
[0055] Figure 4 A schematic diagram of an improved re-parameter module in a side-scan sonar shipwreck image target detection method in this application;
[0056] Figure 5 This is a schematic diagram of a SCDH detection head in a side scan sonar shipwreck image target detection method of the present application;
[0057] Figure 6 This is the schematic diagram of the Mosaic online data enhancement method;
[0058] Figure 7 It is the training graph for integrating YOLO algorithm;
[0059] Figure 8 This is a comparison chart of the ablation test results of the improved network model of CCS-YOLO in this application;
[0060] Fig. 9 A comparison chart of the results of shipwreck recognition in real scenarios. DETAILED DESCRIPTION
[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] Figure 1 The present invention provides a flow chart of a method for detecting targets in side-scan sonar shipwreck images.
[0063] Figure 2 This is a schematic diagram of an improved network model in a side-scan sonar shipwreck image target detection method in this application.
[0064] See also Figure 1 and Figure 2 It can be seen that this embodiment provides a side scan sonar shipwreck image target detection method, the method comprising:
[0065] S100, obtaining a target data set for shipwreck detection by a side-scan sonar, wherein the target data set includes a plurality of shipwreck images. Specifically, in this embodiment, the target data set is a shipwreck image obtained by a side-scan sonar.
[0066] The specific steps of obtaining the target data set include:
[0067] An initial data set for side-scan sonar shipwreck detection is obtained; the initial data set is annotated using LabelImg to obtain a first data set, wherein the annotating process includes marking the category, object name, and bounding box coordinates of each image in the initial data set; sample expansion processing is performed on the first data set to obtain a second data set, wherein the sample expansion processing includes a random rotation operation, a noise addition operation, a brightness change operation, an image flip operation, a grayscale operation, and a random erasing operation; the second data set is divided according to a preset ratio to obtain the target data set, wherein the target data set includes a training set and a validation set after the division process.
[0068] Exemplarily, the side-scan sonar shipwreck pictures are provided by the project and collected by domestic and foreign marine surveying and mapping departments, with a total of 485 pictures, obtaining the data set m0; the pictures in the data set m0 are labeled as shipwreck using the labeling software LabelImg; after the labeling is completed, the corresponding TXT format labeling file is generated, which contains the object name and the coordinate information of the bounding box, and the category is shipwreck, obtaining the data set m1; the images of the data set m1 are randomly rotated, noise is added, brightness is changed, images are flipped, grayed, and randomly erased using the offline data enhancement method, thereby completing the expansion of the samples and obtaining the expanded data set m2; the data set m2 is divided into a training set and a validation set in a ratio of 7:3, obtaining train and valid folders, and establishing the data.yaml file; the final SSW data set (the target data set for side-scan sonar shipwreck detection) is obtained.
[0069] The method further comprises:
[0070] S200, construct an improved network model of CCS-YOLO, wherein the improved network model is constructed based on the YOLOv8 network model, wherein the conventional convolution modules of the 1st layer, the 2nd layer, the 5th layer and the 7th layer of the backbone network in the improved network model are replaced by improved convolution modules, and the conventional re-parameter modules of the 12th layer, the 15th layer, the 18th layer and the 21st layer in the feature fusion network in the improved network model are replaced by improved re-parameter modules, and the detection head in the detection head network in the improved network model is replaced by an SCDH detection head; the improved convolution module is used to enhance the feature representation capability, the improved re-parameter module is used to reduce the computational complexity and maintain the feature flow while ensuring the effective extraction of spatial features, and the SCDH detection head is used to reduce the amount of parameters and the amount of calculation.
[0071] Specifically, in this embodiment, the core of this embodiment is to replace the conventional convolution module of the corresponding layer of the backbone network with an improved convolution module, replace the conventional re-parameter module of the corresponding layer of the feature fusion network with an improved re-parameter module, and replace the detection head in the detection head network with an SCDH detection head. The specific structure of the improved network model is shown in Figure 2 .
[0072] See also Figure 2 It can be seen that the improved convolution module includes a conventional convolution layer, a dynamic convolution layer, a splicing layer, a normalization layer, an activation function layer, a fully connected layer and a global average pooling layer.
[0073] Figure 3 This is a schematic diagram of an improved convolution module in a side-scan sonar shipwreck image target detection method in this application.
[0074] See also Figure 3 It can be seen that the functions of the improved convolution module include:
[0075] Perform conventional convolution processing with a convolution kernel of 1 on the feature map to obtain a first feature map; perform differentiation processing on the first feature map, perform conventional convolution processing with a convolution kernel of 3 and dynamic convolution processing with a convolution kernel of 3 on the differentiated feature map, respectively, and splice the feature maps after the conventional convolution processing and the dynamic convolution processing to obtain a second feature map; perform batch normalization processing, parameterized linear processing, global average pooling layer processing and two fully connected layers processing on the second feature map in sequence to obtain a third feature map.
[0076] For example, based on the original YOLOv8 backbone network, the improved convolution module (CGB) replaces the original conventional convolution modules (CBS) in the first, third, fifth and seventh layers of the backbone network (Backbone). The schematic diagram of the CGB module is as follows: Figure 2As shown in the figure, the Conv with a 1*1 convolution kernel is differentiated into the Conv with a 3*3 convolution kernel and the DConv with a 3*3 convolution kernel. Then, the local features and the surrounding context features are combined through the Concat splicing operation to form a comprehensive feature representation. The combined features are further processed through operations such as batch normalization (BatchNormalization, BN) and parameterized linear units (ParametricReLU, PReLU) to enhance the feature representation capability.
[0077] See also Figure 2 It can be seen that the improved re-parameter module includes a convolution layer, a cutting layer, several layers of partial convolution layers and a splicing layer.
[0078] Figure 4 This is a schematic diagram of an improved heavy parameter module in a side scan sonar shipwreck image target detection method in the present application.
[0079] See also Figure 4 It can be seen that the functions of the improved re-parameter module include:
[0080] The data set is convolved to obtain a fourth feature map; a portion of the fourth feature map is cut, and the feature map after the cutting process is partially convolved several times, and the fourth feature map that has not been cut and the fourth feature map after the cutting process are spliced to obtain a fifth feature map; the fifth feature map is convolved to obtain a sixth feature map.
[0081] Exemplarily, in the feature fusion network (Neck) part of YOLOv8, the improved re-parameter module (C2PC) replaces the original conventional re-parameter module (C2f) of the 12th, 15th, 18th and 21st layers of the Neck part. In C2PC, the partial convolution (PConv) principle is integrated to utilize the redundancy of the feature map to reduce calculation and memory access. The advantage of integrating Pconv convolution is that it can reduce the computational complexity and maintain the flow of feature information, and can still effectively extract spatial features.
[0082] See also Figure 2 It can be seen that the convolution planning layer in the SCDH detection head is replaced by an improved conventional convolution layer with group normalization function.
[0083] Figure 5 This is a schematic diagram of a SCDH detection head in a side-scan sonar shipwreck image target detection method in the present application.
[0084] See also Figure 5 It can be seen that the functions of the SCDH detection head include:
[0085] Each feature map in the feature map is processed by an improved conventional convolution layer with a convolution kernel of 1 to obtain a seventh feature map; the seventh feature map is processed by an improved conventional convolution layer with a convolution kernel of 3 twice to obtain several position features corresponding to the shipwreck in the feature map and a type feature corresponding to each position feature; all the position features are scaled to obtain the target position features corresponding to the shipwreck in the feature map.
[0086] For example, the detection head is lightweighted, and the original YOLOv8 detection head of the detection head network is replaced with an SCDH detection head. Since the feature extraction capability will decrease when lightweighted, the convolution planning layer in the detection head is replaced with an improved conventional convolution layer (Conv_GN) with group normalization function to improve the detection head positioning and classification performance. Two improved conventional convolution layers are shared below to form a shared convolution operation, which can greatly reduce the number of parameters and the amount of calculation. While using shared convolution, in order to deal with the problem of inconsistent target scales detected by each detection head, a scaling layer (Scale) is used to scale the features.
[0087] The method further comprises:
[0088] S300, using the target data set to train the improved network model to obtain the target network model. Specifically, in this embodiment, the target data set obtained in the above steps is used to train the improved network model to obtain the target network model.
[0089] Among them, the step of using the target data set to train the improved network model includes performing image preprocessing on the target data set to obtain a preprocessed data set; setting an optimization function of the improved network model; using the preprocessed data set to perform weight training on the improved network model, and updating the parameters in the improved network model.
[0090] Figure 6 Schematic diagram of the Mosaic online data enhancement method.
[0091] Figure 7 This is the training graph for the YOLO algorithm.
[0092] See also Figure 6 and Figure 7 It can be seen that the specific steps of training the improved network model include:
[0093] The size of all the shipwreck images in the training set is modified to 640×640; the SGD function is set as the optimization function of the improved network model, and the batch training number of the SGD function is set to 300, the batch size is 16, and the initial learning rate is 0.01; the Mosaic online data enhancement method is used to randomly scale, crop, cut and randomly splice the shipwreck images that have completed the size modification to obtain a training generated atlas; the initial training number of the SGD function is set to 0, and the training generated atlas is used to perform weight training on the improved network model, and the weight training is stopped when the initial training number of the SGD function is 300, and the parameters in the improved network model are updated according to the weight training; during the weight training process, the parameters in the improved network model are updated using the weights obtained from each batch training.
[0094] For example, the width w and height h of the input network image are defined, and w=640, h=640 are assigned. SGD is set as the optimization function of the network, the number of epochs for batch training is 300, the batch size is set to 16, the initial learning rate lr is 0.01, and the learning rate is adjusted using an adaptive strategy. The four images are randomly scaled, cropped, and cut using the Mosaic online data augmentation method, and then spliced in a random manner. Figure 6 As shown in the figure, the principle of the Mosaic data enhancement method is to randomly scale, crop and cut four pictures, and then splice them together in a random manner. Figure 7 Generate a graph for training combined with the YOLO algorithm; load the pre-trained weights weight.pt of the YOLOv8 network for the CCS-YOLO model; define the initial epoch as 0; perform training to update the network model parameters, and update best.pt, epoch = epoch + 1; when epoch = 300, save the last model weight last.pt and end the CCS-YOLO network model training.
[0095] Wherein, after the improved network model is trained, it needs to be verified, so after the step of training the improved network model with the target data set, the following step is further included:
[0096] The validation set, the improved network model and the original YOLOv8 network model are used to perform prediction comparison to obtain comparison results, and the comparison results are subjected to accuracy assessment; if the comparison results do not meet the accuracy assessment, the improved network model is continued to be trained; if the comparison results meet the accuracy assessment, the improved network model is saved as the target network model.
[0097] The specific steps of verifying the improved network model include:
[0098] A number of shipwreck images are selected from the verification set, and are annotated and visualized to obtain a target verification set; half of the shipwreck images in the target verification set are input into the YOLOv8 network model and the improved network model for prediction to obtain first verification data and second verification data, wherein the first verification data and the second verification data both include detection conditions of shipwreck images, category names of detected targets, confidence scores and target frame coordinate information; the first verification data and the second verification data are compared to obtain a comparison result; and the precision, recall rate, average precision mean, F1 score, number of floating-point operations and number of parameters are compared according to the first verification data and the second verification data respectively; the F1 score is the harmonic mean of the precision and the recall rate.
[0099] For example, two images that were missed using the original model were selected from the validation set, and they were annotated and visualized; the two images were input into the original YOLOv8 network and the CCS-YOLO network respectively; the optimal model was loaded to predict the images input into the network; the detection status of the side-scan sonar shipwreck image and the category name, confidence score and corresponding target frame coordinate information of the detected target were obtained and displayed on the image, and the detection was completed; the two iconic images were compared and analyzed. The analysis results are as follows: Figure 8 , Fig. 9 As shown, the results were analyzed and evaluated using the following accuracy evaluation indicators.
[0100] The evaluation indicators of target detection performance usually use precision (Precision), recall rate (Recall), mean average precision (meanAverage Precision, mAP), harmonic mean (F1-measure), floating point operation per second (FLOPs), and parameters (Parameters) as evaluation indicators.
[0101] In classification problems, the predictions of positive and negative samples in the network are usually divided into true positive (TP), false positive (FP), true negative (TN), and false negative (FN). TP: indicates examples that are correctly identified as positive in positive samples; FP: indicates examples that are incorrectly identified as positive in negative samples; TN: indicates examples that are correctly identified as negative in negative samples; FN: indicates examples that are incorrectly identified as negative in positive samples.
[0102] Precision represents the ratio of all correctly predicted positive examples to all positive examples identified, and the calculation formula is shown in formula (1).
[0103]
[0104] Recall represents the ratio of the number of positive examples representing correct predictions among all positive samples to all positive examples in the sample. The calculation formula is shown in formula (2).
[0105]
[0106] In actual tests, the precision rate and the recall rate do not increase synchronously. If one is high, the other will be low. For example, if the precision rate is high, the recall rate will be low. Therefore, these two evaluation indicators cannot clearly reflect the overall detection performance of the network. In order to balance the precision rate and the recall rate, the F1-measure can be used to comprehensively evaluate the precision rate and the recall rate, and better balance the accuracy evaluation indicators between the two. The formula of F1-measure is shown in formula (3).
[0107]
[0108] A (PR) curve can be drawn with Precision as the vertical axis and Recall as the horizontal axis. The PR curve can clearly show the overall situation of the precision and recall of the sample set detected by the network. The area under the PR curve is called the average precision (Average Precision). The calculation formula is shown in formula (4). The higher the AP value, the better the detection performance of the network.
[0109]
[0110] The mean of the AP values of each category in the case of multiple categories is called mAP, and the calculation formula is shown in formula (5). The target of this study is a single category of shipwrecks, so AP is equal to mAP.
[0111]
[0112] like Figure 8As shown in the figure, after comprehensive performance analysis using indicators such as precision, recall, mean average precision (mAP), F1 score, number of floating point operations (FLOPs) and number of parameters, the CCS-YOLO network shows significant advantages over the original YOLOv8 network. In terms of the number of parameters, the CCS-YOLO network achieved a reduction of about 29.2%, and in terms of the amount of calculation, FLOPs was reduced by about 24.7%, both of which were optimized to a more ideal level. In terms of accuracy, the CCS-YOLO network is 1.7 percentage points higher than YOLOv8, and the recall rate is increased by 6.8 percentage points, which effectively improves the problem of missed detection. In addition, mAP50 increased by 2.7 percentage points, and mAP50:95 also increased by 1.5 percentage points, indicating that the CCS-YOLO network has been significantly improved in detection accuracy and stability.
[0113] like Fig. 9 As shown in the figure, two iconic side-scan sonar shipwreck images in real scenes were selected from the validation set, namely the original Figure 1 Kahara Figure 2 ; Perform annotation visualization on these two images and generate annotations Figure 1 and annotation Figure 2 ; Using the unimproved YOLOv8 network to Figure 1 Kahara Figure 2 When testing, the comparison with the labeled image showed that there were problems of missed detection and low confidence. In contrast, when using the CCS-YOLO network for testing, the comparison with the labeled image showed that there was no missed detection and the confidence was improved.
[0114] S400, obtaining a real-time data set of side-scan sonar shipwreck detection, and using the target network model to perform target detection on the real-time data set. Specifically, after the target network model completes training and verification, the real-time data set of side-scan sonar shipwreck detection is input into the target network model for prediction.
[0115] This embodiment has the following advantages:
[0116] (1) The CCS-YOLO network constructed in this embodiment realizes a lightweight model, reduces the number of parameters, and saves a lot of computing costs;
[0117] (2) This embodiment uses the CGB module to improve the CBS module and enhance the feature extraction capability of the model;
[0118] (3) This embodiment uses the C2PC module to improve the C2f module of the Neck part of the feature fusion network, enhance the feature fusion capability of the model, reduce the number of model parameters and the amount of calculation, and perform lightweight processing on the network;
[0119] (4) This embodiment uses the SCDH lightweight detection head to improve the original detection head of the YOLOv8 network, further lightweight the network, and improve the detection accuracy;
[0120] (5) The proposed network model improves detection accuracy and speed while achieving lightweight, making it applicable to shipwreck detection in practical scenarios.
Claims
1. A side-scan sonar shipwreck image target detection method, characterized in that: The method comprises: Acquire a target data set for side scan sonar shipwreck detection, wherein the target data set includes a plurality of shipwreck images; An improved network model of CCS-YOLO is constructed, wherein the improved network model is constructed based on the YOLOv8 network model, wherein the conventional convolution modules of the first layer, the second layer, the fifth layer and the seventh layer of the backbone network in the improved network model are replaced by the improved convolution modules, the conventional re-parameter modules of the 12th layer, the 15th layer, the 18th layer and the 21st layer in the feature fusion network in the improved network model are replaced by the improved re-parameter modules, and the detection head in the detection head network in the improved network model is replaced by the SCDH detection head; the improved convolution module is used to enhance the feature representation capability, the improved re-parameter module is used to reduce the computational complexity and maintain the feature flow under the premise of ensuring the effective extraction of spatial features, and the SCDH detection head is used to reduce the amount of parameters and the amount of calculation; Using the target data set to train the improved network model to obtain a target network model; A real-time data set of side-scan sonar shipwreck detection is acquired, and target detection is performed on the real-time data set using the target network model.
2. The side scan sonar shipwreck image target detection method according to claim 1, characterized in that: The step of obtaining a target data set for side scan sonar shipwreck detection comprises: Acquire an initial dataset of side-scan sonar wreck detections; Using LabelImg to label the initial data set to obtain a first data set, wherein the labeling process includes marking the category, object name, and bounding box coordinates of each picture in the initial data set; Performing sample expansion processing on the first data set to obtain a second data set, wherein the sample expansion processing includes a random rotation operation, a noise addition operation, a brightness change operation, an image flip operation, a grayscale operation, and a random erasing operation; The second data set is divided according to a preset ratio to obtain the target data set, and the target data set includes a training set and a validation set after the division process.
3. The side scan sonar shipwreck image target detection method according to claim 1, characterized in that: The improved convolution module includes a conventional convolution layer, a dynamic convolution layer, a splicing layer, a normalization layer, an activation function layer, a fully connected layer and a global average pooling layer; The improved convolution module processes the feature map in the following steps: Perform conventional convolution processing with a convolution kernel of 1 on the feature map to obtain a first feature map; The first feature map is differentiated, and conventional convolution with a convolution kernel of 3 and dynamic convolution with a convolution kernel of 3 are respectively performed on the differentiated feature map, and the feature map after the conventional convolution and the dynamic convolution are spliced to obtain a second feature map; The second feature map is sequentially subjected to batch normalization processing, parameterized linear processing, global average pooling layer processing, and two fully connected layer processing to obtain a third feature map.
4. The side scan sonar shipwreck image target detection method according to claim 1, characterized in that: The improved re-parameter module includes a convolution layer, a cutting layer, several layers of partial convolution layers and a splicing layer; The step of improving the re-parameter module to process the feature map includes: Perform convolution on the data set to obtain the fourth feature map; Performing a cutting process on a portion of the fourth feature map, performing a plurality of partial convolution processes on the feature map after the cutting process, and performing a splicing process on the fourth feature map that has not been cut and the fourth feature map after the cutting process to obtain a fifth feature map; Perform convolution processing on the fifth feature map to obtain a sixth feature map.
5. The side scan sonar shipwreck image target detection method according to claim 1, characterized in that: The convolution planning layer in the SCDH detection head is replaced by an improved conventional convolution layer with group normalization function; The SCDH detection head detects the characteristic graph in the following steps: Performing an improved conventional convolution layer with a convolution kernel of 1 on each feature map respectively to obtain a seventh feature map; The seventh feature map is processed twice by an improved conventional convolution layer with a convolution kernel of 3 to obtain a plurality of position features corresponding to the shipwreck in the feature map and a type feature corresponding to each position feature; All the position features are scaled to obtain the target position features corresponding to the sunken ship in the feature map.
6. The side scan sonar shipwreck image target detection method according to claim 2, characterized in that: The step of using the target data set to train the improved network model comprises: Performing image preprocessing on the target data set to obtain a preprocessed data set; Setting an optimization function of the improved network model; The preprocessed data set is used to perform weight training on the improved network model, and the parameters in the improved network model are updated.
7. The side-scan sonar shipwreck image target detection method according to claim 6, characterized in that: The step of using the target data set to train the improved network model also includes: Modify the size of all shipwreck images in the training set to 640×640; The SGD function is set as the optimization function of the improved network model, and the batch training number of the SGD function is set to 300, the batch size is 16, and the initial learning rate is 0.01; The Mosaic online data enhancement method is used to randomly scale, crop, cut and randomly splice the resized shipwreck images to obtain the training generated atlas. The initial training quantity of the SGD function is set to 0, and the improved network model is weighted trained by using the training generated atlas. The weight training is stopped when the initial training quantity of the SGD function is 300, and the parameters in the improved network model are updated according to the weight training. During the weight training process, the parameters in the improved network model are updated by using the weights obtained from each batch training.
8. The side scan sonar shipwreck image target detection method according to claim 2, characterized in that: After the step of using the target data set to train the improved network model, the following step is further included: Using the validation set, the improved network model and the original YOLOv8 network model to perform prediction comparison, obtain comparison results, and perform accuracy assessment on the comparison results; If the comparison result does not meet the accuracy assessment, continue to train the improved network model; If the comparison result meets the accuracy assessment, the improved network model is saved as the target network model.
9. The side-scan sonar shipwreck image target detection method according to claim 8, characterized in that: After the step of using the target data set to train the improved network model, the following step is further included: Selecting a number of shipwreck images from the verification set, annotating and visualizing the images, and obtaining a target verification set; Inputting half of the shipwreck images in the target verification set into the YOLOv8 network model and the improved network model for prediction respectively, to obtain first verification data and second verification data, wherein the first verification data and the second verification data both include detection conditions of the shipwreck images, category names of the detection targets, confidence scores, and target frame coordinate information; The first verification data and the second verification data are compared to obtain a comparison result.
10. The side scan sonar shipwreck image target detection method according to claim 9, characterized in that: After the step of using the target data set to train the improved network model, the following step is further included: The precision, recall rate, average precision mean, F1 score, number of floating-point operations and number of parameters are compared based on the first verification data and the second verification data respectively; the F1 score is the harmonic mean of the precision and the recall rate.
Citation Information
Cited By
Shape-adaptive side-scan sonar image pipeline detection method
CN119784696A
Side-scan sonar target detection method and device
CN119888451A
A Side-Scan Sonar Target Detection Method and Device
CN119888451B
