Underwater image fusion detection method, apparatus, computer equipment and storage medium
By using an autoencoder and an image denoising model to perform noise reduction and feature fusion on underwater images, the problem of low resolution in underwater images is solved, and the detection accuracy is improved.
Patent Information
- Application Number
- CN202410940827.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2044-07-12
AI Technical Summary
Underwater images have low resolution due to insufficient lighting and turbid water, resulting in low accuracy of neural network detection.
The underwater image is denoised using an autoencoder and an image denoising model to generate first and second feature matrices, which are then fused together for final target detection.
This improved the resolution of underwater images and the accuracy of detection results.
Smart Images

Figure CN118823561B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic technology, and more specifically to underwater image fusion detection methods, apparatus, computer equipment, and storage media. Background Technology
[0002] In related technologies, underwater images are typically acquired, and image recognition algorithms are used to directly detect targets within these images to obtain the detection results. However, factors such as insufficient underwater lighting and turbid water conditions result in low-resolution images, leading to low accuracy in neural network detection. Summary of the Invention
[0003] In view of this, the present invention provides an underwater image fusion detection method, apparatus, computer equipment and storage medium to solve the problem that the accuracy of neural network detection is low due to the unclear image quality of underwater images.
[0004] In a first aspect, the present invention provides an underwater image fusion detection method, the method comprising: acquiring an underwater image to be detected; subjecting the underwater image to be detected to noise introduction and data reconstruction processing to obtain reconstructed underwater image data; using a pre-constructed autoencoder to perform auto-encoding and decoding processing on the reconstructed underwater image data to obtain a first feature matrix; using a pre-constructed image denoising model to perform denoising processing on the underwater image to be detected to obtain a second feature matrix; fusing the first feature matrix and the second feature matrix to obtain a target matrix; and detecting the target matrix to obtain a target detection result of the underwater image to be detected.
[0005] The underwater image fusion detection method provided by this invention includes: acquiring an underwater image to be detected; introducing noise and reconstructing data from the underwater image to obtain reconstructed underwater image data; using a pre-built autoencoder to encode and decode the reconstructed underwater image data to obtain a first feature matrix; using a pre-built image denoising model to denoise the underwater image to be detected to obtain a second feature matrix; fusing the first and second feature matrices to obtain a target matrix; and detecting the target matrix to obtain a target detection result for the underwater image to be detected. The method provided by this invention introduces noise and reconstructs data from the underwater image to be detected to obtain reconstructed underwater image data; uses a pre-built autoencoder to encode and decode the reconstructed underwater image data to obtain a first feature matrix; uses a pre-built image denoising model to denoise the underwater image to be detected to obtain a second feature matrix; fuses the first and second feature matrices; and performs image target detection based on the fusion result, effectively improving the resolution of the monitoring image data and ensuring the accuracy of the detection results.
[0006] In one optional implementation, the step of fusing the first feature matrix and the second feature matrix to obtain the target matrix includes: performing same-dimensional fusion processing on the first feature matrix and the second feature matrix using a pooling method to obtain the target matrix.
[0007] The method provided in this optional implementation performs same-dimensional fusion processing on the first feature matrix and the second feature matrix using the pooling method, thus ensuring the accuracy of the fusion result.
[0008] In one optional implementation, the step of detecting the target matrix to obtain the target detection result of the underwater image to be detected includes: inputting the target matrix into a pre-constructed image detection model so that the model outputs the target detection result of the underwater image to be detected. The image detection model is obtained by training a first preset neural network model.
[0009] The method provided in this optional embodiment improves the efficiency of image target detection by using an image detection model for image target detection.
[0010] In one alternative implementation, the image denoising model is obtained by training a second preset neural network model.
[0011] The method provided in this optional embodiment uses an image denoising model obtained by training a second preset neural network model, which can accurately perform denoising operations on the image to be detected.
[0012] In one alternative implementation, the autoencoder includes an encoder and a decoder, wherein the encoder maps the input data to a low-dimensional representation, and the decoder restores the low-dimensional representation to target output data, wherein the difference between the target output data and the input data is less than a preset threshold.
[0013] Secondly, the present invention provides an underwater image fusion detection device, comprising: an acquisition module for acquiring an underwater image to be detected; a first processing module for introducing noise and reconstructing data from the underwater image to be detected to obtain reconstructed underwater image data; a second processing module for encoding and decoding the reconstructed underwater image data using a pre-built autoencoder to obtain a first feature matrix; a second processing module for denoising the underwater image to be detected using a pre-built image denoising model to obtain a second feature matrix; a feature fusion module for fusing the first feature matrix and the second feature matrix to obtain a target matrix; and a detection module for detecting the target matrix to obtain a target detection result for the underwater image to be detected.
[0014] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the underwater image fusion detection method described in the first aspect or any corresponding embodiment thereof.
[0015] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to perform the underwater image fusion detection method described in the first aspect or any corresponding embodiment thereof.
[0016] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the underwater image fusion detection method described in the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0017] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0018] Figure 1 This is a schematic flowchart of an underwater image fusion detection method according to an embodiment of the present invention;
[0019] Figure 2 This is a schematic diagram of a specific example in the embodiments of this application;
[0020] Figure 3 This is a flowchart illustrating another underwater image fusion detection method according to an embodiment of the present invention;
[0021] Figure 4 This is a structural block diagram of an underwater image fusion detection device according to an embodiment of the present invention;
[0022] Figure 5 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0024] In related technologies, underwater images are typically acquired, and image recognition algorithms are used to directly detect targets within these images to obtain the detection results. However, factors such as insufficient underwater lighting and turbid water conditions result in low-resolution images, leading to low accuracy in neural network detection.
[0025] In view of this, the underwater image fusion detection method provided in this application can be applied to a server to achieve underwater image fusion detection. The method provided by this invention uses a denoising autoencoder to denoise the underwater image to be detected, obtaining a first feature matrix; then uses a pre-built image denoising model to denoise the underwater image to be detected, obtaining a second feature matrix; finally, the first and second feature matrices are fused; and image target detection is performed based on the fusion result. This effectively improves the resolution of the monitoring image data and ensures the accuracy of the detection results.
[0026] According to an embodiment of the present invention, an underwater image fusion detection method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0027] This embodiment provides an underwater image fusion detection method, which can be used in the aforementioned server. Figure 1 This is a flowchart of an underwater image fusion detection method according to an embodiment of the present invention, such as... Figure 1 As shown, the process includes the following steps:
[0028] Step S101: Obtain the underwater image to be detected.
[0029] For example, the underwater image to be detected may be an underwater image that needs to be fused for detection. The specific content of the underwater image to be detected is not limited in the embodiments of this application, and those skilled in the art can determine it according to their needs.
[0030] Step S102: Noise is introduced and data is reconstructed on the underwater image to be detected to obtain the reconstructed underwater image data.
[0031] For example, in this embodiment of the application, when noise is introduced into the underwater image to be detected and the data is reconstructed, assuming the original input is x (the underwater image to be detected), the original input matrix is erased with a certain probability distribution (usually a binomial distribution), that is, each value is randomly set to 0. After weighting (W, b) and mapping (Sigmoid), y is obtained. Then, y is reverse-weighted and mapped back to become z. The error of z is iterated with the original x, where W is the weight and b is the bias. By repeatedly iterating and training the two sets (W, b), the error function is minimized, that is, z is made as close to x as possible, that is, x is reconstructed.
[0032] Step S103: The reconstructed underwater image data is encoded and decoded using a pre-built autoencoder to obtain the first feature matrix.
[0033] For example, in this embodiment, an autoencoder is used to denoise the underwater image to be detected. An image model is trained using an autoencoder and decoder method, and the robustness of the original data is enhanced by introducing noise autoencoder-decoder processing. During model training, the autoencoder adds some noise, Gaussian noise, or random dropout to the input data. This operation forces the network to learn to be robust to input noise, enabling the model to extract useful features from noisy data. The goal of the denoising autoencoder is to minimize the reconstruction error, i.e., the difference between the original input and the decoder output. Commonly used loss functions include mean squared error (MSE) or cross-entropy loss.
[0034] An autoencoder includes an encoder and a decoder. The encoder maps the input data to a low-dimensional representation, and the decoder restores the low-dimensional representation to the target output data, where the difference between the target output data and the input data is less than a preset threshold. This process forces the model to learn and extract key features from the input data. The embodiments of this application do not limit the specific content of the preset threshold; those skilled in the art can determine it according to their needs.
[0035] In this embodiment, the reconstructed data x is used as input to train the network. The decoder layer is discarded, so that the activation of the hidden units (first-layer features) becomes the input for training the second layer, generating second-layer features. This process of repeated training can keep the previous features stable and reduce the space search for parameters. Specifically, this is achieved through the following formula:
[0036] h L =f L (…f2(f1(x)))
[0037] Among them, h LThis represents the representation learned by the top layer L. The output of the entire architecture is used to feed back to the time series model for classification, providing an improved data representation compared to the original input. The first feature matrix A is obtained through a noise autoencoder and decoder process.
[0038] Step S104: Use a pre-built image denoising model to denoise the underwater image to be detected, and obtain the second feature matrix.
[0039] For example, the image denoising model is obtained by training a second preset neural network model. The second preset neural network model may include, but is not limited to, a convolutional neural network model. Neural network training consists of forward propagation and backward propagation. Forward propagation passes data to hidden layers, applies non-linear activation to the output calculated by the hidden layers, and after passing through several hidden layers, multiplies the output of the last hidden layer by another set of weights to obtain the output result. In the backward propagation process, the weights are adjusted to reduce the error by measuring the output error. The neural network repeats forward and backward propagation to predict the output until weights with smaller errors are obtained. For details, please refer to... Figure 2 As shown, x1, x2, ... x i This represents the input variables, w1, w2, ... w i 'b' represents the bias, 'f' represents the activation function, and 'output' represents the output node.
[0040] Step S105: Perform feature fusion on the first feature matrix and the second feature matrix to obtain the target matrix.
[0041] For example, the target matrix is obtained by feature fusion of the first feature matrix and the second feature matrix. The embodiments of this application do not limit the fusion method, and those skilled in the art can determine it according to their needs.
[0042] Step S106: Detect the target matrix to obtain the target detection result of the underwater image to be detected.
[0043] For example, the target matrix is used to characterize the denoised underwater image to be detected. By performing target detection on the target matrix, the accuracy of the detection results is ensured.
[0044] The underwater image fusion detection method provided in this embodiment includes: acquiring an underwater image to be detected; introducing noise and reconstructing data from the underwater image to obtain reconstructed underwater image data; using a pre-built autoencoder to encode and decode the reconstructed underwater image data to obtain a first feature matrix; using a pre-built image denoising model to denoise the underwater image to be detected to obtain a second feature matrix; fusing the first and second feature matrices to obtain a target matrix; and detecting the target matrix to obtain the target detection result of the underwater image to be detected. By introducing noise and reconstructing data from the underwater image to be detected to obtain reconstructed underwater image data; using a pre-built autoencoder to encode and decode the reconstructed underwater image data to obtain a first feature matrix; using a pre-built image denoising model to denoise the underwater image to be detected to obtain a second feature matrix; fusing the first and second feature matrices; and performing image target detection based on the fusion result, the resolution of the monitoring image data is effectively improved, and the accuracy of the detection results is ensured.
[0045] This embodiment provides an underwater image fusion detection method, which can be used in the aforementioned server. Figure 3 This is a flowchart of an underwater image fusion detection method according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:
[0046] Step S301: Acquire the underwater image to be detected. For details, please refer to [link to relevant documentation]. Figure 1 Step S101 of the illustrated embodiment will not be described again here.
[0047] Step S302 involves introducing noise and reconstructing data into the underwater image to be detected, resulting in reconstructed underwater image data. For details, please refer to [link to relevant documentation]. Figure 1 Step S102 of the illustrated embodiment will not be described again here.
[0048] Step S303: The reconstructed underwater image data is encoded and decoded using a pre-built autoencoder to obtain the first feature matrix. For details, please refer to [link to details]. Figure 1 Step S103 of the illustrated embodiment will not be described again here.
[0049] Step S304: The underwater image to be detected is denoised using a pre-built image denoising model to obtain the second feature matrix. For details, please refer to [link to relevant documentation]. Figure 1 Step S103 of the illustrated embodiment will not be described again here.
[0050] Step S305: Perform feature fusion on the first feature matrix and the second feature matrix to obtain the target matrix.
[0051] Specifically, step S304 includes:
[0052] Step S3051: The first feature matrix and the second feature matrix are fused using the pooling method to obtain the target matrix.
[0053] For example, in this embodiment of the application, the two obtained feature matrices are fused in the same dimension, using the smaller feature matrix as the benchmark. For instance, matrix A has a dimension of a*a*m and matrix B has a dimension of b*b*n. When A is the smaller matrix, pooling is performed on B, and the size of the pooling layer is set to 3*3. The stride of the pooling layer is shown in the following formula:
[0054]
[0055] Max pooling is used here. The output of matrix B is a*a*n. A and the output matrix are concatenated to obtain the fused feature matrix a*a*(m+n). NumPy is used for concatenation. NumPy is the basic package for scientific computing in Python. np.append(arr,values,axis) is used. C = np.append(A,B,axis=0). The fused feature matrix C is obtained through this function.
[0056] Step S306: Detect the target matrix to obtain the target detection result of the underwater image to be detected.
[0057] Specifically, step S305 includes:
[0058] Step S3061: Input the target matrix into the pre-constructed image detection model so that the model outputs the target detection result of the underwater image to be detected. The image detection model is obtained by training the first preset neural network model.
[0059] For example, in the embodiments of this application, the first preset neural network may include, but is not limited to, a convolutional neural network model.
[0060] This embodiment also provides an underwater image fusion detection device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0061] This embodiment provides an underwater image fusion detection device, such as... Figure 4 As shown, it includes:
[0062] Acquisition module 401 is used to acquire underwater images to be detected;
[0063] The first processing module 402 is used to introduce noise and reconstruct data for the underwater image to be detected, so as to obtain the reconstructed underwater image data.
[0064] The second processing module 403 is used to encode and decode the reconstructed underwater image data using a pre-built autoencoder to obtain the first feature matrix;
[0065] The second processing module 404 is used to perform noise reduction processing on the underwater image to be detected using a pre-built image denoising model to obtain a second feature matrix.
[0066] The feature fusion module 405 is used to fuse the first feature matrix and the second feature matrix to obtain the target matrix.
[0067] The detection module 406 is used to detect the target matrix and obtain the target detection result of the underwater image to be detected.
[0068] In some alternative implementations, the feature fusion module 405 includes:
[0069] The feature fusion submodule is used to perform same-dimensional fusion processing on the first feature matrix and the second feature matrix using the pooling method to obtain the target matrix.
[0070] In some alternative implementations, the detection module 406 includes:
[0071] The target matrix is input into a pre-constructed image detection model so that the model outputs the target detection result of the underwater image to be detected. The image detection model is obtained by training a first preset neural network model.
[0072] In some alternative implementations, the image denoising model is obtained by training a second preset neural network model.
[0073] In some alternative implementations, the autoencoder includes an encoder and a decoder, wherein the encoder maps the input data to a low-dimensional representation and the decoder restores the low-dimensional representation to the target output data, the difference between the target output data and the input data being less than a preset threshold.
[0074] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0075] In this embodiment, the underwater image fusion detection device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0076] This invention also provides a computer device having the above-described features. Figure 4 The underwater image fusion detection device shown.
[0077] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 5 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 5 Take a processor 10 as an example.
[0078] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0079] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0080] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0081] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0082] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0083] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0084] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0085] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. An underwater image fusion detection method, characterized in that, The method comprises: acquiring an underwater image to be detected; performing noise introduction and data reconstruction processing on the underwater image to be detected to obtain reconstructed underwater image data; performing encoding and decoding processing on the reconstructed underwater image data by using a pre-constructed autoencoder to obtain a first feature matrix; performing noise reduction processing on the underwater image to be detected by using a pre-constructed image denoising model to obtain a second feature matrix; performing feature fusion on the first feature matrix and the second feature matrix to obtain a target matrix; detecting the target matrix to obtain a target detection result of the underwater image to be detected.
2. The method of claim 1, wherein, The step of performing feature fusion on the first feature matrix and the second feature matrix to obtain a target matrix comprises: performing same-dimension fusion processing on the first feature matrix and the second feature matrix by using a pooling method to obtain a target matrix.
3. The method of claim 1, wherein, The step of detecting the target matrix to obtain a target detection result of the underwater image to be detected comprises: inputting the target matrix into a pre-constructed image detection model to enable the model to output a target detection result of the underwater image to be detected, wherein the image detection model is obtained by training a first preset neural network model.
4. The method of claim 2, wherein, The image denoising model is obtained by training a second preset neural network model.
5. The method of claim 3, wherein, The autoencoder comprises an encoder and a decoder, the encoder is configured to map input data to a low-dimensional representation, and the decoder is configured to restore the low-dimensional representation to target output data, wherein a difference between the target output data and the input data is less than a preset threshold.
6. An underwater image fusion detection device, characterized by, The device comprises: an acquisition module configured to acquire an underwater image to be detected; a first processing module configured to perform noise introduction and data reconstruction processing on the underwater image to be detected to obtain reconstructed underwater image data; a second processing module configured to perform encoding and decoding processing on the reconstructed underwater image data by using a pre-constructed autoencoder to obtain a first feature matrix; a third processing module configured to perform noise reduction processing on the underwater image to be detected by using a pre-constructed image denoising model to obtain a second feature matrix; a feature fusion module configured to perform feature fusion on the first feature matrix and the second feature matrix to obtain a target matrix; a detection module configured to detect the target matrix to obtain a target detection result of the underwater image to be detected.
7. The apparatus of claim 6, wherein, The feature fusion module comprises: a feature fusion sub-module configured to perform same-dimension fusion processing on the first feature matrix and the second feature matrix by using a pooling method to obtain a target matrix.
8. A computer device, comprising: comprise: a memory and a processor, which are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the underwater image fusion detection method in any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to perform the underwater image fusion detection method in any one of claims 1 to 5.
10. A computer program product, characterised in that, Computer program product comprising computer instructions for causing a computer to perform the underwater image fusion detection method of any one of claims 1 to 5.
Citation Information
Patent Citations
Target detection method and device for complex scene under reconstruction guidance
CN113343807A
Small image multi-object detection method based on super-resolution
WO2023060746A1