An image retrieval method based on multi-feature fusion

Through multi-feature fusion of shallow visual features and deep learning features, combined with PCA dimensionality reduction and query expansion strategies, the problem of insufficient geometric invariance and low retrieval efficiency of single feature extraction in image retrieval is solved, and more efficient and accurate images are achieved. Search results.

CN114140657BActive Publication Date: 2024-09-10ZHEJIANG SCI-TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111017516.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-30
Publication Date
2024-09-10
Estimated Expiration
2041-08-30

AI Technical Summary

Technical Problem

Among existing image retrieval methods, extraction based on a single feature has problems such as insufficient geometric invariance and low retrieval efficiency. Moreover, the complex process of multi-feature fusion methods increases the time taken for feature extraction and fusion, and increases the dimensionality of image features, which affects retrieval performance.

Method used

Using a multi-feature fusion method of shallow visual features and deep learning features, through the extraction of SIFT features and Resnet50 convolution layer features, L2 norm normalization and PCA dimensionality reduction, combined with the query expansion strategy, the accurate description of image features and Efficient search.

Benefits of technology

It improves the reliability and robustness of image retrieval, simplifies the retrieval process, reduces feature dimensions, and improves retrieval accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114140657B
    Figure CN114140657B
Patent Text Reader

Abstract

The present invention discloses an image retrieval method based on multi-feature fusion, which realizes the extraction of content features of images by fusing two different levels of complementary shallow visual features and deep learning features, can accurately describe image features, and improve the reliability and robustness of image retrieval. The fusion features designed by the present invention combine the geometric invariance of shallow visual features of images and the high-level semantic characteristics of deep learning features, which are superior to traditional features and single features; the present invention performs PCA dimensionality reduction processing on the fusion features, and the obtained feature dimension is lower, which has great advantages in feature comparison speed and feature storage space; the multi-feature fusion method designed by the present invention is simple, the retrieval process is efficient, and the retrieval accuracy is high.
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 multi-feature fusion. Background Art

[0002] Image retrieval is one of the research focuses in the field of information retrieval and machine vision. Image retrieval refers to the behavior of the retrieval system user to find images that meet their needs within a certain range of image databases. Image retrieval technology can be divided into two categories according to the different methods of describing images: one is text-based image retrieval, and the other is content-based image retrieval. Text-based image retrieval technology relies on manual text annotation methods to describe the image content, thereby realizing image retrieval by searching keywords. Therefore, it has the disadvantages of huge manual annotation workload, strong subjectivity, and the inability of text annotations to fully cover the content of the image itself. Content-based image retrieval starts from the content of the image itself and effectively overcomes the ambiguity problem in the text annotation process.

[0003] At present, the content features of images can be divided into shallow visual features and deep learning features; shallow visual features mainly refer to the intuitive content features of image representation, usually including global features such as color, texture, shape, and local features such as SIFT. Among them, SIFT local features are invariant to image rotation, scaling, brightness and other transformations, so they are widely used in the field of computer vision. Deep learning features are image features extracted from deep neural networks. Through data training, they can autonomously learn complex feature representations of images and extract high-level semantic information of images. Compared with shallow visual features, they can effectively reduce the errors caused by the "semantic gap" and achieve better retrieval effects.

[0004] The literature [Babenko A, Slesarev A, Chigorin A, et al. Neural codes for image retrieval [C] / / European conference on computer vision. Springer, Cham, 2014: 584-599] proposed to extract image features from the fully connected layer of the CNN model pre-trained on ImageNet for image retrieval scenarios, which achieved good results. However, the fully connected layer features lack certain geometric invariance and still have certain problems in image retrieval. The above shortcomings of the retrieval methods based on single feature extraction have promoted the research of image retrieval methods based on multi-feature fusion. The paper [Zheng L, Wang S, Liu Z, et al. Packing and padding: Coupled multi-index for accurate image retrieval [C] / / Proceedings of the IEEE conference on computer vision and pattern recognition. 2014: 1939-1946] proposed a coupled multi-dimensional index, which integrates SIFT and color features and improves the accuracy and recall of retrieval through packing and padding strategies. However, a higher index dimension will result in a sparser inverted list, which increases the time to access the inverted list.

[0005] It can be seen from this that the current image retrieval methods based on multi-feature fusion often have shortcomings such as the complex fusion method process leading to increased time for feature extraction and fusion, the use and fusion of multiple features leading to an increase in the dimension of image features and thus a significant increase in retrieval time. Summary of the invention

[0006] In view of the above, the present invention provides an image retrieval method based on multi-feature fusion, which realizes the extraction of content features of images by fusing two different levels of complementary shallow visual features and deep learning features, can accurately describe image features, and improve the reliability and robustness of image retrieval.

[0007] An image retrieval method based on multi-feature fusion includes the following steps:

[0008] (1) Extract SIFT features from the target image and encode the SIFT features using a pre-trained visual dictionary as shallow visual features of the target image;

[0009] (2) Input the preprocessed target image into the pre-trained Resnet50 neural network to extract the convolutional layer features as the deep learning features of the target image;

[0010] (3) L2 norm normalization is performed on the shallow visual features and deep learning features of the target image respectively, and then the normalized features are weighted concatenated and combined with PCA (Principal Component Analysis) dimensionality reduction processing to obtain the fusion features of the target image;

[0011] (4) Compare the fused features of the target image with all the image feature vectors in the feature library, and use the query expansion method to finally obtain the retrieval results.

[0012] Furthermore, the pre-training process of the visual dictionary in step (1) is: using an image data set, extracting the SIFT feature vector of each image in the data set, clustering the set of these feature vectors using a K-means clustering algorithm, and finally dividing the set of feature vectors into multiple clusters, and the cluster center of each cluster can be regarded as a visual word in the visual dictionary.

[0013] Furthermore, in step (1), the SIFT features of the target image are encoded using a local feature encoding algorithm. The encoding algorithm uses multi-neighbor soft assignment to aggregate SIFT local features, and calculates the membership between the SIFT feature vector and n neighbor visual words by distance ratio. The membership calculation formula is as follows:

[0014]

[0015] Where: x i is the SIFT feature vector of the target image, and n is the SIFT feature vector x i The number of assigned neighbor visual words, b j is the jth nearest neighbor visual word assigned, u ij is the SIFT feature vector x i In the neighbor visual word b j The membership degree on , β is the rate of change of the smoothing factor control function.

[0016] Furthermore, the specific implementation method of step (2) is as follows: first, the size of the target image is scaled to 224×224 pixels, and the image is de-averaged; then, the processed target image is input into a pre-trained Resnet50 neural network, the feature map output by the fifth convolutional layer of the neural network is extracted, and the feature map is aggregated into a one-dimensional feature vector as the deep learning feature of the target image.

[0017] Furthermore, the pre-training process of the Resnet50 neural network is as follows: first, the Renset50 neural network is initialized using the weight parameters trained on the ImageNet dataset, and then migration training is performed on the image dataset, that is, the Resnet50 neural network is trained as a softmax classifier. During the training process, the cross entropy loss function and the mini-batch optimizer are used to perform migration training on the neural network in batches through forward propagation and back propagation.

[0018] Furthermore, the RMAC (Regional Maximum Activations of Convolutions) encoding method is used to aggregate the feature map into a one-dimensional feature vector. The specific implementation is as follows: for any two-dimensional feature map in the feature map, first, a multi-scale sliding window strategy is used to uniformly sample the feature map, where the square side length corresponding to the sliding window of the lth scale is 2×min(W,H) / (l+1), W and H are the width and height of the feature map, and these square windows slide on the feature map, and there is an overlapping area of ​​no less than 40% between adjacent windows; then, the maximum values ​​of the feature responses of all local areas extracted by the sliding windows of each scale are summed to obtain the RMAC eigenvalue of the feature map; finally, the RMAC eigenvalues ​​of all feature maps are combined into a one-dimensional vector as the deep learning feature of the target image.

[0019] Furthermore, the specific implementation method of step (4) is as follows: first, the fusion feature of the target image is used as the initial query vector F0 to perform similarity calculation with all image feature vectors in the feature library, and the k image feature vectors {F1, F2, ..., F k}; then calculate F0 and {F1, F2, …, F k Mean value F avg And use it as a new query vector, and finally calculate the similarity between the query vector and all image feature vectors in the feature library, and find the k image feature vectors with the closest similarity as the final retrieval result;

[0020]

[0021] Wherein: k is a self-set positive integer.

[0022] Based on the above technical solution, the present invention has the following beneficial technical effects:

[0023] 1. The fusion features designed in the present invention combine the geometric invariance of shallow visual features of the image and the high-level semantic characteristics of deep learning features, which are superior to traditional features and single features.

[0024] 2. In the present invention, PCA dimensionality reduction is performed on the fused features, and the obtained feature dimension is low, which has great advantages in feature comparison speed and feature storage space.

[0025] 3. The multi-feature fusion method designed in the present invention is simple, the retrieval process is efficient, and the retrieval accuracy is high. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 Schematic diagram of the process flow of the image retrieval method of the present invention.

[0027] Figure 2 Schematic diagram of RMAC feature encoding of the present invention.

[0028] Figure 3 The following is an example of similar image results retrieved using the method of the present invention. DETAILED DESCRIPTION

[0029] In order to describe the present invention more specifically, the technical solution of the present invention is described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0030] like Figure 1 As shown, the image retrieval method based on multi-feature fusion of the present invention includes the following steps:

[0031] (1) Feature extraction

[0032] The present invention requires extracting shallow visual features and deep learning features from the retrieval image.

[0033] For shallow visual features: first extract SIFT feature vectors from the image set, and use the K-means clustering algorithm to cluster these feature vector sets, and finally divide the feature vector set into multiple clusters. Each cluster center can be regarded as a visual word to obtain a visual dictionary.

[0034] Then, the multi-neighbor soft assignment method is used to aggregate the SIFT local features of the retrieval image, and the membership between the SIFT feature vector and the n nearest neighbor visual words is calculated by the distance ratio. The membership calculation formula is:

[0035]

[0036] Where: u ij Represents the local feature x i In sight word b j The membership degree on , β is the rate of change of the smoothing factor control function, ||x i -b j ||2 represents the local feature x i With sight word b j The Euclidean distance, n represents x iAssigned to n nearest neighbor visual words.

[0037] For deep learning features: first, use the weight parameters trained on the ImageNet dataset to initialize Renset50; perform transfer training on the target image set, and train the Resnet50 network as a softmax classifier; during the neural network training process, use the cross entropy loss function and mini-batch optimizer to perform transfer training on the network in batches through forward propagation and back propagation.

[0038] The retrieved image size is then scaled to 224×224 pixels, de-averaged, and input into the Resnet50 network for transfer learning to extract the feature map of the Conv5 layer, and the three-dimensional feature map is aggregated into a one-dimensional feature vector.

[0039] The aggregation method uses RMAC feature coding. First, the sliding window strategy is used to uniformly sample the feature map Ω. The programming length of the square corresponding to the first scale area is min(W,H), the side length of the square corresponding to the second scale area is 2×min(W,H) / 3, and the side length of the square corresponding to the Lth scale area is 2×min(W,H) / (L+1). These square areas slide on the feature map Ω, and each area has an overlapping area of ​​no less than 40%. Figure 2 As shown in the figure, the region selection process at scales 1 to 3 is shown respectively. When L=1, 2 regions are extracted from the feature map, when L=2, 6 regions are extracted, and when L=3, 12 regions are extracted. Therefore, a total of 20 local regions are extracted from a single feature map.

[0040] Then the global and 20 regional maximum values ​​are summed to obtain the RMAC feature of a single feature map. The formula is as follows:

[0041]

[0042] Among them, R represents the number of local regions on the feature map, f ir Represents the maximum value of the characteristic response of the rth region of the i-th channel.

[0043] (2) Feature fusion.

[0044] The present invention uses L2 norm normalization to perform L2 norm normalization on the shallow visual features and deep learning features of the retrieved image. Assume that there is a set of feature vectors First calculate the L2 norm of the X vector:

[0045]

[0046] Then divide each dimension of vector X by ‖x‖2 to obtain a new vector X′ normalized by the L2 norm, that is:

[0047]

[0048] After that, the shallow visual features and deep learning features after L2 norm normalization are weighted and connected in series, and the fusion method is as follows:

[0049] F=[γ1F B ,γ2F R ]

[0050] Among them: F B is the SIFT-BOW shallow visual feature of multi-neighbor soft assignment, F R Resnet50 deep convolution features for transfer learning, γ1 and γ2 are their weight parameters respectively, and γ1+γ2=1.

[0051] Finally, PCA dimensionality reduction is performed on the fused features to remove redundant information and obtain the final fused features. PCA dimensionality reduction maps the original n-dimensional features to k-dimensional features. This k-dimensional feature is a new orthogonal feature also called the principal component. The main transformation process is as follows:

[0052] ① De-mean the original data X(m, n), that is, subtract the mean value of each feature dimension.

[0053] ② Calculate the covariance matrix C(m,n) and calculate the eigenvalues ​​and vectors of the covariance matrix.

[0054] ③ Select the eigenvectors corresponding to the largest k eigenvalues ​​in the covariance matrix C to form a dimensionality reduction matrix T(n, k).

[0055] ④Through formula X new =X×T, the obtained X new That is, the principal component data after the original data X is reduced to k dimensions.

[0056] (3) Feature retrieval.

[0057] The Euclidean distance is used to compare the fusion features of the searched image in the vector library, and the search accuracy is improved by re-ranking the search through the average query expansion strategy, and the final search results are obtained. The execution process of the average query expansion strategy is as follows:

[0058] ① Extract the content feature vector F0 of the query image, use F0 to compare the similarity with the feature vectors in the feature library, and find the first k feature vector sets F{F1,F2,…,F k}.

[0059] ② Find F0 and the eigenvector set F{F1,F2,…,F k The average value F avg , calculated as follows:

[0060]

[0061] Where: F0 is the initial query vector, F m is the feature vector of the mth result of the initial query.

[0062] Finally, the average value F avg As a new query feature instance, perform another query to obtain the final retrieval results. Figure 3 This is an example of the image retrieval result of the present invention, where the first framed image is the target retrieval image, and the rest are similar image results retrieved.

[0063] The above description of the embodiments is to facilitate the understanding and application of the present invention by those skilled in the art. It is obvious that those skilled in the art can easily make various modifications to the above embodiments and apply the general principles described herein to other embodiments without creative work. Therefore, the present invention is not limited to the above embodiments, and improvements and modifications made to the present invention by those skilled in the art based on the disclosure of the present invention should be within the scope of protection of the present invention.

Claims

1. An image retrieval method based on multi-feature fusion, comprising the following steps: (1) Extract SIFT features from the target image and use the pre-trained visual dictionary to encode the SIFT features using the local feature encoding algorithm as the shallow visual features of the target image; The local feature encoding algorithm adopts multi-neighbor soft assignment to aggregate SIFT local features, and calculates the membership between the SIFT feature vector and n neighbor visual words through the distance ratio. The calculation formula of the membership is as follows: in: x i is the SIFT feature vector of the target image, and n is the SIFT feature vector x i The number of assigned neighbor visual words, b j is the jth nearest neighbor visual word assigned, u ij is the SIFT feature vector x i In the neighbor visual word b j The membership degree on , β is the rate of change of the smoothing factor control function; (2) The preprocessed target image is input into the pretrained Resnet50 neural network to extract the convolutional layer features as the deep learning features of the target image. The specific implementation method is as follows: first, the size of the target image is scaled to 224×224 pixels and de-averaged; then, the processed target image is input into the pretrained Resnet50 neural network, the feature map output by the fifth convolutional layer of the neural network is extracted, and RMAC coding is used to aggregate it into a one-dimensional feature vector as the deep learning features of the target image; The specific implementation of the RMAC encoding is as follows: for any two-dimensional feature map in the feature map, firstly, a multi-scale sliding window strategy is used to uniformly sample the feature map, wherein the side length of the square corresponding to the sliding window of the lth scale is 2×min(W,H) / (l+1), W and H are the width and height of the feature map, and these square windows slide on the feature map, and there is an overlapping area of ​​not less than 40% between adjacent windows; then, the maximum values ​​of the feature responses of all local areas extracted by the sliding windows of each scale are summed to obtain the RMAC feature value of the feature map; finally, the RMAC feature values ​​of all feature maps are combined into a one-dimensional vector as the deep learning feature of the target image; (3) L2 norm normalization is performed on the shallow visual features and deep learning features of the target image respectively, and then the normalized features are weighted concatenated and combined with PCA dimensionality reduction processing to obtain the fusion features of the target image; (4) Compare the fused features of the target image with all the image feature vectors in the feature library, and use the query expansion method to finally obtain the retrieval results.

2. The image retrieval method according to claim 1, characterized in that: The pre-training process of the visual dictionary in step (1) is as follows: using an image data set, extracting the SIFT feature vector of each image in the data set, clustering the set of these feature vectors using a K-means clustering algorithm, and finally dividing the set of feature vectors into multiple clusters, where the cluster center of each cluster can be regarded as a visual word in the visual dictionary.

3. The image retrieval method according to claim 1, characterized in that: The pre-training process of the Resnet50 neural network is as follows: first, the Renset50 neural network is initialized using the weight parameters trained on the ImageNet dataset, and then migration training is performed on the image dataset, that is, the Resnet50 neural network is trained as a softmax classifier. During the training process, the cross entropy loss function and the mini-batch optimizer are used to perform migration training on the neural network in batches through forward propagation and back propagation.

4. The image retrieval method according to claim 1, characterized in that: The specific implementation method of step (4) is as follows: first, the fusion feature of the target image is used as the initial query vector F0 to perform similarity calculation with all the image feature vectors in the feature library, and the k image feature vectors {F1, F2, ..., F k }; then calculate F0 and {F1, F2, …, F k Mean value F avg And use it as a new query vector, and finally calculate the similarity between the query vector and all image feature vectors in the feature library, and find the k image feature vectors with the closest similarity as the final retrieval result; Wherein: k is a self-set positive integer.