Ocean scanning sonar image data expansion method, electronic device, and storage medium for neural network modeling

Through the ocean-scanning sonar image data expansion algorithm, image rotation, scaling and other processing are used, combined with heuristic functions and dynamic adjustment, the training needs of convolutional neural networks under small sample data sets are solved, and the ocean-scanning sonar image recognition is improved Accuracy and efficiency reduce data acquisition costs.

CN117095237BActive Publication Date: 2024-11-12OCEAN UNIV OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311177368.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2024-11-12
Estimated Expiration
2043-09-13

AI Technical Summary

Technical Problem

The existing marine scanning sonar image recognition technology relies on human eye observation, which has problems of subjectivity and low efficiency, and small sample data sets are difficult to meet the training needs of convolutional neural networks, resulting in insufficient recognition accuracy and efficiency.

Method used

A marine scanning sonar image data expansion algorithm is proposed. Through data expansion processing such as image rotation, scaling, flipping, and translation, combined with heuristic functions and dynamic adjustment, the training data volume of convolutional neural network model is optimized, and the recognition accuracy is improved. efficiency.

Benefits of technology

It effectively improves the accuracy and efficiency of sonar image recognition, reduces the cost of data acquisition, and provides new possibilities for the development of marine scanning sonar image recognition technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117095237B_ABST
    Figure CN117095237B_ABST
Patent Text Reader

Abstract

The present invention relates to a method, electronic device and storage medium for expanding ocean scanning sonar image data for neural network modeling. The method comprises: step S1, collecting sonar image data of ocean bottom and / or underwater targets by ocean scanning sonar equipment; step S2, preprocessing the acquired sonar image data; step S3, performing data expansion processing on the sonar image data to reach a set data volume, wherein the data expansion processing is configured to include at least one or a combination of image rotation and image scaling; step S4, training a convolutional neural network model using the expanded image data; step S5, performing accuracy verification on the trained convolutional neural network model. The present invention can effectively solve the problem of small amount of ocean scanning sonar image data, improve the accuracy and efficiency of sonar image recognition, and reduce the cost of data acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of marine geophysics and artificial intelligence technology, and in particular to an ocean scanning sonar image data expansion algorithm applied to convolutional neural network modeling. Background Art

[0002] In the existing ocean scanning sonar image recognition technology, the traditional recognition method mainly relies on the naked eye observation of professionals. This method has some significant shortcomings. First, due to the subjectivity of human eye observation, the recognition result may be affected by factors such as the observer's experience, cognitive ability and fatigue, resulting in the accuracy of the recognition result cannot be guaranteed. Second, the efficiency of human eye observation is low and cannot meet the needs of large-scale and high-frequency sonar image recognition.

[0003] To solve the above problems, artificial intelligence technology, especially convolutional neural network (CNN), has been introduced into sonar image recognition. Convolutional neural network is a deep learning algorithm that can automatically and accurately perform image recognition and processing by learning the characteristics of massive data. However, the acquisition cost of ocean scanning sonar images is high, and the data volume is relatively small compared to various data sets in daily life. Therefore, how to use the existing small sample data sets efficiently and with high quality, and how to mine more effective information from small sample data sets, has become a key issue in current research.

[0004] In this context, it is particularly important to propose a new scanning sonar small sample image expansion algorithm. This algorithm should be able to extract effective information from existing images for training to the greatest extent possible with a small amount of data, so as to meet the needs of large-scale training data for convolutional neural networks. This can not only improve the accuracy and efficiency of sonar image recognition, but also reduce the cost of data acquisition, providing new possibilities for the development of ocean scanning sonar image recognition technology. Summary of the invention

[0005] In order to solve or partially solve the deficiencies of the prior art, the present invention provides an editing method for an airport emergency response plan, an electronic device, and a computer-readable storage medium.

[0006] To achieve the above object, the technical solution of the present invention is:

[0007] According to one aspect of the present invention, a method for expanding ocean scanning sonar image data for neural network modeling is provided, comprising:

[0008] Step S1, collecting sonar image data of ocean bottom and / or underwater targets by ocean scanning sonar equipment;

[0009] Step S2, preprocessing the acquired sonar image data;

[0010] Step S3, performing data expansion processing on the sonar image data to reach a set data volume, wherein the data expansion processing is configured to include at least one or more combinations of image rotation and image scaling;

[0011] Step S4: training the convolutional neural network model using the expanded image data;

[0012] Step S5: perform accuracy test on the trained convolutional neural network model.

[0013] As an improved solution, step S5 further includes:

[0014] According to the accuracy test result of the convolutional neural network model, the expansion amount of the sonar image data is adjusted to change the setting of the data amount.

[0015] As a preferred embodiment of the improved solution, step S5 further comprises:

[0016] Use the heuristic function F(n,A)=w1×log(n)+w2×A to evaluate the relationship between the current data volume n and the model accuracy A, where n is the current data volume; A is the accuracy of the model on the validation set; w1 and w2 are weight parameters;

[0017] Set the initial data volume to n, the model accuracy to A, and calculate F(n,A);

[0018] Try to expand to different data amounts and calculate the corresponding F(n,A) values;

[0019] Find the data volume n′ with the highest F(n,A) value as the new data volume. If n′ is equal to the original data volume n, the algorithm terminates.

[0020] As a preferred embodiment of the improved solution, step S5 further comprises:

[0021] The expansion amount is configured to be adjusted by adjusting the angle range of image rotation and / or the ratio range of image scaling.

[0022] As a preferred embodiment of the improved solution, the implementation of the image rotation in step S3 further includes:

[0023] Assuming that the coordinates of a pixel in the original image are (x, y) and the rotation angle is θ, the rotated coordinates (x', y') are obtained by the following formula:

[0024] x'=x*cos(θ)-y*sin(θ)

[0025] y'=x*sin(θ)+y*cos(θ).

[0026] As a preferred embodiment of the improved solution, the implementation method of adjusting the angle range of image rotation in step S5 further includes:

[0027] Based on the accuracy of the model on the validation set, Δθ is dynamically adjusted. The adjustment formula is:

[0028] Δθnew=Δθold×(1+α×(Anew-Aold))

[0029] Among them, α is an adjustable parameter, Anew and Aold are the accuracies of the new and old models respectively.

[0030] As a preferred embodiment of the improved solution, the implementation method of the image scaling in step S3 further includes:

[0031] Assuming that the coordinates of a pixel in the original image are (x, y) and the scaling factor is s, the scaled coordinates (x', y') can be obtained by the following formula:

[0032] x'=s*x

[0033] y'=s*y.

[0034] As a preferred embodiment of the improved solution, the implementation method of adjusting the angle range of image rotation in step S5 further includes:

[0035] Based on the accuracy of the model on the validation set, Δs is dynamically adjusted. The adjustment formula is:

[0036] Δsnew=Δsold×(1+β×(Anew-Aold))

[0037] Among them, β is an adjustable parameter, Anew and Aold are the accuracies of the new and old models respectively.

[0038] As another improvement, the data expansion processing in step S3 further includes image flipping, image translation or random contrast change.

[0039] As another improvement scheme, preprocessing includes image cleaning, image annotation, and image segmentation. Image cleaning is to remove noise and irrelevant information from the image; image annotation is to add relevant label information to the image data to facilitate subsequent model training; image segmentation is to divide the image into different areas or objects based on the characteristics and content of the image. The segmentation method is to manually select the image of the target object.

[0040] According to another aspect of the present invention, an electronic device is provided, wherein the electronic device comprises:

[0041] processor; and,

[0042] A memory arranged to store computer executable instructions which, when executed, cause a processor to perform the method described.

[0043] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by a processor, the method described above is implemented.

[0044] The algorithm of the present invention can effectively solve the problem of small amount of ocean scanning sonar image data, improve the accuracy and efficiency of sonar image recognition, reduce the cost of data acquisition, and promote the development of ocean scanning sonar image recognition technology.

[0045] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] By reading the detailed description of the preferred embodiment below, various other advantages and benefits will become clear to those of ordinary skill in the art. The accompanying drawings are only used for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same platform parts.

[0047] In the attached picture:

[0048] Figure 1 The scanning sonar image data expansion and automatic recognition process of the present invention is shown;

[0049] Figure 2 The results of data prediction are shown;

[0050] Figure 3 It is a schematic diagram of the structure of the electronic device of the present invention;

[0051] Figure 4 It is a schematic diagram of the structure of the computer-readable storage medium of the present invention. DETAILED DESCRIPTION

[0052] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0053] This embodiment is implemented based on an electronic device, such as a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, Figure 1 As shown, the following ocean scanning sonar image data expansion algorithm applied to convolutional neural network modeling is implemented, including steps S1-S5, wherein:

[0054] Step S1, collect sonar image data of ocean bottom and / or underwater targets through ocean scanning sonar equipment. According to actual needs and experimental purposes, the parameter settings of the sonar equipment can be adjusted to obtain image data of different types and characteristics. The collected data should be as rich as possible, including not only various objects and images with obvious characteristics, but also related objects and images with unclear characteristics and usually not used, so as to increase the richness of the image data.

[0055] Step S2: pre-processing the acquired sonar image data.

[0056] Preprocessing mainly includes steps such as image cleaning, image annotation, and image segmentation. Image cleaning is to remove noise and irrelevant information from the image; image annotation is to add relevant label information to the image data to facilitate subsequent model training; image segmentation is to divide the image into different areas or objects based on the characteristics and content of the image. The segmentation method is to manually select the image of the target object.

[0057] Step S3: performing data expansion processing on the sonar image data to reach a set data volume, wherein the data expansion processing is configured to include at least one or a combination of image rotation and image scaling.

[0058] As an example, the data expansion process in the present invention may include image rotation and image scaling. At the same time, it will limit the number of pictures finally generated. If the number exceeds the set number, the redundant pictures will be randomly deleted. Finally, it will copy the original picture to the expanded folder. The specific steps are:

[0059] A. Specify the original image folder and the expanded folder path, as well as the number of times each image is expanded and the number of images that are ultimately retained.

[0060] B. If the expanded folder does not exist, create it.

[0061] C. Get the file names of all the images in the original folder and calculate the maximum number of generated images. If the set number of retained images exceeds the maximum number of generated images, the retained number is set to the maximum number of generated images.

[0062] D. Traverse each image in the original folder and expand each image a specified number of times, including:

[0063] - Random image rotation;

[0064] - Random image scaling.

[0065] The following is the mathematical expression of the expansion operation:

[0066] 1) Image rotation:

[0067] Assuming that the coordinates of a pixel in the original image are (x, y) and the rotation angle is θ, the rotated coordinates (x', y') can be obtained by the following formula:

[0068] x'=x*cos(θ)-y*sin(θ)

[0069] y'=x*sin(θ)+y*cos(θ)

[0070] 2) Image scaling:

[0071] Assuming that the coordinates of a pixel in the original image are (x, y) and the scaling factor is s, the scaled coordinates (x', y') can be obtained by the following formula:

[0072] x'=s*x

[0073] y'=s*y

[0074] The expanded image is saved in the expanded folder, and the file name includes the original file name, expansion number, rotation angle and flipping method.

[0075] E. Count and display the number of generated images. If the number of generated images exceeds the set retention number, the excess images will be randomly deleted.

[0076] F. Copy all the pictures in the original folder to the expanded folder.

[0077] G. Output the number of original images, the target expansion number, the expansion multiple, the number of images after expansion, the number of deleted images, and the final number of remaining images.

[0078] Furthermore, in order to further enhance the richness of the expansion and the diversity of the expanded image, the data expansion process further includes:

[0079] - Randomly flip up and down;

[0080] - Randomly flip left and right;

[0081] - Random translation;

[0082] - Random contrast changes.

[0083] The following is the mathematical expression of the expansion operation:

[0084] 1) Image translation:

[0085] Assuming that the coordinates of a pixel in the original image are (x, y), and the horizontal and vertical translations are tx and ty respectively, the coordinates after translation (x', y') can be obtained by the following formula:

[0086] x'=x+tx

[0087] y'=y+ty

[0088] 2) Image flip:

[0089] For horizontal flipping, if the width of the image is w, then the coordinates of a pixel point change from (x, y) to (wx, y);

[0090] For vertical flipping, if the height of the image is h, the coordinates of a pixel change from (x, y) to (x, hy).

[0091] Step S4: Use the expanded image data to train the convolutional neural network model. During the training process, the model will automatically learn and extract feature information of the image to optimize its ability to recognize and process images.

[0092] Step S5: perform an accuracy test on the trained convolutional neural network model to evaluate its performance and accuracy in ocean scanning sonar image recognition.

[0093] The test methods may include but are not limited to accuracy, precision, recall, F1 value, etc. When the problem is binary classification, all evaluation indicators can be used; when there are multiple prediction targets, accuracy is the main factor. The following are the mathematical expressions of these indicators:

[0094] The calculation formula for accuracy is:

[0095] Accuracy=(TP+TN) / (TP+TN+FP+FN)

[0096] Among them, TP represents true positive examples, TN represents true negative examples, FP represents false positive examples, and FN represents false negative examples.

[0097] Precision: Also known as the precision rate, it refers to the proportion of samples predicted to be positive that are actually positive. The calculation formula is:

[0098] Precision=TP / (TP+FP)

[0099] Recall: Also known as recall rate, it refers to the proportion of samples that are predicted to be positive among samples that are actually positive. The calculation formula is:

[0100] Recall=TP / (TP+FN)

[0101] F1 value: It is the harmonic mean of precision and recall, which can comprehensively reflect the performance of the model. The higher the F1 value, the better the performance of the model. The calculation formula is:

[0102] F1=2*Precision*Recall / (Precision+Recall)

[0103] Through the above steps, the algorithm of the present invention can effectively solve the problem of small amount of ocean scanning sonar image data, improve the accuracy and efficiency of sonar image recognition, reduce the cost of data acquisition, and promote the development of ocean scanning sonar image recognition technology.

[0104] As an improved solution, step S5 further includes adjusting the expansion amount of the sonar image data and thus changing the setting of the data amount according to the accuracy test result of the convolutional neural network model. By adjusting the expansion amount of the image data in a timely manner, the performance of the model can be further optimized.

[0105] The implementation method may be configured to further include:

[0106] Use the heuristic function F(n,A)=w1×log(n)+w2×A to evaluate the relationship between the current data volume n and the model accuracy A, where n is the current data volume; A is the accuracy of the model on the validation set; w1 and w2 are weight parameters;

[0107] Set the initial data volume to n, the model accuracy to A, and calculate F(n,A);

[0108] Try to expand to different data amounts and calculate the corresponding F(n,A) values;

[0109] Find the data volume n′ with the highest F(n,A) value as the new data volume. If n′ is equal to the original data volume n, the algorithm terminates.

[0110] In the above, w1 and w2 can be further configured to be optimized through cross-validation to achieve enhancement.

[0111] As a preferred implementation method of the improved scheme, in the present invention, the expansion amount is configured to be adjusted by adjusting the angle range of image rotation and / or the ratio range of image scaling. Through the expansion strategy based on the above-mentioned heuristic function, combined with dynamic adjustment of the image rotation angle, scaling ratio, etc., this design strategy enables the model to automatically adjust the data expansion amount and parameters according to real-time accuracy, thereby achieving high standards of accurate performance.

[0112] Specifically, the adjustment of the image rotation angle range and / or the image scaling ratio range may be configured as the following adaptive parameter adjustment steps:

[0113] 1. Let Δθ and Δs represent the allowable range of image rotation and scaling, respectively.

[0114] 2. Dynamically adjust Δθ and Δs based on the accuracy of the model on the validation set.

[0115] The adjustment formula is:

[0116] Δθnew=Δθold×(1+α×(Anew-Aold))

[0117] Δsnew=Δsold×(1+β×(Anew-Aold))

[0118] in,

[0119] α and β are adjustable parameters

[0120] Anew and Aold are the accuracies of the new and old models respectively.

[0121] Through the above-mentioned adaptive parameter adjustment steps, after each training cycle, the algorithm further optimizes the model accuracy by dynamically adjusting the data augmentation parameters (such as image rotation angle, scaling ratio, etc.).

[0122] To facilitate understanding of the technology of the present invention, exemplary embodiments are given below to assist understanding.

[0123] Embodiment: Recognition of side-scan sonar images of marine engineering structures in the waters of Chengdao Island at the mouth of the Yellow River.

[0124] 1. Data acquisition:

[0125] Data was collected from data from previous geophysical survey projects, and all objects that were not flat on the seabed were circled and saved in screenshots, retaining as many images of various clarity and resolution as possible.

[0126] 2. Data Preprocessing

[0127] Relying on manual methods, the images are classified. In this embodiment, four categories of submarine cables, oil platforms, residual protrusions and seabeds are obtained, with a total of 627 images. At the same time, the images need to be normalized to enhance the stability of model training. Finally, the 627 images are divided into data sets. Among them, the training set accounts for 10% and the test set accounts for 90%. That is, we need to use a small amount of data to predict a large amount of data, which is obviously different from the existing data set division method. The existing division method is to use a large amount of data training to predict a small amount of data, that is, to divide it according to 80%:20% or 70%:30%, which is definitely not the 10%:90% used in this embodiment.

[0128] 3. Data expansion

[0129] In order to verify the effect of data expansion on the prediction accuracy of the model, 10% of the 61 data need to be expanded step by step. Using the algorithm in step 3 above, a small number of images can be expanded to a specified number. Therefore, the training sets are: 61, 100, 200, 500, 1000, 2000, 1500, 2000 pictures, and the corresponding experiments are named B1 to B7 (Table 1).

[0130] Table 1. Training set and data set quantity settings

[0131] test Training set Test Set B1 61 566 B2 100 566 B3 200 566 B4 500 566 B5 1000 566 B6 2000 566 B7 2500 566

[0132] 4. Model Training

[0133] The 7 sets of training data provided in Table 1 were used for model training to establish a CNN model with the same structure. The same test set was used to test the accuracy of the model results.

[0134] 5. Accuracy test

[0135] The prediction results of 7 sets of data are as follows Figure 2 As shown, 40 repetitive tests were conducted on each set of training data. The results show that as the amount of expanded data increases, the model accuracy increases rapidly, but it is difficult to continue to increase after a certain amount. This shows that the image expansion algorithm proposed in the present invention has a significant improvement on the model prediction results. In this embodiment, after image data expansion, the accuracy can be increased from about 83% to more than 90%. Therefore, in the case of limited original images, the algorithm proposed in the present invention is effective and feasible, and can improve the accuracy of the model.

[0136] It should be noted that:

[0137] The method used in this embodiment can be converted into program steps and devices that can be stored in a computer storage medium, and implemented by being called and executed by a controller, wherein the device should be understood as a functional module implemented by a computer program.

[0138] The algorithm and display provided herein are not inherently related to any particular computer, virtual device or other equipment. Various general-purpose devices can also be used together with the teachings based on this. According to the above description, it is obvious to construct the structure required for this type of device. In addition, the present invention is not directed to any specific programming language either. It should be understood that various programming languages ​​can be utilized to realize the content of the present invention described herein, and the description of the above specific language is for the purpose of disclosing the best mode of the present invention.

[0139] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.

[0140] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.

[0141] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition they may be divided into a plurality of submodules or subunits or subcomponents. Except that at least some of such features and / or processes or units are mutually exclusive, all features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed in this manner may be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0142] In addition, those skilled in the art will appreciate that, although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features of different embodiments is meant to be within the scope of the present invention and form different embodiments. For example, in the claims below, any one of the claimed embodiments may be used in any combination.

[0143] The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program implementing the present invention can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0144] For example, Figure 3 A schematic diagram of the structure of an electronic device according to an embodiment of the present invention is shown. The electronic device conventionally includes a processor 31 and a memory 32 arranged to store computer executable instructions (program code). The memory 32 can be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk or a ROM. The memory 32 has a storage space 33 for storing a program code 34 for executing any method steps in the embodiment. For example, the storage space 33 for program code may include individual program codes 34 respectively used to implement various steps in the above method. These program codes can be read from or written to one or more computer program products. These computer program products include program code carriers such as a hard disk, a compact disk (CD), a memory card or a floppy disk. Such a computer program product is typically, for example Figure 4 The computer-readable storage medium may have Figure 3 The memory 32 in the electronic device of the present invention is similarly arranged as a storage segment, storage space, etc. The program code can be compressed, for example, in an appropriate form. Generally, the storage unit stores program code 41 for executing the steps of the method according to the present invention, that is, program code that can be read by a processor such as 31, and when these program codes are run by the electronic device, the electronic device performs the various steps in the method described above.

[0145] It should be noted that the embodiments are illustrative rather than limiting of the invention, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation of the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "one" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present invention may be implemented by means of hardware comprising a number of different elements and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.

Claims

1. A method for expanding ocean scanning sonar image data for neural network modeling, characterized in that: include: Step S1, collecting sonar image data of ocean bottom and / or underwater targets by ocean scanning sonar equipment; Step S2, preprocessing the acquired sonar image data; Step S3, performing data expansion processing on the sonar image data to reach a set data volume, wherein the data expansion processing is configured to include at least one or more combinations of image rotation and image scaling; Step S4: training the convolutional neural network model using the expanded image data; Step S5, performing an accuracy test on the trained convolutional neural network model, and adjusting the expansion amount of the sonar image data and thus changing the setting of the data amount according to the accuracy test result of the convolutional neural network model; The step S5 further includes: using a heuristic function F(n,A)=w1×log(n)+w2×A to evaluate the relationship between the current data volume n and the model accuracy A, wherein n is the current data volume; A is the accuracy of the model on the validation set; w1 and w2 are weight parameters; setting the initial data volume to n, the model accuracy to A, and calculating F(n,A); trying to expand to different data volumes, and calculating the corresponding F(n,A) values; finding the data volume n′ with the highest F(n,A) value as the new data volume, and if n′ is equal to the original data volume n, the algorithm terminates; The step S5 further includes: the expansion amount is configured to be adjusted by adjusting the angle range of image rotation and / or the ratio range of image scaling; The implementation of the image rotation in step S3 further includes: Assuming that the coordinates of a pixel in the original image are (x, y) and the rotation angle is θ, the rotated coordinates (x', y') are obtained by the following formula: x'=x*cos(θ)-y*sin(θ) y'=x*sin(θ)+y*cos(θ) The implementation method of adjusting the angle range of image rotation in step S5 further includes: Based on the accuracy of the model on the validation set, Δθ is dynamically adjusted. Δθ represents the allowable range of image rotation. The adjustment formula is: Δθnew=Δθold×(1+α×(Anew-Aold)) Among them, α is an adjustable parameter, Anew and Aold are the accuracy of the new and old models respectively; The implementation of the image scaling in step S3 further includes: Assuming that the coordinates of a pixel in the original image are (x, y) and the scaling factor is s, the scaled coordinates (x', y') can be obtained by the following formula: x'=s*x y'=s*y The implementation method of adjusting the image scaling range in step S5 further includes: Based on the accuracy of the model on the validation set, Δs is dynamically adjusted. Δs represents the allowable range of image scaling. The adjustment formula is: Δsnew=Δsold×(1+β×(Anew-Aold)) Among them, β is an adjustable parameter, Anew and Aold are the accuracies of the new and old models respectively.

2. An electronic device, wherein: The electronic device includes: processor; and, A memory arranged to store computer executable instructions, which, when executed, cause the processor to perform the ocean scanning sonar image data augmentation method according to claim 1.

3. A storage medium, wherein: The storage medium stores one or more programs, and when the one or more programs are executed by the processor, the method for expanding ocean scanning sonar image data according to claim 1 is implemented.