Method for adaptive image retrieval based on distribution difference of space-frequency interaction

By introducing distribution migration and frequency component extraction modules into the deep hash network, the problem that existing methods cannot fully utilize image distribution and frequency differences is solved, improving the accuracy and efficiency of image retrieval, especially in terms of performance on single-label and multi-label datasets.

CN117370594BActive Publication Date: 2026-03-27HEBEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-31
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing deep learning-based image retrieval methods exhibit bias when utilizing intra- and inter-class relationships between images, failing to fully decouple category information. Furthermore, they cannot effectively leverage distributional differences generated by data augmentation when quantizing encoding differences, resulting in limited retrieval performance.

Method used

An adaptive image retrieval method based on spatial-frequency interaction based on distribution differences is adopted. By constructing a deep hash network and combining student and teacher models for self-distillation difference quantization loss, a distribution transfer module and a frequency component extraction module are introduced. By utilizing the distribution center and frequency component information of the image, the difference between the encodings is quantified, and the training loss function is optimized to improve retrieval performance.

Benefits of technology

It significantly improves the accuracy and efficiency of image retrieval, especially showing better adaptability and performance on single-label and multi-label datasets. It makes full use of the distribution and frequency difference information generated by data augmentation to generate more differentiated high-level semantic information encoding.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117370594B_ABST
    Figure CN117370594B_ABST
Patent Text Reader

Abstract

The application is a kind of distribution difference adaptive image retrieval method based on space-frequency interaction, first, the original image for training is obtained, and strong and weak transformed images are obtained through data enhancement;Next, a deep hash network is constructed;The strong and weak transformed images are input into the student model and the teacher model respectively to obtain hash quantization coding, and then self-distillation difference quantization loss, hash agent loss and binary cross entropy loss are obtained;Then, a distribution migration module is constructed, and the distribution center and dispersion degree of the hash quantization coding extracted by the student model are used to migrate the hash quantization coding extracted by the teacher model to obtain the distribution migration loss;A frequency component extraction module is constructed, the frequency domain information of the hash quantization coding is extracted through fast Fourier transform, and the frequency component of the hash quantization coding is extracted through arctangent transform, and then the frequency component loss is obtained;Finally, based on all the losses, a target optimization function is constructed, the student model and the teacher model are trained, and the trained student model or teacher model is used for image retrieval. Through fully quantizing the difference information between hash codes, the retrieval performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application belongs to the field of image retrieval in information retrieval, and particularly relates to a distribution difference adaptive image retrieval method based on space-frequency interaction. BACKGROUND

[0002] Image retrieval is a technology that finds and retrieves matching images through a query image, and the main purpose is to match the most relevant images in semantics with the query image from a large image database. Image retrieval has wide application value and plays a key role in many fields, including image search engines, medical image analysis, security monitoring, etc., which can help people more easily access and manage image data, thereby improving work efficiency and user experience and shortening the decision-making process. With the gradual increase in the size of the database, more manpower and time resources are consumed to search for images in the database. By representing the images in the database and the query image through semantic features, the query image search problem in the database is converted into a similarity judgment problem between semantic features, which can greatly improve the retrieval efficiency.

[0003] Hash algorithms have significant advantages in speed and storage, and are widely used in large-scale image retrieval. Hash algorithms are divided into traditional hash and deep hash algorithms. Early hash algorithms are mostly traditional hash algorithms, which are based on image features, extract image features through manually designed convolution kernels, and determine the matching images in the database through the similarity between the features, which are used as retrieval results. Compared with the early retrieval method relying on manual input of metadata and labels, the traditional hash algorithm is easier to implement, but is limited by the manually designed convolution kernel and the depth of the model, and the generated hash code only contains a small amount of semantic information. With the development of deep learning technology, great progress has been made in the field of image retrieval. With the help of the more powerful representation learning ability of deep neural networks, image retrieval algorithms based on deep learning can obtain feature encoding containing more high-level semantic information, and then in order to achieve faster retrieval, the features extracted by the deep neural network are compressed into Hamming space, and the similarity calculation between discrete feature codes is converted into Hamming distance calculation of binary hash codes.

[0004] The distance quantization between the hash codes currently includes two types of tuple loss and center coding loss, the tuple loss includes value loss and triplet loss. A pair of images is taken as a group, the extracted image features are converted into codes, and the distance between the codes is taken as the loss. Since the relationship between two samples only has two types of similarity and dissimilarity, although the value loss can make similar images close and dissimilar images far away, the difference in magnitude between the two will also cause the imbalance problem of positive and negative samples, and the intra-class and inter-class relationships cannot be obtained, in addition, there is a huge time overhead for calculating the code distance between any group of images. Although the triplet loss can alleviate the imbalance problem of positive and negative samples to a certain extent, due to the number of intra-class and inter-class samples, the model obtained by training has a certain bias, and the inter-class relationship cannot be obtained. The class center loss constructs the class center in advance according to the definition or through clustering, and converts the code loss between the image pair into the distance between the image code and the class center code. Compared with the tuple loss, the class center loss does not need to calculate the distance between all samples two by two, which greatly reduces the training time, and due to the relationship between the class centers, the learned code also has a certain class relationship.

[0005] The existing deep learning-based image retrieval method pays more attention to how to better quantify the difference between image codes, but how to more fully utilize the intra-class and inter-class relationships between images for coding so that the code can more fully decouple the class information, and the distribution difference between the classes is also important for improving the performance of image retrieval. SUMMARY

[0006] In view of the deficiencies of the prior art, the technical problem to be solved by the present application is to provide a distribution difference adaptive image retrieval method based on space-frequency interaction.

[0007] The technical problem solved by the present application adopts the following technical solution:

[0008] A distribution difference adaptive image retrieval method based on space-frequency interaction, characterized in that the method comprises the following steps:

[0009] Step 1: Obtain the original image for training, perform data enhancement on the original image to obtain strong transformed images and weak transformed images;

[0010] Step 2: Construct a deep hash network; input the strong and weak transformed images into the student model and the teacher model of the deep hash network respectively to obtain the hash quantization code extracted by the student model and the hash quantization code extracted by the teacher model; obtain the self-distillation difference quantization loss L Sdh , hash proxy loss L HP and binary cross-entropy loss L bce-Q based on the hash quantization codes extracted by the student model and the teacher.

[0011] L Sdh = 1 - cos(H T , H S ) (1)

[0012] L HP = H(y, Softmax(P T / T)) (4)

[0013]

[0014]

[0015]

[0016] In the formula, H T , H S represent the hash quantization codes extracted by the teacher model and the student model, P T is the agent sample, T represents the temperature scale hyperparameter, H(·) represents the quantization error between the real class label and the predicted class label of the image, y represents the real class label sequence of the image, represents that the value of the hash code is 1, represents the maximum likelihood value of the kth hash code, H k represents the kth bit of the hash quantization code H T , and K represents the code length.

[0017] The third step is to construct a distribution migration module. The distribution migration module migrates the hash quantization code extracted by the teacher model by using the distribution center and the dispersion degree of the hash quantization code extracted by the student model, to obtain a distribution migrated hash quantization code. The distribution migration loss is obtained by quantizing the difference between the distribution migrated hash quantization code and the hash quantization code extracted by the teacher model. The distribution migration loss L DIT is represented as:

[0018] L DIT = 1 - cos(H T , H T_S ) (12)

[0019] In the formula, H T_S is the hash quantization code after the range constraint and the distribution migration.

[0020] The fourth step is to construct a frequency component extraction module. The frequency component extraction module extracts the frequency domain information of the hash quantization code through fast Fourier transform, and then extracts the frequency component of the hash quantization code through arctangent transform.

[0021]

[0022] wherein x represents a hash quantization encoding input of a fast Fourier transform, F(x)(u,v) is information of the hash quantization encoding at a frequency domain coordinate (u,v), (h,w) represents a space domain coordinate of the hash quantization encoding, x(h,w) represents a value of the hash quantization encoding at a space domain coordinate (h,w), and H and W represent a length and a width of the hash quantization encoding;

[0023]

[0024] wherein PH represents a frequency component of the hash quantization encoding, R(x')(u,v) is a real part of the hash quantization encoding at a frequency domain coordinate (u,v), and I(x')(u,v) is an imaginary part of the hash quantization encoding at the frequency domain coordinate (u,v);

[0025] a frequency component loss L ph is represented as:

[0026] L ph =1-cos(PH T ,PH S ) (15)

[0027] wherein PH T represents a frequency component of the hash quantization encoding H T , and PH S is a frequency component of the hash quantization encoding H S ;

[0028] a fifth step of constructing a target optimization function, training the student model and the teacher model, and measuring a training loss through the target optimization function; the target optimization function is:

[0029]

[0030] wherein N B is a total number of samples, and λ1, λ2, λ3 and λ4 are all weights;

[0031] inputting the image to be queried into the student model or the teacher model after training, and outputting a retrieval image.

[0032] Compared with the prior art, the application has the following advantages and beneficial effects:

[0033] 1. The current image retrieval method based on the self-distillation model transforms the image through data enhancement, changes the distribution of the image, and guides the generation of hash coding by quantizing the hash coding difference between the image pairs. However, when the distribution difference between two images is too large, directly quantizing the hash coding between the two images will cause the difference information generated by data enhancement to be unable to be fully utilized. The difference information cannot be fully quantized, which will affect the retrieval performance and reduce the accuracy of retrieval. Therefore, a distribution migration module is designed. The distribution migration module migrates the hash quantization coding extracted by the student model to the hash quantization coding extracted by the teacher model by using the distribution center and dispersion degree of the hash quantization coding extracted by the student model, to obtain the hash quantization coding after distribution migration. The similarity between the hash quantization coding after distribution migration and the hash quantization coding extracted by the student model is calculated to assist in quantizing the difference between the hash quantization coding extracted by the teacher model and the hash quantization coding extracted by the student model, so that the distribution difference information generated by data enhancement can be more fully utilized, and the retrieval performance is improved.

[0034] 2. The information transformation of the image often has more manifestations in the frequency domain space. The current deep hash network only considers the coding quantization in the spatial domain when performing image coding quantization, and does not consider the relative transformation of the image itself. Therefore, the frequency component extraction module is designed to analyze the frequency component of the hash quantization coding. The relative change generated by the image transformation is captured, so that the generated image coding can contain more obvious high-level semantic information. The frequency component extraction module first converts the image coding in the spatial domain into a frequency domain form through fast Fourier transform, and then performs phase analysis through arctangent transform. The relative change in the frequency domain is captured by quantizing the phase difference between the quantization codings, so that the difference information generated by data enhancement can be more fully quantized.

[0035] 3. The present application has carried out experiments on the single-label dataset ImageNet and the multi-label datasets MS COCO, NUS-WIDE and NUS-WIDE_M. The experimental results show that, compared with the current popular image retrieval model DHD, the performance of the present application is improved in the case of coding length 32, 48 and 64 on the single-label dataset with simpler distribution, and the result is comparable in the case of coding length 16. For the multi-label dataset, the performance is improved to different degrees in the case of different coding lengths. The results show that the present application has better adaptability and performance in solving the relative change generated by the self-distillation data enhancement form, and achieves better retrieval effect. BRIEF DESCRIPTION OF DRAWINGS

[0036] Fig. 1 It is a structural schematic diagram of the deep hash network of the present application in the training stage.

[0037] Fig. 2 It is a principle diagram of the distribution migration module of the present application.

[0038] Fig. 3 This is a schematic diagram of the frequency component extraction module of the present invention. Detailed Implementation

[0039] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific implementation methods, but this is not intended to limit the scope of protection of this application.

[0040] This invention relates to an adaptive image retrieval method based on spatial-frequency interaction and distribution differences (hereinafter referred to as the method, see [link]). Figs. 1-3 The process includes the following steps:

[0041] Step 1: Obtain the original images; several original images form a dataset.

[0042] This embodiment selects four datasets: MS COCO, ImageNet, NUS-WIDE, and NUS-WIDE_M. The ImageNet dataset is a single-label dataset, while the other three are multi-label datasets. Each image is processed to 256*256 pixels. Each dataset is divided into a database, a training set, and a test set. The ImageNet dataset contains 100 categories, with the database, training set, and test set containing 128,503, 13,000, and 5,000 images, respectively. The NUS-WIDE and NUS-WIDE-M datasets each contain 21 categories, with the database, training set, and test set containing 149,736, 10,500, and 2,100 images, respectively. The MS COCO dataset contains 80 categories, with the database, training set, and test set containing 117,218, 10,000, and 5,000 images, respectively.

[0043] Data augmentation is performed on the original image through operations such as random cropping, horizontal flipping, Gaussian blurring, and brightness, contrast, and saturation transformations. The strength of the overall data augmentation is represented in terms of probability, resulting in strongly transformed and weakly transformed images. In practical applications, the image to be queried may be transformed, and data augmentation can also simulate the image transformation in the actual application process.

[0044] Step 2: Construct a deep hash network;

[0045] Deep-Hash-Distillation (DHD) takes a twin network as a basic framework, including a student model and a teacher model, parameter sharing between the student model and the teacher model, the student model and the teacher model both including a feature extraction network and an encoding generation network two parts, the feature extraction network usually adopts ResNet50 or AlexNet network, the features extracted by the feature extraction network are input into the encoding generation network, and the encoding generation network generates hash quantization encoding; the encoding generation network includes a full connection layer, a layer normalization layer and a tanh activation function, the value of the hash quantization encoding obtained by the layer normalization layer is constrained to the range of [-1, 1] through the tanh activation function; the strong and weak transformed images are respectively input into the student model and the teacher model to extract respective hash quantization encodings, for the distillation model, fixing a single branch can effectively improve the performance of the model, and the distribution difference information between the two is quantized to assist the generation of the encoding, the DHD network realizes the self-distillation difference quantization loss between the student model and the teacher model through the distribution difference between the strong and weak transformed images, and the calculation is carried out through cosine similarity, and the formula is as follows:

[0046] L Sdh =1-cos(H T ,H S ) (1)

[0047] H T =tanh(h T ) (2)

[0048] H S =tanh(h S ) (3)

[0049] In the formula, L Sdh is the self-distillation difference quantization loss between the student model and the teacher model, h T and h S represent the hash quantization encoding output by the layer normalization layer of the teacher model and the student model, H T and H S represent the hash quantization encoding extracted by the teacher model and the student model, and tanh(·) represents the tanh activation function.

[0050] In the encoding difference quantization stage, the hash quantization encoding H T is compared with the proxy sample P T for similarity judgment, and the proxy sample P T represents an image sample center, and the calculation formula of the hash proxy loss is as follows:

[0051] L HP =H(y,Softmax(P T / T)) (4)

[0052] where T is a temperature scale hyper-parameter, H(·) represents the quantization error between the true class label and the predicted class label of the image, the predicted class label is obtained by a Softmax function, and y represents the true class label sequence of the image;

[0053] The deep hashing algorithm reduces the quantization error by minimizing the distance between the hash code and the binary target through regression. Since the hash quantization code quantizes each bit of the code separately, the code quantization is regarded as binary classification, and the encoding result of each bit is predicted by the Gaussian distribution estimator g(h). The formula is as follows:

[0054]

[0055] where m and σ are the mean and standard deviation of the Gaussian distribution estimator g(h), the value of m is +1 or -1, m takes +1 when , and m takes -1 when ;

[0056] Therefore, the calculation formula of the binary cross entropy (BCE) loss is as follows:

[0057]

[0058]

[0059]

[0060] wherein, represents that the value of the hash code is 1, represents the maximum likelihood estimation value of the kth hash code, H k represents the kth bit of the hash quantization code H T , and K represents the code length.

[0061] Thirdly, a distribution migration module is constructed to quantify the distribution migration loss. The distribution migration module migrates the hash quantization code extracted by the teacher model using the distribution center and dispersion degree of the hash quantization code extracted by the student model, obtains the hash quantization code after distribution migration, and obtains the distribution migration loss by quantifying the difference between the hash quantization code after distribution migration and the hash quantization code extracted by the teacher model.

[0062] The existing deep hashing network only considers the transformation difference generated by data enhancement of the image, quantifies the difference between the transformed images through a teacher model and a student model, and only quantifies the difference information between the hash quantization codes of the teacher model and the student model to assist the deep hashing network in generating hash quantization codes of the image. However, when there is a large difference in the distribution between strong and weak transformed images, the hash quantization codes obtained by directly quantifying the strong and weak transformed images cannot fully utilize the distribution difference information between the strong and weak transformed images, and therefore, how to fully utilize the distribution difference between the strong and weak transformed images caused by data enhancement and fully utilize the intra-class and inter-class relationships between the images is crucial for the network to construct hash codes with more image difference information to improve the image retrieval performance. Therefore, in the quantization code generation stage, the distribution migration module (Distribution Information Transformation Block) is used to guide the hash quantization codes generated by the teacher model by the distribution information of the hash quantization codes extracted by the student model, to migrate the hash quantization codes extracted by the teacher model, to obtain the hash quantization codes after distribution migration, to assist the difference between the hash quantization codes extracted by the student model and the hash quantization codes of the teacher model by the distribution difference between the quantized hash quantization codes after distribution migration and the hash quantization codes extracted by the teacher model, so that the distribution difference information caused by data enhancement transformation is more fully utilized, and the DIT-Block module pays more attention to the distribution difference caused by data enhancement.

[0063] The input of the DIT-Block module includes the hash quantization codes extracted by the teacher model and the student model. Since the range of the hash quantization codes is constrained by the tanh activation function, the hash quantization codes after range constraint have certain information loss, and therefore, the hash quantization codes h T and h S are taken as the input of the DIT-Block module; assuming that the mean and variance of the hash quantization codes represent the distribution center and dispersion degree of the codes, first, the mean and variance of the hash quantization codes h T and h S are calculated, the distribution center and dispersion degree of the hash quantization codes h S are used to guide the migration of the hash quantization codes h T , to obtain the hash quantization codes after distribution migration, and the hash quantization codes after distribution migration are taken as the constraint guiding item of the distribution difference between the hash quantization codes extracted by the teacher model and the hash quantization codes extracted by the student model.

[0064]

[0065]

[0066]

[0067] In the formula, h T_S represents the hash quantization coding after distribution migration, μ(.) represents the mean of the hash quantization coding, that is, the distribution center; σ(.) represents the variance of the hash quantization coding, that is, the dispersion degree; x hw represents the value of the hash quantization coding at the coordinates (h, w), H and W represent the length and width of the hash quantization coding, and ∈ is a bias value.

[0068] The distribution migration of the hash quantization coding h T is realized through the DIT-block module, and the hash quantization coding h T_S after distribution migration is obtained. T_S The range constraint is performed on the hash quantization coding h T_S after distribution migration through the tanh activation function, and the hash quantization coding H T_S is obtained. T_S The difference between the hash quantization coding H T_S and H T is quantized, that is, the distribution migration loss, which is judged through the cosine similarity, and the formula is as follows:

[0069] L DIT = 1-cos(H T , H T_S ) (12)

[0070] Fourth step: constructing a frequency component extraction module for quantifying the frequency component loss.

[0071] Data augmentation causes a certain transformation of the image. The current image retrieval network usually only considers the spatial information difference between the encodings when performing encoding quantization, without considering the frequency domain information of the encoding, which leads to the inability to fully utilize the relative change information caused by image transformation to obtain the relative difference changes between the image pairs. Therefore, the frequency component extraction module (Frequency Component Extraction Block) is used to extract the frequency domain information of the encoding, and the frequency domain information difference between the hash quantization coding H T extracted by the teacher model and the hash quantization coding H S extracted by the student model is focused on to obtain the influence of the relative transformation relationship of the data augmentation on the hash coding process, thereby improving the retrieval accuracy.

[0072] The FCE-Block module extracts the frequency domain information of the hash quantization coding through the fast Fourier transform, and converts the spatial domain image coding representation into a frequency domain space representation through the fast Fourier transform.

[0073]

[0074] Where x represents the hash quantization code of the Fast Fourier Transform input, F(x)(u, v) is the information of the hash quantization code at the frequency domain coordinates (u, v), (h, w) represents the spatial domain coordinates of the hash quantization code, and x(h, w) represents the value of the hash quantization code at the spatial domain coordinates (h, w). The frequency domain coordinates represent the hash quantization encoding;

[0075] The original representation is transformed from the spatial domain to the frequency domain by using Fast Fourier Transform, and then phase analysis is performed by Arctangent Transform to extract the frequency components.

[0076]

[0077] Where PH represents the frequency component of the hash quantization code, R(x′)(u,v) is the real part of the hash quantization code x at the frequency domain coordinates (u,v), and I(x′)(u,v) is the imaginary part of the hash quantization code x at the frequency domain coordinates (u,v).

[0078] Hash Quantization Encoding H T and H S After passing through the frequency component extraction module, the frequency component pH is obtained. T and PH S By using cosine similarity to quantize the similarity between frequency components, this study focuses on the frequency domain information differences between the hash quantization codes extracted by the teacher model and those extracted by the student model, thus making fuller use of the relative transformation relationship produced by data augmentation transformation on the image. The formula for calculating the frequency component loss is as follows:

[0079] L ph =1-cos(PH) T PH S (15)

[0080] Among them, L ph For frequency component loss, the closer the loss value is to 1, the more similar or correlated the two frequency components are.

[0081] Step 5: Construct the objective optimization function;

[0082] Joint hash proxy loss L HP Self-distillation difference quantification loss L Sdh Binary cross-entropy loss L bce-Q Distributed migration loss L DIT and frequency component loss L ph The objective optimization function is obtained as follows:

[0083]

[0084] Where, N Bis the total number of samples, and λ1, λ2, λ3 and λ4 are weights; in the embodiment, λ1 and λ2 are 0.1, λ3 is 1 when the feature extraction network adopts ResNet50, and λ3 is 0.7 when the feature extraction network adopts AlexNet network; when the frequency domain difference of the images in the data set is small, for different code lengths, the balance between the frequency domain quantization and the spatial domain quantization is achieved by adjusting λ4, so that the retrieval effect is optimal;

[0085] The deep hashing network is trained using the data set, mini-batch samples are used for training, and the sample x i represents an input image, represents a label corresponding to the input image; the original image of the data set is subjected to data enhancement to obtain a strong transformed image and a weak transformed image, the strong and weak transformed images are respectively input into the student model and the teacher model, the training loss is measured through a target optimization function until the loss converges, and the trained student model and the teacher model are obtained;

[0086] The image to be queried is input into the trained student model or the teacher model, and the retrieved image is output, so that the image retrieval is completed.

[0087] The unmentioned part of the application is applicable to the prior art.

Claims

1. A distribution difference adaptive image retrieval method based on space-frequency interaction, characterized in that, The method includes the following steps: Step 1: Obtain the original images for training, perform data augmentation on the original images to obtain strongly transformed images and weakly transformed images; Step 2: Construct a deep hashing network; input the strong and weak transformed images into the student model and teacher model of the deep hashing network, respectively, to obtain the hash quantization codes extracted by the student model and the teacher model; based on the hash quantization codes extracted by the student model and the teacher model, obtain the self-distillation differential quantization loss L. Sdh Hash proxy loss L HP and binary cross-entropy loss L bce-Q ; L sdh =1-cos(H T ,H S ) (1) L HP =H(y,Softmax(P T / T)) (4) In the formula, H T H S P represents the hash quantization code extracted from the teacher model and student model. T As a surrogate sample, T represents the temperature scaling hyperparameter, H(·) represents the quantization error between the true and predicted class labels of the image, and y represents the sequence of true class labels of the image. This indicates that the hash code value is 1. H represents the maximum likelihood estimate of the k-th hash code. k H represents the hash quantization encoding H T The k-th bit, where K represents the encoding length; The third step involves constructing a distributed transfer module. This module utilizes the distribution center and dispersion of the hash quantization codes extracted by the student model to transfer the hash quantization codes extracted by the teacher model, resulting in distributed-transferred hash quantization codes. The distributed transfer loss is obtained by quantizing the difference between the distributed-transferred hash quantization codes and the hash quantization codes extracted by the teacher model. The distributed transfer loss L... DIT Represented as: L DIT =1-cos(H T ,H T_S ) (12) In the formula, H T_S This is a hash-quantized encoding after distribution migration with range constraints; Step 4: Construct a frequency component extraction module. The frequency component extraction module extracts the frequency domain information of the hash quantization code through fast Fourier transform, and then extracts the frequency components of the hash quantization code through arctangent transform. Where x represents the hash quantization code of the Fast Fourier Transform input, F(x)(u,v) is the information of the hash quantization code at the frequency domain coordinate (u,v), (h,w) represents the spatial domain coordinate of the hash quantization code, x(h,w) represents the value of the hash quantization code at the spatial domain coordinate (h,w), and H and W represent the length and width of the hash quantization code. Where PH represents the frequency component of the hash quantization code, R(x′)(u,v) is the real part of the hash quantization code at the frequency domain coordinate (u,v), and I(x′)(u,v) is the imaginary part of the hash quantization code at the frequency domain coordinate (u,v); Frequency component loss L ph Represented as: l ph =1-cos(PH T ,PH S ) (15) Among them, PH T H represents the hash quantization encoding H T Frequency components, pH S H is encoded for hash quantization S Frequency components; Step 5: Construct the objective optimization function, train the student and teacher models, and measure the training loss using the objective optimization function; the objective optimization function is: Where, N B Let λ1, λ2, λ3, and λ4 be the total number of samples, and λ4 be the weights. Input the image to be queried into the trained student model or teacher model, and output the retrieved image.

2. The distribution difference adaptive image retrieval method based on space-frequency interaction according to claim 1, characterized in that, In the third step, hash quantization encoding H T_S Hash quantization encoding h after distribution migration T_S The hash quantization code h obtained after distribution migration is obtained through the tanh activation function. T_S Represented as: Where μ(.) represents the mean of the hash quantization code, characterizing the distribution center of the hash quantization code; σ(.) represents the variance of the hash quantization code, characterizing the dispersion of the hash quantization code; h T This is a hash quantization encoding of the output of the layer normalization layer in the teacher model.

3. The distribution difference adaptive image retrieval method based on space-frequency interaction according to claim 1 or 2, characterized in that, Both the student model and the teacher model include a feature extraction network and an encoding generation network. The feature extraction network uses ResNet50 or AlexNet, and the encoding generation network includes fully connected layers, layer normalization layers, and tanh activation functions.

4. The distribution difference adaptive image retrieval method based on space-frequency interaction according to claim 3, characterized in that, In the first step, data augmentation includes random cropping, horizontal flipping, Gaussian blurring, and brightness, contrast, and saturation transformations.

Citation Information

Patent Citations

  • Image steganalysis method based on twin network contrast learning

    CN116543225A

  • Application of visual language knowledge distillation in cross-modal hash retrieval

    CN116594994A