CN103226585B - Towards the self-adaptation Hash rearrangement method of image retrieval - Google Patents

Towards the self-adaptation Hash rearrangement method of image retrieval Download PDF

Info

Publication number
CN103226585B
CN103226585B CN201310123163.4A CN201310123163A CN103226585B CN 103226585 B CN103226585 B CN 103226585B CN 201310123163 A CN201310123163 A CN 201310123163A CN 103226585 B CN103226585 B CN 103226585B
Authority
CN
China
Prior art keywords
image
library
hash
msub
images
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201310123163.4A
Other languages
Chinese (zh)
Other versions
CN103226585A (en
Inventor
孔祥维
卢佳音
付海燕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dalian University of Technology
Original Assignee
Dalian University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dalian University of Technology filed Critical Dalian University of Technology
Priority to CN201310123163.4A priority Critical patent/CN103226585B/en
Publication of CN103226585A publication Critical patent/CN103226585A/en
Application granted granted Critical
Publication of CN103226585B publication Critical patent/CN103226585B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention, towards the self-adaptation Hash rearrangement method of image retrieval, belongs to image retrieval technologies field, relates to and utilizes image hash method to carry out CBIR.The method adopts and first maps the Hash rearrangement method sorted afterwards, and first extract the higher-dimension visual feature vector of image in training storehouse, selecting suitable hash method that higher-dimension visual signature is mapped to Hash codes, is the specific class weight vectors of every class Computer image genration; Calculate the Hash codes of retrieving images and the Hamming distance of Hash intersymbol in training storehouse, return result for retrieval by ascending order; Calculate the adaptive weighting vector of retrieving images according to result for retrieval, utilize the adaptive weighting vector structure weighting Hamming distance of retrieving images, and utilize weighting Hamming distance to reset returning image, obtain result for retrieval more accurately; The method calculates specific weight according to different retrieving images, has generality, and significantly improves retrieval effectiveness while not increasing computation complexity.

Description

Self-adaptive Hash rearrangement method for image retrieval
Technical Field
The invention belongs to the technical field of image retrieval, relates to content-based image retrieval by using an image hash method, and particularly relates to an image retrieval-oriented adaptive hash rearrangement method.
Background
Content-based image retrieval is performed with the similarity between visual features of images as a metric, and the task is to find images from an image library that are similar in content to the retrieved images. The traditional retrieval method uses a high-dimensional European feature vector to represent an image, and utilizes a linear scanning mode to retrieve an image library. However, when searching a massive image library, the corresponding feature storage space is huge due to the huge number of images, and the searching efficiency of the linear scanning mode is very low. The image hash method maps high-dimensional Euclidean features into simple binary hash codes, so that the storage space of the features is greatly reduced, and the calculation speed of Hamming distance between the hash codes is obviously higher than that of Euclidean distance; meanwhile, similar images are searched by adopting an approximate nearest neighbor method, and the searching efficiency can also be effectively improved.
The image retrieval method by using the Hash method mainly comprises the following steps: firstly, extracting high-dimensional visual features from a retrieval image, then selecting a proper Hash method to map the high-dimensional features into Hash codes, and finally returning retrieval results from small to large by calculating the Hamming distance between the Hash codes of the retrieval image and the Hash codes in an image library. The hash method relying on hamming distance for measurement does improve the retrieval efficiency, but has obvious disadvantages. Since hamming distance is an integer, there may be thousands of images in the image library that are equidistant from the search image; and the Hamming distance only reflects the number of different hash codes, and neglects the influence of the hash code position on the similarity. On the other hand, since the order of return is important for an image having a hamming distance equal to the search image, it is necessary to rearrange the hash-searched image.
Currently, there are two main types of hash rearrangement methods: a first-mapping-then-ordering method and a first-ordering-then-mapping method. The mapping-first and sorting-second method is that a Hash code is generated for an image, and a weighted Hamming distance is constructed to rearrange a returned image. It features that the Hamming distances are continuous, so greatly reducing the number of images with same Hamming distance. For example, Query-Adaptive Ranking [ Y.Jiang, J.Wang, and S.Chang.Lost in Binarization: Query-Adaptive Ranking for Similar Image Search with Compact codes. Improcessing of ICMR,2011] is representative of a first-mapping-then-Ranking method.
The first-sorting and second-mapping method is that similar images are screened out from an image library according to the similarity among the Euclidean features of the images, then hash codes are generated for the images, and then the returned images are rearranged according to the traditional Hamming distance. For example, QsRank [ X.Zhang, L.Zhang, and H.Shum.QsRank: Query-Sensitive HashCode Ranking for influence-neighbor search. in proceedings of CVPR,2012] is a typical method of the sort-before-map method. However, the sorting-before-mapping method utilizes the Euclidean distance between the visual features of the images to screen similar images, so that the time and space complexity is high, and the retrieval efficiency is low.
Disclosure of Invention
The invention aims to overcome the defects of the prior art, and provides a Hash rearrangement method of mapping and sequencing, namely an adaptive Hash rearrangement method.A high-dimensional visual characteristic is extracted from an image in a training library, then a proper Hash method is selected to map the high-dimensional characteristic into Hash codes, and weight vectors of various images are obtained according to the correlation among different dimensions of various Hash codes in the image in the training library; then, by calculating the Hamming distance between the Hash code of the retrieval image and the Hash code in the image library, returning the retrieval result in the order from small to large; and calculating the self-adaptive weight of the retrieval image according to the retrieval result, constructing a weighted Hamming distance by using the self-adaptive weight vector of the retrieval image, and rearranging the returned image by using the weighted Hamming distance to obtain a more accurate retrieval result. The method aims to solve the problem of sorting the returned images in the massive image retrieval, particularly effectively solve the problem of sorting the images with equal distances in the returned images and improve the retrieval accuracy.
The technical scheme of the invention is as follows: and for each type of image in the training image library, extracting a visual characteristic vector of the image, generating a hash code, learning the correlation among different dimensions of the hash code in the class, and generating a specific class weight vector for each type of image. And for the retrieval image, calculating the Hamming distance between the retrieval image and the image in the image library, returning the retrieval result, and calculating the self-adaptive weight of the retrieval image according to the retrieval result. And constructing a self-adaptive Hamming distance by using the weight of the retrieval image, and rearranging the retrieval result to obtain a more accurate retrieval result. The concrete implementation steps comprise:
1. selecting a retrieval image q, and determining an image library IM and a training library T;
selecting a search image q, determining an image library IM containing N images and a training library T containing M images, IM = { IM = }1,IM2,...,IMN},T={T1,T2,...,TM},
Wherein: m is more than 0 and less than or equal to N;
2. extracting visual features of the images to form an image feature library GIM and a training feature library GT;
for theExtracting visual features of each image in the image library IM and the training library T by using a gist descriptor, wherein each image is represented by a 512-dimensional gist feature vector; the feature vectors of all the images in the image library IM form an image feature library GIM, GIM = { GIM = { (GIM)1,GIM2,...,GIMNAnd (c) the step of (c) in which, representing a real number set, wherein each feature vector in the image feature library corresponds to each image in the image library one by one; the feature vectors of all the images in the training database T form a training feature database GT, GT = { GT1,GT2,...,GTMAnd (c) the step of (c) in which,each feature vector in the training feature library corresponds to each image in the training library one by one; the feature vector of the search image q is Gq
3. Respectively generating a hash code with dimension d for each feature vector in the image feature library and the training feature library;
respectively generating a hash code with dimension d for each feature vector in the image feature library GIM and the training feature library GT by using the existing hash method, such as LSH, SKLSH or ITQ hash method, and respectively representing HI = { HI = }1,HI2,...,HINAnd HT = { HT = }1,HT2,...HTMIn which HI e {0,1}N×dIs a matrix of dimension N × d, each element of the matrix being 0 or 1; HT is formed by {0,1}M×dIs a matrix of dimension M × d, each element of the matrix being 0 or 1; if the training library T contains k types of images together, where k is a positive integer, the hash code HT of the training library T can also be expressed asWhereinSet of hashes representing all images of class i in the training library T, where i ∈ [1, k ∈ ]](ii) a Taking class i of the training library as an example, the hash code set can be represented asIs composed ofA hash code of 0 or 1 for each matrix element, whereinThe number of images contained in the ith type of image of the training library T;
4. training the images of the training library to obtain class weight vectors;
by comparing the ith type hash codes in the training library TCounting the number of 0 and 1 in each column of the vector, and respectively recording the number asAndrepresenting class i hash codes in training library TThe number of 0 and 1 on the r-th dimension hash code, wherein r is equal to [1, d ∈](ii) a Calculating ith type hash code in training library TCorresponding class weight vectorWhereinIs a d-dimensional vector, each element in the vector being a fraction greater than 0 and less than 1; order to max _ num c i , r = max { num 0 c i , r , num 1 c i , r } , Representing class i hash codesThe maximum number of 0 s or 1 s on the nth column is: max _ num c i = { max _ num c i , 1 , max _ num c i , 2 , . . . , max _ num c i , d } , to representThe maximum number of 0 s or 1 s on each column; order to The vector is a d-dimensional vector, each element in the vector is a decimal between 0.5 and 1, and the difference between ith type hash codes in the training library T is represented; based on the difference between i-th hash codesCalculating a weight vector corresponding to the ith dimension of the ith type hash code: when in use <math> <mrow> <msub> <mi>dp</mi> <mrow> <msub> <mi>c</mi> <mi>i</mi> </msub> <mo>,</mo> <mi>r</mi> </mrow> </msub> <mo>&Element;</mo> <mo>[</mo> <msub> <mi>th</mi> <mi>j</mi> </msub> <mo>,</mo> <msub> <mi>th</mi> <mrow> <mi>j</mi> <mo>-</mo> <mn>1</mn> </mrow> </msub> <mo>)</mo> <mo>,</mo> </mrow> </math> j =1,. L, <math> <mrow> <msub> <mi>&omega;</mi> <mrow> <msub> <mi>c</mi> <mi>i</mi> </msub> <mo>,</mo> <mi>r</mi> </mrow> </msub> <mo>=</mo> <mfrac> <msub> <mi>&omega;</mi> <msub> <mi>s</mi> <mi>j</mi> </msub> </msub> <mrow> <mi>&omega;</mi> <mo>_</mo> <mi>norm</mi> </mrow> </mfrac> <mo>,</mo> </mrow> </math> wherein,is a vectorThe r-th element of (1); th = { th1,...thLThe pixel value is a threshold vector preset according to an image library, and each element is a decimal number between 0.5 and 1;each element is a decimal number between 0 and 1 for a preset weight vector; l is a positive integer and is the number of preset weights;weight vector for class i hash codesThe r-th element of (1);for the normalization parameter, realizing the normalization of the weight vector; therefore, class i hash codes in the training library TThe corresponding weight vector isWhere i ∈ [1, k ]];
5. Calculating a self-adaptive weight vector of the retrieval image q;
hash code h of retrieval image q is calculated firstlyqAnd hash code h of image e in image libraryeHamming distance between themWhereinFor XOR operations between binary hash codes, distHammIs an integer between 0 and d. According to distHammSorting the corresponding images in the image library from small to large, taking out the TN images ranked at the top, wherein TN is a positive integer, and using a set SC to represent the category set corresponding to the TN images,representing the number of i-th images in the TN images, the adaptive weight calculation formula of the retrieval image q isWherein,for the ith type hash code in the training library TA corresponding weight vector;
6. constructing a self-adaptive Hamming distance, and rearranging a retrieval result;
hash code h for searching image qqAnd hash code h of image e in image libraryeThe adaptive hamming distance between is defined as:where · represents the Hadamard product between vectors, i.e. the multiplication of the elements corresponding to two vectors; according to distQARAnd rearranging the returned images from small to large to obtain a more accurate retrieval result.
Reference is made to the extraction of the gist feature vector [ Aude Oliva, Antonio Torralba, Modelingthe shape of the scene: a medical representation of the spatial envelope, International journal of Computer Vision, Vol.42(3):145-175,2001 ].
The invention has the advantages that: the invention provides an image retrieval-oriented adaptive Hash rearrangement method, which utilizes an adaptive weight vector of a retrieval image to construct a weighted Hamming distance and utilizes the weighted Hamming distance to rearrange a returned image. The self-adaptive rearrangement method calculates specific weight according to different retrieval images, has generality, and obviously improves the retrieval effect while not increasing the calculation complexity.
Drawings
Fig. 1 is a schematic flow chart of an adaptive hash rearrangement method for image retrieval according to the present invention.
Fig. 2 is a comparison graph of results of the search results of the LSH hashing method returned to the first 10 images before and after rearrangement using the present invention when the hash dimension is 128.
Fig. 3 is a comparison graph of results of the retrieval result of the ITQ hashing method returned to the previous 10 images before and after rearrangement using the present invention when the hash dimension is 128.
FIG. 4(a) is a comparison graph of the results before and after the search results of the LSH hashing method are rearranged according to the present invention; FIG. 4(b) is a comparison graph of results before and after the search result of the SKLSH hash method is rearranged according to the present invention; fig. 4(c) is a comparison graph of the search results before and after rearrangement by the ITQ hash method according to the present invention. Wherein: the abscissa represents the hash dimension and the ordinate represents the average retrieval accuracy returned for the first 50 images.
FIG. 5(a) is a comparison graph of the results before and after the search results of the LSH hashing method are rearranged according to the present invention; FIG. 5(b) is a comparison graph of results before and after the search result of the SKLSH hashing method is rearranged according to the present invention; fig. 5(c) is a comparison graph of the search results before and after rearrangement by the ITQ hash method according to the present invention. Wherein: the abscissa represents the number of returned images and the ordinate represents the average retrieval accuracy.
Detailed Description
The following detailed description of the invention refers to the accompanying drawings. At present, a mapping-first and sorting-second method in a hash rearrangement method is to generate a hash code for an image first, and construct a weighted hamming distance to rearrange a returned image. It features that the Hamming distances are continuous, so greatly reducing the number of images with same Hamming distance. There are significant disadvantages. For example, the hash code h of three images is known1=010,h2=110,h3=011, wherein h1To retrieve the hash code of an image, albeit h1And h2Hamming distance and h1And h3Are equal, but if the hash function makes the first bit hash code more important than the third bit in the mapping, the hash code is h2Should have a hash code of h3Is returned. Therefore, the order of return is very important for images having a hamming distance equal to the search image. The invention adopts a method of firstly mapping and then sequencing in the Hash rearrangement method and provides a self-adaptive Hash rearrangement method, thereby effectively solving the sequencing problem of images with equal distances in the returned images.
Example 1, the Image library comprises 10000 color images of 100 × 100 pixels, 100 types, each type comprises 100 images, and the Product Image CategoriationDataSet commercial Image library established by Xiuxing et al of Microsoft Asian institute is an internationally recognized Image library.
Step 1, randomly taking 1000 images from an image library as retrieval images q respectively, and taking the rest 9000 images as a training library.
And 2, converting the retrieval image and all color images in the training library into gray images, and extracting 512-dimensional gist visual features. The image feature library and the training feature library are respectively GIM = { GIM = { (GIM)1,GIM2,...,GIM10000And GT = { GT = } and GT = { GT =1,GT2,...,GT9000Therein of The extraction process of gist characteristics can adopt the public matlab code.
And 3, selecting three common hash methods of LSH, SKLSH and ITQ to train the feature library GT = { GT by using the disclosed matlab code1,GT2,...,GT9000Generating a hash code HT = { HT) with dimension d1,HT2,...HT9000}. Since the training library contains 100 types of images, the hash code of the training library can also be expressed as a class H c = { H c 1 , H c 2 , . . . , H c 100 } .
Step 4, when i =1, 2.. and 100, respectively counting the i-th class hash codeNumber of 0 s and 1 s in the r-th column of (1)Andr =1, 2. In this search, the hash code dimension d =8,16,32,64,128, 256.
Step 5, calculating the ith type hash codeCorresponding weight vectori∈[1,k]:
1) GetAndthe maximum value of (a) is:
max _ num c i , r = max { num 0 c i , r , num 1 c i , r } - - - ( 1 )
2) computingMaximum number of 0 or 1 on each column:
max _ num c i = { max _ num c i , 1 , max _ num c i , 2 , . . . , max _ num c i , d } - - - ( 2 )
3) calculating the difference between the i-th type hash codes:
dp c i = max _ num c i m c i - - - ( 3 )
4) let parameter L =6, th = { th = { (th) }1,...th6}={1,0.9,0.8,0.7,0.6,0.5}, <math> <mrow> <msub> <mi>&omega;</mi> <mi>s</mi> </msub> <mo>=</mo> <mo>{</mo> <msub> <mi>&omega;</mi> <msub> <mi>s</mi> <mn>1</mn> </msub> </msub> <mo>,</mo> <mo>.</mo> <mo>.</mo> <mo>.</mo> <mo>,</mo> <msub> <mi>&omega;</mi> <msub> <mi>s</mi> <mn>6</mn> </msub> </msub> <mo>}</mo> <mo>=</mo> <mo>{</mo> <mn>1,0.8,0.6,0.4,0.3,0.1</mn> <mo>}</mo> <mo>,</mo> </mrow> </math> Then the parameters are normalizedThus, the weight vector of the ith dimension of the ith type hash code, r ∈ [1, d ]]Expressed as:
<math> <mrow> <msub> <mi>&omega;</mi> <mrow> <msub> <mi>c</mi> <mi>i</mi> </msub> <mo>,</mo> <mi>r</mi> </mrow> </msub> <mo>=</mo> <mfrac> <msub> <mi>&omega;</mi> <msub> <mi>s</mi> <mi>j</mi> </msub> </msub> <mrow> <mi>&omega;</mi> <mo>_</mo> <mi>norm</mi> </mrow> </mfrac> <mo>=</mo> <mfenced open='{' close=''> <mtable> <mtr> <mtd> <mfrac> <mn>1</mn> <mn>3.2</mn> </mfrac> <mo>,</mo> </mtd> <mtd> <msub> <mi>dp</mi> <mrow> <msub> <mi>c</mi> <mi>i</mi> </msub> <mo>,</mo> <mi>r</mi> </mrow> </msub> <mo>=</mo> <mn>1</mn> </mtd> </mtr> <mtr> <mtd> <mfrac> <mn>0.8</mn> <mn>3.2</mn> </mfrac> <mo>,</mo> </mtd> <mtd> <msub> <mi>dp</mi> <mrow> <msub> <mi>c</mi> <mi>i</mi> </msub> <mo>,</mo> <mi>r</mi> </mrow> </msub> <mo>&Element;</mo> <mo>[</mo> <mn>0.9,1</mn> <mo>)</mo> </mtd> </mtr> <mtr> <mtd> <mfrac> <mn>0.6</mn> <mn>3.2</mn> </mfrac> <mo>,</mo> </mtd> <mtd> <msub> <mi>dp</mi> <mrow> <msub> <mi>c</mi> <mi>i</mi> </msub> <mo>,</mo> <mi>r</mi> </mrow> </msub> <mo>&Element;</mo> <mo>[</mo> <mn>0.8,0.9</mn> <mo>)</mo> </mtd> </mtr> <mtr> <mtd> <mfrac> <mn>0.4</mn> <mn>3.2</mn> </mfrac> <mo>,</mo> </mtd> <mtd> <msub> <mi>dp</mi> <mrow> <msub> <mi>c</mi> <mi>i</mi> </msub> <mo>,</mo> <mi>r</mi> </mrow> </msub> <mo>&Element;</mo> <mo>[</mo> <mn>0.7,0.8</mn> <mo>)</mo> </mtd> </mtr> <mtr> <mtd> <mfrac> <mn>0.3</mn> <mn>3.2</mn> </mfrac> <mo>,</mo> </mtd> <mtd> <msub> <mi>dp</mi> <mrow> <msub> <mi>c</mi> <mi>i</mi> </msub> <mo>,</mo> <mi>r</mi> </mrow> </msub> <mo>&Element;</mo> <mo>[</mo> <mn>0.6,0.7</mn> <mo>)</mo> </mtd> </mtr> <mtr> <mtd> <mfrac> <mn>0.1</mn> <mn>3.2</mn> </mfrac> <mo>,</mo> </mtd> <mtd> <msub> <mi>dp</mi> <mrow> <msub> <mi>c</mi> <mi>i</mi> </msub> <mo>,</mo> <mi>r</mi> </mrow> </msub> <mo>&Element;</mo> <mo>[</mo> <mn>0.5,0.6</mn> <mo>)</mo> </mtd> </mtr> </mtable> </mfenced> <mo>-</mo> <mo>-</mo> <mo>-</mo> <mrow> <mo>(</mo> <mn>4</mn> <mo>)</mo> </mrow> </mrow> </math>
hence class i hash codesThe corresponding weight vector isi∈[1,k]。
Step 6, calculating hash code h of retrieval image qqAnd hash code h of image t in image librarytHamming distance between themAnd press distHammSorting the corresponding images in the image library from small to large, making TN =10, namely taking the 10 images which are arranged at the top, and selecting the three types c with the largest number of images from the images1,c2,c3Corresponding to the set SC, and the number of the corresponding images in the three types is recorded asThe adaptive weight of the search image q is <math> <mrow> <msub> <mi>&omega;</mi> <mi>q</mi> </msub> <mo>=</mo> <mfrac> <mrow> <msub> <mi>n</mi> <msub> <mi>c</mi> <mn>1</mn> </msub> </msub> <msub> <mi>&omega;</mi> <msub> <mi>c</mi> <mn>1</mn> </msub> </msub> <mo>+</mo> <msub> <mi>n</mi> <msub> <mi>c</mi> <mn>2</mn> </msub> </msub> <msub> <mi>&omega;</mi> <msub> <mi>c</mi> <mn>2</mn> </msub> </msub> <mo>+</mo> <msub> <mi>n</mi> <msub> <mi>c</mi> <mn>3</mn> </msub> </msub> <msub> <mi>&omega;</mi> <msub> <mi>c</mi> <mn>3</mn> </msub> </msub> </mrow> <mrow> <msub> <mi>n</mi> <msub> <mi>c</mi> <mn>1</mn> </msub> </msub> <mo>+</mo> <msub> <mi>n</mi> <msub> <mi>c</mi> <mn>2</mn> </msub> </msub> <mo>+</mo> <msub> <mi>n</mi> <msub> <mi>c</mi> <mn>3</mn> </msub> </msub> </mrow> </mfrac> <mo>.</mo> </mrow> </math>
Step 7, utilizing omega obtained in step 6qConfigurable adaptive hamming distanceAnd rearranges the returned image according to its size.
FIG. 2 is a comparison of pre-and post-rearrangement results of the present invention when an LSH hashing method is selected to generate a 128-dimensional hash code, returning the first 10 images; fig. 3 is a comparison of the results before and after rearrangement according to the present invention when the ITQ hashing method is selected to generate 128-dimensional hash codes and return the first 10 images. As can be seen from fig. 2 and fig. 3, the retrieval effect of the rearrangement method provided by the invention is obviously better than the result before rearrangement, and the retrieval accuracy is improved. Fig. 4 is a graph of average retrieval accuracy of the first 50 images returned before and after rearrangement of the retrieval results of the three hash methods when the hash dimensions are different. It can be seen from the figure that, with the increase of the hash dimension, the retrieval accuracy rate is higher and higher, and the accuracy rate improved by the method after rearrangement is higher and higher. Fig. 5 is a graph of average retrieval accuracy before and after rearrangement of the retrieval results of three hash methods according to the present invention when the number of returned images is different. The experimental result shows that the more the number of the returned images is, the lower the retrieval accuracy is, and the higher the accuracy improved by the method is.
The above examples illustrate that the invention can well solve the problem of sorting images with the same Hamming distance as the retrieval image, improve the retrieval accuracy and present better retrieval effect for users.

Claims (1)

1. A self-adaptive Hash rearrangement method facing image retrieval is characterized in that a Hash rearrangement method of firstly mapping and then sequencing is adopted, firstly, high-dimensional visual feature vectors of images in a training library are extracted, a Hash method is selected to map the high-dimensional visual features into Hash codes, and specific class weight vectors are generated for each class of images according to the correlation among different dimensions of each class of Hash codes in images of the training library; then, by calculating the Hamming distance between the Hash code of the retrieval image and the Hash code in the training library, returning the retrieval result in the order from small to large; calculating a self-adaptive weight vector of the retrieval image according to the retrieval result, constructing a weighted Hamming distance by using the self-adaptive weight vector of the retrieval image, and rearranging the returned image by using the weighted Hamming distance to obtain a more accurate retrieval result; the method comprises the following specific steps:
1) selecting a retrieval image q, and determining an image library IM and a training library T;
selecting a search image q, determining an image library IM containing N images and a training library T containing M images, namely IM ═ IM1,IM2,...,IMN},T={T1,T2,...,TM},
Wherein: m is more than 0 and less than N;
2) extracting visual features of the images to form an image feature library GIM and a training feature library GT;
for each image in the image library IM and the training library T, extracting the visual feature of the image by using a gist descriptor, wherein each image is represented by a 512-dimensional gist feature vector; the feature vectors of all the images in the image library IM form an image feature library GIM, { GIM ═ GIM1,GIM2,...,GIMNIn which GIM ∈ RN×512R represents a real number set, and each feature vector in the image feature library corresponds to each image in the image library one by one; the feature vectors of all the images in the training database T form a training feature database GT, where GT ═ GT1,GT2,...,GTMIn which GT ∈ RM×512Each feature vector in the training feature library corresponds to each image in the training library one by one; the feature vector of the search image q is Gq,Gq∈R1×512
3) Respectively generating a hash code with dimension d for each feature vector in the image feature library and the training feature library; respectively generating hash codes with dimension d for each feature vector in the image feature library GIM and the training feature library GT by using the existing hash method, and respectively representing HI as HI { HI ═ HI { (HI) }1,HI2,...,HINAnd HT ═ HT1,HT2,...HTMIn which HI e {0,1}N×dIs a matrix of dimension N × d, each element of the matrix being 0 or 1; HT is formed by {0,1}M×dIs a matrix of dimension M x d, each element of the matrix being 0 or1, the above; if the training library T contains k types of images together, where k is a positive integer, the hash code HT of the training library T can also be expressed asWhereinSet of hashes representing all images of class i in the training library T, where i ∈ [1, k ∈ ]](ii) a Taking class i of the training library as an example, the hash code set can be represented asIs composed ofA hash code of 0 or 1 for each matrix element, whereinThe number of images contained in the ith type of image of the training library T;
4) training images in a training library to obtain a class weight vector omegac
By comparing the ith type hash codes in the training library TCounting the number of 0 and 1 in each column of the vector, and respectively recording the number asAndrepresenting class i hash codes in training library TThe number of 0 and 1 on the r-th dimension hash code, wherein r is equal to [1, d ∈](ii) a Calculation training libraryClass i hash code in TCorresponding class weight vectorWhereinIs a d-dimensional vector, each element in the vector being a fraction greater than 0 and less than 1; order to max _ num c i , r = max { n u m 0 c i , r , n u m 1 c i , r } , Representing class i hash codesThe maximum number of 0 s or 1 s on the nth column is:
max _ num c i = { max _ num c i , 1 , max _ num c i , 2 , ... , max _ num c i , d } , to representThe maximum number of 0 s or 1 s on each column; order to The vector is a d-dimensional vector, each element in the vector is a decimal between 0.5 and 1, and the difference between ith type hash codes in the training library T is represented; based on the difference between i-th hash codesCalculating a weight vector corresponding to the ith dimension of the ith type hash code: when in use <math> <mrow> <msub> <mi>dp</mi> <mrow> <msub> <mi>c</mi> <mi>i</mi> </msub> <mo>,</mo> <mi>r</mi> </mrow> </msub> <mo>&Element;</mo> <mo>&lsqb;</mo> <msub> <mi>th</mi> <mi>j</mi> </msub> <mo>,</mo> <msub> <mi>th</mi> <mrow> <mi>j</mi> <mo>-</mo> <mn>1</mn> </mrow> </msub> <mo>)</mo> <mo>,</mo> <mi>j</mi> <mo>=</mo> <mn>1</mn> <mo>,</mo> <mn>...</mn> <mi>L</mi> </mrow> </math> When the temperature of the water is higher than the set temperature, <math> <mrow> <msub> <mi>&omega;</mi> <mrow> <msub> <mi>c</mi> <mi>i</mi> </msub> <mo>,</mo> <mi>r</mi> </mrow> </msub> <mo>=</mo> <mfrac> <msub> <mi>&omega;</mi> <msub> <mi>s</mi> <mi>j</mi> </msub> </msub> <mrow> <mi>&omega;</mi> <mo>_</mo> <mi>n</mi> <mi>o</mi> <mi>r</mi> <mi>m</mi> </mrow> </mfrac> <mo>,</mo> </mrow> </math> wherein,is a vectorThe r-th element of (1); th is { th ═ th1,...thLThe pixel value is a threshold vector preset according to an image library, and each element is a decimal number between 0.5 and 1;each element is a decimal number between 0 and 1 for a preset weight vector; l is a positive integer and is the number of preset weights;weight vector for class i hash codesThe r-th element of (1);for the normalization parameter, realizing the normalization of the weight vector; therefore, class i hash codes in the training library TThe corresponding weight vector isWhere i ∈ [1, k ]];
5) Calculating a self-adaptive weight vector of the retrieval image q;
hash code h of retrieval image q is calculated firstlyqAnd hash code h of image e in image libraryeHamming distance between themWhereinFor XOR operations between binary hash codes, distHammIs an integer between 0 and d, according to distHammSorting the corresponding images in the image library from small to large, taking out the TN images ranked at the top, wherein TN is a positive integer, and using a set SC to represent the category set corresponding to the TN images,representing the number of i-th images in the TN images, the adaptive weight calculation formula of the retrieval image q isWherein,for the ith type hash code in the training library TA corresponding weight vector;
6) constructing a self-adaptive Hamming distance, and rearranging the retrieval result;
hash code h for searching image qqAnd hash code h of image e in image libraryeThe adaptive hamming distance between is defined as:where · represents the Hadamard product between vectors, i.e. the multiplication of the elements corresponding to two vectors; according to distQARAnd rearranging the returned images from small to large to obtain a more accurate retrieval result.
CN201310123163.4A 2013-04-10 2013-04-10 Towards the self-adaptation Hash rearrangement method of image retrieval Expired - Fee Related CN103226585B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310123163.4A CN103226585B (en) 2013-04-10 2013-04-10 Towards the self-adaptation Hash rearrangement method of image retrieval

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310123163.4A CN103226585B (en) 2013-04-10 2013-04-10 Towards the self-adaptation Hash rearrangement method of image retrieval

Publications (2)

Publication Number Publication Date
CN103226585A CN103226585A (en) 2013-07-31
CN103226585B true CN103226585B (en) 2015-10-28

Family

ID=48837031

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310123163.4A Expired - Fee Related CN103226585B (en) 2013-04-10 2013-04-10 Towards the self-adaptation Hash rearrangement method of image retrieval

Country Status (1)

Country Link
CN (1) CN103226585B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992716A (en) * 2019-03-29 2019-07-09 电子科技大学 A kind of similar news recommended method of Indonesian based on ITQ algorithm

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104951791B (en) * 2014-03-26 2018-10-09 华为技术有限公司 data classification method and device
CN105095208A (en) * 2014-04-18 2015-11-25 华为技术有限公司 Method and device for matrix data index
CN104951559B (en) * 2014-12-30 2018-06-15 大连理工大学 A kind of two-value code rearrangement method based on position weight
CN106708823A (en) * 2015-07-20 2017-05-24 阿里巴巴集团控股有限公司 Search processing method, apparatus and system
CN106777388B (en) * 2017-02-20 2020-11-24 华南理工大学 Double-compensation multi-table Hash image retrieval method
CN109558890B (en) * 2018-09-30 2023-03-31 天津大学 Zero sample image classification method based on adaptive weight Hash loop countermeasure network
CN109710607B (en) * 2018-11-07 2021-09-17 宁波大学 Hash query method for high-dimensional big data based on weight solving
CN109634953B (en) * 2018-11-07 2021-08-17 宁波大学 Weighted quantization Hash retrieval method for high-dimensional large data set
CN109522435B (en) * 2018-11-15 2022-05-20 ***股份有限公司 Image retrieval method and device
CN110059206A (en) * 2019-03-29 2019-07-26 银江股份有限公司 A kind of extensive hashing image search method based on depth representative learning
CN112712090A (en) * 2019-10-24 2021-04-27 北京易真学思教育科技有限公司 Image processing method, device, equipment and storage medium
CN113407756B (en) * 2021-05-28 2022-10-11 山西云时代智慧城市技术发展有限公司 Lung nodule CT image reordering method based on self-adaptive weight

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7672976B2 (en) * 2006-05-03 2010-03-02 Ut-Battelle, Llc Method for the reduction of image content redundancy in large image databases
CN101710334A (en) * 2009-12-04 2010-05-19 大连理工大学 Large-scale image library retrieving method based on image Hash
CN102508910A (en) * 2011-11-11 2012-06-20 大连理工大学 Image retrieval method based on minimum projection errors of multiple hash tables

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7672976B2 (en) * 2006-05-03 2010-03-02 Ut-Battelle, Llc Method for the reduction of image content redundancy in large image databases
CN101710334A (en) * 2009-12-04 2010-05-19 大连理工大学 Large-scale image library retrieving method based on image Hash
CN102508910A (en) * 2011-11-11 2012-06-20 大连理工大学 Image retrieval method based on minimum projection errors of multiple hash tables

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109992716A (en) * 2019-03-29 2019-07-09 电子科技大学 A kind of similar news recommended method of Indonesian based on ITQ algorithm
CN109992716B (en) * 2019-03-29 2023-01-17 电子科技大学 Indonesia similar news recommendation method based on ITQ algorithm

Also Published As

Publication number Publication date
CN103226585A (en) 2013-07-31

Similar Documents

Publication Publication Date Title
CN103226585B (en) Towards the self-adaptation Hash rearrangement method of image retrieval
CN107577990B (en) Large-scale face recognition method based on GPU (graphics processing Unit) accelerated retrieval
Wang et al. Effective multi-query expansions: Collaborative deep networks for robust landmark retrieval
JP5926291B2 (en) Method and apparatus for identifying similar images
US10108620B2 (en) Associating still images and videos
CN108280187B (en) Hierarchical image retrieval method based on depth features of convolutional neural network
CN104036012B (en) Dictionary learning, vision bag of words feature extracting method and searching system
CN104112018B (en) A kind of large-scale image search method
CN105095435A (en) Similarity comparison method and device for high-dimensional image features
CN102890700A (en) Method for retrieving similar video clips based on sports competition videos
CN110751027B (en) Pedestrian re-identification method based on deep multi-instance learning
Nie et al. Convolutional deep learning for 3D object retrieval
CN111414958B (en) Multi-feature image classification method and system for visual word bag pyramid
CN109241315B (en) Rapid face retrieval method based on deep learning
CN104778272B (en) A kind of picture position method of estimation excavated based on region with space encoding
CN109918529A (en) A kind of image search method based on the quantization of tree-like cluster vectors
CN106951501B (en) Three-dimensional model retrieval method based on multi-graph matching
Sun et al. Search by detection: Object-level feature for image retrieval
JP6017277B2 (en) Program, apparatus and method for calculating similarity between contents represented by set of feature vectors
CN116861022A (en) Image retrieval method based on combination of deep convolutional neural network and local sensitive hash algorithm
CN116737877A (en) Cross-modal retrieval method and device based on attention network countermeasure hash
CN115050044B (en) Cross-modal pedestrian re-identification method based on MLP-Mixer
CN107423294A (en) A kind of community image search method and system
Chathurani et al. Content-based image (object) retrieval with rotational invariant bag-of-visual words representation
Jin et al. A novel visual-region-descriptor-based approach to sketch-based image retrieval

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151028

Termination date: 20210410

CF01 Termination of patent right due to non-payment of annual fee