SAR (Synthetic Aperture Radar) deepwater gravity type net cage identification method and system based on frequency domain characteristics

By constructing high- and low-frequency attention modules and residual connection mechanisms based on frequency domain features, the problem of speckle noise interference in SAR images was solved, enabling high-precision identification of deep-water gravity cages and meeting the monitoring needs of complex marine environments.

CN121505437APending Publication Date: 2026-02-10GUANGDONG MECHANICAL & ELECTRICAL COLLEGE +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511725147.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-24
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Existing SAR image recognition technologies suffer from problems such as unbalanced speckle noise processing, insufficient utilization of shallow features, inadequate adaptability of conventional attention mechanisms, and severe feature transfer loss in deep-water gravity cage identification, resulting in insufficient recognition accuracy and poor robustness.

Method used

By constructing high- and low-frequency attention modules for frequency domain features, and combining local windowing and global pooling attention mechanisms, high-frequency noise and low-frequency structural features of SAR images are specifically processed. A residual connection mechanism is introduced for feature fusion to improve the accuracy of feature extraction and recognition.

Benefits of technology

It effectively suppresses speckle noise, preserves detailed information about the cages, improves the identification accuracy and robustness of deep-water gravity cages, and adapts to the monitoring needs of complex marine environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121505437A_ABST
    Figure CN121505437A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence, in particular to an SAR deepwater gravity type net cage recognition method and system based on frequency domain characteristics, and the method comprises the steps: carrying out the preprocessing of an SAR image, obtaining a standardized SAR image, and obtaining shallow layer characteristics, middle layer characteristics and deep layer characteristics; the superficial layer feature map is converted into a feature matrix through dimensionality, and a high-frequency feature map is extracted through a high-frequency attention module; extracting a low-frequency feature map through a low-frequency attention module, and performing splicing in a channel dimension and projection matrix transformation to obtain a fused feature map; connecting and fusing the fused feature map and the shallow feature residual to obtain a final feature map; performing cross-scale feature fusion on the final feature map, the middle-layer features and the deep-layer features, and inputting a detection head to output a bounding box, confidence and category of the net cage; performing non-maximum suppression processing on the bounding box to obtain a final recognition result of the deepwater gravity type net cage; the identification performance of the deepwater gravity type net cage in a complex marine environment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, specifically to a SAR deep-water gravity-based cage identification method and system based on frequency domain features. Background Technology

[0002] Deep-sea aquaculture is a core direction for the sustainable development of global fisheries, and deep-sea gravity cages have become key equipment for large-scale aquaculture due to their adaptability to the complex environment of the open ocean. However, cages are deployed far from shore, the equipment is expensive, and they are susceptible to extreme sea conditions such as typhoons and giant waves. Damage or escape of farmed organisms can cause serious economic losses and disrupt the marine ecological balance. Therefore, achieving real-time, high-precision identification and monitoring of open-sea cages is a core requirement for ensuring the safety of deep-sea aquaculture.

[0003] Traditional methods for monitoring marine cages mainly include manual inspection, optical remote sensing, and millimeter-wave radar technology, but each has significant limitations. Manual inspection is limited by distance and inclement weather, making routine monitoring difficult. Optical remote sensing is easily affected by cloud cover and lighting conditions, significantly reducing its monitoring capabilities in complex sea conditions. In contrast, Synthetic Aperture Radar (SAR), with its all-weather, day-and-night operation, is unaffected by lighting and weather conditions and has become a core tool for marine target monitoring. However, spaceborne SAR typically uses millimeter-wave imaging, whose principles differ significantly from visible light imaging. Furthermore, the inherent speckle noise in SAR images is often mistakenly treated as optical noise, ignoring the influence of factors such as skin depth and surface roughness, thus limiting the accurate detection of sea surface targets. In addition, deep-water gravity-fed cages appear as low-contrast, small-sized targets in SAR images, with little difference in grayscale from the seawater background. Combined with interference from waves and aquaculture facilities, this further increases the difficulty of target identification. Existing target recognition methods based on SAR images face problems such as difficulty in feature extraction, insufficient recognition accuracy, and poor robustness in cage identification tasks, making it difficult to meet the needs of rapid and accurate monitoring of cages in practical applications. Summary of the Invention

[0004] To address the aforementioned issues, this invention provides a SAR deep-water gravity cage identification method and system based on frequency domain features. From a data-driven perspective, a frequency decoupling module is constructed, and the marine speckle noise level is fitted through model training. The SAR image is then denoised within the model, achieving high-precision and robust detection of deep-water gravity cages in complex marine environments.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] On one hand, embodiments of the present invention provide a SAR deep-water gravity-based cage identification method based on frequency domain features, the method comprising the following steps:

[0007] S100: Acquire SAR images, preprocess SAR images to obtain standardized SAR images;

[0008] S200, the standardized SAR image is input into the pre-trained cage identification model, and shallow features, middle features and deep features are extracted based on the standardized SAR image;

[0009] S300: The shallow feature map is converted into a feature matrix by changing its dimensions. A high-frequency attention module is used to model high-frequency details in the feature matrix, outputting a high-frequency feature map. A low-frequency attention module is used to enhance the low-frequency structural features of the feature matrix, outputting a low-frequency feature map. The high-frequency and low-frequency feature maps are concatenated along the channel dimension and transformed by a projection matrix to obtain a fused feature map. The fused feature map is then fused with the shallow features using residual connections to obtain the final feature map.

[0010] S400, the final feature map is fused with the mid-level and deep-level features across scales, and the result is input into the detection head to output the bounding box, confidence level, and category of the cage; non-maximum suppression processing is performed on the bounding box to obtain the final recognition result of the deep-water gravity cage.

[0011] Optionally, in S100, the preprocessing of the SAR image includes:

[0012] Radiometric correction is performed on the acquired SAR image, geometric correction is performed on the radiometrically corrected SAR image, and grayscale normalization is performed on the geometrically corrected SAR image to obtain a standardized SAR image with pixel values ​​within a preset range.

[0013] The standardized SAR image is scaled down to a single-channel grayscale image, and the single-channel grayscale image is then expanded into a three-channel image.

[0014] Optionally, in S200, the extraction of shallow features, mid-level features, and deep features based on the standardized SAR image includes:

[0015] S210, the standardized SAR image is input to the input layer, and the three-channel image is normalized according to the mean and standard deviation of the image during YOLOv8 network pre-training to obtain the input image in tensor format;

[0016] S220, the input image is input to a feature extraction layer containing four feature output stages. Shallow features are extracted through the Conv and C2f modules in the second stage, mid-level features are extracted through the Conv and C2f modules in the third stage, and deep features are extracted through the Conv, C2f, and SPPF modules in the fourth stage. In each stage, the C2f module replaces the original SiLU activation function with the GELU activation function and introduces a 1×1 convolution in the residual branch for channel compression.

[0017] Optionally, in S300, the step of performing high-frequency detail modeling on the input features through a high-frequency attention module and outputting a high-frequency feature map includes:

[0018] S311, the feature matrix is ​​uniformly divided into multiple non-overlapping local windows;

[0019] S312, perform high-frequency attention calculation on the feature sequence within each local window, map the features within the window to the high-frequency feature space through query, key, and value projection matrices, calculate the local self-attention score by combining the normalization operation of the Softmax activation function and the dimension scaling factor, and generate the high-frequency feature weight aggregation result within the window;

[0020] S313: The high-frequency feature weights of all local windows are aggregated and stitched together according to their original spatial positions to reconstruct a high-frequency feature map containing high-frequency details such as the edge texture of the net cage target. Its dimension is consistent with the sequence length of the input features, and the number of output channels is set according to the high-frequency feature modeling requirements to focus on the fine expression of high-frequency details.

[0021] Optionally, in S300, the step of enhancing the input features with low-frequency structural features through a low-frequency attention module and outputting a low-frequency feature map includes:

[0022] S321, Perform average pooling operation on the input feature matrix, divide it into multiple non-overlapping local windows according to the set pooling kernel size and stride, perform global information aggregation on the feature sequences in each window, and obtain a low-frequency feature matrix at the window level.

[0023] S322 uses the low-frequency feature matrix obtained by average pooling as the key and value, and the original feature matrix as the query. The query, key, and value projection matrices are mapped to the low-frequency feature space. The global self-attention score is calculated by combining the normalization operation of the Softmax activation function and the dimension scaling factor, and the low-frequency feature weight aggregation result based on global association is generated.

[0024] S323, all global self-attention results are spliced ​​together according to their original spatial positions to reconstruct a low-frequency feature map containing low-frequency structural features such as the background outline of the net cage target. Its dimension is consistent with the sequence length of the input features, and the number of output channels is set according to the low-frequency structural modeling requirements.

[0025] Optionally, in S300, the step of concatenating the high-frequency feature map and the low-frequency feature map along the channel dimension and transforming them using a projection matrix to obtain a fused feature map; and performing residual connection fusion on the fused feature map and shallow features to obtain a final feature map, includes:

[0026] S331, the high-frequency feature map and the low-frequency feature map are concatenated along the channel dimension to obtain the concatenated feature;

[0027] S332, perform matrix multiplication on the stitched features and the projection matrix to obtain the fused feature map;

[0028] S333 reshapes the fused feature map from a sequence-dimensional format to a spatial-dimensional format, making it match the dimension of shallow features;

[0029] S334 processes shallow features through a 1×1 convolutional layer and normalizes them with Softmax to obtain adaptive weight parameters for the corresponding shallow features and fused feature maps.

[0030] S335, based on adaptive weight parameters, performs a weighted summation of shallow features and the reshaped fused feature map to obtain the final feature map after residual fusion.

[0031] Optionally, in S400, the step of performing cross-scale feature fusion with the final feature map and the mid-level and deep features includes:

[0032] S410 performs upsampling on the mid-level features to make their spatial dimensions match those of the final features. Figure 1 To achieve this, deep features are upsampled to match the spatial dimensions of the final features. Figure 1 To;

[0033] S420 concatenates the final feature map, the upsampled mid-level features, and the upsampled deep features according to the channel dimension to obtain cross-scale concatenated features;

[0034] S430 inputs the cross-scale splicing features into the convolution module for optimization processing to obtain cross-scale fused features.

[0035] On the other hand, embodiments of the present invention provide a SAR deep-water gravity-based cage identification system based on frequency domain features, comprising:

[0036] At least one processor;

[0037] At least one memory for storing at least one program;

[0038] When the at least one program is executed by the at least one processor, the at least one processor performs the method described above.

[0039] On the other hand, embodiments of the present invention provide a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the above-described method.

[0040] The beneficial effects of this invention are as follows: This invention discloses a SAR deep-water gravity-based cage identification method and system based on frequency domain features. This invention improves the image signal-to-noise ratio by introducing multi-scale radiometric normalization and adaptive speckle noise suppression algorithms in the SAR image preprocessing stage to perform radiometric distortion correction and speckle filtering on the original image. In the feature extraction stage, a high- and low-frequency attention module based on frequency domain separation is constructed. Through Fourier transform, shallow features are decomposed into high-frequency detail components and low-frequency structural components. Local window attention mechanisms are used to capture the cage edge texture features, and global average pooling attention is used to enhance the target contour information. The system enhances features in the current frequency domain; it dynamically fuses high- and low-frequency features through a cross-channel projection matrix and introduces a residual connection mechanism to preserve shallow detail information, thus solving the gradient vanishing problem in the deep feature extraction process; in the feature fusion stage, it designs a cross-scale fusion network with adaptive weight allocation to perform dimensional alignment and weighted aggregation of feature maps at different levels, achieving collaborative representation of shallow details, mid-level semantics, and deep contextual information; finally, it uses a detection head to improve the detection accuracy and localization accuracy of small targets, forming a complete technical solution from image preprocessing to target recognition, effectively improving the recognition performance of deep-water gravity cages in complex marine environments. Attached Figure Description

[0041] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0042] Figure 1 This is a flowchart illustrating a SAR deep-water gravity cage identification method based on frequency domain features in an embodiment of the present invention.

[0043] Figure 2 This is a network framework diagram of the cage identification model in this embodiment of the invention;

[0044] Figure 3 These are SAR image thumbnails of different regions in embodiments of the present invention;

[0045] Figure 4 This is a regional remote sensing image in this embodiment of the invention, which is a superimposed SAR image and a visible light image;

[0046] Figure 5 yes Figure 4 Visible light detail image;

[0047] Figure 6 yes Figure 4 SAR images of the corresponding region;

[0048] Figure 7 This is a comparative schematic diagram of standardized SAR images in an embodiment of the present invention;

[0049] Figure 8 This is a logical schematic diagram of the attention processing of residual high and low frequency features in an embodiment of the present invention;

[0050] Figure 9 This is a comparison of shallow features in an embodiment of the present invention;

[0051] Figure 10 This is a comparison chart of cage identification results using different methods in embodiments of the present invention;

[0052] Figure 11 This is a comparison chart of mAP identification accuracy under different sea conditions in embodiments of the present invention. Detailed Implementation

[0053] The following will provide a clear and complete description of the concept, specific structure, and technical effects of the present invention in conjunction with embodiments and accompanying drawings, so as to fully understand the purpose, solution, and effects of the present invention. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.

[0054] 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 of the invention and are not intended to limit the invention. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of this invention; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this invention as detailed in the appended claims.

[0055] It is understood that the terms “first,” “second,” etc., used in this invention may be used herein to describe various concepts, but unless specifically stated otherwise, these concepts are not limited by these terms. These terms are used only to distinguish one concept from another. For example, first information may also be referred to as second information without departing from the scope of embodiments of the invention, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to determination” as used herein may be interpreted as “when…” or “when…” or “in response to determination.”

[0056] The terms “at least one,” “multiple,” “each,” “any,” etc., used in this invention, “at least one” includes one, two, or more than two; “multiple” includes two or more than two; “each” refers to each of the corresponding multiple; and “any” refers to any one of the multiple.

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing embodiments of the invention only and is not intended to limit the invention.

[0058] Among related technologies, Synthetic Aperture Radar (SAR) has become a core technology for monitoring offshore cages due to its all-weather, all-day, and long-range observation capabilities. However, SAR images have inherent speckle noise: affected by radar band, polarization mode, and marine environment, random granular noise appears in SAR images, causing blurring of cage target features and severely interfering with the accuracy of feature extraction and recognition.

[0059] Existing SAR cage identification technology has the following key shortcomings, making it difficult to meet the needs of practical applications:

[0060] Imbalance in speckle noise reduction: Traditional noise reduction methods cannot balance the contradiction between "noise reduction" and "detail preservation";

[0061] Insufficient utilization of shallow features: In SAR target recognition, existing deep learning networks mostly focus on the global information of deep features, ignoring the rich spatial information of shallow features. Shallow feature maps have high resolution and can clearly reflect the local structure of the cage, but existing technologies have not designed targeted noise processing mechanisms for shallow features.

[0062] Conventional attention mechanisms do not take into account the application scenarios of marine SAR remote sensing images, and most remote sensing noise reduction studies are based on narrow-band light-based methods, which are very different from the noise generation mechanism of SAR remote sensing images that are mainly based on millimeter waves.

[0063] The existing high- and low-frequency attention mechanisms are not adaptable enough: Even though the existing high- and low-frequency attention mechanisms in the field of natural images have shown advantages in natural image classification and segmentation tasks with the core idea of ​​"decoupling high- and low-frequency features", they are designed entirely for natural images without speckle noise interference and with simple scenes. They do not involve the deep-sea cage identification scenario of SAR images, nor do they consider the influence of the inherent speckle noise of SAR images, and therefore cannot be directly transferred.

[0064] Significant feature transfer loss: During the transfer of features from shallow to deep layers, effective information is easily lost due to convolution and pooling operations. Existing networks lack efficient feature enhancement mechanisms, making it difficult to completely transfer effective features after shallow noise processing to the recognition module.

[0065] Based on the idea of ​​decoupling high and low frequency features, this invention proposes an integrated optimization scheme that combines shallow features, high and low frequency attention, and residual linking to specifically solve the problem of cage identification under speckle noise interference in SAR images.

[0066] To address the shortcomings of existing SAR image-based deep-water gravity-based cage identification technologies, and by incorporating the technical characteristics of attention mechanisms, this invention solves the following core technical problems:

[0067] Balancing the "noise reduction effect" and "cage detail preservation" of speckle noise in SAR images: Based on the local detail capture capability (high-frequency attention), high-frequency noise is suppressed while high-frequency details of the cage are preserved, avoiding the problems of excessive smoothing or noise residue in traditional methods;

[0068] How to efficiently utilize the spatial information of shallow features: In view of the characteristics of high resolution and strong noise interference of shallow features, a dual-branch processing module of "high frequency noise reduction + low frequency enhancement" is customized for shallow features based on attention-based head separation design to improve the ability to express local features of the cage.

[0069] SAR image features are processed in a targeted manner through a high-low frequency separation mechanism: by using the architecture of "local window attention + global pooling attention", high-frequency speckle noise is suppressed, while low-frequency global structural features of the cage are preserved and enhanced, thereby improving the feature robustness under complex sea conditions.

[0070] Reduce information loss during feature transfer: By using a residual linking mechanism, shallow features are fused with the original shallow features to ensure that effective features are completely transferred to the deep recognition module, thus solving the problem of "feature transfer loss" and improving the overall recognition accuracy.

[0071] The attention mechanism of this invention is designed based on the concept of "high- and low-frequency feature decoupling" and includes the following steps:

[0072] 1. SAR image preprocessing: Perform radiometric correction (eliminating radar system errors) and geometric correction (correcting terrain and attitude deviations) on the original SAR image to obtain a standardized SAR image;

[0073] 2. Backbone network construction and shallow feature extraction: Construct a deep learning network backbone and output shallow feature maps (with dimensions of B×C×H×W, where B is the batch size, C is the number of channels, and H and W are the height and width of the feature map). The shallow feature maps have high-resolution spatial information of the cage target.

[0074] 3. High- and low-frequency attention feature extraction:

[0075] 3a. Dimensional transformation: Convert the shallow feature map from "B×C×H×W" to "B×H×W×C", and then flatten it to "B×N×C" (N = H×W, which is the total number of pixels in the feature map);

[0076] 3b. High-frequency attention processing: Utilizing local window attention, non-overlapping local windows (window size s = 2 or adaptively adjusted) are used to calculate local self-attention for features within each window, suppressing high-frequency speckle noise within the window and preserving high-frequency details of the net cage;

[0077] 3c. Low-frequency attention processing: Using global pooling attention, average pooling is performed on each local window to obtain low-frequency features (reflecting the global structure of the cage), and global self-attention is calculated (the query comes from the original shallow features, and the key value comes from the pooled low-frequency features) to enhance the overall outline features of the cage;

[0078] 3d. High- and low-frequency feature fusion: The high-frequency attention feature output and the low-frequency attention feature output are concatenated in the channel dimension to obtain the optimized features of “B×N×C”, realizing the recombination of high- and low-frequency features after decoupling;

[0079] 4. Residual Link Enhancement: The optimized features from step 3d are converted back to the "B×C×H×W" format and added element-wise with the original shallow features to achieve the fusion of "original spatial information and optimized features" and reduce feature transfer loss;

[0080] 5. Net cage identification: The shallow features after residual fusion are fused with the mid- and deep features output by the backbone network across scales. The input is the detection head (including classification and regression branches), and the output is the net cage's location coordinates, confidence level, and category.

[0081] In step 3b, the local window size of the high-frequency features adopts an adaptive adjustment strategy: by calculating the local noise density of the SAR image (based on the contrast index of the gray-level co-occurrence matrix), when the noise density is greater than a preset threshold (e.g., 0.6), the window size is adjusted to s=3 (to expand the local receptive field and enhance noise reduction); when the noise density is less than the preset threshold, the window size is kept at s=2 (to retain more details), ensuring the adaptability of the high-frequency feature module under different noise intensities.

[0082] In step 3c, the average pooling operation of low-frequency features is combined with dynamic adjustment of marine environmental parameters: sea state data (wind speed U, seawater salinity S) is acquired during SAR imaging. When the wind speed U > 8 m / s, the pooling window step size is increased (e.g., step size = 4) to suppress high-frequency noise under strong sea conditions. When the seawater salinity S of the corresponding sea area of ​​the SAR image > 35‰, the pooling weight is corrected (increasing the compensation for the influence of salinity on microwave skin depth) to ensure the accuracy of low-frequency features and solve the problem of "environmental parameters affecting low-frequency features".

[0083] Step 4 introduces attention weight allocation for residual connections: a 1×1 convolutional layer is constructed to learn weights (weight range 0~1) for the original shallow features and the optimized features, and residual fusion is achieved through weighted summation. This design fills the technical gap where attention only focuses on feature processing and does not involve feature fusion.

[0084] refer to Figure 1 ,like Figure 1 The figure shows a SAR deep-water gravity-based cage identification method based on frequency domain features provided by an embodiment of the present invention. The method includes the following steps:

[0085] S100: Acquire SAR images, preprocess SAR images to obtain standardized SAR images;

[0086] S200, the standardized SAR image is input into the pre-trained cage identification model, and shallow features, middle features and deep features are extracted based on the standardized SAR image;

[0087] S300: The shallow feature map is converted into a feature matrix by changing its dimensions. A high-frequency attention module is used to model high-frequency details in the feature matrix, outputting a high-frequency feature map. A low-frequency attention module is used to enhance the low-frequency structural features of the feature matrix, outputting a low-frequency feature map. The high-frequency and low-frequency feature maps are concatenated along the channel dimension and transformed by a projection matrix to obtain a fused feature map. The fused feature map is then fused with the shallow features using residual connections to obtain the final feature map.

[0088] S400, the final feature map is fused with the mid-level and deep-level features across scales, and the bounding box, confidence score and category of the cage are input to the detection head; Non-Maximum Suppression (NMS) processing is performed on the bounding box to obtain the final recognition result of the deep-water gravity cage.

[0089] In the embodiments provided by this invention, by introducing multi-scale radiometric normalization and adaptive speckle noise suppression algorithms in the preprocessing stage, the radiometric distortion of the original SAR image can be effectively corrected and speckle noise can be filtered out, laying a high-quality image foundation for subsequent feature extraction. The constructed high- and low-frequency attention module based on frequency domain separation uses Fourier transform to accurately decompose shallow features into high-frequency detail components and low-frequency structural components. A local window attention mechanism is used for the high-frequency components to keenly capture subtle features such as cage edge textures. For the low-frequency components, global average pooling attention is used to significantly enhance the overall contour information of the target, thus achieving effective feature enhancement in the frequency domain. The dynamic fusion of high- and low-frequency features through the cross-channel projection matrix, combined with the residual connection mechanism, achieves both organic feature integration and successful preservation of shallow detail information, effectively alleviating the gradient vanishing problem during deep feature extraction. The cross-scale fusion network with adaptive weight allocation plays an important role in the feature fusion stage. By dimensional alignment and weighted aggregation of feature maps at different levels, it achieves the collaborative representation of shallow details, mid-level semantics and deep contextual information. Ultimately, this enables the detection head to more accurately identify small targets and improves positioning accuracy. The resulting complete technical solution is closely integrated from image preprocessing to target recognition, which greatly improves the recognition performance of deep-water gravity cages in complex marine environments.

[0090] In some embodiments, S100, the preprocessing of the SAR image includes:

[0091] The acquired SAR image is radiometrically corrected, the radiometrically corrected SAR image is geometrically corrected, and the geometrically corrected SAR image is grayscale normalized to obtain a standardized SAR image with pixel values ​​within a preset range.

[0092] refer to Figure 2 , Figure 2 It is the network framework of the cage identification model, demonstrating the entire process of SAR image preprocessing to cage identification.

[0093] Using a real SAR cage dataset (covering sea states 1-6, C-band / VV / VH polarization modes), the specific steps are as follows:

[0094] SAR image preprocessing includes:

[0095] Radiometric correction: Radiometric calibration is performed on raw SAR images (such as Sentinel-1 IW mode data) using the AIEarth platform (converting radar backscattering coefficients to backscattering coefficients). sigma 0 Atmospheric correction (eliminating the effects of atmospheric scattering) yields images such as... Figure 3 As shown;

[0096] Geometric correction: Based on the orbital parameters of the SAR image, terrain tilt and radar viewpoint deviation are corrected to obtain a standardized image with a resolution of 20m×20m, such as... Figure 4 , 5 As shown in Figure 6;

[0097] Image normalization: Histogram equalization is used to adjust the grayscale of the standardized image, enhancing image contrast by stretching the pixel value distribution range, and normalizing pixel values ​​to the integer range of [0, 255]. The specific formula is as follows:

[0098] ;

[0099] Where I is the original pixel value. , These are the minimum and maximum pixel values ​​of the image, respectively, and round() is the rounding function. This is a preprocessed, standardized SAR image. This processing uses histogram equalization to make the grayscale difference between the cage target and the background more significant (e.g., ...). Figure 7 As shown in the figure, this solves the problem of insufficient local contrast in SAR images caused by speckle noise, and provides a clearer input basis for subsequent shallow feature extraction.

[0100] In some embodiments, S200, the extraction of shallow features, mid-layer features, and deep features based on the standardized SAR image includes:

[0101] S210, the standardized SAR image is input to the input layer, the standardized SAR image is scaled into a single-channel grayscale image according to the maximum downsampling step size of the YOLOv8 network, the single-channel grayscale image is expanded into a three-channel image through 1×1 convolution, and the three-channel image is normalized according to the image mean and standard deviation during the pre-training of the YOLOv8 network to obtain the input image in tensor format;

[0102] S220, the input image is input to a feature extraction layer containing four feature output stages. Shallow features are extracted through the second stage Conv module (Convolution) and C2f module (Cross Stage Partial 2 with FasterFusion). Mid-level features are extracted through the third stage Conv module and C2f module. Deep features are extracted through the fourth stage Conv module, C2f module and SPPF (Spatial Pyramid Pooling - Fast) module. In each stage, the C2f module uses the GELU (Gaussian Error Linear Unit) activation function to replace the original SiLU (Sigmoid Linear Unit) activation function, and introduces a 1×1 convolution in the residual branch for channel compression.

[0103] Specifically, the input image is input into the first stage, where an initial feature map is extracted using the Conv and C2f modules of the first stage; the initial feature map is input into the second stage, where shallow features are extracted using the Conv and C2f modules of the second stage; the shallow features are input into the third stage, where mid-level features are extracted using the Conv and C2f modules of the third stage; and the mid-level features are input into the fourth stage, where deep features are extracted using the Conv, C2f, and SPPF modules of the fourth stage.

[0104] Each stage of the Conv module sets the convolution kernel size, stride, and padding parameters according to the feature extraction requirements to achieve feature map downsampling and channel expansion. Each stage of the C2f module replaces the original SiLU activation function with the GELU activation function and introduces a 1×1 convolution in the residual branch for channel compression (compression ratio 1:2) to enhance the nonlinear expressiveness and discriminative power of features while reducing computational complexity. The second-stage C2f module (C2f2) uses a structure of "two 3×3 convolutions + residual connections" to perform residual feature enhancement on the intermediate feature map output by the Conv2 module. It then concatenates the enhanced features with the original intermediate feature map along the channel dimension to finally output the shallow feature (feat1). The third-stage C2f module (C2f3) contains three residual branches to further enhance the feature map after convolution downsampling of the input shallow features. In the fourth-stage C2f module, the deep feature extraction is performed in conjunction with the SPPF module to aggregate multi-scale contextual information, ensuring that each level of feature retains the key information of the corresponding scale and can be adapted to the characteristics of the SAR image through parameter adjustments within the module.

[0105] The extraction of shallow features through the Conv and C2f modules in the second stage includes:

[0106] The initial feature map output from the first stage is obtained, and the Conv module in the second stage is used to downsample the initial feature map to output an intermediate feature map.

[0107] The intermediate feature map is augmented by a C2f module in the second stage. This C2f module contains two parallel 3×3 convolutional branches, each with a stride of 1 and padding of 1.

[0108] The first branch performs a convolution operation on the intermediate feature map and then introduces a non-linear transformation through the GELU activation function to output convolution-enhanced features; the second branch retains the intermediate feature map.

[0109] The convolutional enhancement features are concatenated with the intermediate feature map along the channel dimension to generate a shallow feature map.

[0110] The backbone network construction and shallow feature extraction process is as follows:

[0111] Using YOLOv8 as the backbone, and by making targeted adjustments to the input layer, convolutional module and feature output layer of CSPDarknet-53, we can achieve accurate extraction of shallow features (feat1) of SAR images and ensure seamless connection with the subsequent high and low frequency feature attention module.

[0112] YOLOv8 backbone adaptation and adjustments (for SAR image characteristics): The original YOLOv8 was designed for natural images and needs to be adapted to SAR images in the following dimensions (speckle noise, uniform grayscale, small target proportion):

[0113] (1) Input size standardization: The SAR image after preprocessing is a non-fixed size image with a resolution of 20m×20m, which needs to be scaled to the standard input size S of YOLOv8 first. in =640×640, the scaling formula is:

[0114] ;

[0115] in, This is the scaled image size. The original pixel size of the SAR preprocessed image (e.g., 128×128). For scaling ratio, , This is the maximum downsampling step size for YOLOv8 (ensuring the scaled size is an integer multiple of 32 to avoid feature alignment deviations). This is the floor function.

[0116] (2) Adjusting the parameters of the convolution module:

[0117] Input layer convolution: The padding of the original 3×3 convolution kernel in the YOLOv8 network was adjusted from 1 to 1 (to maintain resolution), the stride was adjusted from 2 to 1 (to avoid premature downsampling and loss of netbox details), and the number of output channels was adjusted from 32 to 64 (to enhance the robustness of SAR image noise). stride and padding represent the stride and padding parameters of the convolution operation, respectively, and are key hyperparameters controlling feature map size changes and edge information preservation. The stride refers to the number of pixels the convolution kernel moves each time it slides across the image. A stride of 1 means the kernel moves 1 pixel at a time, which can fully cover image information and avoid detail loss due to excessive stride. Padding of 1 means padding the image edges with one ring of pixels, ensuring the post-convolution feature map size remains consistent with the input and that netbox features in edge regions are not truncated. By adjusting the stride of the input layer convolution from 2 to 1, the rate of feature map size reduction is effectively slowed down, preserving more original spatial details of the cage targets for shallow features, especially for smaller deep-water gravity cages, thus avoiding feature blurring caused by premature downsampling. Simultaneously, the number of output channels is increased from 32 to 64, enhancing the network's ability to represent complex noise patterns in SAR images. The 64 channels can more meticulously capture speckle noise features of varying intensities and distributions, providing richer original feature inputs for noise suppression in subsequent high- and low-frequency attention modules.

[0118] The C2f module (YOLOv8 core residual module) retains the original structure of "convolution and residual branch" combination, but replaces the activation function from SiLU to GELU and adds 1×1 convolution (channel compression ratio 1:2) to the residual branch, reducing the amount of computation while enhancing feature expression.

[0119] The YOLOv8 feature extraction process is divided into four parts: input layer, feature extraction layer (Backbone), feature fusion layer (Neck), and detection head (Head). The shallow features (feat1) are extracted from the output of the second C2f module of the feature extraction layer (Backbone) (shallow feature region, high resolution, with noise information and target details coexisting). The specific process is as follows:

[0120] (1): YOLOv8 input layer processing: The normalized SAR image after preprocessing in step 1 ( Convert to YOLOv8 input format:

[0121] a. Channel expansion: Standardized SAR images are single-channel grayscale images, which need to be expanded into 3 channels through 1×1 convolution. The formula is:

[0122] ;

[0123] in, It is a 1×1 convolution kernel. For bias terms, For convolution operations, The expanded three-channel image has its pixel value range adjusted to [-1, 1] by the convolution kernel weights and bias terms to match the input distribution requirements of YOLOv8.

[0124] b. Normalization: Mapping pixel values ​​from [0, 255] to [0, 1], using the formula:

[0125] ;

[0126] in, The input features are the final input features obtained after processing by the input layer. , The mean and standard deviation of the images during pre-training.

[0127] Input features The input data is in tensor format of 640×640×3, which meets the dimensionality requirements of YOLOv8. After the above input layer processing, the SAR single-channel grayscale image is converted into a three-channel image that conforms to the backbone network input specifications. At the same time, through channel expansion and normalization operations, the feature value distribution is adapted to the network pre-training parameters, laying the foundation for subsequent shallow feature extraction.

[0128] (2): YOLOv8 shallow feature extraction: It utilizes a hierarchical structure combining the Conv module, the Cross-Stage Partial with 2 Convolutions (C2f) module, and Spatial Pyramid Pooling Fast (SPPF) to extract features in four stages. The output of the second stage is the shallow feature (feature1, feat1). The detailed parameters and functions of each stage are shown in the table below:

[0129] Detailed Explanation of Key Modules (Taking the second stage, feat1 generation process as an example):

[0130] a. Conv2 module: Performs a 3×3 convolution on the initial feature map of B×128×320×320 output from the first stage, with stride=4 (downsampling by 4 times) and padding=1, resulting in 256 output channels. The formula is as follows:

[0131] ;

[0132] in, The initial feature map output by the C2f module (C2f1) in the first stage. This is a convolution operation with padding parameters; This is the intermediate feature map output by the Conv2 module; These are the kernel size, stride, and padding parameters, respectively. This represents the number of output channels.

[0133] b. C2f2 module: Performs residual feature enhancement on FConv2, with a structure of "two 3×3 convolutions + residual connections", the formula is as follows:

[0134] ;

[0135] in, For channel-level splicing, output , This is a shallow feature map, namely feat1, which lays the foundation for subsequent high and low frequency attention noise reduction.

[0136] Specifically, input image Entering the feature extraction stage of the backbone network, after the input image undergoes 1×1 convolutional channel expansion and normalization, it enters the first stage Conv module (Conv1 module) to process the input image. Preliminary feature extraction is performed, outputting an initial feature map. Subsequently, the initial feature map enters the first stage, the C2f module (C2f1), which consists of three convolutional layers and residual connections. The GELU activation function enhances its non-linear expressive power; the formula for the GELU activation function is: x is the input feature value, GELU(x) is the Gaussian error linear unit activation function, and a 1×1 convolution compresses the number of channels from 64 to 32, finally outputting a preliminary feature map of B×128×320×320. This module, through fine adjustment of the convolution kernel size, stride, and filling parameters, effectively preserves the edge details and texture features of the cage target while suppressing speckle noise in SAR images.

[0137] Next, in the second stage, the initial feature maps are processed by the Conv2 module (3×3 convolution, stride=4, padding=1, output channels 256). Downsampled to an intermediate feature map of B×256×80×80 By using a larger step size, the feature map size is rapidly reduced, highlighting the key structural information of the cage target; subsequently, the intermediate feature map... The second stage, the C2f module (C2f2), contains two parallel 3×3 convolutional branches. Each branch uses a stride=1 and padding=1 parameter configuration to maintain the feature map size. The first branch modifies the intermediate feature map... After performing the convolution operation, a non-linear transformation is introduced through the GELU activation function, and the second branch directly preserves the intermediate feature maps. The original features are then combined, and finally, the features from the two branches are merged by concatenating the channel dimensions to form a shallow feature map with dimensions B×256×80×80. (i.e., feat1). This dual-branch design of "convolution-enhanced features and original feature preservation" not only extracts the local texture features of the net cage target through convolution operations, but also preserves the downsampled structural contour information through residual connections. It effectively balances the needs of feature details and noise suppression, and provides initial feature input containing rich spatial information for the subsequent optimization processing of high and low frequency attention modules.

[0138] The third stage extracts mid-level features (feat2) through the Conv and C2f modules. The input to this stage is the shallow features (feat1). These features are downsampled using a 3×3 convolution (stride=2, padding=1, output channels 512), reducing the feature map resolution from 80×80 to 40×40. Subsequently, the C2f module (containing 3 residual branches, GELU activation function, 1×1 convolution channel compression ratio 1:2) further enhances the feature representation, outputting a mid-level feature map with dimensions B×512×40×40. The fourth stage extracts deep features (feat3) through the Conv, C2f, and SPPF modules. The input is mid-level features (feat2). These features are first downsampled to 20×20 resolution using a 3×3 convolution (stride=2, padding=1, output channels 1024). Then, the C2f module enhances the features. Finally, the SPPF module (spatial pyramid pooling) aggregates contextual information at different scales, outputting a deep feature map with dimensions B×1024×20×20. The mid-level features contain local semantic information of the net cage target, while the deep features focus on global structural features. Together, these three constitute a multi-scale feature extraction system, providing multi-level input for subsequent high- and low-frequency attention feature fusion.

[0139] In some embodiments, converting the shallow feature map into a feature matrix by dimension includes:

[0140] S301, Obtain the dimensional information of the shallow feature map and determine the batch size B, number of channels C, height H and width W;

[0141] S302 adjusts the dimensional order of the shallow feature map from [B,C,H,W] to [B,H,W,C] using a dimensionality substitution function, thereby realizing the positional transformation between spatial and channel dimensions.

[0142] S303, use the dimension reshaping function to merge the adjusted feature maps in the spatial dimension (H×W) to obtain a feature matrix with a sequence length of N=H×W and a dimension of [B,N,C], where N corresponds to the total number of all spatial locations of the feature map.

[0143] The deployment process for high- and low-frequency attention modules is as follows:

[0144] The structural design of the high- and low-frequency attention module includes the setting of core parameters (number of attention heads, window size, and head separation ratio):

[0145] Module initialization: settings The (high-low frequency ratio) parameter value determines the number of attention heads to extract high and low frequencies;

[0146] ;

[0147] ;

[0148] in, The high- and low-frequency feature separation ratio hyperparameter (value range 0~1). This represents the total number of attention heads (set to 8 in this embodiment). For high-frequency attention heads, For high-frequency attention.

[0149] When α = 0.3, (High-frequency attention head) (Low-frequency attention heads) are responsible for capturing high-frequency detail features such as the edge texture of the cages and low-frequency structural features such as the background contour. By dynamically adjusting the α value, it can adapt to the differences in feature distribution of SAR images under different sea states. For example, in high sea states (level 5-6), α is adjusted to 0.4 to increase the proportion of low-frequency heads and enhance the contour extraction of blurry targets; in low sea states (level 1-2), α is adjusted to 0.2 to increase the number of high-frequency heads and capture clear cage texture details.

[0150] The dimensional transformation process is as follows;

[0151] Convert the shallow feature map feat1 from "B×256×80×80" to the "B×N×C" format (N=H×W) required for high and low frequency feature attention:

[0152] B, C, H, W = feat1.shape;

[0153] Dimension transformation: B×C×H×W→B×H×W×C→B×(H×W)×C, the specific formula is as follows:

[0154] ;

[0155] Here, feat1.shape represents the dimensionality information of the shallow feature map feat1, permute(·) is the dimensionality permutation function, and reshape(·) is the dimensionality reshaping function. This is the feature matrix after dimensionality transformation.

[0156] It should be noted that the dimension permutation function `permute(·)` is used to adjust the dimensional order of the feature map, and the dimension reshaping function `reshape(·)` is used to merge the spatial dimensions of H×W into a sequence dimension of N (N=H×W). The operation `permute(0,2,3,1)` adjusts the dimensional order of the feature map from [batch, channel, height, width] to [batch, height, width, channel]. `reshape(B,H*W,C)` further merges the spatial dimensions (height × width) into a sequence length N, ultimately resulting in a feature matrix with dimensions B×6400×256. Where B is the batch size, 6400 corresponds to the spatial dimension of the feature map (80×80 resolution unfolded), and 256 is the number of feature channels. This matrix flattens and reorganizes the original two-dimensional spatial features and channel features, so that the feature vector of each spatial location is presented in the form of a sequence. This provides a suitable input format for the subsequent attention mechanism's feature interaction and weight allocation in the spatial dimension, and enables accurate modeling of the importance of features in different regions of the net cage target.

[0157] Feature matrix This process satisfies the attention mechanism's requirement for input features in the format of "batch × sequence length × number of channels". The transformation process flattens the spatial dimension (H×W) into a sequence dimension, making the feature vector of each spatial location the basic unit for attention calculation. This allows the subsequent attention mechanism to perform global correlation calculations on the features of each pixel location in the spatial dimension, laying the data structure foundation for high- and low-frequency attention heads to extract corresponding features separately.

[0158] In some embodiments, the step of performing high-frequency detail modeling on the input features using a high-frequency attention module to output a high-frequency feature map includes:

[0159] S311, the feature matrix is ​​uniformly divided into multiple non-overlapping local windows;

[0160] S312, perform high-frequency attention calculation on the feature sequence within each local window, map the features within the window to the high-frequency feature space through query, key, and value projection matrices, calculate the local self-attention score by combining the normalization operation of the Softmax activation function and the dimension scaling factor, and generate the high-frequency feature weight aggregation result within the window;

[0161] S313: The high-frequency feature weights of all local windows are aggregated and stitched together according to their original spatial positions to reconstruct a high-frequency feature map containing high-frequency details such as the edge texture of the net cage target. Its dimension is consistent with the sequence length of the input features, and the number of output channels is set according to the high-frequency feature modeling requirements to focus on the fine expression of high-frequency details.

[0162] refer to Figure 8 The high-frequency feature attention processing procedure is as follows:

[0163] Suppress high-frequency speckle noise by utilizing local window attention logic:

[0164] Window division: Divide the windows into non-overlapping windows according to the window size s = 2. The total number of windows is (80 / 2) × (80 / 2) = 1600, and each window contains 4 pixels (2 × 2).

[0165] Local attention calculation: Self-attention is calculated for the features within each window, and high-frequency features are output (dimension B × 6400 × 128, 128 = 256 × 0.5), as shown in the following formula:

[0166] ;

[0167] ;

[0168] in, The feature sequence within the window (dimension B×4×256). , , These are the query, key, and value projection matrices for high-frequency attention heads (each with a dimension of 256×128). , , They are the characteristic sequences. The query, key, and value matrices all have a dimension of B×4×128; is the dimension scaling factor for the high-frequency attention head, with a value of the square root of 128, used to scale the attention score to prevent the attention score from becoming too large after matrix multiplication; Softmax(·) is a normalization operation used to map the attention score to the [0,1] interval; The result of local self-attention processing of the feature sequence X within the window by the high-frequency attention head has a dimension of B×4×128. High-frequency attention head count ( The high-frequency feature map is obtained by splicing the local self-attention results within each window according to their original spatial locations.

[0169] It should be noted that, It is a composite function containing multi-head parallel computation logic. Each high-frequency attention head independently performs query, key-value projection, and attention score calculation on the features within the window, obtaining the local self-attention result for each window. The local self-attention result is a tensor of dimension B×4×128, where each element corresponds to the weighted aggregation result of the pixels within the window in the high-frequency feature space. By concatenating the local self-attention results of all 1600 windows in their original spatial order, the high-frequency feature map can be reconstructed. Its dimensions are B×6400×128, and it is related to the feature matrix. The sequence lengths are consistent.

[0170] By limiting attention computation to a 2×2 local window, the high-frequency attention head can focus on local high-frequency details such as the edge texture of the net cage target. At the same time, it uses the correlation of pixels within the window to suppress speckle noise. Since speckle noise usually manifests as randomly distributed high-frequency interference in local areas, it has a significant difference in correlation with the structured high-frequency features of the target. The local attention mechanism can distinguish between the two by learning weights, thereby achieving the dual effect of noise suppression and detail preservation.

[0171] This embodiment focuses on fine modeling of high-frequency details such as the edge texture of the cage through a 128-dimensional output channel, avoiding the propagation of speckle noise in the global range. At the same time, multiple high-frequency attention heads work together to capture high-frequency details of different directions and intensities, such as the edge texture of the cage frame and local grayscale jump features, providing accurate high-frequency feature input for subsequent noise suppression.

[0172] In some embodiments, S300, the step of enhancing the input features with low-frequency structural features through a low-frequency attention module and outputting a low-frequency feature map includes:

[0173] S321, Perform average pooling on the input feature matrix, divide it into multiple non-overlapping local windows according to the set pooling kernel size and stride, and perform global information aggregation on the feature sequences in each window to obtain a low-frequency feature matrix at the window level;

[0174] S322 uses the low-frequency feature matrix obtained by average pooling as the key and value, and the original feature matrix as the query. The query, key, and value projection matrices are mapped to the low-frequency feature space. The global self-attention score is calculated by combining the normalization operation of the Softmax activation function and the dimension scaling factor, and the low-frequency feature weight aggregation result based on global association is generated.

[0175] S323, all global self-attention results are spliced ​​together according to their original spatial positions to reconstruct a low-frequency feature map containing low-frequency structural features such as the background outline of the net cage target. Its dimension is consistent with the sequence length of the input features, and the number of output channels is set according to the low-frequency structural modeling requirements.

[0176] The low-frequency feature attention processing utilizes global pooling to construct an attention architecture, thereby enhancing the low-frequency features of the netbox.

[0177] Average pooling: Perform average pooling on each 2×2 window to obtain low-frequency features (dimension B×1600×256).

[0178] Global attention calculation: using the feature matrix For the query (Q), the pooled low-frequency features are keys (K) and values ​​(V). Global self-attention is calculated, and the low-frequency features (dimension B×6400×128) are output, as shown in the following formula:

[0179] ;

[0180] ;

[0181] ;

[0182] Where AvgPool(·) is the average pooling operation, the kernel size and stride are the pooling kernel size and stride respectively, both set to s=2, consistent with the window size of the high-frequency attention module, to ensure that the low-frequency features match the high-frequency features in terms of spatial resolution; X is the feature sequence within the window (dimension is B×4×256). The low-frequency features after average pooling within the window have a dimension of B×1×256. By arranging the pooling results of all 1600 windows in order, a low-frequency feature matrix with a dimension of B×1600×256 is formed. , , These are the query, key, and value projection matrices for low-frequency attention heads (each with a dimension of 256×128). , , Low-frequency characteristics The query, key, and value matrices have dimensions of B×6400×128, B×1600×128, and B×1600×128, respectively. This is the dimension scaling factor for the low-frequency attention head, with a value of the square root of 128 (i.e., 11.31). For low-frequency attention head pair feature matrix The processed global self-attention result has a dimension of B×6400×128. To determine the number of low-frequency attention heads (LFe heads=3), the low-frequency feature map is obtained by concatenating the global self-attention results within each window according to their original spatial locations. .

[0183] Specifically, the average pooling operation compresses each 2×2 window into a single pixel's global feature, reducing sequence length and computational complexity of global attention. This operation extracts low-frequency structural information within the window by reducing spatial resolution, such as the overall outline of the cage and the distribution features of the background region. This allows the low-frequency attention head to learn the association between the cage target and the background globally. For example, in SAR images, the low-frequency features of a deep-water gravity cage are represented by a continuous regional grayscale distribution and overall geometry. Global attention assigns higher attention weights to the cage region by calculating the similarity between the query feature (original spatial location) and the key feature (pooled low-frequency features), thereby enhancing the target's low-frequency structural features and suppressing background noise interference. Finally, the low-frequency attention processing outputs a low-frequency feature map with dimensions B×6400×128. , and high-frequency feature map The sequence length and number of channels are kept consistent to prepare for subsequent high- and low-frequency feature fusion.

[0184] In some embodiments, S300, the step of concatenating the high-frequency feature map and the low-frequency feature map along the channel dimension and transforming them through a projection matrix to obtain a fused feature map; and performing residual connection fusion on the fused feature map and shallow features to obtain a final feature map, includes:

[0185] S331, the high-frequency feature map and the low-frequency feature map are concatenated along the channel dimension to obtain the concatenated feature;

[0186] S332, perform matrix multiplication on the stitched features and the projection matrix to obtain the fused feature map;

[0187] S333 reshapes the fused feature map from a sequence-dimensional format to a spatial-dimensional format, making it match the dimension of shallow features;

[0188] S334 processes shallow features through a 1×1 convolutional layer and normalizes them with Softmax to obtain adaptive weight parameters for the corresponding shallow features and fused feature maps.

[0189] S335, based on adaptive weight parameters, performs a weighted summation of shallow features and the reshaped fused feature map to obtain the final feature map after residual fusion.

[0190] The specific process is as follows:

[0191] High- and low-frequency feature concatenation: By concatenating high-frequency features with low-frequency features in the channel dimension, a fused feature is obtained, and the output (B×6400×256) with the same number of input feature channels is restored, ensuring compatibility with subsequent processing.

[0192] The formula for calculating the fusion feature is as follows:

[0193] ;

[0194] in, This is a high-frequency feature map. For low-frequency feature maps, [·;·] indicates that the high-frequency and low-frequency feature maps are concatenated along the channel dimension. Let be the projection matrix. To fuse feature maps.

[0195] Specifically, It is a high-frequency feature map with dimensions of B×6400×128, containing high-frequency detail features such as cage edge texture captured through a local window attention mechanism; The low-frequency feature map, also with dimensions B×6400×128, covers low-frequency structural features such as the overall outline of the cage obtained through global pooling and global attention processing; [·;·] indicates that the high-frequency and low-frequency feature maps are concatenated according to the channel dimension. The concatenated feature matrix has dimensions B×6400×256, which is then output as a projection matrix. A linear transformation is performed on the concatenated features (with dimensions of 256×256) to map the concatenated features to the feature matrix. The same channel dimension space ultimately yields high- and low-frequency fused feature maps. Its dimensions are B×6400×256. This fused feature preserves the local texture details of the cage target while integrating the overall structural contour information, providing a comprehensive feature representation that takes into account both details and the overall picture for subsequent feature processing.

[0196] The residual connection fusion process is as follows:

[0197] Dimensional recovery: fusing feature maps Restore "B×6400×256" to "B×256×80×80" to match the original feat1 dimension;

[0198] Residual fusion (introducing attention weights): Weights are learned through 1×1 convolutions to achieve adaptive fusion of original and optimized features. The core formula is as follows:

[0199] ;

[0200] Weighted residual fusion, the formula is:

[0201] ;

[0202] in, , The adaptive weight parameters correspond to the weight ratios of the shallow feature feat1 and the high-low frequency fused feature map HLCombine(X), respectively. ; This represents a 1×1 convolution operation, where Softmax(·) is the normalization function and reshaped is the dimension reshaping operation. This is the final feature map after residual fusion.

[0203] Specifically, , The adaptive weight parameters are learned through a 1×1 convolutional layer, with dimensions of 1×1×256×1, corresponding to the weight proportions of the original shallow feature feat1 and the high-low frequency fused feature map HLCombine(X), respectively. Conv1×1(·) represents a 1×1 convolution operation used to learn channel-dimensional weights on the original feature map feat1. The Softmax(·) function normalizes the convolution result to the [0,1] interval, ensuring that the sum of the weights is 1, achieving a dynamic balance between the original and optimized features. reshaped is a dimension reshaping operation used to convert the fused feature map HLCombine(X) from a sequence dimension format (B×6400×256) back to the same spatial dimension format (B×256×80×80) as the shallow feature feat1, so as to perform weighted fusion with the original feature map. Specifically, firstly, the sequence dimension (6400) is split into a spatial dimension (80×80) using `reshape(B,80,80,256)`. Then, the dimension order is adjusted from [batch, height, width, channel] back to [batch, channel, height, width] using `permute(0,3,1,2)`, completing the format conversion from sequence dimension to spatial dimension and obtaining a fused feature map `HLCombine(X).reshaped` with the same dimension as the original shallow feature `feat1`. Subsequently, a 1×1 convolutional layer performs channel dimension feature compression and weight learning on the shallow feature `feat1`, outputting a feature map containing two channels. After normalization using the Softmax function, the weights are obtained. and The sum of the two is 1, enabling dynamic allocation of importance between the original and fused features. When the original features contain more effective information, the weight is increased. To preserve the advantages of the original features; when the fused features perform better in noise suppression or detail enhancement, the weights are increased. This is to highlight the role of fusion features. Finally, the final feature map after residual fusion is obtained through weighted summation. Its dimensions are B×256×80×80, which not only inherits the basic expressive power of the original features, but also integrates the detailed and global features optimized by the high and low frequency attention mechanism, effectively improving the feature map's representation accuracy of the net cage target and providing a more robust input for feature learning in subsequent network layers.

[0204] In some embodiments, S400, the step of performing cross-scale feature fusion with the final feature map and mid-level and deep features includes:

[0205] S410 performs upsampling on the mid-level features to make their spatial dimensions match those of the final features. Figure 1 To achieve this, deep features are upsampled to match the spatial dimensions of the final features. Figure 1 To;

[0206] S420 concatenates the final feature map, the upsampled mid-level features, and the upsampled deep features according to the channel dimension to obtain cross-scale concatenated features;

[0207] S430 inputs the cross-scale splicing features into the convolution module for optimization processing to obtain cross-scale fused features.

[0208] The subsequent feature fusion and cage identification process is as follows:

[0209] Cross-scale feature fusion: combining the final feature map The mid-level features (B×512×40×40) and deep features (B×1024×20×20) output from the backbone network are aligned in scale through upsampling / downsampling, concatenated, and then input into the convolution module for optimization.

[0210] Detection head design: It adopts a structure that combines classification and regression branches, and outputs the bounding box (x1, y1, x2, y2), confidence score and category of the netbox;

[0211] Post-processing: Non-maximum suppression is performed to filter redundant predicted boxes, and the final recognition result is obtained.

[0212] Experimental verification:

[0213] refer to Figure 9 , Figure 9 The shallow feature visualization comparison chart contains three sub-charts: (a) original shallow features; (b) shallow features after high-frequency feature processing; and (c) shallow features after low-frequency feature processing. Figure 9 The image shows the result of the high- and low-frequency processing module processing a random matrix. The result is influenced by the original feature distribution, such as... Figure 9 The homogenization in (c) is more pronounced because the original matrix contains fewer shallow features. (Reference) Figure 10 and Figure 11The method proposed in this invention achieves a comprehensive index mAP (mean Average Precision) of 47.85% on a certain area of ​​cage data, which is better than the original YOLOv8's 42.45%. This verifies the optimization effect of this invention.

[0214] In summary, this invention, based on an attention mechanism and innovatively optimized to meet the practical needs of SAR image cage identification, achieves the following significant improvements compared to existing technologies:

[0215] 1. More accurate speckle noise processing: The high-frequency feature module is based on local attention design to specifically suppress high-frequency noise; the low-frequency feature module retains the low-frequency target structure through global pooling, solving the noise reduction-detail imbalance problem in traditional methods, which is better than the noise processing effect of only natural images;

[0216] 2. Significantly improved utilization of shallow features: Due to the high resolution characteristics of shallow features, the identification error of local details of the cage is reduced compared to the solution of directly using unprocessed shallow features;

[0217] 3. Higher feature transfer efficiency: The residual link design reduces feature loss from shallow to deep layers. Compared with the solution without residual links, the information retention rate in the feature transfer process is improved, which in turn improves the mAP of cage identification and supplements the technical optimization of the feature transfer link.

[0218] 4. Better engineering feasibility: No need to reconstruct the network, easy to integrate with existing SAR monitoring systems, and the inference speed meets the requirements of real-time monitoring, solving the engineering problems of SAR target identification.

[0219] This invention also provides a SAR deep-water gravity-based cage identification system based on frequency domain features, comprising:

[0220] At least one processor;

[0221] At least one memory for storing at least one program;

[0222] When the at least one program is executed by the at least one processor, the at least one processor performs the method described above.

[0223] The content of the above method embodiments is applicable to this embodiment. The specific functions implemented in this embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments. Therefore, they will not be repeated here.

[0224] This invention also provides 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 method described above. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0225] 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.

[0226] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

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

[0228] This invention also provides a computer program product, including a computer program or computer instructions, which are stored in a memory. A processor of a computer device reads the computer program or computer instructions from the memory and executes the computer program or computer instructions, causing the computer device to perform the above-described method.

[0229] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product 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.

[0230] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 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 embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor 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.

[0231] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically include computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0232] The 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.

Claims

1. A SAR deep-water gravity-based cage identification method based on frequency domain features, characterized in that, The method includes the following steps: S100: Acquire SAR images, preprocess SAR images to obtain standardized SAR images; S200, the standardized SAR image is input into the pre-trained cage identification model, and shallow features, middle features and deep features are extracted based on the standardized SAR image; S300: The shallow feature map is converted into a feature matrix by changing its dimensions. A high-frequency attention module is used to model high-frequency details in the feature matrix, outputting a high-frequency feature map. A low-frequency attention module is used to enhance the low-frequency structural features of the feature matrix, outputting a low-frequency feature map. The high-frequency and low-frequency feature maps are concatenated along the channel dimension and transformed by a projection matrix to obtain a fused feature map. The fused feature map is then fused with the shallow features using residual connections to obtain the final feature map. S400, the final feature map is fused with the mid-level and deep-level features across scales, and the result is input into the detection head to output the bounding box, confidence level, and category of the cage; non-maximum suppression processing is performed on the bounding box to obtain the final recognition result of the deep-water gravity cage.

2. The method according to claim 1, characterized in that, In S100, the preprocessing of the SAR image includes: The acquired SAR image is radiometrically corrected, the radiometrically corrected SAR image is geometrically corrected, and the geometrically corrected SAR image is grayscale normalized to obtain a standardized SAR image with pixel values ​​within a preset range.

3. The method according to claim 1, characterized in that, In S200, the extraction of shallow, mid-level, and deep features based on the standardized SAR image includes: S210, the standardized SAR image is input to the input layer, the standardized SAR image is scaled into a single-channel grayscale image according to the maximum downsampling step size of the YOLOv8 network, the single-channel grayscale image is expanded into a three-channel image through 1×1 convolution, and the three-channel image is normalized according to the image mean and standard deviation during the pre-training of the YOLOv8 network to obtain the input image in tensor format; S220, the input image is input to a feature extraction layer containing four feature output stages. Shallow features are extracted through the Conv and C2f modules in the second stage, mid-level features are extracted through the Conv and C2f modules in the third stage, and deep features are extracted through the Conv, C2f, and SPPF modules in the fourth stage. In each stage, the C2f module replaces the original SiLU activation function with the GELU activation function and introduces a 1×1 convolution in the residual branch for channel compression.

4. The method according to claim 1, characterized in that, In S300, the step of performing high-frequency detail modeling on the input features through a high-frequency attention module and outputting a high-frequency feature map includes: S311, the feature matrix is ​​uniformly divided into multiple non-overlapping local windows; S312, perform high-frequency attention calculation on the feature sequence within each local window, map the features within the window to the high-frequency feature space through query, key, and value projection matrices, calculate the local self-attention score by combining the normalization operation of the Softmax activation function and the dimension scaling factor, and generate the high-frequency feature weight aggregation result within the window; S313: The high-frequency feature weights of all local windows are aggregated and stitched together according to their original spatial positions to reconstruct a high-frequency feature map containing high-frequency details such as the edge texture of the net cage target. Its dimension is consistent with the sequence length of the input features, and the number of output channels is set according to the high-frequency feature modeling requirements to focus on the fine expression of high-frequency details.

5. The method according to claim 1, characterized in that, In S300, the step of enhancing the low-frequency structural features of the input features through a low-frequency attention module and outputting a low-frequency feature map includes: S321, Perform average pooling operation on the input feature matrix, divide it into multiple non-overlapping local windows according to the set pooling kernel size and stride, perform global information aggregation on the feature sequences in each window, and obtain a low-frequency feature matrix at the window level. S322 uses the low-frequency feature matrix obtained by average pooling as the key and value, and the original feature matrix as the query. The query, key, and value projection matrices are mapped to the low-frequency feature space. The global self-attention score is calculated by combining the normalization operation of the Softmax activation function and the dimension scaling factor, and the low-frequency feature weight aggregation result based on global association is generated. S323, all global self-attention results are spliced ​​together according to their original spatial positions to reconstruct a low-frequency feature map containing low-frequency structural features such as the background outline of the net cage target. Its dimension is consistent with the sequence length of the input features, and the number of output channels is set according to the low-frequency structural modeling requirements.

6. The method according to claim 1, characterized in that, In S300, the process of concatenating the high-frequency feature map and the low-frequency feature map along the channel dimension and transforming them using a projection matrix to obtain a fused feature map; and then performing residual connection fusion on the fused feature map and shallow features to obtain a final feature map, includes: S331, the high-frequency feature map and the low-frequency feature map are concatenated along the channel dimension to obtain the concatenated feature; S332, perform matrix multiplication on the stitched features and the projection matrix to obtain the fused feature map; S333 reshapes the fused feature map from a sequence-dimensional format to a spatial-dimensional format, making it match the dimension of shallow features; S334 processes shallow features through a 1×1 convolutional layer and normalizes them with Softmax to obtain adaptive weight parameters for the corresponding shallow features and fused feature maps. S335, based on adaptive weight parameters, performs a weighted summation of shallow features and the reshaped fused feature map to obtain the final feature map after residual fusion.

7. The method according to claim 1, characterized in that, In S400, the cross-scale feature fusion of the final feature map with mid-level and deep features includes: S410 performs upsampling on the mid-level features to make their spatial dimensions consistent with the final feature map; and performs upsampling on the deep features to make their spatial dimensions consistent with the final feature map. S420 concatenates the final feature map, the upsampled mid-level features, and the upsampled deep features according to the channel dimension to obtain cross-scale concatenated features; S430 inputs the cross-scale splicing features into the convolution module for optimization processing to obtain cross-scale fused features.

8. A SAR deep-water gravity-based cage identification system based on frequency domain features, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor performs the method as described in any one of claims 1 to 7.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.