A cross-domain underwater target detection method focusing on invariant information

By using domain-invariant frequency attention and multi-scale image-level feature alignment modules in underwater target detection, the problem of large domain gaps in underwater environments is solved and higher cross-domain detection accuracy and robustness are achieved, especially Under changing background color and lighting conditions.

CN118262227BActive Publication Date: 2024-10-25JIANGSU OCEAN UNIV +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410422044.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-09
Publication Date
2024-10-25
Estimated Expiration
2044-04-09

AI Technical Summary

Technical Problem

Existing underwater target detection methods are difficult to effectively narrow the domain gap between the source domain and the target domain, especially when the background color and illumination change in the underwater environment, resulting in limitations in the accuracy and robustness of cross-domain target detection.

Method used

The domain-invariant frequency attention (FIA) module and the multi-scale image-level feature alignment (MIFA) module are used to extract frequency features through discrete cosine transform and spatial attention, combined with an adversarial domain classifier and consistency regularization loss to reduce the domain differences and extract invariant information for cross-domain underwater target detection.

Benefits of technology

The generalization ability and accuracy of underwater target detection are significantly improved. Especially in scenes with background color distortion and illumination changes, the performance is better than existing methods and can effectively identify the similarity of cross-domain targets.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118262227B_ABST
    Figure CN118262227B_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of underwater target detection, and discloses a cross-domain underwater target detection method focusing on invariant information. A domain-invariant frequency attention module is constructed to utilize an attention mechanism in a frequency domain space to enhance invariant factors in underwater environmental changes and filter out changing factors. A multi-scale image-level feature alignment module is constructed to enhance the feature extraction capability of the model. The invariant information in a constantly changing underwater environment is focused on through the collaboration of target detection loss, adaptation loss, and multi-scale alignment loss to improve the generalization capability of the model. The FIOD-VUE model of the invention includes an FIA module, which autonomously distinguishes DIF and DVF in the frequency domain, thereby solving the long-standing weak generalization problem in traditional underwater object detection methods. The method also introduces a MIFA module, which solves the problem of background color distortion from an image level perspective.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of underwater target detection, and in particular to a cross-domain underwater target detection method focusing on invariant information. Background Art

[0002] Existing domain adaptive object detection (DAOD) methods mainly focus on two aspects: training robust feature extractors, such as adversarial feature learning, Mean-Teacher training, and applying methods involving data augmentation, such as image-to-image transformation and domain randomization.

[0003] Regardless of the method used, the domain gap between the source and target domains contains not only changes in background but also changes in object styles. Limited attention has been paid to the domain gap caused by background color distortion in changing underwater environments. In addition, the lighting conditions or water quality changes in underwater environments, but the size of the objects themselves remains unchanged. In other words, objects across domains show great similarities. Therefore, how to narrow the domain gap and identify the similarities of cross-domain objects, especially the invariant information across domains, becomes crucial in the underwater object detection task.

[0004] Deep neural networks (DNNs) exhibit unique preferences for various frequency information during learning, where DNNs optimized by stochastic gradient-based techniques tend to place more emphasis on low-frequency components inherent in the training data. At the same time, the potential of high-frequency components can be used to balance robustness (on unseen domains) and accuracy (on seen domains). This discrimination highlights the fact that different frequency components exhibit different degrees of transferability in different domains, providing a cross-domain underwater target detection method that focuses on invariant information. Summary of the invention

[0005] The purpose of the present invention is to provide a cross-domain underwater target detection method focusing on invariant information in view of the defects of the prior art, so as to solve the problems raised by the above-mentioned background technology.

[0006] To achieve the above object, the present invention provides the following technical solution: a cross-domain underwater target detection method focusing on invariant information, the specific steps are as follows:

[0007] S1: The input image is enhanced by the domain-invariant frequency attention (FIA) module;

[0008] S2: Use ResNet101 as the feature extraction network to extract two feature maps from the input image and the enhanced image. The merged feature map is input into the feature pyramid FPN for multi-scale fusion from deep to shallow layers. The fused feature map is then input into the proposal network RPN to obtain the candidate object region.

[0009] S3: In the detection stage, Cascade RCNN uses cascade detectors. Each detector contains ROIAlign, fully connected layer, classification score and boundary regression. ROI area is mapped to the candidate box of the same size through ROIAlign. After passing through the fully connected layer, the classification score and boundary regression of the area are output. During the detection process, the candidate target area is resampled through the boundary regression output by the previous detector, and the IOU threshold is gradually increased to obtain a new classification score and boundary regression.

[0010] S4: The multi-scale image-level feature alignment (MIFA) module is implemented on each feature map in FPN, and the domain adversarial training is implemented through the GRL layer in each adversarial domain classifier submodule, which automatically flips the gradient during the propagation process to enable the backbone network to obtain domain confusion features with reduced domain differences;

[0011] S5: Construct the total target loss function and train the network to obtain the final target detection result.

[0012] As a preferred technical solution of the present invention, the domain-invariant frequency attention (FIA) module in step S1 is constructed as follows:

[0013] S11: Apply discrete cosine transform to transfer the image signal from RGB space to frequency space. Given the image signal X(x s ,y s ), the image height is H s , width W s ; For each image Applying independent discrete cosine transform (DCT) to each channel yields Regardless of whether the image signal X comes from the source domain or the target domain, t represents the position of the image in this batch;

[0014] S12: Use spatial attention to extract frequency feature masks and guide the model to adaptively distinguish domain invariant frequency (DIF) and domain variable frequency (DVF);

[0015] The frequency attention mechanism used to learn domain-invariant information is described as follows:

[0016]

[0017] in represents element-wise multiplication, M(·) is the spatial mask learned by the spatial attention module with a resolution of H S ×W S ×3, which means as follows:

[0018]

[0019] Where AvgPool and MaxPool represent the average pooling and maximum pooling features over the entire channel, […] represents the aggregation operation, Conv represents the convolution with a filter size of […], and σ represents the sigmoid function;

[0020] S13: The frequency-space feature modulation is restored to the original spatial domain by inverse discrete cosine transform (iDCT) to obtain X enh , the transformation can be expressed as:

[0021]

[0022] As a preferred technical solution of the present invention, the multi-scale image-level feature alignment (MIFA) module of step S4 is composed of adversarial domain classifier submodules in different convolutional blocks, and its construction method is as follows:

[0023] S41: Define domain classification loss and construct domain classifier. The domain classifier of the lth block is represented as D l , used to predict The domain label of the domain, the adversarial loss of domain classification is written as:

[0024]

[0025] where H represents the hypothesis space of the domain classifier, W is the feature extractor network, represents the domain classification loss of the l-th domain classifier;

[0026] S42: Further apply consistency regularization loss L consistency , which is defined as follows:

[0027]

[0028] in and Indicates the feature map (x F ,y F ) is the output of the domain classifier of the m1-th and m2-th convolutional blocks at positions, ||·|| represents the L2 distance, |I| represents the total number of activations in the feature map, is the sum of all unordered convolutional block pairs.

[0029] As a preferred technical solution of the present invention, the method for constructing the loss function in step S5 is:

[0030] The overall objective of the loss function is the sum of the detection loss and the domain classification loss:

[0031] L=L det +λ1L D +λ2L consistency (6)

[0032] λ1,λ2 are the weight factors of domain classification loss and multi-scale alignment loss, and the detection loss is expressed as L det , which includes the loss of the region proposal network and the final classification and localization errors; L D is the sum of domain classification losses, L consistency It corresponds to the consistency regularization term defined in equation (5).

[0033] Compared with the existing technologies, the beneficial effects of the present invention are: the FIOD-VUE model of the present invention includes an FIA module, which autonomously distinguishes DIF and DVF in the frequency domain, which solves the long-standing weak generalization problem in traditional underwater object detection methods; in addition, the present method also introduces a MIFA module, which solves the problem of background color distortion from an image level perspective; experimental results show that the performance of FIOD-VUE is better than all existing underwater object detection models, and it shows effectiveness even in challenging weather conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 It is a structural diagram of the cross-domain underwater target detection method focusing on invariant information of the present invention;

[0035] Figure 2 is a flow chart of the method of the present invention;

[0036] Figure 3 is the invariant frequency attention (FIA) structure of the present invention;

[0037] Figure 4 It is the multi-scale image-level feature alignment (MIFA) structure of the present invention;

[0038] Figure 5 It is a partial image of the HD-Deepfish dataset of the present invention;

[0039] Figure 6 These are some images of the S-URPC2019 dataset of the present invention;

[0040] Figure 7 It is the t-SNE visualization result diagram of different methods of the present invention;

[0041] Figure 8 It is a three-dimensional surface diagram of the two balance coefficients λ1, λ2 and mAP of the present invention. DETAILED DESCRIPTION

[0042] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings so that the advantages and features of the present invention can be more easily understood by those skilled in the art, thereby making a clearer and more definite definition of the protection scope of the present invention.

[0043] Example: According to Figure 1, a cross-domain underwater target detection method focusing on invariant information, the specific steps are as follows:

[0044] S1: The input image is enhanced by the domain-invariant frequency attention (FIA) module;

[0045] S2: Use ResNet101 as the feature extraction network to extract two feature maps from the input image and the enhanced image. The merged feature map is input into the feature pyramid FPN for multi-scale fusion from deep to shallow layers. The fused feature map is then input into the proposal network RPN to obtain the candidate object region.

[0046] S3: In the detection stage, Cascade RCNN uses cascade detectors. Each detector contains ROIAlign, fully connected layer, classification score and boundary regression. ROI area is mapped to the candidate box of the same size through ROIAlign. After passing through the fully connected layer, the classification score and boundary regression of the area are output. During the detection process, the candidate target area is resampled through the boundary regression output by the previous detector, and the IOU threshold is gradually increased to obtain a new classification score and boundary regression.

[0047] S4: The multi-scale image-level feature alignment (MIFA) module is implemented on each feature map in FPN, and the domain adversarial training is implemented through the GRL layer in each adversarial domain classifier submodule, which automatically flips the gradient during the propagation process to enable the backbone network to obtain domain confusion features with reduced domain differences;

[0048] S5: Construct the total target loss function and train the network to obtain the final target detection result.

[0049] The method proposed in this invention can be applied to any second-order target detection network, taking Cascade R-CNN as an example; the method flow is as follows Figure 2 As shown:

[0050] First, the input image is enhanced by the domain-invariant frequency attention (FIA) module. Then, ResNet101 is used as a feature extraction network to extract two feature maps from the input image and the enhanced image. The merged feature map is input into the feature pyramid FPN for multi-scale fusion from deep to shallow layers. The fused feature map is then input into the proposal network RPN to obtain the candidate object region. In the detection stage, the cascade RCNN uses cascade detectors, each of which contains ROIAlign, fully connected layers, classification scores, and boundary regression. The ROI region is mapped to a candidate box of the same size through ROIAlign, and the classification score and boundary regression of the region are output after passing through the fully connected layer. During the detection process, the candidate object region is resampled through the boundary regression output by the previous detector, and the IOU threshold is gradually increased to obtain a new classification score and boundary regression. The multi-scale image-level feature alignment (MIFA) module is implemented on each feature map in FPN, and domain adversarial training is implemented through the GRL layer in each adversarial domain classifier submodule. This layer automatically flips the gradient during the propagation process to enable the backbone network to obtain domain confusion features with reduced domain differences.

[0051] This method constructs a domain-invariant frequency attention (FIA) module and a multi-scale image-level feature alignment (MIFA) module, enhances the feature extraction ability of the model through multi-scale image-level domain feature alignment and the minimax game between the domain classifier and the backbone network, and constructs the loss function through target detection loss, adaptation loss and multi-scale alignment loss.

[0052] like Figure 3 As shown in Figure 2, the domain-invariant frequency attention (FIA) module is constructed as follows:

[0053] Step 1: Apply discrete cosine transform to transfer the image signal from RGB space to frequency space. Given an image signal X(x s ,y s ), the image height is H s , width W s For each image Applying independent discrete cosine transform (DCT) to each channel yields Regardless of whether the image signal X comes from the source domain or the target domain, t represents the position of the image in this batch.

[0054] Step 2: Use spatial attention to extract frequency feature masks to guide the model to adaptively distinguish domain invariant frequency (DIF) and domain variable frequency (DVF). The frequency attention mechanism proposed in this method for learning domain invariant information is described as follows:

[0055]

[0056] in represents element-wise multiplication, M(·) is the spatial mask learned by the spatial attention module with a resolution of H S ×W S ×3, which means as follows:

[0057]

[0058] Where AvgPool and MaxPool represent the average pooling and maximum pooling features over the entire channel, […] represents the aggregation operation, Conv represents the convolution with a filter size of […], and σ represents the sigmoid function.

[0059] Step 3: Restore the frequency-space feature modulation to the original spatial domain through inverse discrete cosine transform (iDCT) to obtain X enh , the transformation can be expressed as:

[0060]

[0061] like Figure 4 As shown in Figure 1, the multi-scale image-level feature alignment (MIFA) module consists of adversarial domain classifier sub-modules in different convolutional blocks, and its construction method is as follows:

[0062] Step 1: Define the domain classification loss and construct the domain classifier. The domain classifier of the lth block is represented as D l , used to predict The adversarial loss for domain classification can be written as:

[0063]

[0064] where H represents the hypothesis space of the domain classifier, W is the feature extractor network, represents the domain classification loss of the l-th domain classifier.

[0065] Step 2: Further apply consistency regularization loss L consistency , which is defined as follows:

[0066]

[0067] in and Indicates the feature map (x F ,y F ) is the output of the domain classifier of the m1-th and m2-th convolutional blocks at positions, ||·|| represents the L2 distance, |I| represents the total number of activations in the feature map, is the sum of all unordered convolutional block pairs.

[0068] The overall objective of the loss function is the sum of the detection loss and the domain classification loss:

[0069] L=L det +λ1L D +λ2L consistency (6)

[0070] λ1,λ2 are the weight factors of domain classification loss and multi-scale alignment loss, and the detection loss is expressed as L det , which includes the loss of the region proposal network and the final classification and localization errors, L D is the sum of domain classification losses, L consistency It corresponds to the consistency regularization term defined in equation (5).

[0071] The specific training methods are as follows:

[0072] Two cross-domain underwater target detection datasets, HD-DeepFish and S-UODAC2020, are used to verify the generalization ability of the model underwater. Some images of the HD-DeepFish dataset are shown below. Figure 5 As shown, some images of the S-UODAC2020 dataset are as follows Figure 6 As shown. In addition, the Cityscapes dataset series is used as a supplementary experiment to verify the robustness of the model across other weather domains. The Cityscapes dataset series includes Cityscapes, Foggy Cityscapes, and Rain Cityscapes. Foggy Cityscapes and Rain Cityscapes are derived from the Cityscapes dataset by simulating fog and rain on clear weather images of Cityscapes. Both Cityscapes and Foggy Cityscapes have the same number of categories, including people, riders, cars, trucks, buses, motorcycles, and bicycles.

[0073] Experimental setup:

[0074] Consistent with domain adaptation for object detection, annotated targets of the source domain are used to train the detection module, while targets of the target domain do not have any annotations. However, our approach is different in that the source domain contains not only one class but multiple domains, similar to domain generalization. In all experiments, the input image is first resized to 800 shorter sides before being fed into the network model. We train the model using an SGD optimizer with an initial learning rate of 0.001. A total of 24 epochs were trained, with the learning rate reduced by a factor of 10 for the 22nd and 23rd epochs. The batch size is set to 2, and images are randomly sampled from the source and target domains. The balancing parameters λ1 and λ2 are both set to 0.1. In the experiments, we use PyTorch and the MMDetection framework to train the model. The IoU threshold for mean average precision (mAP) is 0.5.

[0075] Comparison of experimental results:

[0076] Cross-domain underwater target detection experiment:

[0077] The results of S-UODAC2020 are shown in Table 1. Our method achieves the best target detection results, with an mAP of 56.8%, indicating that the model effectively filters out components that hinder cross-domain adaptation and better narrows the distribution gap between the source and target domains. The learned domain-invariant information plays a vital role in cross-domain detection performance. This makes our method superior to underwater target detection methods such as RoIAttn and BoostingR-CNN, which only focus on detecting targets in the target domain that are consistent with the distribution of the training set. Compared with underwater target detection methods for domain generalization (such as DG-YOLO and DMCL), our method performs better, which shows that the FIA ​​method can further adaptively help enhance domain-invariant information and adapt to different underwater conditions.

[0078] Table 1: Performance comparison on the S-UODAC2020 dataset

[0079] Model sea ​​urchin starfish Sea Cucumber scallop AP50 AP75 mAP DG-YOLO 70.3 62.5 44.6 43.5 62.7 56.5 50.4 RoIAttn50 33.2 20.9 20.9 20.2 50.5 18.5 23.8 RoIAttn101 32.0 18.8 19.4 21.2 48.6 18 22.8 BoostingR-CNN50 33.8 21.4 20.8 23.2 51.9 20.4 24.8 BoostingR-CNN101 36.0 20.0 25.6 26.7 53.2 23.8 27.1 DMCL 80.1 35.5 47.7 43.5 65.9 58.4 56.5 Ours 49.4 60.5 54.8 61.6 91.6 91.6 56.8

[0080] The results of HD-Deepfish are provided in Table 2, showing that our method also performs best in scenes with background color deviation. Due to the vulnerability of domain transfer, our method outperforms traditional underwater object detection methods. Compared with underwater generalization methods, our method focuses more on image-level domain generalization, especially background color deviation, considering the light attenuation in underwater images, the influence scattering and optical refraction caused by underwater domain transfer, which is more suitable than instance-level domain generalization methods.

[0081] Table 2: Performance comparison on the HD-Deepfish dataset

[0082]

[0083] Cross-domain object detection experiments:

[0084] The present invention also compares FIOD-VSD with mainstream DA methods. The present invention is trained on Cityscapes and FoggyCityscapes datasets, and tested on FoggyCityscapes dataset. The results are shown in Table 3. It can be seen that the present invention method shows strong generalization ability. In particular, the present invention method surpasses all other methods in the truck category and effectively distinguishes between cars and trucks. This shows the effectiveness of the present invention method not only in underwater scenes but also in natural environments.

[0085] Table 3: Test results of Cityscapes series datasets

[0086]

[0087] t-SNE visualization:

[0088] Use t-SNE projection to visualize the feature distribution of the last layer output of the backbone network. Figure 7 As shown. The present invention randomly selects 300 images from the source domain and 100 images from the target domain, and uses different methods to project the features of the final stage of the backbone network onto a 2D plane. The blue dots represent data from the source domain, while the red dots represent data from the target domain. If the red and blue dots are well fused, it indicates that the model captures more domain-invariant features. Figure 7 The results show that the method of the present invention effectively alleviates the impact of domain transfer.

[0089] Ablation experiment:

[0090] In order to evaluate the effectiveness of each module in the proposed FIOD-VUE, various configuration ablation experiments were performed on the HD-Deepfish dataset. The results are summarized in Table 4. This method studies the contribution of each component by adding each part sequentially and observing the change in mAP performance. The comparison between spatial attention (SA) and FIA reflects the effectiveness of the proposed FIA in capturing invariant features in different environments. The comparison of the single-scale domain classifier (IFA) and the multi-scale domain classifier (MIFA) shows that aggregating features of different scales helps to further improve the generalization ability of the model. By further applying consistency regularization, this method achieves an improvement of +2.5%, and the mAP reaches 37.1%.

[0091] Table 4: FIOD-VUE ablation experiment results

[0092]

[0093] The present invention also tests the domain adversarial loss L D and L consistency The balance coefficients λ1 and λ2 are as follows: Figure 8 As shown, according to the experimental results, the present invention sets λ1=0.1 and λ2=0.1 for all experiments in the FIOD-VUE model.

[0094] The above embodiments only express the implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention.

Claims

1. A cross-domain underwater target detection method focusing on invariant information, characterized by: The specific steps are as follows: S1: The input image is enhanced by the domain-invariant frequency attention module; The domain-invariant frequency attention module is constructed as follows: S11: Apply discrete cosine transform to transfer the image signal from RGB space to frequency space. Given the image signal X(x s ,y s ), the image height is H s , width W s ; For each image Applying independent discrete cosine transform to each channel yields Regardless of whether the image signal X comes from the source domain or the target domain, t represents the position of the image in this batch; S12: Use spatial attention to extract frequency feature masks to guide the model to adaptively distinguish domain-invariant frequencies from domain-variable frequencies; The frequency attention mechanism used to learn domain-invariant information is described as follows: in represents element-wise multiplication, M(·) is the spatial mask learned by the spatial attention module with a resolution of H S ×W S ×3, which means as follows: Where AvgPool and MaxPool represent the average pooling and maximum pooling features over the entire channel, […] represents the aggregation operation, Conv represents the convolution with a filter size of […], and σ represents the sigmoid function; S13: Restore the frequency-space feature modulation to the original space domain by inverse discrete cosine transform to obtain X enh , the transformation can be expressed as: S2: Use ResNet101 as the feature extraction network to extract two feature maps from the input image and the enhanced image. The merged feature map is input into the feature pyramid FPN for multi-scale fusion from deep to shallow layers. The fused feature map is then input into the proposal network RPN to obtain the candidate object region. S3: In the detection stage, Cascade RCNN uses cascade detectors. Each detector contains ROIAlign, fully connected layer, classification score and boundary regression. ROIAlign is used to map the candidate object area to a candidate box of the same size. After passing through the fully connected layer, the classification score and boundary regression of the area are output. During the detection process, the candidate object area is resampled through the boundary regression output by the previous detector, and the IOU threshold is gradually increased to obtain a new classification score and boundary regression. S4: The multi-scale image-level feature alignment module is implemented on each feature map in FPN, and the domain adversarial training is implemented through the GRL layer in each adversarial domain classifier submodule, which automatically flips the gradient during the propagation process to enable the backbone network to obtain domain confusion features with reduced domain differences; The multi-scale image-level feature alignment module consists of adversarial domain classifier sub-modules in different convolutional blocks, and its construction method is as follows: S41: Define domain classification loss and construct domain classifier. The domain classifier of the lth block is represented as D l , used to predict The domain label of the domain, the adversarial loss of domain classification is written as: where H represents the hypothesis space of the domain classifier, W is the feature extractor network, represents the domain classification loss of the l-th domain classifier; S42: Further apply consistency regularization loss L consistency , which is defined as follows: in and Indicates the feature map (x F ,y F ) is the output of the domain classifier of the m1-th and m2-th convolutional blocks at positions, ||·|| represents the L2 distance, |I| represents the total number of activations in the feature map, is the sum of all unordered convolutional block pairs; S5: Construct the total target loss function and train the network to obtain the final target detection result; The loss function is constructed as follows: The overall objective of the loss function is the sum of the detection loss and the domain classification loss: L=L det +λ1L D +λ2L consistency (6) λ1,λ2 are the weight factors of domain classification loss and multi-scale alignment loss, and the detection loss is expressed as L det , which includes the loss of the region proposal network and the final classification and localization errors; L D is the sum of domain classification losses, L consistency It corresponds to the consistency regularization term defined in equation (5).

Citation Information

Patent Citations

  • Low-illumination target detection method based on multi-stage domain self-adaption

    CN113642500A

  • Cross-scene traffic target detection method and system

    CN114973168A

  • Cross-domain target detection method based on multi-level domain adaptive weak supervised learning

    CN116342942A

  • Knowledge distillation method for isomorphic 2D detector in natural scene

    CN117649517A

  • Model and method for multi-source domain adaptation by aligning partial features

    US20220138495A1