An underwater target detection and identification method and device, an electronic device, and a storage medium

By combining a ring dynamic optimization algorithm and a generative adversarial network optimized by Riemannian manifold with a regional convolutional neural network, the problem of insufficient target detection accuracy and generalization ability in underwater environments is solved, and efficient and accurate target recognition and counting are achieved.

CN120236190BActive Publication Date: 2026-04-21GUANGZHOU MARINE GEOLOGICAL SURVEY
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU MARINE GEOLOGICAL SURVEY
Filing Date
2025-03-31
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing technologies for target detection and image processing in underwater environments face challenges such as data scarcity, weak model generalization ability, and low target detection accuracy, especially in complex and dense scenes where it is difficult to accurately identify and count targets.

Method used

We employ a ring dynamic optimization algorithm and a generative adversarial network optimized by Riemannian manifolds to extract features and detect targets from underwater image data. We train the network using a regional convolutional neural network and augment the data using a generative adversarial network. We then optimize the feature extraction and target detection process using a deep learning architecture.

Benefits of technology

It achieves efficient and accurate target detection and recognition in complex and dense underwater environments, improving the model's performance and detection accuracy, especially in the recognition of small targets and occluded targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120236190B_ABST
    Figure CN120236190B_ABST
Patent Text Reader

Abstract

This invention discloses an underwater target detection and identification method, device, electronic device, and storage medium. The method includes: acquiring underwater image data; optimizing the parameters of a preset neural network model using a ring dynamic optimization algorithm based on the underwater image data to obtain a feature extraction model; training a preset regional convolutional neural network for target detection based on the feature image data output by the feature extraction model and annotation information to obtain a target detection model; and using the feature extraction model and the target detection model to perform target detection and identification on the underwater image to be identified, obtaining the target detection result. This invention achieves efficient and accurate target detection by precisely controlling the feature extraction and target detection processes. Especially in complex and dense underwater environments, it effectively improves the performance of the target detection model, achieving more accurate and efficient underwater target identification, and can be widely applied in the field of data processing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to an underwater target detection and identification method, device, electronic device, and storage medium. Background Technology

[0002] With advancements in underwater exploration technology, a wealth of high-quality underwater image data has been used in fields such as marine biological research, underwater archaeology, and environmental monitoring. However, due to the unique characteristics of the underwater environment, such as unstable lighting conditions, numerous visual disturbances, and complex scenes, accurately identifying and counting targets from these images remains a significant challenge. Existing target detection and image processing methods face problems such as data scarcity, weak model generalization ability, and low target detection accuracy in dense underwater environments. Summary of the Invention

[0003] This invention aims to at least partially address the limitations of related technologies. To this end, this invention proposes an underwater target detection and identification method, apparatus, electronic device, and storage medium, capable of efficiently and accurately detecting and identifying underwater targets.

[0004] On one hand, embodiments of the present invention provide an underwater target detection and identification method, comprising the following steps:

[0005] Acquire underwater image data; the underwater image data includes annotation information for targets in the underwater environment;

[0006] Based on underwater image data, a feature extraction model is obtained by optimizing the parameters of a pre-set neural network model using a ring dynamic optimization algorithm; wherein, the feature extraction model is based on the processing results of the underwater image data as feature image data;

[0007] Based on feature image data and annotation information, a pre-defined region convolutional neural network is trained for target detection to obtain a target detection model.

[0008] By using feature extraction and target detection models, target detection and identification are performed on the underwater image to be identified, and the target detection results are obtained.

[0009] Optionally, the method further includes the following steps:

[0010] Generative adversarial networks based on Riemannian manifold optimization are used to augment underwater image data.

[0011] Optionally, the generative adversarial network includes a generator and a discriminator; the method further includes the following steps:

[0012] Initialize the first parameter of the generator and the second parameter of the discriminator;

[0013] Environmental parameters are determined based on the annotation information, and the environmental parameters are encoded to obtain an encoding vector. The environmental parameters include the number of targets in the underwater environment, underwater depth, and average size.

[0014] The encoded vector is combined with the random noise vector of the underwater image data and used as the input data for the generator.

[0015] Based on the first parameter, the generator processes the input data to obtain the generated image; the generator loss is then constructed based on the generated image.

[0016] Based on the second parameter, the underwater image data and its corresponding generated image are evaluated by the discriminator, and the discriminator loss is constructed based on the evaluation results.

[0017] Construct a curvature regularization loss based on the generated image;

[0018] Based on generator loss, curvature regularization loss, and discriminator loss, backpropagation and gradient descent are used to update the first and second parameters; the gradient applied by the gradient descent method is obtained through the chain rule.

[0019] Return to the step of determining environmental parameters based on the annotation information and repeat the iteration until the first stopping iteration condition is met.

[0020] Optionally, the parameter optimization process includes the growth phase, synthesis phase, evaluation phase, pre-division phase, division phase, and dormancy phase; the feature extraction model is obtained by optimizing the parameters of the preset neural network model using a ring dynamic optimization algorithm, including the following steps:

[0021] A convolutional neural network is used to initialize the neural network model; the neural network model includes multiple convolutional layers, pooling layers, fully connected layers, and deconvolutional layers.

[0022] The model parameters of the neural network model are initialized based on random values ​​from a pre-defined normal distribution; the model parameters include weights and biases.

[0023] During the growth period, the accelerated gradient descent algorithm is used to update the model parameters;

[0024] During the synthesis phase, multiple weights are synthesized using a synthesis function based on preset importance coefficients.

[0025] During the evaluation period, the evaluation results of the model parameters are obtained based on the preset performance evaluation function; if the evaluation results do not meet the preset performance threshold, the process returns to the growth phase step; otherwise, the process proceeds to the pre-division phase step.

[0026] In the early stage of splitting, a pre-defined perturbation method is used to obtain the adjustment increments of weights and biases in order to fine-tune the model parameters;

[0027] During the splitting phase, weight pruning is used to constrain the weights;

[0028] During the dormancy period, the learning rate is adjusted by decreasing based on a preset decay coefficient;

[0029] Return to the steps of the growth phase and repeat the iteration until the second stopping condition is met.

[0030] Optionally, the region convolutional neural network includes a feature extraction sub-processor, a region proposal network, and a classification and regression network; based on feature image data and annotation information, the pre-defined region convolutional neural network is trained for object detection to obtain an object detection model, including the following steps:

[0031] The feature map is obtained by adjusting the image features of the feature image data through a secondary feature extractor.

[0032] The loss function for a secondary feature extractor is constructed based on the feature map and its true class at the corresponding sample in the feature image data; the true class is obtained from the annotation information.

[0033] The region proposal network extracts candidate regions on the feature map through a sliding window, and the anchor box mechanism is used to obtain the first predicted bounding box.

[0034] The first classification loss is constructed based on the predicted probability of the candidate region and the ground truth label; the first regression loss is constructed based on the first predicted bounding box and the ground truth bounding box; the ground truth label and ground truth bounding box are obtained from the annotation information;

[0035] The region proposal network loss is constructed based on the first classification loss and the first regression loss;

[0036] An adaptive hierarchical fusion strategy is used to fuse the feature maps of candidate regions to obtain fused features.

[0037] The fused features are input into the classification and regression network to obtain the prediction output; the prediction output includes the category prediction probability and the second prediction bounding box for each candidate region;

[0038] A second classification loss is constructed based on the predicted probability of the category corresponding to each candidate region and the true category; a second regression loss is constructed based on the second predicted bounding box and the true bounding box.

[0039] The classification and regression network loss is constructed based on the second classification loss and the second regression loss;

[0040] Based on the feature secondary extractor loss, region proposal network loss, and classification and regression network loss, the network weights of the feature secondary extractor, region proposal network, and classification and regression networks are optimized and adjusted accordingly.

[0041] The process of adjusting the image features of the feature image data using the secondary feature extractor is repeated iteratively until the third stopping condition is met.

[0042] Optionally, the region convolutional neural network includes a feature extraction quadratic extractor, a region proposal network, and a classification and regression network; using the feature extraction model and the target detection model, target detection and recognition are performed on the underwater image to be identified, and the target detection result is obtained, including the following steps:

[0043] The underwater image to be identified is processed by a feature extraction model to extract features, resulting in a feature image.

[0044] Based on the feature image, a feature map is generated using a secondary feature extractor.

[0045] The feature maps are analyzed and processed using a region proposal network to generate candidate target regions;

[0046] Adaptive hierarchical fusion is performed on candidate target regions, and then target category identification is performed using classification and regression networks to obtain target detection results.

[0047] Optionally, the target detection result includes the identified categories of multiple targets in the underwater image to be identified; the method further includes the following steps:

[0048] Based on the identification category of each detected target, the number of targets in each identification category is summed up.

[0049] On the other hand, embodiments of the present invention provide an underwater target detection and identification device, comprising:

[0050] The first module is used to acquire underwater image data; the underwater image data contains annotation information for targets in the underwater environment;

[0051] The second module is used to optimize the parameters of a preset neural network model based on underwater image data using a ring dynamic optimization algorithm to obtain a feature extraction model; wherein, the feature extraction model is based on the processing results of the underwater image data as feature image data;

[0052] The third module is used to train a pre-defined regional convolutional neural network for target detection based on feature image data and annotation information, thereby obtaining a target detection model.

[0053] The fourth module is used to perform target detection and recognition on the underwater image to be identified using the feature extraction model and the target detection model, and obtain the target detection result.

[0054] Optionally, the device further includes:

[0055] The fifth module is used to augment underwater image data using a generative adversarial network based on Riemannian manifold optimization.

[0056] Optionally, the generative adversarial network includes a generator and a discriminator; the apparatus also includes a sixth module, which is specifically used to perform the following operations:

[0057] Initialize the first parameter of the generator and the second parameter of the discriminator;

[0058] Environmental parameters are determined based on the annotation information, and the environmental parameters are encoded to obtain an encoding vector. The environmental parameters include the number of targets in the underwater environment, underwater depth, and average size.

[0059] The encoded vector is combined with the random noise vector of the underwater image data and used as the input data for the generator.

[0060] Based on the first parameter, the generator processes the input data to obtain the generated image; the generator loss is then constructed based on the generated image.

[0061] Based on the second parameter, the underwater image data and its corresponding generated image are evaluated by the discriminator, and the discriminator loss is constructed based on the evaluation results.

[0062] Construct a curvature regularization loss based on the generated image;

[0063] Based on generator loss, curvature regularization loss, and discriminator loss, backpropagation and gradient descent are used to update the first and second parameters; the gradient applied by the gradient descent method is obtained through the chain rule.

[0064] Return to the step of determining environmental parameters based on the annotation information and repeat the iteration until the first stopping iteration condition is met.

[0065] Optionally, the target detection result includes the identification categories of multiple detected targets in the underwater image to be identified; the device also includes:

[0066] The seventh module is used to summarize the number of targets in each detection category based on the identification category of each detected target.

[0067] On the other hand, embodiments of the present invention provide an electronic device, including: a processor and a memory; the memory is used to store a program; the processor executes the program to implement the above-described underwater target detection and identification method.

[0068] On the other hand, embodiments of the present invention provide a computer storage medium storing a processor-executable program, which, when executed by a processor, is used to implement the above-described underwater target detection and identification method.

[0069] This invention acquires underwater image data containing annotations for targets in the underwater environment. Based on the underwater image data, a feature extraction model is obtained by optimizing the parameters of a preset neural network model using a circular dynamic optimization algorithm. The feature extraction model generates feature image data based on the processing results of the underwater image data. Using the feature image data and annotations, a preset regional convolutional neural network is trained for target detection, resulting in a target detection model. The feature extraction model and the target detection model are then used to detect and identify targets in the underwater image to be identified, yielding the target detection result. This invention, by introducing an advanced deep learning architecture and optimization algorithms to precisely control the feature extraction and target detection processes, achieves efficient and accurate target detection. Especially in complex and dense underwater environments, it effectively improves the performance of the target detection model, achieving more accurate and efficient underwater target recognition. Attached Figure Description

[0070] The accompanying drawings are provided to further understand the technical solutions of the present invention and constitute a part of the specification. They are used together with the embodiments of the present invention to explain the technical solutions of the present invention, and do not constitute a limitation on the technical solutions of the present invention.

[0071] Figure 1 This is a schematic diagram of an implementation environment for underwater target detection and identification provided in an embodiment of the present invention;

[0072] Figure 2 This is a flowchart illustrating an underwater target detection and identification method provided in an embodiment of the present invention;

[0073] Figure 3 This is a schematic diagram of an extended process of the underwater target detection and identification method provided in an embodiment of the present invention;

[0074] Figure 4 A schematic diagram illustrating the unfolding process of the feature extraction model provided in an embodiment of the present invention;

[0075] Figure 5 This is a schematic diagram illustrating the unfolded process of step S300 provided in an embodiment of the present invention;

[0076] Figure 6 A schematic diagram illustrating the unfolded process of step S400 provided in an embodiment of the present invention;

[0077] Figure 7 This is a schematic diagram of the overall process of the underwater target detection and identification method provided in the embodiments of the present invention;

[0078] Figure 8 This is a schematic diagram of the training process of a neural network algorithm based on ring dynamic optimization provided in an embodiment of the present invention;

[0079] Figure 9 This is a schematic diagram of the structure of an underwater target detection and identification device provided in an embodiment of the present invention;

[0080] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0081] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0082] It should be noted that although functional modules are divided in the system diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first / S100," "second / S200," etc., in the specification, claims, and the aforementioned figures are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0083] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0084] To facilitate understanding of the technical solution of this invention, the proprietary technical features that may be applied in this invention will first be explained:

[0085] Machine learning, a subfield of artificial intelligence (AI), empowers computer systems to learn from experience and improve their performance without explicit programming. This means machine learning models can automatically identify patterns and regularities in data and use this knowledge to make decisions or predictions. Below is some technical information related to machine learning in connection with this invention:

[0086] Data-driven: Machine learning relies on large amounts of data to train models. The data can be labeled (supervised learning), unlabeled (unsupervised learning), or obtained through interaction with the environment (reinforcement learning).

[0087] Model: In machine learning, a model is a mathematical representation of a real-world problem that learns from data. Common models include decision trees, neural networks, and support vector machines.

[0088] Learning algorithms: Learning algorithms define how a model is tuned or "learned". The algorithm runs on data and optimizes based on the model's performance, for example, by minimizing the difference between predictions and actual results.

[0089] Evaluation: The performance of a model needs to be measured through some form of evaluation. This typically involves splitting the data into a training set and a test set, where the training set is used for learning and the test set is used to evaluate the model's ability to generalize to unseen data.

[0090] Overfitting and underfitting: Overfitting refers to a model that performs well on training data but cannot generalize to new data. Underfitting refers to a model that has not learned enough features from the data and cannot make effective predictions.

[0091] It is understood that the underwater target detection and identification method provided in this embodiment of the invention can be applied to any computer device with data processing and computing capabilities, and this computer device can be various types of terminals or servers. When the computer device in the embodiment is a server, the server is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Optionally, the terminal can be a smartphone, tablet computer, laptop computer, or desktop computer, but it is not limited to these.

[0092] like Figure 1 The diagram shown is a schematic representation of an implementation environment provided by an embodiment of the present invention. (Refer to...) Figure 1 The implementation environment includes at least one terminal 102 and a server 101. The terminal 102 and the server 101 can be connected via a network, either wirelessly or via a wired connection, to complete data transmission and exchange.

[0093] Server 101 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0094] Additionally, server 101 can also be a node server in a blockchain network. Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and encryption algorithms.

[0095] Terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. Terminal 102 and server 101 can be directly or indirectly connected via wired or wireless communication, and this embodiment of the invention does not impose any limitations.

[0096] Exemplary based on Figure 1 The implementation environment shown in this embodiment of the invention provides an underwater target detection and identification method. The following description uses the application of this underwater target detection and identification method in server 101 as an example. It can be understood that this underwater target detection and identification method can also be applied in terminal 102.

[0097] Reference Figure 2 , Figure 2 This is a flowchart illustrating an underwater target detection and identification method applied to a server, provided in an embodiment of the present invention. The executing entity of this underwater target detection and identification method can be any of the aforementioned computer devices (including servers or terminals). (Refer to...) Figure 2 The method includes the following steps:

[0098] S100: Acquire underwater image data;

[0099] The underwater image data includes annotation information for targets in the underwater environment;

[0100] For example, in some specific embodiments, the present invention collects high-quality underwater image data and accurately annotates it to train subsequent deep learning models. The underwater image data originates from a specific underwater environment, which in one embodiment may include coral reefs, ancient artifacts, marine life, etc. The acquired image data is stored in JPG format; in this embodiment, the pixel resolution is 1920x1080, and the number of channels is RGB3.

[0101] Furthermore, the collected data is labeled. The labeling method can be manual, with the labeled information being the individual targets. The total number of underwater targets is calculated based on the number of labels in a single image.

[0102] In some embodiments, the method may further include the following steps: augmenting underwater image data using a generative adversarial network based on Riemannian manifold optimization.

[0103] For example, in some specific implementations, the acquisition, annotation, and preprocessing of training data are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor model generalization ability and affect model accuracy. This invention employs a generative adversarial network (GAN) based on Riemannian manifold optimization for data augmentation. The GAN consists of two parts: a generator (G) and a discriminator (D). The generator is responsible for creating realistic image data, while the discriminator distinguishes between generated and real images. To improve the quality and diversity of generated images, this invention uses a curvature regularization loss function, enabling the generator to generate more adaptable image data based on specific environmental parameters.

[0104] In some embodiments, the generative adversarial network includes a generator and a discriminator; such as Figure 3 As shown, the method may further include the following steps: T100, initializing the first parameters of the generator and the second parameters of the discriminator; T200, determining environmental parameters based on the annotation information, encoding the environmental parameters to obtain an encoding vector; the environmental parameters include the number of targets in the underwater environment, underwater depth, and average size; T300, merging the encoding vector with the random noise vector of the underwater image data as input data for the generator; T400, based on the first parameters, processing the input data by the generator to obtain a generated image; constructing a generator loss based on the generated image; T500, based on the second parameters, evaluating the underwater image data and its corresponding generated image by the discriminator, constructing a discriminator loss based on the evaluation result; T600, constructing a curvature regularization loss based on the generated image; T700, updating the first and second parameters using backpropagation and gradient descent based on the generator loss, curvature regularization loss, and discriminator loss; the gradient applied by the gradient descent method is obtained through the chain rule; T800, returning to execute the step of determining environmental parameters based on the annotation information for repeated iteration until the first stopping iteration condition is met.

[0105] For example, in some specific implementations, the training process of the generative adversarial network algorithm based on Riemannian manifold optimization is as follows:

[0106] T1. Initialize the parameters of the generator and discriminator. In one embodiment, the initialization method is expressed as follows:

[0107]

[0108] In the formula, and These are the initial parameters for the generator and the discriminator, respectively. This indicates that the parameters are initialized using a normal distribution with a mean of 0 and a standard deviation of 0.02.

[0109] T2. Encode the environmental parameters into a vector, merge it with the random noise vector of the image data, and use it as the input to the generator, represented as:

[0110] v env =E encode (env)

[0111] z = z random ⊕v env

[0112] In the formula, v env E is the encoded vector of the environment parameter env; encode () represents the environmental parameter encoding function; z random is a random noise vector; ⊕ represents the vector concatenation operation; z is the input vector of the generator.

[0113] In one embodiment, the environmental parameter env includes the average number of underwater environmental artifacts per image, underwater depth, and average size of the underwater artifact targets. In this embodiment, E encode The () function is an autoencoder neural network.

[0114] T3. The generator produces an image based on the input noise and conditional vector. The generation method is represented as follows:

[0115] x gen =G(z;Θ) g )

[0116] Furthermore, the generator's loss is calculated as follows:

[0117] L G =-logD(x gen ;Θ d )

[0118] Furthermore, the discriminator evaluates the generated image and the real image, providing feedback to the generator. The discriminator's loss is calculated as follows:

[0119] L D =-[logD(x real ;Θ d )+log(1-D(x gen ;Θ d ))]

[0120] In the formula, x gen The image generated by generator G; G() is the generator function; D() is the discriminator function; x real For real images; L D L is the loss function of the discriminator; G The loss function for the generator; Θ g and Θ dThese are the parameters for the generator and the discriminator, respectively.

[0121] T4. The generator and discriminator are jointly optimized using a curvature regularization loss function and an adversarial loss. The curvature regularization loss helps maintain the geometric continuity and visual realism of the generated images. The calculation method is as follows:

[0122]

[0123] In the formula, L curve For curvature regularization loss; λ curve The weights for curvature regularization; This represents the second derivative of the image, also known as the Laplacian operator; ∑ i,j This is to accumulate the pixels of the image at indices i and j.

[0124] T5. Update the parameters of the generator and discriminator using backpropagation and gradient descent. The update method is expressed as follows:

[0125]

[0126] In the formula, and For the updated generator and discriminator parameters, η g and η d The learning rate for the generator and discriminator; and Let η be the gradient of the loss function of the generator and discriminator with respect to their respective parameters. Preferably, η g and η d Set them to 0.01 and 0.03 respectively.

[0127] Furthermore, gradient Calculated using the chain rule, it is expressed as:

[0128]

[0129] In the formula, and Indicates the generated image x gen The partial derivatives of the generation loss and curvature regularization loss, This represents the partial derivative of the generated image with respect to the generator parameters.

[0130] T6. Repeat the above steps until a preset stopping iteration condition is met, indicating that the model training is complete. In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations can be set to 1000.

[0131] S200: Based on underwater image data, a feature extraction model is obtained by optimizing the parameters of a preset neural network model using a ring dynamic optimization algorithm.

[0132] Among them, the feature extraction model uses the processing results of underwater image data to generate feature image data;

[0133] It should be noted that the parameter optimization process includes the growth phase, synthesis phase, evaluation phase, pre-mitotic phase, mitotic phase, and dormancy phase; in some embodiments, such as Figure 4 As shown, the feature extraction model is obtained by optimizing the parameters of a preset neural network model using a ring dynamic optimization algorithm, which may include the following steps: S201, Initializing the neural network model using a convolutional neural network; wherein the neural network model includes multiple convolutional layers, pooling layers, fully connected layers, and deconvolutional layers; S202, Initializing the model parameters of the neural network model based on preset normal distribution random values; the model parameters include weights and biases; S203, During the growth phase, updating the model parameters using an accelerated gradient descent algorithm; S204, During the synthesis phase, synthesizing multiple weights based on preset importance coefficients using a synthesis function. Processing steps: S205. During the evaluation period, obtain the evaluation results of the model parameters based on the preset performance evaluation function; if the evaluation results do not meet the preset performance threshold, return to the steps of the growth period; otherwise, proceed to the steps of the pre-split phase; S206. In the pre-split phase, use a preset perturbation method to obtain the adjustment increments of weights and biases to fine-tune the model parameters; S207. During the split phase, use weight pruning to constrain the weights; S208. During the dormancy period, adjust the learning rate by decreasing it based on the preset decay coefficient; S209. Return to the steps of the growth period and repeat the iteration until the second stopping iteration condition is met.

[0134] For example, in some specific implementations, the augmented data is input into the feature extraction model for training. Traditional gradient descent relies on global gradient information for weight updates, inspired by the periodic metabolic processes of biological cells, optimizing the organism's response and adaptation through different mechanisms at different stages. This invention employs a ring dynamic optimization algorithm to optimize the parameters of the neural network. The ring dynamic optimization algorithm adjusts the optimization strategy at different training stages, simulating various stages of the cell cycle. Each stage uses a different strategy to adjust the weights and biases of the neural network, allowing the algorithm to more flexibly adapt to changes in training data, reduce the risk of overfitting, and effectively escape local optima.

[0135] S300. Based on feature image data and annotation information, a pre-defined regional convolutional neural network is trained for target detection to obtain a target detection model.

[0136] It should be noted that the region convolutional neural network includes a secondary feature extractor, a region proposal network, and a classification and regression network; in some embodiments, such as Figure 5 As shown, step S300 may include the following steps: S301, adjusting the image features of the feature image data using a feature secondary extractor to obtain a feature map; S302, constructing the feature secondary extractor loss based on the feature map and its true class at the corresponding sample in the feature image data; the true class is obtained based on the annotation information; S303, extracting candidate regions on the feature map using a sliding window through a region proposal network, and obtaining the first predicted bounding box using an anchor box mechanism; S304, constructing the first classification loss based on the predicted probability of the candidate regions and the true label; constructing the first regression loss based on the first predicted bounding box and the true bounding box; the true label and the true bounding box are obtained based on the annotation information; S305, constructing the region proposal network loss based on the first classification loss and the first regression loss; S306, using an adaptive hierarchical fusion strategy to process the feature map of the candidate regions... S307. Fuse the feature layers to obtain fused features; S308. Input the fused features into the classification and regression network to obtain the prediction output; the prediction output includes the category prediction probability and the second predicted bounding box for each candidate region; S309. Construct a second classification loss based on the category prediction probability and the true category for each candidate region; construct a second regression loss based on the second predicted bounding box and the true bounding box; S310. Construct the classification and regression network loss based on the second classification loss and the second regression loss; S311. Optimize and adjust the network weights of the feature secondary extractor, region proposal network, and classification and regression networks based on the feature secondary extractor loss, region proposal network loss, and classification and regression network loss; S312. Return to the step of adjusting the image features of the feature image data through the feature secondary extractor and repeat the iteration until the third stopping iteration condition is met.

[0137] For example, in some specific implementations, the data after feature extraction is input into the target detection model for target detection. The present invention uses a region convolutional neural network based on deep feature space mapping to accurately detect targets in dense underwater scenes. The region convolutional neural network based on deep feature space mapping includes three components: a secondary feature extractor, a region proposal network, and a classification and regression network.

[0138] Specifically, the training process of the region convolutional neural network algorithm based on deep feature space mapping can be implemented as follows:

[0139] S311. A pre-trained deep convolutional network is used as a secondary feature extractor to fine-tune the extracted features on the image. Specifically, the network weights W are optimized. qe To minimize the classification loss L qe , represented as:

[0140]

[0141] In the formula, N is the number of training samples, y i Let x be the true class of the i-th sample. i For the corresponding input features, P(y) i |x i W qe ) indicates that at the current weight W qe Below, the model predicts x i Belongs to category y i The probability of.

[0142] S312. Train the region proposal network to generate high-quality candidate regions. The region proposal network extracts candidate regions on the feature map through a sliding window and uses the anchor box mechanism to predict object boundaries. Specifically, for the region proposal network, the goal is to learn a set of weights W. qr To ensure that the generated candidate regions are as close as possible to the real target regions, the loss function L of the region proposal network... qr The calculation method is as follows:

[0143]

[0144] In the formula, q i Let be the probability that candidate region i is predicted as the target. For the true label (target is 1, background is 0), t i These are the predicted bounding box parameters. For the actual border parameters, L cls and L reg These are the classification loss and regression loss, respectively, λ qr The coefficient is used to balance the two types of losses.

[0145] In one embodiment, the classification loss L cls The cross-entropy loss is used for calculation, and is expressed as follows:

[0146]

[0147] In the formula, q i It predicts the probability of the target existing. These are real labels (1 represents the target, 0 represents the background).

[0148] Furthermore, in this embodiment, the regression loss L reg Implemented using smoothed L1 loss, expressed as:

[0149]

[0150] In the formula, t i and These are the predicted and actual bounding box parameters, respectively.

[0151] S313. After feature extraction and candidate region generation, an adaptive hierarchical fusion strategy is adopted. This strategy dynamically selects appropriate feature layers for fusion by analyzing the size and shape complexity of the candidate regions, thereby optimizing the detection performance for small targets and partially occluded targets. In one embodiment, adaptive hierarchical fusion calculates the weights α of feature maps at different levels. ql In practice, the weights are dynamically adjusted using the Softmax function to optimize the quality of the fused features. The calculation method is as follows:

[0152]

[0153] In the formula, f l W represents the feature map of the l-th layer. ql Let be the corresponding weight matrix, and k be the total number of feature levels.

[0154] Furthermore, in this embodiment, the weight matrix W ql The optimization process aims to minimize the loss between the fused feature map and the object detection task. Specifically, the weights are adjusted based on the following optimization objectives:

[0155]

[0156] In the formula, M represents the total number of samples processed during the hierarchical fusion process. y represents the feature calculated from the l-th layer feature map for the i-th sample. i These are the corresponding real tags.

[0157] S314. Using the fused features, train a classification and regression network to accurately determine the category of each candidate region and adjust its position. This network not only identifies the target type but also refines the target's position and size, improving detection accuracy. The loss function L of the classification and regression network... qc It includes classification loss and bounding box regression loss, calculated as follows:

[0158]

[0159] In the formula, c j Predict the category probability for the j-th candidate region. For the true category, b j These are the predicted bounding box parameters. λ represents the actual bounding box parameters. qc This is the balance coefficient.

[0160] S315. Repeat the above steps until a preset stopping iteration condition is met, indicating that the model training is complete. In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations can be set to 1000.

[0161] S400: Using the feature extraction model and the target detection model, target detection and recognition are performed on the underwater image to be identified, and the target detection result is obtained.

[0162] It should be noted that the region convolutional neural network includes a secondary feature extractor, a region proposal network, and a classification and regression network; in some embodiments, such as Figure 6 As shown, step S400 may include the following steps: S401, extracting features from the underwater image to be identified using a feature extraction model to obtain a feature image; S402, generating a feature map based on the feature image using a secondary feature extractor; S403, analyzing and processing the feature map using a region proposal network to generate candidate target regions; S404, performing adaptive hierarchical fusion on the candidate target regions, and then using a classification and regression network to identify the target category to obtain the target detection result.

[0163] For example, in some specific implementations, the trained model described above can be used to process new underwater image data. In one embodiment, for a newly acquired underwater image sample, feature extraction is first performed to obtain feature-extracted image data. Further, secondary feature extraction is performed to generate a feature map of the image. Then, a region proposal network is used to analyze the feature map to generate candidate target regions. Finally, an adaptive hierarchical fusion and classification / regression network is used to identify the target category and refine the location of each candidate region.

[0164] In some embodiments, the target detection result includes the identification categories of multiple detected targets in the underwater image to be identified; the method may also include the following steps: summarizing the number of targets in each identification category based on the identification category of each detected target.

[0165] For example, in some specific implementations, the detected targets can be counted and summarized based on the identification results.

[0166] To explain in detail the principle of the technical solution of the present invention, the overall process of the present invention will be described below with reference to some specific embodiments. It is easy to understand that the following is an explanation of the technical principle of the present invention and should not be regarded as a limitation of the present invention.

[0167] First, it should be noted that the proposed technology is an underwater target recognition model and method based on laser image enhancement and restoration, belonging to the field of underwater target image enhancement and detection technology. The model structure includes an image enhancement module, a feature extraction and fusion module, and an underwater target recognition module connected in sequence. The underwater target recognition technology based on laser image enhancement and restoration utilizes RGB intensity data obtained under single-frequency laser illumination to identify underwater targets and generate images. Then, image enhancement and restoration methods are used to enhance and restore the images, improving the visibility and recognizability of the targets. This results in higher image resolution and quality, thereby improving the visibility and recognizability of the targets. Furthermore, the image processing algorithm used in this invention can better remove noise and interference from the images, thereby improving the accuracy and speed of target recognition.

[0168] Another related technology proposes a forward-looking sonar image recognition method based on incremental data convolutional neural networks. This method uses five different underwater moving targets: single-column targets, double-column targets, triple-column targets, quadruple-column targets, and T-shaped targets. The convolutional neural network forward-looking sonar image recognition technique is as follows: Step 1, extract training and test sets from the original forward-looking sonar target images; Step 2, center-crop the target image and perform grayscale rotation; Step 3, incremental data processing; Step 4, input the data into the convolutional neural network for training; Step 5, obtain the trained convolutional neural network; Step 6, classify and recognize the test set. This invention does not require cumbersome feature engineering, which can greatly reduce labor costs and has stronger generalization ability and faster training speed.

[0169] Furthermore, a related technology proposes an underwater target classification method based on an improved gray wolf optimization algorithm, belonging to the field of underwater target recognition. This underwater target classification method first extracts features from underwater target images using principal component analysis and achieves data dimensionality reduction; secondly, it utilizes SVM classification for underwater target classification; finally, it employs an improved gray wolf optimization algorithm to optimize the parameters of the support vector machine to achieve better classification results, that is, it optimizes and improves the intelligent optimization algorithm used by SVM to improve classification accuracy and efficiency. The underwater target classification method of this invention can effectively improve the accuracy of target classification.

[0170] However, the drawbacks of the related technology are as follows:

[0171] 1. In traditional methods, data scarcity and insufficient sample diversity often lead to inadequate model training, especially in specific and complex environments such as underwater scenes, where the lack of sufficiently diverse image data affects the model's generalization ability and accuracy.

[0172] 2. Traditional feature extraction methods rely on static optimization strategies, which fail to effectively address the dynamic changes in training data and the problem of overfitting, resulting in insufficient adaptability and accuracy of the model in practical applications.

[0173] 3. Existing target detection methods are inefficient when dealing with small targets and partially occluded targets, and cannot accurately identify multiple targets in dense scenes. Especially in complex underwater environments, they often suffer from poor detection performance due to inaccurate feature extraction and unreasonable target suggestions.

[0174] Therefore, developing an effective underwater target detection and counting method can improve the accuracy of identification and processing efficiency, which is of great significance for promoting underwater scientific research and the development of related technologies. Specifically, this invention aims to solve these technical challenges by introducing an advanced deep learning architecture and optimization algorithms, achieving more accurate and efficient underwater target identification and counting. Figure 7 As shown, the method flow of this embodiment of the invention can be implemented as follows:

[0175] S1. Data Acquisition and Labeling:

[0176] This invention collects high-quality underwater image data and precisely annotates it to train subsequent deep learning models. The underwater image data originates from specific underwater environments, which in one embodiment may include coral reefs, ancient artifacts, marine life, etc. The acquired image data is stored in JPG format; in this embodiment, the resolution is 1920x1080 pixels, and the number of channels is RGB3.

[0177] Furthermore, the collected data is labeled manually, with the labeling information being the individual targets. The total number of underwater targets is calculated based on the number of labels in a single image.

[0178] In one embodiment, there is a single underwater image dataset containing two underwater cultural relics. In this embodiment, the coordinates of the two underwater cultural relics are labeled, and the image is labeled as follows:

[0179] Objective 1: {x1, y1, x2, y2};

[0180] Objective 2: {x3, y3, x4, y4};

[0181] S2, Data Expansion:

[0182] Understandably, in the tasks of this invention, the acquisition, annotation, and preprocessing of training data are time-consuming and labor-intensive, and insufficient training samples can easily lead to poor model generalization ability and affect model accuracy. This invention employs a generative adversarial network (GAN) based on Riemannian manifold optimization for data augmentation. The GAN consists of two parts: a generator (G) and a discriminator (D). The generator is responsible for creating realistic image data, while the discriminator distinguishes between generated and real images. To improve the quality and diversity of generated images, this invention uses a curvature regularization loss function, enabling the generator to generate more adaptable image data based on specific environmental parameters.

[0183] Specifically, the training process for the generative adversarial network algorithm based on Riemannian manifold optimization is as follows:

[0184] S21. Initialize the parameters of the generator and discriminator. In one embodiment, the initialization method is expressed as follows:

[0185]

[0186] In the formula, and These are the initial parameters for the generator and the discriminator, respectively. This indicates that the parameters are initialized using a normal distribution with a mean of 0 and a standard deviation of 0.02.

[0187] S22. Encode the environmental parameters into a vector, merge it with the random noise vector of the image data, and use it as the input to the generator, represented as:

[0188] v env =E encode (env)

[0189] z = z random ⊕v env

[0190] In the formula, v env E is the encoded vector of the environment parameter env; encode () represents the environmental parameter encoding function; z random is a random noise vector; ⊕ represents the vector concatenation operation; z is the input vector of the generator.

[0191] In one embodiment, the environmental parameter env includes the average number of underwater environmental artifacts per image, underwater depth, and average size of the underwater artifact targets. In this embodiment, E encode The () function is an autoencoder neural network.

[0192] S23. The generator generates an image based on the input noise and conditional vector. The generation method is represented as follows:

[0193] x gen =G(z;Θ) g )

[0194] Furthermore, the generator's loss is calculated as follows:

[0195] L G =-logD(x gen ;Θ d )

[0196] Furthermore, the discriminator evaluates the generated image and the real image, providing feedback to the generator. The discriminator's loss is calculated as follows:

[0197] L D =-[logD(x real ;Θ d )+log(1-D(x gen ;Θ d ))]

[0198] In the formula, x gen The image generated by generator G; G() is the generator function; D() is the discriminator function; x real For real images; L D L is the loss function of the discriminator; G The loss function for the generator; Θ g and Θ d These are the parameters for the generator and the discriminator, respectively.

[0199] S24. The generator and discriminator are jointly optimized using the curvature regularization loss function and the adversarial loss. The curvature regularization loss helps maintain the geometric continuity and visual realism of the generated images. The calculation method is as follows:

[0200]

[0201] In the formula, L curve For curvature regularization loss; λ curve The weights for curvature regularization; This represents the second derivative of the image, also known as the Laplacian operator; ∑ i,j This is to accumulate the pixels of the image at indices i and j.

[0202] S25. Update the parameters of the generator and discriminator using backpropagation and gradient descent. The update method is expressed as follows:

[0203]

[0204] In the formula, and For the updated generator and discriminator parameters, η g and ηd The learning rate for the generator and discriminator; and Let η be the gradient of the loss function of the generator and discriminator with respect to their respective parameters. Preferably, η g and η d Set them to 0.01 and 0.03 respectively.

[0205] Furthermore, gradient Calculated using the chain rule, it is expressed as:

[0206]

[0207] In the formula, and Indicates the generated image x gen The partial derivatives of the generation loss and curvature regularization loss, This represents the partial derivative of the generated image with respect to the generator parameters.

[0208] S26. Repeat the above steps until a preset stopping iteration condition is met, indicating that the model training is complete. In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.

[0209] S3. Feature extraction model training:

[0210] The augmented data is input into the feature extraction model for training. Traditional gradient descent relies on global gradient information for weight updates, inspired by the periodic metabolic processes of biological cells, which optimize the organism's response and adaptation through different mechanisms at different stages. This invention employs a ring dynamic optimization algorithm to optimize the parameters of the neural network. The ring dynamic optimization algorithm adjusts the optimization strategy at different training stages, simulating various stages of the cell cycle. Each stage uses a different strategy to adjust the weights and biases of the neural network, allowing the algorithm to more flexibly adapt to changes in training data, reduce the risk of overfitting, and effectively escape local optima.

[0211] Specifically, such as Figure 8 As shown, the training process of the neural network algorithm based on ring dynamic optimization is as follows:

[0212] S31. Initialize the neural network model. This invention uses a convolutional neural network for feature extraction, specifically including 3 convolutional layers, 1 pooling layer, 1 fully connected layer, and 1 deconvolutional layer.

[0213] In one embodiment, the sample input into the feature extraction model is underwater image data with a pixel resolution of 1920x1080 and RGB3 channels.

[0214] Furthermore, through the deconvolution layer of the neural network model, the final output data after feature extraction is single-channel image data with a pixel resolution of 1920x1080.

[0215] Furthermore, initialize the weights w of the neural network. r and bias b r And set the initial learning rate. In one embodiment, the initial weights and biases are set as follows:

[0216]

[0217] In the formula, ~ indicates that it follows a specific distribution. The mean is 0 and the variance is σ. r 2 The normal distribution, σ r 2 This is the variance of the initial distribution. Preferably, σ r 2 Set to 0.01.

[0218] S32. During the growth phase, the algorithm quickly adapts to data characteristics by accelerating the fine-tuning of weights. This invention uses an accelerated gradient descent algorithm to update neural network parameters, and the update method is expressed as follows:

[0219]

[0220] In the formula, γ r It is the acceleration coefficient, L R The loss function for training the neural network. The gradient of the loss function with respect to the weight parameters. The gradient of the loss function with respect to the bias parameters. Let be the weight parameters for the t-th iteration. Let be the bias parameter for the t-th iteration. Let be the weight parameters for the (t+1)th iteration. Let be the bias parameter for the (t+1)th iteration. The sign of the partial derivative is η. r Let L be the learning rate during the growth phase. Preferably, the loss function L... R Using cross-entropy loss, η r Set to 0.01.

[0221] Furthermore, the acceleration coefficient γ r Based on the descent rate and curvature settings of the loss function to avoid over-adjustment, the calculation method is as follows:

[0222]

[0223] In the formula, is the preset maximum acceleration coefficient, and min(,) is the function to take the minimum value.

[0224] S33. During the synthesis phase, the algorithm performs weight synthesis, that is, combines multiple weight parameters into new parameters through specific operations to improve the network's generalization ability. In one embodiment, the synthesis function S(w r The calculation method for ) is as follows:

[0225]

[0226] In the formula, Weight The importance coefficient, where nr is the number of weight parameters.

[0227] Furthermore, the importance coefficient α r Based on the previous stage w r The gradient magnitude is dynamically calculated. For the i-th weight parameter, its importance coefficient is calculated as follows:

[0228]

[0229] In the formula, σ wr This is the decay rate parameter.

[0230] Furthermore, the decay rate parameter σ wr The calculation method for control is as follows:

[0231]

[0232] S34. During the evaluation period, the algorithm evaluates the current network performance and decides whether to adjust the periodic optimization strategy. In one embodiment, a performance evaluation function P(w) is set. r ,b r The decision function outputs whether to proceed to the next cycle, and the decision method is expressed as follows:

[0233]

[0234] In the formula, θ r This is the performance threshold. Preferably, θ r Set to 0.5. If P(w) r ,b r If the value is 1, then the cycle begins, i.e., the growth phase begins; otherwise, the pre-division phase begins.

[0235] S35. In the prophase of cell division, simulating the cell's preparation stage for division, fine adjustments are made to the weights. In one embodiment, a perturbation method Δw is used. r and Δb rThe adjustment increment for weights and biases is calculated as follows:

[0236]

[0237] In the formula, Δw r The adjustment increment for the weight parameters, Δb r The adjustment increment for the bias parameter, ξ r and β r These are the amplitude and frequency parameters that are fine-tuned. Preferably, ξ r Set to 5, β r Set to 3.14.

[0238] Furthermore, ξ r and β r The setting method is expressed as follows:

[0239]

[0240] In the formula, ρ r It is a scaling factor for the perturbation amplitude. Preferably, ρ r Set it to 0.95.

[0241] S36. During the splitting phase, the algorithm performs significant structural adjustments. In one embodiment, the adjustment method involves weight pruning to constrain the weights. The weight pruning function R(w) r The calculation method for ) is expressed as follows:

[0242]

[0243] In the formula, λ r It is the gradient threshold. Preferably, λ r Set it to 0.01, meaning only parameters with a weight greater than 0.01 will be retained.

[0244] S37. During the dormancy period, the network gradually reaches a stable state based on the existing weights. The learning rate η is adjusted during this stage. r This causes the learning rate to decrease, and the adjustment method is expressed as follows:

[0245]

[0246] In the formula, δ r It is the attenuation coefficient, k r This represents the number of completed cycles. Preferably, δ r Set it to 0.95.

[0247] S38. Repeat the above steps until a preset stopping iteration condition is met, indicating that the model training is complete. In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.

[0248] S4. Training the target detection model:

[0249] The extracted data is input into the target detection model for target detection. This invention uses a region convolutional neural network based on deep feature space mapping to accurately detect targets in dense underwater scenes. The region convolutional neural network based on deep feature space mapping consists of three components: a secondary feature extractor, a region proposal network, and a classification and regression network.

[0250] Specifically, the training process for the region convolutional neural network algorithm based on deep feature space mapping is as follows:

[0251] S41. A pre-trained deep convolutional network is used as a secondary feature extractor to fine-tune the extracted features on the image. Specifically, the network weights W are optimized. qe To minimize the classification loss L qe , represented as:

[0252]

[0253] In the formula, N is the number of training samples, y i Let x be the true class of the i-th sample. i For the corresponding input features, P(y) i |x i W qe ) indicates that at the current weight W qe Below, the model predicts x i Belongs to category y i The probability of.

[0254] S42. The region proposal network is trained to generate high-quality candidate regions. The network extracts candidate regions on the feature map using a sliding window and predicts object boundaries using an anchor box mechanism. Specifically, for the region proposal network, the goal is to learn a set of weights W. qr To ensure that the generated candidate regions are as close as possible to the real target regions, the loss function L of the region proposal network... qr The calculation method is as follows:

[0255]

[0256] In the formula, q i Let be the probability that candidate region i is predicted as the target. For the true label (target is 1, background is 0), t iThese are the predicted bounding box parameters. For the actual border parameters, L cls and L reg These are the classification loss and regression loss, respectively, λ qr The coefficient is used to balance the two types of losses.

[0257] In one embodiment, the classification loss L cls The cross-entropy loss is used for calculation, and is expressed as follows:

[0258]

[0259] In the formula, q i It predicts the probability of the target existing. These are real labels (1 represents the target, 0 represents the background).

[0260] Furthermore, in this embodiment, the regression loss L reg Implemented using smoothed L1 loss, expressed as:

[0261]

[0262] In the formula, t i and These are the predicted and actual bounding box parameters, respectively.

[0263] S43. After feature extraction and candidate region generation, an adaptive hierarchical fusion strategy is adopted. This strategy dynamically selects appropriate feature layers for fusion by analyzing the size and shape complexity of the candidate regions, thereby optimizing the detection performance for small targets and partially occluded targets. In one embodiment, adaptive hierarchical fusion calculates the weights α of feature maps at different levels. ql In practice, the weights are dynamically adjusted using the Softmax function to optimize the quality of the fused features. The calculation method is as follows:

[0264]

[0265] In the formula, f l W represents the feature map of the l-th layer. ql Let be the corresponding weight matrix, and k be the total number of feature levels.

[0266] Furthermore, in this embodiment, the weight matrix W ql The optimization process aims to minimize the loss between the fused feature map and the object detection task. Specifically, the weights are adjusted based on the following optimization objectives:

[0267]

[0268] In the formula, M represents the total number of samples processed during the hierarchical fusion process. y represents the feature calculated from the l-th layer feature map for the i-th sample. i These are the corresponding real tags.

[0269] S44. Using the fused features, train a classification and regression network to accurately determine the category of each candidate region and adjust its position. This network not only identifies the target type but also refines the target's position and size, improving detection accuracy. The loss function L of the classification and regression network... qc It includes classification loss and bounding box regression loss, calculated as follows:

[0270]

[0271] In the formula, c j Predict the category probability for the j-th candidate region. For the true category, b j These are the predicted bounding box parameters. λ represents the actual bounding box parameters. qc This is the balance coefficient.

[0272] S45. Repeat the above steps until a preset stopping iteration condition is met, indicating that the model training is complete. In one embodiment, the preset stopping iteration condition is reaching a preset maximum number of iterations. Preferably, the preset maximum number of iterations is set to 1000.

[0273] S5. Underwater target counting in dense scenes:

[0274] The trained model described above is used to process new underwater image data to achieve real-time target counting. In one embodiment, for newly acquired underwater image samples, feature extraction is first performed to obtain feature-extracted image data. Further, secondary feature extraction generates feature maps for the image. Then, a region proposal network is used to analyze the feature maps and generate candidate target regions. Next, an adaptive hierarchical fusion and classification / regression network is used to identify the target category and refine the location of each candidate region. Finally, the detected targets are counted and summarized.

[0275] In summary, this invention employs a generative adversarial network based on Riemannian manifold optimization for data augmentation and optimizes the generator using a curvature regularization loss function, thus addressing the issues of data scarcity and insufficient sample diversity and effectively improving the model's adaptability to complex underwater environments. Furthermore, this invention uses a ring dynamic optimization algorithm to train the feature extraction model, mimicking different stages of the biological cell cycle, optimizing the neural network's weight and bias update strategies, and effectively addressing the problems of training data variation and overfitting. In addition, this invention uses a region convolutional neural network based on deep feature space mapping for target detection. Through secondary feature extraction and adaptive hierarchical fusion strategies, it enhances the detection capability for small targets and partially occluded targets, improving the efficiency and accuracy of the region proposal network and the classification and regression networks.

[0276] Compared with the prior art, the present invention has at least the following beneficial effects:

[0277] 1. Optimization of generative adversarial networks significantly improves the visual realism and geometric continuity of the generated underwater images, thereby providing higher quality training data for deep learning models.

[0278] 2. The periodic optimization strategy of neural network parameters reduces the risk of overfitting and enables the model to effectively adapt to changes in data characteristics at various training stages, thereby improving the model's generalization ability.

[0279] 3. By precisely controlling the feature extraction and target detection processes, efficient and accurate target detection is achieved, especially in complex and dense underwater environments, which effectively improves the performance of the target detection model.

[0280] On the other hand, such as Figure 9 As shown, this embodiment of the invention provides an underwater target detection and identification device 900, which may include:

[0281] The first module 901 is used to acquire underwater image data; the underwater image data contains annotation information for targets in the underwater environment;

[0282] The second module 902 is used to optimize the parameters of a preset neural network model based on underwater image data using a ring dynamic optimization algorithm to obtain a feature extraction model; wherein, the feature extraction model is based on the processing results of the underwater image data as feature image data;

[0283] The third module 903 is used to train a pre-defined regional convolutional neural network for target detection based on feature image data and annotation information, thereby obtaining a target detection model.

[0284] The fourth module 904 is used to perform target detection and recognition on the underwater image to be identified using the feature extraction model and the target detection model, and obtain the target detection result.

[0285] In some embodiments, the apparatus may further include:

[0286] The fifth module is used to augment underwater image data using a generative adversarial network based on Riemannian manifold optimization.

[0287] In some embodiments, the generative adversarial network includes a generator and a discriminator; the apparatus may also include a sixth module, which is specifically used to perform the following operations:

[0288] Initialize the first parameter of the generator and the second parameter of the discriminator;

[0289] Environmental parameters are determined based on the annotation information, and the environmental parameters are encoded to obtain an encoding vector. The environmental parameters include the number of targets in the underwater environment, underwater depth, and average size.

[0290] The encoded vector is combined with the random noise vector of the underwater image data and used as the input data for the generator.

[0291] Based on the first parameter, the generator processes the input data to obtain the generated image; the generator loss is then constructed based on the generated image.

[0292] Based on the second parameter, the underwater image data and its corresponding generated image are evaluated by the discriminator, and the discriminator loss is constructed based on the evaluation results.

[0293] Construct a curvature regularization loss based on the generated image;

[0294] Based on generator loss, curvature regularization loss, and discriminator loss, backpropagation and gradient descent are used to update the first and second parameters; the gradient applied by the gradient descent method is obtained through the chain rule.

[0295] Return to the step of determining environmental parameters based on the annotation information and repeat the iteration until the first stopping iteration condition is met.

[0296] In some embodiments, the apparatus may further include:

[0297] The seventh module is used to summarize the number of targets in each detection category based on the identification category of each detected target.

[0298] The content of the method embodiments of the present invention is applicable to the device embodiments. The specific functions implemented by the device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0299] On the other hand, embodiments of the present invention also provide an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described underwater target detection and identification method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0300] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0301] like Figure 10 As shown, Figure 10 The hardware structure of an electronic device 1000 according to another embodiment is illustrated. The electronic device 1000 includes:

[0302] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (aSIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present invention.

[0303] The memory 1002 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RaM). The memory 1002 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 to execute the network node population optimization method of the embodiments of this invention.

[0304] Input / output interface 1003 is used to implement information input and output;

[0305] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0306] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);

[0307] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0308] The electronic device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0309] The content of the method embodiments of the present invention is applicable to the embodiments of the present electronic device. The specific functions implemented by the embodiments of the present electronic device are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0310] Another aspect of this invention provides a computer-readable storage medium storing a program that is executed by a processor to implement the aforementioned method.

[0311] It should be noted that the computer-readable medium shown in the embodiments of the present invention can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD to ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In the present invention, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, wherein computer-readable program code is carried. Such transmitted data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0312] The content of the method embodiments of the present invention is applicable to the computer-readable storage medium embodiments. The specific functions implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0313] This invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method.

[0314] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0315] It should be noted that although several modules for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0316] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, touch terminal, or network device, etc.) to execute the method according to the embodiments of the present invention.

[0317] In some alternative embodiments, the functions / operations mentioned in the block diagrams may not occur in the order shown in the operation diagrams. For example, depending on the functions / operations involved, two consecutively shown blocks may actually be executed substantially simultaneously, or the blocks may sometimes be executed in reverse order. Furthermore, the embodiments presented and described in the flowcharts of this invention are provided by way of example to provide a more comprehensive understanding of the technology. The disclosed methods are not limited to the operations and logic flows presented herein. Alternative embodiments are contemplated in which the order of various operations is changed and sub-operations described as part of a larger operation are executed independently.

[0318] Furthermore, although the invention has been described in the context of functional modules, it should be understood that, unless otherwise stated, one or more of the functions and / or features may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in a separate physical device or software module. It is also understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the invention. Rather, given the properties, functions, and internal relationships of the various functional modules in the apparatus disclosed herein, the actual implementation of the module will be understood within the scope of conventional skill of an engineer. Therefore, those skilled in the art can implement the invention as set forth in the claims using ordinary techniques without excessive experimentation. It is also understood that the specific concepts disclosed are merely illustrative and not intended to limit the scope of the invention, which is determined by the full scope of the appended claims and their equivalents.

[0319] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0320] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution means, apparatus, or device (such as a computer-based device, a processor-including device, or other means that can fetch and execute instructions from, or in conjunction with, an instruction execution means, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution means, apparatus, or device.

[0321] More specific examples of computer-readable media (a non-exhaustive list) include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0322] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0323] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0324] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0325] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A method for detecting and identifying underwater targets, characterized in that, Includes the following steps: Acquire underwater image data; the underwater image data includes annotation information for targets in the underwater environment; Based on the underwater image data, a feature extraction model is obtained by optimizing the parameters of a preset neural network model using a ring dynamic optimization algorithm; wherein, the feature extraction model is based on the processing result of the underwater image data as feature image data; Based on the feature image data and the annotation information, a target detection model is trained on a preset region convolutional neural network to obtain a target detection model. Using the feature extraction model and the target detection model, target detection and identification are performed on the underwater image to be identified, and the target detection result is obtained; The method further includes the following steps: The underwater image data is augmented using a generative adversarial network optimized based on Riemannian manifold. The generative adversarial network includes a generator and a discriminator; the method further includes the following steps: Initialize the first parameter of the generator and the second parameter of the discriminator; Based on the annotation information, environmental parameters are determined, and the environmental parameters are encoded to obtain an encoding vector; the environmental parameters include the number of targets, underwater depth, and average size in the underwater environment. The encoded vector is combined with the random noise vector of the underwater image data and used as the input data of the generator. Based on the first parameter, the generator processes the input data to obtain a generated image; and a generator loss is constructed based on the generated image. Based on the second parameter, the underwater image data and the corresponding generated image are evaluated by the discriminator, and the discriminator loss is constructed based on the evaluation result; Construct a curvature regularization loss based on the generated image; Based on the generator loss, the curvature regularization loss, and the discriminator loss, the first parameter and the second parameter are updated using backpropagation and gradient descent; the gradient applied by the gradient descent method is obtained through the chain rule. Return to the step of determining environmental parameters based on the annotation information and repeat the iteration until the first stopping iteration condition is met.

2. The underwater target detection and identification method according to claim 1, characterized in that, The parameter optimization process includes the growth phase, synthesis phase, evaluation phase, pre-division phase, division phase, and dormancy phase; the step of optimizing the parameters of the preset neural network model using a ring dynamic optimization algorithm to obtain the feature extraction model includes the following steps: The neural network model is initialized using a convolutional neural network; wherein the neural network model includes multiple convolutional layers, pooling layers, fully connected layers, and deconvolutional layers; The model parameters of the neural network model are initialized based on random values ​​from a preset normal distribution; the model parameters include weights and biases. During the growth period, the accelerated gradient descent algorithm is used to update the model parameters; During the synthesis period, multiple weights are synthesized using a synthesis function based on preset importance coefficients; During the evaluation period, the evaluation results of the model parameters are obtained based on a preset performance evaluation function; if the evaluation results do not meet the preset performance threshold, the process returns to the steps of the growth phase; otherwise, the process proceeds to the steps of the pre-division phase. In the early stage of the split, a preset perturbation method is used to obtain the adjustment increments of the weights and the biases in order to fine-tune the model parameters; During the splitting phase, the weights are constrained using a weight pruning method. During the dormancy period, the learning rate is adjusted by decreasing based on a preset decay coefficient; Return to the steps of the growth phase and repeat the iteration until the second stopping iteration condition is met.

3. The underwater target detection and identification method according to claim 1, characterized in that, The region convolutional neural network includes a feature extraction sub-processor, a region proposal network, and a classification and regression network; the step of training the preset region convolutional neural network for target detection based on the feature image data and the annotation information to obtain a target detection model includes the following steps: The feature image data is adjusted using the secondary feature extractor to obtain a feature map. A secondary feature extractor loss is constructed based on the feature map and its true class at the corresponding sample in the feature image data; the true class is obtained according to the annotation information. The region proposal network is used to extract candidate regions on the feature map through a sliding window, and the first predicted bounding box is obtained using the anchor box mechanism. A first classification loss is constructed based on the predicted probability of the candidate region and the true label; a first regression loss is constructed based on the first predicted bounding box and the true bounding box; the true label and the true bounding box are obtained according to the annotation information; The region proposal network loss is constructed based on the first classification loss and the first regression loss; The feature maps of the candidate regions are fused using an adaptive hierarchical fusion strategy to obtain fused features. The fused features are input into the classification and regression network to obtain a prediction output; the prediction output includes the category prediction probability and the second prediction bounding box for each candidate region. A second classification loss is constructed based on the predicted probability of the category corresponding to each candidate region and the true category; a second regression loss is constructed based on the second predicted bounding box and the true bounding box; The classification and regression network loss is constructed based on the second classification loss and the second regression loss; Based on the loss of the feature secondary extractor, the loss of the region proposal network, and the loss of the classification and regression network, the network weights of the feature secondary extractor, the region proposal network, and the classification and regression network are optimized and adjusted accordingly. The process of performing image feature adjustment on the feature image data using the secondary feature extractor is repeated iteratively until the third stopping iteration condition is met.

4. The underwater target detection and identification method according to claim 1, characterized in that, The region convolutional neural network includes a feature extraction secondary extractor, a region proposal network, and a classification and regression network; the step of using the feature extraction model and the target detection model to perform target detection and recognition on the underwater image to be identified, and obtaining the target detection result, includes the following steps: The underwater image to be identified is subjected to feature extraction using the feature extraction model to obtain a feature image; Based on the feature image, a feature map is generated using the feature secondary extractor; The feature map is analyzed and processed using the region proposal network to generate candidate target regions; Adaptive hierarchical fusion is performed on the candidate target regions, and then the target category is identified using the classification and regression network to obtain the target detection result.

5. The underwater target detection and identification method according to claim 1, characterized in that, The target detection result includes the identification categories of multiple detected targets in the underwater image to be identified; the method further includes the following steps: Based on the identification category of each detected target, the number of targets for each identification category is summed up.

6. An underwater target detection and identification device, characterized in that, include: The first module is used to acquire underwater image data; The underwater image data includes annotation information for targets in the underwater environment; The second module is used to optimize the parameters of a preset neural network model based on the underwater image data using a ring dynamic optimization algorithm to obtain a feature extraction model; wherein, the feature extraction model is based on the processing result of the underwater image data as feature image data; The third module is used to train a preset region convolutional neural network for target detection based on the feature image data and the annotation information, so as to obtain a target detection model. The fourth module is used to perform target detection and recognition on the underwater image to be identified using the feature extraction model and the target detection model, and to obtain the target detection result; The device further includes: The fifth module is used to augment the underwater image data using a generative adversarial network based on Riemannian manifold optimization. The generative adversarial network includes a generator and a discriminator; the device also includes a sixth module, specifically used to perform the following operations: Initialize the first parameter of the generator and the second parameter of the discriminator; Based on the annotation information, environmental parameters are determined, and the environmental parameters are encoded to obtain an encoding vector; the environmental parameters include the number of targets, underwater depth, and average size in the underwater environment. The encoded vector is combined with the random noise vector of the underwater image data and used as the input data of the generator. Based on the first parameter, the generator processes the input data to obtain a generated image; and a generator loss is constructed based on the generated image. Based on the second parameter, the underwater image data and the corresponding generated image are evaluated by the discriminator, and the discriminator loss is constructed based on the evaluation result; Construct a curvature regularization loss based on the generated image; Based on the generator loss, the curvature regularization loss, and the discriminator loss, the first parameter and the second parameter are updated using backpropagation and gradient descent; the gradient applied by the gradient descent method is obtained through the chain rule. Return to the step of determining environmental parameters based on the annotation information and repeat the iteration until the first stopping iteration condition is met.

7. An electronic device, characterized in that, Including the processor and memory; The memory is used to store programs; The processor executes the program to implement the method as described in any one of claims 1 to 5.

8. A computer storage medium storing a processor-executable program, characterized in that, The processor-executable program, when executed by the processor, is used to implement the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • High-precision target detection model and method based on underwater image enhancement

    CN117975251A

  • Crop disease and pest prediction method based on artificial intelligence

    CN118378742A

  • Belt scratch and offset monitoring method based on machine vision

    CN119206721A