Unsupervised underwater target search method based on Gaussian mixture and cross-domain contrast cooperation

By employing a Gaussian mixture model and a cross-domain contrastive collaborative approach, the problem of cross-domain feature distribution shift in unsupervised underwater target search was solved, achieving better cross-domain adaptability and robustness, and improving the recognition capability of underwater target search.

CN121999348APending Publication Date: 2026-05-08DALIAN MARITIME UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
DALIAN MARITIME UNIVERSITY
Filing Date
2025-12-30
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Unsupervised underwater target search technology is limited by the domain gap between the training scene and the real deployment scene when transferring across scenes, which leads to limited model generalization performance and practical value. In particular, the feature distribution shift is obvious under the influence of environmental factors such as lighting and water composition.

Method used

A Gaussian mixture model is used to fit the statistical distribution of the target domain features. The mixed weights of Beta distribution sampling are combined to perform feature style smoothing transfer. The discriminative power of features is enhanced by cross-domain hard sample contrast loss. Cross-domain hard sample contrast loss is used to constrain feature clustering and improve the robustness of identity recognition.

Benefits of technology

It effectively alleviates the problem of decreased matching accuracy caused by domain offset, improves the model's ability to identify underwater targets in the target domain, and enhances cross-domain adaptability and robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121999348A_ABST
    Figure CN121999348A_ABST
Patent Text Reader

Abstract

The invention discloses an unsupervised underwater target search method based on Gaussian mixture and cross-domain contrast cooperation, and relates to the technical field of underwater target search. The method mainly comprises the following steps: capturing distribution conditions of feature statistics of a source domain and a target domain; a Gaussian mixture model is initialized, and initial values close to real data distribution are provided for the mean value, the weight and the covariance of the Gaussian mixture model through clustering; weight and covariance component parameters are calculated, and the most representative target domain statistical mode is screened; the source domain feature statistics and the optimal target domain statistics are combined, and mixing is carried out through the mixing weight of Beta distribution sampling; designing a mask structure, and extracting advanced features of a source domain; and screening the most unique style feature of the target domain in each batch, and constructing cross-domain difficult samples to compare the loss. According to the method, a statistical feature mixer based on a Gaussian mixture model is constructed, and cross-domain difficult samples are designed to compare learning loss, so that the problem of style difference between unsupervised domain adaptive underwater target search domains is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of underwater target search technology, and specifically to an unsupervised underwater target search method based on Gaussian mixture and cross-domain contrastive collaboration. Background Technology

[0002] With the rapid development of marine resource development, underwater security, and environmental monitoring, underwater target search technology has demonstrated key application value in both military and civilian scenarios. However, the complexity of the underwater environment leads to a significant scene-dependent nature in target characteristics, while the annotation of large-scale underwater data faces practical challenges such as high costs, high professional thresholds, and great annotation difficulty.

[0003] Against this backdrop, unsupervised underwater target search technology has become an important direction for overcoming data bottlenecks and promoting the practical application of the technology because it can achieve cross-scene target detection and recognition without relying on target domain labeled data. However, in practical applications, this technology is always limited by the "domain gap" between the training scene and the real deployment scene—the differences in environmental factors such as lighting conditions, water composition, and background noise in different water areas cause significant shifts in feature distribution when the model is transferred across scenes, which seriously restricts the further improvement of its generalization performance and practical value.

[0004] Currently, the core problem that urgently needs to be solved in unsupervised adaptive underwater target search tasks is how to effectively transfer cross-domain knowledge without target domain annotation information. Current mainstream technical solutions are significantly constrained by inter-domain differences, mainly because the source and target domains have systematic inconsistencies in low-level visual features such as illumination and color. This inconsistency causes cross-domain bias in feature representation, which in turn has a significant negative impact on the model's generalization performance. Summary of the Invention

[0005] In view of the shortcomings of existing technologies, this invention provides an unsupervised adaptive underwater target search method based on Gaussian mixture models. This invention fits the statistical distribution of target domain features using a Gaussian mixture model to capture the overall style of the target domain. Combined with mixture weights sampled from a Beta distribution, it interpolates the source domain feature statistics with the target domain statistics, achieving smooth transfer of feature styles and reducing inter-domain differences. Furthermore, by constructing a cross-domain hard sample contrastive loss, it focuses on enhancing the discriminative power of cross-domain features. Contrastive learning constrains feature clustering, improving the robustness of identity recognition. Ultimately, this improves the model's ability to identify underwater targets in the target domain and alleviates the problem of decreased matching accuracy caused by domain shift.

[0006] The technical means employed in this invention are as follows: An unsupervised underwater target search method based on Gaussian mixture and cross-domain contrastive synergy includes the following steps: S1. Construct an underwater target search model, which includes a feature extraction network, an underwater target detection network, and a re-identification network; obtain a source domain dataset, and pre-train the underwater target search model based on the source domain dataset to obtain an underwater target search pre-trained model; the source domain dataset includes underwater images with label information; S2. Based on the region proposal network in the underwater target search pre-trained model, extract image features from the underwater image data in the source domain dataset as source domain features; simultaneously, obtain the target domain dataset, and extract image features from the underwater image data in the target domain dataset as target domain features based on the region proposal network in the underwater target search pre-trained model. The target domain dataset includes underwater images without label information; obtain the statistical distributions of the source domain features and the target domain features respectively, whereby the statistical measures include the feature mean and variance. S3. The statistical measures of the target domain features are clustered using k-means clustering to provide initial values ​​for the mean, weights, and covariance of the Gaussian mixture model that are close to the true distribution of the data, thereby realizing the initialization of the Gaussian mixture model. S4. Based on the weight components and fitted components obtained by fitting the Gaussian mixture model, select the most representative target domain statistics as the optimal target domain statistics. S5. Combine the source domain feature statistics with the target domain optimal statistics, and mix them using the mixing weights of Beta distribution sampling to obtain mixed features; S6. Design a mask structure and multiply the mixed features with the mask element by element to obtain the high-level features of the source domain. S7. Extract target domain features from the memory bank, calculate the domain discrimination entropy of each target domain feature, and select the feature with the smallest domain discrimination entropy based on the calculation results as the most unique style feature of the target domain in each batch. S8. By splicing high-level features from the source domain with the most unique style features from the target domain, a cross-domain difficult sample contrast loss is constructed to improve the cross-domain adaptability of the underwater target search model; underwater target search is performed based on the trained underwater target search model.

[0007] Furthermore, the distribution of the characteristic statistics is obtained based on the following calculations:

[0008]

[0009] in, The characteristic mean, Characteristic variance Let be the pixel value of the feature at spatial location (h, w) in channel c. =1e-8 is used for numerical stability, H is the height of the feature map, and W is the width of the feature map.

[0010] Further, the Gaussian mixture model is initialized according to the following steps: Assign samples, for each sample Assign a cluster label The label corresponds to the cluster center closest to the sample:

[0011] in, To represent a single sample to be assigned, This represents the center of the k-th cluster. For the sample With the kth cluster center The distance between them; Update the centers: For each cluster k, recalculate the centers of that cluster. :

[0012] in, Let be the number of samples in the k-th cluster.

[0013] Furthermore, the optimal statistics for the target domain are obtained by filtering according to the following steps: First, calculate the weight components:

[0014] in, This represents the number of samples contained in the k-th cluster of k-means. Indicates the total number of samples; Secondly, the covariance matrix is ​​calculated. For the k-th cluster, the cluster centers are subtracted from the samples to obtain the centered samples. Then, the covariance of the samples is calculated through matrix multiplication, and a regularization term for the identity matrix is ​​added.

[0015] in, For regularization terms, =10 -6 , The identity matrix is ​​the final covariance matrix. In the diagram, diagonal elements reflect the dispersion of each feature itself, while off-diagonal elements reflect the correlation between two features. Select the component index with the largest weight. :

[0016] The representative mean of the component with the largest weight , for the first The mean of each cluster The representative standard deviation of the component with the largest weight. It is the first The covariance matrix of each cluster The second diagonal element ( ,2,2) Take the square root of the corresponding value and add the numerical stability parameter. Received; Get As the optimal statistic for the target domain.

[0017] Further, the hybrid features are obtained according to the following steps: Obtain source domain feature statistics and the optimal statistics of the target domain Mixed weights Where α1=0.1, α2=2.0, the mixture statistic is defined as:

[0018] Obtain source domain features B represents the batch size, C represents the number of channels, and H×W represents the spatial dimension. The final blended features... satisfy: .

[0019] Furthermore, the mask structure is constructed as follows: The input features are transformed through a sequence network containing Dropout, linear layers, batch normalization, and ReLU activation:

[0020] in: Let B be the input feature and B be the batch size. The MLP(·) consists of two linear layers. Combined with ReLU activation, it realizes nonlinear transformation of features; BN(·) is unbiased batch normalization; Gumbel noise is introduced to enhance sampling randomness, and a hard mask is generated through Top-k selection. Noise conforming to a Gumbel distribution is added to the score of each dimension, as shown in the formula:

[0021] in, It is noise that follows a Gumbel distribution, generated through inverse transform sampling: , , The temperature parameter controls the steepness of the distribution; the smaller the value, the closer the output is to a discrete distribution. Scoring with noise Sort by dimension, select the dimensions corresponding to the top k highest scores, and generate a binary mask. If the i-th dimension of the b-th sample belongs to the Top-k, then... It is 1 if it is not 0 otherwise. This is the final output hard mask. .

[0022] Furthermore, the most unique style features of the target domain are obtained according to the following steps: First, target domain features are selected from the memory. The subset of target domain features is defined as follows:

[0023] in, For a subset of features of the target domain, , Number of source domain categories; Where D is the number of features in the target domain, and D is the feature dimension. Then, the target domain features are analyzed. The information entropy is calculated using the probability distribution output by the domain classifier:

[0024] in For the i-th feature in the feature subset of the target domain, [0] represents the score of the source domain. [1] is the score for the target domain. The parameterized domain classifier function is represented by... Define the mapping from the feature space to the domain decision space; The information entropy is calculated using the following formula to quantify the uncertainty of domain attribution of features:

[0025] in, Features The information entropy, with a value range of [0, log 2], It is a numerically stable term; The optimal feature index is then obtained as follows:

[0026] in, Represents a subset of features in the target domain The feature index with the smallest entropy value; Finally, perform global index mapping:

[0027] in, The optimal feature is represented in the global memory. Index in The most unique style feature of the target domain is: .

[0028] Furthermore, the cross-domain hard sample contrast loss is constructed as follows: Will pass through the mask High-level features of the source domain obtained Features of difficult samples in the target domain The concatenation is mapped to the contrast space through a predictor to obtain cross-domain hard sample features. ; Based on source domain invariance Features of cross-domain difficult samples The hard sample contrast loss constrains the clustering of similar features and the separation of dissimilar features. The formula for calculating the hard sample contrast loss is as follows:

[0029] in, Indicates to and A set of positive samples of the same type Take the expected value. This represents the embedding of a positive sample in the contrast space, where a positive sample belongs to the same class as the i-th sample. The samples, whose embeddings in the contrast space are also taken from... and ; This represents the embedding of all samples in the comparison space except for the i-th sample itself. yes With a certain positive sample Similarity score, after temperature Scaling; higher scores indicate a greater likelihood of belonging to the same class. The denominator for the logarithmic part is... The sum of similarity scores with all other samples represents The total probability of being of the same class as any sample.

[0030] Compared with the prior art, the present invention has the following advantages: This invention designs a Gaussian mixture model that fits the mean and standard deviation distribution of target domain features through multi-component fitting. It initializes and iteratively optimizes using k-means, capturing complex statistical patterns more accurately than a single distribution. By combining Beta distribution sampling with mixed weights and random channel shuffling, it dynamically addresses statistical differences between domains, enhancing feature diversity and cross-domain adaptability. Furthermore, it constructs a cross-domain difficult sample contrast loss, using dynamic masks to extract key features from the source domain and combining this with a memory bank to select target domain samples with clearly defined domain attributes to build contrast pairs. This is trained in conjunction with the main task loss to improve domain-invariant feature learning, effectively mitigating negative transfer and enhancing the model's generalization ability.

[0031] This invention provides a more reliable and efficient training method for an unsupervised adaptive underwater target search framework, which is effective and robust, and promotes the development and application of unsupervised adaptive underwater target search technology. Attached Figure Description

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

[0033] Figure 1 This is a flowchart of an unsupervised underwater target search method based on Gaussian mixture and cross-domain contrast collaboration in an embodiment of the present invention.

[0034] Figure 2 This is an architecture diagram of an unsupervised underwater target search model based on Gaussian mixture and cross-domain contrastive collaboration in an embodiment of the present invention. Detailed Implementation

[0035] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0036] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0037] like Figure 1 As shown, this invention provides an unsupervised adaptive underwater target search method based on a Gaussian mixture model, comprising the following steps: S1. Construct an underwater target search model, obtain a source domain dataset, and pre-train the underwater target search model based on the source domain dataset to obtain a pre-trained underwater target search model. The source domain dataset includes underwater images with label information.

[0038] This step primarily involves pre-training the underwater target search model based on a training dataset with labeled information. For example... Figure 2 As shown, the constructed underwater target search model includes a feature extraction network (i.e., a feature extraction network). Figure 2The system consists of a backbone network, an underwater target detection network, and a re-identification network. During pre-training, a feature extraction network is used to extract image-level features from input real-world scene images containing people. This feature extraction network is built on a residual convolutional network, specifically using the first four of its five convolutional layers to process the input image layer by layer, transforming the original image into image-level features of dimension 1024. It's important to note that the fifth layer of the residual convolutional network is duplicated, one for the subsequent detection task and the other for the re-identification task. The detection head is implemented based on the standard Faster R-CNN architecture, with two main branches: classification and regression. Both branches take a 2048-dimensional instance-level feature map processed by ROI-Align as input. The classification branch focuses on binary classification, accurately distinguishing whether the region corresponding to the input features is "foreground" or "background," providing a basis for target selection. The regression branch is responsible for optimizing the coordinate parameters of the bounding box, continuously adjusting the positional information to improve the accuracy of target localization and ensure a high degree of matching between the detection box and the target region. The re-identification head adopts a NAE architecture design. It first performs global average pooling on the instance-level feature maps, compressing the 2048-dimensional features into 256 dimensions. Then, L2 normalization is used to separate the norm and angle of the features, thereby reducing target conflicts between detection and re-identification tasks. During training, it relies on the true ID labels from the source domain and pseudo-labels generated through dynamic clustering in the target domain to ensure that the model can accurately match different occurrence scenarios of the same target.

[0039] S2. Based on the region proposal network in the underwater target search pre-trained model, extract image features from the underwater image data in the source domain dataset as source domain features; simultaneously, obtain the target domain dataset, and extract image features from the underwater image data in the target domain dataset as target domain features based on the region proposal network in the underwater target search pre-trained model. The target domain dataset includes underwater images without label information; obtain the statistical distributions of the source domain features and the target domain features respectively, and the statistical measures include the feature mean and variance.

[0040] In this embodiment, the specific steps for extracting the distribution of feature statistics include:

[0041]

[0042] in, The value of the feature at channel c and spatial location (h, w) =1e-8 is used for numerical stability.

[0043] S3. Initialize the Gaussian mixture model. Use k-means clustering to provide initial values ​​for the mean, weights, and covariance of the Gaussian mixture model that closely approximate the true distribution of the data, thereby constructing a more reliable mixture distribution model.

[0044] In this embodiment, the specific steps for initializing the Gaussian mixture model include: S301, For each sample Calculate the Euclidean distance between it and the current K cluster centers respectively. The distance formula is the L2 norm of the sample and the center, i.e., the Euclidean distance:

[0045] in, For the i-th sample ( , ), Let j be the j-th cluster center.

[0046] S302. Allocate samples, for each sample... Assign a cluster label The label corresponds to the cluster center closest to the sample, i.e. It is to make distance Minimum k value:

[0047] S303. Update the centers: For each cluster k, recalculate the centers of that cluster. The calculation method is to take the average of all samples assigned to that cluster:

[0048] in, Let be the number of samples in the k-th cluster.

[0049] S304. Determine convergence, and repeat the above steps of calculating distance, allocating samples, and updating centers until the change in all cluster centers is sufficiently small (the L2 norm of the difference between centers in two adjacent iterations is less than a threshold). ,here =10 -6 At this point, the cluster centers are considered to be stable.

[0050] The cluster centers obtained through the above process will serve as the initial values ​​for the mean of each Gaussian component in the GMM. The clustering results will also provide an initial estimate for the weights and covariance of the GMM, thereby preventing the GMM from falling into a local optimum due to unreasonable initial parameters.

[0051] S4. Based on the weighted components and fitted components obtained by fitting the Gaussian mixture model, select the most representative target domain statistics as the optimal target domain statistics to ensure that the "most typical" target domain statistics are used when mixing.

[0052] In this embodiment, the specific steps for selecting the most representative statistical pattern of the target domain include: S401. Calculate the weighted components. The weights represent the "contribution ratio" of each Gaussian component in the overall model. The calculation method is based on the k-means clustering results.

[0053] Specifically, for the k-th component (corresponding to the k-th cluster in k-means), the number of samples contained in that cluster is counted. .

[0054] S402. Calculate the covariance matrix, which describes the "dispersion" and "correlation between features" of the samples within the k-th component:

[0055] For each sample x in the k-th cluster i Calculate its distance from the cluster center μ k The deviation is calculated by performing an outer product operation on all deviation vectors and then taking the average value, N. k The number of samples within the cluster; to avoid the "singularity" problem in the matrix, a very small regularization is added. λ=10 -6 I is the identity matrix. The final result is... In this model, diagonal elements reflect the dispersion of each feature itself, while off-diagonal elements reflect the correlation between two features.

[0056] S403. After obtaining the parameters of all Gaussian components, it is necessary to select the most representative component as the "style template" for subsequent feature mixing. Weight π k The larger the value, the more representative the distribution of that component is of the overall trend of the data. Therefore, the component index with the largest weight is selected using the following formula. .

[0057]

[0058] Wherein, the mean μ of this component k This component covariance matrix is ​​directly used as the representative mean. The second diagonal element ( ,2,2) corresponding The variance of the expression is squared and a minimum value is added. The representative standard deviation is obtained. This is used in subsequent feature blending processes to inject style characteristics of the target domain into the source domain features.

[0059] S5. Combining source domain feature statistics with optimal target domain statistics, and mixing them using mixed weights sampled by Beta distribution, enhances the diversity and adaptability of source domain features.

[0060] In this embodiment, the specific steps for mixing features include: Source domain feature statistics are The optimal statistic for the target domain is Mixed weights Where α1=0.1, α2=2.0, the mixture statistic is defined as:

[0061] Where β∈(0,1).

[0062] Source domain characteristics are (B is the batch size, C is the number of channels, and H×W is the spatial dimension), then the final blended features satisfy:

[0063] Through the above process, statistical feature alignment is achieved, maintaining the spatial structure of the source domain features while adjusting their "statistical distribution style" to the mixed mode, allowing the model to be exposed to richer inter-domain feature variants during training.

[0064] S6. Design a mask structure to extract high-level features of the source domain.

[0065] In this embodiment, the steps for extracting high-level features of the source domain include: S601. Input features are transformed through a sequence network containing Dropout, linear layers, batch normalization (BN), and ReLU activation:

[0066] in: For the input features (B is the batch size), the MLP(·) consists of two linear layers. Composed of ReLU activation, it achieves nonlinear transformation of features; BN(·) is unbiased batch normalization, standardizing the output to a reasonable range to avoid scale differences affecting subsequent sampling, and output... num_classes is consistent with the input dimension, with a default value of 1024, representing the initial importance score of each feature dimension.

[0067] S602. To achieve the conversion from continuous scores to discrete masks (0 / 1), Gumbel noise is introduced to enhance sampling randomness, and a hard mask is generated through Top-k selection. Noise conforming to a Gumbel distribution is added to the scores of each dimension, as shown in the formula:

[0068] in, It is noise that follows a Gumbel distribution, generated through inverse transform sampling: , , The temperature parameter controls the steepness of the distribution; the smaller the value, the closer the output is to a discrete distribution.

[0069] S603, Scoring for Noise-Containing Content Sort by dimension, select the dimensions corresponding to the top k highest scores, and generate a binary mask. If the i-th dimension of the b-th sample belongs to the Top-k, then... It is 1 if it is true, otherwise it is 0. This is the final output hard mask. .

[0070] S604, through the above-mentioned hybrid features With mask Element-wise multiplication is performed to obtain high-level features of the source domain:

[0071] S7. Extract target domain features from the memory bank, calculate the domain discriminant entropy of each feature, select the feature with the smallest domain discriminant entropy, and obtain the most unique style features of the target domain in each batch.

[0072] In this embodiment, the steps for obtaining the most unique style features of the target domain include: S701. Filter target domain features from the feature memory, excluding source domain features. The global feature memory is... N is the total number of features, D is the feature dimension, and the number of source domain categories is... Then the feature subset of the target domain is defined as:

[0073] in, A subset of features from the target domain, containing elements from the index in the memory. arrive , This represents the number of features in the target domain.

[0074] In this application, the memory serves two purposes: firstly, it distinguishes between storing features from the source domain (labeled) and the target domain (unlabeled), defining the index range of the target domain feature subset (from the source domain category index to the end). Secondly, it provides sufficient target domain feature samples, using domain discriminant entropy calculation to filter out features with the clearest domain affiliation (minimum entropy value), ensuring that each batch acquires the most unique style features of the target domain, thus supporting the selection of unique style features. Thirdly, it also serves as a feature cache pool, avoiding repeated extraction of target domain features, and providing a stable source of target domain features for constructing cross-domain difficult sample contrast loss, improving the efficiency and robustness of model training.

[0075] S702, Features of the target domain The information entropy is calculated using the probability distribution output by the domain classifier:

[0076] in Let i be the i-th feature in the feature subset of the target domain, with shape [D]. [0] represents the score of the source domain. [1] is the score for the target domain. The parameterized domain classifier function is represented by... Define the mapping from the feature space to the domain decision space.

[0077] S703. Convert the classifier scores into a probability distribution to make the domain attribution tendency of features easier to interpret; that is, the higher the probability, the clearer the attribution.

[0078] in, Features The probability of belonging to the source domain. Features The probability of belonging to the target domain. It is an exponential function used to convert scores into non-negative values; the denominator is a normalization term to ensure that the sum of probabilities is 1.

[0079] S704. Calculate information entropy and quantify the uncertainty of domain attribution of features:

[0080] in, Features The information entropy, with a value range of [0, log 2], It is a numerically stable term. The smaller, the better. , The greater the difference, the more defined the target domain attribute of the feature, that is, the stronger its uniqueness. Conversely, The larger the value, the more ambiguous the domain affiliation of the feature.

[0081] Optimal feature index selection:

[0082] in, Represents a subset of features of the target domain. The feature index with the smallest entropy value is selected from the features in the target domain that have the "most clear domain affiliation," that is, the features that best represent the unique style of the target domain.

[0083] S706, Global Index Mapping, converts local indices within a subset of the target domain into indices in the global memory, facilitating direct feature extraction.

[0084]

[0085] in, The optimal feature is represented in the global memory. The index in.

[0086] S707, the most unique stylistic feature of the target domain is:

[0087] This application quantifies the uncertainty of feature domain affiliation by calculating domain discriminant entropy, thereby defining the "uniqueness" of features: the smaller the entropy value, the more certain the probability that a feature is classified as belonging to the target domain by the domain classifier (the greater the difference between the source domain score and the target domain score), and the purer its target domain attribute; conversely, the larger the entropy value, the more ambiguous the domain affiliation of the feature, and the less it can represent the unique style of the target domain. This allows for the selection of features from the memory that best reflect the style of the target domain and differ most significantly from the source domain, providing a precise "target domain style template" for subsequent cross-domain difficult sample comparison loss, and helping the model learn domain-invariant and discriminative features.

[0088] S8. By splicing high-level features from the source domain with the most unique style features from the target domain, a cross-domain difficult sample contrast loss is constructed, which promotes the model to learn feature representations that are both domain-invariant and discriminative, thereby improving the model's cross-domain adaptability.

[0089] In this embodiment, the specific steps for constructing the cross-domain difficult sample contrast loss include: S801, will pass through the mask High-level features of the source domain obtained Features of difficult samples in the target domain The concatenation is mapped to the contrast space through a predictor to obtain cross-domain hard sample features. By fusing discriminative features from the source domain with features from difficult samples in the target domain, core feature pairs for cross-domain comparison are formed, simulating domain shifts in real-world scenarios.

[0090] S802, Based on Source Domain Invariant Features Features of cross-domain difficult samples The hard sample contrast loss constraint enables the clustering of similar features and the separation of dissimilar features:

[0091] in, Indicates to and A set of positive samples of the same type Take the expected value. This represents the embedding of a positive sample in the contrast space. Here, a positive sample is one belonging to the same class as the i-th sample. The samples, whose embeddings in the contrast space are also taken from... and ; This represents the embedding of other samples (including positive and negative samples) in the contrast space, excluding the i-th sample itself. yes With a certain positive sample Similarity score, after temperature Scaling: higher scores indicate a greater likelihood of belonging to the same category. The denominator of the logarithmic part is... The sum of similarity scores with all other samples (including positive and negative samples) represents The total probability of being of the same class as any sample.

[0092] Ultimately, this loss significantly enhances the model's feature alignment ability and robustness in cross-domain tasks by specifically addressing difficult samples.

[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. An unsupervised underwater target search method based on Gaussian mixture and cross-domain contrastive collaboration, characterized in that, Includes the following steps: S1. Construct an underwater target search model, which includes a feature extraction network, an underwater target detection network, and a re-identification network; Obtain a source domain dataset and pre-train an underwater target search model based on the source domain dataset to obtain an underwater target search pre-trained model; the source domain dataset includes underwater images with label information; S2. Based on the region proposal network in the underwater target search pre-trained model, extract image features from the underwater image data in the source domain dataset as source domain features; simultaneously, obtain the target domain dataset, and extract image features from the underwater image data in the target domain dataset as target domain features based on the region proposal network in the underwater target search pre-trained model. The target domain dataset includes underwater images without label information; obtain the statistical distributions of the source domain features and the target domain features respectively, whereby the statistical measures include the feature mean and variance. S3. The statistical measures of the target domain features are clustered using k-means clustering to provide initial values ​​for the mean, weights, and covariance of the Gaussian mixture model that are close to the true distribution of the data, thereby realizing the initialization of the Gaussian mixture model. S4. Based on the weight components and fitted components obtained by fitting the Gaussian mixture model, select the most representative target domain statistics as the optimal target domain statistics. S5. Combine the source domain feature statistics with the target domain optimal statistics, and mix them using the mixing weights of Beta distribution sampling to obtain mixed features; S6. Design a mask structure and multiply the mixed features with the mask element by element to obtain the high-level features of the source domain. S7. Extract target domain features from the memory bank, calculate the domain discrimination entropy of each target domain feature, and select the feature with the smallest domain discrimination entropy based on the calculation results as the most unique style feature of the target domain in each batch. S8. By splicing high-level features from the source domain with the most unique style features from the target domain, a cross-domain difficult sample contrast loss is constructed to improve the cross-domain adaptability of the underwater target search model; underwater target search is performed based on the trained underwater target search model.

2. The unsupervised underwater target search method based on Gaussian mixture and cross-domain contrast collaboration as described in claim 1, characterized in that, The distribution of the characteristic statistics is obtained based on the following calculations: in, The characteristic mean, Characteristic variance Let be the pixel value of the feature at spatial location (h, w) in channel c. =1e-8 is used for numerical stability, H is the height of the feature map, and W is the width of the feature map.

3. The unsupervised underwater target search method based on Gaussian mixture and cross-domain contrast collaboration as described in claim 1, characterized in that, Complete the initialization of the Gaussian mixture model by following these steps: Assign samples, for each sample Assign a cluster label The label corresponds to the cluster center closest to the sample: in, To represent a single sample to be assigned, The center of the k-th cluster is represented. For the sample With the kth cluster center The distance between them; Update the centers: For each cluster k, recalculate the centers of that cluster. : in, Let be the number of samples in the k-th cluster.

4. The unsupervised underwater target search method based on Gaussian mixture and cross-domain contrast collaboration as described in claim 1, characterized in that, The following steps are used to filter and obtain the optimal statistics for the target domain: First, calculate the weight components: in, This represents the number of samples contained in the k-th cluster of k-means. Indicates the total number of samples; Secondly, the covariance matrix is ​​calculated. For the k-th cluster, the cluster centers are subtracted from the samples to obtain the centered samples. Then, the covariance of the samples is calculated through matrix multiplication, and a regularization term for the identity matrix is ​​added. in, For regularization terms, =10 -6 , The identity matrix is ​​the final covariance matrix. In the diagram, diagonal elements reflect the dispersion of each feature itself, while off-diagonal elements reflect the correlation between two features. Select the component index with the largest weight. : The representative mean of the component with the largest weight , for the first The mean of each cluster The representative standard deviation of the component with the largest weight. It is the first The covariance matrix of each cluster The second diagonal element ( ,2,2) Take the square root of the corresponding value and add the numerical stability parameter. Obtained; Get As the optimal statistic for the target domain.

5. The unsupervised underwater target search method based on Gaussian mixture and cross-domain contrastive collaboration as described in claim 1, characterized in that, The hybrid features are obtained according to the following steps: Obtain source domain feature statistics and the optimal statistics of the target domain Mixed weights Where α1=0.1, α2=2.0, the mixture statistic is defined as: Obtain source domain features B represents the batch size, C represents the number of channels, and H×W represents the spatial dimension. The final blended features... satisfy: 。 6. The unsupervised underwater target search method based on Gaussian mixture and cross-domain contrastive collaboration as described in claim 1, characterized in that, The mask structure is constructed as follows: The input features are transformed through a sequence network containing Dropout, linear layers, batch normalization, and ReLU activation: in, Let B be the input feature and B be the batch size. The MLP(·) consists of two linear layers. Combined with ReLU activation, it realizes nonlinear transformation of features; BN(·) is unbiased batch normalization; Gumbel noise is introduced to enhance sampling randomness, and a hard mask is generated through Top-k selection. Noise conforming to a Gumbel distribution is added to the score of each dimension, as shown in the formula: in, It is noise that follows a Gumbel distribution, generated through inverse transform sampling: , , The temperature parameter controls the steepness of the distribution; the smaller the value, the closer the output is to a discrete distribution. Scoring with noise Sort by dimension, select the dimensions corresponding to the top k highest scores, and generate a binary mask. If the i-th dimension of the b-th sample belongs to the Top-k, then... It is 1 if it is not 0 otherwise. This is the final output hard mask. .

7. The unsupervised underwater target search method based on Gaussian mixture and cross-domain contrastive collaboration as described in claim 1, characterized in that, To obtain the most unique style features of the target domain, follow these steps: First, target domain features are selected from the memory. The subset of target domain features is defined as follows: in, For a subset of features of the target domain, , Number of source domain categories; Where D is the number of features in the target domain, and D is the feature dimension. Then, the target domain features are analyzed. The information entropy is calculated using the probability distribution output by the domain classifier: in For the i-th feature in the feature subset of the target domain, [0] represents the score of the source domain. [1] is the score for the target domain. The parameterized domain classifier function is represented by... Define the mapping from the feature space to the domain decision space; The information entropy is calculated using the following formula to quantify the uncertainty of domain attribution of features: in, Features The information entropy, with a value range of [0, log 2], It is a numerically stable term; The optimal feature index is then obtained as follows: in, Represents a subset of features in the target domain The feature index with the smallest entropy value; Finally, perform global index mapping: in, The optimal feature is represented in the global memory. Index in The most unique style feature of the target domain is: 。 8. The unsupervised underwater target search method based on Gaussian mixture and cross-domain contrast collaboration as described in claim 1, characterized in that, Construct the cross-domain hard sample contrastive loss as follows: Will pass through the mask High-level features of the source domain obtained Features of difficult samples in the target domain The concatenation is mapped to the contrast space through a predictor to obtain cross-domain hard sample features. ; Based on source domain invariance Features of cross-domain difficult samples The hard sample contrast loss constrains the clustering of similar features and the separation of dissimilar features. The formula for calculating the hard sample contrast loss is as follows: in, Indicates to and A set of positive samples of the same kind Take the expected value. This represents the embedding of a positive sample in the contrast space, where a positive sample belongs to the same class as the i-th sample. The samples, whose embeddings in the contrast space are also taken from... and ; This represents the embedding of all samples in the comparison space except for the i-th sample itself. yes With a certain positive sample Similarity score, after temperature Scaling; higher scores indicate a greater likelihood of belonging to the same class. The denominator for the logarithmic part is... The sum of similarity scores with all other samples represents The total probability of being of the same class as any sample.