A method and system for aquatic product identification based on multi-domain feature refinement
By employing multi-domain feature refinement methods and utilizing techniques such as wavelet directional attention and shifted window self-attention modules, the identification difficulties caused by color shift and scattering in underwater images are resolved, improving the accuracy and robustness of aquatic product identification, especially in the identification of slender structures and small-scale targets.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG SCI-TECH UNIV
- Filing Date
- 2026-06-05
- Publication Date
- 2026-07-31
AI Technical Summary
In underwater images, color shift, decreased contrast, blurred edges, and high-frequency texture attenuation caused by water scattering and absorption result in insufficient performance of existing methods for contour neighborhood and small-scale target recognition, inadequate cross-scale semantic interaction, and sparse boundary supervision signals, all of which affect the recognition of aquatic products.
A multi-domain feature refinement method is adopted, including multi-scale feature extraction, feature refinement module and semantic recognition decoding module. Through wavelet directional attention module, shift window self-attention module and wavelet-spatial domain fusion block, cross-scale feature interaction and boundary information are enhanced, and boundary loss is introduced to guide model training.
It improves the semantic discrimination effect when the background and foreground textures are similar in underwater scenes, enhances the robustness of recognition of slender structures and small-scale targets, strengthens high-frequency boundary and texture information, and improves the accuracy and stability of aquatic product recognition.
Smart Images

Figure CN122493260A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of underwater image processing and computer vision technology, specifically relating to a method and system for aquatic product identification based on multi-domain feature refinement. Background Technology
[0002] With the continuous development of marine resource development and marine environmental monitoring technologies, aquatic product identification has become an important component of marine information systems. Aquatic product identification assigns semantic categories to each location at the pixel level to identify marine biological targets, and has significant application value in target detection, resource exploration, and ecological monitoring. However, the absorption and scattering of light by water bodies leads to degradation phenomena in underwater images, such as color cast, decreased contrast, blurred edges, and high-frequency texture attenuation. These degradations significantly reduce the performance of conventional aquatic product identification methods, especially for contour neighborhoods, slender structures, and small-scale targets, where metrics such as average intersection-over-union ratio (AUC) and boundary F1 score fail to meet practical requirements. Furthermore, existing aquatic product identification methods also suffer from the following problems:
[0003] (1) Degradation of contours and high-frequency information caused by scattering. Water absorption and scattering weaken high-frequency details and widen edge regions. Shallow convolution features are susceptible to color shift and low contrast, which reduces the inter-class separability of contours and small objects.
[0004] (2) Insufficient utilization of cross-scale semantic interaction and long-range dependency. Although HRNet retains multi-resolution branches, when relying solely on convolution to complete the interaction between branches, the selection of non-local relationships and cross-scale features is still insufficient.
[0005] (3) The boundary supervision signal is sparse and the contour index is sensitive. The boundary pixels account for a very small proportion of the whole image, and the cross-entropy is prone to the gradient being diluted by a large area of easily separable background near the contour. Summary of the Invention
[0006] The purpose of this invention is to provide a method and system for aquatic product identification based on multi-domain feature refinement.
[0007] In a first aspect, the present invention provides a method for aquatic product identification based on multi-domain feature refinement, the method comprising:
[0008] The underwater images to be measured are acquired, preprocessed, and then input into the aquatic identification model;
[0009] The aquatic identification model includes a multi-scale feature extraction module, a feature refinement module, and a semantic recognition and decoding module. The multi-scale feature extraction module is used to extract features from the underwater image under test at multiple scales to obtain multiple feature extraction maps at different scales. The feature refinement module is used to further process the feature extraction maps and output the feature refinement maps corresponding to each feature extraction map.
[0010] In the feature refinement module, the wavelet directional attention module performs Haar wavelet decomposition and directional high-frequency gating on the feature extraction maps at different scales to obtain gated fusion feature maps. The shift window self-attention module and the wavelet-spatial fusion block are used together to process the mid-scale gated fusion feature maps to obtain the frequency-spatial fusion feature maps. If the number of feature extraction maps is odd, the gated fusion feature map of the intermediate level is used as the mid-scale gated fusion feature map. If the number of feature extraction maps is even, the gated fusion feature map of the next level below the intermediate level is used as the mid-scale gated fusion feature map.
[0011] The cross-branch attention module is used to perform cross-scale interactive fusion and partitioning of the frequency-space fusion feature map and the gated fusion feature map to obtain the feature refinement map corresponding to each feature extraction map; the feature refinement map is input into the semantic recognition decoding module to obtain the aquatic recognition result of the tested underwater image.
[0012] Preferably, in the wavelet directional attention module, the feature extraction map is decomposed using Haar wavelet to obtain high-frequency subbands and low-frequency subbands; compression-excitation gating is performed on the high-frequency subbands to obtain the channel weights corresponding to the high-frequency subbands; the high-frequency subbands are reweighted using the channel weights to obtain the gated high-frequency subbands; the low-frequency subbands and the gated high-frequency subbands are concatenated along the channels and processed by convolutional blocks to obtain the gated feature map; the gated feature map is then fused with the feature extraction map after performing a convolution operation to obtain the gated fused feature map output by the wavelet directional attention module.
[0013] Preferably, the compression-excitation gating method is as follows: first, a global average pooling operation is performed on the high-frequency subband, then it is processed by a first fully connected layer and a ReLU activation function, and finally it is processed by a second fully connected layer and a Sigmoid activation function to obtain the channel weights.
[0014] Preferably, in the shift window self-attention module, the gated fusion feature map is divided into non-overlapping windows, and multi-head self-attention is computed within each window, with a learnable relative position bias introduced; adjacent layers use a shift window strategy to establish cross-window connections; after stacking the sub-modules, they are processed by convolution, batch normalization, and activation functions, and the processing result is multiplied by a learnable scalar and added to the gated fusion feature map to obtain the output feature map of the shift window self-attention module.
[0015] Preferably, the wavelet-spatial fusion block includes a sub-band path, a spatial path, and a fusion path. In the sub-band path, depthwise convolution is used to process the input feature map of the wavelet-spatial fusion block, and the processing result is decomposed using Haar wavelet to obtain low-frequency sub-bands and high-frequency sub-bands. After gating the high-frequency sub-band, it is concatenated with the low-frequency sub-band, and then convolution, batch normalization, activation function, and upsampling operations are performed sequentially to obtain the sub-band feature map output by the sub-band path. In the spatial path, depthwise separable convolution is used to process the input feature map of the wavelet-spatial fusion block to obtain a spatial feature map. In the fusion path, the sub-band feature map and the spatial feature map are concatenated along the channel, and the concatenation result is processed by convolution. The processing result is then convolutionally mapped and added to the input feature map of the wavelet-spatial fusion block to obtain the frequency-spatial fusion feature map output by the wavelet-spatial fusion block.
[0016] Preferably, the cross-branch attention module uses the frequency-space fusion feature map and the gated fusion feature map (excluding the mesoscale gated fusion feature map) as input feature maps. In the cross-branch attention module, multiple input feature maps are scaled and stacked to obtain a stacked tensor. After flattening the stacked tensor in the spatial dimension, multi-head self-attention calculation is performed on multiple scale tokens at each spatial location, and the calculation results are split after passing through a linear layer to obtain the branch outputs corresponding to each input feature map. Each branch output is scaled by a learnable scalar and then added to the corresponding input feature map to obtain the feature refinement map corresponding to each input feature map.
[0017] Preferably, the method for scaling multiple input feature maps in the cross-branch attention module is as follows: project all input feature maps onto a common embedding dimension through a convolutional block, and then upsample them to the highest resolution through bilinear upsampling to obtain multiple input feature maps after scaling.
[0018] The aquatic product identification model is trained using a dataset containing different underwater images and corresponding real labels. During training, a boundary loss is introduced to guide the parameter updates in the aquatic product identification model. The method for constructing the boundary loss is as follows:
[0019] A boundary indicator map is generated based on the labels of different pixels and their neighboring pixels in the real labels; the boundary indicator map is subjected to max pooling to obtain the boundary extension band; pixel-wise boundary weights are generated based on the boundary indicator map and the boundary extension band; the output of the semantic recognition decoding module is activated by softmax to obtain the class probability, and the real labels are converted into one-hot representations; for different classes appearing in the real labels, the class probabilities and one-hot representations are fused according to the pixel-wise boundary weights to obtain weighted intersection and weighted union; the degree of overlap is obtained based on the weighted intersection and weighted union, and the final boundary loss is obtained based on the degree of overlap.
[0020] Preferably, the multi-scale feature extraction module uses the HRNetV2 network.
[0021] Preferably, the semantic recognition decoding module adopts an object context representation module.
[0022] Secondly, the present invention provides an aquatic product identification system based on multi-domain feature refinement, which is used to execute the above-described aquatic product identification method; the aquatic product identification system includes an image acquisition module, an image preprocessing module, a multi-scale feature extraction module, a feature refinement module, and a semantic recognition decoding module; the image acquisition module is used to acquire underwater images to be tested; the image preprocessing module is used to preprocess the acquired underwater images to be tested; the multi-scale feature extraction module is used to extract multi-scale features from the preprocessed underwater images to be tested; the feature refinement module is used to refine the feature maps obtained by multi-scale feature extraction; and the semantic recognition decoding module is used to generate aquatic product identification results based on the feature refinement maps output by the feature refinement module.
[0023] The beneficial effects of this invention are:
[0024] 1. This invention introduces shifted window self-attention and wavelet-spatial fusion block only in the mid-resolution branch. Under the premise of controlling the amount of computation and model complexity, it can establish long-range dependencies across windows using the shifted window mechanism, enhance the contextual representation ability of the mid-field region, and thus help improve the semantic discrimination effect when the background and foreground textures are similar in underwater scenes. At the same time, this invention connects sub-band paths and spatial paths in parallel in the wavelet-spatial fusion block, so that the frequency domain structural information and the spatial local texture information complement each other, improving the robustness of recognition of slender structures and small-scale targets.
[0025] 2. By introducing Haar wavelet decomposition and directional high-frequency gating into each scale branch, this invention can address the high-frequency weakening and contour blurring caused by underwater scattering, and enhance the boundary and texture information in the high-frequency subband. At the same time, this invention enables multi-head self-attention interaction in the scale dimension through cross-branch attention modules, allowing branches of different resolutions to explicitly select and fuse cross-scale semantic information. Attached Figure Description
[0026] Figure 1 This is a schematic diagram of the aquatic identification model in this invention.
[0027] Figure 2 This is a schematic diagram of the wavelet directional attention module structure in this invention.
[0028] Figure 3 This is a schematic diagram of the shift window self-attention module structure in this invention.
[0029] Figure 4 This is a schematic diagram of the wavelet-spatial fusion block structure in this invention.
[0030] Figure 5 This is a schematic diagram of the cross-branch attention module structure in this invention.
[0031] Figure 6 This is a schematic diagram of the training process in this invention. Detailed Implementation
[0032] The present invention will be further described below with reference to the accompanying drawings.
[0033] A method for aquatic product identification based on multi-domain feature refinement is disclosed. The aquatic product identification system includes an image acquisition module, an image preprocessing module, a multi-scale feature extraction module, a feature refinement module, and a semantic recognition and decoding module. The image acquisition module acquires underwater images. The image preprocessing module preprocesses the acquired underwater images. The multi-scale feature extraction module extracts multi-scale features from the preprocessed underwater images. The feature refinement module refines the feature maps obtained from the multi-scale feature extraction. The semantic recognition and decoding module generates aquatic product identification results based on the refined feature maps output by the feature refinement module.
[0034] The aquatic product identification method includes the following steps:
[0035] Step 1: Data Acquisition and Processing
[0036] A dataset was constructed by collecting underwater images containing different aquatic targets. The spatial resolution of the images in the dataset was fixed at 512×512, and the images were normalized by mean and variance. The dataset was divided into training and validation sets. For the images in the training set, random horizontal flipping and multi-scale random scaling (scaling factor discretely sampled relative to the reference side length) were performed under the framework of short-side scaling and random cropping.
[0037] Step 2: Construct an aquatic product identification model
[0038] like Figure 1 As shown, the aquatic product identification model includes a multi-scale feature extraction module, a feature refinement module, and a semantic recognition and decoding module. The multi-scale feature extraction module uses the HRNetV2 network to perform multi-scale feature extraction on the input underwater image, obtaining the feature extraction map. (Spatial resolution from high to low, semantics from fine to coarse). The feature refinement module sequentially performs wavelet subband domain directionality modeling, window self-attention characterization of long-range dependencies, wavelet subband-spatial domain parallel connection, and cross-scale interaction on the feature extraction maps to obtain the feature refinement maps corresponding to each feature extraction map. The semantic recognition decoding module uses the Object-Contextual Representations (OCR) module to process the feature refinement maps to obtain the aquatic recognition results for the input underwater image.
[0039] In the feature refinement module, the wavelet directional attention module (WDAM) performs Haar decomposition and directional high-frequency gating on the feature extraction maps at different scales to obtain gated fusion feature maps. The shifted window self-attention module (Swin) and the wavelet-spatial fusion block (WTFB) are used to perform gated fusion feature maps at the medium scale (if the number of gated fusion feature maps is even, the deeper gated fusion feature map is selected as the medium-scale gated fusion feature map, i.e., the feature extraction map in this embodiment). The corresponding gated fusion feature map is processed to obtain the frequency-space fusion feature map; the cross-branch attention module (MPAH) is used to perform cross-scale interactive fusion and partitioning of the gated fusion feature map and the frequency-space fusion feature map to obtain the feature refinement map corresponding to each feature extraction map.
[0040] like Figure 2 As shown, in the wavelet directional attention module, the feature extraction map is first filled with reflections to make its size even. Then, a first-level Haar decomposition (Haar wavelet decomposition) is performed on the feature extraction map to obtain four sub-band components: low-frequency sub-band (LL), horizontal high-frequency sub-band (LH), vertical high-frequency sub-band (HL), and diagonal high-frequency sub-band (HH). Each high-frequency sub-band is then subjected to compression-activation (SE) gating (global average pooling, Conv+ReLU, Conv+Sigmoid) to obtain the corresponding channel weights. The high-frequency sub-bands are then re-weighted using these channel weights to obtain the gated high-frequency sub-bands. Finally, the low-frequency sub-bands and the gated high-frequency sub-bands are concatenated along the channels and processed by a convolutional block (1×1 convolution, batch normalization, ReLU activation) before being compressed back to the original number of channels to obtain the gated feature map. Gated feature maps are constructed using 1×1 convolutions with initial weights of zero. The process is performed, and the result is added to the extracted feature map to obtain the gated fusion feature map output by the wavelet directional attention module. The above process can be expressed by the following formula:
[0041]
[0042]
[0043]
[0044]
[0045] in, Channel weights; For high-frequency sub-band, ; Indicates Sigmoid activation; and Indicates a fully connected operation; Represents the ReLU activation function; Indicates global average pooling; For the high-frequency subband after gating; Represents a 1×1 convolution; This indicates the output feature map.
[0046] like Figure 3 As shown, in the shift-window self-attention module, the gated fusion feature map is divided into non-overlapping windows, and multi-head self-attention is computed within each window, introducing a learnable relative position bias. Adjacent layers use a shift-window strategy to establish cross-window connections. After stacking the sub-modules, φ(z) is obtained through 1×1 convolution, batch normalization, and ReLU mapping. This φ(z) is then multiplied by a learnable scalar α (initial value close to 0, such as 0.01) and added to the gated fusion feature map to obtain the output feature map of the shift-window self-attention module.
[0047] like Figure 4 As shown, the wavelet-spatial fusion block includes a sub-band path, a spatial path, and a fusion path. In the sub-band path, depthwise convolution is used to process the input feature map of the wavelet-spatial fusion block, and the processing result is subjected to Haar wavelet decomposition to obtain low-frequency and high-frequency sub-bands. After gating the high-frequency sub-band, it is concatenated with the low-frequency sub-band, and then sequentially subjected to 1×1 convolution, batch normalization, ReLU activation, and upsampling operations to obtain the sub-band feature map output by the sub-band path. In the spatial domain path, the input feature map of the wavelet-spatial fusion block is processed sequentially through 3×3 depthwise convolution, batch normalization, ReLU activation, 1×1 pointwise convolution, batch normalization, and ReLU activation to extract the spatial features of the feature map, thus obtaining the spatial domain feature map. In the fusion path, the sub-band feature maps are... Spatial feature map The concatenation is performed along the channel, and the concatenation result is processed by a convolutional block (Conv+BN+ReLU). Then, it is added to the input feature map of the wavelet-spatial fusion block through a 1×1 convolutional residual connection with zero initial weights to obtain the frequency-space fusion feature map output by the wavelet-spatial fusion block.
[0048] like Figure 5 As shown, in the cross-branch attention module, the frequency-space fusion feature map and the gated fusion feature map (excluding the mesoscale gated fusion feature map) are used as input feature maps. The four input feature maps are projected onto the common embedding dimension d through convolutional blocks (conv-BN-ReLU), and then upsampled to the highest resolution (same size as X1) using bilinear methods. The scale-unified feature maps are stacked along the scale dimension to obtain a tensor of shape (B,4,d,H,W), and the spatial dimension is flattened to (N=H×W). At each spatial location, multi-head self-attention is calculated for the four scale tokens (the scale dimension is used as the sequence length). The output of the multi-head attention is passed through a linear layer, then split into branches. The output of each branch is scaled by a learnable scalar γ_i (with a small initial value), and then added to the input feature map to obtain the refined feature map corresponding to each input feature map.
[0049] The semantic recognition decoding module includes an auxiliary recognition head and a main recognition head. The auxiliary recognition head outputs coarse classification logits Z1, transforms the fused features into pixel-level features, and aggregates the pixel-level features according to the normalized weights of Z1 in the spatial dimension to obtain various surrogate features. The main recognition path uses pixel-level features as queries and class-level surrogate features as keys and values. It writes the object-level context back to pixel-by-pixel features through pixel-category attention, and then outputs the main classification logits Z2 via the main recognition head. During inference, the semantic recognition result of each pixel is obtained by calculating the category probability using Z2.
[0050] Step 3, as follows Figure 6 As shown, a dataset is used to train an aquatic product recognition model, and the trained model is then used to identify aquatic targets in underwater images. During training, a total loss function is constructed. as follows:
[0051]
[0052] in, Indicates baseline supervision; Indicates boundary loss; This is the loss weight.
[0053] Baseline supervision It is expressed as follows:
[0054]
[0055] in, Weights for each semantic recognition head; The number of semantic recognition heads; This is the output of the semantic recognition head; This is a real label.
[0056] The boundary loss is constructed as follows:
[0057] For each valid pixel in the true label Y, determine whether adjacent pixels have different labels within their four-neighborhood to generate a boundary feature map E. Perform square max pooling with radius r and step size 1 on the boundary feature map E (with boundary fill width r) to obtain the boundary extension band U. Generate pixel-wise boundary weights based on the boundary feature map E and the boundary extension band U. ( ); output Z from the main recognition head (2) The class probabilities P are obtained through softmax, and the true labels are converted into one-hot representations H; for each class k appearing in the true labels, the weighted intersection is calculated. and weighted union Then calculate the degree of overlap. , where ε is the smoothing constant; for 1- The boundary loss is obtained by averaging across the categories that appear. .
[0058] In this embodiment, the optimizer uses SGD (momentum 0.9, weight decay 1e-4, no Nesterov). The base learning rate is 0.01, decaying to 0 using polynomial decay (power=0.9), with a linear warm-up of 5 epochs. The learning rate multiplier is set to 0.2 for the medium resolution branch (third branch), while other branches are left at their default values. The batch size is 8, the total training epochs are 120, and the early stopping patience is 25 (based on validation set mIoU). The model is evaluated every epoch on the validation set, and the model weights with the highest validation mIoU are saved.
[0059] Step 4: Method Evaluation
[0060] An ablation experiment was conducted on the aquatic identification model, and the results are shown in Table 1.
[0061] Table 1 Results of progressive ablation experiments
[0062]
[0063] As shown in Table 1, from A0 to A5, mIoU, mean F1, and boundary F1 generally show an upward trend. Compared to A0, A5 shows a cumulative increase of approximately 3.71 percentage points in mIoU, approximately 0.026 in mean F1, and approximately 0.029 in boundary F1. The representation capacity and multi-scale interaction gradually increase from A1 to A4. After adding boundary Dice to A4, A5 still shows a slight increase in mIoU, and the standard deviation decreases from 0.0140 in A4 to 0.0036, indicating more stable training. A6 has the same structure as A5 and adds intra-domain contrastive pre-training: contrastive learning focuses on instance discrimination and augmentation invariance [24,28], which is not entirely consistent with the pixel-level semantic classification objective. Therefore, mIoU and mean F1 are lower than A5, while boundary F1 is the highest throughout, showing a certain divergence between contour metrics and overall classification performance.
Claims
1. A method for aquatic product identification based on multi-domain feature refinement, characterized in that: The method includes: The underwater images to be measured are acquired, preprocessed, and then input into the aquatic identification model; The aquatic identification model includes a multi-scale feature extraction module, a feature refinement module, and a semantic recognition and decoding module. The multi-scale feature extraction module is used to extract features from the underwater image under test at multiple scales to obtain multiple feature extraction maps at different scales. The feature refinement module is used to further process the feature extraction maps and output the feature refinement maps corresponding to each feature extraction map. In the feature refinement module, the wavelet directional attention module performs Haar wavelet decomposition and directional high-frequency gating on the feature extraction maps at different scales to obtain gated fusion feature maps. The shift window self-attention module and the wavelet-spatial fusion block are used together to process the mid-scale gated fusion feature maps to obtain the frequency-spatial fusion feature maps. If the number of feature extraction maps is odd, the gated fusion feature map of the intermediate level is used as the mid-scale gated fusion feature map. If the number of feature extraction maps is even, the gated fusion feature map of the next level below the intermediate level is used as the mid-scale gated fusion feature map. The cross-branch attention module is used to perform cross-scale interactive fusion and partitioning of the frequency-space fusion feature map and the gated fusion feature map to obtain the feature refinement map corresponding to each feature extraction map; the feature refinement map is input into the semantic recognition decoding module to obtain the aquatic recognition result of the tested underwater image.
2. The aquatic product identification method based on multi-domain feature refinement according to claim 1, characterized in that: In the wavelet directional attention module, the feature extraction map is decomposed using Haar wavelet to obtain high-frequency and low-frequency subbands. Compression-excitation gating is then applied to the high-frequency subbands to obtain the corresponding channel weights. These channel weights are then used to reweight the high-frequency subbands to obtain the gated high-frequency subbands. The low-frequency subbands and the gated high-frequency subbands are concatenated along the channels and processed by a convolutional block to obtain the gated feature map. Finally, the gated feature map is fused with the feature extraction map after a convolution operation to obtain the gated fused feature map output by the wavelet directional attention module.
3. The aquatic product identification method based on multi-domain feature refinement according to claim 2, characterized in that: The compression-excitation gating method is as follows: first, a global average pooling operation is performed on the high-frequency subbands, then the channel weights are obtained by processing through a first fully connected layer and a ReLU activation function, and finally by processing through a second fully connected layer and a Sigmoid activation function.
4. The aquatic product identification method based on multi-domain feature refinement according to claim 1, characterized in that: In the shift window self-attention module, the gated fusion feature map is divided into non-overlapping windows, and multi-head self-attention is computed within each window, and a learnable relative position bias is introduced. Adjacent layers use a shift window strategy to establish cross-window connections; after stacking the sub-modules, they are processed by convolution, batch normalization and activation functions, and then the processing result is multiplied by the learnable scalar and added to the gated fusion feature map to obtain the output feature map of the shift window self-attention module.
5. The aquatic product identification method based on multi-domain feature refinement according to claim 1, characterized in that: The wavelet-spatial fusion block includes a sub-band path, a spatial path, and a fusion path. In the sub-band path, depthwise convolution is used to process the input feature map of the wavelet-spatial fusion block, and the processing result is decomposed using Haar wavelet to obtain low-frequency and high-frequency sub-bands. After gating the high-frequency sub-band, it is concatenated with the low-frequency sub-band, and then convolution, batch normalization, activation function, and upsampling operations are performed sequentially to obtain the sub-band feature map output by the sub-band path. In the spatial path, depthwise separable convolution is used to process the input feature map of the wavelet-spatial fusion block to obtain a spatial feature map. In the fusion path, the sub-band feature map and the spatial feature map are concatenated along the channel, and the concatenation result is processed by convolution. The processing result is then convolutionally mapped and added to the input feature map of the wavelet-spatial fusion block to obtain the frequency-spatial fusion feature map output by the wavelet-spatial fusion block.
6. The aquatic product identification method based on multi-domain feature refinement according to claim 1, characterized in that: The cross-branch attention module uses the frequency-space fusion feature map and the gated fusion feature map other than the mesoscale gated fusion feature map as input feature maps; In the cross-branch attention module, multiple input feature maps are scaled and stacked to obtain a stacked tensor. After flattening the stacked tensor in the spatial dimension, multi-head self-attention is calculated for multiple scale tokens at each spatial location. The calculation results are then split after passing through a linear layer to obtain the branch outputs corresponding to each input feature map. The outputs of each branch are scaled using a learnable scalar and then added to the corresponding input feature maps to obtain the refined feature maps corresponding to each input feature map.
7. The aquatic product identification method based on multi-domain feature refinement according to claim 6, characterized in that: The method for scaling multiple input feature maps in the cross-branch attention module is as follows: all input feature maps are projected onto a common embedding dimension through a convolutional block, and then upsampled to the highest resolution through bilinear upsampling to obtain multiple input feature maps after scaling.
8. The aquatic product identification method based on multi-domain feature refinement according to claim 1, characterized in that: The multi-scale feature extraction module uses the HRNetV2 network; the semantic recognition and decoding module uses the object context representation module.
9. The aquatic product identification method based on multi-domain feature refinement according to claim 1, characterized in that: The aquatic product identification model is trained using a dataset containing different underwater images and corresponding real labels. During training, a boundary loss is introduced to guide the parameter updates in the aquatic product identification model. The method for constructing the boundary loss is as follows: A boundary feature map is generated based on the labels of different pixels and their neighboring pixels in the real labels; the boundary feature map is subjected to max pooling to obtain the boundary extension band; pixel-by-pixel boundary weights are generated based on the boundary feature map and the boundary extension band. The output of the semantic recognition decoding module is activated by softmax to obtain the class probability, and the real label is converted into a one-hot representation. For different classes appearing in the real label, the class probability and one-hot representation are fused according to the pixel-by-pixel boundary weight to obtain the weighted intersection and weighted union. The degree of overlap is obtained based on the weighted intersection and weighted union, and the final boundary loss is obtained according to the degree of overlap.
10. A seafood identification system based on multi-domain feature refinement, characterized in that: The aquatic product identification system is used to execute the multi-domain feature refinement-based aquatic product identification method according to claim 1. The aquatic product identification system includes an image acquisition module, an image preprocessing module, a multi-scale feature extraction module, a feature refinement module, and a semantic recognition decoding module. The image acquisition module is used to acquire underwater images to be measured. The image preprocessing module is used to preprocess the acquired underwater images to be measured. The multi-scale feature extraction module is used to extract multi-scale features from the preprocessed underwater images to be measured. The feature refinement module is used to refine the feature maps obtained from the multi-scale feature extraction. The semantic recognition decoding module is used to generate aquatic product identification results based on the refined feature maps output by the feature refinement module.