Underwater target detection method and system based on cross-space calibration and self-learning interaction

By employing a cross-space calibration and self-learning interaction mechanism, the problem of insufficient multi-scale feature fusion in underwater target detection is solved, improving the detection accuracy and robustness of small targets such as starfish, and adapting to complex underwater environments.

CN120852979BActive Publication Date: 2026-06-16QINGDAO UNIV OF TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
QINGDAO UNIV OF TECH
Filing Date
2025-07-16
Publication Date
2026-06-16

AI Technical Summary

Technical Problem

Existing underwater target detection methods suffer from problems such as insufficient multi-scale feature fusion, weak feature semantic expression ability, and difficulty in handling complex background interference and target occlusion in complex underwater environments, resulting in low detection accuracy for small targets such as starfish.

Method used

By adopting a cross-spatial calibration and self-learning interaction mechanism, the feature representation capability is enhanced through multi-scale feature extraction, cross-spatial feature calibration, self-learning feature interaction and residual connection, so as to realize information integration and selective interaction between non-adjacent features across scales.

Benefits of technology

It significantly improves the accuracy and robustness of underwater target detection, especially under extreme conditions such as complex backgrounds, low contrast, or target occlusion, enabling more accurate detection of small targets such as starfish.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120852979B_ABST
    Figure CN120852979B_ABST
Patent Text Reader

Abstract

The present application relates to underwater target detection technical field, proposed based on the underwater target detection method and system of cross-space calibration and self-learning interaction, including the following steps: multi-scale feature extraction is carried out to underwater target image;The extracted high-level features are respectively cross-space feature calibration;For each high-level feature fusion cross-space fusion feature, self-learning feature interaction is carried out;Classification prediction is carried out based on the fusion feature after self-learning feature interaction, and the recognition result is obtained.Through cross-space feature calibration and self-learning interaction mechanism, the limitation that only local alignment can be achieved in multi-scale fusion is broken, and the information integration and selective interaction between cross-scale non-adjacent features are innovatively realized, which is suitable for high-density small target complex underwater environment, especially suitable for target shielding, color approximation and texture similarity challenge situation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of underwater target detection technology, specifically to an underwater target detection method and system based on cross-space calibration and self-learning interaction. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] In recent years, with the development of marine scientific research, underwater engineering operations, and intelligent equipment, underwater target detection technology has played an increasingly important role in applications such as marine biological surveys, marine resource exploration, aquaculture monitoring, underwater cultural relic protection, and autonomous navigation of underwater robots. Underwater images, as key information carriers, provide fundamental data support for the identification and analysis of marine targets. However, the underwater imaging environment is limited by strong light absorption and scattering, often leading to problems such as blurriness, color cast, and low contrast in images, thus reducing the expressive power of target features. Furthermore, seabed targets (such as starfish and other benthic animals) typically have characteristics such as small size, varied morphology, weak texture, high similarity to the background, dense distribution, and easy occlusion, further increasing the difficulty of target detection. Traditional methods based on handcrafted features, such as SIFT, HOG, and template matching, exhibit poor adaptability and weak robustness when facing complex underwater environments.

[0004] To address these challenges, numerous studies in recent years have attempted to incorporate deep learning into underwater target detection tasks, employing mainstream detection frameworks such as YOLO and Faster R-CNN to improve target recognition capabilities. While these methods have improved detection performance to some extent, existing approaches still suffer from problems such as insufficient multi-scale feature fusion, weak feature semantic expression, difficulty in handling complex background interference and target occlusion, and inability to achieve effective interaction between non-adjacent features. These technical bottlenecks directly affect the accuracy and stability of the model's detection of small seabed targets, hindering the further development of underwater intelligent sensing systems. Taking starfish as an example, underwater starfish are small in size, densely distributed, and subject to target occlusion; the color and texture of starfish are similar to those of the seabed, making them difficult to distinguish from the background. In the process of detecting underwater starfish, existing target detection methods suffer from the problem of difficulty in fusing non-adjacent scale features in the feature pyramid module, resulting in feature information loss. Therefore, they are ill-suited to underwater scenarios where starfish targets are close to the background and cannot solve problems such as target occlusion, leading to low detection accuracy for underwater starfish. Summary of the Invention

[0005] To address the aforementioned issues, this invention proposes an underwater target detection method and system based on cross-spatial calibration and self-learning interaction. By employing a cross-spatial feature calibration and self-learning interaction mechanism, it breaks the limitation of only being able to align locally in multi-scale fusion, innovatively achieving information integration and selective interaction between non-adjacent features across scales. This method is adaptable to complex underwater environments with high density of small targets, and is particularly suitable for challenging situations such as target occlusion, color similarity, and texture similarity.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] One or more embodiments provide an underwater target detection method based on cross-space calibration and self-learning interaction, including the following steps:

[0008] Multi-scale feature extraction is performed on the acquired underwater target images;

[0009] Multiple high-level features extracted from the multi-scale features are calibrated across space. For each high-level feature, convolutional branches with different receptive fields are used to extract features. The outputs of each convolutional branch are fused using a spatial weighted graph to obtain the cross-space fused features.

[0010] For each high-level feature fusion, the cross-space fused features are aligned and then selectively self-learned feature interaction is performed to establish non-local dependencies between features. Residual connections are then used to strengthen the features at the same level. After convolution, the fused features after self-learned feature interaction are obtained.

[0011] The classification prediction is based on the fused features after self-learning feature interaction, and the recognition result is obtained.

[0012] One or more embodiments provide an underwater target detection system based on cross-space calibration and self-learning interaction, including:

[0013] The feature extraction module is configured to perform multi-scale feature extraction on the acquired underwater target images;

[0014] The cross-spatial feature calibration module is configured to perform cross-spatial feature calibration on multiple high-level features extracted from multi-scale features. For each high-level feature, convolutional branches with different receptive fields are used to extract features, and the outputs of each convolutional branch are fused through a spatial weighted graph to obtain the cross-spatial fused features.

[0015] The self-learning feature interaction layer is configured to perform selective self-learning feature interaction operations on the cross-space fused features obtained by each high-level feature fusion after alignment, establish non-local dependencies between features, and then use residual connections to strengthen the features at the same level. After convolution operation, the fused features after self-learning feature interaction are obtained.

[0016] The classifier is configured to perform classification prediction based on the fused features after self-learning feature interactions, and obtain the recognition result.

[0017] An electronic device includes a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the underwater target detection method based on cross-space calibration and self-learning interaction described above.

[0018] A computer-readable storage medium having a computer program / instructions stored thereon, which, when executed by a processor, implements the steps of the underwater target detection method based on cross-space calibration and self-learning interaction described above.

[0019] A computer program product includes a computer program / instructions that, when executed by a processor, implement the steps of the underwater target detection method based on cross-space calibration and self-learning interaction described above.

[0020] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0021] This invention improves overall feature perception by constructing a multi-scale feature extraction network to extract multi-scale features from target information of different sizes in underwater images. Based on this, multiple convolutional branches with receptive fields are introduced for several high-level features to enhance the expressive power of targets at different spatial scales. Furthermore, different weights are assigned to the convolutional outputs of each branch by generating a spatially weighted graph, achieving cross-spatial feature calibration and fusion, ensuring that the fused features retain both detailed and semantic information. After feature calibration and fusion, a selective self-learning interaction mechanism is introduced. This mechanism establishes non-local dependencies between features based on the aligned fused features, enabling semantic linkage between non-adjacent channels or spatial locations, thereby enhancing feature discriminative ability. Finally, the fused features are reinforced with residual structures to enhance the stability of peer features before classification prediction to obtain the target category.

[0022] This invention enriches feature expression during feature extraction by designing a cross-spatial feature calibration mechanism; and designs a self-learning feature interaction method to adaptively interact low-level features with high-level features, effectively integrating global semantic information, narrowing the semantic gap between features at different levels, and significantly improving the detection accuracy of underwater starfish.

[0023] The advantages of the present invention, as well as its additional advantages, will be described in detail in the following specific embodiments. Attached Figure Description

[0024] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute a limitation thereof.

[0025] Figure 1 This is an overall network structure diagram of underwater target detection in Embodiment 1 of the present invention;

[0026] Figure 2 This is a schematic diagram of the feature extraction module structure in Embodiment 1 of the present invention;

[0027] Figure 3 This is a schematic diagram of the cross-spatial feature calibration module of Embodiment 1 of the present invention;

[0028] Figure 4 This is a schematic diagram of the structure of the self-learning feature interaction layer in Embodiment 1 of the present invention;

[0029] Figure 5 This is a schematic diagram of the classifier structure of Embodiment 1 of the present invention;

[0030] Figure 6 The underwater starfish detection results and training loss values ​​are from a simulation example of Embodiment 1 of the present invention.

[0031] Figure 7 These are detection result images of different images from Embodiment 1 of the present invention; Detailed Implementation

[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0033] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, 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.

[0034] It should be noted that the terminology used herein is for describing particular embodiments only and is not intended to limit the exemplary embodiments of the present invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof. It should be noted that, without conflict, the various embodiments and features within those embodiments can be combined with each other. The embodiments will now be described in detail with reference to the accompanying drawings.

[0035] Example 1

[0036] In one or more of the technical solutions disclosed in the embodiments, such as Figures 1 to 7 As shown, an underwater target detection method based on cross-space calibration and self-learning interaction includes the following steps:

[0037] Step 1: Perform multi-scale feature extraction on the acquired underwater target images;

[0038] Step 2: Perform cross-spatial feature calibration on multiple high-level features extracted from the multi-scale features. For each high-level feature, use convolutional branches with different receptive fields to extract features, and fuse the outputs of each convolutional branch through a spatial weighted graph to obtain the cross-spatial fused features.

[0039] Step 3: For each high-level feature fusion, the cross-space fused features are aligned and then selectively self-learned feature interaction is performed to establish non-local dependencies between features. Residual connections are then used to strengthen the features at the same level. After convolution, the fused features after self-learned feature interaction are obtained.

[0040] Step 4: Perform classification prediction based on the fused features after self-learning feature interaction to obtain the recognition result;

[0041] In this embodiment, a cross-spatial feature calibration mechanism is designed to enrich feature expression during feature extraction; and a self-learning feature interaction method is designed to adaptively interact low-level features with high-level features, effectively integrating global semantic information, narrowing the semantic gap between features at different levels, and significantly improving the detection accuracy of underwater starfish.

[0042] This implementation method enhances overall feature perception capabilities by constructing a multi-scale feature extraction network to capture target information of different sizes in underwater images. Building upon this, multiple convolutional branches with receptive field configurations are introduced for several high-level features to enhance the expressive power of targets at different spatial scales. Furthermore, different weights are assigned to the convolutional outputs of each branch by generating a spatially weighted graph, achieving cross-spatial feature calibration and fusion, ensuring that the fused features retain both detailed and semantic information. After feature calibration and fusion, a selective self-learning interaction mechanism is introduced. This mechanism establishes non-local dependencies between features based on the aligned fused features, enabling semantic linkage between non-adjacent channels or spatial locations, thereby enhancing feature discriminative capabilities. Finally, the fused features are reinforced with residual structures to enhance the stability of peer features before classification prediction to obtain the target category.

[0043] Compared to traditional YOLO or Faster R-CNN frameworks, this method significantly improves the representation and fusion capabilities of multi-scale features, exhibiting stronger robustness, especially under extreme underwater conditions such as complex backgrounds, low contrast, or occluded targets. The cross-spatial calibration mechanism effectively enhances the ability of high-level features to preserve details, while the self-learning interaction module strengthens the model's ability to model semantic relationships between features, thereby achieving higher-precision target detection.

[0044] In step 1, underwater target features are extracted from the input underwater image; multi-scale feature extraction of the acquired underwater target image can be achieved through a constructed feature extraction module.

[0045] Furthermore, the feature extraction module includes multiple convolutional layers connected sequentially, adopting a top-down pyramid-shaped hierarchical structure. The last convolutional layer is connected to a spatial pyramid pooling layer to enhance feature representation and local perception capabilities.

[0046] A specific implementation of a feature extraction module, comprising sequentially connected depthwise separable convolutions and four ordinary convolutions;

[0047] Depthwise separable convolution is used for preliminary feature extraction and downsampling of images. The parameters are set as follows: stride 2, kernel 3×3, number of channels 32.

[0048] Second convolution: stride 2, kernel 3×3, number of channels 64;

[0049] Third convolutional layer: stride 2, kernel 3×3, number of channels 128;

[0050] Fourth convolutional layer: stride 2, kernel 3×3, number of channels 256;

[0051] Fifth convolutional layer ×4: stride 2, kernel 3×3, number of channels 512;

[0052] Underwater targets, such as starfish, are small and densely packed, and underwater images have low resolution. Therefore, the feature extraction module is designed as a top-down structure with multiple convolutional layers stacked together to improve the perception of local information and enhance feature representation.

[0053] Step 2 is achieved by constructing a cross-spatial feature calibration module, where different levels of convolutional layers output images at different scales, such as... Figure 2 As shown, in this embodiment, a cross-spatial feature calibration module is connected to the output of the last three convolutional layers to execute step 2 to realize the cross-spatial feature calibration process.

[0054] After the image features of the convolutional layer undergo multiple cross-spatial feature calibration processes, the receptive field gradually increases, while the resolution gradually decreases. The features output by the cross-spatial feature calibration module constitute the output features, which can be represented as:

[0055] ;

[0056] ;

[0057] (1)

[0058] In the formula, , , The output feature represents the cross-spatial feature calibration module; I represents the input underwater target image. , , These represent the three cross-spatial feature calibration modules from top to bottom; , , This represents three 3×3 convolutional layers from top to bottom, with output channels of 128, 256, and 512 respectively.

[0059] In some embodiments, the structure of the cross-spatial feature calibration module is as follows: Figure 3 As shown, there are three parallel convolution branches:

[0060] The first sub-network branch is used to enhance horizontal attention. It consists of a first average pooling layer, a concatenated convolutional layer, and a first sigmoid activation layer connected in sequence. The first step involves average pooling to obtain feature T. 21 The convolution operation yields feature T. 22 And the activation operation yields the first spatial weighted graph T. 23 ;

[0061] The second sub-network branch is used to enhance vertical attention. It consists of a second average pooling layer, a concatenated convolutional layer, and a second sigmoid activation layer connected in sequence. The steps performed are: average pooling to obtain feature T. 31 The convolution operation yields feature T. 32 And the activation operation yields the second-space weighted graph T. 33 ;

[0062] The third sub-network branch is used to implement spatial deformable convolutional attention enhancement, which includes a deformable convolutional module, a reshape module, and a Softmax activation module connected in sequence.

[0063] Cross-spatial calibration unit: used to achieve cross-fusion of features. The first cross branch includes a batch-zero normalization layer, an average pooling layer, a first softmax activation layer, and a first Matmul function layer; the second cross branch includes an average pooling layer, a second softmax activation layer, and a second Matmul function layer connected in sequence; the outputs of the first Matmul function layer and the second Matmul function layer are processed by a third Sigmoid function activation layer to obtain the output features.

[0064] Furthermore, the cross-spatial feature calibration module is configured to implement the cross-spatial feature calibration process, including the following steps:

[0065] Step 21: Divide the high-level features of the input into multiple sub-features based on the channel dimension;

[0066] For the high-level feature map output by a convolutional layer , X is separated into G sub-features in the channel dimension, where G << C, and different semantic information is extracted from each subset, expressed as:

[0067] (2);

[0068] Specifically, in this embodiment, G = 5;

[0069] Step 22: Input the grouped sub-features into each parallel sub-network branch of the cross-space feature calibration module, and perform horizontal direction attention, vertical direction attention, and spatial perception feature enhancement respectively to obtain a spatial weighted map to enhance each grouped sub-feature, and obtain the channel perception feature T 25 And the spatial perception feature T 44 ;

[0070] To collect more multi-scale spatial information, this module uses three parallel sub-networks to extract the calibration weights of the grouped feature maps. Two of the parallel paths use 1×1 convolutional branches, and the third parallel path uses a 3×3 convolutional branch. The feature representation of each parallel network is:

[0071] (3);

[0072] In the formula, represents the feature descriptor of the residual network branch, and represent the feature descriptors of two 1×1 branches, represents the feature descriptor of the 3×3 branch.

[0073] Step 221: Generation of horizontal direction attention: Perform average pooling on the grouped sub-feature X2 in the height dimension (H) to obtain the feature T 21 ; After concatenation, perform a convolutional operation to obtain the feature T 22 , such as applying a 1×1 convolution; Normalize through the Sigmoid function to generate a weight, and obtain the horizontal direction spatial attention map T 23 , that is, the first spatial weighted map;

[0074] Step 222: Generation of vertical direction attention: Perform average pooling on the grouped sub-feature X3 in the width dimension (W) to obtain the feature T 31 ; After concatenation, perform a convolutional operation to obtain the feature T 32 , such as applying a 1×1 convolution; Normalize through the Sigmoid function to generate a weight, and obtain the vertical direction spatial attention map T 33 , that is, the second spatial weighted map;

[0075] Step 223: For the residual network branch features T in the grouped sub-features 11 Based on the horizontal spatial attention map T 23 Spatial attention diagram T in the vertical direction 33 Attention weighting is applied to obtain the channel attention features T. 24 ;

[0076] In step 2, the spatial weighted graph includes the first spatial weighted graph, the second spatial weighted graph, and the spatial attention graph T mentioned above. 33 ;

[0077] Step 224, Enhancement of Spatial Perception Features:

[0078] Perform a deformable convolution operation, such as a 3×3 deformable convolution, on the grouped sub-features X4 to obtain the spatially adaptive features T. 41 ;

[0079] For feature T 41 Perform deformation (reshape) and activation (Softmax) operations along the horizontal direction (H-dimensional) and vertical direction (W-dimensional) to obtain response weighted maps T42 and features T43 in the two spatial directions. After dot product, a third spatial weighted map is obtained.

[0080] Based on the third space weighted graph, spatial adaptive feature T 41 Enhancement, obtaining spatial perception features T 44 ;

[0081] The above process employs deformable convolution to capture spatial variations and irregularities from grouped input features, thereby enhancing feature representations in complex scenes. It then combines this with the Softmax function to compute global information and perform feature reweighting and calibration. The implementation method is as follows:

[0082] (4)

[0083] (5)

[0084] (6)

[0085] In the formula, Indicates a deformable convolution operation; Represents the Softmax function; Conv This indicates a normal convolution operation.

[0086] Step 23: Transfer the channel sensing feature T 25 Spatial perception feature T 44 Cross-spatial fusion is performed to obtain cross-spatial fused features. Specifically, this includes the following steps:

[0087] Step 231: Transfer the channel attention features T 24 After batch normalization, the channel sensing feature T is obtained. 25 Used to stabilize subsequent spatial interaction calculations.

[0088] Step 232: Sensing channel features T 25 Spatial average pooling is performed to obtain feature T. 26 Applying the Softmax function activation yields the normalized first spatial response weight map T. 27 ;

[0089] Step 233: Spatial perception feature T 44 Spatial average pooling is performed to obtain feature T. 45 Applying the Softmax function activation yields the normalized second-space response weight map T. 46 ;

[0090] Step 234: Perform feature cross matrix calculation (Matmul) and convert the first spatial response weight map T... 27 Spatial perception features T 44 Perform a matrix multiplication (Matmul) operation to obtain the first cross-attention feature T. 28 ; the second spatial response weight map T 46 Channel-aware features T 25 Perform a matrix multiplication (Matmul) operation to obtain the second cross-attention feature T. 47 ;

[0091] This process essentially involves context enhancement between channel attention and spatial perception, using a matrix mapping mechanism to model semantic interaction relationships from different spatial perspectives.

[0092] Step 235, Fusion and Activation: The first cross-attention feature T... 28 With the second cross-attention feature T 47 The summation and fusion yields the fusion feature T. 29 Then, a Sigmoid activation function is applied, and the feature is multiplied point-to-point with the grouped sub-feature X1 to output the final cross-spatial fusion feature. .

[0093] In the above process, the feature information of the 1×1 branch and the 3×3 branch are interactively processed to achieve cross-spatial feature calibration. The specific execution details are shown in formulas (7) and (8):

[0094] (7);

[0095] (8)

[0096] In the formula, Reshape Represents matrix shape transformation operations, Mat This indicates a matrix multiplication operation. Represents the features after cross-space calibration, where This represents three scales. The cross-spatial feature calibration module uses the input features of the residual path to perform a dot-multiplication weighted operation to obtain the cross-spatial calibrated features. The cross-spatial calibrated features maintain the same dimension as the input features but have reweighted global information.

[0097] The cross-spatial feature calibration process performed by the aforementioned cross-spatial feature calibration module simultaneously encodes important regions in both the channel dimension and the spatial dimension; it achieves unified enhancement of salient regions; and it preserves the semantic consistency between local structure and global perception.

[0098] In the above embodiments of this example, in order to improve the feature enhancement capability of the feature extraction module, a cross-spatial feature calibration module is designed. By introducing deformable convolution and average pooling, the receptive field is adaptively adjusted, detailed information in the image is captured, and important feature regions in the image are given special attention.

[0099] Step 3 involves self-learning feature interaction operations, which can be implemented through a constructed self-learning feature interaction layer, such as... Figure 4 As shown, the self-learning feature interaction layer includes multiple parallel interaction branches. Each interaction branch includes an input layer, a self-learning feature interaction module, a cascaded operation module, a convolutional layer, and an output layer.

[0100] The self-learning feature interaction layer can align features between adjacent layers, then use residual connections to enhance features at the same level, and finally use the self-learning feature interaction module to selectively interact and fuse features at different levels.

[0101] The self-learning feature interaction module uses features , , For the input, the specific execution details are shown in formulas (9) to (11):

[0102] (9)

[0103] (10)

[0104] (11)

[0105] In the formula, 、 、 This represents the output features of the self-learning feature interaction layer; This indicates a downsampling operation. Indicates an upsampling operation;

[0106] This represents three self-learning feature interaction operations, used to achieve direct interaction and information sharing between features of non-adjacent layers. Specifically, the self-learning feature interaction operations are as follows: sampling the cross-spatial fusion feature data of adjacent layers, and weighting it with the cross-spatial fusion features of the current layer through a learnable interaction weight map, as shown in formulas (12) to (14):

[0107] (12);

[0108] (13);

[0109] (14);

[0110] In the formula, , , This represents the fusion of features that represent self-learning feature interaction operations. The interactive weight graph represents a learnable interaction weight graph. The adaptive learning feature interaction operation assigns different spatial weights to features at different levels by learning the interactive weight graph. Therefore, it can selectively perform interactive fusion of features at different scales to solve the problem of multi-scale feature conflicts and inconsistencies.

[0111] In step 4, classification prediction is performed by constructing a classifier, such as... Figure 5 As shown, the classifier includes three branches, which respectively process the fused features after the interaction of self-learned features in each layer, and perform multi-layer convolution operations to obtain the classification result.

[0112] Specifically, the input features are , , These features are used to predict small, medium, and large targets, respectively. First, three 1×1 convolutional layers are used to convert the input features at the three scales into 128 channels, resulting in features F1, F2, and F3. The recognition result includes three information items: category information, target location, and target confidence.

[0113] For object category prediction, two convolutional layers are used for feature transformation, and their output is a 2-channel tensor, with each channel representing the category probability of the object in the corresponding anchor box.

[0114] For location prediction, the output is a 4-channel tensor of bounding box location information, representing the coordinates, height, and width of the center point of each anchor box.

[0115] For confidence prediction, the output is a one-channel feature tensor, where each element represents the confidence of whether each anchor box contains an object within the corresponding grid cell.

[0116] A further technical solution involves constructing a loss function to update network weights during network training. The loss function proposed in this embodiment includes three loss values: category loss. Location loss and confidence loss The loss function is defined as:

[0117] (15)

[0118] In the formula, , and The weights used to balance the three loss terms can be set to 0.5, 0.05, and 1, respectively.

[0119] Furthermore, the category loss function Cross-entropy is used to quantify the error between the predicted and true values ​​by comparing the single-pass encoding of the network output with that of the true label. Its expression is:

[0120] (16)

[0121] In the formula, N represents the number of positive samples, and C represents the number of categories. Represents the true label of the i-th predicted bounding box. This represents the probability that the i-th predicted bounding box belongs to category j, i.e. Figure 1 The overall model outputs the prediction results.

[0122] In a multi-class classification scenario with C categories, the goal of the cross-entropy loss function is to minimize the error between the predicted probability distribution and the true label. The single encoding indicates that the true label of the i-th predicted box is category j. It is the probability distribution generated by the model, representing the probability that the i-th prediction box belongs to each category.

[0123] Furthermore, locate the loss function. The CIOU loss function is used, which includes the positional matching degree between the predicted bounding box and the actual bounding box, as well as the size and shape consistency of the predicted bounding box, and is defined as follows:

[0124] (17)

[0125] (18)

[0126] (19)

[0127] In the formula, The Euclidean distance between the center of the predicted bounding box and the ground truth bounding box; c represents the diagonal length of the two frames; IoU represents the intersection-over-union ratio of the predicted bounding box and the ground truth bounding box. This is a balancing coefficient used to reduce the impact of the bounding box coordinate loss term in the CIOU loss. This coefficient allows the CIOU loss function to better balance the importance of the IoU value and the bounding box coordinate loss term.

[0128] Furthermore, the confidence loss function Cross-entropy is used as the metric. In object detection, confidence represents the probability that the predicted frame contains the object. Therefore, when the predicted frame contains the object, the confidence value should be close to 1; otherwise, it should be close to 0. The confidence loss function can be expressed as follows:

[0129] (20)

[0130] In the formula, N represents the number of samples. Let represent the prediction confidence level of the i-th sample. This indicates the true confidence level, with 0 indicating no target and 1 indicating a target.

[0131] To illustrate the effectiveness of the method described in this embodiment, a simulation experiment was conducted using publicly available training data from an underwater robot. The network weights were updated using a mini-batch gradient descent algorithm, with four samples input each time, for a total of 200,000 iterations. During training, the optimizer's weight decay coefficient was set to 0.005, the initial learning rate was set to 0.01, and a cosine annealing strategy was employed. The input image resolution was 640×640.

[0132] Test results are as follows Figure 6 and Figure 7 As shown. Figure 6 The results show that, on the publicly available test set of the 2020 National Underwater Robotics Competition, the proposed method achieved a detection accuracy of 90.7% for starfish. For example... Figure 7 As shown in (a), the proposed method has good detection performance for starfish in low-quality underwater images. Figure 7 As shown in Figure (b), the proposed method performs well in detecting fuzzy starfish targets. Figure 7 As shown in (c), the proposed method can accurately detect dense starfish targets. Figure 7 As shown in Figure (d), the proposed method can accurately detect starfish targets with colors similar to those in underwater images.

[0133] Example 2

[0134] Based on Embodiment 1, this embodiment provides an underwater target detection system based on cross-space calibration and self-learning interaction, including:

[0135] The feature extraction module is configured to perform multi-scale feature extraction on the acquired underwater target images;

[0136] The cross-spatial feature calibration module is configured to perform cross-spatial feature calibration on multiple high-level features in the extracted multi-scale features. For each high-level feature, convolutional branches with different receptive fields are used to extract features, and the outputs of each convolutional branch are fused through a spatial weighted graph to obtain the cross-spatial fused features.

[0137] The self-learning feature interaction layer is configured to perform selective self-learning feature interaction operations on the cross-space fused features obtained by each high-level feature fusion after alignment, establish non-local dependencies between features, and then use residual connections to strengthen the features at the same level. The fused features after the convolution operation are obtained.

[0138] The classifier is configured to perform classification prediction based on the fused features after self-learning feature interactions, and obtain the recognition result.

[0139] It should be noted that each module in this embodiment corresponds one-to-one with each step in embodiment 1, and their specific implementation process is the same, so it will not be repeated here.

[0140] Example 3

[0141] Based on Embodiment 1, this embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory. The processor executes the computer program to implement the steps of the underwater target detection method based on cross-space calibration and self-learning interaction described in Embodiment 1.

[0142] Example 4

[0143] Based on Embodiment 1, this embodiment provides a computer-readable storage medium storing a computer program / instruction thereon, which, when executed by a processor, implements the steps of the underwater target detection method based on cross-space calibration and self-learning interaction described in Embodiment 1.

[0144] Example 5

[0145] Based on Embodiment 1, this embodiment provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the underwater target detection method based on cross-space calibration and self-learning interaction described in Embodiment 1.

[0146] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0147] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. An underwater target detection method based on cross-space calibration and self-learning interaction, characterized in that, Includes the following steps: Multi-scale feature extraction is performed on the acquired underwater target images; Multiple high-level features extracted from the multi-scale features are calibrated across space. For each high-level feature, convolutional branches with different receptive fields are used to extract features. The outputs of each convolutional branch are fused using a spatial weighted graph to obtain the cross-space fused features. For each high-level feature fusion, the cross-space fused features are aligned and then selectively self-learned feature interaction is performed to establish non-local dependencies between features. Residual connections are then used to strengthen the features at the same level. After convolution, the fused features after self-learned feature interaction are obtained. The self-learning feature interaction operation is as follows: sample the cross-space fusion feature data of adjacent layers, and weight it with the cross-space fusion feature of this layer through a learnable interaction weight map; Classification prediction is performed based on the fused features after self-learning feature interaction to obtain the recognition result; The cross-spatial feature calibration process includes the following steps: For the high-level features of the input, they are divided into multiple sub-features based on the channel dimension; The grouped sub-features are enhanced with horizontal attention, vertical attention, and spatial awareness features respectively to obtain a spatially weighted map. This enhancement is then applied to each grouped sub-feature to obtain the channel awareness feature T. 25 Spatial perception feature T 44 ; Channel sensing feature T 25 Spatial perception feature T 44 Cross-spatial fusion is performed to obtain the features after cross-spatial fusion.

2. The underwater target detection method based on cross-space calibration and self-learning interaction as described in claim 1, characterized in that: Multi-scale feature extraction is performed on the acquired underwater target images. The feature extraction module is constructed and includes multiple convolutional layers connected in sequence. It adopts a top-down pyramid hierarchical structure, and the last convolutional layer is connected to a spatial pyramid pooling layer.

3. The underwater target detection method based on cross-space calibration and self-learning interaction as described in claim 1, characterized in that: The grouped sub-features are input into the parallel sub-network branches of the cross-spatial feature calibration module, and horizontal attention, vertical attention, and spatial awareness feature enhancement are performed respectively to obtain a spatial weighted map to enhance each grouped sub-feature, resulting in the channel awareness feature T. 25 Spatial perception feature T 44 It includes the following steps: Perform average pooling on the grouped sub-features X2 in the height dimension to obtain feature T. 21 The convolution operation after concatenation yields feature T. 22 Weights are generated by normalization using the Sigmoid function, resulting in the horizontal spatial attention map T. 23 That is, the first-space weighted graph; Perform average pooling on the width dimension of the grouped sub-feature X3 to obtain feature T. 31 The convolution operation after concatenation yields feature T. 32 Weights are generated by normalization using the Sigmoid function, resulting in the vertical spatial attention graph T. 33 That is, the second-space weighted graph; For the residual network branch feature T in the grouped sub-features 11 Based on the horizontal spatial attention map T 23 Spatial attention diagram T in the vertical direction 33 Attention weighting is applied to obtain the channel attention features T. 24 ; Perform deformable convolution on the grouped sub-features X4 to obtain the spatial adaptive features T. 41 ; For feature T 41 Perform deformation and activation operations along the horizontal and vertical directions to obtain a response weighted map T in two spatial directions. 42 and feature T 43 The dot product yields a third-space weighted graph; based on the third-space weighted graph, the spatial adaptive feature T is applied. 41 Enhancement, obtaining spatial perception features T 44 .

4. The underwater target detection method based on cross-space calibration and self-learning interaction as described in claim 1, characterized in that: Channel sensing feature T 25 Spatial perception feature T 44 Cross-spatial fusion is performed to obtain cross-spatial fused features, including the following steps: Channel attention feature T 24 After batch normalization, the channel sensing feature T is obtained. 25 ; Channel-aware features T 25 Spatial average pooling is performed, and a softmax activation function is applied to obtain the normalized first spatial response weight map T. 27 ; Spatial perception features T 44 Spatial average pooling is performed, and a softmax activation function is applied to obtain a normalized second spatial response weight map T. 46 ; Perform feature cross matrix calculation, and weight the first spatial response map T. 27 Spatial perception features T 44 Perform matrix multiplication to obtain the first cross-attention feature T. 28 The second spatial response weight map T 46 For the normalized feature T 25 Perform matrix multiplication to obtain the second cross-attention feature T. 47 ; The first cross-attention feature T 28 With the second cross-attention feature T 47 The features are summed and fused, a sigmoid activation function is applied, and then multiplied point-to-point with the grouped sub-features X1 to output the final cross-spatial fused feature R. k .

5. An underwater target detection system based on cross-space calibration and self-learning interaction, characterized in that, include: The feature extraction module is configured to perform multi-scale feature extraction on the acquired underwater target images; The cross-spatial feature calibration module is configured to perform cross-spatial feature calibration on multiple high-level features in the extracted multi-scale features. For each high-level feature, convolutional branches with different receptive fields are used to extract features, and the outputs of each convolutional branch are fused through a spatial weighted graph to obtain the cross-spatial fused features. The self-learning feature interaction layer is configured to perform selective self-learning feature interaction operations on the cross-space fused features obtained by each high-level feature fusion after alignment, establish non-local dependencies between features, and then use residual connections to strengthen the features at the same level. The fused features after the convolution operation are obtained. The self-learning feature interaction operation is as follows: sample the cross-space fusion feature data of adjacent layers, and weight it with the cross-space fusion feature of this layer through a learnable interaction weight map; The classifier is configured to perform classification prediction based on the fused features after self-learning feature interactions, and obtain the recognition result; The cross-spatial feature calibration process includes the following steps: For the high-level features of the input, they are divided into multiple sub-features based on the channel dimension; The grouped sub-features are enhanced with horizontal attention, vertical attention, and spatial awareness features respectively to obtain a spatially weighted map. This enhancement is then applied to each grouped sub-feature to obtain the channel awareness feature T. 25 Spatial perception feature T 44 ; Channel sensing feature T 25 Spatial perception feature T 44 Cross-spatial fusion is performed to obtain the features after cross-spatial fusion.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the underwater target detection method based on cross-space calibration and self-learning interaction as described in any one of claims 1-5.

7. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When executed by a processor, the computer program / instruction implements the steps of the underwater target detection method based on cross-space calibration and self-learning interaction as described in any one of claims 1-5.

8. A computer program product comprising a computer program / instructions, characterized in that, When executed by a processor, the computer program / instruction implements the steps of the underwater target detection method based on cross-space calibration and self-learning interaction as described in any one of claims 1-5.