A robust cross-domain image retrieval method based on deep neural network
Through deep neural network models and feature extraction technology, it handles noisy labels and different types of data, solves the problem of sensitivity of existing technologies to annotation quality, and achieves robust cross-domain image retrieval under low-annotation data sets.
Patent Information
- Application Number
- CN202410413933.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-08
- Publication Date
- 2024-10-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing cross-domain image retrieval methods are sensitive to the annotation quality of the data set, and it is difficult to learn correct feature information in data sets with low annotation quality, which affects the performance of cross-domain image retrieval.
A robust cross-domain image retrieval method based on deep neural networks is used to build a deep neural network model by preprocessing the image data set, use noise labels to train the model, extract features, and implement image retrieval through feature distance calculation, using different losses The function processes clean and noisy data, relabels and weights them to reduce noise label interference.
It improves the robustness and retrieval effect of the model, expands the application space of noise label learning, and enhances the training integrity and retrieval performance under low-annotation quality data sets.
Smart Images

Figure CN118152603B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to cross-domain image retrieval technology, and in particular to a robust cross-domain image retrieval method based on a deep neural network model. Background Art
[0002] With the development of the Internet and the popularity of devices such as smartphones, a large number of digital images are constantly being generated and stored, and users' demand for image information is also increasing. People hope to quickly and accurately find the image content they are interested in from massive image data, which has prompted the development of image retrieval technology. In recent years, deep learning technology has achieved great success in the field of image processing, especially in the extraction of image features. Deep learning models can learn high-level feature representations in image data, improving the performance of image retrieval technology.
[0003] Due to the continuous diversification of image application scenarios, a large amount of image data has been accumulated in different fields, such as natural scene images, medical images, satellite images, etc. These image data in different fields have different features and semantic information. In practical applications, users may need to retrieve images related to another field from an image library in one field, so cross-domain image retrieval technology is needed to realize image retrieval between different fields.
[0004] In recent years, cross-domain image retrieval technology has gradually become a research hotspot. Today's cross-domain image retrieval technology has excellent retrieval performance with the support of high-quality annotated datasets (i.e., all samples and sample labels are completely matched). However, the production and collection of high-quality annotated datasets consumes a lot of manpower and material resources. In some cases, there is no way to obtain high-quality annotated datasets, while datasets with lower annotation quality (i.e., there are some samples and sample labels that do not match) can be easily obtained through channels such as Internet browsers. However, when using datasets with lower annotation quality to apply to current cross-domain image retrieval technology, the effect of cross-domain image retrieval technology will be greatly reduced or even fail. Therefore, the existing cross-domain retrieval methods face this problem: they are heavily dependent on the correct annotation of samples in the dataset. This means that the retrieval performance of the existing methods depends on the annotation of the dataset, and it is difficult to ensure the robustness of the methods. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present invention provides a robust cross-domain image retrieval method based on a deep neural network, which solves the problem that the existing cross-domain retrieval method does not take into account the annotation conditions of different data sets well, it is difficult to learn the correct feature information in data sets with lower annotation quality, and it is difficult to effectively train the deep network model, which in turn affects the cross-domain image retrieval performance.
[0006] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is: a robust cross-domain image retrieval method based on deep neural network, comprising the following steps:
[0007] S1. Preprocess the image data set to obtain a processed training data set and a test data set;
[0008] S2, build a deep neural network model;
[0009] S3, inputting the noise label training data of the query domain and the target domain to train the deep neural network model, and obtaining a trained neural network model;
[0010] S4, extracting query domain image features and target domain image features in the test data set through the feature extractor in the trained neural network model;
[0011] The calculation formula for extracting features in step S4 is as follows:
[0012] NQF=f1(QD)
[0013] NTF=f1(TD)
[0014] Where QD is the test data vector of the query domain, NQF is the query domain test feature extracted by the trained model, TD is the test data vector of the target domain, NTF is the target domain test feature extracted by the trained model, and f1 is the trained model feature extractor;
[0015] S5, calculating the distance between the query domain test image features and the target domain image test features, arranging the distances in ascending order, and taking several features with the smallest distances, thereby realizing the retrieval of the query image;
[0016] The formula for calculating the characteristic distance in step S5 is as follows:
[0017]
[0018] Where d represents the dimension of the sample vector, q i represents the i-th element of the query domain sample vector of the test dataset, t i Represents the i-th element of the target domain sample vector of the test dataset.
[0019] The beneficial effects of the present invention are:
[0020] 1. Process the clean data and noisy data in the training data set separately, and use different loss functions for different types of data to better implement model training;
[0021] 2. Re-labeling the noise data in the training data set can largely avoid the interference effect of noise labels on training. At the same time, the re-labeled training data obtained can also be used as non-noise label training data to increase the scale of reliable training data, achieve more complete training for the model, and thus obtain better retrieval results;
[0022] 3. Further adaptive weighting of the re-assigned training data can further filter out data that still carries wrong labels and reduce the interference information caused by wrong labels;
[0023] 4. This method expands the application of noisy label learning in the field of cross-domain image retrieval and opens up a new application space for noisy label learning.
[0024] Furthermore, the step 1 comprises the following steps:
[0025] S11, dividing the data set into a training data set and a test data set according to a certain ratio;
[0026] S12, converting the image data of all fields in the training data set and the test data set into three-channel RGB images to obtain a processed image data set;
[0027] S13, randomly modifying some sample labels of data of all categories in all fields in the training data set to other categories, to obtain a processed noise training data set;
[0028] S13, using the processed image data set as a training data set and a test data set;
[0029] Furthermore, the step 2 comprises the following steps:
[0030] S21, use ResNet-50 pre-trained on the ImageNet dataset to build an image feature extractor f0;
[0031] S22, use a randomly initialized fully connected layer network as the classifier g0;
[0032] S23. Connect the image feature extractor and the classifier to build a deep neural network model M0 = {f0, g0}.
[0033] Furthermore, the step 3 comprises the following steps:
[0034] S31. Randomly select data from two fields in the training data set, one of which is used as the query field and the other is used as the target field;
[0035] S32, using the data of the query domain and the target domain in the training data set to preheat the model;
[0036] S33, calculating the sample neighbor subscript matrix of the query domain and the target domain in the training data set;
[0037] S34, dividing the training data sets of the query domain and the target domain by the neighbor matrix and labels of the training samples, to obtain clean and noisy training data of the query domain and clean and noisy training data of the target domain;
[0038] S35, re-labeling the noisy training data in the query and target domains using the clean training data in the query and target domains;
[0039] S36, inputting the clean training data QCD and the re-labeled training data QRD of the query domain and the clean training data TCD and the re-labeled training data TRD of the target domain into the feature extractor of the model to obtain the clean training features and the re-labeled training features of the query domain as QCF and QRF matrices, and the clean training features and the re-labeled training features of the target domain as TCF and TRF matrices;
[0040] The updating formula in step S36 is as follows:
[0041] QCF=f(QCD)
[0042] QRF=f(QRD)
[0043] TCF=f(TCD)
[0044] TRF=f(TRD)
[0045] Where f is the feature extractor in the model;
[0046] S37, weighting the re-assigned training feature matrices of the target domain and the query domain;
[0047] S38, using the clean feature training matrices of the query domain and the target domain and the weighted reassigned training features QCF, TCF, WQRF and WTRF to update the training feature libraries of the query domain and the target domain;
[0048] The updating formula in step S38 is as follows:
[0049]
[0050]
[0051] in and They represent the domain feature centers of category 1 and category c in the query domain training data, respectively. and Indicates that the query domain training data belongs to the average of the features of category 1 and category c, and Respectively represent the domain feature centers of target domain training data category 1 and category c, and The feature that indicates that the query domain training data belongs to category 1 and category c is averaged, and α is a hyperparameter;
[0052] S39. Calculate the losses within and between domains to update the model parameters and perform training.
[0053] Further, step S32 is specifically as follows:
[0054] S321, input the query domain and the target domain training data into the deep neural network model at the same time, and flatten them into a one-dimensional vector, to obtain the classification result matrices QC and TC of the query and target domain training data, whose dimensions are N1 rows and F columns and N2 rows and F columns respectively, where each row corresponds to a classification vector of an image after the deep neural network model;
[0055] The calculation formula of the classification result matrix of the query and target fields in the training data set in step S321 is as follows:
[0056] QC=g0(f0(QD))
[0057] TC=g0(f0(TD))
[0058] Among them, QD is the training data vector of the query domain, TD is the training data vector of the target domain, f0 is the feature extractor in the initial model, and g0 is the classifier in the initial model;
[0059] S322, read the labels of the training data of the query domain and the target domain as one-dimensional vectors, obtain the noise label training matrices QNL and TNL of the query domain and the target domain, calculate the cross entropy ce corresponding to the noise label training matrix and the classification result training matrix as the loss to update the model, realize the preheating of the model, and obtain the preheated model M = {f, g};
[0060] The calculation formula of the cross entropy in step S322 is as follows:
[0061]
[0062] Among them, N1 is the number of samples of query domain training data, N2 is the number of samples of target domain training data, QNL is the noise label training matrix of query domain, TNL is the noise label training matrix of target domain, QC is the classification result matrix of query domain training data, and TC is the classification result matrix of target domain training data.
[0063] The beneficial effects of the above further scheme are:
[0064] 1. Preheating the model can enable the model to learn most of the feature information, so as to better carry out the subsequent segmentation and label assignment training process.
[0065] Further, step S33 is specifically as follows:
[0066] S331, input the training data of the query domain and the target domain into the preheated deep neural network model respectively, flatten them into one-dimensional vectors, and obtain the feature matrices QF and TF of the training data of the two domains, whose dimensions are N1 rows and F columns and N2 rows and F columns respectively;
[0067] The calculation formulas of QF and TF in step S331 are as follows:
[0068] QF=f(QD)
[0069] TF=f(TD)
[0070] Where QD is the training data vector of the query domain, TD is the training data vector of the target domain, and f is the feature extractor of the preheated model;
[0071] S332, calculating the K neighbors of each training data in the feature space according to the Cosine similarity, and obtaining neighbor matrices QN and TN of the query and target domain training data, whose dimensions are N1 rows and K columns and N2 rows and K columns respectively;
[0072] The calculation formula of K neighbors in step S332 is as follows:
[0073]
[0074]
[0075] Where argmax means taking several largest numerical subscripts, QN and TN represent the neighbor matrices of the query domain and the target domain in the training data respectively, N1 represents the number of training data samples in the query domain, N2 represents the number of training data samples in the target domain, QF represents the feature matrix of the training data in the query domain, TF represents the feature matrix of the training data in the target domain, and T represents the transpose operation.
[0076] Further, step S34 is specifically as follows:
[0077] S341, calculating the label inconsistency matrices QIC and TIC of the query domain and target domain training data according to the neighbor matrix and the sample labels, whose dimensions are N1 rows and 1 column and N2 rows and 1 column respectively;
[0078] The calculation formula of the label inconsistency matrix in step S341 is as follows:
[0079]
[0080]
[0081] Where K is the number of sample neighbors, JS is Jenson's Shannon divergence, QNL is the query domain training noise label matrix, and the softmax operation is to convert the original data into a probability distribution operation. is the neighbor features of the query domain training samples, TNL is the target domain training noise label matrix, Neighborhood features of training samples in the target domain;
[0082] S342, dividing the training data in the query domain and the target domain into clean query training data QCD and noisy query training data QND and clean target training data TCD and noisy target training data TND according to the hyperparameter γ and the label inconsistency matrix of the query domain and the target domain;
[0083] The specific division formula in step S342 is as follows:
[0084]
[0085]
[0086] where χ i represents the training samples whose label inconsistency in the query domain is less than the hyperparameter γ, χ j represents the training samples whose label inconsistency in the query domain is greater than or equal to the hyperparameter γ, y i represents the training samples whose label inconsistency in the target domain is less than the hyperparameter γ, y j It represents the training samples whose label inconsistency in the target domain is greater than or equal to the hyperparameter γ, QIC is the query domain label inconsistency matrix, and TIC is the target domain label inconsistency matrix.
[0087] The beneficial effects of the above scheme are:
[0088] 1. Process the clean data and noisy data in the training data separately, and use different loss functions for different types of data to better implement model training.
[0089] Further, step S35 is specifically as follows:
[0090] S351, calculating a training feature center QFC matrix of the query domain and a training feature center TFC matrix of the target domain through the clean query domain training data QCD and the clean target domain training data QND;
[0091] The specific calculation formula in step S351 is as follows:
[0092]
[0093]
[0094] in and They represent the feature centers of category 1 and category c in the query domain training data, n1 and nc represent the number of samples of category 1 and c in the clean training data of the query domain, respectively. and They represent the average of the features calculated by the model's feature extractor f for samples of category 1 and c in the clean training data of the query domain to obtain the corresponding sample center; and They represent the feature centers of category 1 and category c in the target domain training data, respectively. m1 and mc represent the number of samples of category 1 and c in the clean training data of the target domain, respectively. and They represent the average of the features calculated by the feature extractor f of the model for samples of categories 1 and c in the clean training data of the query domain to obtain the corresponding sample centers;
[0095] S352, re-assigning pseudo labels to the noise training data QND and TND in the query domain and the target domain through the sample center matrices QFC and TFC in the target domain and obtaining the re-assigned label training data QRD and TRD in the query domain and the target domain;
[0096] The assignment formula in step S36 is as follows:
[0097]
[0098]
[0099] in and They represent the first and last noisy label training samples in the query domain, respectively, where s is the number of noisy training samples in the query domain, and softmax represents the operation of converting distribution into probability. and represents the query domain feature vector calculated by the feature extractor of the model, represents the operation of vector and matrix multiplication; and They represent the first and last noisy label training samples in the target domain, respectively, where p is the number of noisy training samples in the query domain, and Represents the target domain feature vector computed by the model's feature extractor.
[0100] The beneficial effects of the above steps are:
[0101] 1. Re-labeling the noisy training data in the dataset can largely avoid the interference effect of the noise labels on the training. At the same time, the re-labeled training data obtained can also be used as non-noise labels to increase the scale of training data, achieve more complete training for the model, and thus obtain better retrieval results.
[0102] Further, step S37 is specifically as follows:
[0103] S371, input the obtained clean features and the re-labeled features QCF, TCF matrix into the classifier of the model to obtain the classification results QCC, TCC, QRC and TRC matrices, and use the feature centers of the query and target domains to weight the re-labeled training samples to obtain weights WQ and WT;
[0104] The formula for calculating the classification result and the weight in step S371 is as follows:
[0105] QCC=g(QCF)
[0106] TCC=g(TCF)
[0107]
[0108]
[0109]
[0110]
[0111] Among them, g is the classifier of the model, d represents the dimension of the feature vector, and y Q Represents the re-assigned label of the query domain, ce Q represents the cross entropy value calculated by the re-assigned labels and model predictions in the query domain, y T represents the re-assigned label of the target domain, ce T represents the cross entropy value calculated by the re-assigned labels and model predictions in the target domain, and a is a pre-set hyperparameter;
[0112] S372. Use the calculated weights to multiply the re-assigned features QRF and TRF of the query domain and the target domain to obtain WQRF and WTRF matrices.
[0113] The beneficial effects of the above scheme are:
[0114] 1. By further implementing adaptive weighting for the reassigned training data, the data that still carries the wrong labels can be further filtered out to reduce the interference information caused by the wrong labels.
[0115] Further, step S39 is specifically as follows:
[0116] S391. Calculate the clean loss L based on the clean data classification matrices QCC and TCC of the query and target domains and the clean labels clean , the reassignment loss L is calculated based on the reassigned feature classification matrices QRC and TRC of the query and target domains and the corresponding weights QW and TW relabel , calculate the domain difference loss L based on the feature library of the query and target domains domain ;
[0117] The calculation formulas for the clean loss, reassignment loss and domain difference loss in step S391 are as follows:
[0118]
[0119]
[0120]
[0121] Where m and n represent the number of clean samples in the query domain and the target domain, respectively. and denote the labels of clean samples in the query domain and the target domain, p and q denote the number of re-labeled samples in the query domain and the target domain, respectively, c denotes the total number of categories, and denotes the jth element of the i-th sample label re-assigned to the query and target domains, respectively, It means calculating the absolute value difference between the center of the feature of category i in the query and target domain;
[0122] S392, use Adam optimizer to train clean loss L clean and the reassignment loss L relabel And the domain difference loss L domain , complete the training of the deep model and obtain the trained model M1 = {f1, g1}. BRIEF DESCRIPTION OF THE DRAWINGS
[0123] Figure 1 The figure is a flow chart of the method of the present invention. DETAILED DESCRIPTION
[0124] The following examples are used to further describe the specific implementation methods of the present invention. The following examples are only used to illustrate the present invention, but are not used to limit the scope of the present invention.
[0125] Example 1 is an example of the present invention, taking "Office31" as a data set, which includes three different fields and 31 category samples in each field. The three different fields are used as query fields and target fields respectively, and the three fields are: Amazon (a), Dslr (d) and Webcam (w).
[0126] 1. Divide each field of the dataset into training and test datasets in a ratio of 8:2, and read all data into three-channel images. In all categories of the training datasets in each field, change 20%, 40%, 60%, and 80% of the data labels to other category labels. After the above operations, the preprocessed noise training and test datasets are obtained.
[0127] 2. Build a deep neural network model. The model includes a Resnet50 convolutional neural network pre-trained on ImageNet as a feature extractor and a randomly initialized fully connected layer as a classifier. The input and output order of the data in the model is: first input the Resnet50 network, the result is used as the extracted feature, and then the output result is used as input to the fully connected layer. The output of the fully connected layer is the final classification result.
[0128] 3. Use the training data to train the deep neural network model to obtain a trained model.
[0129] 4. Input the query and target domain data in the test set into the network model, and obtain the test features of the query and target domain through the feature extractor therein.
[0130] 5. Calculate the distance between the query and the test features of the target domain, sort them in ascending order, and take the target feature with the closest distance as the retrieval result. The retrieval results are as follows:
[0131]
[0132] It can be seen from the above table that this method can maintain a certain robustness when performing cross-domain retrieval of images in different fields under the influence of different degrees of noise labels. When the proportion of noise labels is 20%, the average value of its mean average precision reaches 88.30%. Even when the proportion of noise labels is as high as 80%, the average value of its mean average precision can still be maintained at 57.64%.
Claims
1. A robust cross-domain image retrieval method based on deep neural network, characterized in that: The following steps are involved: S1. Preprocess the image data set to obtain a processed training data set and a test data set; S2, build a deep neural network model; S3, inputting the noise label training data of the query domain and the target domain to train the deep neural network model, and obtaining a trained neural network model; S4, extracting query domain image features and target domain image features in the test data set through the feature extractor in the trained neural network model; The calculation formula for extracting features in step S4 is as follows: NQF=f1(QD) NTF=f1(TD) Where QD is the test data vector of the query domain, NQF is the query domain test feature extracted by the trained model, TD is the test data vector of the target domain, NTF is the target domain test feature extracted by the trained model, and f1 is the trained model feature extractor; S5, calculating the distance between the query domain test image features and the target domain image test features, arranging the distances in ascending order, and taking several features with the smallest distances, thereby realizing the retrieval of the query image; The formula for calculating the characteristic distance in step S5 is as follows: Where d represents the dimension of the sample vector, q i represents the i-th element of the query domain sample vector of the test dataset, t i Represents the i-th element of the target domain sample vector of the test dataset; The step S3 comprises the following sub-steps: S31. Randomly select data from two fields in the training data set, one of which is used as the query field and the other is used as the target field; S32, using the data of the query domain and the target domain in the training data set to preheat the model; S33, calculating the sample neighbor subscript matrix of the query domain and the target domain in the training data set; S34, dividing the training data sets of the query domain and the target domain by the neighbor matrix and labels of the training samples, to obtain clean and noisy training data of the query domain and clean and noisy training data of the target domain; S35, re-labeling the noisy training data in the query and target domains using the clean training data in the query and target domains; S36, inputting the clean training data QCD and the re-labeled training data QRD of the query domain and the clean training data TCD and the re-labeled training data TRD of the target domain into the feature extractor of the model to obtain the clean training features and the re-labeled training features of the query domain as QCF and QRF matrices, and the clean training features and the re-labeled training features of the target domain as TCF and TRF matrices; The updating formula in step S36 is as follows: QCF=f(QCD) QRF=f(QRD) TCF=f(TCD) TRF=f(TRD) Where f is the feature extractor in the model; S37, weighting the re-assigned training feature matrices of the target domain and the query domain; S38, using the clean feature training matrices of the query domain and the target domain and the weighted reassigned training features QCF, TCF, WQRF and WTRF to update the training feature libraries of the query domain and the target domain; The updating formula in step S38 is as follows: in and They represent the domain feature centers of category 1 and category c in the query domain training data, respectively. and Indicates that the query domain training data belongs to the average of the features of category 1 and category c, and Respectively represent the domain feature centers of target domain training data category 1 and category c, and The feature that indicates that the query domain training data belongs to category 1 and category c is averaged, and α is a hyperparameter; S39. Calculate the losses within and between domains to update the model parameters and perform training.
2. According to claim 1, a robust cross-domain image retrieval method based on deep neural network is characterized in that: The step S32 includes the following sub-steps: S321, input the query domain and the target domain training data into the deep neural network model at the same time, and flatten them into a one-dimensional vector, to obtain the classification result matrices QC and TC of the query and target domain training data, whose dimensions are N1 rows and F columns and N2 rows and F columns respectively, where each row corresponds to a classification vector of an image after the deep neural network model; The calculation formula of the classification result matrix of the query and target fields in the training data set in step S321 is as follows: QC=g0(f0(QD)) TC=g0(f0(TD)) Among them, QD is the training data vector of the query domain, TD is the training data vector of the target domain, f0 is the feature extractor in the initial model, and g0 is the classifier in the initial model; S322, read the labels of the training data of the query domain and the target domain as one-dimensional vectors, obtain the noise label training matrices QNL and TNL of the query domain and the target domain, calculate the cross entropy ce corresponding to the noise label training matrix and the classification result training matrix as the loss to update the model, realize the preheating of the model, and obtain the preheated model M = {f, g}; The calculation formula of the cross entropy in step S322 is as follows: Among them, N1 is the number of samples of query domain training data, N2 is the number of samples of target domain training data, QNL is the noise label training matrix of query domain, TNL is the noise label training matrix of target domain, QC is the classification result matrix of query domain training data, and TC is the classification result matrix of target domain training data.
3. The method for robust cross-domain image retrieval based on deep neural network according to claim 1, characterized in that: The step S33 comprises the following sub-steps: S331, input the training data of the query domain and the target domain into the preheated deep neural network model respectively, flatten them into one-dimensional vectors, and obtain the feature matrices QF and TF of the training data of the two domains, whose dimensions are N1 rows and F columns and N2 rows and F columns respectively; The calculation formulas of QF and TF in step S331 are as follows: QF=f(QD) TF=f(TD) Where QD is the training data vector of the query domain, TD is the training data vector of the target domain, and f is the feature extractor of the preheated model; S332, calculating the K neighbors of each training data in the feature space according to the Cosine similarity, and obtaining neighbor matrices QN and TN of the query and target domain training data, whose dimensions are N1 rows and K columns and N2 rows and K columns respectively; The calculation formula of K neighbors in step S332 is as follows: Where argmax means taking several largest numerical subscripts, QN and TN represent the neighbor matrices of the query domain and the target domain in the training data respectively, N1 represents the number of training data samples in the query domain, N2 represents the number of training data samples in the target domain, QF represents the feature matrix of the training data in the query domain, TF represents the feature matrix of the training data in the target domain, and T represents the transpose operation.
4. The method for robust cross-domain image retrieval based on deep neural network according to claim 1, characterized in that: The step S34 comprises the following sub-steps: S341, calculating the label inconsistency matrices QIC and TIC of the query domain and target domain training data according to the neighbor matrix and the sample labels, whose dimensions are N1 rows and 1 column and N2 rows and 1 column respectively; The calculation formula of the label inconsistency matrix in step S341 is as follows: Where K is the number of sample neighbors, JS is Jenson's Shannon divergence, QNL is the query domain training noise label matrix, and the softmax operation is to convert the original data into a probability distribution operation. is the neighbor features of the query domain training samples, TNL is the target domain training noise label matrix, Neighborhood features of training samples in the target domain; S342, dividing the training data in the query domain and the target domain into clean query training data QCD and noisy query training data QND and clean target training data TCD and noisy target training data TND according to the hyperparameter γ and the label inconsistency matrix of the query domain and the target domain; The specific division formula in step S342 is as follows: where x i represents the training samples whose label inconsistency in the query domain is less than the hyperparameter γ, x j represents the training samples whose label inconsistency in the query domain is greater than or equal to the hyperparameter γ, y i represents the training samples whose label inconsistency in the target domain is less than the hyperparameter γ, y j It represents the training samples whose label inconsistency in the target domain is greater than or equal to the hyperparameter γ, QIC is the query domain label inconsistency matrix, and TIC is the target domain label inconsistency matrix.
5. The method for robust cross-domain image retrieval based on deep neural network according to claim 1, characterized in that: The step S35 comprises the following sub-steps: S351, calculating a training feature center QFC matrix of the query domain and a training feature center TFC matrix of the target domain through the clean query domain training data QCD and the clean target domain training data QND; The specific calculation formula in step S351 is as follows: in and They represent the feature centers of category 1 and category c in the query domain training data, n1 and nc represent the number of samples of category 1 and c in the clean training data of the query domain, respectively. and They represent the average of the features calculated by the model's feature extractor f for samples of category 1 and c in the clean training data of the query domain to obtain the corresponding sample center; and They represent the feature centers of category 1 and category c in the target domain training data, respectively. m1 and mc represent the number of samples of category 1 and c in the clean training data of the target domain, respectively. and They represent the average of the features calculated by the feature extractor f of the model for samples of categories 1 and c in the clean training data of the query domain to obtain the corresponding sample centers; S352, re-assigning pseudo labels to the noise training data QND and TND in the query domain and the target domain through the sample center matrices QFC and TFC in the target domain and obtaining the re-assigned label training data QRD and TRD in the query domain and the target domain; The assignment formula in step S36 is as follows: in and They represent the first and last noisy label training samples in the query domain, respectively, where s is the number of noisy training samples in the query domain, and softmax represents the operation of converting distribution into probability. and represents the query domain feature vector calculated by the feature extractor of the model, represents the operation of vector and matrix multiplication; and They represent the first and last noisy label training samples in the target domain, respectively, where p is the number of noisy training samples in the query domain, and Represents the target domain feature vector computed by the model's feature extractor.
6. The method for robust cross-domain image retrieval based on deep neural network according to claim 1, characterized in that: The step S37 comprises the following sub-steps: S371, input the obtained clean features and the re-labeled features QCF, TCF matrix into the classifier of the model to obtain the classification results QCC, TCC, QRC and TRC matrices, and use the feature centers of the query and target domains to weight the re-labeled training samples to obtain weights WQ and WT; The formula for calculating the classification result and the weight in step S371 is as follows: QCC=g(QCF) TCC=g(TCF) Among them, g is the classifier of the model, d represents the dimension of the feature vector, and y Q Represents the re-assigned label of the query domain, ce Q represents the cross entropy value calculated by the re-assigned labels and model predictions in the query domain, y T represents the re-assigned label of the target domain, ce T It represents the cross entropy value calculated by the re-assigned labels and model predictions in the target domain, and a is a pre-set hyperparameter; S372. Use the calculated weights to multiply the re-assigned features QRF and TRF of the query domain and the target domain to obtain WQRF and WTRF matrices.
7. The method for robust cross-domain image retrieval based on deep neural network according to claim 1, characterized in that: The step S39 includes the following sub-steps: S391. Calculate the clean loss L based on the clean data classification matrices QCC and TCC of the query and target domains and the clean labels clean , the reassignment loss L is calculated based on the reassigned feature classification matrices QRC and TRC of the query and target domains and the corresponding weights QW and TW relabel , calculate the domain difference loss L based on the feature library of the query and target domains domain ; The calculation formulas for the clean loss, reassignment loss and domain difference loss in step S391 are as follows: Where m and n represent the number of clean samples in the query domain and the target domain, respectively. and denote the labels of clean samples in the query domain and the target domain, p and q denote the number of re-labeled samples in the query domain and the target domain, respectively, c denotes the total number of categories, and denotes the jth element of the i-th sample label reassigned to the query and target domains, respectively, It means calculating the absolute value difference between the center of the feature of category i in the query and target domain; S392, use Adam optimizer to train clean loss L clean and the reassignment loss L relabel And the domain difference loss L domain , complete the training of the deep model and obtain the trained model M1 = {f1, g1}.
