An image retrieval method based on specific label guided hashing learning

The hash learning method guided by specific tags solves the problem in the existing technology that the predefined similarity matrix cannot accurately describe the similarity of images, and achieves more accurate hash function learning and image retrieval performance improvement, which is especially suitable for multiple applications. Labeled and zero-shot datasets.

CN118312637BActive Publication Date: 2024-08-23LUZHOU VOCATIONAL & TECHN COLLEGE
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410734337.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-08-23
Estimated Expiration
2044-06-07

AI Technical Summary

Technical Problem

Existing hash learning methods using predefined similarity matrices cannot accurately describe the true similarity of images, resulting in inaccurate hash functions and affecting image retrieval performance, especially poor performance on multi-label data sets and zero-sample data sets.

Method used

Adopt a hash learning method based on specific label guidance, perform data preprocessing through kernel techniques, establish a specific label guidance hash learning model, iteratively solve the hash learning model, obtain the hash code of the training data, and use the learned Hash code computes a hash function and is used for image retrieval.

Benefits of technology

It achieves adaptive learning of a similarity matrix that is more in line with the real similarity, improves the accuracy of hash learning and image retrieval performance, especially on multi-label and zero-sample data sets, and maintains the consistency of feature and label spaces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118312637B
    Figure CN118312637B
Patent Text Reader

Abstract

The present invention discloses an image retrieval method based on specific label-guided hash learning, comprising the following steps: inputting an image to be trained, extracting manual features, and performing data preprocessing using kernel techniques; establishing a specific label-guided hash learning model; iteratively solving the hash learning model to obtain a hash code of training data; calculating a hash function using the learned hash code; inputting an image to be tested, extracting manual features, and then using the learned hash function to calculate the hash code of test data; calculating the Hamming distance using an XOR operation, and obtaining a retrieval result by calculating similarity. The specific label of the present invention is conducive to obtaining a similarity matrix that is more consistent with the similarity of real images, is conducive to hash learning, utilizes the consistency of feature and label space when constructing a hash function, uses specific labels to construct the relationship between features and labels, and appropriately extracts correlation from the label space by maintaining the consistency of feature and label space.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image retrieval, and in particular, relates to an image retrieval method based on specific label-guided hash learning. Background Art

[0002] Hashing learning can map high-dimensional features (such as documents, images, videos) into low-dimensional binary codes for economical storage and efficient computation. Hashing methods preserve pairwise similarities in the learned binary Hamming space and have been shown to be very effective in many applications, especially large-scale image retrieval applications.

[0003] In hash learning methods, the similarity matrix is ​​a very important factor. For example, supervised hashing uses the similarity matrix as a kind of supervision information, while unsupervised hashing uses it as a pseudo-label to guide hash learning. In cross-modal hashing, the similarity matrix also plays an important role and is considered to be a bridge connecting different modalities.

[0004] However, in existing hashing methods, the similarity matrix is ​​often predefined and cannot be optimized during the hashing learning process; since the predefined similarity matrix is ​​usually generated by category labels, the similarity values ​​assigned to all the same categories in the similarity matrix are consistent, which cannot lead to the accurate capture of the true similarity relationship between the same category of image pairs. Similarly, even if some hashing methods use other forms of similarity matrices, as long as they are predefined similarity matrices, they will not completely match the true similarity relationship of images.

[0005] A similarity matrix that is more consistent with the true similarity is particularly important for multi-label datasets and zero-shot datasets. For example, in a multi-label dataset, when two images have only one category in common, the image pair is judged to be similar; in the predefined similarity matrix, the similarity values ​​judged to be similar are generally consistent, but this is obviously unreasonable. The similarity of images with multiple consistent labels should be more similar than that of images with only one consistent label. Similarly, in a zero-shot dataset, since the categories of the test set are different from those of the training set, the similarity relationship of the images is particularly important for learning hash functions. Using a predefined similarity matrix cannot accurately describe the true similarity of the image pair, resulting in a poor hash function and a decrease in retrieval performance. On multi-label datasets and zero-shot datasets, hash learning needs to obtain a specific label that is more consistent with the actual similarity relationship. Summary of the invention

[0006] In view of the shortcomings of the prior art, the present invention proposes an image retrieval method based on specific label-guided hash learning, which solves the problem that the existing hash learning method uses a predefined label / similarity matrix and cannot accurately describe the true similarity of the image, resulting in inaccurate learned hash function and causing a decrease in image retrieval performance.

[0007] In order to solve the above technical problems, the present invention is implemented in the following ways:

[0008] An image retrieval method based on specific label guided hash learning includes the following steps:

[0009] S1, input the image to be trained, extract manual features, and use kernel techniques to preprocess the data;

[0010] S2, establish a specific label guided hash learning model;

[0011] S3, iteratively solve the hash learning model to obtain the hash code of the training data;

[0012] S4, using the learned hash code to calculate the hash function;

[0013] S5, input the image to be tested, extract the manual features and use the learned hash function to calculate the hash code of the test data;

[0014] S6. Calculate the Hamming distance using the XOR operation and obtain the retrieval result by calculating the similarity.

[0015] Furthermore, the expression of the kernel trick preprocessing in step S1 is as follows:

[0016]

[0017] in, Indicates The characteristics of the secondary image, Expressed as Sub-image features The kernelized feature data, Indicates randomly selected k Anchor points, Represents the core bandwidth.

[0018] Furthermore, the expression of the specific label-guided hash learning model in step S2 is as follows:

[0019]

[0020] in, B represents the hash code of the training data, V represents a real value, Y represents the label matrix, P、R represents the projection matrix, S represents the similarity matrix, represents the hash code length, L represents the graph Laplacian matrix, n represents the number of samples, represents the identity matrix, st represents the constraints, α、β and c Represents a hyperparameter.

[0021] Furthermore, in step S3, all variables B, R, V, and P in the hash learning model are solved iteratively. The specific steps are as follows:

[0022] S31. Fix other variables, remove irrelevant variables, and set them to 0 after differentiation. The expression of P is as follows:

[0023]

[0024] S32. Fix other variables, remove irrelevant variables, and obtain the R expression by optimizing the function as follows:

[0025]

[0026] S33. Fix other variables, remove irrelevant variables, and obtain the expression of B by optimizing the function as follows:

[0027]

[0028] Among them, sign() represents a binary discrete function;

[0029] S34. Fix other variables, remove irrelevant variables, and maximize the trace to obtain the expression of V as follows:

[0030]

[0031] S35, return to S31, iteratively solve each variable until it satisfies Or the maximum number of iterations is reached, where e represents the threshold value, t Indicates t Iterations.

[0032] Furthermore, in step S4, the hash function is obtained by using the hash code, and its specific expression is as follows:

[0033]

[0034] Where W represents the hash function, X represents the kernelized features of the training data, represents the identity matrix, l represents the equilibrium parameter.

[0035] Furthermore, the specific process of step S5 is as follows:

[0036] Input the image to be tested, extract the manual features, use the kernel technique preprocessing in step S1 to obtain the kernel feature T of the test data, and then use the hash function in step S4 to obtain the hash code H of the test data. The specific expression is as follows:

[0037]

[0038] Furthermore, the step S6 obtains the Hamming distance by performing an XOR operation on the hash code B of the training data and the hash code H of the test data, obtains the similarity between each training sample and the test sample, and outputs a sorted retrieval image according to the similarity information.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] The specific labels proposed in the present invention can be learned adaptively, that is, different similarity values ​​are obtained according to the similarity between samples. The specific labels are conducive to obtaining a similarity matrix that is more consistent with the real image similarity, which is conducive to hash learning, especially in multi-label settings and zero-sample settings; when constructing the hash function, the consistency of the feature and label space is utilized, and the specific labels are used to construct the relationship between the features and labels. By maintaining the consistency of the feature and label space, the correlation is appropriately extracted from the label space.

[0041] In the supervised hash learning process, feature-specific extraction is performed on the label matrix to make the similarity matrix consistent with the actual image similarity relationship and satisfy the characteristics of the hash code. The consistency of the feature space and the label space is maintained through the specific label matrix, which helps to maintain similarity. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1 Schematic diagram of the process of the image retrieval method of the present invention. DETAILED DESCRIPTION

[0043] The specific implementation of the present invention is further described in detail below with reference to the accompanying drawings and specific examples.

[0044] like Figure 1 As shown, an image retrieval method based on specific label guided hash learning includes the following steps:

[0045] S1. Input the image to be trained, extract manual features, and use kernel techniques to preprocess the data. The expression of kernel technique preprocessing in step S1 is as follows:

[0046]

[0047] in, Indicates The characteristics of the secondary image, Expressed as Sub-image features After kernelization, for the convenience of representation, all images are The nucleation feature of the composition is denoted as X, Indicates randomly selected k Anchor points, Represents the core bandwidth.

[0048] S2. Establish a specific label-guided hash learning model. The specific label-guided hash learning model is expressed as follows:

[0049]

[0050] in, B represents the hash code of the training data, V represents a real value, Y represents the label matrix, P、R represents the projection matrix, S represents the similarity matrix, n represents the number of samples, represents the hash code length, L represents the graph Laplacian matrix, represents the identity matrix, st represents the constraints, α、β and c Represents a hyperparameter used to balance various items.

[0051] S3, iteratively solve the hash learning model to obtain the hash code of the training data, and iteratively solve all variables B, R, V, and P in the hash learning model. The specific steps are as follows:

[0052] S31. Fix other variables, remove irrelevant variables, and set them to 0 after differentiation. The expression of P is as follows:

[0053]

[0054] S32. Fix other variables, remove irrelevant variables, and obtain the R expression by optimizing the function as follows:

[0055]

[0056] S33. Fix other variables, remove irrelevant variables, and obtain the expression of B by optimizing the function as follows:

[0057]

[0058] Among them, sign() represents a binary discrete function;

[0059] S34. Fix other variables, remove irrelevant variables, and maximize the trace to obtain the expression of V as follows:

[0060]

[0061] S35, return to S31, iteratively solve each variable until it satisfies is the hash code of the training data of the t+1th iteration) or reaches the maximum number of iterations (generally set to 10 times), where e Indicates the threshold value.

[0062] S4. Calculate the hash function using the learned hash code, and obtain the hash function through the hash code. The specific expression is as follows:

[0063]

[0064] Where W represents the hash function, X represents the kernelized features of the training data, represents the identity matrix, l represents the equilibrium parameter.

[0065] S5. Input the image to be tested, extract the manual features, and use the learned hash function to calculate the hash code of the test data. The specific process is as follows:

[0066] Input the image to be tested, extract the manual features, use the kernel technique preprocessing in step S1 to obtain the kernel feature T of the test data, and then use the hash function in step S4 to obtain the hash code H of the test data. The specific expression is as follows:

[0067]

[0068] S6. Calculate the Hamming distance using the XOR operation and obtain the search results by calculating the similarity. The specific process is as follows:

[0069] The Hamming distance is obtained by performing an XOR operation on the hash code B of the training data and the hash code H of the test data, and the similarity between each training sample and the test sample is obtained. The sorted retrieval image is output according to the similarity information.

[0070] The above description is only an implementation mode of the present invention. It is stated again that for ordinary technicians in this technical field, several improvements can be made to the present invention without departing from the principle of the present invention. These improvements are also included in the protection scope of the claims of the present invention.

Claims

1. An image retrieval method based on specific label guided hash learning, characterized by: The following steps are involved: S1, input the image to be trained, extract manual features, and use kernel techniques to preprocess the data; S2, establish a specific label guided hash learning model; S3, iteratively solve the hash learning model to obtain the hash code of the training data; S4, using the learned hash code to calculate the hash function; S5, input the image to be tested, extract the manual features and use the learned hash function to calculate the hash code of the test data; S6, using XOR operation to calculate the Hamming distance, and obtaining the search results by calculating the similarity; The expression of the specific label guided hash learning model in step S2 is as follows: Among them, B represents the hash code of the training data, V represents the real value, Y represents the label matrix, P and R represent the projection matrix, S represents the similarity matrix, l represents the hash code length, L represents the graph Laplacian matrix, n represents the number of samples, I represents the identity matrix, st represents the constraints, and α, β and γ represent hyperparameters.

2. The image retrieval method based on specific label guided hash learning according to claim 1, characterized in that: The expression of the kernel trick preprocessing in step S1 is as follows: Among them, i represents the characteristics of the i-th image, φ(υ i ) is represented as the i-th image feature υ i The kernelized feature data, a1, a2, ..., a k represents k randomly selected anchor points, and σ represents the kernel bandwidth.

3. The image retrieval method based on specific label guided hash learning according to claim 1, characterized in that: In step S3, all variables B, R, V, and P in the hash learning model are solved iteratively. The specific steps are as follows: S31. Fix other variables, remove irrelevant variables, and set them to 0 after differentiation. The expression of P is as follows: S32. Fix other variables, remove irrelevant variables, and obtain the R expression by optimizing the function as follows: S33. Fix other variables, remove irrelevant variables, and obtain the expression of B by optimizing the function as follows: B=sign(βlVS+γV) Among them, sign() represents a binary discrete function; S34. Fix other variables, remove irrelevant variables, and maximize the trace to obtain the expression of V as follows: S35, return to S31, alternately iterate and solve each variable until it satisfies Or the maximum number of iterations is reached, where ε represents the threshold and t represents the tth iteration.

4. The image retrieval method based on specific label guided hash learning according to claim 1, characterized in that: In step S4, the hash function is obtained by using the hash code, and its specific expression is as follows: Among them, W represents the hash function, X represents the kernelized features of the training data, I represents the identity matrix, and λ represents the balance parameter.

5. The image retrieval method based on specific label guided hash learning according to claim 1, characterized in that: The specific process of step S5 is as follows: Input the image to be tested, extract the manual features, use the kernel technique preprocessing in step S1 to obtain the kernel feature T of the test data, and then use the hash function in step S4 to obtain the hash code H of the test data. The specific expression is as follows: H = sign (WT).

6. The image retrieval method based on specific label guided hash learning according to claim 1, characterized in that: The step S6 obtains the Hamming distance by performing an XOR operation on the hash code B of the training data and the hash code H of the test data, obtains the similarity between each training sample and the test sample, and outputs a sorted retrieval image according to the similarity information.

Citation Information

Patent Citations

  • Cross-modal hash retrieval method based on supervision graph embedding

    CN114357200A

  • Mountain fire image rapid identification method and system based on hierarchical Hash learning

    CN115830479A

  • Zero sample cross-modal retrieval method based on adaptive class correlation discrete hash

    CN116150411A

  • Method and apparatus for learning sequential binary code using features

    KR1020140077409A