Classification-based method for quickly searching images by images
By using the method of clustering first and then feature matching in the graph search method, combined with the dimensionality reduction and quantization of feature vectors, the speed problem caused by the large matching amount of feature vectors in the prior art is solved, and fast and accurate image retrieval is achieved.
Patent Information
- Application Number
- CN202411711340.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-04-15
AI Technical Summary
The existing graph search method uses a graph to search the graph when the matching amount of feature vectors is large, the matching speed is slow, making it difficult to meet the needs of fast retrieval, and at the same time, it is necessary to ensure the accuracy of retrieval.
The fast classification-based picture search method is adopted, and by clustering first and then matching features, the matching magnitude level is reduced, and on this basis, the feature vector dimension reduction and quantization are carried out to improve the search speed. At the same time, multiple clustering methods are used to fusion to ensure the accuracy of the search.
It significantly improves the search speed of image search, reduces the calculation amount of feature matching, and ensures the accuracy of retrieval, so that similar images can be quickly acquired in a large-scale feature vector library.
Smart Images

Figure CN119829784A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of information retrieval, and in particular relates to a classification-based fast image search method. Background Art
[0002] Information retrieval is an important way and means to quickly obtain the required information, that is, the process of finding the required information from the information collection by using certain methods and retrieval tools according to the needs. The common form of information retrieval is to enter keywords in text form and retrieve information that meets the keyword requirements from the database. With the advent of the artificial intelligence era, using sample images to retrieve similar images has gradually become another way to obtain relevant information, that is, image search.
[0003] Image search is to search for the same or similar images in a specified gallery. It is suitable for precise image search, similar material search, photo search for the same product, similar product recommendation and other scenarios. First, extract features from the images in the database. Currently, deep learning models are generally used to extract features, encode or represent the features and then store them in the database. Then, the same process is used to extract features from the images used for retrieval. Finally, the matching degree between feature vectors is calculated using similarity metrics, the matching results are sorted, and several images with high similarity are returned as search results.
[0004] Image search methods often use the method of traversing and matching in the database to retrieve images, which results in a slow speed. Assuming that the matching speed of a feature vector is 0.01 milliseconds, if the feature vector is in the millions, then the matching time will also be 10 seconds, which is generally difficult to meet the requirements. When the feature vector is in the tens of millions, the speed may be even slower. Summary of the invention
[0005] 1. Technical issues to be resolved
[0006] The technical problem to be solved by the present invention is: in view of the situation where the number of feature vector matches is large and the matching speed needs to be improved, a fast retrieval method is proposed to solve the speed problem of image search by image, while ensuring the accuracy of image search by image.
[0007] (II) Technical solution
[0008] In order to solve the above technical problems, the present invention provides.
[0009] (III) Beneficial effects
[0010] The present invention provides a classification-based fast image search method, which mainly solves the speed problem of image search. In view of the situation where the feature vector matching amount is large and the matching speed needs to be improved, a fast retrieval method is proposed. A coarse-to-fine and hierarchical approach is adopted to reduce the matching level, and on this basis, feature vector dimension reduction and quantization are performed to further improve the retrieval speed. At the same time, different methods are adopted to ensure the accuracy of image search. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 This is a flow chart of first clustering and then performing feature matching to obtain image search results of the present invention;
[0012] Figure 2 A diagram of the image search process based on the fusion of multiple clustering results of the present invention;
[0013] Figure 3 This is a flow chart of the classifier-based category prediction and feature vector matching of the present invention. DETAILED DESCRIPTION
[0014] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.
[0015] The process of image search is to extract feature vectors from the image to be matched. The image is input into the pre-trained deep network model, and a multi-dimensional feature vector is obtained through the convolution layer and pooling layer of the network. The feature vector can be regarded as a representation point of the image in the high-dimensional space. Here, it is assumed that the feature vector has been extracted. The closer the feature vectors are, the more similar the image contents represented by the two points are. The feature vector is used for matching to obtain candidate images similar to the image to be matched.
[0016] It is relatively time-consuming to traverse the entire database and calculate the similarity of feature vectors one by one, especially when the feature vector library is large and the feature vector dimension is high. There is a screening solution that uses auxiliary information of the image for screening, such as image content type, geographic tags, etc. In addition, there are also ways to improve the image retrieval speed from a hardware perspective, such as high-performance computing and parallel computing, and high-performance retrieval systems. The above ideas and methods are not considered here. Only how to quickly obtain similar Top N feature vectors, that is, N images with the highest similarity, from the perspective of algorithms and data processing without image auxiliary information and image prior information is considered.
[0017] After obtaining the feature vectors of the image, to evaluate whether the images corresponding to the two feature vectors are the same or similar, it is necessary to calculate the similarity of the two feature vectors. The measurement and calculation of similarity often use Euclidean distance or cosine similarity. The specific distance similarity calculation method is not considered here, nor is it improved. All calculation methods are applicable in the present invention.
[0018] There are two direct ways to improve the speed of image search: one is to reduce the number of feature vectors to be matched; the other is to reduce the computational complexity of feature matching or to increase the speed of feature matching. At the same time, it is necessary to increase the speed of image search without reducing or improving the accuracy of image search.
[0019] In a classification-based fast image search method provided by the present invention, first, it is assumed that the feature vector of the candidate feature vector library is represented by X = {X1, X2, ..., X n}, where n is the total number of feature vectors. Depending on different scenarios and database capacity, n varies and is a relatively large order of magnitude, such as millions, tens of millions, or even hundreds of millions. The i-th feature vector is represented by X i ={x i1 ,x i2 ,…,x im}, where m is the dimension of the feature vector, which is usually 256, 512, 1024, 2048, or 4096. Assume that the feature vector of the graph to be matched is Y = {y1, y2, …, y m}. The values in the feature vector are generally floating point values. Then, the following scheme is executed:
[0020] Solution 1: Use the image search method of clustering first and then feature matching
[0021] This solution proposes a method of searching images by image by clustering first and then using distance calculation for feature matching to improve the speed of searching images by image. Clustering in this step is the first layer of clustering. An intuitive idea to reduce the amount of calculation is to reduce the number of feature vectors that need to be calculated. Because the content, style, and style of an image are diverse, the corresponding irrelevant feature vectors will also occupy a large proportion. If these feature vectors can be excluded and only feature vectors with strong correlation, similarity, or high probability are focused on, the amount of feature matching calculation can be greatly reduced, and the efficiency of obtaining search results by image can be improved.
[0022] A feature vector is a set of abstract data. You can consider using data analysis or data mining methods to classify a set of feature vectors. Classification requires labels, but labels are difficult to obtain for abstract data. Using unsupervised clustering methods to cluster feature vectors and applying a label that has no practical meaning is an intuitive method. After determining that the feature vector to be matched belongs to a certain category, match the feature vectors one by one in the category. For example, if the category is selected as 1 / 20 of the total number of feature vectors n, the amount of calculation will be reduced to 1 / 20. Here, the clustering of feature vectors can be run offline, so it does not take up the online process time of image search.
[0023] refer to Figure 1 , the specific steps of Scheme 1 are:
[0024] Step 11: Assume that the number of input categories is 1 / 20 of the total number of feature vectors n in the candidate feature vector library, the domain parameter is 1 / 10 of the maximum distance between feature vectors, the number of core point neighbors is 10, and the number starting from 1 is used as the label or identification form of the category;
[0025] Step 12: Cluster the feature vectors in the candidate feature vector library using the DBSCAN clustering algorithm to make the intra-class feature difference small and the inter-class feature difference large, and obtain the centroid feature vector of each category by calculating the average value of the feature vector of a certain category in the clustering result;
[0026] Step 13: Use the feature vector to be matched to calculate the distance with the centroid feature vector of each category, sort them from large to small according to the distance, and consider the category corresponding to the minimum distance as the category to which the feature vector to be matched belongs;
[0027] Step 14: Accurately calculate the distance between the feature vector to be matched and the feature vector in the category determined in step 13, and sort them in ascending order of distance to obtain the top N feature vectors;
[0028] Step 15: Obtain the image corresponding to the feature vector obtained in step 14 as the result of image search.
[0029] Solution 2: Based on the first-level clustering in Solution 1, each clustering result is clustered again, i.e., the second-level clustering, to further improve the speed of image search.
[0030] Solution 1 adopts the method of clustering first to narrow the range of candidate feature vectors, which reduces the amount of calculation. Based on the first-level clustering categories obtained in Solution 1, this solution continues to cluster within each category. The specific steps are as follows:
[0031] Step 21: Based on the clustering in Scheme 1, clustering is continued within each category, i.e., the second-level clustering;
[0032] Step 22: using the feature vector to be matched to calculate the minimum distance with the feature vector of the centroid of each category in the second layer, so as to obtain the subcategory to which the feature vector to be matched belongs;
[0033] Step 23: accurately calculating the distance between the feature vector to be matched and each candidate feature vector in the subcategory;
[0034] Step 24: Sort the distances obtained in step 23 from small to large to obtain the top N candidate feature vectors, thereby obtaining the corresponding image.
[0035] Solution 2 is to execute step 11, step 12, step 21 to step 24.
[0036] Solution 3: Based on Solution 1 and Solution 2, the feature vector is reduced in dimension to reduce the computational complexity of feature matching, increase the speed of feature matching, and further increase the speed of image search.
[0037] The general feature vector is 256-dimensional, 512-dimensional or even higher. Data dimensionality reduction refers to converting high-dimensional data into a low-dimensional space to extract and retain the main information in the data while reducing redundant and irrelevant features. This solution uses the PCA (principal component analysis) method to project the data into a new coordinate system through orthogonal transformation, so that the variance of the data in the new coordinate system is maximized. The specific steps are as follows:
[0038] Step 31: Combine the feature vector to be matched and all candidate feature vectors by columns to form a matrix, which is a feature vector set;
[0039] Step 32: Apply PCA method to the matrix to reduce dimension;
[0040] Step 33: Use the feature vector after dimension reduction to calculate the distance between the feature vector to be matched and the candidate feature vector, and sort them in order of distance from small to large to obtain the Top N feature vectors;
[0041] Step 34: Return the image corresponding to the N feature vectors obtained in step 33.
[0042] Solution 3 is to execute step 11, step 12, step 21, step 31, step 32, and step 22-step 24, and when executing step 22-step 24, the feature vector to be matched is replaced by the feature vector to be matched after dimensionality reduction, and each candidate feature vector is replaced by each candidate feature vector after dimensionality reduction.
[0043] Solution 4: Convert all feature vectors from floating point values to integers to increase the speed of single feature matching
[0044] The data of the feature vector is generally floating point type, that is, it contains decimals. In computers, the operation speed of floating point values is lower than that of integers. Therefore, based on schemes 1, 2, and 3, the feature vector is quantized, that is, the feature vector is quantized from floating point values to integer values to further improve the speed of image search. The quantization process is:
[0045] Step 41: Scan all candidate feature vectors and obtain the maximum value X max With the minimum value X min ;
[0046] Step 42: Scan the candidate feature vectors to be matched and obtain the maximum value y max With the minimum value y min ;
[0047] Step 43: Compare the two sets of maximum and minimum values obtained in step 41 and step 42, and obtain the larger maximum value and the smaller minimum value, which are recorded as x max With x min ;
[0048] Step 44: Set the number of quantized bits to b and the maximum value of the quantized integer data to 2 b-1 , the value range is [0,2 b -1], here, quantized to int16, then the number of bits b is 16, and the value range after quantization is [0,65535];
[0049] Step 45: Calculate the scale factor Zero Value in, Indicates a round-down operation;
[0050] Step 46: quantize the candidate feature vector values, Quantify the feature vector values to be matched,
[0051] Step 47: Perform distance calculation on each quantized feature vector.
[0052] Scheme 4 is to execute steps 11, 12, 21, 31, 32, 41-46, and 22-24, wherein when executing steps 22-24, the feature vector to be matched is replaced by the feature vector to be matched after dimensionality reduction and quantization, and each candidate feature vector is replaced by each candidate feature vector after dimensionality reduction and quantization.
[0053] Solution 5: Based on solutions 1, 2, 3, and 4, a multi-clustering method is used for fusion to improve the speed and accuracy of image search.
[0054] Common clustering methods include K-means clustering, mean shift clustering, DBSCAN, etc. These methods each have their own characteristics and applicable scenarios. For example, K-means clustering is suitable for clustering analysis of large-scale data sets. It is simple and easy to implement and suitable for continuous numerical data, large-scale data, and high-dimensional data. However, it is sensitive to initial values and may lead to different clustering results. Mean shift clustering is a density-based clustering algorithm that is suitable for data sets with uneven density. DBSCAN is a density-based clustering algorithm that is suitable for clustering analysis of large-scale data sets with uneven density.
[0055] Taking into account the incomplete accuracy of a single clustering result and the need to ensure the accuracy of image search, we consider using multiple clustering methods simultaneously and fusing the results. Figure 2 It is a process of image search based on the fusion of multiple clustering results.
[0056] The specific steps are:
[0057] Step 50: Assume that the number of input categories is 1 / 20 of the total number of feature vectors n in the candidate feature vector library, the domain parameter is 1 / 10 of the maximum distance between feature vectors, the number of core point neighbors is 10, and the number starting from 1 is used as the label or identification form of the category;
[0058] Step 51: clustering the feature vectors in the candidate feature vector library using K-means clustering, mean shift clustering, and DBSCAN respectively;
[0059] Step 52: for the clustering results of each method, calculate the distance between the feature vector to be matched and the centroid feature vector of each class;
[0060] Step 53: Obtain the distance matching result and clustering result of the feature vector to be matched for each clustering result;
[0061] Step 54: In each category, calculate the distance between the feature vectors one by one, and sort them from small to large in terms of distance to obtain the top N candidate feature vectors;
[0062] Step 55: Summarize the obtained candidate feature vectors and extract repeated candidate feature vectors; if the number of repeated candidate feature vectors has reached N, return these N candidate feature vectors and jump to step 58; otherwise, assuming that the number of repeated candidate feature vectors is n, jump to step 56;
[0063] Step 56: Sort the remaining candidate feature vectors by distance from small to large, and select the Top Nn candidate feature vectors;
[0064] Step 57: sort the TopN-n candidate feature vectors and the repeated n candidate feature vectors in ascending order of distance;
[0065] Step 58: Return the images corresponding to the Top N candidate feature vectors.
[0066] When executing steps 52 to 54, the feature vector to be matched is replaced by the feature vector to be matched after dimension reduction and quantization, and each candidate feature vector is replaced by each candidate feature vector after dimension reduction and quantization.
[0067] Solution 6: Feature matching is replaced by distance calculation with classifier training and prediction to improve accuracy
[0068] This step replaces the distance feature matching with the classifier method on the basis of schemes 1, 2, 3, 4, and 5, so as to further improve the accuracy of image search. After obtaining the clustering results, it is necessary to determine which category the feature vector to be matched belongs to. There are two ways to determine the method. One is to calculate the Euclidean distance or cosine similarity between the feature vector to be matched and the feature vector of each category of centroid, and select the Top N categories with the smallest distance. The other is to use the neural network-based classification method or the SVM-based classification method to train the classifier based on the clustering results, and then use the feature vector to be matched as the input of the classifier to obtain the output label of the feature vector and the confidence of the corresponding label, and select the label corresponding to the high confidence.
[0069] The accuracy of the feature vector matching method based on distance calculation is relatively low when determining the category to which the feature vector to be matched belongs. Therefore, considering the calculation speed and resource occupation factors, the data classification method based on SVM is used instead of the method based on distance calculation. Figure 3 For processing flow.
[0070] The specific steps are:
[0071] Step 60: Assume that the number of input categories is 1 / 20 of the total number of feature vectors n in the candidate feature vector library, the domain parameter is 1 / 10 of the maximum distance between feature vectors, the number of core point neighbors is 10, and the number starting from 1 is used as the label or identification form of the category;
[0072] Step 61: clustering the feature vectors in the candidate feature vector library using K-means clustering, mean shift clustering, and DBSCAN respectively;
[0073] Step 62: For the clustering results of each method, calculate the distance between the feature vector to be matched and the centroid feature vector of each class;
[0074] Step 63: Obtain the distance matching result and clustering result of the feature vector to be matched for each clustering result;
[0075] Step 64: taking the feature vector in a certain clustering result category as the input data of the classifier, the output result is the cluster label or category identifier, which is a digital identifier in this case, and performing classifier training to obtain a classifier corresponding to a certain category;
[0076] Step 65: Input the feature vector to be matched into each classifier for prediction, and select the category with the highest confidence as the category to which the feature vector belongs according to the principle of highest confidence;
[0077] Step 66: In each category, calculate the distance between the feature vectors one by one, and sort them from small to large in terms of distance to obtain the top N candidate feature vectors;
[0078] Step 67: Summarize the candidate feature vectors and extract repeated candidate feature vectors; if the number of repeated candidate feature vectors has reached N, return these N candidate feature vectors and jump to step 610; otherwise, assuming that the number of repeated candidate feature vectors is n, jump to step 69;
[0079] Step 68: Sort the remaining candidate feature vectors by distance from small to large, and select the Top Nn candidate feature vectors;
[0080] Step 69: sort the TopN-n candidate feature vectors and the repeated n candidate feature vectors in ascending order of distance;
[0081] Step 610: Return the images corresponding to the Top N candidate feature vectors.
[0082] When executing steps 62 to 63 and steps 64 to 66, the feature vector to be matched is replaced by the feature vector to be matched after dimension reduction and quantization, and each candidate feature vector is replaced by each candidate feature vector after dimension reduction and quantization.
[0083] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A classification-based fast image search method, characterized in that: First, assume that the feature vector of the candidate feature vector library is represented by X = {X1, X2, ..., X n }, where n is the total number of eigenvectors; the i-th eigenvector is represented by X i ={x i1 ,x i2 ,…,x im }, where m is the dimension of the feature vector; assuming that the feature vector of the graph to be matched is Y = {y1, y2, ..., y m }; Then, execute the following scheme: Solution 1: Use the image search method of clustering first and then feature matching This scheme proposes an image search method that first clusters and then uses distance calculation for feature matching. In this scheme, clustering is the first layer of clustering, that is, the feature vectors are clustered using an unsupervised clustering method. When it is determined that the feature vector to be matched belongs to a certain category, the feature vectors are matched one by one in the category.
2. The method according to claim 1, characterized in that The specific steps of Solution 1 are: Step 11: Assume that the number of input categories is 1 / 20 of the total number of feature vectors n in the candidate feature vector library, the domain parameter is 1 / 10 of the maximum distance between feature vectors, the number of core point neighbors is 10, and the number starting from 1 is used as the label or identification form of the category; Step 12: Cluster the feature vectors in the candidate feature vector library using the DBSCAN clustering algorithm to make the intra-class feature difference small and the inter-class feature difference large, and obtain the centroid feature vector of each category by calculating the average value of the feature vector of a certain category in the clustering result; Step 13: Use the feature vector to be matched to calculate the distance with the centroid feature vector of each category, sort them from large to small according to the distance, and consider the category corresponding to the minimum distance as the category to which the feature vector to be matched belongs; Step 14: Accurately calculate the distance between the feature vector to be matched and the feature vector in the category determined in step 13, and sort them in ascending order of distance to obtain the top N feature vectors; Step 15: Obtain the image corresponding to the feature vector obtained in step 14 as the result of image search.
3. The method according to claim 1, characterized in that Replace Implementation 1 with Implementation 2: Step 21: Assume that the number of input categories is 1 / 20 of the total number of feature vectors n in the candidate feature vector library, the domain parameter is 1 / 10 of the maximum distance between feature vectors, the number of core point neighbors is 10, and the number starting from 1 is used as the label or identification form of the category; Step 22: cluster the feature vectors in the candidate feature vector library using the DBSCAN clustering algorithm so that the intra-class feature difference is small and the inter-class feature difference is large, and obtain the centroid feature vector of each category by calculating the average value of the feature vector of a certain category in the clustering result; Step 23: Continue clustering within each category, i.e., the second level of clustering; Step 24: using the feature vector to be matched to calculate the minimum distance with the feature vector of the centroid of each category in the second layer, so as to obtain the subcategory to which the feature vector to be matched belongs; Step 25: Accurately calculate the distance between the feature vector to be matched and each candidate feature vector in the subcategory; Step 26: Sort the distances obtained in step 25 from small to large to obtain the top N candidate feature vectors, thereby obtaining the corresponding image.
4. The method according to claim 1, characterized in that Replace Implementation 1 with Implementation 3: Step 31: Assume that the number of input categories is 1 / 20 of the total number of feature vectors n in the candidate feature vector library, the domain parameter is 1 / 10 of the maximum distance between feature vectors, the number of core point neighbors is 10, and the number starting from 1 is used as the label or identification form of the category; Step 32: clustering the feature vectors in the candidate feature vector library using the DBSCAN clustering algorithm so that the intra-class feature difference is small and the inter-class feature difference is large, and the centroid feature vector of each category is obtained by calculating the average value of the feature vector of a certain category in the clustering result; Step 33: Continue clustering within each category, i.e., the second level of clustering; Step 34: Combine the feature vector to be matched and all candidate feature vectors by columns to form a matrix, which is a feature vector set; Step 35: Apply PCA method to the matrix to reduce dimension; Step 36: Use the feature vector after dimension reduction to calculate the distance between the feature vector to be matched and the candidate feature vector, and sort them in order of distance from small to large to obtain the Top N feature vectors; Step 37: Return the image corresponding to the N feature vectors obtained in step 36.
5. The method according to claim 1, characterized in that Replace Implementation 1 with Implementation 4: Step 41: Assume that the number of input categories is 1 / 20 of the total number of feature vectors n in the candidate feature vector library, the domain parameter is 1 / 10 of the maximum distance between feature vectors, the number of core point neighbors is 10, and the number starting from 1 is used as the label or identification form of the category; Step 42: clustering the feature vectors in the candidate feature vector library using the DBSCAN clustering algorithm so that the intra-class feature difference is small and the inter-class feature difference is large, and obtaining the centroid feature vector of each category by calculating the average value of the feature vector of a certain category in the clustering result; Step 43: Continue clustering within each category, i.e., the second level of clustering; Step 44: Combine the feature vector to be matched and all candidate feature vectors by columns to form a matrix, which is a feature vector set; Step 45: Apply PCA method to the matrix to reduce dimension; Step 46: Scan all candidate feature vectors and obtain the maximum value X max With the minimum value X min ; Step 47: Scan the candidate feature vectors to be matched and obtain the maximum value y max With the minimum value y min ; Step 48: Compare the two sets of maximum and minimum values obtained in step 46 and step 47, and obtain the larger maximum value and the smaller minimum value, which are recorded as x max With x min ; Step 49: Set the number of quantized bits to b and the maximum value of the quantized integer data to 2 b-1 , the value range is [0,2 b -1], here, quantized to int16, then the number of bits b is 16, and the value range after quantization is [0,65535]; Step 410: Calculate scale factor Zero Value in, Indicates a round-down operation; Step 411: quantize the candidate feature vector values. Quantify the feature vector values to be matched, Step 412: using the feature vector to be matched to calculate the minimum distance with the feature vector of the centroid of each category in the second layer, so as to obtain the subcategory to which the feature vector to be matched belongs; Step 413: accurately calculating the distance between the feature vector to be matched and each candidate feature vector in the subcategory; Step 414: sorting the distances obtained in step 413 from small to large to obtain the top N candidate feature vectors, thereby obtaining the corresponding image; When executing steps 412 to 414, the feature vector to be matched is replaced by the feature vector to be matched after dimension reduction and quantization, and each candidate feature vector is replaced by each candidate feature vector after dimension reduction and quantization.
6. The method according to claim 1, characterized in that Replace Implementation 1 with Implementation 5: Step 50: Assume that the number of input categories is 1 / 20 of the total number of feature vectors n in the candidate feature vector library, the domain parameter is 1 / 10 of the maximum distance between feature vectors, the number of core point neighbors is 10, and the number starting from 1 is used as the label or identification form of the category; Step 51: clustering the feature vectors in the candidate feature vector library using K-means clustering, mean shift clustering, and DBSCAN respectively; Step 52: for the clustering results of each method, calculate the distance between the feature vector to be matched and the centroid feature vector of each class; Step 53: Obtain the distance matching result and clustering result of the feature vector to be matched for each clustering result; Step 54: In each category, calculate the distance between the feature vectors one by one, and sort them from small to large in terms of distance to obtain the top N candidate feature vectors; Step 55: Summarize the obtained candidate feature vectors and extract repeated candidate feature vectors; if the number of repeated candidate feature vectors has reached N, return these N candidate feature vectors and jump to step 58; otherwise, assuming that the number of repeated candidate feature vectors is n, jump to step 56; Step 56: Sort the remaining candidate feature vectors by distance from small to large, and select the Top Nn candidate feature vectors; Step 57: sort the TopN-n candidate feature vectors and the repeated n candidate feature vectors in ascending order of distance; Step 58: Return the images corresponding to the Top N candidate feature vectors; When executing steps 52 to 54, the feature vector to be matched is replaced by the feature vector to be matched after dimension reduction and quantization, and each candidate feature vector is replaced by each candidate feature vector after dimension reduction and quantization.
7. The method according to claim 1, characterized in that Replace Implementation 1 with Implementation 6: Step 60: Assume that the number of input categories is 1 / 20 of the total number of feature vectors n in the candidate feature vector library, the domain parameter is 1 / 10 of the maximum distance between feature vectors, the number of core point neighbors is 10, and the number starting from 1 is used as the label or identification form of the category; Step 61: clustering the feature vectors in the candidate feature vector library using K-means clustering, mean shift clustering, and DBSCAN respectively; Step 62: For the clustering results of each method, calculate the distance between the feature vector to be matched and the centroid feature vector of each class; Step 63: Obtain the distance matching result and clustering result of the feature vector to be matched for each clustering result; Step 64: taking the feature vector in a certain clustering result category as the input data of the classifier, the output result is the cluster label or category identifier, which is a digital identifier in this case, and performing classifier training to obtain a classifier corresponding to a certain category; Step 65: Input the feature vector to be matched into each classifier for prediction, and select the category with the highest confidence as the category to which the feature vector belongs according to the principle of highest confidence; Step 66: In each category, calculate the distance between the feature vectors one by one, and sort them from small to large in terms of distance to obtain the top N candidate feature vectors; Step 67: Summarize the candidate feature vectors and extract repeated candidate feature vectors; if the number of repeated candidate feature vectors has reached N, return these N candidate feature vectors and jump to step 610; otherwise, assuming that the number of repeated candidate feature vectors is n, jump to step 69; Step 68: Sort the remaining candidate feature vectors by distance from small to large, and select the Top Nn candidate feature vectors; Step 69: sort the TopN-n candidate feature vectors and the repeated n candidate feature vectors in ascending order of distance; Step 610: Return the images corresponding to the Top N candidate feature vectors; When executing steps 62 to 63 and steps 64 to 66, the feature vector to be matched is replaced by the feature vector to be matched after dimension reduction and quantization, and each candidate feature vector is replaced by each candidate feature vector after dimension reduction and quantization.
8. The method according to any one of claims 1 to 7, characterized in that This method is applied in information retrieval.
9. A system for implementing the method according to any one of claims 1 to 8.
10. The system according to claim 9, characterized in that The system is applied in information retrieval.