Integrated model generation method, image inspection system, image inspection model generation device, image inspection model generation program, and image inspection device
The integrated model generation method addresses the challenge of adapting image inspection models to on-site environments by aligning and integrating element models, enhancing accuracy and reducing learning load.
Patent Information
- Application Number
- JP2021039796
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-03-12
- Publication Date
- 2024-10-02
- Estimated Expiration
- 2041-03-12
AI Technical Summary
Existing image inspection models face challenges in adapting to on-site environments, leading to high learning loads and reduced inspection accuracy, whether they are pre-trained or trained on-site.
An integrated model generation method that adjusts and integrates multiple element models to adapt to on-site conditions, using machine learning to align feature vectors and classification criteria, reducing the learning load while enhancing accuracy.
The method enables the generation of an inspection model that accurately classifies objects based on their quality levels with reduced learning effort, improving domain adaptation and comprehensive judgment capabilities.
Smart Images

Figure 0007559633000001 
Figure 0007559633000002 
Figure 0007559633000003
Abstract
Description
[Technical field]
[0001] The present invention relates to an integrated model generating method, an image inspection system, an image inspection model generating device, an image inspection model generating program, and an image inspection device. [Background technology]
[0002] Conventionally, at manufacturing sites such as factories, images of objects such as products and parts are input into a learning model, and the quality of the objects is inspected based on the data output from the learning model. There are two types of learning models used for such inspections: models that are trained in advance and models that are trained on-site. Models that are trained in advance can reduce the learning load on-site, but they have the problem of being difficult to adapt to the site and resulting in low inspection accuracy. On the other hand, models that are trained on-site have the problem of a large learning load to adapt to the site.
[0003] As a means for improving inspection accuracy, for example, Patent Document 1 below discloses a sorting support device that selects a learning model to be used for inspection from a plurality of learning models optimized for each item, and determines whether a specified item is included in an object to be inspected using the selected learning model. Also, as a means for improving the capabilities of a learning model, for example, Patent Document 2 below discloses a model integration device that collects learning models from each site and integrates the results of machine learning reflected in an integration range set in the common part of each learning model. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2019-174421 A [Patent Document 2] JP 2020-115311 A Summary of the Invention [Problem to be solved by the invention]
[0005] However, in Patent Document 1, a learning model needs to be generated for each item, and a learning model needs to be generated for each site, adapted to the environment (example of domain) of that site, which results in a large learning load at the site. In addition, Patent Document 2 only integrates models trained at each site, which is insufficient for reducing the learning load at each site while adapting to each site.
[0006] The present invention has been made in consideration of the above circumstances, and one of its objectives is to provide an integrated model generation method, an image inspection system, an image inspection model generation device, an image inspection model generation program, and an image inspection device that can generate an inspection model that adapts to the on-site environment with less learning load. [Means for solving the problem]
[0007] A method for generating an integrated model according to one aspect of the present invention includes: preparing a plurality of first component models that are machine-learned and that input data is input, and outputting the presence or absence of a specific feature in the input data or the likelihood of the presence or absence, the plurality of first component models having different specific features from each other; generating a second component model by adjusting at least one of the plurality of first component models so as to be adapted to adjustment data that is different from learning data used to train the first component model; and extracting at least one second component model and at least one model other than the first component model that was used as a basis for generating the second component model from a set of component models consisting of the first component model and the second component model. a method for generating an integrated model, comprising: selecting a plurality of element models, each of which includes at least one of the element models; and generating an integrated model by integrating the selected plurality of element models, wherein the integrated model is a model that classifies data input thereto into a plurality of classes, and outputs a class to which the input data belongs, or a model that outputs a likelihood that the input data belongs to a particular class, and each class is not a class corresponding to the presence or absence of a specific feature for one element model among the selected plurality of element models, but a class in which input data is classified based on the presence or absence of all specific features for the selected plurality of element models or the likelihood of the presence or absence.
[0008] According to this aspect, at least one of a plurality of first component models having different specific features is adjusted to adapt to adjustment data different from the learning data of the first component model to generate a second component model, and a plurality of component models including at least one second component model are selected from a set of component models consisting of the first component model and the second component model, and the selected plurality of component models are integrated to generate an integrated model. Then, the generated integrated model can output a class into which the input data is classified or a likelihood that the input data is classified into one of the classes based on the presence or absence of all specific features related to the selected plurality of component models or the likelihood of the presence or absence of all specific features. In other words, it is possible to generate an integrated model that can be adapted to the domain for each component model and can integrate a plurality of component models that respond to different features, and can make a comprehensive judgment rather than the presence or absence of features to which each component model responds.
[0009] In the above aspect, generating the second component model may be adjusting the first component model, which is a basis for generating the second component model, by machine learning using the adjustment data.
[0010] According to this aspect, it is possible to generate a second component model by subjecting a first component model of a certain domain to machine learning so as to adapt it to adjustment data obtained in the domain of the second component model.
[0011] In the above aspect, the first component model adjusted to generate the second component model includes a plurality of feature extraction units, a feature correction unit that corrects a feature vector whose elements are the features output by each feature extraction unit, and a classification unit that calculates an analysis result related to whether or not a specific feature related to the first component model is included based on the feature vector corrected by the feature correction unit, and generating the second component model may include setting an amount of correction by the feature correction unit such that a representative value of the feature vector for training data used in training the first component model, which representative value is after the feature vector is corrected by the feature correction unit, is closer to a representative value of the feature vector for adjustment data than the corrected representative value.
[0012] According to this aspect, it is possible to generate a second component model by correcting a representative value of a feature vector for training data in a first component model of a certain domain so that the representative value of the feature vector for adjustment data obtained in the domain of a second component model is closer to the representative value of the feature vector for training data obtained in the domain of a second component model.
[0013] In the above aspect, the input data may be image data obtained by photographing an object, and the specific feature may be a typified feature that causes individual differences in the appearance of the object.
[0014] According to this aspect, it is possible to input image data of an object and generate a second element model by extracting typified features that cause individual differences in the appearance of the object.
[0015] In the above aspect, the class related to the output of the integrated model may be a class according to the quality level of the object.
[0016] According to this aspect, the integrated model can output a class according to the quality level of the object.
[0017] In the above embodiment, the first element model may further output the location where a particular feature exists.
[0018] According to this aspect, it is possible to grasp the location where a particular feature exists.
[0019] An image inspection system according to another aspect of the present invention includes a first component model access unit that accesses a plurality of first component models that have been machine-learned, and that inputs image data obtained by photographing an object, and outputs the presence or absence, or the likelihood of the presence or absence, of a specific feature that is a typified feature that causes individual differences in the appearance of the object in the image data, the specific feature being different between different first component models; a second component model generation unit that generates a second component model by adjusting at least one of the plurality of first component models so as to be adapted to adjustment data that is different from learning data used to train the first component model; and and at least one element model other than the first element model that is used as a basis for generating the second element model, by integrating the selected element models; an integrated model generation unit that generates an integrated model that outputs a determination result as to whether an object of image data input to the integrated model is a pass / fail product by integrating the selected element models; an image acquisition unit that acquires object image data obtained by photographing an object to be inspected; and an inspection execution unit that inputs the acquired object image data into the integrated model and executes the integrated model to obtain a determination result as to whether the object is a pass / fail product.
[0020] According to this aspect, at least one of a plurality of first element models having different specific characteristics is adjusted to adapt to adjustment data different from the learning data of the first element model to generate a second element model, and a plurality of element models including at least one second element model are selected from a set of element models consisting of the first element model and the second element model, and the selected plurality of element models are integrated to generate an integrated model. Then, by inputting the target image data into the generated integrated model, a judgment result of whether the target is a non-defective product can be obtained. In other words, it is possible to generate an integrated model that can perform domain adaptation for each element model and can integrate a plurality of element models that respond to different characteristics to generate an integrated model that can make a comprehensive judgment.
[0021] In the above aspect, the second component model generation unit may generate the second component model by adjusting the first component model, which is a basis for generating the second component model, by machine learning using the adjustment data.
[0022] According to this aspect, it is possible to generate a second component model by subjecting a first component model of a certain domain to machine learning so as to adapt it to adjustment data obtained in the domain of the second component model.
[0023] In the above aspect, the first component model adjusted to generate the second component model includes a plurality of feature extraction units, a feature correction unit that corrects a feature vector whose elements are the features output by each feature extraction unit, and a discrimination unit that calculates an analysis result related to whether or not a specific feature related to the first component model is included based on the feature vector corrected by the feature correction unit, and the second component model generation unit may generate the second component model by setting an amount of correction by the feature correction unit such that a representative value of the feature vector for training data used in training the first component model, which representative value is after the feature vector is corrected by the feature correction unit, is closer to a representative value of the feature vector for adjustment data than a representative value before correction.
[0024] According to this aspect, it is possible to generate a second component model by correcting a representative value of a feature vector for training data in a first component model of a certain domain so that the representative value of the feature vector for adjustment data obtained in the domain of a second component model is closer to the representative value of the feature vector for training data obtained in the domain of a second component model.
[0025] In the above aspect, the integrated model generation unit may further include a designation unit that accepts designation as to whether the specific feature analyzed by the selected multiple element models is a good product feature or a defective product feature, and when integrating element models that analyze the specific feature designated as a good product feature, the integrated model generation unit may integrate the element models in a manner that promotes the integrated model to output a judgment result that the object is a good product, and when integrating element models that analyze the specific feature designated as a defective product feature, the integrated model may integrate the element models in a manner that promotes the integrated model to output a judgment result that the object is a defective product.
[0026] According to this aspect, it is possible to improve the accuracy of the integrated model in determining whether an object is a good or bad item.
[0027] In the above aspect, the apparatus may further include a candidate model presentation unit that presents, as a candidate for an element model to be selected, a first element model that can be accessed by the first element model access unit and that outputs that a specific feature is contained when image data that is a sample of the target image data is analyzed, or a second element model that is an adjustment of the first element model.
[0028] According to this aspect, for example, when a user selects a sample of target image data, it becomes possible to present to the user a first element model or a second element model suitable for the target image data as a candidate element model to be selected.
[0029] In the above aspect, the apparatus may further include an improvement solution presentation unit that presents model improvement solutions including any one of changing the selection of element models for creating an integrated model, changing learning data for machine learning the first element model, changing adjustments of the second element model, and changing judgment criteria in the integrated model, based on target image data that has been misjudged by the inspection execution unit.
[0030] According to this aspect, it is possible to present to the user, on the basis of the erroneously determined target image data, various measures for improving the element model in order to reduce such erroneous determination.
[0031] In the above aspect, the apparatus may further include an improvement measure presentation unit that presents an improvement measure for including image data for which an analysis result is output relating to the inclusion of a specific feature by an element model other than the element model to be adjusted as image data that does not include the specific feature related to the element model to be adjusted in adjustment data for adjusting the element model to be adjusted.
[0032] According to this aspect, for example, when there is an overlap between the feature distribution of an element model that outputs analysis results related to defective product characteristics and the feature distribution of an element model that outputs analysis results related to good product characteristics, it is possible to reduce the overlap of the feature distributions by adjusting one of the element models.
[0033] In the above aspect, the apparatus may further include an image data presentation unit that presents comparison image data including features similar to those included in the target image data, from among learning image data used in machine learning of the first component model or image data generated to have specific features related to the first component model, based on the target image data that has been misjudged by the inspection execution unit.
[0034] According to this aspect, it becomes possible to compare the misjudged target image data with comparison image data that contains features similar to those contained in the target image data, thereby enabling the user to experience the differences between the domains.
[0035] In the above aspect, the apparatus may further include an image data presentation unit that accepts designation of target image data and presents comparison image data including features similar to features included in the designated target image data from among learning image data used in machine learning of the first component model or image data generated to have specific features related to the first component model.
[0036] According to this aspect, it becomes possible to compare the specified target image data with learning data that contains features similar to those contained in the target image data, thereby enabling the user to confirm whether the domain application has been performed as intended.
[0037] In the above aspect, the system may further include a generation model storage unit that stores at least one of the generated second component model and the integrated model in a storage medium capable of retaining memory until the model is reused.
[0038] According to this aspect, it becomes possible to reuse the second component model and the integrated model.
[0039] In the above aspect, the system may further include an access permission unit that accepts input of identification data or attribute data of a user who wishes to access a set of design data including at least one of data identifying element models integrated into the integrated model, data identifying learning data used to learn a first element model that can be accessed, data for adjusting the first element model to a second element model, and data for integrating a plurality of element models into the integrated model, and determines the range of design data that is permitted to be accessed based on the identification data or attribute data.
[0040] According to this aspect, it becomes possible to control the range of accessible design data for each user and for each type of data.
[0041] According to another aspect of the present invention, a device for generating a model for image inspection includes: a first element model access unit that accesses a plurality of first element models that have been machine-learned and inputs image data obtained by photographing an object, and outputs the presence or absence or the likelihood of the presence or absence of a specific feature, which is a typified feature that causes individual differences in the appearance of the object in the image data, wherein the specific feature differs between different first element models; a second element model generation unit that generates a second element model by adjusting at least one of the plurality of first element models to adapt to adjustment data that is different from learning data used to train the first element model; a selection unit that accepts designation of a plurality of element models including at least one second element model selected from a set of element models consisting of a first element model and a second element model, and at least one element model other than the first element model that was used as a basis for generating the second element model; and an integrated model generation unit that generates an integrated model by integrating the selected plurality of element models and outputs a determination result of whether or not the object in the image data input to the integrated model generation unit is a defective product.
[0042] According to this aspect, at least one of a plurality of first element models having different specific characteristics is adjusted to adapt to adjustment data different from the learning data of the first element model to generate a second element model, and a plurality of element models including at least one second element model are selected from a set of element models consisting of the first element model and the second element model, and the selected plurality of element models are integrated to generate an integrated model. Then, by inputting the target image data into the generated integrated model, a judgment result of whether the target is a non-defective product can be obtained. In other words, it is possible to generate an integrated model that can perform domain adaptation for each element model and can integrate a plurality of element models that respond to different characteristics to generate an integrated model that can make a comprehensive judgment.
[0043] According to another aspect of the present invention, there is provided a program for generating a model for image inspection, which causes a computer to implement the following: a first element model access function for accessing a plurality of first element models generated by machine learning, which input image data obtained by photographing an object, and output the presence or absence or the likelihood of the presence or absence of a specific feature, which is a typified feature that causes individual differences in the appearance of the object in the image data, wherein the specific feature differs between different first element models; a second element model generation function for generating a second element model by adjusting at least one of the plurality of first element models so as to be adapted to adjustment data that is different from learning data used to train the first element model; a selection function for accepting designation of a plurality of element models including at least one second element model selected from a set of element models consisting of a first element model and a second element model, and at least one element model other than the first element model used as a basis for generating the second element model; and an integrated model generation function for generating an integrated model by integrating the selected plurality of element models, which outputs a determination result as to whether or not the object in the image data input to the program is a defective product.
[0044] According to this aspect, at least one of a plurality of first element models having different specific characteristics is adjusted to adapt to adjustment data different from the learning data of the first element model to generate a second element model, and a plurality of element models including at least one second element model are selected from a set of element models consisting of the first element model and the second element model, and the selected plurality of element models are integrated to generate an integrated model. Then, by inputting the target image data into the generated integrated model, a judgment result of whether the target is a non-defective product can be obtained. In other words, it is possible to generate an integrated model that can perform domain adaptation for each element model and can integrate a plurality of element models that respond to different characteristics to generate an integrated model that can make a comprehensive judgment.
[0045] An image inspection device according to another aspect of the present invention comprises an integrated model generated by the above-mentioned integrated model generation method, an image acquisition unit that acquires object image data of an object to be inspected, and an inspection execution unit that inputs the acquired object image data into the integrated model and executes the integrated model to obtain a determination result as to whether or not the object is a pass / fail product.
[0046] According to this aspect, by inputting target image data into the integrated model generated by the above-described method for generating an integrated model, it is possible to obtain a determination result as to whether the target is a non-defective product. Effect of the Invention
[0047] According to the present invention, it is possible to provide an image inspection device, an image inspection method, and an image inspection model generation device that can generate an inspection model that adapts to the on-site environment with a smaller learning load. [Brief description of the drawings]
[0048] [Figure 1] 1 is a schematic configuration diagram of an image inspection system according to an embodiment of the present invention. [Diagram 2] 1 is a functional block diagram showing a configuration of an image inspection device according to an embodiment. [Diagram 3] FIG. 2 is a functional block diagram showing a configuration of a first element model. [Figure 4] FIG. 4 is a functional block diagram showing a configuration of a second element model generating unit. [Diagram 5] 5 is a diagram illustrating an example of correction performed by a feature amount correction unit in FIG. 4. [Figure 6] FIG. 13 is a diagram for explaining an example of integrating a plurality of element models. [Figure 7] 10 is a flowchart for explaining an example of an integrated model generation process and an inspection process executed by the image inspection device according to the embodiment. [Figure 8] 1 is a block diagram showing a physical configuration of an image inspection apparatus according to an embodiment. [Figure 9]FIG. 13 is a diagram showing an example of a screen configuration when creating an inspection model as an element model. [Figure 10] FIG. 13 is a diagram showing an example of a screen configuration for verifying an inspection model after the inspection model is created. [Figure 11] FIG. 13 is a diagram showing an example of a screen configuration when creating an inspection model. [Figure 12] FIG. 13 is a diagram showing an example of a screen configuration for presenting an image similar to an erroneously recognized verification sample image. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0049] An embodiment of the present invention will be described below. In the following description of the drawings, the same or similar parts are denoted by the same or similar reference numerals. However, the drawings are schematic. Therefore, specific dimensions, etc. should be judged in light of the following description. In addition, it goes without saying that the drawings include parts with different dimensional relationships and ratios. Furthermore, the technical scope of the present invention should not be interpreted as being limited to the embodiment.
[0050] A preferred embodiment of the present invention will now be described with reference to the accompanying drawings.
[0051] FIG. 1 is a schematic diagram of an image inspection system 1 according to an embodiment of the present invention. The image inspection system 1 includes an image inspection device 20 and a light 25. The light 25 irradiates light L onto an inspection object 30. The image inspection device 20 captures reflected light R and inspects the inspection object 30 based on image data of the inspection object 30 (hereinafter, also referred to as "object image data"). The image inspection device 20 is connected to a first element model storage device 10 via a communication network 15. The first element model storage device 10 stores a first element model generated in another domain (for example, another site or under another environment). The first element model will be described in detail later.
[0052] 2 is a functional block diagram showing the configuration of an image inspection device 20 according to this embodiment. The image inspection device 20 includes, for example, a processing unit 200, a tool processing unit 210, a storage unit 220, a communication unit 230, and an imaging unit 240.
[0053] The communication unit 230 receives the first element model 221 from the first element model storage device 10 or another device, for example, via the communication network 15. The received first element model 221 is preferably stored in the storage unit 220. The photographing unit 240 is, for example, an image sensor such as a camera, and photographs the inspection target 30.
[0054] The storage unit 220 is configured to store various types of information. For example, the storage unit 220 stores a first element model 221, a second element model 222, an integrated model (image inspection model) 223, and image data 224. Storing the first element model 221 in the storage unit 220 can facilitate the acquisition of the first element model thereafter.
[0055] The second component model 222 is a model generated by adjusting the first component model 221 generated in another domain so as to adapt it to adjustment data obtained in the current domain. The integrated model 223 is a model generated by integrating a plurality of second component models 222. When generating the integrated model 223, the first component model 221 may be added and integrated in addition to the second component model 222. The image data 224 includes various types of image data such as learning data, sample data, and target image data.
[0056] The processing unit 200 has a function of adjusting the first element model 221 to generate a second element model 222, generating an integrated model 223 using the second element model 222, and inspecting the quality of the inspection object using the integrated model 223. The processing unit 200 has, for example, a first element model acquisition unit 201, a second element model generation unit 202, a model selection unit 203, an integrated model generation unit 204, an image acquisition unit 205, and an inspection execution unit 206.
[0057] The first component model acquisition unit 201 makes one or more first component models 221 available (accessible). For example, the method of making the first component models 221 available may be to acquire (read) the first component model 221 from the first component model storage device 10 or the storage unit 220, to create the first component model 221, or to be provided with a library containing existing first component models 221. In other words, it is sufficient that the first component model 221 can be prepared so as to be available.
[0058] The first element model 221 is a model that is machine-trained using learning data of a certain domain. The first element model 221 inputs input data of a certain domain, and outputs the presence or absence of a specific feature in the input data, or the likelihood of the presence or absence of a specific feature.
[0059] As the input data, for example, image data obtained by photographing an object to be inspected, waveform data obtained by observing vibrations of an object to be inspected, waveform data obtained by observing sound waves, etc. In this embodiment, a case where the input data is image data will be described as an example.
[0060] The specific feature is a typified feature that causes individual differences in the appearance of the object to be inspected. The specific feature may be classified into, for example, any one of irregularities on the surface of the object to be inspected, deposits on the surface of the object to be inspected, and molding or processing abnormalities in the shape of the object to be inspected.
[0061] The unevenness of the surface of the above-mentioned inspection object may be further classified into scratches, dents, scratches, dents, etc. The adhesions on the surface of the above-mentioned inspection object may be further classified into dust, dirt, etc. The molding or processing abnormalities in the shape of the above-mentioned inspection object may be further classified into burrs, chips, etc.
[0062] A specific feature is a feature that differs between different first element models 221 .
[0063] When a specific feature exists in the image data, the first element model 221 may further output the location where the specific feature exists. Also, when outputting the likelihood of the presence or absence of a specific feature, the first element model 221 may further output the location where the specific feature is likely to exist.
[0064] Locations where specific features exist or are likely to exist can be output in any of the following formats (1) to (3): (1) Output the center coordinates of those locations. (2) Output an image in which those locations are depicted as areas of any shape (e.g., rectangle). (3) Output a map image showing the distribution of those locations.
[0065] As a method for identifying a location where a specific feature exists or a location where a specific feature is likely to exist, for example, a method of dividing an image to be input to a model into a plurality of small regions and having the model learn the image features can be used. In this method, each divided small region is input to the model in sequence, and the model is made to learn the image features for each small region after associating the input order with the location so that the location in the input image can be identified in the input order.
[0066] As shown in FIG. 3, the first element model 221 includes, for example, a plurality of feature extraction units 221a and a classification unit 221b.
[0067] Each feature extraction unit 221a outputs a feature amount of the target image data obtained by photographing the inspection target. For example, the area, perimeter, line width, color intensity, etc. of a blob can be used as the feature amount. Here, a blob means a group of areas in an image that share common features such as color and brightness value.
[0068] The discrimination unit 221b calculates an analysis result for the first element model 221 based on a feature vector having the feature amounts output from each feature extraction unit 221a as elements. For example, Bayes discrimination, Mahalanobis distance, or SVM (Support Vector Machine) can be used as the discrimination unit 221b.
[0069] The analysis result calculated by the identification unit 221b may include, for example, a determination result as to whether or not a specific feature is included, or a likelihood indicating the likelihood that a specific feature is assumed to be included. In other words, the analysis result may include information related to whether or not a specific feature is included.
[0070] 2 generates a second component model 222 by adjusting (domain conversion) at least one of a plurality of first component models 221 prepared by the first component model acquisition unit 201 so as to adapt it to adjustment data different from the learning data used in learning the first component model 221. The learning data is data obtained in another domain, and the adjustment data is data obtained in the current domain.
[0071] "So as to adapt to the adjustment data" means that the second element model 222 to which the adjustment data is inputted outputs a more correct analysis result for the adjustment data. "More correct" means, for example, that an expected judgment result is obtained for more adjustment data among the multiple adjustment data, that the likelihood for one adjustment data is greater, or that the likelihood for the multiple adjustment data is greater overall.
[0072] The second element model 222 can be generated (adjusted) by, for example, any one of the following methods (1) to (3).
[0073] (1) The first component model 221, which is the basis for generating the second component model 222, is subjected to machine learning using adjustment data to adjust the first component model 221, thereby generating the second component model 222. The adjustment data in this case is learning data different from the learning data used when generating the first component model 221.
[0074] (2) The second element model 222 is generated by correcting the feature vector output from the model so that the representative value of the feature vector for the learning data used in learning the first element model 221 becomes close to the representative value of the feature vector for the adjustment data. As the representative value of the feature vector, for example, the average value of the feature vector or the peak value of a distribution function when the distribution of the feature vector is applied to a distribution function such as a Gaussian distribution can be used. Before calculating the representative value of the feature vector, preprocessing such as removing outliers of the feature vector may be performed.
[0075] (3) In the case where the first element model 221 or the generated second element model 222 is a model that outputs the presence or absence of a specific feature, the determination criterion for the presence or absence of a specific feature is changed. Here, the determination criterion can be changed so that the output of the element model matches the known presence or absence when adjustment data that is image data of an object whose presence or absence of a specific feature is known is input.
[0076] The above method (2) will be specifically described with reference to Fig. 4. As shown in the figure, the second component model generating unit 202 includes, for example, a plurality of feature extracting units 202a and a feature amount correcting unit 202b.
[0077] Each feature extraction unit 202a is the same as each feature extraction unit 221a of the underlying first element model 221. That is, each feature extraction unit 202a outputs a feature amount of image data obtained by photographing an object to be inspected.
[0078] Feature amount correction unit 202b corrects feature amount vectors whose elements are feature amounts output from each feature extraction unit 202a, and generates second element model 222. This feature amount correction unit 202b may be included in basic first element model 221, or may be added to basic first element model 221 at the stage of adjusting basic first element model 221 to generate second element model 222.
[0079] An example of the correction performed by the feature amount corrector 202b in FIG. 4 will be described with reference to FIG.
[0080] First, assume that an image related to a flaw is input to each feature extraction unit 202a as adjustment data in the current domain. In this case, the feature correction unit 202b calculates a feature vector V having the feature output from each feature extraction unit 202a as elements. Note that, when multiple images related to flaws are input, the average value of the feature vectors corresponding to the respective images is calculated as the feature vector V for the adjustment data.
[0081] Next, the feature amount correction unit 202b reads out the average value Va of the feature amount vectors for the learning data used in learning the first component model 221 from the storage unit 220. It is preferable that the average value Va of the feature amount vectors for the learning data be calculated in advance and stored in the storage unit 220.
[0082] Next, the feature amount correcting unit 202b calculates a difference vector D between the feature amount vector V of the adjustment data and the average value Va of the feature amount vectors of the learning data. This difference vector D becomes the amount of domain shift.
[0083] Next, feature amount correction unit 202b corrects the feature amount vectors, whose elements are the feature amounts output from each feature extraction unit 202a, so that the feature amount vector obtained by subtracting difference vector D from the feature amount vector before correction becomes the corrected feature amount vector. As a result, first element model 221 is adjusted, and second element model 222 is generated.
[0084] 2 selects a plurality of element models including at least one second element model 222 from a set of element models consisting of a first element model 221 and a second element model 222. For example, when selecting an element model, a set of element models consisting of the first element model 221 and the second element model 222 is presented, and the designated element model can be selected by accepting designation of an element model from the presented set.
[0085] When selecting an element model, it is desirable to select at least one second element model 222 and at least one element model other than the first element model 221 that was used as a basis for generating the second element model 222. For this purpose, for example, it may be possible to make it impossible to complete the designation operation unless at least one second element model 222 and at least one element model other than the first element model 221 that was used as a basis for generating the second element model 222 are included in the designated multiple element models. Alternatively, it may be possible to display a display guiding the user's operation so that at least one second element model 222 and at least one element model other than the first element model 221 that was used as a basis for generating the second element model 222 are designated as a result.
[0086] In this embodiment, presenting may mean displaying the presented information on the display unit of the image inspection system 1 so that the user can visually recognize the information, or may mean outputting the presented information as data via another device so that the user can recognize the information.
[0087] Here, the model selection unit 203 may have a candidate model presentation unit. This candidate model presentation unit has a function of presenting candidates for element models to be selected to the user. The candidate element models presented by the candidate model presentation unit may include, for example, the following models (1) and (2).
[0088] (1) Any first element model 221 that is available (accessible) to the first element model acquisition unit 201 and that outputs information indicating that a specific feature is contained when image data that is a sample of the target image data is analyzed.
[0089] (2) A second element model 222 obtained by adjusting the first element model 221 in (1) above.
[0090] The integrated model generation unit 204 generates an integrated model 223 by integrating the multiple element models selected by the model selection unit 203 .
[0091] The integrated model 223 may be, for example, a model that classifies input image data into multiple classes and outputs the class to which the input image data belongs, or may be a model that outputs the likelihood that the input image data belongs to a particular class.
[0092] Here, the specific class may be a predetermined class, may be a class dynamically determined such as a class with the highest relative likelihood, or may be all classes. The integrated model 223 may be, for example, a model that outputs a determination result as to whether or not the inspection target is a non-defective product based on input image data.
[0093] The result of the judgment as to whether or not the product is a pass / fail product may be a judgment result that distinguishes between pass / fail products, or may be a judgment result in which the result of the judgment other than a pass / fail product is further classified into a plurality of categories. The judgment criteria for obtaining the judgment result may be changeable.
[0094] The class related to the output of the integrated model 223 is a class according to the quality level of the inspection object. The class according to the quality level includes a pass / fail class (two-stage class) as well as three or more stages of quality grade classes. For example, when the inspection object is an agricultural product, it is classified into a quality grade class.
[0095] It is also possible to use the configuration other than the part specialized for image inspection use of this embodiment for uses other than image inspection. In that case, the class related to the output of the integrated model 223 is not a class corresponding to the presence or absence of a specific feature related to one of the selected element models, but a class in which input data is classified based on the presence or absence of all specific features related to the selected element models or the likelihood of the presence or absence. As an example of a use other than image inspection, it is possible to use the output of a sensor that detects vibration waveforms, sound waveforms, illuminance, temperature, humidity, atmospheric pressure, amount of chemical substances, human behavior, etc. as input data, and based on the output of the element models related to the presence or absence of specific state features, to output a comprehensive classification result of the state of the detection target or environment as the output of the integrated model 223. In this case, too, the learning load of the model can be reduced through adjustment of the element models and selection of the element models.
[0096] An example of integrating a plurality of element models will be described with reference to FIG. 6. In the figure, a scratch model 222a and a dirt model 222b are selected as a plurality of element models to be integrated. The scratch model 222a and the dirt model 222b are element models that output analysis results related to defective product characteristics. The scratch model 222a is an element model that outputs a likelihood of scratch based on input target image data. The dirt model 222b is an element model that outputs a likelihood of dirt based on input target image data. The synthesis unit 204a of the integrated model generation unit 204 synthesizes the likelihood of scratch and the likelihood of dirt, and outputs a likelihood of defective product. The likelihood of defective product may be a likelihood obtained by adding the likelihood of scratch and the likelihood of dirt, or may be the larger (maximum) of the likelihood of scratch and the likelihood of dirt. When integrating using the likelihood, a weight may be introduced. Specifically, the likelihood of each component model may be multiplied by a predetermined weight before the combination. By adjusting the weight, the range of a particular component model in the feature space can be expanded or narrowed.
[0097] When a first component model outputs a determination result of the presence or absence of a specific feature, a second component model based on the first component model may be generated or adjusted by changing the determination criterion. This change in the determination criterion can also widen or narrow the range of the component model in the feature space. When integrating component models that output a determination result of the presence or absence of a specific feature, the integration weight may be adjusted. In other words, the degree of influence of the determination result of the presence or absence of a specific feature on the output of the integrated model 223 may be adjusted.
[0098] Here, the integrated model generation unit 204 may have a designation receiving unit. This designation receiving unit has a function of receiving designation from a user for each element model as to whether a specific feature analyzed by a selected element model is a good product feature or a defective product feature. Depending on the content of the designation received by the designation receiving unit, the integrated model generation unit 204 executes the following process (1) or (2).
[0099] (1) When a particular feature is designated as a good feature When integrating component models that analyze specific features designated as good product features, the integrated model generation unit 204 performs the integration in a manner that encourages the integrated model 223 to output a judgment result that the object to be inspected is a good product.
[0100] (2) When a particular feature is designated as a defective feature When integrating component models that analyze specific features designated as defective product features, the integrated model generation unit 204 integrates them in a manner that encourages the integrated model 223 to output a determination result that the object to be inspected is defective.
[0101] The image acquisition unit 205 shown in FIG. 2 acquires object image data obtained by capturing an image of an object to be inspected from the imaging unit 240 or the storage unit 220.
[0102] The inspection execution unit 206 inputs the target image data acquired by the image acquisition unit 205 into the integrated model 223, and executes the integrated model 223 to obtain, for example, a judgment result as to whether the object to be inspected is a pass or fail, a class to which the object to be inspected belongs, or a likelihood that the object to be inspected belongs to a particular class.
[0103] 2 provides a user with a tool-like function for supporting the function of the processing unit 200. The tool processing unit 210 includes, for example, an improvement measure presentation unit 211, an image data presentation unit 212, and an access permission unit 213.
[0104] The improvement measure presentation unit 211 presents various improvement measures to the user based on the results of the test executed by the test execution unit 206. For example, the improvement measure presentation unit 211 presents the following improvement measures (1) to (5) to the user.
[0105] (1) An improvement measure that proposes changing the selection of element models for creating the integrated model 223 based on target image data that has been misjudged by the inspection execution unit 206. For example, when it is determined that the misjudged target image data is classified as a scratch, it is proposed to add a scratch model to the element models for creating the integrated model 223 by specifying that it is related to defective product characteristics.
[0106] (2) An improvement measure that proposes changing the learning data for machine learning of the first element model 221 based on the target image data misjudged by the inspection execution unit 206. Changing the learning data includes replacing the learning data, adding learning data, and deleting learning data.
[0107] (3) An improvement measure that proposes changing the adjustment data for generating or adjusting the second element model 222 based on the target image data misjudged by the inspection execution unit 206. Changing the adjustment data includes replacing the adjustment data, adding adjustment data, and deleting adjustment data.
[0108] (4) An improvement measure that proposes changing the judgment criteria of the second element model 222 that outputs the presence or absence of a specific feature based on the target image data that has been erroneously judged by the inspection execution unit 206.
[0109] (5) An improvement measure that proposes changing the judgment criteria in the integrated model 223 based on the target image data that has been erroneously judged by the inspection execution unit 206.
[0110] (6) An improvement measure that proposes adjusting the distribution of features between an element model in which a specific related feature is designated as a good feature and an element model in which a specific related feature is designated as a defective feature so as to reduce the overlap when there is overlap in the distribution of the features.
[0111] Regarding the above (6), the improvement measure presenting unit 211 presents an improvement measure for including image data for which an analysis result is output that relates to the inclusion of a specific feature by an element model different from the element model to be adjusted, in adjustment data for generating or adjusting the element model to be adjusted as image data that does not include the specific feature related to the element model to be adjusted. A specific description will be given below.
[0112] For example, when trying to adjust a scratch model when there is an overlap between the feature distribution of a scratch model in which a specific feature related to the model is designated as a defective feature and the feature distribution of a dust model in which it is designated as a non-defective feature, the following improvement measure can be proposed. We propose an improvement measure in which image data for which the dust model outputs an analysis result related to the inclusion of dust features (a determination result that there is dust or a determination result in which the likelihood of the presence of dust is relatively high) is included in the adjustment data for adjusting the scratch model as image data that does not contain scratch features (labeled as such). Here, the distribution of feature vectors in the feature space is called the feature distribution.
[0113] By implementing this improvement, the scratch model is improved and the overlap of the feature distributions between the scratch model and the dust model can be reduced.
[0114] The image data presentation unit 212 presents image data to the user to assist in improving the model. The image data presentation unit 212 presents the following comparison image data (1) and (2) to the user, for example.
[0115] (1) Based on the target image data misjudged by the inspection execution unit 206, comparison image data including features similar to those included in the target image data is presented from among the learning image data used in the machine learning of the first element model 221 or image data generated so as to have a specific feature related to the first element model 221. This allows the misjudged target image data to be compared with the comparison image data including features similar to those included in the target image data, so that the user can experience the difference between the domains. Note that comparison data including features similar to those included in the specified target image data may be presented from among the image data generated so as to have a specific feature related to the second element model 222.
[0116] (2) Accepting the designation of target image data, and presenting comparison image data including features similar to those included in the designated target image data from among the learning image data used in the machine learning of the first component model 221 or image data generated so as to have a specific feature related to the first component model 221. This allows the designated target image data to be compared with the comparison image data including features similar to those included in the target image data, so that the user can confirm whether the domain application of the model is being performed as intended. Note that comparison data including features similar to those included in the designated target image data from among the image data generated so as to have a specific feature related to the second component model 222 may be presented.
[0117] When presenting the comparison image data in (1) and (2) above, the comparison image data that is most similar to the target image data may be presented in an emphasized manner so as to be distinguishable from the other comparison image data.
[0118] The access permission unit 213 controls whether or not to permit access to design data registered in the image inspection system 1. The access permission unit 213 manages the range of design data to which access is permitted for each identification data or attribute data that can identify a user. When a user requests access to design data, the access permission unit 213 refers to the range of accessible design data using the user's identification data or attribute data, and controls whether or not to permit access. The range of accessible design data can be determined, for example, in data units of (1) to (5) below.
[0119] (1) Data identifying the component models that are integrated into the integrated model 223 .
[0120] (2) Data identifying the training data used to train the available first component model 221.
[0121] (3) Data for adjusting the first element model 221 to the second element model 222.
[0122] (4) Data for integrating multiple component models into an integrated model 223 .
[0123] (5) Data for verifying the performance of the integrated model 223 and data showing the verification results.
[0124] By managing in the above manner, it becomes possible to control the range of design data to which access is permitted for each user and for each type of data.
[0125] Next, an example of an integrated model generation process and an inspection process executed by the image inspection device 20 according to the embodiment will be described with reference to FIG.
[0126] First, the first element model acquisition unit 201 of the image inspection device 20 prepares one or more first element models 221 for use (step S101).
[0127] Next, the second element model generation unit 202 adjusts at least one of the first element models 221 prepared in step S101 above to adapt it to adjustment data different from the learning data used to train the first element model 221, and generates a second element model 222 (step S102).
[0128] Next, the model selection unit 203 selects a plurality of element models including at least one second element model 222 from a set of element models consisting of the second element model 222 generated in the above step S102 and the first element model 221 prepared in the above step S101 (step S103).
[0129] Next, the integrated model generating unit 204 generates an integrated model 223 by integrating the multiple element models selected in step S103 (step S104).
[0130] Next, the image acquisition unit 205 acquires object image data obtained by capturing an image of the inspection object (step S105).
[0131] Next, the inspection execution unit 206 inputs the target image data acquired in the above step S105 into the integrated model 223 generated in the above step S104, and executes the integrated model 223, thereby executing the inspection of the inspection target (step S106). Then, this process ends.
[0132] The order of the flowchart described in this embodiment may be changed as long as no inconsistency occurs in the processing. For example, a plurality of first component models may be selected from the prepared first component models, and second component models may be generated for some or all of the selected first component models. A second component model that has already been generated may be further adjusted to generate a new second component model.
[0133] 8 is a diagram showing the physical configuration of an image inspection device 20 according to this embodiment. The image inspection device 20 has a CPU (Central Processing Unit) 20a corresponding to a calculation unit, a RAM (Random Access Memory) 20b corresponding to a storage unit, a ROM (Read only Memory) 20c corresponding to a storage unit, a communication unit 20d, an input unit 20e, and an output unit 20f. Each of these components is connected via a bus so as to be able to transmit and receive data to and from each other.
[0134] In this example, the image inspection device 20 is described as being configured by one computer, but the image inspection device 20 may be realized by combining multiple computers. Also, the configuration shown in Fig. 8 is an example, and the image inspection device 20 may have other configurations or may not have some of these configurations.
[0135] The CPU 20a is a calculation unit that controls the execution of programs stored in the RAM 20b or the ROM 20c and calculates and processes data. The CPU 20a provided in the image inspection device 20 is a calculation unit that executes a program that generates an integrated model (model for image inspection), for example. The CPU 20a receives various data from the input unit 20e and the communication unit 20d, and outputs the calculation results of the data from the output unit 20f to be displayed on an external display device or to be stored in the RAM 20b.
[0136] The RAM 20b is a rewritable part of the storage unit, and may be composed of, for example, a semiconductor memory element. The RAM 20b may store data such as programs executed by the CPU 20a, image data, and models. Note that these are merely examples, and the RAM 20b may store data other than these, or may not store some of these.
[0137] The ROM 20c is a storage unit from which data can be read, and may be configured, for example, with a semiconductor memory element. The ROM 20c may store, for example, a program for generating an integrated model and data that is not to be rewritten.
[0138] The communication unit 20d is an interface that connects the image inspection device 20 to other devices. The communication unit 20d may be connected to a communication network such as the Internet.
[0139] The input unit 20e receives data input from a user, and may include, for example, a keyboard and a touch panel.
[0140] The output section 20f outputs the results of the calculations performed by the CPU 20a and displays them on an external display device.
[0141] Each program may be provided by being stored in a computer-readable storage medium such as RAM 20b or ROM 20c, or may be provided via a communication network connected by communication unit 20d. In image inspection device 20, various functions described using FIG. 2 and the like are realized by CPU 10a executing the programs. Note that these physical configurations are merely examples and do not necessarily have to be independent configurations. For example, image inspection device 20 may be provided with an LSI (Large-Scale Integration) in which CPU 20a is integrated with RAM 20b and ROM 20c.
[0142] An example of a screen displayed on an external display device based on information output from the output section 20f of the image inspection device 20 will be described with reference to FIGS.
[0143] Fig. 9 is an example of a screen when creating an inspection model. "Scratch", "dirt", etc. correspond to element models, and the entire inspection model obtained by integrating these corresponds to the integrated model. The screen illustrated in Fig. 9 has, from the left, an inspection model column M, a model design element column E, and an icon column Ei. In a screen like Fig. 9, designating whether a specific feature analyzed by an element model (for example, a scratch feature analyzed by a "scratch" model) is a good product feature or a defective product feature is input to the designation receiving section of the integrated model generating unit 204.
[0144] The hierarchical structure of the inspection models is displayed in the inspection model column M. In Fig. 9, a defective class and a non-defective class are displayed as classes for classifying the inspection models, a scratch model, a dirt model, and a burr model are displayed as element models corresponding to the defective class, and a dust model and a product model are displayed as element models corresponding to the non-defective class.
[0145] The word "Image" in the test model column M is a link to an image registered in relation to the generation or adjustment of each component model, and clicking on the image will display the image.
[0146] The "+" and "-" buttons displayed to the left of each model are for collapsing and expanding. For example, pressing the "+" button will collapse the lower level and turn into a "-" button.
[0147] The model design element column E displays the design elements used when designing an inspection model, and the icon column Ei displays an icon that represents the content of the corresponding design element. The design elements are element models such as "flaw" or "scratch". Groups that combine one or more element models, such as "unevenness", are also displayed. A group can also be treated as a single element model. When any design element is selected and moved (e.g., by dragging and dropping) to the model structure in the inspection model column M, the design element is incorporated into the model structure of the destination. Design elements moved to the inspection model column M may be deleted from the model design element column E, or the text color may be changed to a lighter color to indicate that they have been moved.
[0148] The inspection model in the inspection model field M can be created from scratch, or can be created by loading an existing inspection model and modifying it. The element model adjusted in the inspection model field M may be added to the model design element field E by drag-and-drop or other operations. At that time, an appropriate element model name may be given. This operation corresponds to customization of the model design element (element model) by the user, and can improve the efficiency of design by reusing parts by the same user, and can increase the number of users of the inspection model and promote the improvement of the inspection model by transferring it between different users or businesses.
[0149] Fig. 10 is an example of a screen for verifying an inspection model after it has been created. From the left, the screen illustrated in Fig. 10 has an inspection model column M, a verification sample column S, and a model design element column E. The display elements in the inspection model column M and the model design element column E are the same as those in Fig. 9.
[0150] The verification sample column S is a column that displays the image to be verified and the verification result, where a check mark is placed on an image that has been correctly judged, and no check mark is placed on an image that has not been correctly judged. In FIG. 10, images 6, 10, and 12 are displayed as images that have not been correctly judged.
[0151] Here, for example, when it is determined that the images 6 and 10 belong to any of the scratches, stains, and burrs of the defective product, the improvement measure presenting unit 211 may propose, as a candidate improvement measure, adding the images 6 and 10 to the inspection model corresponding to the feature determined to belong to them, or changing the judgment threshold value (widening the range in the feature space). On the other hand, when it is determined that the images 6 and 10 belong to scratches other than the scratches, stains, and burrs of the defective product, the improvement measure presenting unit 211 may propose, as a candidate improvement measure, adding scratches to the defective product.
[0152] Similarly, when it is determined that image 12 belongs to any of scratches, stains, and burrs of a defective product, the improvement measure presenting unit 211 may suggest, as improvement measure candidates, deleting registered images such as image 1, image 2, and image 3, or changing the judgment threshold (narrowing the range in the feature space). On the other hand, when it is determined that image 12 belongs to dust of a non-defective product, the improvement measure presenting unit 211 may suggest, as improvement measure candidates, adding image 12 to the dust model or changing the judgment threshold (widening the range in the feature space).
[0153] In the above description, it is assumed that when an image is registered in association with an element model, the image contains a specific feature related to the element model. However, it may be possible to specify that the image does not contain a specific feature related to the element model. An example of a screen that enables such specification is shown in FIG. 11. For example, if there is a dust model related to dust features designated as good product features and a dirt model related to dirt features designated as bad product features, and an image containing a dust feature is erroneously recognized as an image containing a dirt feature, the dirt model can be improved by registering the image containing the dust feature as an "image not included" (image not containing a dirt feature) in association with the dirt model and having it learn. Such a proposal may be added to the candidates for improvement measures.
[0154] Fig. 12 is an example of a screen presenting an image similar to a misrecognized verification sample image. The display elements of the inspection model field M, the model design element field E, and the verification sample field S shown in Fig. 12 are the same as those in Figs. 9 and 10.
[0155] In the verification sample field S, images 6, 10, and 12 are displayed as images that could not be correctly determined, similarly to Fig. 10. On the left side of the verification sample field S, sample images Is corresponding to images 6, 10, and 12 are displayed.
[0156] To the left of the sample image Is, similar images Ie that are similar to the sample image Is among the images of each part in the model design element column E are displayed. The images of each part may be learning images or images created using a model. The numerical values displayed in each box of the similar images Ie indicate the similarity with the sample image Is. Among the similar images Ie of each part, the image that is most similar to the sample image Is is displayed on the sample image Is side as the nearest image.
[0157] Image 6 in FIG. 12 can be seen to resemble an image of a scratch, image 10 can be seen to resemble an image of a dent, and image 12 can be seen to resemble an image of a through hole.
[0158] Additionally, image 6 differs from similar image Ie in the line width (thickness) of the scratch, image 10 differs from similar image Ie in the color intensity of the dent, and image 12 differs from similar image Ie in whether the circle is single or double.
[0159] In this way, by comparing the similar image Ie with the sample image Is, the user can experience the differences between the domains.
[0160] Here, the similar image Ie displayed to the left of the sample image Is is not limited to being an image of each part in the model design element field E, and may be an image of each model in the inspection model field M. For example, as illustrated in the bottom row of Fig. 12, among the images of the scratch model in the inspection model field M, a similar image Ie similar to image 6 may be displayed.
[0161] 12 illustrates an example in which an image similar to the erroneously recognized verification sample image is presented, but an image similar to a verification sample image arbitrarily designated by the user may be presented. For example, image 6 of the erroneously recognized verification sample image is an image of a relatively thick scratch. Therefore, by adding this image 6 to the scratch model in the inspection model field M, it becomes possible to confirm that the scratch model has been corrected to be suitable for a thick scratch.
[0162] As described above, according to the image inspection device 20 of this embodiment, at least one of a plurality of first element models 221 having different specific features is adjusted so as to adapt to adjustment data different from the learning data of the first element model 221 to generate the second element model 222, and a plurality of element models including at least one second element model 222 are selected from a set of element models consisting of the first element model 221 and the second element model 222, and the selected plurality of element models are integrated to generate an integrated model 223. Then, the generated integrated model 223 can output a class into which the input data is classified or a likelihood that the input data is classified into any of the classes based on the presence or absence of all specific features or the likelihood of the presence or absence of all specific features related to the selected plurality of element models.
[0163] In other words, each component model can be adapted to the domain, and multiple component models that respond to different features can be integrated to generate an integrated model 223 that can make comprehensive judgments rather than just the presence or absence of features to which each component model responds.
[0164] Therefore, according to the image inspection device 20 of this embodiment, an integrated model that adapts to the on-site environment can be generated with a smaller learning load. Here, domain adaptation means adjusting a model trained in one domain so that it works effectively in another domain. Examples of domains include objects to be inspected or analyzed, and operating environments. Examples of domain adaptation techniques include transfer learning and fine tuning.
[0165] The above-described embodiment is for facilitating understanding of the present invention, and is not intended to limit the present invention. The present invention may be modified / improved without departing from the spirit thereof, and the present invention also includes equivalents thereof. That is, even if a person skilled in the art appropriately modifies the design of the embodiment, the embodiment is included in the scope of the present invention as long as it has the characteristics of the present invention. For example, the elements and their arrangements, materials, conditions, shapes, sizes, etc. of the embodiment are not limited to those exemplified, and can be appropriately modified. In addition, the embodiment is an example, and it goes without saying that partial replacement or combination of the configurations shown in different embodiments is possible, and these are also included in the scope of the present invention as long as they include the characteristics of the present invention.
[0166] [Variations] Each model described in the above embodiment may be realized by a neural network. In this modification, the domain conversion by the second component model generating unit 202 may be realized by using, for example, a transfer learning or fine tuning technique.
[0167] In this modified example, a model is constructed in advance using a neural network trained using image data from the source domain, and image data from the destination domain is input to the model to train it, thereby constructing a model adapted to the destination domain.
[0168] Transfer learning is a method for learning new network layer weights for analyzing image data of the destination domain while keeping the network weights of the source domain fixed when training a model of the destination domain. On the other hand, fine tuning is a method for learning the weights of the entire model using image data of the destination domain, with the network weights of the source domain set as initial values when training a model of the destination domain.
[0169] The neural network model may be a two-class classifier, and may output, for example, the presence or absence of a specific feature in an input image, or the likelihood of the presence or absence of a specific feature. The model may be trained by either supervised learning, which uses labeled data that indicates a class, or semi-supervised learning, which uses only data that belongs to one class.
[0170] In supervised learning, images with correct labels corresponding to the classes are input, and the weights of the network layers are trained so that the output correctly determines the class. For example, in the case of a scratch model, there are two classes in supervised learning: a scratch class and a non-scratch class.
[0171] In semi-supervised learning, for example, only images belonging to one class are input, the input data space is projected into another arbitrary space, and the weights of the network layer are learned so that the radius of the hypersphere in the projected space is minimized. In the case of a scratch model, for example, one class in semi-supervised learning is the scratch class.
[0172] In this modification, model integration by the integrated model generating unit 204 in the above-described embodiment may be realized by, for example, either of the following methods (1) or (2).
[0173] (1) As in the above-described embodiment, the likelihoods output from the respective models are combined to obtain the likelihood output from the integrated model.
[0174] (2) The weights of the networks of each model are averaged and combined to form a single model. The details are explained below.
[0175] If the network structures of each model are completely identical, they are integrated into a single model by averaging the weights of the entire networks.
[0176] On the other hand, if the network structures of the models are partially identical, the weights of only the identical parts are averaged and combined, and for the non-identical parts, the weights of the representative model among the models are used as they are as an identification section that judges pass / fail, and the image data of the destination domain may be used to adjust the judgment criteria of the identification section so that correct identification can be performed.
[0177] The representative model may be selected by the user, or one of the following (a) or (b) models may be selected from the models before integration: (a) The model with the best results after creating models for all patterns and evaluating their performance. (b) The model with the most mismatched layers.
[0178] [Appendix 1] preparing a plurality of first element models (221) trained by machine learning, which receive input data and output the presence or absence of a specific feature in the input data or the likelihood of the presence or absence, the specific feature being different between different first element models (221); generating a second element model (222) by adjusting at least one of the plurality of first element models (221) so as to be adapted to adjustment data different from learning data used in learning the first element model (221); selecting, from a set of element models consisting of the first element model (221) and the second element model (222), a plurality of element models including at least one of the second element model (222) and at least one of the element models other than the first element model that is used as a basis for generating the second element model; generating an integrated model (223) by integrating the selected plurality of element models; A method for generating an integrated model (223), comprising the steps of: The integrated model (223) is a model that classifies data input thereto into a plurality of classes, and outputs the class to which the input data belongs, or outputs a likelihood that the input data belongs to a particular class, Each of the classes is not a class corresponding to the presence or absence of a specific feature regarding one of the selected plurality of component models, but is a class in which the input data is classified based on the presence or absence of all of the specific features regarding the selected plurality of component models or the likelihood of the presence or absence. How to generate an integrated model.
[0179] [Appendix 2] a first element model access unit (201) that accesses a plurality of first element models (221) that have been machine-learned and that input image data of an object photographed and output the presence or absence of a specific feature that is a typified feature that causes an individual difference in the appearance of the object in the image data, or the likelihood of the presence or absence of the specific feature, the specific feature being different between different first element models (221); a second element model generation unit (202) that generates a second element model (222) by adjusting at least one of the plurality of first element models (221) so as to adapt it to adjustment data different from learning data used in learning the first element model (221); a selection unit (203) that receives designation of a plurality of element models including at least one second element model (222) selected from a set of element models consisting of the first element model (221) and the second element model (222) and at least one element model other than the first element model that is used as a basis for generating the second element model; an integrated model generation unit (204) that generates an integrated model by integrating the selected plurality of element models and outputs a judgment result of whether the object of the image data inputted thereto is a non-defective product; an image acquisition unit (205) for acquiring object image data obtained by photographing an object to be inspected; an inspection execution unit (206) that inputs the acquired object image data into the integrated model (223) and executes the integrated model (223) to obtain a determination result of whether the object is a non-defective product; An image inspection system (1).
[0180] [Appendix 3] a first element model access unit (201) that accesses a plurality of first element models (221) that have been machine-learned and that input image data of an object photographed and output the presence or absence of a specific feature that is a typified feature that causes an individual difference in the appearance of the object in the image data, or the likelihood of the presence or absence of the specific feature, the specific feature being different between different first element models (221); a second element model generation unit (202) that generates a second element model (222) by adjusting at least one of the plurality of first element models (221) so as to adapt it to adjustment data different from learning data used in learning the first element model (221); a selection unit (203) that receives designation of a plurality of element models including at least one second element model (222) selected from a set of element models consisting of the first element model (221) and the second element model (222) and at least one element model other than the first element model that is used as a basis for generating the second element model; an integrated model generation unit (204) that generates an integrated model by integrating the selected plurality of element models and outputs a determination result of whether the object of the image data inputted thereto is a defective product; An apparatus (20) for generating a model for image inspection comprising:
[0181] [Appendix 4] a first element model access function (201) that accesses a plurality of first element models (221) that have been machine-learned and that input image data of an object and output the presence or absence of a specific feature that is a typified feature that causes an individual difference in the appearance of the object in the image data, or the likelihood of the presence or absence of the specific feature, the specific feature being different between different first element models (221); a second component model generation function (202) for generating a second component model (222) by adjusting at least one of the plurality of first component models (221) so as to adapt it to adjustment data different from learning data used in learning the first component model (221); a selection function (203) for receiving designation of a plurality of element models including at least one second element model (222) selected from a set of element models consisting of the first element model (221) and the second element model (222) and at least one element model other than the first element model that is used as a basis for generating the second element model; an integrated model generation function (204) for generating an integrated model (223) that outputs a determination result of whether the object of the image data inputted to the integrated model generation function (204) is a defective product by integrating the selected plurality of element models; A program for generating models for image inspection that enables a computer to achieve the above.
[0182] [Appendix 5] An integrated model (223) generated by the integrated model generation method described in Appendix 1; an image acquisition unit (205) for acquiring object image data obtained by photographing an object to be inspected; an inspection execution unit (206) that inputs the acquired object image data into the integrated model (223) and executes the integrated model (223) to obtain a determination result of whether the object is a non-defective product; An image inspection device (20). [Explanation of symbols]
[0183] Reference Signs List 1...image inspection system, 10...first element model storage device, 15...communication network, 20...image inspection device, 20a...CPU, 20b...RAM, 20c...ROM, 20d...communication section, 20e...input section, 20f...output section, 25...illumination, 30...inspection target, 200...processing section, 201...first element model acquisition section, 202...second element model generation section, 202a...feature extraction section, 202b...feature amount correction section, 203...model Selection unit, 204...integrated model generation unit, 204a...synthesis unit, 205...image acquisition unit, 206...inspection execution unit, 210...tool processing unit, 211...improvement measure presentation unit, 212...image data presentation unit, 213...access permission unit, 220...storage unit, 221...first element model, 221a...feature extraction unit, 221b...identification unit, 222...second element model, 223...integrated model, 224...image data, 230...communication unit, 240...imaging unit
Claims
1. preparing a plurality of first element models that have been machine-learned and that input input data and output the presence or absence of a specific feature in the input data or the likelihood of the presence or absence, the specific feature being different between different first element models; generating a second component model by adjusting at least one of the plurality of first component models so as to be adapted to adjustment data different from learning data used in learning the first component model; selecting a plurality of element models from a set of element models consisting of the first element model and the second element model, the plurality of element models including at least one of the second element model and at least one of the element models other than the first element model that is used as a basis for generating the second element model; generating an integrated model by integrating the selected plurality of element models; A method for generating an integrated model, comprising the steps of: The integrated model is a model that classifies data input thereto into a plurality of classes, and outputs the class to which the input data belongs, or outputs a likelihood that the input data belongs to a particular class, Each of the classes is not a class corresponding to the presence or absence of a specific feature regarding one of the selected plurality of component models, but is a class in which the input data is classified based on the presence or absence of all of the specific features regarding the selected plurality of component models or the likelihood of the presence or absence. How to generate an integrated model.
2. Generating the second component model is adjusting the first component model, which is a basis for generating the second component model, by machine learning using the adjustment data. The method for generating an integrated model according to claim 1 .
3. The first component model that is adjusted to generate the second component model, A plurality of feature extractors; a feature amount correction unit that corrects a feature amount vector having the feature amounts output by each of the feature extraction units as elements; a discrimination unit that calculates an analysis result related to whether or not the specific feature is included in the first component model based on the feature vector corrected by the feature correction unit, generating the second component model means setting a correction amount by the feature amount correction unit such that a representative value of the feature amount vector for learning data used in learning of the first component model, which is a representative value after the feature amount vector is corrected by the feature amount correction unit, is closer to a representative value of the feature amount vector for the adjustment data than a representative value before the correction; The method for generating an integrated model according to claim 1 .
4. The input data is image data obtained by photographing an object, The specific feature is a typified feature that causes individual differences in the appearance of the object. A method for generating an integrated model according to any one of claims 1 to 3.
5. The class for the output of the integrated model is a class according to a quality level of an object. A method for generating an integrated model according to any one of claims 1 to 4.
6. The first element model further outputs a location where the particular feature exists. A method for generating an integrated model according to any one of claims 1 to 5.
7. a first element model access unit that receives image data of an object and outputs the presence or absence of a specific feature, which is a typified feature that causes an individual difference in appearance of the object in the image data, or the likelihood of the presence or absence of the specific feature, the first element models being machine-learned, and accessing a plurality of first element models, the specific feature being different between different first element models; a second component model generation unit that generates a second component model by adjusting at least one of the plurality of first component models so as to adapt it to adjustment data different from learning data used in learning the first component model; a selection unit that receives designation of a plurality of element models including at least one second element model selected from a set of element models consisting of the first element model and the second element model, and at least one element model other than the first element model that is used as a basis for generating the second element model; an integrated model generation unit that generates an integrated model by integrating the selected plurality of element models and outputs a determination result of whether the object of the image data inputted thereto is a non-defective product; an image acquisition unit that acquires object image data obtained by photographing an object to be inspected; an inspection execution unit that inputs the acquired object image data into the integrated model and executes the integrated model to obtain a determination result of whether the object is a non-defective product; An image inspection system comprising:
8. the second component model generation unit generates the second component model by adjusting the first component model, which is a basis for generating the second component model, by machine learning using the adjustment data. The image inspection system of claim 7.
9. The first component model that is adjusted to generate the second component model, A plurality of feature extractors; a feature amount correction unit that corrects a feature amount vector having the feature amounts output by each of the feature extraction units as elements; a discrimination unit that calculates an analysis result related to whether or not the specific feature is included in the first component model based on the feature vector corrected by the feature correction unit, the second component model generation unit generates the second component model by setting a correction amount by the feature amount correction unit such that a representative value of the feature amount vector for learning data used in learning of the first component model, which is a representative value after the feature amount vector is corrected by the feature amount correction unit, is closer to a representative value of the feature amount vector for the adjustment data than a representative value before the correction. The image inspection system of claim 7.
10. a designation unit that accepts designation as to whether the specific feature analyzed by the selected plurality of element models is a non-defective feature or a defective feature; the integrated model generation unit, when integrating the element models analyzing the specific features designated as good product features, integrates the element models in a manner that encourages the integrated model to output a judgment result that the object is a good product, and, when integrating the element models analyzing the specific features designated as defective product features, integrates the element models in a manner that encourages the integrated model to output a judgment result that the object is a defective product.
10. An image inspection system according to any one of claims 7 to 9.
11. The method further includes a candidate model presentation unit that presents, as a candidate for the component model to be selected, the first component model that is accessible by the first component model access unit and that outputs information regarding the inclusion of the specific feature when image data that is a sample of the target image data is analyzed, or the second component model obtained by adjusting the first component model.
10. An image inspection system according to any one of claims 7 to 9.
12. and an improvement proposal unit that proposes a model improvement plan including any one of changing a selection of the element model for creating the integrated model, changing the learning data for machine learning the first element model, changing the adjustment of the second element model, and changing a judgment criterion for the integrated model, based on the target image data misjudged by the inspection execution unit.
10. An image inspection system according to any one of claims 7 to 9.
13. and an improvement proposal presentation unit that presents an improvement proposal for including image data for which an analysis result relating to the inclusion of the specific feature by the element model different from the element model to be adjusted is output as image data not including the specific feature related to the element model to be adjusted in the adjustment data for adjusting the element model to be adjusted. The image inspection system of claim 8.
14. and an image data presenting unit that presents comparison image data including a feature similar to a feature included in the target image data from among learning image data used in machine learning of the first component model or image data generated to have a specific feature related to the first component model, based on the target image data misjudged by the inspection executing unit.
10. An image inspection system according to any one of claims 7 to 9.
15. The method further includes an image data presentation unit that accepts the designation of the target image data, and presents previous comparison image data including features similar to the features included in the target image data designated from among learning image data used in the machine learning of the first component model or image data generated to have a specific feature related to the first component model.
10. An image inspection system according to any one of claims 7 to 9.
16. a generation model storage unit that stores at least one of the generated second component model and the generated integrated model in a storage medium that can retain the memory until the model is reused; 10. An image inspection system according to any one of claims 7 to 9.
17. an access permission unit that receives input of identification data or attribute data of a user who wishes to access a set of design data including at least any of data identifying the component models integrated into the integrated model, data identifying the learning data used in learning the accessible first component model, data for adjusting the first component model to the second component model, and data for integrating the plurality of component models into the integrated model, and determines a range of the design data to which access is permitted in accordance with the identification data or the attribute data.
10. An image inspection system according to any one of claims 7 to 9.
18. a first element model access unit that receives image data of an object and outputs the presence or absence of a specific feature, which is a typified feature that causes an individual difference in appearance of the object in the image data, or the likelihood of the presence or absence of the specific feature, the first element models being machine-learned, and accessing a plurality of first element models, the specific feature being different between different first element models; a second component model generation unit that generates a second component model by adjusting at least one of the plurality of first component models so as to adapt it to adjustment data different from learning data used in learning the first component model; a selection unit that receives designation of a plurality of element models including at least one second element model selected from a set of element models consisting of the first element model and the second element model, and at least one element model other than the first element model that is used as a basis for generating the second element model; an integrated model generation unit that generates an integrated model by integrating the selected plurality of element models and outputs a determination result of whether the object of the image data inputted thereto is a defective product; An apparatus for generating a model for image inspection comprising:
19. a first element model access function that accesses a plurality of first element models that have been machine-learned and that inputs image data of an object and outputs the presence or absence of a specific feature that is a typified feature that causes an individual difference in appearance of the object in the image data, or the likelihood of the presence or absence of the specific feature, the specific feature being different between different first element models; a second component model generation function that generates a second component model by adjusting at least one of the plurality of first component models so as to adapt it to adjustment data different from learning data used in learning the first component model; a selection function for receiving designation of a plurality of element models including at least one second element model selected from a set of element models consisting of the first element model and the second element model, and at least one element model other than the first element model that is used as a basis for generating the second element model; an integrated model generation function that generates an integrated model by integrating the selected plurality of element models and outputs a determination result of whether the object of the image data inputted to the integrated model generation function is a defective product or not; A program for generating models for image inspection that enables a computer to achieve the above.
20. An integrated model generated by the integrated model generation method according to claim 5; an image acquisition unit that acquires object image data obtained by photographing an object to be inspected; an inspection execution unit that inputs the acquired object image data into the integrated model and executes the integrated model to obtain a determination result of whether the object is a non-defective product; An image inspection device comprising:
Citation Information
Patent Citations
Learning device, learning method and program for pattern detector
JP2010009518A
Selection support device, selection support system, selection support method, and program
JP2019174421A
Model integration device, model integration method, model integration program, inference system, inspection system and control system
JP2020115311A
Inference device, inference method, and inference program
JP2021022079A
Method for generating universal learned model
WO2019131527A1
