Hierarchical structure image similarity matching method based on multi-scale and multi-modal features

Through the hierarchical structure method of multi-scale and multi-modal features, the problem of insufficient single feature description in image retrieval is solved, more accurate and reliable image similarity learning is achieved, and the accuracy and interpretability of image retrieval are improved.

CN118736249AActive Publication Date: 2024-10-01HEFEI UNIV OF TECH

Patent Information

Application Number
CN202410897108.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2024-10-01
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

Existing technologies are difficult to effectively describe image content in image retrieval, resulting in insufficient accuracy and timeliness of image classification and retrieval. In particular, a single feature type cannot capture the complex semantic information of the image and ignores sample relationships, resulting in patterns learned by the model. Simple and susceptible to noise and interference.

Method used

An image similarity matching method based on the hierarchical structure of multi-scale and multi-modal features is adopted. By acquiring multiple modal features, a hierarchical clustering model and similarity equation are constructed, and the convolutional neural network and multi-head attention mechanism are used for feature fusion and Hierarchical similarity calculation, optimizing the rank of the relationship matrix to improve the interpretability of the algorithm.

Benefits of technology

It significantly improves the accuracy and interpretability of image similarity learning, enables more accurate understanding and classification of image data, provides more insightful image retrieval results, and improves the accuracy and reliability of image recognition and retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118736249A_ABST
    Figure CN118736249A_ABST
Patent Text Reader

Abstract

The invention discloses an image similarity matching method of a hierarchical structure based on multi-scale and multi-modal features. The method comprises the following steps: 1, acquiring original multi-modal features of an image sample; 2, performing multi-scale change on the multi-modal features, and fusing the multi-modal features into comprehensive features; 3, hierarchical clustering is carried out on the samples, hierarchical structures of the samples are obtained, and the number of neurons and a link mode of each layer are determined; 4, constructing a similarity equation according to the comprehensive characteristics and the hierarchical structure; 5, constructing a target equation, training the model through a global optimization method, and iteratively updating each relation neuron to obtain an optimal training model; and 6, performing image similarity matching on an input sample by using the trained model to obtain an image pair with the highest similarity as the most similar image pair. According to the method, the comprehensive features of the image can be better learned, so that the image similarity learning effect is improved, and the image matching result has better interpretability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of deep learning and computer vision, and mainly to an image similarity matching method of a hierarchical structure of multi-scale and multi-modal features. Background Art

[0002] In image retrieval applications, the representation vector of the image determines the performance of the entire retrieval system. Therefore, it is extremely challenging to study the efficient description of image content. At present, content-based image retrieval (CBIR) is widely used, such as pathological detection of medical images, information search of similar products in online shopping, target positioning of remote sensing images, video surveillance in the security field, etc. With the gradual promotion of image search applications, the accuracy and timeliness requirements of image classification and retrieval are becoming higher and higher. How to effectively describe image content to achieve efficient retrieval is a challenging problem.

[0003] In recent years, research on the description of image content has shown that a single feature type often only describes one aspect of the image, while ignoring other features of the image, resulting in the inability to effectively describe the content differences between images in the image library, greatly limiting the accuracy of image classification and retrieval. Images can be described together by obtaining multiple complementary features of the image, but the "semantic gap" between the underlying visual features and semantics of the image has always been a difficulty in image retrieval. In the field of computer vision, deep learning has achieved remarkable results in solving the "semantic gap". Image retrieval based on multi-feature fusion can effectively overcome the shortcomings of image retrieval based on a single feature type, which is insufficient in the ability to describe images. Therefore, people use more multiple features to jointly describe the image content and use complementary features to express image information, which can effectively improve the retrieval accuracy. Therefore, researchers have begun to pay attention to how to fuse data from multiple fields. The fusion of multimodal data can provide more information for model decision-making, thereby improving the accuracy of the overall decision-making results. The purpose is to establish a model that can process and associate information from multiple modalities. It is a typical multidisciplinary cross-field and has gradually become a research hotspot. In many practical tasks, the relationship between samples is important semantic information, such as the relationship between objects in an image or the relationship between sentences in a text. Ignoring these relationships will cause the model to be unable to learn more complex patterns, unable to capture complex semantic information, and more susceptible to noise and interference. Summary of the invention

[0004] In order to solve the shortcomings of the above-mentioned prior art, the present invention proposes an image similarity matching method based on a hierarchical structure of multi-scale and multi-modal features, in order to better learn the comprehensive features of images, thereby improving the effect of image similarity learning and making the image matching results more interpretable.

[0005] In order to solve the technical problem, the present invention adopts the following technical solution:

[0006] The image similarity matching method based on a hierarchical structure of multi-scale and multi-modal features of the present invention is characterized in that it is performed according to the following steps:

[0007] Step 1: Get an image dataset I = {I1, I2, ..., I i ,,I t}, where I i represents the i-th sample; t represents the number of samples in the image dataset;

[0008] Extract the i-th sample I i The features of k different modes are obtained to obtain a feature vector set with feature dimension k {F i (1) ,F i (2) ,…,F i (l) ,…,F i (k)}, where F i (l) represents the i-th sample I i The lth modal feature of;

[0009] Step 2: Build a feature fusion model and use it to obtain the i-th sample I i The multi-scale and multi-modal features G i :

[0010] Step 3: Obtain the hierarchical structure between samples through the hierarchical clustering method and build a hierarchical similarity model:

[0011] Step 3.1, use the Euclidean distance to calculate the distance between any two sample features and compare them, find the two samples with the closest distance and merge them into one cluster, so as to merge all samples in I and obtain the hierarchical structure between samples;

[0012] Step 3.2: The hierarchical structure obtained by clustering is used as the hierarchical network link structure element, each cluster center is used as a relationship neuron, and the cluster center of the first layer is regarded as a relationship vector;

[0013] Step 4: Construct a similarity equation and use it to obtain the i-th sample I i The similarity γ with the jth sample ij :

[0014] Step 5: Use formula (1) to construct the loss function L, and use the global optimization method to train the feature fusion model and the hierarchical similarity model, and use the back propagation algorithm to iteratively update each relationship neuron to obtain the optimal image similarity matching model;

[0015]

[0016] In formula (1), I + is the set of positive sample images with the same label in the image dataset I, - is a set of negative sample images with different labels in the image dataset I; γ ij- Represents the i-th sample I i The jth sample I with different labels j The similarity of ij+ Represents the i-th sample I i The jth sample I with the same label j , θ is the set of all parameters to be trained in similarity learning, (i, j+) represents a positive sample pair, and (i, j-) represents a negative sample pair;

[0017] Step 6: Set the i-th sample I i For index samples, the best image similarity matching model is used to detect the index samples, and the image pairs with the highest similarity to the index samples are obtained accordingly and taken as the most similar image pair results.

[0018] The image similarity matching method based on a hierarchical structure of multi-scale and multi-modal features described in the present invention is also characterized in that step 2 is performed according to the following steps:

[0019] Step 2.1: Generate the i-th sample I using formula (2): i The initial eigenvector f i1 :

[0020] f i1 =concat(F i (1) ,F i (2) ,…,F i (l) ,…,F i (k) ) (2)

[0021] In formula (1), Concat is a cascade operation along the channel direction;

[0022] Step 2.2: Use convolution kernels of different sizes to calibrate the feature vector f i1 Perform convolution operation to obtain the i-th sample I iThe J different scale feature vectors {f ij |j=1,2,…,J}, where f ij represents the i-th sample I i Features of the jth different scales;

[0023] Step 2.3: Take the i-th sample I i The J different scale feature vectors {f ij |j=1,2,…,J} are respectively input into J multi-head self-attention modules MHSA for multimodal interaction to obtain the feature vector {f ij ′j=1,2,…,J}, where f ij ′ represents the i-th sample I i The feature after the j-th feature fusion;

[0024] Step 2.4: Use equation (3) and equation (4) to get the i-th sample I i The j-th low-dimensional feature vector g ij And the j-th scale multimodal feature g i ' j :

[0025] g ij =Reshape(FC(f ij ′)) (3)

[0026] g i ' j =MLP(Concat(g ij ,f i1 )) (4)

[0027] In formula (5), FC is a fully connected layer, Reshape is a reshaping operation to restore the length of the feature vector; Concat is a cascade operation along the channel direction, and MLP is a multi-layer perceptron;

[0028] Step 2.5: Use formula (5) to get the i-th sample I i The multi-scale and multi-modal features G i , thus obtaining a multi-scale and multi-modal feature set {G1,G2,…,G i ,…,G t};

[0029] G i =MLP(Concat(f′ i1 ,g′ i1 ,…,g′ ij ,…,g′ iJ )) (5).

[0030] The step 4 is carried out as follows:

[0031] Step 3.1 defines the current hierarchical structure as h, and initializes h = 1;

[0032] Step 3.2: Use formula (6) to calculate the i-th sample I in the h-1-th hierarchy: i and the jth sample I j Similarity under the tth relationship vector So we get the i-th sample I i and the jth sample I j Similarity in the h-1 hierarchy

[0033]

[0034] In formula (5), G j represents the jth sample I j The multi-scale and multi-modal features of , T represents transposition; e t is the tth relationship vector in the h-1th hierarchical structure, α and β are two control parameters, and Softplus is the activation function; d h-1 is the number of relation neurons in the h-1th level structure;

[0035] Step 3.3: Calculate the i-th sample I using formula (7) i and the jth sample I j The hierarchical similarity at the hth level So we get the i-th sample I i The similarity with the j-th sample output at the last level is denoted as γ ij ;

[0036]

[0037] In formula (7), It is the hth level structure h ×d h-1 dimensional weight matrix, d h represents the number of relation neurons in the h-th level structure, represents the weight linking the i-th neuron in the h-1th layer to the j-th neuron in the h-th layer, b h is d in the hth level structure h dimensional bias vector, sig is the activation function; when h = 1, let H represents the total number of levels in the hierarchical structure.

[0038] An electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the image similarity matching method, and the processor is configured to execute the program stored in the memory.

[0039] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the image similarity matching method when the computer program is executed by a processor.

[0040] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0041] 1 The present invention fully considers the different features of the image, such as color, texture, edge, local texture features, etc., and can accurately reflect the similarity of images in different features, thereby improving the accuracy of sample similarity learning. This method significantly improves the accuracy of sample similarity learning, so that in practical applications, whether it is image recognition or image retrieval, more accurate and reliable results can be obtained.

[0042] 2 The present invention uses convolutional neural networks and multiple multi-head attention mechanisms to learn the comprehensive feature expression of images, which can not only mine the effective information in the comprehensive features of images, but also reduce the dimension of data and speed up the training of feature fusion models;

[0043] 3 The present invention extends the single-layer similarity calculation to the semantic-based hierarchical similarity calculation, defines the hierarchical relationship between samples through the hierarchical clustering method, and balances the trade-off between the expression ability and the number of optimized parameters of the similarity equation by adjusting the rank of the relationship matrix, thereby further enhancing the interpretability of the algorithm, being able to more accurately understand and classify image data, and thus providing more insightful results in complex image retrieval tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A schematic diagram of the process of the method of the present invention;

[0045] Figure 2 It is a structural diagram of the model of the present invention. DETAILED DESCRIPTION

[0046] In this embodiment, in the process of image similarity matching, the sample feature fusion method and the hierarchical semantic relationship between samples are studied, and a hierarchical structure image similarity matching method of multi-scale multi-modal features is proposed. First, different features are proposed for the image using an image feature extraction method; then, a multi-head attention mechanism is used to fuse the extracted different image features; and finally, a hierarchical clustering method is used to obtain different relationship neurons, such as Figure 2The single-layer similarity calculation is extended to the semantic-based hierarchical similarity calculation, making the hierarchical neurons and the links between them more explainable. A target equation is designed; finally, the BP algorithm is used to iteratively update the relationship neurons to complete the learning. Specifically, Figure 1 As shown, it is carried out in the following steps:

[0047] Step 1: Get an image dataset I = {I1, I2, ..., I i ,…,I t}, where I i represents the i-th sample; t represents the number of samples in the image dataset;

[0048] Extract the i-th sample I i The features of k different modes are obtained to obtain a feature vector set with feature dimension k {F i (1) ,F i (2) ,…,F i (l) ,…F i (k)}, where F i (l) represents the i-th sample I i The lth modal feature of;

[0049] By extracting different features from the image, the image retrieval can improve the retrieval accuracy on the one hand, and ensure the richness of the retrieval results on the other hand; in this embodiment, the data set has four original features, and LBP (Local Binary Pattern) feature, CH (Colour Histogram) feature, HoG (Histogram of Gradients) feature, WT (Wavelet Texture) feature are extracted respectively, and the features are normalized to obtain feature vectors.

[0050] Step 2: Build a feature fusion model and use it to obtain the i-th sample I i The multi-scale and multi-modal features G i :

[0051] Step 2.1: Generate the i-th sample I using formula (1): i The initial eigenvector f i1 :

[0052] f i1 =concat(F i (1) ,F i (2) ,…,F i(l) ,…,F i (k) ) (1)

[0053] In formula (1), Concat is a cascade operation along the channel direction. By fusing multiple features, on the one hand, the representative information in each feature is mined, and at the same time, the dimension of the feature is reduced, which speeds up the calculation.

[0054] Step 2.2: Use convolution kernels of different sizes to calibrate the feature vector f i1 Perform convolution operation to obtain the i-th sample I i The J different scale feature vectors {f ij |j=1,2,…,J}, where f ij represents the i-th sample I i Features of the jth different scales;

[0055] Step 2.3: Take the i-th sample I i The J different scale feature vectors {f ij |j=1,2,…,J} are respectively input into J multi-head self-attention modules MHSA for multimodal interaction to obtain the feature vector {f ij ′j=1,2,…,J}, where f ij ′ represents the i-th sample I i The feature after the j-th feature is fused; in this embodiment, a two-layer MHSA structure is adopted to realize the fusion of multimodal features.

[0056] Step 2.4: Use equation (2) and equation (3) to get the i-th sample I i The j-th low-dimensional feature vector g ij And the j-th scale multimodal feature g i ' j :

[0057] g ij =Reshape(FC(f ij ′)) (2)

[0058] g i ' j =MLP(Concat(g ij ,f i1 )) (3)

[0059] In formula (5), FC is a fully connected layer, Reshape is a reshaping operation to restore the length of the feature vector; Concat is a cascade operation along the channel direction, and MLP is a multi-layer perceptron;

[0060] Step 2.5: Use formula (4) to get the i-th sample I i The multi-scale and multi-modal features G i , thus obtaining a multi-scale and multi-modal feature set {G1,G2,…,G i ,,G t};

[0061] G i =MLP(Concat(f i ′1,g i ′1,…,g i ' j ,…,g i ' J )) (4)

[0062] The fusion of modal features can better capture the relationship and dependency between different modalities and improve the richness and robustness of feature expression. Multi-scale features can more comprehensively describe the information in the image. Through multi-modal interaction and step-by-step fusion, a more expressive feature vector is finally obtained, which is conducive to improving the performance of the model.

[0063] Step 3: Obtain the hierarchical structure between samples through the hierarchical clustering method and build a hierarchical similarity model:

[0064] Step 3.1, use the Euclidean distance to calculate the distance between any two sample features and compare them, find the two samples with the closest distance and merge them into one cluster, so as to merge all samples in I and obtain the hierarchical structure between samples;

[0065] Step 3.2: The hierarchical structure obtained by clustering is used as the hierarchical network link structure element, each cluster center is used as a relationship neuron, and the cluster center of the first layer is regarded as a relationship vector;

[0066] In order to make this model better reflect the hierarchical relationship between samples, all neurons are not fully connected here, but the neurons in the hidden layer are connected in a hierarchical clustering manner. This method uses 5 5*5 convolution kernels. The hierarchical structure obtained by clustering controls the number of neurons in each layer and the connection status between them, so that when the hierarchical neurons are related, they are connected, otherwise the weights between them are set to 0, so that the hierarchical neurons and the connections between them are more explainable.

[0067] Step 4: Construct similarity equation:

[0068] Step 4.1 defines the current hierarchical structure as h, and initializes h = 1;

[0069] Step 4.2: Use formula (5) to calculate the i-th sample I in the h-1-th level structure i and the jth sample Ij Similarity under the tth relationship vector So we get the i-th sample I i and the jth sample I j Similarity in the h-1 hierarchy

[0070]

[0071] In formula (5), G j represents the jth sample I j The multi-scale and multi-modal features of , T represents transposition; e t is the tth relationship vector in the h-1th hierarchical structure, α and β are two control parameters, and Softplus is the activation function; d h-1 is the number of relation neurons in the h-1th level structure;

[0072] This similarity calculation equation first measures the similarity between sample i and sample j respectively, and then obtains the final similarity by multiplying the two similarities. In actual tasks, the relationship between samples is often determined by only a few relationships, so the softplus equation is used here to force the similarity calculation equation to maintain sparsity on different relationships, that is, only a few relationship vectors play a role in the final similarity calculation.

[0073] Step 4.3: Calculate the i-th sample I using formula (6) i and the jth sample I j The hierarchical similarity equation in the h-th hierarchical structure like Figure 2 As shown, we get the i-th sample I i The similarity γ with the j-th sample output at the last level ij ;

[0074]

[0075] In formula (6), It is the hth level structure h ×d h-1 dimensional weight matrix, d h represents the number of relation neurons in the h-th level structure, represents the weight linking the i-th neuron in the h-1th layer to the j-th neuron in the h-th layer, b h is d in the hth level structure h dimensional bias vector, sig is the activation function; when h = 1, let H represents the total number of layers in the hierarchical structure;

[0076] Through this layer-by-layer approach, the output of each layer depends on the similarity score of the previous layer, and linear and nonlinear transformations are performed layer by layer, thereby gradually extracting and integrating multi-level feature information, and finally obtaining a more accurate and robust similarity score. This process combines the hierarchical feature representation of multi-scale and multi-modal data, making image similarity matching more accurate.

[0077] Step 5: Use formula (6) to calculate the i-th sample I i The similarity γ with the jth sample ij , and use formula (7) to construct the loss function L, and use the global optimization method to train the feature fusion model and the hierarchical similarity model, and use the back propagation algorithm to iteratively update each relationship neuron to obtain the best image similarity matching model;

[0078]

[0079] In formula (7), I + is the set of positive sample images with the same label in the image dataset I, - is a set of negative sample images with different labels in the image dataset I; γ ij- Represents the i-th sample I i The jth sample I with different labels j The similarity of ij+ Represents the i-th sample I i The jth sample I with the same label j , θ is the set of all parameters to be trained in similarity learning, (i, j+) represents a positive sample pair, and (i, j-) represents a negative sample pair;

[0080] Step 6: Use formula (7) to construct the loss function L, and train the feature fusion model and the hierarchical similarity model through the global optimization method, and use the back propagation algorithm to iteratively update each relationship neuron to obtain the optimal image similarity matching model;

[0081]

[0082] In formula (7), I + is the set of positive sample images with the same label in the image dataset I, - is a set of negative sample images with different labels in the image dataset I; γ ij- Represents the i-th sample I i The jth sample I with different labels j The similarity of ij+ Represents the i-th sample I i The jth sample I with the same labelj , θ is the set of all parameters to be trained in similarity learning, (i, j+) represents a positive sample pair, and (i, j-) represents a negative sample pair;

[0083] For hierarchical similarity training, first fully connect all neurons for training as a whole pre-training. Then, according to the results of hierarchical clustering, the weights between neurons that should not be connected are set to 0. Through the optimization process, the similarity of positive image pairs is continuously improved, while the similarity of negative image pairs is continuously reduced. In addition, an error range of 1 is added to the loss function to prevent overfitting during the optimization process. Stochastic gradient descent is used to optimize the parameters in the loss function.

[0084] Step 7: Set the i-th sample I i For index samples, the best image similarity matching model is used to detect the index samples, and the image pairs with the highest similarity to the index samples are obtained accordingly and taken as the most similar image pair results.

[0085] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.

[0086] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.

Claims

1. A hierarchical image similarity matching method based on multi-scale and multi-modal features, characterized in that: The steps are as follows: Step 1: Get an image dataset I = {I1, I2, ..., I i ,…,I t }, where I i represents the i-th sample; t represents the number of samples in the image dataset; Extract the i-th sample I i The features of k different modes are obtained to obtain a feature vector set with feature dimension k {F i (1) ,F i (2) ,...,F i (l) ,…,F i (k) }, where F i (l) represents the i-th sample I i The lth modal feature of; Step 2: Build a feature fusion model and use it to obtain the i-th sample I i The multi-scale and multi-modal features G i : Step 3: Obtain the hierarchical structure between samples through the hierarchical clustering method and build a hierarchical similarity model: Step 3.1, use the Euclidean distance to calculate the distance between any two sample features and compare them, find the two samples with the closest distance and merge them into one cluster, so as to merge all samples in I and obtain the hierarchical structure between samples; Step 3.2: The hierarchical structure obtained by clustering is used as the hierarchical network link structure element, each cluster center is used as a relationship neuron, and the cluster center of the first layer is regarded as a relationship vector; Step 4: Construct a similarity equation and use it to obtain the i-th sample I i The similarity γ with the jth sample ij : Step 5: Use formula (1) to construct the loss function L, and use the global optimization method to train the feature fusion model and the hierarchical similarity model, and use the back propagation algorithm to iteratively update each relationship neuron to obtain the optimal image similarity matching model; In formula (1), I + is the set of positive sample images with the same label in the image dataset I, - is a set of negative sample images with different labels in the image dataset I; γ ij- Represents the i-th sample I i The jth sample I with different labels j The similarity of ij+ Represents the i-th sample I i The jth sample I with the same label j , θ is the set of all parameters to be trained in similarity learning, (i, j+) represents a positive sample pair, and (i, j-) represents a negative sample pair; Step 6: Set the i-th sample I i For index samples, the best image similarity matching model is used to detect the index samples, and the image pairs with the highest similarity to the index samples are obtained accordingly and taken as the most similar image pair results.

2. The image similarity matching method based on a hierarchical structure of multi-scale and multi-modal features according to claim 1, characterized in that: Described step 2 is carried out as follows: Step 2.1: Generate the i-th sample I using formula (2): i The initial eigenvector f i1 : f i1 =concat(F i (1) ,F i (2) ,...,F i (l) ,…,F i (k) ) (2) In formula (1), Concat is a cascade operation along the channel direction; Step 2.2: Use convolution kernels of different sizes to calibrate the feature vector f i1 Perform convolution operation to obtain the i-th sample I i The J different scale feature vectors {f ij |j=1,2,…,J}, where f ij represents the i-th sample I i Features of the jth different scales; Step 2.3: Take the i-th sample I i The J different scale feature vectors {f ij |j=1,2,...,J} are respectively input into J multi-head self-attention modules MHSA for multimodal interaction to obtain the feature vector {f ij ′j=1,2,...,J}, where f ij ′ represents the i-th sample I i The feature after the j-th feature fusion; Step 2.4: Use equation (3) and equation (4) to get the i-th sample I i The j-th low-dimensional feature vector g ij And the j-th scale multimodal feature g i ' j : g ij =Reshape(FC(f ij ′)) (3) g i ′ j =MLP(Concat(g ij ,f i1 )) (4) In formula (5), FC is a fully connected layer, Reshape is a reshaping operation to restore the length of the feature vector; Concat is a cascade operation along the channel direction, and MLP is a multi-layer perceptron; Step 2.5: Use formula (5) to get the i-th sample I i The multi-scale and multi-modal features G i , thus obtaining a multi-scale and multi-modal feature set {G1,G2,…,G i ,…,G t }; G i =MLP(Concat(f′ i1 ,g′ i1 ,…,g′ ij ,…,g′ iJ )) (5)。 3. The image similarity matching method based on a hierarchical structure of multi-scale and multi-modal features according to claim 2, characterized in that: Described step 4 is carried out as follows: Step 3.1 defines the current hierarchical structure as h, and initializes h = 1; Step 3.2: Use formula (6) to calculate the i-th sample I in the h-1-th hierarchy: i and the jth sample I j Similarity under the tth relationship vector So we get the i-th sample I i and the jth sample I j Similarity in the h-1 hierarchy In formula (5), G j represents the jth sample I j The multi-scale and multi-modal features of , T represents transposition; e t is the tth relationship vector in the h-1th hierarchical structure, α and β are two control parameters, and Softplus is the activation function; d h-1 is the number of relation neurons in the h-1th level structure; Step 3.3: Calculate the i-th sample I using formula (7) i and the jth sample I j The hierarchical similarity at the hth level So we get the i-th sample I i The similarity with the j-th sample output at the last level is denoted as γ ij ; In formula (7), It is the hth level structure h ×d h-1 dimensional weight matrix, d h represents the number of relation neurons in the h-th level structure, represents the weight linking the i-th neuron in the h-1th layer to the j-th neuron in the h-th layer, b h is d in the hth level structure h dimensional bias vector, sig is the activation function; when h = 1, let H represents the total number of levels in the hierarchical structure.

4. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the image similarity matching method described in any one of claims 1 to 3, and the processor is configured to execute the program stored in the memory.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the image similarity matching method in any one of claims 1 to 3 are executed.

Citation Information

Patent Citations

  • Aerial image segmentation method based on hierarchical context network

    CN114037922A

  • Cross-modal retrieval method based on modal relation learning

    CN114817673A

  • Multi-modal adaptive fusion deep clustering model and method based on auto-encoder

    US20240095501A1

Cited By

  • Cross-modal medical signal processing method and device, electronic equipment and storage medium

    CN120524435A