Image retrieval method and device, electronic device, and readable storage medium

By acquiring and processing the local visual features of the image to be recognized and generating expression vectors, the problem of low retrieval accuracy and efficiency in the existing technology is solved, and more efficient image retrieval is achieved.

CN111783805BActive Publication Date: 2024-08-23BOE TECHNOLOGY GROUP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910273228.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-04
Publication Date
2024-08-23
Estimated Expiration
2040-02-10

AI Technical Summary

Technical Problem

Existing image retrieval technology fails to make full use of the visual features of the image to be recognized, resulting in low retrieval accuracy and efficiency.

Method used

By obtaining the local visual features of the image to be recognized, the expression vector composed of its residual vector is determined, and processed using cluster analysis and dimensionality reduction algorithms to generate a list of candidate images.

Benefits of technology

It improves the accuracy and efficiency of image retrieval, makes full use of the visual features of the image to be recognized, and improves the accuracy of retrieval of candidate images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111783805B
    Figure CN111783805B
Patent Text Reader

Abstract

The present invention relates to an image retrieval method and device, an electronic device, and a readable storage medium. An image retrieval method includes: obtaining local visual features of an image to be identified; determining an expression vector of the image to be identified composed of a residual vector of the local visual features based on the local visual features; and retrieving a list of candidate images whose similarity to the expression vector exceeds a similarity threshold from a candidate image library. In this embodiment, the residual vector of the local visual features is used, which is conducive to further expressing the visual features of the image to be identified, thereby improving the accuracy of retrieving candidate images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an image retrieval method and device, electronic equipment, and a readable storage medium. Background Art

[0002] At present, image retrieval has a very promising application prospect by inputting an image to be identified and retrieving a list of images similar to the image to be identified and the corresponding text, video or web page links.

[0003] The existing workflow of related image retrieval algorithms includes: extracting visual features of the image to be identified; constructing a feature index or image expression; making similarity judgments based on the distance between image features or image expressions (such as Euclidean distance, cosine distance, etc.); and providing a list of similar images.

[0004] However, the related technology only utilizes part of the visual features and distance information in the image to be identified, and does not fully utilize the visual features of the image to be identified, which is not conducive to improving the accuracy and efficiency of the retrieval of the image to be identified. Summary of the invention

[0005] The present invention provides an image retrieval method and device, an electronic device, and a readable storage medium to solve the problems of low retrieval accuracy and low retrieval efficiency in the related art caused by the fact that the visual features of the image to be identified are not fully utilized.

[0006] According to a first aspect of an embodiment of the present invention, there is provided an image retrieval method, comprising:

[0007] Obtaining local visual features of the image to be recognized;

[0008] Determine, based on the local visual feature, an expression vector of the image to be recognized, which is composed of a residual vector of the local visual feature;

[0009] A list of candidate images whose similarity with the expression vector exceeds a similarity threshold is retrieved from the candidate image library.

[0010] Optionally, determining, based on the local visual feature, an expression vector of the image to be recognized formed by a residual vector of the local visual feature comprises:

[0011] Calling an image classification quantizer, wherein the image classification quantizer determines the clusters and subclasses to which each local visual feature belongs; the image classification quantizer includes K1 clusters and corresponding K1 cluster centers, as well as K2 subclasses divided from each cluster in the K1 clusters and distance demarcation thresholds of each subclass;

[0012] Obtain the residual vectors of all local visual features belonging to the same subclass and the cumulative sum vector of K1*K2 residual vectors, wherein the cumulative sum vector is the expression vector of the image to be identified, wherein K1 and K2 are positive integers.

[0013] Optionally, determining the cluster and subclass to which each local visual feature belongs includes:

[0014] The cluster analysis algorithm is used to obtain the distance and residual vector between each local visual feature and each cluster center;

[0015] Determine the cluster where the cluster center closest to each local visual feature is located as the cluster to which each local visual feature belongs;

[0016] The subclass to which the local visual feature belongs is determined based on the distance and the distance boundary threshold of each subclass in the cluster.

[0017] Optionally, after obtaining the residual vectors of all local visual features belonging to the same subclass and the accumulated sum vector of K1*K2 residual vectors, the method further includes:

[0018] Normalizing the accumulated sum vector to obtain a normalized accumulated sum vector;

[0019] Connect the normalized accumulated sum vectors end to end to get a long vector;

[0020] The long vector is subjected to dimensionality reduction processing by using a dimensionality reduction algorithm to obtain a long vector after dimensionality reduction, and the long vector after dimensionality reduction is the expression vector of the image to be identified.

[0021] Optionally, the image classification quantizer is trained by the following steps, including:

[0022] Obtain local visual features of each image in the image training set;

[0023] Performing cluster analysis on the local visual features using a cluster analysis algorithm to obtain the K1 clusters and the cluster centers of each cluster;

[0024] For each cluster, obtain the distance between the local visual features within each cluster and the cluster center of each cluster and the maximum distance value; based on the maximum distance value, divide each cluster into K2 subclasses, and obtain the distance boundary threshold of each subclass. The number of the distance boundary thresholds is K1*K2, and the subclasses in the same cluster do not overlap.

[0025] Optionally, each cluster is divided into K2 subclasses based on the maximum distance value, and a distance threshold of each subclass is obtained, including:

[0026] For each cluster, the maximum distance value is divided into K2 segments, and the local visual features corresponding to each segment constitute a subclass, thereby obtaining K2 subclasses; and the maximum distance between each segment and the cluster center of the cluster is the distance boundary threshold of the subclass corresponding to each segment.

[0027] Optionally, the clustering analysis algorithm includes a K-means algorithm.

[0028] According to a second aspect of an embodiment of the present invention, there is provided an image retrieval device, comprising:

[0029] A visual feature acquisition module, used to acquire local visual features of the image to be identified;

[0030] An expression vector determination module, used to determine, based on the local visual feature, an expression vector of the image to be identified, which is composed of a residual vector of the local visual feature;

[0031] The image retrieval module is used to retrieve a list of candidate images whose similarity with the expression vector exceeds a similarity threshold from a candidate image library.

[0032] Optionally, the expression vector determination module includes:

[0033] A cluster determination unit, used to call an image classification quantizer, and the image classification quantizer determines the clusters and subclasses to which each local visual feature belongs; the image classification quantizer includes K1 clusters and corresponding K1 cluster centers, as well as K2 subclasses divided from each cluster in the K1 clusters and distance demarcation thresholds of each subclass;

[0034] The sum vector acquisition unit is used to obtain the residual vectors of all local visual features belonging to the same subclass and the cumulative sum vector of K1*K2 residual vectors, wherein the cumulative sum vector is the expression vector of the image to be identified, wherein K1 and K2 are positive integers.

[0035] Optionally, the cluster determination unit includes:

[0036] A distance acquisition subunit, used to obtain the distance and residual vector between each local visual feature and each cluster center by using a cluster analysis algorithm;

[0037] A cluster acquisition subunit, used to determine the cluster where the cluster center closest to each local visual feature is located as the cluster to which each local visual feature belongs;

[0038] The subclass acquisition subunit is used to determine the subclass to which the local visual feature belongs based on the distance and the distance boundary threshold of each subclass in the cluster.

[0039] Optionally, the sum vector acquisition unit further includes:

[0040] A sum vector acquisition subunit, used for normalizing the accumulated sum vector to obtain a normalized accumulated sum vector;

[0041] A long vector connection subunit, used for connecting the normalized accumulated sum vectors end to end to obtain a long vector;

[0042] The expression vector acquisition subunit is used to perform dimensionality reduction processing on the long vector using a dimensionality reduction algorithm to obtain a long vector after dimensionality reduction, and the long vector after dimensionality reduction is the expression vector of the image to be identified.

[0043] Optionally, the image classification quantizer is trained by the following steps, including:

[0044] Obtain local visual features of each image in the image training set;

[0045] Performing cluster analysis on the local visual features using a cluster analysis algorithm to obtain the K1 clusters and the cluster centers of each cluster;

[0046] For each cluster, obtain the distance between the local visual features within each cluster and the cluster center of each cluster and the maximum distance value; based on the maximum distance value, divide each cluster into K2 subclasses, and obtain the distance boundary threshold of each subclass. The number of the distance boundary thresholds is K1*K2, and the subclasses in the same cluster do not overlap.

[0047] According to a third aspect of an embodiment of the present invention, there is provided an electronic device, comprising a processor and a memory for storing executable instructions; the processor is connected to the memory via a communication bus, and is used to read executable instructions from the memory to implement the steps of the method described in the first aspect.

[0048] According to a fourth aspect of an embodiment of the present invention, a machine-readable storage medium is provided, on which machine-executable instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0049] As can be seen from the above technical solution, in this embodiment, the local visual features of the image to be identified can be obtained, and then the expression vector of the image to be identified composed of the residual vector of the local visual features can be determined, and then a list of candidate images whose similarity with the expression vector exceeds a preset similarity threshold can be retrieved. In this way, the residual vector of the local visual features is used in this embodiment, which is conducive to further expressing the visual features of the image to be identified, thereby improving the accuracy of retrieving candidate images.

[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0052] Figure 1 is a block diagram of an image retrieval method shown in an embodiment of the present invention;

[0053] Figure 2 is a flow chart of obtaining an expression vector shown in an embodiment of the present invention;

[0054] Figure 3 is a flow chart of obtaining a distance demarcation threshold value shown in an embodiment of the present invention;

[0055] Figure 4 is a flow chart of obtaining cluster subclasses shown in an embodiment of the present invention;

[0056] Figure 5 1 is a schematic diagram showing the effect of dividing K1 clusters and K2 subclasses according to an embodiment of the present invention;

[0057] Figure 6 is another flow chart of obtaining expression vectors shown in an embodiment of the present invention;

[0058] Figure 7 to Figure 10 is a block diagram of an image detection device shown in an embodiment of the present invention;

[0059] Fig.11 It is a block diagram of an electronic device shown in an embodiment of the present invention. DETAILED DESCRIPTION

[0060] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention as detailed in the appended claims.

[0061] At present, image retrieval has a very promising application prospect by inputting an image to be identified and retrieving a list of images similar to the image to be identified and the corresponding text, video or web page links.

[0062] The existing workflow of related image retrieval algorithms includes: extracting visual features of the image to be identified; constructing a feature index or image expression; making similarity judgments based on the distance between image features or image expressions (such as Euclidean distance, cosine distance, etc.); and providing a list of similar images.

[0063] However, the related technology only utilizes part of the visual features and distance information in the image to be identified, and does not fully utilize the visual features of the image to be identified, which is not conducive to improving the accuracy and efficiency of the retrieval of the image to be identified.

[0064] To solve the above problems, an embodiment of the present invention provides an image retrieval method, the inventive concept of which is to obtain local visual features of an image to be identified, and then determine a residual vector of the local visual features, use the residual vector to form an expression vector of the image to be identified, and then determine a candidate image list based on the expression vector. In this embodiment, by using the residual vector, the features of the image to be identified can be fully utilized, which is conducive to improving the accuracy of image retrieval.

[0065] Figure 1 is a block diagram of an image retrieval method shown in an embodiment of the present invention, see Figure 1 , an image retrieval method can be applied to electronic devices, such as smart phones, tablet computers, personal computers, etc., including steps 101 to 103, wherein:

[0066] In step 101, local visual features of an image to be recognized are obtained.

[0067] In this embodiment, the electronic device may obtain an image to be recognized input by a user, and then the electronic device may call a visual feature acquisition algorithm to extract local visual features of the image to be recognized.

[0068] Among them, the visual feature acquisition algorithm may include a scale-invariant feature transform (SIFT) algorithm, a SURF (Speed ​​Up Robust Features) algorithm, an ORB algorithm (Oriented FAST and Rotated BRIE), and the like.

[0069] Taking the SIFT algorithm as an example, obtaining local visual features includes:

[0070] 1. Scale space extrema detection: Search for image positions at all scales on the image to be identified, and use Gaussian differential functions to identify potential points of interest that are invariant to scale and rotation.

[0071] 2. Key point positioning: For each candidate point of interest, a fitting model is used to determine the position and scale, and the points of interest with high position and scale stability are taken as key points.

[0072] 3. Direction determination: Based on the local gradient direction of the image to be identified, one or more directions are assigned to each key point position. In the subsequent process, the image to be identified is transformed based on the direction, scale and position of the key point.

[0073] 4. Key point description: In the neighborhood around each key point, the local gradient of the image to be identified is measured at a selected scale, where the gradient can be transformed into a representation vector that allows for relatively large local shape deformation and illumination changes. In other words, the above representation vector is the local visual feature of the image to be identified.

[0074] It is understandable that this embodiment only describes the SIFT algorithm's scheme for acquiring visual features. Of course, technicians can choose a suitable visual feature acquisition algorithm based on the specific scenario. When local visual features can be acquired, the corresponding algorithm and algorithm scheme fall within the protection scope of this application.

[0075] In step 102, an expression vector of the image to be recognized, which is composed of a residual vector of the local visual feature, is determined based on the local visual feature.

[0076] In this embodiment, the electronic device may determine a residual vector of the local visual feature and an expression vector of the image to be recognized formed by the residual vector based on the local visual feature.

[0077] See also Figure 2 , the electronic device can call a pre-stored image classification quantizer, which can determine the clusters and subclasses to which each local visual feature belongs after acquiring the local visual features; wherein the image classification quantizer includes K1 clusters and corresponding K1 cluster centers, and K2 subclasses divided from each cluster in the K1 clusters and the distance demarcation threshold of each subclass (corresponding to step 201). wherein K1 and K2 are positive integers.

[0078] Among them, each local visual feature is represented by a description vector, and each cluster center can also be represented by a vector. Therefore, the residual vector of each local visual feature can be obtained by subtracting each local visual feature from the cluster center corresponding to the cluster to which it belongs.

[0079] In this embodiment, see Figure 3, the electronic device determines the cluster and subclass to which each local visual feature belongs, which may include: the electronic device may use a cluster analysis algorithm to obtain the distance and residual vector between each local visual feature and each cluster center (corresponding to step 301); then, the electronic device may determine that the cluster where the cluster center closest to each local visual feature is located is the cluster to which each local visual feature belongs (corresponding to step 302); thereafter, the electronic device may determine the subclass to which the local visual feature belongs based on the distance and the distance boundary threshold of each subclass within the cluster (corresponding to step 303).

[0080] It is understandable that the above image classification quantizer needs to be pre-trained, see Figure 4 The training step may include: the electronic device may obtain an image training set. Based on the image training set, the electronic device may obtain each image in the image training set, and then obtain local visual features of each image (corresponding to step 401).

[0081] Then, the electronic device performs cluster analysis on the local visual features using a cluster analysis algorithm to obtain K1 clusters and cluster centers of each cluster (corresponding to step 402). The cluster analysis algorithm may include a K-means algorithm, and of course the technician may also select other clustering algorithms, which are not limited here.

[0082] Afterwards, for each cluster, the electronic device obtains the distance between the local visual features within each cluster and the cluster center of each cluster and the maximum distance value; based on the maximum distance value, each cluster is divided into K2 subclasses, and the distance boundary threshold of each subclass is obtained. The number of distance boundary thresholds is K1*K2, and the subclasses in the same cluster do not overlap with each other (corresponding to step 403).

[0083] In one embodiment, for each cluster, the distance is evenly divided into K2 classes according to the maximum distance. For example, K2 concentric circles are formed with the cluster center of the cluster as the center and the maximum distance dividing position as the radius. The local visual features in each circular area are regarded as a subclass, and the dividing position is the distance dividing threshold. That is, in this embodiment, the maximum distance value can be divided into K2 segments, and the local visual features in the area formed by each segment are regarded as a subclass. The boundary between the area corresponding to each segment and the area corresponding to other segments can be used as the distance dividing threshold. See Figure 5 , Figure 5 It is shown in the figure that K1 is equal to 4, that is, the image to be identified has 4 clusters and 4 cluster centers, where the 4 clusters are K11, K12, K13 and K14. Cluster K11 can be further divided into 3 subclasses with K2 equal to 3, where the 3 subclasses can include subclasses K21, K22 and K23. The distance demarcation thresholds of each subclass are L1, L2 and L3 respectively.

[0084] Continue to see Figure 2 , the electronic device can obtain the residual vectors of all local visual features belonging to the same subclass and the cumulative sum vector of K1*K2 residual vectors, and the cumulative sum vector is the expression vector of the image to be identified (corresponding to step 202). In this way, in this embodiment, by further dividing the clusters to obtain K2 subclasses of each cluster, more detailed local visual features of the image to be identified can be obtained, that is, the obtained expression vector can more accurately reflect the more detailed local visual features of the image to be identified, which is conducive to improving the retrieval accuracy.

[0085] In some embodiments, see Figure 6 , the electronic device can normalize the cumulative sum vector, thereby obtaining a normalized cumulative sum vector (corresponding to step 601). Then, the electronic device connects the normalized cumulative sum vector end to end to obtain a long vector (corresponding to step 602). After that, the electronic device uses a dimensionality reduction algorithm to perform dimensionality reduction on the long vector to obtain a long vector after dimensionality reduction, and the long vector after dimensionality reduction is the expression vector of the image to be identified (corresponding to step 602). In this way, in this embodiment, by processing the cumulative sum vector, the dimension of the vector can be reduced, which is beneficial to reducing the amount of data processing and improving retrieval efficiency.

[0086] In this embodiment, the electronic device quantifies each local visual feature by: using k-means, that is, calculating the closest one of the K1 cluster centers to each local visual feature, indicating that the local visual feature belongs to the cluster. In addition, the electronic device also calculates the residual vector and the distance value between the local visual feature and the cluster center. Then, according to the distance value, it can be determined in which area of ​​the K2 areas the local visual feature is located, thereby determining the subclass to which the local visual feature belongs.

[0087] After determining the subclasses to which all local visual features belong, if two local visual features belong to the same subclass, their residual vectors are accumulated, and the above steps are repeated multiple times to obtain K1*K2 residual cumulative sum vectors. In some scenarios, the above residual cumulative sum vector is the cumulative sum vector.

[0088] In some embodiments, the electronic device also normalizes the residual cumulative sum vectors respectively, and connects K1*K2 residual cumulative sum vectors end to end into a long vector, the dimension of which is D=K1*K2*d (set feature dimension). Then, the long vector is normalized to obtain a normalized long vector. Afterwards, the normalized long vector is reduced in dimension using a dimensionality reduction algorithm to obtain a long vector after dimensionality reduction, which is the final cumulative sum vector. Among them, the dimensionality reduction algorithm may include a principal component analysis algorithm (Principal Components Analysis, PCA). Of course, the technician may also choose other dimensionality reduction algorithms, which are not limited here.

[0089] In this way, the electronic device has completed the training steps of the image classification quantizer. The electronic device obtains the K1 cluster center, K2 distance thresholds, and the long vector after PCA dimension reduction obtained during the training process. Then, the electronic device obtains the local visual features of each test image, obtains its expression vector, and uses the PCA algorithm to reduce the dimension of the expression vector. Finally, the electronic device calculates the similarity between the test image and the training image, using calculation methods such as cosine distance, Euclidean distance, etc., and selects the training image with the highest similarity to the test image to complete the test process.

[0090] In step 103, a list of candidate images whose similarity with the expression vector exceeds a similarity threshold is retrieved from the candidate image library.

[0091] In this embodiment, the electronic device calculates the similarity between the expression vector of the image to be identified and the expression vector of each candidate image in the candidate image library, compares the similarity with the similarity threshold, and if the similarity exceeds the similarity threshold, adds the candidate image to the candidate image list until the candidate image library is screened or the pre-set number of candidate images is reached.

[0092] At this point, in this embodiment, the local visual features of the image to be identified can be obtained, and then the expression vector of the image to be identified formed by the residual vector of the local visual features can be determined, and then a list of candidate images whose similarity with the expression vector exceeds a preset similarity threshold can be retrieved. In this way, the residual vector of the local visual features is used in this embodiment, which is conducive to further expressing the visual features of the image to be identified, thereby improving the accuracy of retrieving candidate images.

[0093] Based on an image retrieval method provided in an embodiment of the present invention, an image retrieval device is also provided in an embodiment of the present invention. Figure 7 is a block diagram of an image detection device shown in an embodiment of the present invention. Figure 7 , an image retrieval device 700, comprising:

[0094] The visual feature acquisition module 701 is used to acquire local visual features of the image to be recognized;

[0095] An expression vector determination module 702, configured to determine, based on the local visual feature, an expression vector of the image to be identified, which is composed of a residual vector of the local visual feature;

[0096] The image retrieval module 703 is used to retrieve a list of candidate images whose similarity with the expression vector exceeds a similarity threshold from the candidate image library.

[0097] exist Figure 7 Based on an image retrieval device shown in Figure 8 , the expression vector determination module 702 includes:

[0098] The cluster determination unit 801 is used to call an image classification quantizer, and the image classification quantizer determines the clusters and subclasses to which each local visual feature belongs; the image classification quantizer includes K1 clusters and corresponding K1 cluster centers, as well as K2 subclasses divided from each cluster in the K1 clusters and distance demarcation thresholds of each subclass;

[0099] The sum vector acquisition unit 802 is used to obtain the residual vectors of all local visual features belonging to the same subclass and the cumulative sum vector of K1*K2 residual vectors, where the cumulative sum vector is the expression vector of the image to be identified, wherein K1 and K2 are positive integers.

[0100] exist Figure 8 Based on an image retrieval device shown in Fig. 9 , the cluster determination unit 801 includes:

[0101] The distance acquisition subunit 901 is used to acquire the distance and residual vector between each local visual feature and each cluster center by using a cluster analysis algorithm;

[0102] The cluster acquisition subunit 902 is used to determine the cluster where the cluster center closest to each local visual feature is located as the cluster to which each local visual feature belongs;

[0103] The subclass acquisition subunit 903 is configured to determine the subclass to which the local visual feature belongs based on the distance and the distance demarcation threshold of each subclass in the cluster.

[0104] exist Figure 8 Based on an image retrieval device shown in Fig.10 , the sum vector acquisition unit 802 further includes:

[0105] A sum vector acquisition subunit 1001 is used to normalize the accumulated sum vector to obtain a normalized accumulated sum vector;

[0106] The long vector connection subunit 1002 is used to connect the normalized accumulated sum vectors end to end to obtain a long vector;

[0107] The expression vector acquisition subunit 1003 is used to perform dimensionality reduction processing on the long vector using a dimensionality reduction algorithm to obtain a long vector after dimensionality reduction, and the long vector after dimensionality reduction is the expression vector of the image to be identified.

[0108] In one embodiment, the image classification quantizer is trained by the following steps, including:

[0109] Obtain local visual features of each image in the image training set;

[0110] Performing cluster analysis on the local visual features using a cluster analysis algorithm to obtain the K1 clusters and the cluster centers of each cluster;

[0111] For each cluster, obtain the distance between the local visual features within each cluster and the cluster center of each cluster and the maximum distance value; based on the maximum distance value, divide each cluster into K2 subclasses, and obtain the distance boundary threshold of each subclass. The number of the distance boundary thresholds is K1*K2, and the subclasses in the same cluster do not overlap.

[0112] Fig.11 is a block diagram of an electronic device shown in an embodiment of the present invention, see Fig.11 , an electronic device 1100, comprising a processor 1101 and a memory 1102 for storing executable instructions; the processor 1101 is connected to the memory 1102 via a communication bus 1103, and is used to read the executable instructions from the memory 1102 to implement Figure 1 to Figure 6 The steps of the image retrieval method are shown.

[0113] The embodiment of the present invention also provides a machine-readable storage medium on which machine-executable instructions are stored, and when the instructions are executed by a processor, Figure 1 to Figure 6 The steps of the image retrieval method are shown.

[0114] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the disclosure disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed by the present invention. The description and examples are to be considered exemplary only, and the true scope and spirit of the present invention are indicated by the following claims.

[0115] It should be understood that the present invention is not limited to the exact construction that has been described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.

Claims

1. An image retrieval method, characterized in that: include: Obtaining local visual features of the image to be recognized; Determine, based on the local visual feature, an expression vector of the image to be recognized, which is composed of a residual vector of the local visual feature; Retrieving a list of candidate images whose similarity to the expression vector exceeds a similarity threshold from a candidate image library; Determining, based on the local visual feature, an expression vector of the image to be recognized formed by a residual vector of the local visual feature, comprising: Calling an image classification quantizer, wherein the image classification quantizer determines the clusters and subclasses to which each local visual feature belongs; the image classification quantizer includes K1 clusters and corresponding K1 cluster centers, as well as K2 subclasses divided from each cluster in the K1 clusters and distance demarcation thresholds of each subclass; Obtain the residual vectors of all local visual features belonging to the same subclass and the cumulative sum vector of K1*K2 residual vectors, wherein the cumulative sum vector is the expression vector of the image to be identified, wherein K1 and K2 are positive integers.

2. The image retrieval method according to claim 1, characterized in that: Determining the clusters and subclasses to which each local visual feature belongs includes: The cluster analysis algorithm is used to obtain the distance and residual vector between each local visual feature and each cluster center; Determine the cluster where the cluster center closest to each local visual feature is located as the cluster to which each local visual feature belongs; The subclass to which the local visual feature belongs is determined based on the distance and the distance boundary threshold of each subclass in the cluster.

3. The image retrieval method according to claim 1, characterized in that: After obtaining the residual vectors of all local visual features belonging to the same subclass and the accumulated sum vector of K1*K2 residual vectors, the method further includes: Normalizing the accumulated sum vector to obtain a normalized accumulated sum vector; Connect the normalized accumulated sum vectors end to end to get a long vector; The long vector is subjected to dimensionality reduction processing by using a dimensionality reduction algorithm to obtain a long vector after dimensionality reduction, and the long vector after dimensionality reduction is the expression vector of the image to be identified.

4. The image retrieval method according to claim 1, characterized in that: The image classification quantizer is trained by the following steps, including: Obtain local visual features of each image in the image training set; Performing cluster analysis on the local visual features using a cluster analysis algorithm to obtain the K1 clusters and the cluster centers of each cluster; For each cluster, obtain the distance between the local visual features within each cluster and the cluster center of each cluster and the maximum distance value; based on the maximum distance value, divide each cluster into K2 subclasses, and obtain the distance boundary threshold of each subclass. The number of the distance boundary thresholds is K1*K2, and the subclasses in the same cluster do not overlap.

5. The image retrieval method according to claim 4, characterized in that: Based on the maximum distance value, each cluster is divided into K2 subclasses, and the distance threshold of each subclass is obtained, including: For each cluster, the maximum distance value is divided into K2 segments, and the local visual features corresponding to each segment constitute a subclass, thereby obtaining K2 subclasses; and the maximum distance between each segment and the cluster center of the cluster is the distance boundary threshold of the subclass corresponding to each segment.

6. The image retrieval method according to claim 4, characterized in that: The clustering analysis algorithm includes a K-means algorithm.

7. An image retrieval device, characterized in that: include: A visual feature acquisition module, used to acquire local visual features of the image to be identified; An expression vector determination module, used to determine, based on the local visual feature, an expression vector of the image to be identified, which is composed of a residual vector of the local visual feature; An image retrieval module, used to retrieve a list of candidate images whose similarity with the expression vector exceeds a similarity threshold from a candidate image library; The expression vector determination module comprises: A cluster determination unit, used to call an image classification quantizer, and the image classification quantizer determines the clusters and subclasses to which each local visual feature belongs; the image classification quantizer includes K1 clusters and corresponding K1 cluster centers, as well as K2 subclasses divided from each cluster in the K1 clusters and distance demarcation thresholds of each subclass; The sum vector acquisition unit is used to obtain the residual vectors of all local visual features belonging to the same subclass and the cumulative sum vector of K1*K2 residual vectors, wherein the cumulative sum vector is the expression vector of the image to be identified, wherein K1 and K2 are positive integers.

8. The image retrieval device according to claim 7, characterized in that: The cluster determination unit comprises: A distance acquisition subunit, used to obtain the distance and residual vector between each local visual feature and each cluster center by using a cluster analysis algorithm; A cluster acquisition subunit, used to determine the cluster where the cluster center closest to each local visual feature is located as the cluster to which each local visual feature belongs; The subclass acquisition subunit is used to determine the subclass to which the local visual feature belongs based on the distance and the distance boundary threshold of each subclass in the cluster.

9. The image retrieval device according to claim 7, characterized in that: The sum vector acquisition unit also includes: A sum vector acquisition subunit, used for normalizing the accumulated sum vector to obtain a normalized accumulated sum vector; A long vector connection subunit, used for connecting the normalized accumulated sum vectors end to end to obtain a long vector; The expression vector acquisition subunit is used to perform dimensionality reduction processing on the long vector using a dimensionality reduction algorithm to obtain a long vector after dimensionality reduction, and the long vector after dimensionality reduction is the expression vector of the image to be identified.

10. The image retrieval device according to claim 7, characterized in that: The image classification quantizer is trained by the following steps, including: Obtain local visual features of each image in the image training set; Performing cluster analysis on the local visual features using a cluster analysis algorithm to obtain the K1 clusters and the cluster centers of each cluster; For each cluster, obtain the distance between the local visual features within each cluster and the cluster center of each cluster and the maximum distance value; based on the maximum distance value, divide each cluster into K2 subclasses, and obtain the distance boundary threshold of each subclass. The number of the distance boundary thresholds is K1*K2, and the subclasses in the same cluster do not overlap.

11. An electronic device, characterized in that: It comprises a processor and a memory for storing executable instructions; the processor is connected to the memory via a communication bus and is used to read the executable instructions from the memory to implement the steps of the method described in any one of claims 1 to 6.

12. A machine-readable storage medium having machine-executable instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.