Underwater image identification and classification method and system based on frequency domain assisted deep learning
Through the underwater image recognition and classification method combining spatial and frequency domain characteristics, the problem of poor classification effect in dynamic environments in the prior art is solved, and more efficient and accurate underwater scene classification is achieved.
Patent Information
- Application Number
- CN202510245373.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-04-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing underwater scene classification technology performs poorly in dynamic environments, cannot achieve stable classification in complex underwater scenes, and lacks effective auxiliary strategies to improve classification effectiveness.
Underwater image recognition and classification method based on frequency domain assisted deep learning is adopted to classify underwater scenes by combining spatial domain and frequency domain features. The method includes an image classifier, a frequency domain classification assistant and an adaptive auxiliary policy module, which uses a multi-band compression attention mechanism to enhance frequency domain feature extraction, and dynamically adjust the output weights of the airspace and frequency domain classifiers through an adaptive strategy.
The efficiency and accuracy of underwater image feature extraction are improved, the classification accuracy of underwater scene images is significantly improved, and the model's response ability and overall classification performance are improved to complex underwater scenes.
Smart Images

Figure CN119741593A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of underwater image recognition, and in particular to an underwater image recognition and classification method and system based on frequency domain assisted deep learning. Background Art
[0002] Existing underwater scene classification techniques mainly rely on methods in a single processing domain, such as spatial or frequency domain analysis. In spatial domain processing, traditional convolutional neural networks (CNNs) such as ResNet, VGG, and DenseNet are widely used in image classification tasks, extracting local features of images such as texture, edges, and shapes layer by layer through multiple convolutional layers and pooling layers. These networks rely on a large amount of training data to learn how to recognize different categories of visual patterns from spatial associations. On the other hand, frequency domain methods use mathematical tools such as Fourier transform or wavelet transform to transform images from the spatial domain to the frequency domain to analyze their frequency distribution and periodic characteristics. Frequency domain processing can reveal global structural information, such as periodic patterns and anomalies in frequency distribution, which may not be obvious in the spatial domain.
[0003] In recent years, with the rapid development of deep learning, a variety of new algorithms have emerged in the field of scene classification, especially in underwater scene classification, such as GoogLeNet based on the Inception module, which enhances the perception of targets of different scales by introducing multi-scale convolution and improves the adaptability of the model to complex scenes. Although these methods have achieved remarkable success in their respective fields, they usually operate independently and do not integrate information in the spatial and frequency domains in a unified framework. For example, some advanced deep learning frameworks attempt to improve performance by combining local feature detectors and global information processors, but these methods usually ignore the intrinsic connection and complementarity between the spatial and frequency domains.
[0004] Most of the related methods rely on a single spatial domain or frequency domain feature for image classification. Although the spatial domain method can effectively capture local texture and shape information, these local information is easily lost when the lighting conditions are poor or the underwater environment is severely scattered, resulting in a decrease in classification accuracy. Although the frequency domain method can extract the global and structural features of the image, its performance is often limited when processing underwater images with complex backgrounds and non-periodic noise. It cannot accurately distinguish scene categories, and has poor adaptability and unstable classification performance in dynamic environments. The underwater environment is extremely dynamic, including sudden changes in lighting conditions, floating particles, and water flow fluctuations. These factors can significantly affect image quality and cause performance fluctuations in the classification model. Existing algorithms based on the spatial domain are often unable to cope with lighting changes, while frequency domain methods are easily interfered by sudden noise, resulting in distortion of spectral features and further weakening classification stability. Therefore, the existing technology performs poorly in dynamic environments, cannot achieve stable classification in complex underwater scenes, and lacks effective auxiliary strategies to improve the classification effect. Although some studies have tried to use frequency domain features for auxiliary classification, most of them use simple splicing or cascade processing, which fails to give full play to the complementary advantages of frequency domain and spatial domain features. The existing technology has not yet proposed an efficient weight allocation strategy to balance the contribution of features in different domains, so that the classifier can dynamically adjust its dependence on frequency domain and spatial domain information in different scenarios. This inflexible feature fusion method limits the classification ability of the model. Summary of the invention
[0005] In order to solve the above technical problems, the purpose of the present invention is to provide an underwater image recognition and classification method and system based on frequency domain assisted deep learning, which classifies underwater scenes by combining spatial domain and frequency domain features, thereby improving the efficiency and accuracy of underwater image feature extraction.
[0006] The first technical solution adopted by the present invention is: an underwater image recognition and classification method based on frequency domain assisted deep learning, comprising the following steps: Acquire an underwater image to be identified; Combine the image classifier, frequency domain classification assistant and adaptive auxiliary strategy module to build an underwater image recognition network model; Based on the underwater image recognition network model, the underwater image to be identified is subjected to spatial domain and frequency domain recognition fusion processing to obtain the underwater image recognition result.
[0007] Furthermore, the underwater image recognition network model specifically includes an image classifier, a frequency domain classification assistant and an adaptive auxiliary strategy module, the output end of the image classifier is connected to the first input end of the adaptive auxiliary strategy module, and the output end of the frequency domain classification assistant is connected to the second input end of the adaptive auxiliary strategy module, wherein: The image classifier includes a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a plurality of first residual modules, a first global average pooling layer and a first fully connected layer; The frequency domain classification assistant includes a second convolutional layer, a second batch normalization layer, a second maximum pooling layer, several second residual modules, a multi-band compressed attention mechanism module, a second global average pooling layer and a second fully connected layer. The several second residual modules include a first residual block, a second residual block, a third residual block and a fourth residual block. The multi-band compressed attention mechanism module includes a first multi-band compressed attention mechanism module, a second multi-band compressed attention mechanism module and a third multi-band compressed attention mechanism module.
[0008] Furthermore, the step of performing spatial domain and frequency domain recognition fusion processing on the underwater image to be recognized based on the underwater image recognition network model to obtain the underwater image recognition result specifically includes: Inputting the underwater image to be identified into the underwater image recognition network model; An image classifier based on an underwater image recognition network model performs spatial feature extraction processing on the underwater image to be identified, thereby obtaining the spatial features of the underwater image to be identified; A frequency domain classification assistant based on an underwater image recognition network model performs frequency domain feature extraction processing on the underwater image to be identified, thereby obtaining the frequency domain features of the underwater image to be identified; The adaptive auxiliary strategy module based on the underwater image recognition network model performs weighted fusion of the spatial domain features of the underwater image to be identified and the frequency domain features of the underwater image to be identified to obtain the underwater image recognition result.
[0009] Furthermore, the image classifier based on the underwater image recognition network model performs spatial feature extraction processing on the underwater image to be identified to obtain the spatial features of the underwater image to be identified, which specifically includes: Inputting the underwater image to be recognized into the image classifier of the underwater image recognition network model; Based on the first convolutional layer of the image classifier, feature extraction processing is performed on the underwater image to be identified to obtain a first underwater feature image to be identified; Based on a first batch normalization layer of the image classifier, a nonlinear processing is performed on the first underwater feature image to be identified to obtain a first nonlinearized underwater feature image to be identified; Based on the first maximum pooling layer of the image classifier, a pooling process is performed on the underwater feature image to be identified after the first nonlinearization to obtain the underwater feature image to be identified after the first pooling; Based on a plurality of first residual modules of the image classifier, deep feature extraction processing is performed on the underwater feature image to be identified after the first pooling to obtain preliminary spatial domain features of the underwater image to be identified; Based on the first global average pooling layer of the image classifier, the spatial features of the preliminary underwater image to be identified are pooled to obtain the spatial features of the pooled underwater image to be identified; Based on the first fully connected layer of the image classifier, feature mapping is performed on the pooled spatial features of the underwater image to be identified to obtain the spatial features of the underwater image to be identified.
[0010] Furthermore, the frequency domain classification assistant based on the underwater image recognition network model performs frequency domain feature extraction processing on the underwater image to be identified to obtain the frequency domain features of the underwater image to be identified, which specifically includes: Inputting the underwater image to be identified into the frequency domain classification assistant of the underwater image recognition network model; Based on the second convolutional layer of the frequency domain classification assistant, feature extraction processing is performed on the underwater image to be identified to obtain a second underwater feature image to be identified; Based on the second batch normalization layer of the image classifier, nonlinear processing is performed on the first underwater feature image to be identified to obtain a second nonlinearized underwater feature image to be identified; Based on the second maximum pooling layer of the image classifier, a pooling process is performed on the underwater feature image to be identified after the second nonlinearization to obtain the underwater feature image to be identified after the second pooling; Based on a plurality of second residual modules of the image classifier, deep feature extraction processing is performed on the underwater feature image to be identified after the second pooling to obtain preliminary frequency domain features of the underwater image to be identified; Based on the multi-band compression attention mechanism module of the frequency domain classification assistant, the target information is extracted from the frequency domain features of the preliminary underwater image to be identified, and the multi-frequency domain degradation information of the underwater image to be identified is obtained; The frequency domain features of the preliminary underwater image to be identified are combined with the multi-frequency domain degradation information of the underwater image to be identified and input into the second global average pooling layer of the frequency domain classification assistant for pooling processing to obtain the frequency domain features of the underwater image to be identified after pooling; Based on the second fully connected layer of the frequency domain classification assistant, feature mapping is performed on the frequency domain features of the pooled underwater image to be identified to obtain the frequency domain features of the underwater image to be identified.
[0011] Furthermore, the multi-band compression attention mechanism module based on the frequency domain classification assistant performs target information extraction processing on the frequency domain features of the preliminary underwater image to be identified to obtain the multi-frequency domain degradation information of the underwater image to be identified, which specifically includes: Based on the multi-band compression attention mechanism module of the frequency domain classification assistant, the frequency domain features of the preliminary underwater image to be identified are Fourier transformed to obtain the frequency domain information of the underwater image to be identified; Performing discrete Fourier transform on the frequency domain information of the underwater image to be identified to obtain the amplitude component of the frequency domain information of the underwater image to be identified; The frequency domain information of the underwater image to be identified is decentralized, and the amplitude component of the frequency domain information of the underwater image to be identified is moved to the center of the spectrum to obtain the Euclidean distance from the center of the spectrum to the target point; Based on the Euclidean distance from the center of the spectrum to the target point, multiple frequency bands are selected and inverse Fourier transform is performed to obtain the multi-frequency domain degradation information of the underwater image to be identified.
[0012] Furthermore, the adaptive auxiliary strategy module based on the underwater image recognition network model performs weighted fusion on the spatial domain features of the underwater image to be recognized and the frequency domain features of the underwater image to be recognized to obtain the underwater image recognition result, which specifically includes: An adaptive auxiliary strategy module based on the underwater image recognition network model defines the loss value of the image classifier and the loss value of the frequency domain classification assistant; Obtain an error loss value between the loss value of the image classifier and the loss value of the frequency domain classification auxiliary, and determine a balancing weight parameter according to the error loss value; After updating the balance weight parameters by gradient descent, the spatial domain features of the underwater image to be identified and the frequency domain features of the underwater image to be identified are weightedly fused to obtain the underwater image recognition result.
[0013] Furthermore, the calculation expression of the weighted fusion is specifically as follows: ; In the above formula, represents the underwater image recognition result, represents the balance weight parameter, represents the spatial features of the underwater image to be identified, Represents the frequency domain features of the underwater image to be identified.
[0014] The second technical solution adopted by the present invention is: an underwater image recognition and classification system based on frequency domain assisted deep learning, comprising: The first module is used to obtain an underwater image to be identified; The second module is used to build an underwater image recognition network model by combining the image classifier, the frequency domain classification assistant and the adaptive auxiliary strategy module; The third module is used to perform spatial domain and frequency domain recognition fusion processing on the underwater image to be recognized based on the underwater image recognition network model to obtain the underwater image recognition result.
[0015] The beneficial effects of the method and system of the present invention are as follows: the present invention acquires an underwater image to be identified, further combines an image classifier, a frequency domain classification assistant and an adaptive auxiliary strategy module, constructs an underwater image recognition network model, and classifies underwater scenes by combining spatial domain and frequency domain features. The spatial domain features focus on the direct visual content of the image, while the frequency domain features utilize Fourier transform to extract the global frequency information of the image, utilize a multi-band compressed attention mechanism to strengthen the feature extraction of key frequency bands, and further based on the underwater image recognition network model, performs spatial domain and frequency domain recognition fusion processing on the underwater image to be identified, thereby improving the efficiency and accuracy of underwater image feature extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 It is a flowchart of the steps of the underwater image recognition and classification method based on frequency domain assisted deep learning of the present invention; Figure 2 It is a structural block diagram of the underwater image recognition and classification system based on frequency domain assisted deep learning of the present invention; Figure 3 It is a structural schematic diagram of an underwater image recognition network model provided by a specific embodiment of the present invention; Figure 4 is a structural schematic diagram of an image classifier provided by a specific embodiment of the present invention; Figure 5 is a structural schematic diagram of a frequency domain classification assistant provided by a specific embodiment of the present invention; Figure 6 It is a structural diagram of a multi-band compression attention mechanism module provided in a specific embodiment of the present invention. DETAILED DESCRIPTION
[0017] The present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only provided for the convenience of explanation and description, and the order between the steps is not limited in any way. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.
[0018] Reference Figure 1 The present invention provides an underwater image recognition and classification method based on frequency domain assisted deep learning, the method comprising the following steps: S100, obtaining an underwater image to be identified; S200, combining image classifier, frequency domain classification assistant and adaptive auxiliary strategy module to build underwater image recognition network model; Specifically, the underwater image recognition network model specifically includes an image classifier, a frequency domain classification assistant and an adaptive auxiliary strategy module. The output end of the image classifier is connected to the first input end of the adaptive auxiliary strategy module, and the output end of the frequency domain classification assistant is connected to the second input end of the adaptive auxiliary strategy module. The image classifier includes a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, several first residual modules, a first global average pooling layer and a first fully connected layer; the frequency domain classification assistant includes a second convolutional layer, a second batch normalization layer, a second maximum pooling layer, several second residual modules, a multi-band compressed attention mechanism module, a second global average pooling layer and a second fully connected layer. The several second residual modules include a first residual block, a second residual block, a third residual block and a fourth residual block. The multi-band compressed attention mechanism module includes a first multi-band compressed attention mechanism module, a second multi-band compressed attention mechanism module and a third multi-band compressed attention mechanism module.
[0019] In this embodiment, if Figure 3 As shown, the network model proposed in the embodiment of the present invention mainly includes three parts: an image classifier, a frequency domain classification assistant, and a classification auxiliary strategy. The image classifier is the main body of the network, which is responsible for extracting features from the input underwater image and classifying it. The goal of the image classifier is to map the input image to a predefined category. The frequency domain classification assistant focuses on the frequency domain features of the image. The design of this part is based on the representation of the image after conversion to the frequency domain (such as through fast Fourier transform). Features in the frequency domain can sometimes reveal details that are not easy to observe in the air domain, such as periodic structures, edge information, etc. These features can be very useful for enhancing the performance of the classifier, especially in the classification of underwater images that are visually blurred or of poor quality. The classification auxiliary strategy is a method of combining the outputs of the image classifier and the frequency domain classification assistant to improve the overall classification accuracy. The strategy includes fusion technology and a weighted average decision mechanism, aiming to obtain the best comprehensive results from the two classifiers.
[0020] S300, based on the underwater image recognition network model, performing spatial domain and frequency domain recognition fusion processing on the underwater image to be recognized to obtain the underwater image recognition result.
[0021] S310, inputting the underwater image to be recognized into the underwater image recognition network model; S320, performing spatial feature extraction processing on the underwater image to be identified by an image classifier based on the underwater image recognition network model to obtain spatial features of the underwater image to be identified; Specifically, the underwater image to be identified is input into the image classifier of the underwater image recognition network model; based on the first convolutional layer of the image classifier, feature extraction processing is performed on the underwater image to be identified to obtain a first underwater feature image to be identified; based on the first batch normalization layer of the image classifier, nonlinear processing is performed on the first underwater feature image to be identified to obtain a first nonlinear underwater feature image to be identified; based on the first maximum pooling layer of the image classifier, pooling processing is performed on the first nonlinear underwater feature image to be identified to obtain a first pooled underwater feature image to be identified; based on several first residual modules of the image classifier, deep feature extraction processing is performed on the first pooled underwater feature image to be identified to obtain preliminary spatial features of the underwater image to be identified; based on the first global average pooling layer of the image classifier, pooling processing is performed on the preliminary spatial features of the underwater image to be identified to obtain the spatial features of the pooled underwater image to be identified; based on the first fully connected layer of the image classifier, feature mapping processing is performed on the spatial features of the pooled underwater image to be identified to obtain the spatial features of the underwater image to be identified.
[0022] In this embodiment, the structure of the image classifier is a common resnet50 residual network, such as Figure 4 As shown in the figure, the network from input to output includes: first a 7x7 convolution layer to extract the primary features of the image, followed by a batch normalization layer and a ReLU activation function, which contribute to the stability and nonlinear processing capabilities of the network. Next, a 3x3 maximum pooling layer is used to reduce the feature dimension and maintain the invariance of the features. The core of the network consists of multiple residual modules, including 3, 4, 6 and 3 residual blocks respectively. These modules prevent the gradient vanishing problem through jump connections, allowing the network to learn complex features more deeply. Finally, the final classification result is integrated and output through a global average pooling layer and a fully connected layer. This structure is particularly suitable for processing complex image recognition tasks because it effectively learns rich feature representations through deep networks and residual connections.
[0023] S330, a frequency domain classification assistant based on the underwater image recognition network model performs frequency domain feature extraction processing on the underwater image to be recognized to obtain frequency domain features of the underwater image to be recognized; Specifically, the underwater image to be identified is input into the frequency domain classification assistant of the underwater image recognition network model; based on the second convolution layer of the frequency domain classification assistant, the underwater image to be identified is subjected to feature extraction processing to obtain a second underwater feature image to be identified; based on the second batch normalization layer of the image classifier, the first underwater feature image to be identified is subjected to nonlinear processing to obtain a second nonlinear underwater feature image to be identified; based on the second maximum pooling layer of the image classifier, the second nonlinear underwater feature image to be identified is subjected to pooling processing to obtain a second pooled underwater feature image to be identified; based on a plurality of second residual modules of the image classifier, the second pooled underwater feature image to be identified is subjected to Deep feature extraction processing is performed to obtain preliminary frequency domain features of the underwater image to be identified; based on the multi-band compression attention mechanism module of the frequency domain classification assistant, target information extraction processing is performed on the frequency domain features of the preliminary underwater image to be identified to obtain multi-frequency domain degradation information of the underwater image to be identified; the frequency domain features of the preliminary underwater image to be identified and the multi-frequency domain degradation information of the underwater image to be identified are combined and input into the second global average pooling layer of the frequency domain classification assistant for pooling processing to obtain the frequency domain features of the pooled underwater image to be identified; based on the second fully connected layer of the frequency domain classification assistant, feature mapping processing is performed on the frequency domain features of the pooled underwater image to be identified to obtain the frequency domain features of the underwater image to be identified.
[0024] In this embodiment, the frequency domain classification assistant, such as Figure 5 As shown in the figure, the 2D Fourier frequency domain information is processed to extract the degraded features of the frequency domain information in the underwater scene image, and the accuracy of underwater scene classification is optimized according to the classification contribution proposed by the auxiliary image classifier and the image classifier to a certain scene category. The network from input to output includes: first, a 7x7 convolution layer is used to extract the primary features of the image, followed by a batch normalization layer and a ReLU activation function, which contribute to the stability and nonlinear processing ability of the network. Next, a 3x3 maximum pooling layer is used to reduce the feature dimension and maintain the invariance of the features. The core of the network consists of multiple residual modules, including 3, 4, 6 and 3 residual blocks respectively. These modules prevent the gradient vanishing problem through jump connections, allowing the network to learn complex features more deeply. Finally, the final classification result is integrated and output through a global average pooling layer and a fully connected layer. This structure is particularly suitable for processing complex image recognition tasks because it effectively learns rich feature representations through deep networks and residual connections. As for the frequency domain classification assistant, in order to more effectively utilize the degradation features contained in the amplitude information in the frequency domain after Fourier transform, the embodiment of the present invention specifically designs a multi-band compression attention mechanism to extract the multi-band degradation information in each residual block feature and fuse it to the next level for feature extraction.
[0025] Among them, it should be noted that the data processing process of the multi-band compressed attention mechanism module is as follows: the multi-band compressed attention mechanism module based on the frequency domain classification assistant performs Fourier transform on the preliminary frequency domain features of the underwater image to be identified to obtain the frequency domain information of the underwater image to be identified; performs discrete Fourier transform on the frequency domain information of the underwater image to be identified to obtain the amplitude component of the frequency domain information of the underwater image to be identified; decentralizes the frequency domain information of the underwater image to be identified, and moves the amplitude component of the frequency domain information of the underwater image to be identified to the center of the spectrum to obtain the Euclidean distance from the center of the spectrum to the target point; selects multiple frequency bands based on the Euclidean distance from the center of the spectrum to the target point and performs inverse Fourier transform to obtain multi-frequency domain degradation information of the underwater image to be identified.
[0026] In this embodiment, the multi-band compression attention mechanism is as follows Figure 6 As shown in the figure, the specific design is to first perform a two-dimensional Fourier transform on the input image, extract the amplitude components containing degradation information in different frequency bands for compression excitation, and then learn the degradation features that are more relevant to the image, and feed them into the next-level residual block to improve the network's ability to extract degradation features of underwater scene images. Specifically, the image signal is converted from the spatial domain to the frequency domain, and its expression is: ; in, represents an image in the spatial domain, Represents the result of Fourier transform, that is, the frequency domain signal of the image.
[0027] Further Perform DFT transformation to obtain its discrete result, which is expressed as: ; In the above formula, and is the size of the image, and are the frequency domain coordinates.
[0028] Then the corresponding amplitude component after discrete Fourier transform is expressed as: ; In the above formula, and Represents the real and imaginary parts of frequency domain information.
[0029] In order to obtain more comprehensive degradation information, the embodiment of the present invention uses a multi-band selection method to process the frequency domain signal. The frequency domain information after Fourier transformation is first centralized to move the low-frequency component to the center of the spectrum. The expression is: ; Then, based on the distance from the center of the spectrum to the target point The Euclidean distance is set by different radii. To define the selection of multiple frequency bands. For a given radius arrive The corresponding mask is defined as: ; Then, the selected frequency band is applied to the centralized Fourier transform and then returned to the spatial domain through the inverse Fourier transform to obtain the degradation information of the corresponding frequency band, which is expressed as: ; In the above formula, Represents image degradation information in multiple frequency bands.
[0030] This information is fed into the branch of compression excitation to obtain degradation features that are more relevant to the image. Scaling operation is then performed with the original input to obtain a feature expression containing more representative degradation information, which is then fed into the frequency domain auxiliary classification network.
[0031] S340, an adaptive auxiliary strategy module based on an underwater image recognition network model performs weighted fusion on the spatial domain features of the underwater image to be recognized and the frequency domain features of the underwater image to be recognized to obtain an underwater image recognition result.
[0032] Specifically, based on the adaptive auxiliary strategy module of the underwater image recognition network model, the loss value of the image classifier and the loss value of the frequency domain classification auxiliary are defined; the error loss value between the loss value of the image classifier and the loss value of the frequency domain classification auxiliary is obtained, and the balance weight parameter is determined according to the error loss value; after the balance weight parameter is updated by gradient descent, the spatial domain features of the underwater image to be identified and the frequency domain features of the underwater image to be identified are weightedly fused to obtain the underwater image recognition result.
[0033] First of all, it should be noted that in order to better utilize frequency domain information to assist deep learning networks in classifying underwater scenes, the embodiment of the present invention proposes an adaptive auxiliary strategy. In general, in the image classification framework combining frequency domain and spatial domain information, the weight parameters are dynamically adjusted. It is one of the key strategies, which aims to maximize the complementary advantages of the two information sources. The framework extracts and utilizes the global structural and local visual features of the image through frequency domain classifiers and spatial domain classifiers respectively. By weighted averaging the outputs of the two classifiers, the framework is able to integrate the global features of the frequency domain and the detailed features of the spatial domain, thereby improving the final classification accuracy.
[0034] Furthermore, in this embodiment, the basic idea of the adaptive auxiliary strategy is to calculate the training loss values of the two classifiers and dynamically adjust them according to the magnitude of the two training loss values. This value, specifically, first defines the loss function. The loss function selected in the embodiment of the present invention is to calculate the cross entropy value as the loss value of training. The prediction result output by each classifier will be evaluated by the cross entropy loss function. For the spatial domain classifier and the frequency domain classifier, the loss functions are: ; ; ; in, and Represented as the output of the spatial domain, frequency domain and final classifier respectively, is the true value.
[0035] The adjustment of can be based on the feedback of the relative performance of the frequency domain and spatial domain classifiers. Calculate the loss value of the frequency domain classification assistant and the image assistant , calculate the loss error between the two, and adjust The specific adjustment strategies are as follows: ; in, is the learning rate parameter, used to control The adjustment speed, is the sigmoid function, which is used to convert The value of is limited to between 0 and 1.
[0036] To ensure Updates correctly reflect loss improvements during training, Updated by gradient descent, the expression is: ; In the above formula, is the learning rate, yes about gradient.
[0037] Finally, the weighted average is used to combine the outputs of the two classifiers to obtain the final prediction result. , whose expression is: ; In the above formula, represents the underwater image recognition result, represents the balance weight parameter, represents the spatial features of the underwater image to be identified, Represents the frequency domain features of the underwater image to be identified.
[0038] This approach ensures that the model fully exploits the strengths of both classifiers while automatically adjusting their relative contributions to optimize overall performance.
[0039] In summary, the embodiments of the present invention classify underwater scenes by combining spatial domain and frequency domain features. Spatial domain features focus on the direct visual content of the image, while frequency domain features use Fourier transform to extract the global frequency information of the image, which is particularly critical for understanding the degradation pattern of the image. The frequency domain classification assistant performs Fourier transform on the image and uses a multi-band compression attention mechanism to enhance the feature extraction of key frequency bands. This processing emphasizes the degradation information in underwater scenes, such as scattering and blur, which is easier to identify and process in the frequency domain. The multi-band compression attention mechanism enhances and compresses specific frequency bands in the frequency domain to highlight the frequency features that are most important for scene classification, thereby improving the efficiency and accuracy of feature extraction.
[0040] Therefore, the embodiment of the present invention combines information processing technology in the air domain and frequency domain to improve the classification ability of underwater complex scenes, especially in the case of image quality degradation, and uses an adaptive strategy to dynamically adjust the weights of the air domain and frequency domain classifier outputs to optimize the classification results. This strategy allows the model to automatically optimize according to real-time performance feedback, improves the adaptability and accuracy of the model, and introduces a multi-band compression attention mechanism to enhance the model's sensitivity and extraction ability to degraded information in the frequency domain, which is the key to improving the model's classification accuracy for degraded underwater scenes.
[0041] The advantages of the embodiments of the present invention compared with the prior art are: 1) To address the problem that the underwater scene classification accuracy is limited due to incomplete degradation information of underwater images in the limitation of a single processing domain, an embodiment of the present invention proposes a classification method that integrates spatial domain and frequency domain information. This method significantly improves the classification accuracy of underwater scene images by fully capturing and utilizing the degradation features of underwater images.
[0042] 2) In order to solve the problem that traditional underwater image processing technology is difficult to effectively extract key features under specific degradation modes, the embodiment of the present invention develops a multi-band compressed attention mechanism. This mechanism can accurately identify and strengthen the frequency domain features that are critical to classification decisions, thereby optimizing the feature extraction process.
[0043] 3) In order to solve the problem that existing methods are not adaptable enough in dynamic underwater environments, the embodiment of the present invention introduces an adaptive auxiliary classification strategy to dynamically adjust the output weights of the spatial and frequency domain classifiers according to real-time training feedback. This strategy effectively combines the advantages of the two classifiers and further improves the model's responsiveness to complex underwater scenes and overall classification performance.
[0044] Reference Figure 2, underwater image recognition and classification system based on frequency domain assisted deep learning, including: The first module 201 is used to obtain an underwater image to be identified; The second module 202 is used to build an underwater image recognition network model by combining the image classifier, the frequency domain classification assistant and the adaptive auxiliary strategy module; The third module 203 is used to perform spatial domain and frequency domain recognition fusion processing on the underwater image to be recognized based on the underwater image recognition network model to obtain the underwater image recognition result.
[0045] The contents of the above method embodiments are all applicable to the present system embodiments. The functions specifically implemented by the present system 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 method embodiments.
[0046] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. An underwater image recognition and classification method based on frequency domain assisted deep learning, characterized in that: The following steps are involved: Acquire an underwater image to be identified; Combine the image classifier, frequency domain classification assistant and adaptive auxiliary strategy module to build an underwater image recognition network model; Based on the underwater image recognition network model, the underwater image to be identified is subjected to spatial domain and frequency domain recognition fusion processing to obtain the underwater image recognition result.
2. According to claim 1, the underwater image recognition and classification method based on frequency domain assisted deep learning is characterized in that: The underwater image recognition network model specifically includes an image classifier, a frequency domain classification assistant and an adaptive auxiliary strategy module, wherein the output end of the image classifier is connected to the first input end of the adaptive auxiliary strategy module, and the output end of the frequency domain classification assistant is connected to the second input end of the adaptive auxiliary strategy module, wherein: The image classifier includes a first convolutional layer, a first batch normalization layer, a first maximum pooling layer, a plurality of first residual modules, a first global average pooling layer and a first fully connected layer; The frequency domain classification assistant includes a second convolutional layer, a second batch normalization layer, a second maximum pooling layer, several second residual modules, a multi-band compressed attention mechanism module, a second global average pooling layer and a second fully connected layer. The several second residual modules include a first residual block, a second residual block, a third residual block and a fourth residual block. The multi-band compressed attention mechanism module includes a first multi-band compressed attention mechanism module, a second multi-band compressed attention mechanism module and a third multi-band compressed attention mechanism module.
3. The underwater image recognition and classification method based on frequency domain assisted deep learning according to claim 2 is characterized in that: The step of performing spatial domain and frequency domain recognition fusion processing on the underwater image to be recognized based on the underwater image recognition network model to obtain the underwater image recognition result specifically includes: Inputting the underwater image to be recognized into the underwater image recognition network model; An image classifier based on an underwater image recognition network model performs spatial feature extraction processing on the underwater image to be identified, thereby obtaining the spatial features of the underwater image to be identified; A frequency domain classification assistant based on an underwater image recognition network model performs frequency domain feature extraction processing on the underwater image to be identified, thereby obtaining the frequency domain features of the underwater image to be identified; The adaptive auxiliary strategy module based on the underwater image recognition network model performs weighted fusion of the spatial domain features of the underwater image to be identified and the frequency domain features of the underwater image to be identified to obtain the underwater image recognition result.
4. The underwater image recognition and classification method based on frequency domain assisted deep learning according to claim 3 is characterized in that: The image classifier based on the underwater image recognition network model performs spatial feature extraction processing on the underwater image to be identified to obtain the spatial features of the underwater image to be identified, which specifically includes: Inputting the underwater image to be recognized into the image classifier of the underwater image recognition network model; Based on the first convolutional layer of the image classifier, feature extraction processing is performed on the underwater image to be identified to obtain a first underwater feature image to be identified; Based on a first batch normalization layer of the image classifier, a nonlinear processing is performed on the first underwater feature image to be identified to obtain a first nonlinearized underwater feature image to be identified; Based on the first maximum pooling layer of the image classifier, a pooling process is performed on the underwater feature image to be identified after the first nonlinearization to obtain the underwater feature image to be identified after the first pooling; Based on a plurality of first residual modules of the image classifier, deep feature extraction processing is performed on the underwater feature image to be identified after the first pooling to obtain preliminary spatial domain features of the underwater image to be identified; Based on the first global average pooling layer of the image classifier, the spatial features of the preliminary underwater image to be identified are pooled to obtain the spatial features of the pooled underwater image to be identified; Based on the first fully connected layer of the image classifier, feature mapping is performed on the pooled spatial features of the underwater image to be identified to obtain the spatial features of the underwater image to be identified.
5. The underwater image recognition and classification method based on frequency domain assisted deep learning according to claim 4 is characterized in that: The frequency domain classification assistant based on the underwater image recognition network model performs frequency domain feature extraction processing on the underwater image to be identified to obtain the frequency domain features of the underwater image to be identified. The step specifically includes: Inputting the underwater image to be identified into the frequency domain classification assistant of the underwater image recognition network model; Based on the second convolutional layer of the frequency domain classification assistant, feature extraction processing is performed on the underwater image to be identified to obtain a second underwater feature image to be identified; Based on the second batch normalization layer of the image classifier, nonlinear processing is performed on the first underwater feature image to be identified to obtain a second nonlinearized underwater feature image to be identified; Based on the second maximum pooling layer of the image classifier, a pooling process is performed on the underwater feature image to be identified after the second nonlinearization to obtain the underwater feature image to be identified after the second pooling; Based on a plurality of second residual modules of the image classifier, deep feature extraction processing is performed on the underwater feature image to be identified after the second pooling to obtain preliminary frequency domain features of the underwater image to be identified; Based on the multi-band compression attention mechanism module of the frequency domain classification assistant, the target information is extracted from the frequency domain features of the preliminary underwater image to be identified, and the multi-frequency domain degradation information of the underwater image to be identified is obtained; The frequency domain features of the preliminary underwater image to be identified are combined with the multi-frequency domain degradation information of the underwater image to be identified and input into the second global average pooling layer of the frequency domain classification assistant for pooling processing to obtain the frequency domain features of the underwater image to be identified after pooling; Based on the second fully connected layer of the frequency domain classification assistant, feature mapping is performed on the frequency domain features of the pooled underwater image to be identified to obtain the frequency domain features of the underwater image to be identified.
6. The underwater image recognition and classification method based on frequency domain assisted deep learning according to claim 5 is characterized in that: The multi-band compression attention mechanism module based on the frequency domain classification assistant performs target information extraction processing on the frequency domain features of the preliminary underwater image to be identified to obtain the multi-frequency domain degradation information of the underwater image to be identified, which specifically includes: Based on the multi-band compression attention mechanism module of the frequency domain classification assistant, the frequency domain features of the preliminary underwater image to be identified are Fourier transformed to obtain the frequency domain information of the underwater image to be identified; Performing discrete Fourier transform on the frequency domain information of the underwater image to be identified to obtain the amplitude component of the frequency domain information of the underwater image to be identified; The frequency domain information of the underwater image to be identified is decentralized, and the amplitude component of the frequency domain information of the underwater image to be identified is moved to the center of the spectrum to obtain the Euclidean distance from the center of the spectrum to the target point; Based on the Euclidean distance from the center of the spectrum to the target point, multiple frequency bands are selected and inverse Fourier transform is performed to obtain the multi-frequency domain degradation information of the underwater image to be identified.
7. The underwater image recognition and classification method based on frequency domain assisted deep learning according to claim 6 is characterized in that: The adaptive auxiliary strategy module based on the underwater image recognition network model performs weighted fusion on the spatial domain features of the underwater image to be recognized and the frequency domain features of the underwater image to be recognized to obtain the underwater image recognition result, which specifically includes: An adaptive auxiliary strategy module based on the underwater image recognition network model defines the loss value of the image classifier and the loss value of the frequency domain classification assistant; Obtain an error loss value between the loss value of the image classifier and the loss value of the frequency domain classification auxiliary, and determine a balancing weight parameter according to the error loss value; After updating the balance weight parameters by gradient descent, the spatial domain features of the underwater image to be identified and the frequency domain features of the underwater image to be identified are weightedly fused to obtain the underwater image recognition result.
8. The underwater image recognition and classification method based on frequency domain assisted deep learning according to claim 7 is characterized in that: The calculation expression of the weighted fusion is specifically as follows: ; In the above formula, represents the underwater image recognition result, represents the balance weight parameter, represents the spatial features of the underwater image to be identified, Represents the frequency domain features of the underwater image to be identified.
9. Underwater image recognition and classification system based on frequency domain assisted deep learning, characterized in that: Includes the following modules: The first module is used to obtain an underwater image to be identified; The second module is used to build an underwater image recognition network model by combining the image classifier, the frequency domain classification assistant and the adaptive auxiliary strategy module; The third module is used to perform spatial domain and frequency domain recognition fusion processing on the underwater image to be recognized based on the underwater image recognition network model to obtain the underwater image recognition result.
Citation Information
Patent Citations
Image definition determining method and device
CN111932510A
Small sample image classification method based on frequency domain analysis
CN117372782A
Rolling bearing fault diagnosis method
CN117495812A
Deep counterfeit compressed face image identification method based on deep learning
CN119541058A