Information processing device, information processing method, and program

By constructing a hash table with bins set to a specific width and using feature vectors for search area determination and distance calculation, the method addresses inefficiencies in nearest-neighbor search, achieving high efficiency and accuracy in classifying objects.

WO2025142390A1PCT designated stage expired Publication Date: 2025-07-03OMRON CORP
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2024/043113
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-28
Filing Date
2024-12-05
Publication Date
2025-07-03

AI Technical Summary

Technical Problem

Existing methods for nearest-neighbor search using the hash method lack an effective way to appropriately delimit the hash, leading to inefficiencies in search efficiency and accuracy.

Method used

A hash table is constructed with bins set to a specific width (first distance) for efficient nearest-neighbor search, using feature vectors to determine search areas and calculate distances, reducing bias and enabling quick classification of objects into classes.

Benefits of technology

This approach provides a highly efficient hash search method for classifying objects by finding reference data within a predetermined threshold, enhancing search speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2024043113_03072025_PF_FP_ABST
    Figure JP2024043113_03072025_PF_FP_ABST
Patent Text Reader

Abstract

The present invention constructs a hash table with high search efficiency in nearest neighbor search using a hash method. The present invention comprises: a data storage unit that stores, in a hash table in which the width of each bin is set to a first distance, reference data represented by a feature vector representing an object to be classified into a first class; a feature amount calculation unit that calculates a feature vector representing a determination object for which classification as the first class is to be determined; a search region determination unit that calculates a hash value by using the feature vector representing the determination object, and determines a bin corresponding to the hash value as a search-object bin in the hash table; a distance calculation unit that calculates the distance between each reference data item stored in the search-object bin and a query represented by the feature vector representing the determination object; and a classification unit that determines whether or not the determination object is classified into the first class by comparing the first distance and the distance between each reference data item and the query.
Need to check novelty before this filing date? Find Prior Art

Description

Information processing device, information processing method, and program CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application is based on Japanese Application No. 2023-222409 filed on December 28, 2023, the contents of which are incorporated herein by reference.

[0002] The present invention relates to an information processing device, an information processing method, and a program for classifying objects to be determined using nearest neighbor search.

[0003] Nearest neighbor search is a method for searching for the closest point in a metric space, and searches for the point in reference data (points) that is most similar (closest) to a point indicated by a query, i.e., the nearest neighbor. A specific method of nearest neighbor search is known to be a method using a hashing method. For example, Patent Document 1 describes a method for efficiently searching for nearest neighbors using a hashing method by narrowing down the area to be searched based on the distance between a representative point in an area (bin) corresponding to a hash index and the query.

[0004] WO 2013 / 129580

[0005] In order to perform a fast and accurate nearest neighbor search using the hashing method, it is effective to set appropriate hash divisions for the distribution of each reference data to be searched. However, no prior studies have been conducted on how to appropriately divide hashes in a hash search.

[0006] An object of the present invention is to construct a hash table that allows for highly efficient search in nearest neighbor searches using a hashing method.

[0007] In order to solve the above-mentioned problem, the present invention employs the following configuration. An information processing device according to one aspect of the present invention includes: a data storage unit that stores reference data represented by a feature vector that represents an object classified into a first class in a hash table, each bin having a width set to a first distance; a feature calculation unit that calculates a feature vector that represents an object to be classified into the first class; a search area determination unit that calculates a hash value using the feature vector that represents the object to be classified and determines a bin corresponding to the hash value as a search target bin in the hash table; a distance calculation unit that calculates the distance between each piece of reference data stored in the search target bin and a query that is represented by the feature vector that represents the object to be classified; and a classification unit that determines whether the object to be classified into the first class by comparing the distance between each piece of reference data and the query with the first distance. This configuration provides a highly efficient hash search method for tasks such as classifying objects by searching for reference data whose distance from the query is within a predetermined threshold (first distance).

[0008] The data storage unit may determine the base elements based on statistics of each element of the feature vector representing each reference data, thereby reducing bias in the reference data stored in each bin of the hash table and improving the efficiency of searches within the bins.

[0009] The distance calculation unit may also search bins near the bin corresponding to the hash value, thereby efficiently searching for nearest points (points whose distance from the query is equal to or less than a threshold) that may exist in the nearby bins.

[0010] Furthermore, the distance calculation unit may terminate calculation of the distance between the query and other reference data when reference data whose distance to the query is less than or equal to the first distance is found, and the classification unit may determine that the target to be determined is classified into the first class. This allows for efficient and accurate classification of the target to be determined.

[0011] Furthermore, the classification unit may determine that the target object is not classified into the first class if no reference data whose distance from the query is equal to or less than the first distance is found, thereby enabling efficient and accurate classification of the target object.

[0012] The distance calculation unit may determine the search order of nearby bins based on the distance between the query and the representative point of each nearby bin. This allows the search to be performed in order starting from the nearby bin where the nearest point is more likely to exist, increasing the possibility of quickly finding reference data whose distance is equal to or less than a threshold (first distance), thereby enabling efficient classification of the object to be determined.

[0013] Alternatively, the hash table may have coordinates of the axes or reference data transformed to maximize the number of bins containing one or more reference data, thereby reducing the number of reference data contained in each bin and enabling efficient hash searches.

[0014] The data storage unit may also be configured to thin out reference data whose mutual distance is equal to or less than the first distance, thereby appropriately reducing the number of reference data to be searched and enabling efficient hash search.

[0015] The distance calculation unit may determine a nearest point from among the reference data based on the distance between each piece of reference data and the query, and the classification unit may classify the object to be determined by comparing the distance between the query and the nearest point with the first distance. This allows the object to be classified after identifying the nearest point.

[0016] According to one aspect of the present invention, an information processing device includes: a data storage unit that stores reference data represented by a feature vector that represents an object classified into a first class in a hash table having a minimum bin width set to a first distance; a feature calculation unit that calculates a feature vector that represents an object to be determined as being classified into the first class; a search area determination unit that calculates a hash value using the feature vector that represents the object to be determined and determines a bin corresponding to the hash value as a search target bin in the hash table; a distance calculation unit that calculates the distance between each piece of reference data stored in the search target bin and a query that is represented by the feature vector that represents the object to be determined; and a classification unit that determines whether the object to be determined is classified into the first class by comparing the distance between each piece of reference data and the query with the first distance. This configuration provides a highly efficient hash search technique for tasks such as searching for reference data whose distance from the query is within a predetermined threshold (first distance).

[0017] According to one aspect of the present invention, an inspection device uses the information processing device to determine whether an object to be determined is to be classified as a non-defective product, wherein the query is a point represented by a feature vector calculated from image data obtained by capturing an image of the object to be determined, the reference data is a point represented by a feature vector calculated from image data of an object to be classified as a non-defective product, and the classification unit classifies the object to be determined as a non-defective product when there is reference data whose distance from the query is smaller than the first distance. With the above configuration, it is possible to efficiently classify the object as a non-defective product using the image data of the object to be determined.

[0018] An information processing method according to one aspect of the present invention is an information processing method executed by a computer, the method including the steps of: storing reference data represented by a feature vector representing an object classified into a first class in a hash table, each bin having a width set to a first distance; calculating a feature vector representing an object to be determined as to whether it is classified into the first class; calculating a hash value using the feature vector representing the object to be determined and determining a bin corresponding to the hash value as a search target bin in the hash table; calculating a distance between each piece of reference data stored in the search target bin and a query represented by the feature vector representing the object to be determined; and comparing the distance between each piece of reference data and the query with the first distance to determine whether the object to be determined is classified into the first class. This configuration provides a highly efficient hash search technique for tasks such as classifying objects by searching for reference data whose distance from the query is within a predetermined threshold (first distance).

[0019] A program according to one aspect of the present invention causes a computer to function as: a data storage unit that stores reference data represented by a feature vector that represents an object classified into a first class in a hash table, the width of each bin being set to a first distance; a feature calculation unit that calculates a feature vector that represents an object to be classified into the first class; a search area determination unit that calculates a hash value using the feature vector that represents the object to be classified and determines a bin corresponding to the hash value as a search target bin in the hash table; a distance calculation unit that calculates the distance between each piece of reference data stored in the search target bin and a query represented by the feature vector that represents the object to be classified; and a classification unit that determines whether the object to be classified into the first class by comparing the distance between each piece of reference data and the query with the first distance. With the above configuration, a highly efficient hash search method can be provided for tasks such as classifying objects to be classified by searching for reference data whose distance from the query is within a predetermined threshold (first distance).

[0020] According to the present invention, a hash table with high search efficiency can be constructed in a nearest neighbor search using a hashing method.

[0021] FIG. 1 is a diagram showing an overview of a hash table constructed by an information processing device 1 according to an embodiment of the present invention. FIG. 2 is a diagram showing an example of the hardware configuration of an information processing device 1 according to an embodiment of the present invention. FIG. 3 is a diagram showing an example of the functional configuration of an information processing device 1 according to an embodiment of the present invention. FIG. 4 is a flowchart of a procedure for constructing a hash table according to an embodiment of the present invention. FIG. 5 is a flowchart of a procedure for classifying non-defective products into defective products according to an embodiment of the present invention. FIG. 6 is a diagram explaining a search range for nearest points according to an embodiment of the present invention. FIG. 7 is a diagram explaining an example of a method for determining the order in which searches are performed for eight surrounding bins according to an embodiment of the present invention. FIG. 8 is a diagram explaining another example of a method for constructing a hash table according to an embodiment of the present invention.

[0022] An embodiment according to one aspect of the present invention (hereinafter also referred to as "the present embodiment") will be described below with reference to the drawings. However, the embodiment described below is merely an example of the present invention in all respects. Needless to say, various improvements and modifications can be made without departing from the scope of the present invention. In other words, when implementing the present invention, specific configurations according to the embodiment may be appropriately adopted. Note that, although data appearing in this embodiment is described in natural language, more specifically, it may be specified in any of computer-recognizable pseudo-language, commands, parameters, or machine language, but is not limited to these.

[0023] §1 Application Examples The present invention can be applied to, for example, an inspection device that uses an image of a product (object to be judged) to classify the product into a good product (first class) or a defective product. Specifically, a feature vector is extracted from image data of the object to be judged using existing image processing technology, and the distance between a point (query) represented by the feature vector and a point (good product data) represented by each feature vector registered in a good product model is calculated. If the distance is less than a predetermined threshold (first distance), the product is judged to be good; if not, the product is judged to be defective. A feature vector is a one-dimensional matrix representation of multiple feature quantities obtained from image data. A good product model is a collection of feature vectors representing good products, for example, a collection of feature vectors obtained from multiple images of good products. As image processing techniques, SIFT (Scale-Invariant Feature Transform), HOG (Histograms of Oriented Gradients), SURF (Speeded Up Robust Features), LBP (Local Binary Pattern), etc. can be used, and a trained CNN (convolutional neural network), etc. may also be used. In the present invention, a nearest neighbor search using a hashing method is used to efficiently search for good-quality data whose distance from the query is equal to or less than a predetermined threshold from among the good-quality data.

[0024] FIG. 1A is a diagram illustrating an example of a distribution of points represented by multiple feature vectors constituting a non-defective product model. FIG. 1B is a diagram illustrating an example of a hash table in which the points represented by the feature vectors in FIG. 1A are hashed using a hash function and stored in corresponding bins. A feature vector is generally a high-dimensional vector (F = {f1, f2, f3, ..., fN}), but as shown in FIG. 1B, the hash table is constructed in two dimensions, and point P (non-defective product data) represented by each feature vector included in the non-defective product model is represented as a point in two-dimensional space. The present invention uses the constructed hash table to efficiently search for a point Q (query) represented by a feature vector extracted from an image of the product to be evaluated from multiple non-defective product data P.

[0025] §2 Configuration Example (1. Hardware Configuration) FIG. 2 is a diagram illustrating an example of the hardware configuration of an information processing device 1 according to this embodiment. The information processing device 1 is a computer including a processor 11, a main memory 12, an input / output interface 13, a communication interface 14, and a storage device 15. The storage device 15 is a computer-readable recording medium such as a semiconductor memory (e.g., a volatile memory or a non-volatile memory, but not limited to these) or a disk medium (e.g., a magnetic recording medium or a magneto-optical recording medium, but not limited to these). The storage device 15 stores a program to be executed by the processor 11. The program is loaded from the storage device 15 into the main memory 12 and interpreted and executed by the processor 11. The storage device 15 also includes a database 2. The database 2 may be implemented in an external storage device. The database 2 stores, for example, a constructed hash table.

[0026] (2. Functional Configuration) Fig. 3 is a diagram showing an example of the functional configuration of the information processing device 1. As shown in Fig. 3, the information processing device 1 includes a data storage unit 101, a feature amount calculation unit 102, a search area determination unit 103, a distance calculation unit 104, and a classification unit 105. The data storage unit 101, the feature amount calculation unit 102, the search area determination unit 103, the distance calculation unit 104, and the classification unit 105 are functional modules executed by the processor 11.

[0027] §3 Operational Example Next, the operation of the information processing device 1 according to this embodiment will be described. (Construction of a Hash Table) First, the procedure for constructing a hash table will be described using the flowchart in FIG. 4. Here, as an example, feature vectors constituting a good-quality product model, acquired from images of products classified as good products (first class) using image processing technology such as CNN, are stored in a hash table. Hereinafter, the feature vectors constituting the good-quality product model or the points represented by the feature vectors will be referred to as good-quality product data (reference data). Also, the feature vectors of the product to be judged as good or defective, or the points represented by the feature vectors, will be referred to as queries. Also, here, the hash table is composed of two-dimensional axes (bases). First, the data storage unit 101 determines the axes of the hash table (step S101). The data storage unit 101 may use two of the elements of the feature vector as axes. For example, any two elements, such as the first two elements, may be used as axes. Alternatively, elements with large variance in the values ​​of each feature vector may be used as axes. Specifically, the magnitude of variation can be determined based on statistics such as the variance of the values ​​of the elements of each feature vector. By using elements with large variations as axes, when good-quality data is stored in a hash table, it is more likely that the good-quality data will be stored dispersedly across more bins rather than concentrated in a specific bin. Furthermore, the two axes do not necessarily have to be the elements of the feature vector; two new axes different from the elements of the feature vector may be set. In this case, a mapping from the space of feature vectors to a two-dimensional space using the two new axes is defined, and points in the two-dimensional space are uniquely determined corresponding to points represented by the feature vectors. The mapping can be expressed by a function.

[0028] After determining the axis, the data storage unit 101 next determines the width of the bins (step S102). The bin width is set to the same value as the threshold T (first distance) used to determine whether a product is good or bad based on the distance between the query and the good product data. Note that it is not necessary to set the width of all bins in the hash table to the same value as the threshold T; the width of the smallest bin among the bins may be set to the same value as the threshold T.

[0029] Once the bin width is determined, the data storage unit 101 stores the non-defective data in a hash table (step S103). Specifically, first, a hash value is calculated for each non-defective data item. The hash value is obtained using a hash function. The hash value may be calculated, for example, by dividing the values ​​of two elements (e.g., two elements with large variance) determined as bases among the non-defective data items by a threshold value T. The data storage unit 101 stores each non-defective data item in the corresponding bin based on the hash value. Note that if two new axes different from the elements of the feature vector are set, the hash value may be calculated as a quotient obtained by dividing the values ​​of each axis calculated by a function representing the mapping by the threshold value T. The hash value is also called a hash index.

[0030] (Searching for nearest neighbors of a query and classifying a product into a good product and a defective product) Next, the procedure for searching for nearest neighbors of a query and classifying a product into a good product and a defective product will be described using the flowchart in Fig. 5. First, the feature amount calculation unit 102 extracts a feature vector of the product to be judged (step S201). The feature vector is extracted from an image of the product to be judged using existing image processing technology, similar to the feature vectors that constitute the good product model.

[0031] Next, the search area determination unit 103 calculates a hash value of the query (step S202). As in the case of non-defective data, the hash value may be calculated as a quotient obtained by dividing, by a threshold value T, the values ​​of two elements determined as bases among the elements of the feature vector to be determined. If two axes different from the elements of the feature vector are set, the hash value may be calculated by dividing, by a threshold value T, the values ​​of each axis calculated by a function representing the mapping.

[0032] Next, the search area determination unit 103 determines the bin corresponding to the calculated hash value as the bin to be searched (step S203).

[0033] Next, the distance calculation unit 104 determines whether or not there is non-defective data in the bin (bin B0) determined as the search target (step S204). If there is non-defective data (step S204: YES), the process proceeds to step S205, where one non-defective data is identified.

[0034] The distance calculation unit 104 calculates the distance d1 between the identified non-defective product data (P1) and the query (Q) (step S206). The distance calculation is not the distance in the space of the dimensions of the hash table (two dimensions), but the distance in the space of the dimensions of the original feature vector before hashing of the two points. In other words, if the feature vector is originally an N-dimensional vector, the distance in the N-dimensional space is calculated.

[0035] The distance calculation unit 104 determines whether the calculated distance is equal to or less than the threshold value T (step S207). If the distance d1 is equal to or less than the threshold value T (step S207: YES), the non-defective data P1 is determined to be the nearest point, and the process proceeds to step S208. Since the classification unit 105 found a point equal to or less than the threshold value T in the non-defective data, the classification unit 105 determines that the object represented by the query is a non-defective product. The classification unit 105 also outputs the calculated distance value.

[0036] If the distance d1 exceeds the threshold T in step S207 (NO), the distance calculation unit 104 determines whether other non-defective data exists in the currently searched bin (B0) (step S209). If other non-defective data exists (YES), the other non-defective data is identified (step S210). Furthermore, the distance calculation unit 104 proceeds to step S206 and calculates the distance d2 between the identified other non-defective data (P2) and the query (Q).

[0037] If it is determined in step S209 that no other non-defective product data exists in the bin (B0) currently being searched (NO), the process proceeds to step S211, where it is determined whether or not the search has been completed for all eight bins surrounding (near) the bin (B0) currently being searched. Note that if it is determined in step S209 that no other non-defective product data exists in the bin (B0) currently being searched, the target of determination represented by the query may be determined to be a defective product.

[0038] FIG. 6 is a diagram illustrating the search range of the nearest point by the distance calculation unit 104. As shown in FIG. 6, the search range includes bin B0, where query Q is located, and the surrounding eight bins B1 to B8. In the example of FIG. 6, no non-defective product data P is present in bin B0, but one or more non-defective product data P are present in bins B1 to B8. Since the distance between these non-defective product data and query Q may be less than or equal to threshold T, the surrounding eight bins are also searched. Note that in this embodiment, the hash table is constructed two-dimensionally, but the hash table may be constructed one-dimensionally or three or more dimensions. In this case, the surrounding 26 bins may be the search range.

[0039] If there are surrounding bins that have not been searched in step S211 (NO), a surrounding bin to be searched is identified (step S212). Once the bin to be searched is identified, the process proceeds to step S204, where it is determined whether or not non-defective data exists in the bin.

[0040] In step S211, if the search for all eight surrounding bins has been completed (YES), the process proceeds to step S213, where a selection is made as to whether to terminate the search for nearest neighbors or to perform a full search. The selection may be made by the user via an input device or the like, or the selection may be set in advance. If "End" is selected, the process proceeds to step S214. Since no points equal to or less than the threshold value T were found in the non-defective product data, the classification unit 105 determines that the object represented by the query is defective.

[0041] If "full search" is selected in step S213, the process proceeds to step S215. The distance calculation unit 104 calculates the distance between the query and all of the non-defective data registered in the hash table. The classification unit 105 determines that the query is a defective product because no point less than the threshold T was found in the non-defective data. The classification unit 105 also outputs the distance between the query and the point (nearest point) among the non-defective data that has been subjected to the full search (step S216).

[0042] FIG. 7 is a diagram illustrating an example of a method for determining the order in which searches are performed for the eight surrounding bins. In the example of FIG. 7, representative points are set for the eight surrounding bins, and searches are performed in order of the shortest distance between each representative point and the query Q. In the example of FIG. 7, the center of gravity of the non-defective data contained in each bin is used as the representative point. The representative point is not limited to this center of gravity, and for example, the center of the bin may be used as the representative point. In the example of FIG. 7, searches are performed in the order of the numbers shown in the upper right corner of the eight surrounding bins.

[0043] 8A and 8B are diagrams illustrating another example of a hash table construction method. FIG. 8A shows a hash table constructed according to the procedure of the flowchart in FIG. 4. In the state of FIG. 8A, non-defective data P is unevenly distributed in some bins. However, as shown in FIG. 8B, by rotating the axis of the hash table by θ, the data points can be distributed across all bins. This allows the number of non-defective data points in the same bin to be averaged to some extent, regardless of which bin the query is in, thereby enabling an efficient nearest neighbor search.

[0044] In FIG. 8C , instead of the axes of the hash table, the coordinates of the non-defective data are rotated by θ to distribute the non-defective data across all bins. The transformation method is not limited to rotation, but may also be translation. That is, any transformation may be performed as long as it preserves the positional relationship (distance) between each non-defective data and the bin width. In the example of FIG. 8 , the axes of the hash table or the coordinates of the non-defective data are transformed to maximize the number of bins containing one or more non-defective data, but the transformation criteria are not limited to this. For example, the transformation may be performed so that the number of non-defective data contained in one bin is equal to or less than a predetermined number, or so that the difference in the number of non-defective data between the bin with the most non-defective data and the bin with the least non-defective data is minimized.

[0045] Furthermore, in constructing the hash table, it is also possible to thin out the data without registering all of the non-defective data points. Specifically, after constructing the hash table according to the procedure of the flowchart in Fig. 4, it is also possible to thin out the non-defective data that are at a distance equal to or less than a threshold T from a certain non-defective data point P.

[0046] In the above embodiment, the threshold value T may be determined using, for example, a machine learning technique or a statistical technique.

[0047] As described above, according to this embodiment, a hash search is performed in such a manner that if good-quality data whose distance from the query is less than or equal to threshold T is found, the object to be judged represented by the query is judged to be good, and the bin width of the hash table is set to threshold T. This shortens the time required for the hash search to find good-quality data whose distance from the query is less than or equal to threshold T, thereby providing a highly efficient hash search method. Furthermore, in the above example, the search is terminated when good-quality data whose distance from the query is less than or equal to threshold T is found in the bin of the search target, and the object to be judged represented by the query is judged to be good. However, it is also possible to calculate the distance to all good-quality data included in the bin of the search target, identify the good-quality data with the shortest distance, and compare it with threshold T to judge whether it is good or bad. This makes it possible to judge whether the object to be judged represented by the query is good or bad, and also to obtain the distance to the nearest point.

[0048] As described above, in this invention, the threshold T used in the nearest neighbor search using the hashing method is used as the bin width when constructing a hash table. While this invention can be applied to any task that uses a hash search, it is particularly effective in the task of searching for whether nearest neighbor data exists within a predetermined threshold, compared to conventional hash searches. For example, this invention is particularly useful in the task of determining whether a product is good or bad, when the majority of the products being evaluated are good and there is a lot of good product data near the query representing the product.

[0049] Although the embodiments of the present invention have been described in detail above, the above description is merely an example of the present invention in every respect, and it goes without saying that various improvements and modifications can be made without departing from the scope of the present invention.

[0050] Note that part or all of the above-described embodiments can be described as, but are not limited to, the following supplementary notes.

[0051] (Supplementary Note 1) An information processing device comprising: a data storage unit that stores reference data represented by a feature vector that represents an object classified into a first class in a hash table, the width of each bin being set to a first distance; a feature calculation unit that calculates a feature vector that represents an object to be determined as to whether it is classified into the first class; a search area determination unit that calculates a hash value using the feature vector that represents the object to be determined and determines a bin corresponding to the hash value as a bin to be searched in the hash table; a distance calculation unit that calculates a distance between each piece of reference data stored in the bin to be searched and a query represented by the feature vector that represents the object to be determined; and a classification unit that determines whether the object to be determined is classified into the first class by comparing the distance between each piece of reference data and the query with the first distance. (Supplementary Note 2) The information processing device according to Supplementary Note 1, wherein the data storage unit determines a base element based on statistics of each element of the feature vector that represents each piece of reference data. (Supplementary Note 3) The information processing device according to Supplementary Note 1 or 2, wherein the distance calculation unit also searches bins near the bin corresponding to the hash value. (Supplementary Note 4) The information processing device according to any one of Supplements 1 to 3, wherein the distance calculation unit terminates calculation of the distance between other reference data and the query when reference data whose distance to the query is the first distance or less is found, and the classification unit determines that the object to be determined is classified into the first class. (Supplementary Note 5) The information processing device according to Supplementary Note 4, wherein the classification unit determines that the object to be determined is not classified into the first class when no reference data whose distance to the query is the first distance or less is found. (Supplementary Note 6) The information processing device according to Supplementary Note 3, wherein the distance calculation unit determines a search order for nearby bins based on the distance between the query and a representative point of each nearby bin. (Supplementary Note 7) The information processing device according to any one of Supplements 1 to 6, having a hash table in which coordinates of axes or reference data are transformed so as to maximize the number of bins including one or more reference data. (Supplementary Note 8) The information processing device according to any one of Supplements 1 to 7, wherein the data storage unit thins out reference data whose distance to each other is the first distance or less.(Supplementary Note 9) The information processing device according to any one of Supplementary Notes 1 to 8, wherein the distance calculation unit determines a nearest point from among the reference data based on a distance between each piece of reference data and the query, and the classification unit classifies the object to be determined by comparing the first distance with the distance between the query and the nearest point. (Supplementary Note 10) An information processing device comprising: a data storage unit that stores reference data represented by a feature vector that represents an object to be classified into a first class in a hash table, the minimum bin width of which is set to a first distance; a feature amount calculation unit that calculates a feature vector that represents an object to be determined to be classified into the first class or not; a search area determination unit that calculates a hash value using the feature vector that represents the object to be determined, and determines a bin corresponding to the hash value as a search object bin in the hash table; a distance calculation unit that calculates the distance between each piece of reference data stored in the search object bin and the query that is represented by the feature vector that represents the object to be determined; and a classification unit that determines whether the object to be determined to be classified into the first class or not by comparing the first distance with the distance between each piece of reference data and the query. (Supplementary Note 11) An inspection device that uses the information processing device described in Supplementary Note 1 to determine whether the object to be judged is classified as a good product, wherein the query is a point represented by a feature vector calculated from image data obtained by capturing an image of the object to be judged, the reference data is a point represented by a feature vector calculated from image data of an object to be classified as a good product, and the classification unit classifies the object to be judged as a good product if there is reference data whose distance from the query is smaller than the first distance.(Supplementary Note 12) An information processing method executed by a computer, comprising: a step of storing, by the computer, reference data represented by a feature vector representing an object classified into a first class in a hash table, the width of each bin being set to a first distance; a step of calculating, by the computer, a feature vector representing an object to be determined as to whether it is classified into the first class; a step of calculating, by the computer, a hash value using the feature vector representing the object to be determined, and determining a bin corresponding to the hash value as a bin to be searched in the hash table; a step of calculating, by the computer, a distance between each piece of reference data stored in the bin to be searched and a query represented by the feature vector representing the object to be determined; and a step of determining, by the computer, whether the object to be determined is classified into the first class by comparing the distance between each piece of reference data and the query with the first distance. (Supplementary Note 13) A program that causes a computer to function as: a data storage unit that stores reference data represented by a feature vector that represents an object classified into a first class in a hash table, the width of each bin being set to a first distance; a feature calculation unit that calculates a feature vector that represents an object to be determined to be classified into the first class; a search area determination unit that calculates a hash value using the feature vector that represents the object to be determined, and determines a bin corresponding to the hash value as a bin to be searched in the hash table; a distance calculation unit that calculates the distance between each piece of reference data stored in the bin to be searched and a query that is represented by the feature vector that represents the object to be determined; and a classification unit that determines whether the object to be determined is classified into the first class by comparing the distance between each piece of reference data and the query with the first distance.

[0052] 1...information processing device, 2...database, 11...processor, 12...main memory, 13...input / output interface, 14...communication interface, 15...storage device, 101...data storage unit, 102...feature amount calculation unit, 103...search area determination unit, 104...distance calculation unit, 105...classification unit

Claims

1. An information processing apparatus comprising: a data storage unit that stores reference data represented by a feature vector representing an object classified into a first class in a hash table in which the width of each bin is set to a first distance; a feature amount calculation unit that calculates a feature vector representing a determination target for determining whether or not the determination target is classified into the first class; a search area determination unit that calculates a hash value using the feature vector representing the determination target and determines a bin corresponding to the hash value as a bin to be searched in the hash table; a distance calculation unit that calculates a distance between each reference data stored in the bin to be searched and a query represented by the feature vector representing the determination target; and a classification unit that determines whether or not the determination target is classified into the first class by comparing the distance between each reference data and the query with the first distance.

2. The information processing apparatus according to claim 1, wherein the data storage unit determines an element to be a basis based on a statistic of each element of the feature vector representing each reference data.

3. The information processing apparatus according to claim 1, wherein the distance calculation unit also sets bins in the vicinity of the bin corresponding to the hash value as search targets.

4. The information processing apparatus according to claim 1, wherein the distance calculation unit ends the calculation of the distance between the query and other reference data when reference data whose distance from the query is less than or equal to the first distance is found, and the classification unit determines that the determination target is classified into the first class.

5. The information processing apparatus according to claim 4, wherein the classification unit determines that the determination target is not classified into the first class when reference data whose distance from the query is less than or equal to the first distance is not found.

6. The information processing apparatus according to claim 3, wherein the distance calculation unit determines the search order of the bins in the vicinity based on the distance between the query and the representative point of each bin in the vicinity.

7. The information processing apparatus according to claim 1, having a hash table in which the axis or the coordinates of the reference data are transformed so that the number of bins including one or more reference data is maximized.

8. The information processing apparatus according to claim 1, wherein the data storage unit thins out reference data whose mutual distance is less than or equal to the first distance.

9. The distance calculation unit determines the nearest neighbor point from among the reference data based on the distance between each reference data and the query, and the classification unit classifies the determination target by comparing the distance between the query and the nearest neighbor point with the first distance. The information processing apparatus according to claim 1.

10. A data storage unit that stores reference data represented by a feature vector representing an object classified into a first class in a hash table in which the minimum width of a bin is set to the first distance, and a feature amount calculation unit that calculates a feature vector representing a determination target for determining whether or not the object is classified into the first class, and a search area determination unit that calculates a hash value using the feature vector representing the determination target and determines a bin corresponding to the hash value as a bin to be searched in the hash table, and a distance calculation unit that calculates the distance between each reference data stored in the bin to be searched and a query represented by the feature vector representing the determination target, and a classification unit that determines whether or not the determination target is classified into the first class by comparing the distance between each reference data and the query with the first distance. An information processing apparatus comprising:

11. An inspection apparatus that determines whether or not the determination target is classified as a non-defective product using the information processing apparatus according to claim 1, wherein the query is a point represented by a feature vector calculated from image data obtained by imaging the determination target, and the reference data is a point represented by a feature vector calculated from image data of an object classified as a non-defective product, and the classification unit classifies the determination target as a non-defective product when there is reference data whose distance from the query is smaller than the first distance. An inspection apparatus.

12. An information processing method executed by a computer, the method including: a step of storing, by the computer, reference data represented by a feature vector representing an object classified into a first class in a hash table in which the width of each bin is set to a first distance; a step of calculating, by the computer, a feature vector representing a determination target for determining whether or not the determination target is classified into the first class; a step of calculating, by the computer, a hash value using the feature vector representing the determination target and determining, as a bin to be searched in the hash table, a bin corresponding to the hash value; a step of calculating, by the computer, a distance between each piece of reference data stored in the bin to be searched and a query represented by the feature vector representing the determination target; and a step of determining, by the computer, whether or not the determination target is classified into the first class by comparing the distance between each piece of reference data and the query with the first distance.

13. A program for causing a computer to function as: a data storage unit that stores reference data represented by a feature vector representing an object classified into a first class in a hash table in which the width of each bin is set to a first distance; a feature amount calculation unit that calculates a feature vector representing a determination target for determining whether or not the determination target is classified into the first class; a search area determination unit that calculates a hash value using the feature vector representing the determination target and determines, as a bin to be searched in the hash table, a bin corresponding to the hash value; a distance calculation unit that calculates a distance between each piece of reference data stored in the bin to be searched and a query represented by the feature vector representing the determination target; and a classification unit that determines whether or not the determination target is classified into the first class by comparing the distance between each piece of reference data and the query with the first distance.

Citation Information

Patent Citations

  • Discrimination method, discrimination device and program

    JP2009281742A

  • Registration method and registration device for database associated with approximate nearest neighbor search

    JP2012247993A

  • Approximate nearest neighbor search device, approximate nearest neighbor search method, and program

    WO2013129580A1

  • Visual inspection system and computer program

    WO2021192376A1