Visual inspection method and visual inspection system

By generating extended learning samples based on a statistical dispersion distribution and adaptively updating the variation distribution, the method enhances the accuracy and robustness of machine learning-based visual inspection systems, addressing issues of overfitting and inspector variability.

JP7549736B2Active Publication Date: 2024-09-11HITACHI LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2023509035
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2021-03-22
Filing Date
2022-03-14
Publication Date
2024-09-11
Estimated Expiration
2042-03-14

AI Technical Summary

Technical Problem

Existing visual inspection methods face challenges with overfitting due to limited and varied learning samples, manual collection by inspectors leading to individual judgment fluctuations, and multiple correct evaluation values, which degrade the accuracy and generalization of machine learning models.

Method used

A method and system that generate extended learning samples by varying correct evaluation values based on a statistical dispersion distribution, using a probability distribution to adaptively update the variation distribution during learning, ensuring the evaluation engine maintains performance despite variations in inspector judgments and multiple correct values.

Benefits of technology

The approach prevents overfitting and improves the accuracy of evaluation engines by maintaining estimation performance even with deteriorating learning sample quality, allowing for precise automatic evaluation of workmanship.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007549736000003
    Figure 0007549736000003
  • Figure 0007549736000009
    Figure 0007549736000009
  • Figure 0007549736000010
    Figure 0007549736000010
Patent Text Reader

Abstract

The following occur during an appearance inspection according to the present invention: training data, which is a set of training samples in which training images capturing an item to be inspected for training purposes are paired with correct evaluation values for the training images is stored in a storage resource; correct evaluation values for training samples included in the training data are altered in accordance with a modifiable prescribed variation distribution; expanded training samples, which are training samples in which the altered values are set as correct evaluation values, are generated; expanded training data, which is a set of expanded training samples, is generated; the relationship between the training images and the evaluation values is learned, on the basis of the expanded training data, to determine internal parameters of an evaluation engine; an inspection image capturing the item to be inspected is acquired; the inspection image is inputted into the evaluation engine; and an estimated evaluation value, which is an estimate of the inspection image evaluation value, is acquired from output from the evaluation engine. (Selected Drawing: FIG. 2)
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to an appearance inspection device and an appearance inspection method based on machine learning. More specifically, the present disclosure discloses a device and a method for automatically evaluating the quality of an inspection object by estimating an evaluation value with high accuracy from an inspection image of an actual inspection object using an evaluation engine that has learned the relationship between a learning image acquired by imaging an inspection object for learning in advance and its correct evaluation value. [Background technology]

[0002] In many industrial products, including machinery, metals, chemicals, food, and textiles, appearance inspections are widely performed to evaluate various aspects of workmanship, such as shape defects, assembly defects, adhesion of foreign matter, internal defects and criticality, and surface scratches, spots, and dirt, based on inspection images. Traditionally, most of these appearance inspections have been performed by visual judgment by inspectors. Meanwhile, with the increasing demand for mass production and quality improvement, the inspection costs and the burden on inspectors are increasing. In addition, sensory inspections based on human senses require particularly high experience and skills. Other issues include the subjectivity and reproducibility of the inspection, such as different evaluation values ​​depending on the inspector and different results each time the inspection is performed. To address these issues of inspection cost, skill, subjectivity, etc., there is a strong demand for the automation of inspections.

[0003] In recent years, the performance of machine learning has improved dramatically with the proposal of deep network models such as Convolutional Neural Network (CNN) (for example, Non-Patent Document 1). Many appearance inspection methods using evaluation engines based on machine learning have been proposed. For example, WO2020 / 129617 (Patent Document 1) discloses a method for determining shape defects at welded parts using machine learning.

[0004] In training an evaluation engine, images of the inspection object for training (training images) are used as input, and the internal parameters of the evaluation engine (network weights, biases, etc.) are updated so that the difference between the estimated evaluation value output by the evaluation engine and the correct evaluation value taught by the inspector is reduced. The timing of updating the internal parameters is generally not to train all the training samples together, but to divide the training data into several sets called mini-batches and update the internal parameters for each mini-batch. This is called mini-batch training, and when all the mini-batches have been trained, all the training samples have been used for training. Training all these mini-batches once is called one epoch. The internal parameters are optimized by repeating the epochs many times. The training samples included in the mini-batch may also be shuffled for each epoch.

[0005] In machine learning, a problem occurs when an evaluation engine is over-optimized for a specific training sample, resulting in poor generalization performance. This is known as "overfitting." One of the causes of this is learning using a small number of training samples. If a huge number of training samples could be prepared, it would be possible to optimize internal parameters with high generalization performance without optimizing for a specific sample. However, training samples are often collected manually by inspectors, and it is often difficult to prepare a huge number of training samples.

[0006] Data Augmentation is known as a common method for suppressing overlearning. This is a technique for artificially padding learning images prepared by an inspector by applying processes such as translation and rotation to the learning images. For example, if an inspection object having a certain value of the correct answer evaluation value happens to be reflected in the upper left corner of all learning images, even if the correct answer evaluation value and the position of the inspection object on the image are unrelated, the evaluation engine may mistakenly learn that the position is an important judgment criterion. By using data augmentation to increase the variation of positions, such erroneous learning can be suppressed. WO2020 / 129617 (Patent Document 1) also discloses data augmentation such as changing the position of a shape defect. [Prior art documents] [Patent documents]

[0007] [Patent Document 1] International Publication WO2020 / 129617 [Non-patent literature]

[0008] [Non-Patent Document 1] A. Krizhevsky, I. Sutskever, and GE Hinton, “Imagenet classification with deep convolutional neural networks,” Proc. of NIPS (2012). Summary of the Invention [Problem to be solved by the invention]

[0009] As mentioned above, it is generally preferable for inspection images to have many variations, but image collection and teaching of correct evaluation values ​​are often done manually by inspectors, and preparing many learning samples requires a lot of effort. In addition, the correct evaluation values ​​taught by inspectors include fluctuations in judgment and erroneous teaching due to individual differences. In some cases, one learning sample may have multiple correct evaluation values. Under such circumstances, overfitting is particularly likely to occur. Meanwhile, as a practical problem, it is difficult to improve the quality of learning samples by inspector efforts alone. In addition, the variance in correct evaluation values ​​cannot be sufficiently resolved by simply padding the inspection images mentioned above. Therefore, a mechanism is needed to maintain the estimation performance of evaluation values ​​by machine learning even if the quality of the learning samples deteriorates. [Means for solving the problem]

[0010] According to one aspect of the present disclosure, there is provided an appearance inspection method and an appearance inspection system, (a) storing in a storage resource learning data that is a set of learning samples that are pairs of learning images obtained by capturing images of an inspection object for learning and accuracy evaluation values ​​for the learning images; (b) changing the correct answer evaluation value of the learning sample included in the learning data according to a changeable predetermined variation distribution, and generating an extended learning sample which is a learning sample having the changed value as the correct answer evaluation value; (c) generating augmented learning data that is a set of the augmented learning samples; (d) learning the relationship between the training images and the evaluation values ​​based on the extended training data to determine internal parameters of the evaluation engine; (e) acquiring an inspection image of the object to be inspected; (f) inputting the inspection image into the evaluation engine and obtaining an estimated evaluation value from an output of the evaluation engine, the estimated evaluation value being an estimate of the evaluation value of the inspection image; Effect of the Invention

[0011] According to this aspect, in automating visual inspection using machine learning, overlearning of the evaluation engine can be suppressed even with respect to variations in correct evaluation values ​​due to fluctuations in judgment, erroneous teaching, the existence of multiple correct evaluation values, etc., and improvement in the accuracy of the evaluation engine can be expected. [Brief description of the drawings]

[0012] [Figure 1] FIG. 1 is a diagram showing an automatic visual inspection system and an overall processing sequence. [Diagram 2] FIG. 13 is a diagram illustrating the expansion of training data in a training phase. [Diagram 3] FIG. 2 is a diagram showing an example of an inspection object; [Figure 4] FIG. 13 is a diagram illustrating an example of a distribution of variations in correct answer evaluation values. [Diagram 5] FIG. 2 is a diagram showing an example of an inspection object; [Figure 6] FIG. 13 is a diagram illustrating an example of a distribution of variations in correct answer evaluation values. [Figure 7] FIG. 1 is a diagram showing an example of a learning sequence of a known example. [Figure 8] FIG. 11 is a diagram illustrating an example of a learning sequence. [Figure 9] FIG. 11 is a diagram illustrating an example of a learning sequence. [Figure 10] FIG. 13 illustrates an update of the variability distribution in the learning phase. [Figure 11] FIG. 13 is a diagram showing a GUI for inputting and displaying the distribution of variation in correct evaluation values. [Figure 12] FIG. 1 is a diagram illustrating a hardware configuration of an automatic visual inspection system. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] The present embodiment will be described with reference to the drawings. The present embodiment has the following features. However, the features included in the present embodiment are not limited to those shown below.

[0014] (1) A learning image acquisition step of acquiring learning images {f_i} (i=1, ..., Nf, Nf: number of images) by imaging an object to be inspected for learning; a learning data input step of inputting a set {(f_i, g_i)} (i=1, ..., Nf) of pairs (f_i, g_i) of learning images f_i and correct evaluation values ​​g_i instructed by a user for the learning images f_i as learning samples, as learning data; a variation distribution input step of inputting a variation distribution d(g'_i; g_i) of the correct evaluation values; and a plurality of extended learning samples (f_i, g'_ij) (j=1, ..., NS_i, The method includes an extended learning data generation step of generating extended learning data consisting of training images and evaluation values ​​(NS_i: extension number), a learning step of learning the relationship between training images and evaluation values ​​based on the extended learning data and determining internal parameters of the evaluation engine, an inspection image acquisition step of imaging the object to be inspected and acquiring inspection images f''_i (i=1, ..., Nf'', Nf'': number of images), and an evaluation step of inputting the inspection images f''_i to the trained evaluation engine and outputting an estimated evaluation value g''^_i, wherein the variation distribution d(g'_i;g_i) given in the variation distribution input step changes with the correct evaluation value g_i as a parameter.

[0015] A supplementary explanation of this feature will be given. The variation in the correct answer evaluation value is inherently present, and it is difficult to completely remove it. Therefore, in this embodiment, data expansion is performed based on a statistical variation distribution d of the correct answer evaluation value. That is, from the correct answer evaluation value g_i given by the inspector, a plurality of extended correct answer evaluation values ​​{g'_ij} (j=1, ..., Ns_i, Ns_i: extension number) are generated according to the variation distribution d. These are learned as an extended learning sample group {(f_i, g'_ij)}. By varying the correct answer evaluation value, even if the taught correct answer value is somewhat inaccurate, excessive optimization for each learning sample can be suppressed, and improvement in generalization performance can be expected.

[0016] The problem with this process is how to appropriately provide the variation distribution d. If an incorrect variation distribution is provided, a large amount of false learning data may be generated, which may in turn reduce the estimation performance of the evaluation value. This embodiment is characterized in that the variation distribution d is switched according to the value of the correct answer evaluation value g_i. That is, the variation distribution is provided for each correct answer evaluation value as a probability distribution d(g'_i;g_i) with the extended correct answer evaluation value g'_i as a variable and the correct answer evaluation value g_i as a parameter. The extended correct answer evaluation value g'_i generated for the jth time based on the variation d(g'_i;g_i) is g'_ij.

[0017] (2) In the extended learning data generation step and the learning step, an extended mini-batch m'_s is generated by generating one extended learning sample (f_i, g'_i) based on a variation distribution d for the i-th learning sample (f_i, g_i) included in the s-th mini-batch m_s and replacing the learning sample (f_i, g_i).

[0018] This feature will be supplemented. In a general data augmentation method, multiple augmented learning samples are generated from one learning sample, which increases the learning time. That is, due to an increase in the number of learning samples, the number of learning samples and / or the number of mini-batches included in one mini-batch before the augmentation increases compared to before the data augmentation. In this embodiment, each learning sample (f_i, g_i) before the augmentation is simply replaced with one augmented learning sample (f_i, g'_i), so the number of learning samples and the number of mini-batches do not change. The variation distribution d is considered to be a probability distribution, and the extended evaluation correct answer value g'_i is generated using a random number that follows this probability distribution. When the number of times of generation is small, the extended learning sample may be biased, but as the epoch is repeated many times and learning progresses, it is expected that the distribution of the extended evaluation correct answer value in the trained extended learning sample approaches the variation distribution d.

[0019] (3) In the extended learning data generation step and the learning step, when the evaluation engine is iteratively trained while generating the extended learning data, the variation distribution d is updated during the iterations, and the extended learning data is generated based on the updated variation distribution. As a specific example, the extended learning sample is input to the evaluation engine being trained, and the reliability R(g'^_i) of the estimated evaluation value g'^_i output is calculated, and the variation distribution is updated during the iterations using the reliability R(g'^_i) as a parameter.

[0020] A supplementary explanation of this feature is provided. There is a limit to providing a highly accurate variance distribution from the beginning. Therefore, we consider changing the variance distribution during learning to make it a more appropriate distribution. As a method for changing the variance distribution, we consider adaptively changing it according to the learning state of the evaluation engine. For example, the learning image f_i is input to the evaluation engine during learning, an estimated evaluation value g'^_i is output, and the reliability R(g'^_i) of g'^_i is calculated. Examples of methods for calculating the reliability include the difference between the correct evaluation value g_i and the estimated evaluation value g'^_i, the value d(g'^_i;g_i) obtained by regarding the variance distribution d(g'_i;g_i) as a probability distribution and substituting the estimated evaluation value g'^_i (an index of how likely it is that the estimated value will be g'^_i), and in the case of a classification problem, a method based on the variance of the degree of belonging to each classification class. Regarding the degree of belonging to each classification class, if the degree of belonging to the correct classification class is outstanding, the reliability is high, but if there are also degrees of belonging to other classification classes, the reliability will be low depending on the degree.

[0021] The variance distribution is changed during learning according to this reliability. By repeatedly updating the variance distribution and the evaluation engine, it is possible to estimate an appropriate variance distribution that could not be imagined before learning, and by expanding the data based on this variance distribution, it is possible to obtain a higher performance evaluation engine. Note that the embodiments described below do not limit the present invention, and all of the elements and combinations thereof described in the embodiments are not necessarily essential to the solutions of the invention.

[0022] 1. Automatic visual inspection system and overall processing sequence The automatic appearance inspection system and the overall processing sequence of the present invention are shown in Fig. 1. The processing sequence is roughly divided into a learning phase 100 and an inspection phase 101.

[0023] In the learning phase, an image of an inspection object for learning is captured to obtain learning images {f_i} (i=1,...,Nf, Nf: number of images) (102). The learning images are obtained by capturing digital images of the surface or interior of the inspection object using an imaging device such as a CCD camera, optical microscope, charged particle microscope, ultrasonic inspection device, or X-ray inspection device. As another example of "capturing", images captured by another system may simply be received and stored in a storage resource of the automatic visual inspection system.

[0024] Next, a correct evaluation value g_i is assigned to each learning image f_i (103). The evaluation value is an index for evaluating various workmanship such as shape defects, assembly defects, adhesion of foreign matter, internal defects and fatality of the object to be inspected, scratches, spots, dirt on the surface, etc., and can be defined in various ways. For example, the fatality of the defect or the surface condition may be quantified as the evaluation value (g_i=[g_min, g_max]), or the label classifying the type of defect that has occurred may be used as the evaluation value (g_i={class1,..., classN}). For these evaluation criteria, a correct evaluation value g_i is assigned based on the inspector's visual judgment or numerical values ​​analyzed by other inspection devices or methods. Of course, it is desirable for this correct evaluation value g_i to be accurate, but there is a possibility that it may include variations due to fluctuations in the inspector's judgment, erroneous teaching, the existence of multiple correct evaluation values, etc.

[0025] A pair (f_i, g_i) of each training image f_i and correct evaluation value g_i is called a training sample, and a set of training samples {(f_i, g_i)} (i = 1, ..., Nf) is called training data. The training data is used to train the evaluation engine (104). The evaluation engine is an estimator based on machine learning that takes the test image f_i as input and outputs an estimated evaluation value g^_i. Various existing machine learning engines can be used as the evaluation engine, such as deep neural networks represented by Convolutional Neural Network (CNN), Support Vector Machine (SVM) / Support Vector Regression (SVR), and k-nearest neighbor (k-NN). These evaluation engines can handle classification problems and regression problems.

[0026] In general, the internal parameters of the evaluation engine are optimized using learning samples so that an estimated evaluation value g^_i close to the taught correct evaluation value g_i is output. In this embodiment, a variation distribution d of the correct evaluation value g_i is input. Based on this variation distribution d, extended learning data consisting of a plurality of extended learning samples (f_i, g'_ij) (j=1, ..., NS_i, NS_i: extension number) generated by changing the value of the correct evaluation value g_i in the learning data (f_i, g_i) is generated (105), and the evaluation engine is trained based on the extended learning data to optimize the internal parameters (106).

[0027] In the inspection phase, an image of the actual object to be inspected is captured to obtain inspection images f''_i (i=1, ..., Nf'', Nf'': number of images) (102). The inspection images f''_i are input to a trained evaluation engine, which outputs an estimated evaluation value g''^_i (107). The estimated evaluation value is checked by an inspector as necessary (108), and if any defects are found, countermeasures are fed back to the manufacturing process.

[0028] In the above-described embodiment, the training image f_i and the test image f''_i were each one image, but for example, a plurality of images (a group of images) may be captured by changing the imaging direction or imaging device, and the group of images may be used as input to the evaluation engine to estimate the evaluation value. In this case, the training image group and the test image group become f_i and f''_i, respectively. Similarly, there may be multiple types of evaluation values. By combining the two, a multi-input, multi-output evaluation engine may be used.

[0029] 2. Data Augmentation 2.1 Data Augmentation Methods The data expansion method in this embodiment is shown in FIG. 2. As described above, a pair (f_i, g_i) of a learning image f_i and a correct answer evaluation value g_i taught by an inspector is called a learning sample (three learning samples 201, 202, and 203 are shown in FIG. 2 as an example), and a set of learning samples {(f_i, g_i)} (i=1, ..., Nf) is called learning data (200). The correct answer evaluation value g_i in the learning data has a variance due to fluctuations in the inspector's judgment, erroneous teaching, the existence of multiple correct answer evaluation values, etc. The variance in the correct answer evaluation value is inherently present, and it is difficult to completely remove it. Therefore, in this embodiment, the variance in the correct answer evaluation value is given as a variance distribution d (211). According to this variance distribution d, multiple extended correct answer evaluation values ​​{g'_ij} (j=1, ..., Ns_i, Ns_i: extension number) are generated for each correct answer evaluation value g_i. The extension number Ns_i may be changed for each learning sample. However, since a learning sample with a large extension number may affect the learning of the evaluation engine more than a learning sample with a small extension number, a weight w_i (i=1, ..., Nf) (212) can be applied to the extended sample group S_i during learning (for example, the inverse of the extension number is used as the weight). A pair (f_i, g'_ij) of a learning image f_i and an extended correct answer evaluation value g'_ij is called an extended learning sample (in FIG. 2, three extended learning samples 208, 209, and 210 generated from a learning sample (f_1, g_1) are illustrated as an example), and a set of extended learning samples generated from the i-th learning sample (f_i, g_i) is called an extended learning sample group S_i={(f_i, g'_ij)} (in FIG. 2, three extended learning sample groups 205, 206, and 207 are illustrated as an example). g'_ij is the j-th extended correct answer evaluation value g'_i generated from the training sample (f_i, g_i). Furthermore, all the extended training samples are collectively called extended training data {(F_k, G_k)}(k=1,...,NF, NF=ΣNS_i)(204). In other words, {(F_k, G_k)}={S_1,...,S_Nf}.The variation distribution d can be regarded as the tendency for the correct evaluation value to be erroneous, or as the probability distribution of the correct evaluation value. By varying the correct evaluation value according to this distribution, even if the taught correct value is somewhat inaccurate, excessive optimization for each learning sample can be suppressed, and generalization performance can be expected to improve.

[0030] The problem with this process is how to appropriately provide the variation distribution d. If an incorrect variation distribution is provided, a large amount of false learning data may be generated, and the estimation performance of the evaluation value may be reduced. In response to this, multiple inspectors may provide correct answer evaluation values ​​g_i for each learning sample f_i, and the variation distribution d may be obtained from the actual degree of variation due to differences between inspectors. However, if multiple inspectors evaluate each learning sample f_i, the inspection cost and the load on the inspectors will increase significantly. In this embodiment, the variation distribution d is switched depending on the value of the correct answer evaluation value g_i. That is, the variation distribution is provided for each correct answer evaluation value as a probability distribution d(g'_i;g_i) with the extended correct answer evaluation value g'_i as a variable and the correct answer evaluation value g_i as a parameter. The extended correct answer evaluation value g'_i generated for the jth time based on the variation d(g'_i;g_i) is g'_ij. The variation distribution d(g'_i; g_i) may be given as a histogram as shown in Fig. 4, which will be described later, or as a broken line as shown in Fig. 6, which will be described later. Also, it may be given as a combination of parametric functions (Gaussian distribution, etc.), or may be given as a free curve as shown in Fig. 11, which will be described later.

[0031] 2.2 Example of Data Augmentation 1 Taking the defect classification shown in FIG. 3 as an example of visual inspection, a specific example of the variation distribution for this example will be described with reference to FIG. 4. This inspection is an example in which foreign matter attached to an object to be inspected is classified into four defect classes D1 to D4. FIGS. 3(a) to (d) show schematic diagrams of two examples of defects belonging to each of defect classes D1 to D4. That is, FIGS. 4(a) to (d) show defects 300 and 301 belonging to defect class D1, defects 302 and 303 belonging to defect class D2, defects 304 and 305 belonging to defect class D3, and defects 306 and 307 belonging to defect class D4, respectively. The variation distribution for the correct evaluation values ​​D1 to D4 is shown in FIGS. 4(a) to (d). In this example, the variation distribution is given as a histogram.

[0032] The variation distribution d(g'_i;g_i) (g_i="D1") shown in FIG. 4(a) will be taken up for detailed explanation. In d(g'_i;"D1"), the frequency of the vertical axis for the extended correct answer evaluation value D1 on the horizontal axis is 3, which is the highest (400). This indicates that the learning sample taught as D1 is most likely to have an actual correct answer evaluation value of D1. Therefore, when generating the extended learning sample group S_i={(f_i,g'_ij)} from the learning sample (f_i,g_i), the extended learning sample with the extended correct answer evaluation value g'_i of D1 is generated most frequently. Based on the exact frequency ratio of the histogram, the extended correct answer evaluation value of 3 / 6=50% of the extended learning samples in the extended learning sample group S_i is D1. The frequency of D2 is also relatively high at 2 (401). This is because, as can be seen by comparing (a) and (b) of FIG. 3, defect classes D1 and D2 are similar in that they are both defects with jagged shapes, and are easily confused during teaching. Therefore, the extended correct answer evaluation value of 2 / 6 ≒ 33% of the extended learning samples in the extended learning sample group S_i is D2. On the other hand, the frequency of D3 is 0 (402). This is because, as can be seen by comparing (a) and (c) of FIG. 3, it is impossible to confuse a jagged defect with a round defect. Therefore, the extended learning sample group S_i does not include an extended learning sample with an extended correct answer evaluation value of D3. In addition, the frequency of D4 is 1, which is small, but still has a value (403). This is because, as can be seen by comparing (a) and (c) of FIG. 3, defect classes D1 and D4 are not very similar, but there is a slight possibility of confusion in that they are both defects with unevenness. Therefore, the extended correct answer evaluation value of 1 / 6≈17% of the extended learning samples in the extended learning sample group S_i is D4.

[0033] The variation distributions in Figures 4(b) to (d) can be explained in a similar manner. Incidentally, since the defect class D3 is almost unlikely to be confused with other defect classes, the variation distribution d(g'_i; "D3") shown in Figure 4(c) has a frequency only for D3 (404). In other words, there is no need to expand the learning samples whose correct evaluation value is D3.

[0034] 2.3 Example 2 of Data Augmentation As an example of appearance inspection, the surface roughness evaluation shown in FIG. 5 is taken up, and a specific example of the variation distribution for this example is explained using FIG. 6. This inspection is an example in which the roughness level of the inspection object surface is quantified and evaluated from 1.0 to 3.0. The evaluation value is the roughness level, and the smaller the value, the better the condition. FIG. 5(a) to (e) show schematic diagrams (500 to 504) of surface images with roughness levels of 1.0, 1.5, 2.0, 2.5, and 3.0, respectively. In the learning sample, the correct evaluation value g_i of the roughness level is given in increments of 0.5, but the roughness level is a continuous value, and there are also inspection objects with roughness levels in between. Therefore, the estimation engine deals with a regression problem. FIG. 6(a) to (e) show the variation distribution for the correct evaluation values ​​of 1.0 to 3.0. In this example, the variation distribution is given as a broken line.

[0035] The variation distribution d(g'_i;g_i) (g_i=1.0) shown in FIG. 6(a) will be described in detail. The line of d(g'_i;1.0) indicates the probability distribution that the actual evaluation value of a learning sample whose correct answer evaluation value g_i is 1.0 is the extended correct answer evaluation value g'_i on the horizontal axis. Therefore, the extended correct answer evaluation value g'_i is generated with the value of the line as the generation probability. The value of the line is the highest when the extended correct answer evaluation value is 1.0 (601), but as the extended correct answer evaluation value increases, the value of the line gradually decreases, and is 0 when the extended correct answer evaluation value is 2.0 (604). The change in the roughness level is continuous, and it is considered that there is a high possibility that the variation in the correct answer evaluation value also occurs continuously. Therefore, when generating the extended learning sample group S_i={(f_i, g'_ij)} from the learning samples (f_i, g_i), the extended learning samples with a roughness level value of 1.0 are generated most frequently (601), and some extended learning samples with a roughness level value of 1.5 are also generated (603), but extended learning samples with a roughness level value of 2.0 or more are not generated (604-606). In addition, extended learning samples with roughness levels of 1.0 and 1.5 (shown by black circles in FIG. 6(a)) included in the learning data and intermediate roughness levels as extended correct answer evaluation values ​​may be generated according to the frequency of the broken line (shown by white circles in FIG. 6(a)). For example, extended learning samples with a roughness level of 1.25 can be generated at a frequency intermediate between the generation frequencies of roughness levels 1.0 and 1.5 (602).

[0036] The variation distributions in Fig. 6(b) to (e) can be explained in a similar manner. As a general tendency, in all the variation distributions, there is a probability distribution for the evaluation values ​​around the correct evaluation value g_i, and the value of the probability distribution becomes smaller as it moves away from the correct evaluation value g_i. However, in this example, there is a discontinuous change in the probability distribution between roughness levels 1.5 and 2.0. As shown in Fig. 5, roughness levels below 1.5 are within the normal range and can be shipped as a product. On the other hand, roughness levels above 2.0 are of poor quality and cannot be shipped. There is also a discontinuous change in appearance in the inspection images of roughness levels 1.5 and 2.0 shown in Fig. 5(b) and (c), respectively, and the judgment line (505) for whether or not to ship the product was set between these levels. Therefore, there was a tendency for judgment errors that crossed this judgment line to occur less frequently. Therefore, this tendency was reflected in the variation distribution. This tendency can be easily confirmed in Fig. 6(b) and (c). In Figure 6(b), as the value of the extended correct answer value g'_i on the horizontal axis changes from 1.5 to 2.0, the value of the broken line decreases rapidly (607 → 608). Similarly, in Figure 6(c), as the value of the extended correct answer value g'_i on the horizontal axis changes from 2.0 to 1.5, the value of the broken line decreases rapidly (610 → 609). In this way, the tendency of the correct answer evaluation value to be easily mistaken can be reflected in the variation distribution.

[0037] 2.4 Effect of Data Augmentation 4 and 6 are merely examples of the variation distribution, and various other variation distributions can be considered depending on the object to be inspected and the evaluation items. As can be seen from these examples, it is considered that there is a high dependency between the correct evaluation value g_i and the variation distribution in many cases. Therefore, it was considered effective to switch the distribution depending on the value of the correct evaluation value g_i. The variation of the learning data is a tendency of error obtained from field experience, and can be considered as so-called "domain knowledge". According to this embodiment, it is possible to effectively and efficiently incorporate such domain knowledge in the learning of the evaluation engine. That is, for example, if the variation distribution is defined for each learning sample, a huge amount of work cost is required, and conversely, if a uniform variation distribution is defined for all learning samples, there is a risk that the accuracy will be impaired and a large number of erroneous extended learning samples will be generated. In contrast, according to this embodiment, the properties of the object to be inspected can be reflected in the variation distribution relatively easily, and this was shown using the two specific examples mentioned above. It was found that it is possible to achieve both accuracy and work cost by defining the variation distribution d using the correct evaluation value g_i given by the inspector as a parameter, even if erroneous teaching, etc. is included.

[0038] 3. Learning sequence (timing of generating and allocating extended learning data) In the learning phase, there are several examples of the learning sequence of the evaluation engine using the expanded learning data according to this embodiment. Each example has a different number of expanded learning data, a different timing for performing the expansion process, etc. Representative examples will be described in detail below.

[0039] 3.1 Learning Sequence 1 First, a general learning sequence of an evaluation engine using learning data {(f_i, g_i)} will be described with reference to Fig. 7. In learning the evaluation engine, an image of an inspection object for learning (learning image f_i) is input, and the internal parameters of the evaluation engine (network weights, biases, etc.) are updated so that the difference between the estimated evaluation value g^_i output from the evaluation engine and the correct evaluation value g_i taught by an inspector becomes smaller. The timing of updating the internal parameters is generally not to learn all the training samples at once, but to divide the training data (704) into a set called mini-batches {m_s} (s=1,…,Nm, Nm: number of mini-batches, m_s⊂{(f_i,g_i)} (705) and update the internal parameters for each mini-batch. This is called mini-batch learning, and when all the mini-batches have been learned, all the training samples have been used for learning. Learning all the mini-batches once is called one epoch, and the internal parameters are optimized by repeating the epochs many times. An epoch is called {e_t} (t=1,…,Ne, Ne: number of epochs). In Fig. 7, mini-batch division is shown in the first epoch e_1 (700). Although not shown, similar mini-batch division is performed in the second and subsequent epochs e_2 to e_Ne (701 to 703). In addition, the training samples included in the mini-batches may be shuffled for each epoch.

[0040] An example of a learning sequence of the evaluation engine using the extended learning data {(f_i, g'_ij)} in this embodiment will be described with reference to FIG. 8. 800 to 803 are epochs, and 805 is a mini-batch. In this embodiment, the learning data {(f_i, g_i)} (704) in FIG. 7 is replaced with the extended learning data {(f_i, g'_ij)} (804). At this time, the mini-batch generated by dividing the extended learning data is called the extended mini-batch {m'_s} (s=1,...,Nm', Nm': extended mini-batch number, m'_s ⊂ {(f_i, g'_ij)}. In general, the number of extended learning samples NF in the extended learning data is larger than the number of learning samples Nf in the learning data (NF>Nf), so in the embodiment of FIG. 8, the number of mini-batches Nm' or the number of samples included in one extended mini-batch increases compared to FIG. 7. Therefore, if the number of epochs is the same, the learning time increases.

[0041] 3.2 Learning sequence 2 An example of a learning sequence of the evaluation engine using the extended learning data {(f_i, g'_ij)} in this embodiment will be described with reference to Fig. 9. In this embodiment, for one i-th learning sample (f_i, g_i) included in the s-th mini-batch m_s obtained by dividing the learning data (904) given by an inspector, one extended learning sample (f_i, g'_i) is generated based on the variation distribution d and replaced with the learning sample (f_i, g_i), thereby generating an extended mini-batch m'_s. For example, one extended learning sample (f_1, g'_1) (916) is generated (911) from one learning sample (f_1, g_1) (909) included in the first mini-batch m_1 (905). This is performed for all training samples (909, 910, etc.) included in all mini-batches (905 to 908, etc.) to generate extended mini-batches (912 to 915, etc.) and training samples (916, 917, etc.).

[0042] This feature will be supplemented. In general data augmentation, multiple augmented learning samples are generated from one learning sample, which increases the learning time. That is, due to an increase in the number of learning samples, either the number of learning samples included in one mini-batch before the augmentation or the number of mini-batches, or both, will increase compared to before the data augmentation. In this embodiment, one learning sample (f_i, g_i) before the augmentation is simply replaced with one augmented learning sample (f_i, g'_i), so the number of learning samples and the number of mini-batches do not change. The variation distribution d is considered to be a probability distribution, and the extended evaluation correct answer value g'_i is generated using a random number that follows this probability distribution. The generation of the extended evaluation correct answer value g'_i using this random number is performed in each epoch. Therefore, even if the learning sample is the same, the value of the extended evaluation correct answer value g'_i may change depending on the epoch. When the number of times of generation is small, the extended learning sample may be biased, but as the epochs are repeated many times and learning progresses, it is expected that the distribution of the extended evaluation correct answer value in the learned extended learning sample will approach the variation distribution d. As a result, if the number of epochs is the same, it is possible to learn the expanded learning data that reflects information on the variance distribution in the same amount of time as learning the learning data {(f_i, g_i)}. This can also be interpreted as taking into account the variance distribution of the correct evaluation value without increasing the learning cost by distributing the expanded learning data, whose number of samples has increased due to data expansion, so that it is learned over the entire epoch.

[0043] 4. Changing the variance distribution during training 4.1 Basic processing In this embodiment, when training the evaluation engine iteratively while generating the expanded learning data, the variation distribution d is updated during the iteration, and the expanded learning data is generated based on the updated variation distribution. As a specific example, the expanded learning sample is input to the evaluation engine during training, and the reliability R(g'^_i) of the estimated evaluation value g'^_i output is calculated, and the variation distribution is updated during the iteration using the reliability R(g'^_i) as a parameter.

[0044] We will add a bit more about this feature. There is a limit to how accurate a variance distribution can be given from the beginning. Therefore, we consider changing the variance distribution during learning to make it a more appropriate distribution. As a method for changing the variance distribution, we consider adaptively changing it according to the learning state of the evaluation engine.

[0045] A specific example of changing the variance distribution during learning will be described with reference to Fig. 10. Fig. 10 shows a learning sequence described in Fig. 9 in which a mechanism for changing the variance distribution during learning is incorporated. However, the learning sequence described in Fig. 9 is not the only one into which the mechanism for changing the variance distribution during learning can be incorporated. For example, changing the variance distribution during learning is applicable to the learning sequence described in Fig. 8 and other learning sequences. The epoch corresponding to the t-th epoch e_t in Fig. 9 is shown as 1000, but the same is true for other epochs. First, a mini-batch {m_s} (1002, 1003) is generated by dividing the learning data (1001), and for each learning sample (f_i, g_i) (1004-1006) included in the mini-batch, an extended learning sample (f_i, g'_i) (1010-1012) is generated (1007) based on the variance distribution d (1017), and the extended mini-batch {m'_s} (1008, 1009) is generated by replacing the learning sample (f_i, g_i). Then, the extended mini-batch {m'_s} is learned and the internal parameters of the evaluation engine (1013) are updated. The process up to this point is the same as that in FIG. 9. Next, each learning image f_i is input to the evaluation engine (1013) being trained, an estimated evaluation value g'^_i is output, and the reliability R(g'^_i) (1014-1016) of g'^_i is calculated. Examples of methods for calculating the reliability include the difference between the correct evaluation value g_i and the estimated evaluation value g'^_i, the value d(g'^_i;g_i) obtained by regarding the variation distribution d(g'_i;g_i) as a probability distribution and substituting the estimated evaluation value g'^_i (an index of how likely it is that the estimated value will become g'^_i), and in the case of a classification problem, a method based on the variation in the degree of belonging to each classification class. Regarding the degree of belonging to each classification class, if the degree of belonging to the correct classification class is outstanding, the reliability is high, but if there is also a degree of belonging to other classification classes, the reliability will be low depending on the degree. The variation distribution (1017) is changed during learning according to such reliability. The timing of the change may be every mini-batch learning or every epoch.In the next mini-batch or epoch, extended learning samples (f_i, g'_i) (1010 to 1012) are generated (1007) based on the modified variance distribution (1017), and are used to train the evaluation engine (1013).

[0046] By repeatedly updating the variance distribution and the evaluation engine, it is possible to estimate an appropriate variance distribution that could not be imagined before learning, and by expanding the data based on this variance distribution, it is possible to obtain a higher performance evaluation engine.

[0047] 4.2 Processing variations A processing variation of the basic processing of changing the variance distribution described in 4.1 will be explained. In 4.1, the variance distribution was changed based on the reliability R(g'^_i) of the estimated evaluation value g'^_i of the extended learning sample. If the reliability is high, it is highly likely that the variance distribution that generated the extended learning sample was valid, and conversely, if the reliability is low, the variance distribution needs to be changed. The variance distribution may be changed (A) for each correct evaluation value g_i, or (B) for each learning sample (f_i, g_i). In addition to the reliability R(g'^_i), (C) the evaluation results of the validation data may be used as a clue for changing the variance distribution, or (D) a heuristic method may be used.

[0048] First, we will explain in detail the variation of parameters that change the variance distribution. In the above (A), the variance distribution is switched according to the value of the correct evaluation value g_i, and the variance distribution is given by d(g'_i;g_i) with g_i as a parameter. In other words, the variance distribution is changed based on the reliability of the estimated evaluation value g'^_i for the extended learning sample whose correct evaluation value is g_i.

[0049] In the above (B), the variance distribution is switched for each learning sample (f_i, g_i), and the variance distribution is given by d(g'_i;(f_i, g_i)) with (f_i, g_i) as a parameter. Since the reliability can be calculated for each extended learning sample (f_i, g'_ij), it is possible to evaluate the validity of the variance distribution for each learning sample (f_i, g_i) that is the basis of the extended learning sample. Therefore, it is possible to change the variance distribution for each learning sample (f_i, g_i). Manually assigning a variance distribution to each learning sample requires a huge amount of work, and it is also difficult to assign an appropriate variance distribution. By updating the variance distribution so that the performance of the evaluation engine is improved based on the reliability of the learning sample, it is possible to optimize the variance distribution for each learning sample in parallel with optimizing the internal parameters of the evaluation engine without human intervention.

[0050] Next, variations of clues for changing the variance distribution will be described in detail. In the above (C), the variance distribution is changed based on the evaluation result of the validation data. In the learning of the evaluation engine, in order to obtain internal parameters with high generalization performance for unlearned data, it is common to prepare data called validation data separately from the training data used for learning (called learning data in this disclosure). In the learning, the internal parameters are successively updated so as to improve the estimation result for the learning data, but the internal parameters to be finally adopted may be those that provide good estimation results for validation data (unlearned data) not used in learning. In this embodiment, the variance distribution may be selected based on the reliability of the estimated evaluation value of the validation data, not the learning data.

[0051] In the above (D), a heuristic method may be used to optimize the variance distribution. That is, the variance distribution given before learning is used as the initial value, and the variance distribution is slightly changed during learning, and is updated to a variance distribution that improves the performance of the evaluation engine (the accuracy rate and reliability of the estimated evaluation value). By using such a method, it is possible to obtain an appropriate variance distribution heuristically without using an analytical approach.

[0052] 5. GUI In this embodiment, an example of a Graphical User Interface (GUI) for a user such as an inspector to specify and confirm the variation distribution is shown in FIG. 11 (1100). In this GUI, the variation distribution can be displayed for each correct evaluation value (1102 to 1104 in 1101). The variation distribution to be displayed can be switched between the distribution initially specified by the user and the distribution updated during learning by using a radio button or the like (1105). In the latter case, the variation distribution being updated in any epoch can be displayed by specifying an epoch ID (1106). The variation distribution can be given as a histogram (e.g., FIG. 4), a broken line (e.g., FIG. 6), a combination of parametric functions, a free curve (e.g., 1102 or 1103 in FIG. 11), etc., and the way of giving the distribution can be selected by using a radio button or the like (1107).

[0053] The information of the learning sample (f_i, g_i) can be displayed (1108) as a criterion for determining the distribution of variation or the validity of the processing result. Several learning samples can be displayed side by side for comparison (1109, 1121, 1133). The display contents will be explained in detail by taking the information of one learning sample "Display 1" (1109). The learning sample to be displayed can be specified by the ID of the learning image (1110), and can also be filtered by the correct evaluation value g_i (1111). The inspection image f_i, the estimated evaluation value g^_i for the learning sample (f_i, g_i), and the reliability R(g^_i) can be displayed (1112, 1113, 1114). The inspection image (1112) in this example is a defect image inside a semiconductor device captured by an ultrasonic inspection device. In addition, the information of the extended learning sample {(f_i, g'_ij)} generated from the learning sample (f_i, g_i) can also be displayed (1115). Information on multiple extended samples can also be displayed side by side (1116, 1117). Display contents include extended correct answer evaluation value g'_ij, estimated evaluation value g'^_ij for extended learning sample (f_i, g'_ij), and reliability R(g'^_ij) (1118, 1119, 1120). Information on other learning samples "Display 2" (1121) is similar to "Display 1". That is, 1122 to 1132 correspond to 1110 to 1120. Also, in this example, information on learning samples is displayed in displays 1109 and 1121, but it is also possible to display information on test samples (test image f''_i, estimated evaluation value g''^_i, etc.) in a similar manner.

[0054] According to this embodiment, in the automation of visual inspection using machine learning, it is possible to suppress overlearning of the evaluation engine even with respect to the variation in the correct evaluation value caused by fluctuations in judgment, erroneous teaching, the presence of multiple correct evaluation values, etc. As a practical problem, it is difficult to improve the quality of the learning sample only by the efforts of the inspector. In addition, the variation in the correct evaluation value cannot be sufficiently solved by only padding the inspection image. Therefore, in this embodiment, a mechanism is provided that maintains the estimation performance of the evaluation value by machine learning even if the quality of the learning sample is deteriorated. As a result, it is possible to estimate the evaluation value with high accuracy from the inspection image of the inspection object and automatically evaluate the workmanship of the inspection object.

[0055] In this embodiment, two-dimensional image data is used as input information, but the method of this embodiment can be applied when one-dimensional signals such as received ultrasonic waves, or three-dimensional volume data acquired by a laser range finder, etc. are used as input information. The method of this embodiment can also be applied when there are multiple input images and multiple types of estimated evaluation values ​​(the evaluation engine has multiple inputs and multiple outputs).

[0056] 6.Hardware configuration of the automatic visual inspection system An automatic appearance inspection system for realizing the appearance inspection method described in the above embodiment is shown in Fig. 12. The automatic appearance inspection system is composed of the above-mentioned imaging device and a computer. An example of the imaging device has already been described.

[0057] The computer is a component that processes the appearance inspection method described in this embodiment, and includes the following: *Processor: Examples of the processor include a CPU, a GPU, and an FPGA, but other components may be used as long as they can process the appearance inspection method. *Storage resource: Examples of storage resources include RAM, ROM, HDD, and non-volatile memory (such as flash memory). The storage resource may also include volatile memory (the aforementioned RAM is one example). The storage resource may store a program (called a visual inspection program) that causes a processor to execute the visual inspection method described in the above embodiments. The storage resource may also store data referenced or generated by the visual inspection program. An example of data stored in the storage resource is as follows: **Training images, correct answer scores, learning data **Augmented learning sample, augmented learning data, **Rating engine internal parameters, **Inspection image, **Estimated rating. *GUI device: Examples of GUI devices include displays and projectors, but other devices may also be used as long as they are capable of displaying a GUI. *Input device: Examples of input devices include a keyboard, a mouse, and a touch panel, but other devices may be used as long as they are components that can accept operations from a user. Also, the input device and the GUI device may be integrated into one device. *Communication interface device: Examples of the communication interface include USB, Ethernet, and Wi-Fi, but other interface devices may be used as long as they can directly receive images from an imaging device or allow a user to send the images to a computer. In addition, a portable non-volatile storage medium (such as a flash memory, DVD, CD-ROM, or Blu-ray disk) on which the images are stored may be connected to the communication interface, and the images may be stored in the computer. The above is the hardware configuration of the computer. Note that the automatic visual inspection system may include a plurality of computers and a plurality of image capture devices.

[0058] The above-mentioned appearance inspection program may be stored in a computer via the following path: *The visual inspection program is stored on a portable non-volatile storage medium, and the program is distributed to a computer by connecting the medium to a communication interface. *The appearance inspection program is distributed to the computer by a program distribution server. The program distribution server has a storage resource that stores the appearance inspection program, a processor that performs a distribution process to distribute the appearance inspection program, and a communication interface device that can communicate with the communication interface device of the computer. This concludes the description of the embodiments. As mentioned above, the embodiments described thus far do not limit the invention according to the claims, and all of the elements and combinations thereof described in the embodiments are not necessarily essential to the solution of the invention. This application claims the benefit of priority from Japanese Patent Application No. 2021-47889, filed on March 22, 2021, the entire disclosure of which is incorporated herein by reference. [Explanation of symbols]

[0059] 100...Learning phase 101...Inspection phase 201, 202, 203...Learning samples 205, 206, 207...Extended learning sample set 208, 209, 210...Extended learning samples

Claims

1. (a) storing in a storage resource learning data that is a set of learning samples that are pairs of learning images obtained by capturing images of an inspection object for learning and accuracy evaluation values ​​for the learning images; (b) changing the correct answer evaluation value of the learning sample included in the learning data according to a changeable predetermined variation distribution, and generating an extended learning sample which is a learning sample having the changed value as the correct answer evaluation value; (c) generating augmented learning data that is a set of the augmented learning samples; (d) learning the relationship between the training images and the evaluation values ​​based on the extended training data to determine internal parameters of the evaluation engine; (e) acquiring an inspection image of the object to be inspected; (f) inputting the inspection image into the evaluation engine and obtaining an estimated evaluation value from an output of the evaluation engine, the estimated evaluation value being an estimate of the evaluation value of the inspection image; In the (b), generating an extended learning sample from each of the learning samples included in the learning data by varying a correct answer evaluation value using a random number according to the variation distribution; In the (c), generating the extended training data by replacing the training samples of the training data with extended training samples generated from the training samples; In the step (d), an internal parameter of the evaluation engine is updated based on the extended learning data; (b) to (d) are regarded as one epoch, and the process is repeated a number of times while regenerating the correct evaluation value in (b) for each epoch. Visual inspection method.

2. In the (a), the training data is further divided into a plurality of mini-batches, which are subsets; In the (b), an extended learning sample is generated from each of the learning samples included in each of the mini-batches by varying a correct answer evaluation value according to the variation distribution using a random number; In the (c), a plurality of extended mini-batches, which are sets of the extended learning samples, are generated in units of the mini-batch, and the extended learning data is generated with the plurality of extended mini-batches as a subset; In the (d), the extended learning data is learned for each extended mini-batch, and the internal parameters are updated every time the extended mini-batch is learned. The appearance inspection method according to claim 1 .

3. In the step (d) of repeating the epochs, the training image is input to the evaluation engine during training, and the variance distribution used in the step (b) is changed based on the estimated evaluation value output from the evaluation engine. The appearance inspection method according to claim 1 .

4. calculating a reliability based on the estimated evaluation value output from the evaluation engine, and changing the variation distribution used in (b) based on the reliability; The appearance inspection method according to claim 3.

5. In the step (d) of repeating the epochs, each time the extended mini-batch is trained, the training image is input to the evaluation engine during training, and the variance distribution used in the step (b) is changed based on the estimated evaluation value output from the evaluation engine. The appearance inspection method according to claim 2.

6. calculating a reliability based on the estimated evaluation value output from the evaluation engine, and changing the variation distribution used in (b) based on the reliability; The appearance inspection method according to claim 5.

7. A visual inspection system having a processor and a memory resource, The processor, (a) storing learning data in the storage resource, the learning data being a set of learning samples each of which is a pair of a learning image obtained by capturing an object to be inspected for learning and a correct answer evaluation value for the learning image; (b) changing the correct answer evaluation value of the learning sample included in the learning data according to a changeable predetermined variation distribution, and generating an extended learning sample which is a learning sample having the changed value as the correct answer evaluation value; (c) generating augmented learning data that is a set of the augmented learning samples; (d) learning the relationship between the training images and the evaluation values ​​based on the extended training data to determine internal parameters of the evaluation engine; (e) acquiring an inspection image of the object to be inspected; (f) inputting the inspection image into the evaluation engine and obtaining an estimated evaluation value from an output of the evaluation engine, the estimated evaluation value being an estimate of the evaluation value of the inspection image; In the (b), generating an extended learning sample from each of the learning samples included in the learning data by varying a correct answer evaluation value using a random number according to the variation distribution; In the (c), generating the extended training data by replacing the training samples of the training data with extended training samples generated from the training samples; In the step (d), an internal parameter of the evaluation engine is updated based on the extended learning data; (b) to (d) are regarded as one epoch, and the process is repeated a number of times while regenerating the correct evaluation value in (b) for each epoch. Visual inspection system.

8. (a) storing in a storage resource learning data that is a set of learning samples that are pairs of learning images obtained by capturing images of an inspection object for learning and accuracy evaluation values ​​for the learning images; (b) changing the correct answer evaluation value of the learning sample included in the learning data according to a changeable predetermined variation distribution, and generating an extended learning sample which is a learning sample having the changed value as the correct answer evaluation value; (c) generating augmented learning data that is a set of the augmented learning samples; (d) learning the relationship between the training images and the evaluation values ​​based on the extended training data to determine internal parameters of the evaluation engine; (e) acquiring an inspection image of the object to be inspected; (f) inputting the inspection image into the evaluation engine and obtaining an estimated evaluation value from an output of the evaluation engine, the estimated evaluation value being an estimate of the evaluation value of the inspection image; In the (b), generating an extended learning sample from each of the learning samples included in the learning data by varying a correct answer evaluation value using a random number according to the variation distribution; In the (c), generating the extended training data by replacing the training samples of the training data with extended training samples generated from the training samples; In the step (d), an internal parameter of the evaluation engine is updated based on the extended learning data; (b) to (d) are regarded as one epoch, and the process is repeated a number of times while regenerating the correct evaluation value in (b) for each epoch. A visual inspection program that causes a computer to carry out this task.

Citation Information

Patent Citations

  • Information processing apparatus, information processing method and program

    JP2015176175A

  • Active learning via a sample consistency assessment

    US20210056417A1

  • Learning data augmentation policies

    WO2019222734A1

  • Visual inspection device, method for improving accuracy of determination for existence / nonexistence of shape failure of welding portion and kind thereof using same, welding system, and work welding method using same

    WO2020129617A1