Fast image retrieval method and system based on large model advanced semantic graph embedding
Through an advanced semantic graph embedding method based on the CLIP large-scale model, combined with a variety of neural networks, a hash code with rich semantics is generated, which solves the problem of insufficient semantic information mining in the existing technology and improves the accuracy and efficiency of image retrieval. .
Patent Information
- Application Number
- CN202410548591.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-06
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-05-06
AI Technical Summary
Existing deep supervised hash retrieval methods require a large amount of annotated data in image retrieval, and the features are not discriminative, resulting in poor retrieval performance and insufficient mining of semantic information.
Adopt an advanced semantic graph embedding method based on CLIP large-scale model, extract image features through ImgNet and LabNet networks, and combine visual-assisted graph convolutional networks and semantic-assisted graph convolutional networks to generate semantically rich hash codes, balancing local details and global semantics. information to improve the accuracy and efficiency of image retrieval.
The accuracy and efficiency of image retrieval are significantly improved, and the semantic information of image content can be more fully utilized to provide more accurate and relevant retrieval results.
Smart Images

Figure CN118467768B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image retrieval technology, and in particular to a fast image retrieval method and system based on large model advanced semantic graph embedding. Background Art
[0002] The statements in this section merely provide background information related to the present disclosure and do not necessarily constitute prior art.
[0003] With the development of the Internet and digital technology, the amount of image data has exploded. In this context, how to efficiently perform image retrieval has become increasingly important. Hashing, as a typical approximate nearest neighbor search (ANN), can achieve a balance between accuracy and efficiency and is a common solution for image retrieval. The hashing method maps high-dimensional data into low-dimensional compact hash codes, which can greatly reduce memory usage. In addition, the distance calculation on the binary hash code only requires the central processing unit (CPU) to perform an XOR operation, which greatly accelerates the search on large-scale data sets and improves retrieval performance. It is precisely because the hashing method can achieve good retrieval performance while maintaining high efficiency in time and space that this method has become increasingly well-known and widely used. At the same time, hash retrieval can be divided into supervised, unsupervised, and semi-supervised according to whether supervised information is used. Among them, the supervised image hash retrieval method uses the semantic information of the label to generate a more discriminative hash code, which can obtain better retrieval performance.
[0004] However, current deep supervised hash retrieval methods often require a large amount of annotated data to improve the amount of information obtained by the model in order to improve retrieval accuracy. In addition, most data relationships learned by deep hashing methods are only captured from a local perspective, resulting in the learned features being not very discriminative. At the same time, current hashing methods are still not sufficient for mining semantic information, resulting in poor retrieval performance. Summary of the invention
[0005] In view of the above defects, this paper proposes a fast image retrieval method and system based on large-scale model advanced semantic graph embedding, which uses the advanced feature extraction capability of the CLIP large-scale model to extract features from images, which not only balances the relationship between local details of image features and global semantic information, but also maximizes the use of semantic information, significantly improving the accuracy and efficiency of image retrieval.
[0006] In order to achieve the above objectives, the present disclosure adopts the following technical solutions:
[0007] The first aspect of the present disclosure provides a fast image retrieval method based on large model high-level semantic graph embedding, comprising the following steps:
[0008] Get the image to be retrieved;
[0009] Input the image into the ImgNet network to extract image features, obtain the first hash code after multiple operations, input the image features into the visual auxiliary graph convolutional network, construct the similarity matrix of the image features, input the similarity matrix into the graph convolutional neural network to obtain the second hash code, calculate the losses between the first hash code, the second hash code and the similarity matrix respectively, input the image label into the LabNet network to obtain the first predicted label, input the word corresponding to the image label into the semantic auxiliary graph convolutional network to obtain the second predicted label, calculate the losses between the first predicted label and the second predicted label and between the second predicted label and the true label respectively, then input the first predicted label into the LabNet network to obtain the third hash code, and calculate the loss between the third hash code and the first hash code;
[0010] Summarize all losses to get the overall objective function, iteratively update the parameters of the objective function until the ImgNet hash code network converges and obtains the final hash code of the image to be detected;
[0011] The image feature library is searched for data with the closest Hamming distance to the hash code of the final image to be detected, and the original image corresponding to the data is the retrieval result.
[0012] As a further implementation method, the image is input into the ImgNet network to extract image features, and the first hash code is obtained after multiple operations, specifically: the image is input into the ImgNet network, the image features are extracted using the CLIP large model, the image features are input into the Transformer encoder to obtain the second image features, and the second image features are input into the multilayer perceptron to obtain the first hash code.
[0013] As a further implementation method, the image features are input into a visually assisted graph convolutional network, a cosine similarity matrix and a Euclidean distance matrix of the image features are constructed, the two matrices are combined to construct a similarity matrix, and the similarity matrix is input into the graph convolutional neural network to obtain a second hash code.
[0014] As a further implementation method, it also includes constructing an adjacency matrix using image labels.
[0015] As a further implementation method, the words corresponding to the image labels are input into the semantic auxiliary graph convolutional network, the CLIP large model is used to extract the features of the words corresponding to the image labels, and the adjacency matrix of the word features, image features and labels is input into the graph convolutional neural network to obtain the second predicted label.
[0016] As a further implementation method, the LabNet network consists of three fully connected layers and two representation layers. The first fully connected layer converts the input image label to a high-dimensional space to obtain high-dimensional features. The second fully connected layer converts the high-dimensional features into predicted labels. The third fully connected layer maps the predicted labels to hash codes of fixed length.
[0017] As a further implementation method, the parameters of the objective function are iteratively updated using the stochastic gradient descent algorithm and the back propagation algorithm.
[0018] The second aspect of the present disclosure provides a fast image retrieval system based on large model advanced semantic graph embedding, comprising:
[0019] The data acquisition module is configured to: acquire the image to be retrieved;
[0020] The loss calculation module is configured to: input the image into the ImgNet network to extract image features, obtain a first hash code after multiple operations, input the image features into the visual auxiliary graph convolutional network, construct a similarity matrix of the image features, input the similarity matrix into the graph convolutional neural network to obtain a second hash code, respectively calculate the losses between the first hash code, the second hash code and the similarity matrix, input the image label into the LabNet network to obtain a first predicted label, input the word corresponding to the image label into the semantic auxiliary graph convolutional network to obtain a second predicted label, respectively calculate the losses between the first predicted label and the second predicted label and between the second predicted label and the true label, then input the first predicted label into the LabNet network to obtain a third hash code, and calculate the loss between the third hash code and the first hash code;
[0021] The final hash code generation module is configured to: summarize all losses to obtain the overall objective function, iteratively update the parameters of the objective function until the ImgNet hash code network converges to obtain the final hash code of the image to be detected;
[0022] The retrieval module is configured to: search the image feature library for data with the closest Hamming distance to the hash code of the final image to be detected, and the original image corresponding to the data is the retrieval result.
[0023] The third aspect of the present disclosure provides a medium on which a program is stored. When the program is executed by a processor, the steps of the fast image retrieval method based on large model high-level semantic graph embedding described in the first aspect of the present disclosure are implemented.
[0024] The fourth aspect of the present disclosure provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the fast image retrieval method based on large model high-level semantic graph embedding described in the first aspect of the present disclosure are implemented.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] The fast image retrieval method and system based on large-model advanced semantic graph embedding proposed in the present disclosure extracts features of images with the help of the advanced feature extraction capability of the CLIP large-scale model for downstream image retrieval tasks. Two branches are designed, namely the image encoding branch and the semantic auxiliary encoding branch, which guide the feature image encoding by generating optimized prediction labels containing rich semantics. It not only balances the relationship between the local details of image features and the global semantic information, but also maximizes the use of semantic information, significantly improving the accuracy and efficiency of image retrieval. It enables the system to make full use of the deeper semantics of the image content and provide users with more accurate and relevant retrieval results.
[0027] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The accompanying drawings constituting a part of the present disclosure are used to provide a further understanding of the present disclosure. The illustrative embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation on the present disclosure.
[0029] Figure 1 It is the process framework of the fast image retrieval method disclosed in this disclosure Figure 1 ;
[0030] Figure 2 It is the process framework of the fast image retrieval method disclosed in this disclosure Figure 2 ;
[0031] Figure 3 It is the process framework of the fast image retrieval method disclosed in this disclosure Figure 3 . DETAILED DESCRIPTION
[0032] The present disclosure is further described below in conjunction with the accompanying drawings and embodiments.
[0033] It should be noted that the following detailed descriptions are all illustrative and are intended to provide further explanation of the present disclosure. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present disclosure belongs.
[0034] In the absence of conflict, the embodiments in the present disclosure and the features in the embodiments may be combined with each other.
[0035] Embodiment 1
[0036] like Figure 1As shown, the first embodiment of the present disclosure provides a fast image retrieval method based on large model advanced semantic graph embedding, comprising the following steps:
[0037] S1 obtains the image to be retrieved;
[0038] S2 inputs the image into the ImgNet network to extract image features, obtains the first hash code after multiple operations, inputs the image features into the visual auxiliary graph convolutional network, constructs a similarity matrix of the image features, inputs the similarity matrix into the graph convolutional neural network to obtain the second hash code, calculates the losses between the first hash code, the second hash code and the similarity matrix, inputs the image label into the LabNet network to obtain the first predicted label, inputs the word corresponding to the image label into the semantic auxiliary graph convolutional network to obtain the second predicted label, calculates the losses between the first predicted label and the second predicted label and between the second predicted label and the true label, and then inputs the first predicted label into the LabNet network to obtain the third hash code, and calculates the loss between the third hash code and the first hash code;
[0039] S3 summarizes all losses to obtain the overall objective function, iteratively updates the parameters of the objective function until the ImgNet hash code network converges and obtains the final hash code of the image to be detected;
[0040] S4 searches the image feature library for data with the closest Hamming distance to the hash code of the final image to be detected, and the original image corresponding to the data is the retrieval result.
[0041] The principle of image hash retrieval is to compare the similarity between different images by mapping their features into the same Hamming space. At the same time, the semantic similarity of the data is preserved in the data mapping. The similarity between two hash codes can be measured by the Hamming distance. Given two hash codes b i and b j , then b i and b j The Hamming distance between H The formula can be expressed as: The similarity of hash codes is measured in the form of inner product, and c is the length of the hash code.
[0042] Before using the fast image retrieval method based on large model advanced semantic graph embedding disclosed in the present invention to perform retrieval, the hash feature extraction model involved in the present invention must first be trained and training data must be selected: N image samples with complete modality are obtained from the image retrieval public dataset. Label information corresponding to the image , and the words corresponding to each label Where N is the total number of samples, N l is the number of classes, if sample oi belongs to the jth class, then l ij =1, otherwise l ij = 0. In addition, define ||·|| F Represents the Frobenius norm of a vector or matrix, and also defines two vectors x i and x j The cosine distance between: Where ||·||2 represents norm; <x i ,x j > represents the dot product between vectors: The symbolic function is defined as:
[0043] The hash feature extraction model disclosed in the present invention mainly includes two parts: image coding branch and semantic auxiliary coding branch. The image coding branch includes two modules: ImgNet network and visual auxiliary graph convolution network. The semantic auxiliary coding branch includes two modules: LabNet network and semantic auxiliary graph convolution network.
[0044] Among them, the hash codes generated by the ImgNet network, the visually assisted graph convolutional network and the LabNet network are: b v ∈[-1,+1] m×c 、b gv ∈[-1,+1] m×c 、b l ∈[-1,+1] m×c , where m is the batch size and c is the hash code length. The first predicted label and the second predicted label generated by the LabNet network and the semantic auxiliary graph convolutional network are: and Where N l is the number of classes.
[0045] The model training process is as follows: ImgNet is designed to process image features. First, the image sample is input into the ImgNet network, and the CLIP large model is used to extract image features. The image feature extraction process is f vi =CLIP visual (o i ), where CLIP visual is the CLIP visual encoder, o i For the i-th image sample, the image features of each batch extracted Dimension d v is 512-dimensional. v (In this process, only image features are used, and f v Written as f, dimension d v(Written as d to avoid confusion) The Transformer encoder model divides the input of the multi-head attention module into several independent attention heads, and integrates the output of each attention head in parallel. Using three matrices W Q , W K , W V Multiplied by the image feature f respectively, the vector f is converted into query q, key k and value v, and three matrices q are obtained. i =f i W Q ,k j =f j W K ,v j =f j W V ,in are trainable parameters, Q, K, and V are used to linearly project the input image features into different feature subspaces to form query q, key k, and value v, d k ,d v are the dimensions of keys and values, respectively. For any image, the Transformer encoder can generate a more representative image feature: f': Where m represents the batch size, SAtt represents the self-attention mechanism, K and V are key and value matrices respectively. The image features processed by the Transformer encoder model are converted into hash codes. The hash function is implemented by ImgMLP (multi-layer perceptron): v =tanh(f',θ ν )∈[-1,+1] m×c ,θ ν is the parameter of the hash function, c represents the length of the hash code, and m represents the batch size.
[0046] Design a visually assisted graph convolutional network, which uses the similarity graph S as a guide, aggregates information between adjacent data nodes through the graph convolutional network GCN, and then inputs the similarity graph into a two-layer graph convolutional neural network. The specific steps are: Normalization process to obtain features First, construct the image cosine similarity matrix: C = cos(F v ,F v )∈[-1,+1] m×m , cos(·,·) is the cosine distance function. Although cosine similarity can reflect directional consistency, a single cosine measurement is not enough to mine sufficient structural semantics, because the size of the vector also represents important information, and using only cosine similarity may lose this information. Next, the Euclidean distance metric that calculates the difference between data is used to construct D: Where ρ is the threshold parameter, set to 0.5, The construction of this matrix can reflect the difference in vector size. By combining the two matrices to construct the similarity matrix S, the cosine similarity and the similarity based on Euclidean distance can more comprehensively reflect the similarity between sample points. The final similarity matrix S is constructed as: S ij =C ij ×D ij Right now where the vector Represent the feature matrix F v The i-th and j-th normalized image features in the similarity graph Input a two-layer graph convolutional neural network, which aggregates the graph neighborhood consistency between similar nodes. The encoding formula of the visually assisted graph convolutional network is:
[0047]
[0048] in, W (1) and W (2) is a parameter matrix, σ1 and σ2 represent the activation functions of the two GCN layers respectively, Representing the output of the i-th layer of the graph convolutional network, the hash code generated by the visual graph convolution auxiliary network is: An iterative quantization strategy is used to optimize hash codes.
[0049] The similarity matrix S uses an adaptive graph structure that can automatically discover and utilize the intrinsic structure of the data instead of relying on a predefined graph structure. This can capture the relationship between image features and help the model identify features that may not be so obvious in the original feature space. In this way, the extracted image features can be better utilized to enhance the hash representation of the visual auxiliary graph convolutional network.
[0050] In order to ensure that the binary code to be learned strictly maintains a similar relationship, the affinity within the image modality is maintained by reconstructing the similarity matrix. Similar data points are still similar in the hash space. The objective function is defined
[0051]
[0052] In addition to ensuring that the binary codes to be learned strictly maintain similar relationships, in order to ensure that the ImgNet network works together with the visual auxiliary graph convolutional network, the image encoding branch can capture and utilize the structural information of the data, so that the learned features can reflect the structure and relevance of the data, the objective function is defined
[0053]
[0054] Among them, S ij is the similarity matrix generated by the visually assisted graph convolutional network, ‖·‖ F represents the Frobenius norm. The design of the above image encoding branch is conducive to learning accurate hash codes and hash functions.
[0055] Construct a LabNet network to parse category labels. LabNet consists of three fully connected layers and two representation layers. As input to obtain semantic representation, where m represents the batch size and N l Represents the number of image label categories in the corresponding dataset.
[0056] The encoding formula of the first fully connected layer of LabNet is: (1) =ReLU(W1×L+b1), converting the input label to a high-dimensional space, so as to capture the complex relationship between features. The introduction of nonlinear ReLU helps alleviate the gradient vanishing problem and can increase the sparsity and computational efficiency of the network. Then use the Dropout layer to randomly set some features to 0 with a probability of p=0.1 to prevent overfitting:
[0057] The second fully connected layer is a prediction label generation layer that converts high-dimensional features into category prediction vectors. Where W1 and W2 are the weight matrices of the fully connected layer, and b1 and b2 are bias vectors. The original score is converted into probability Q = σ(E (2) ),in This ensures that the output value is between [0,1], which can be interpreted as the probability of the classification label. Then, Q is converted into the final predicted label by thresholding. The generated prediction label matrix t is the threshold parameter, set to 0.5, m is the batch size, N l is the number of categories.
[0058] The third fully connected layer will predict the label Mapped to a fixed-length hash code: Where W3 is the weight matrix of the fully connected layer, and b3 is the bias vector. The next layer is a representation layer. Through the tanh activation function, the hash code value of the output of the third fully connected layer is normalized to the range of [-1,1]. The generated hash code is: b l =tanh(E (3) ,θ l )∈[-1,+1] ×c ,θ lis the parameter of the hash function, m is the batch size, and c is the hash code length.
[0059] We design a semantic auxiliary module based on shared weight graph convolution to integrate the co-occurrence information from labels into word embeddings and use these learned embeddings to predict the labels of images. We further combine the predicted labels with feature representations to make the feature representations more discriminative. This module consists of two layers of graph convolution. First, we use the labels corresponding to the image samples in each batch to To construct the adjacency matrix Where P is the conditional probability matrix, which reflects the co-occurrence probability between labels. This matrix is used to determine which edges (i.e., label pairs) in the adjacency matrix are significant. Is a threshold parameter. To calculate P, first calculate the label co-occurrence matrix Then calculate each row of the matrix P i =U i / Z i , where Z i Represents the number of times the i-th category appears in the training set. This normalization process ensures that the sum of each row of the probability matrix P is 1.
[0060] Next, we use the CLIP model to process the category word text features. The process of extracting word features is as follows: tj =CLIP textual (v j ), where CLIP textual is the CLIP text encoder, v j For the jth word text, extract the category word features Dimension d t The dimension is 512. The word features corresponding to the label are normalized to obtain the features The encoding formula of the two-layer graph convolution G is as follows:
[0061]
[0062] in W (1) and W (2) is a parameter matrix, μ1 and μ2 represent the activation functions of the two graph convolutional layers, Represents the output of the i-th layer of the graph convolutional network, and outputs As a classifier, get the predicted labels of the batch of image samples
[0063] Since label information has inherent structure and correlation, graph convolutional networks (GCNs) can effectively utilize the graph structure between labels. By propagating and updating features at different levels of the network, GCNs can mine deep feature relationships in the data. This process helps reveal patterns and features that may be hidden in the original feature space, thereby improving the model's ability to recognize complex data structures. The final predicted label generated Not only is it based on the features of the image itself, but it also combines the additional structured information provided by GCN to enrich the label information and help improve the classification performance.
[0064] In order to optimize the model parameters to reduce the predicted labels generated by the semantic-assisted graph convolutional network The difference between the actual label and the actual label is optimized as follows:
[0065]
[0066] In order to ensure that the LabNet network works together with the semantic-assisted graph convolutional network and promote the consistency of the outputs of these two modules, the following consistency loss is optimized
[0067]
[0068] Where σ(x)=1 / (1+e -x ) is the sigmoid function, L is the true label, is the structure prediction label generated by the semantic-assisted graph convolutional network, is the predicted label generated by the LabNet network. This loss helps ensure that the semantic-assisted encoding branch can learn data from multiple perspectives and take into account the consensus between different modules when generating predictions. Optimizing the parameters of the two modules jointly improves the multi-label classification level, thereby improving the overall performance and robustness of the model.
[0069] The two branches were introduced separately before. Now we use the hash code b generated by the LabNet network in the semantic assisted coding branch l To guide the image hash code b in the image encoding branch v The generation of l The rich label information contained in can enable the ImgNet network to learn to contain richer semantic information and generate more accurate hash codes.
[0070]
[0071] Where τ represents the temperature coefficient and <,> represents the dot product between vectors.
[0072] Summarizing all losses, we get the following overall objective function:
[0073]
[0074] Among them, α, β, δ, γ, η are the hyperparameters of the trade-off. The parameters of the entire framework are iteratively updated by the SGD algorithm and the back-propagation algorithm until the ImgNet hash coding network converges and the training of the hash feature extraction model is completed.
[0075] Before performing image retrieval based on the above-trained hash feature extraction model, it is also necessary to build an image feature library. The process of establishing the image feature library is as follows: each image in the original image dataset is input into the hash feature extraction model of the fast image retrieval method based on the large model advanced semantic graph embedding, and the hash code of each image is obtained, and then the image feature library corresponding to the original image dataset is established.
[0076] The fast image retrieval method based on large model advanced semantic graph embedding disclosed in the present invention is used to retrieve the image to be retrieved in the established image feature library.
[0077] Embodiment 2
[0078] The second embodiment of the present disclosure provides a fast image retrieval system based on large model advanced semantic graph embedding, including:
[0079] The data acquisition module is configured to: acquire the image to be retrieved;
[0080] The loss calculation module is configured to: input the image into the ImgNet network to extract image features, obtain a first hash code after multiple operations, input the image features into the visual auxiliary graph convolutional network, construct a similarity matrix of the image features, input the similarity matrix into the graph convolutional neural network to obtain a second hash code, respectively calculate the losses between the first hash code, the second hash code and the similarity matrix, input the image label into the LabNet network to obtain a first predicted label, input the word corresponding to the image label into the semantic auxiliary graph convolutional network to obtain a second predicted label, respectively calculate the losses between the first predicted label and the second predicted label and between the second predicted label and the true label, then input the first predicted label into the LabNet network to obtain a third hash code, and calculate the loss between the third hash code and the first hash code;
[0081] The final hash code generation module is configured to: summarize all losses to obtain the overall objective function, iteratively update the parameters of the objective function until the ImgNet hash code network converges to obtain the final hash code of the image to be detected;
[0082] The retrieval module is configured to: search the image feature library for data with the closest Hamming distance to the hash code of the final image to be detected, and the original image corresponding to the data is the retrieval result.
[0083] As a further implementation method, it also includes an image feature library establishment module, which is configured to: input each image in the original image data set into a hash feature extraction model of a fast image retrieval method based on a large model high-level semantic graph embedding, obtain a hash code for each image, and then establish an image feature library corresponding to the original image data set.
[0084] The more detailed steps are the same as those in the first embodiment and will not be repeated here.
[0085] Embodiment 3
[0086] Embodiment 3 of the present disclosure provides a medium on which a program is stored. When the program is executed by a processor, the steps of the fast image retrieval method based on large model high-level semantic graph embedding as described in Embodiment 1 of the present disclosure are implemented.
[0087] The more detailed steps are the same as those in the first embodiment and will not be repeated here.
[0088] Embodiment 4
[0089] Embodiment 4 of the present disclosure provides an electronic device, including a memory, a processor, and a program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the fast image retrieval method based on large model high-level semantic graph embedding as described in Embodiment 1 of the present disclosure are implemented.
[0090] The more detailed steps are the same as those in the first embodiment and will not be repeated here.
[0091] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. For those skilled in the art, the present disclosure may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A fast image retrieval method based on large model advanced semantic graph embedding, characterized in that: The following steps are involved: Get the image to be retrieved; Input the image into the ImgNet network to extract image features, obtain the first hash code after multiple operations, input the image features into the visual auxiliary graph convolutional network, construct the similarity matrix of the image features, input the similarity matrix into the graph convolutional neural network to obtain the second hash code, calculate the losses between the first hash code, the second hash code and the similarity matrix respectively, input the image label into the LabNet network to obtain the first predicted label, input the word corresponding to the image label into the semantic auxiliary graph convolutional network to obtain the second predicted label, calculate the losses between the first predicted label and the second predicted label and between the second predicted label and the true label respectively, then input the first predicted label into the LabNet network to obtain the third hash code, and calculate the loss between the third hash code and the first hash code; Summarize all losses to get the overall objective function, iteratively update the parameters of the objective function until the ImgNet hash code network converges and obtains the final hash code of the image to be detected; The image feature library is searched for data with the closest Hamming distance to the hash code of the final image to be detected, and the original image corresponding to the data is the retrieval result.
2. The fast image retrieval method based on large model high-level semantic graph embedding as described in claim 1, characterized in that: The image is input into the ImgNet network to extract image features, and the first hash code is obtained after multiple operations, specifically: the image is input into the ImgNet network, the image features are extracted using the CLIP large model, the image features are input into the Transformer encoder to obtain the second image features, and the second image features are input into the multilayer perceptron to obtain the first hash code.
3. The fast image retrieval method based on large model high-level semantic graph embedding as described in claim 1, characterized in that: The image features are input into the visual-assisted graph convolutional network, the cosine similarity matrix and the Euclidean distance matrix of the image features are constructed, the two matrices are combined to construct the similarity matrix, and the similarity matrix is input into the graph convolutional neural network to obtain the second hash code.
4. The fast image retrieval method based on large model high-level semantic graph embedding as described in claim 1, characterized in that: It also includes constructing an adjacency matrix using image labels.
5. The fast image retrieval method based on large model high-level semantic graph embedding as described in claim 4, characterized in that: The words corresponding to the image labels are input into the semantic auxiliary graph convolutional network, and the CLIP large model is used to extract the features of the words corresponding to the image labels. The adjacency matrix of word features, image features and labels is input into the graph convolutional neural network to obtain the second predicted label.
6. The fast image retrieval method based on large model high-level semantic graph embedding as described in claim 1, characterized in that: The LabNet network consists of three fully connected layers and two representation layers. The first fully connected layer converts the input image label to a high-dimensional space to obtain high-dimensional features. The second fully connected layer converts the high-dimensional features into predicted labels. The third fully connected layer maps the predicted labels to fixed-length hash codes.
7. The fast image retrieval method based on large model high-level semantic graph embedding as described in claim 1, characterized in that: The parameters of the objective function are iteratively updated using the stochastic gradient descent algorithm and the back propagation algorithm.
8. A fast image retrieval system based on large model advanced semantic graph embedding, characterized by: include: The data acquisition module is configured to: acquire the image to be retrieved; The loss calculation module is configured to: input the image into the ImgNet network to extract image features, obtain a first hash code after multiple operations, input the image features into the visual auxiliary graph convolutional network, construct a similarity matrix of the image features, input the similarity matrix into the graph convolutional neural network to obtain a second hash code, respectively calculate the losses between the first hash code, the second hash code and the similarity matrix, input the image label into the LabNet network to obtain a first predicted label, input the word corresponding to the image label into the semantic auxiliary graph convolutional network to obtain a second predicted label, respectively calculate the losses between the first predicted label and the second predicted label and between the second predicted label and the true label, then input the first predicted label into the LabNet network to obtain a third hash code, and calculate the loss between the third hash code and the first hash code; The final hash code generation module is configured to: summarize all losses to obtain the overall objective function, iteratively update the parameters of the objective function until the ImgNet hash code network converges to obtain the final hash code of the image to be detected; The retrieval module is configured to: search the image feature library for data with the closest Hamming distance to the hash code of the final image to be detected, and the original image corresponding to the data is the retrieval result.
9. A medium having a program stored thereon, characterized in that: When the program is executed by a processor, the steps of the fast image retrieval method based on large model high-level semantic graph embedding as described in any one of claims 1 to 7 are implemented.
10. An electronic device comprising a memory, a processor, and a program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the fast image retrieval method based on large model high-level semantic graph embedding as described in any one of claims 1 to 7 are implemented.
