Computer and Appearance Inspection Method
The computer-based appearance inspection method addresses the issues of over-detection and missed defects by learning specific parameters from good product images, resulting in accurate and efficient inspection of products.
Patent Information
- Application Number
- JP2021110397
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-07-01
- Publication Date
- 2025-06-30
- Estimated Expiration
- 2041-07-01
AI Technical Summary
Existing automatic appearance inspection methods based on machine learning often suffer from over-detection of good product parts with varying appearances and missed defects in defective products, leading to increased inspection burdens and risks of shipping defective products.
A computer-based appearance inspection method that learns good product estimation parameters and over-detection discrimination parameters using only good product images, specifically discriminating between good product candidates and defective candidates, and further distinguishing between over-detection and non-over-detection images.
The method effectively reduces over-detection of good product parts and missed defects in defective products, enabling accurate inspection of whether an object is a good product or a defective product, thereby reducing inspection burdens and ensuring product quality.
Smart Images

Figure 0007699978000001 
Figure 0007699978000002 
Figure 0007699978000003
Abstract
Description
Technical Field
[0001] The present invention relates to a computer and an appearance inspection method.
Background Art
[0002] The present invention preferably relates to a computer and an appearance inspection method based on machine learning. Provided are an apparatus and a method for inspecting whether an actual inspection object is a good product or a defective product by using a good product estimation parameter and an over-detection discrimination parameter learned with a learning good product image obtained by imaging a learning good product in advance.
[0003] In many industrial products including machines, metals, chemicals, foods, fibers, etc., based on inspection images, appearance inspections are widely performed to inspect whether the product is a good product or a defective product due to shape defects, assembly defects, foreign matter adhesion, internal defects and criticality, surface scratches, stains, dirt, etc. Generally, many of these appearance inspections have been performed by visual judgment of inspectors.
[0004] On the other hand, with the increasing demands for mass production and quality improvement, the inspection cost and the burden on inspectors are increasing. In addition, sensory inspections based on human senses particularly require high experience and skills. Problems such as individuality and reproducibility, where the evaluation values differ depending on the inspector or the results differ for each inspection, also pose challenges. Against such problems as inspection cost, skills, individuality, etc., automation of inspection is strongly demanded.
[0005] In recent years, automatic appearance inspection based on machine learning has been proposed. In automatic appearance inspection based on machine learning, the correspondence between an image of an inspection object and a determination result such as good or defective taught by an inspector is learned in advance.
[0006] At the time of learning, it is desirable to prepare a large number of good product images and defective product images, but in the manufacturing line of industrial products, collecting defective product images requires a great deal of cost. Therefore, an appearance inspection method has been proposed in which machine learning is performed using only good product images to inspect whether an inspection object is a good product or a defective product.
[0007] For example, Patent Document 1 discloses a method of training a neural network that uses an image of a defect-free product (good product) to output an image of a defect-free product even when an image of a product with a defect is input.
Prior Art Documents
Patent Documents
[0008]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0009] However, in the automatic appearance inspection method based on machine learning represented by Patent Document 1, since there are variations in brightness and shape even among good products, good product parts with a large difference in appearance from typical good products are often detected as defective (over-detection). Basically, in order to feedback countermeasures based on the defect content to the manufacturing process, the inspector has to check the images detected as defective by the appearance inspection device. However, if the number of over-detections is large, the burden on the inspector to check the images increases. Therefore, there is a need for an appearance inspection method that reduces over-detection when learning using only images of good products.
[0010] In addition, since there are variations in brightness and shape even among defective products, defective parts with an appearance similar to that of good products are often misjudged as good products (missed defects). When a missed defect occurs, not only can no feedback be provided to the manufacturing process, but there is also a risk of shipping defective products. Therefore, there is a need for an appearance inspection method that reduces missed defects when learning using only images of good products.
[0011] The present invention has been made in view of the above problems, and an object thereof is to provide a computer and an appearance inspection method capable of accurately inspecting whether an inspection object is a good product or a defective product.
Means for Solving the Problems
[0012] To solve the above problems, a computer according to one aspect of the present invention is a computer for discriminating whether an object is a good product or a defective product. The computer has a processor, and the processor includes an image acquisition step of acquiring an inspection image of the object, a pass / fail discrimination step of discriminating whether the inspection image acquired in the image acquisition step is an inspection image of a good product candidate or an inspection image of a defective candidate, an over-detection discrimination step of discriminating whether the inspection image discriminated as a defective candidate in the pass / fail discrimination step is an inspection image of over-detection or a non-over-detection inspection image that is not over-detected, a good product estimation parameter learning step of learning a good product estimation parameter used in the pass / fail discrimination step using the good product learning image acquired in the image acquisition step, and an over-detection discrimination parameter learning step of learning an over-detection discrimination parameter used in the over-detection discrimination step using the good product learning image. In the over-detection discrimination parameter learning step, the good product learning image is used as the inspection image in the pass / fail discrimination step, and the over-detection discrimination parameter is learned so that in the pass / fail discrimination step, the inspection image of the good product candidate is discriminated as a non-over-detection inspection image, and the inspection image of the defective candidate is discriminated as an over-detection inspection image.
Effects of the Invention
[0013] According to the present invention, it is possible to realize a computer and an appearance inspection method capable of accurately inspecting whether an inspection object is a good product or a defective product.
Brief Description of the Drawings
[0014]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Embodiments for Carrying Out the Invention
[0015] Hereinafter, embodiments of the present invention will be described with reference to the drawings. Note that the embodiments described below do not limit the invention according to the claims, and not all of the elements and combinations thereof described in the embodiments are essential for the solution means of the invention.
[0016] In the drawings for explaining the embodiments, the same reference numerals are given to portions having the same functions, and repeated explanations thereof are omitted.
[0017] In the following description, the expression "xxx data" may be used as an example of information, but the data structure of the information may be of any kind. That is, in order to indicate that the information does not depend on the data structure, "xxx data" can be referred to as "xxx table". Further, "xxx data" may simply be referred to as "xxx". And in the following description, the configuration of each piece of information is an example, and the information may be divided and held, or combined and held.
[0018] In the following description, the "program" may be used as the subject to explain the processing. However, the program is executed by a processor (for example, a CPU (Central Processing Unit)) to perform the defined processing while appropriately using a storage resource (for example, a memory) and / or a communication interface device (for example, a port). Therefore, the subject of the processing may be the program. The processing described with the "program" as the subject may be the processing performed by a processor or a computer having the processor.
[0019] In the following description, when the operating entity is described as "the ○○ part is", it means that the processor reads the processing content of the ○○ part which is a program from the memory, loads it into the memory, and then realizes the function of the ○○ part (details will be described later).
[0020] As described above, there are parts that are correctly discriminated as good products among good products and parts that are misjudged as defective. Among good products, the parts that are correctly discriminated as good products are described as normal parts, and the parts that are misjudged as defective among good products are described as over-detection parts. Also, among defective products, there are parts that are misjudged as good products and parts that are correctly discriminated as defective. Among defective products, the parts that are misjudged as good products are called missed parts, No Among good products, the parts that are correctly discriminated as defective are described as abnormal parts.
[0021] The appearance inspection apparatus and the appearance inspection method of this embodiment have the following configuration as an example.
[0022] (1) An image acquisition unit that captures an inspection image of an object, a pass / fail discrimination unit that inputs the inspection image acquired by the image acquisition unit and discriminates whether it is a good product candidate or a defective candidate, among the inspection images acquired by the image acquisition unit, an over-detection discrimination unit that inputs the inspection image discriminated as a defective candidate by the pass / fail discrimination unit and discriminates whether it is over-detection or not (non-over-detection), a good product estimation parameter learning unit that learns the good product estimation parameters used by the pass / fail discrimination unit using the learning good product images acquired by the image acquisition unit, and an over-detection discrimination parameter learning unit that learns the over-detection discrimination parameters used by the over-detection discrimination unit using the learning good product images acquired by the image acquisition unit, and the over-detection discrimination parameter learning unit is characterized in that it inputs the learning good product images to the pass / fail discrimination unit to divide them into good product candidates and defective candidates, and learns the over-detection discrimination parameters so as to discriminate the good product candidates as non-over-detection and the defective candidates as over-detection.
[0023] Supplement to this feature. What is detected as defective by a general appearance inspection method is an over-detection part in a good product or an abnormal part in a defective product. Therefore, if it is possible to discriminate whether the part detected as defective by a general appearance inspection method is over-detection or not (non-over-detection), by setting the part discriminated as non-over-detection as defective, only the defective part can be detected, and a reduction in over-detection can be expected.
[0024] The problem of this process is how to learn the over-detection discrimination parameters used by the over-detection discrimination unit. If learning is performed using the image of the over-detection part and the image of the abnormal part, an appropriate boundary for separating the distribution of the over-detection part and the distribution of the abnormal part in the feature space can be determined, but it is necessary to collect images of defective products for learning, which is not desirable. Also, it is difficult to determine an appropriate boundary for separating the distribution of the over-detection part and the distribution other than the over-detection part only using the image of the over-detection part.
[0025] Therefore, in the present embodiment, by using the image of the over-detection part and the image of the normal part to determine the boundary that separates the over-detection part from the outside of the over-detection part, a boundary applicable to the separation of the over-detection part and the abnormal part is determined.
[0026] Fig. 15 schematically shows the distributions of the normal part, the over-detection part, and the abnormal part. In Fig. 15, the distribution 1301 of the normal part, the distribution 1302 of the over-detection part, and the distribution 1303 of the abnormal part are shown as two-dimensional distributions, that is, on the feature amount plane. In the present embodiment, by using the image of the over-detection part and the image of the normal part, a boundary 1304 that separates the over-detection part from the outside of the over-detection part is determined. Specifically, in the present embodiment, the image of the good product for learning is input to the good / bad discrimination part, divided into good product candidates and bad product candidates, and the over-detection discrimination parameters are learned so that the good product candidates are discriminated as non-over-detection and the bad product candidates are discriminated as over-detection. Note that although the distribution 1301 of the normal part etc. is shown on the feature amount plane in Fig. 15 (and Fig. 16 described later), this is merely a premise for easy understanding, and there is no problem in treating it as a multi-dimensional distribution of three dimensions or more.
[0027] (2) The over-detection discrimination parameter learning unit includes a bad candidate image cutting unit that inputs the learning good product image to the good / bad discrimination part and sets the part discriminated as a bad candidate as a bad candidate image, a first image acquisition unit that selects a first image from the bad candidate image, and a second image acquisition unit that sets the area other than the first image in the learning good product image as a second image, and the over-detection discrimination parameters are learned so that the first image is discriminated as over-detection and the second image is discriminated as non-over-detection.
[0028] Supplement to this feature. Generally, the over-detection part often exists in a local area of the image of the good product, and the appearance of most of the remaining areas is similar to that of a typical good product. Therefore, if the over-detection discrimination parameters are learned using the entire image acquired by the image acquisition unit, the features of the areas other than the over-detection part will be included in the learning, so the accuracy of over-detection discrimination may decrease.
[0029] Therefore, in this embodiment, by cutting out the portions determined as defective candidates by the pass / fail determination unit, the characteristics of the over-detection unit can be learned better, and an improvement in the accuracy of over-detection determination can be expected.
[0030] In addition, since there are variations in the appearance of the portions determined as defective candidates by the pass / fail determination unit, even if all the images of the portions determined as defective candidates are used for learning the over-detection determination parameters, the characteristics of the over-detection unit cannot be learned, and the accuracy of over-detection determination may decrease. Therefore, in this embodiment, the first image is selected from the defective candidate images obtained by cutting out the portions determined as defective candidates by the pass / fail determination unit, and the over-detection determination parameters are learned so as to determine the first image as over-detection, whereby the characteristics of the over-detection unit can be learned better, and an improvement in the accuracy of over-detection determination can be expected.
[0031] (3) A normal determination unit that inputs the inspection images determined as non-defective candidates by the pass / fail determination unit among the inspection images acquired by the image acquisition unit and determines whether it is normal or not (abnormal), and a normal determination parameter learning unit that learns the normal determination parameters used by the normal determination unit using the non-defective learning images acquired by the image acquisition unit, wherein the normal determination parameter learning unit inputs the non-defective learning images to the pass / fail determination unit to divide them into non-defective candidates and defective candidates, and learns the normal determination parameters so as to determine the non-defective candidates as normal and the defective candidates as abnormal.
[0032] Supplement to this feature. What is determined as non-defective by a general appearance inspection method is the normal part in non-defective products or the overlooked part in defective products. Therefore, if it is possible to determine whether the portion determined as non-defective by a general appearance inspection method is normal or abnormal, by setting the portion determined as abnormal as defective, defective parts that have been overlooked conventionally can be detected, and a reduction in defective part overlooking can be expected.
[0033] The problem of this process is how to learn the normal discrimination parameters used in the normal discrimination unit. If we learn using the images of the normal part and the missed part, we can determine an appropriate boundary in the feature space to separate the distribution of the normal part and the distribution of the missed part. However, it is necessary to collect defective product images for learning, which is not desirable. Also, it is difficult to determine an appropriate boundary to separate the distribution of the normal part and the distribution outside the normal part using only the images of the normal part.
[0034] Therefore, in this embodiment, by using the images of the normal part and the over-detection part to determine a boundary that separates the normal part from the outside of the normal part, a boundary applicable to the separation of the normal part and the missed part is determined.
[0035] Fig. 16 schematically shows the distributions of the normal part, the over-detection part, and the missed part. In Fig. 16, the distribution 1401 of the normal part, the distribution 1402 of the over-detection part, and the distribution 1403 of the missed part are shown as two-dimensional distributions. In this embodiment, by using the images of the normal part and the over-detection part, a boundary 1404 that separates the normal part from the outside of the normal part is determined. Specifically, in this embodiment, the images of good products for learning are input into the pass / fail discrimination unit, separated into good product candidates and bad product candidates, and the normal discrimination parameters are learned so that the good product candidates are discriminated as normal and the bad product candidates are discriminated as abnormal.
[0036] According to this embodiment, in the automation of appearance inspection using machine learning, when learning using only the images of good products, it is possible to reduce the over-detection of good product parts with a significantly different appearance from typical good products and reduce the miss of defective parts with an appearance similar to good products. As a result, it becomes possible to accurately inspect whether the inspection object is a good product or a defective product.
Example
[0037] 1. Schematic Configuration of Appearance Inspection Device Fig. 1 is a diagram showing the schematic configuration of the appearance inspection device according to Example 1. The appearance inspection device 10 is a device capable of various information processes, and is, for example, an information processing device such as a computer. The appearance inspection device 10 has a processor 11 and a memory 12.
[0038] The processor 11 is, for example, a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), an FPGA (Field-Programmable Gate Array), etc. The memory 12 includes, for example, a magnetic storage medium such as an HDD (Hard Disk Drive), a semiconductor storage medium such as a RAM (Random Access Memory), a ROM (Read Only Memory), an SSD (Solid State Drive), etc. Also, a combination of an optical disc such as a DVD (Digital Versatile Disk) and an optical disc drive is used as a memory. In addition, known storage media such as magnetic tape media are also used as memories.
[0039] Programs such as firmware are stored in the memory 12. When the appearance inspection device 10 starts operating (for example, when power is turned on), a program such as firmware is read from this memory 12 and executed to perform overall control of the appearance inspection device 10. Also, in addition to programs, data etc. necessary for each process of the appearance inspection device 10 are stored in the memory 12.
[0040] An imaging means 13, an input means 14, and a display means 15 are connected to the appearance inspection device 10.
[0041] The imaging means 13 is, for example, a CCD camera, an optical microscope, a charged particle microscope, an ultrasonic inspection device, an X-ray inspection device, etc., and outputs an inspection image to the appearance inspection device 10 by imaging the surface or the inside of the inspection object as a digital video. The input means 14 is, for example, a keyboard, a mouse, etc., and outputs an operation input signal to the appearance inspection device 10 based on the operation by the inspector of the appearance inspection device 10. The display means 15 is, for example, a display, etc., and displays a predetermined screen based on a display control signal sent from the appearance inspection device 10.
[0042] Note that the appearance inspection device 10 of this embodiment may be configured by a so-called cloud in which a plurality of information processing devices are communicably configured via a communication network.
[0043] The processor 11 of the appearance inspection device 10 includes an image acquisition unit 20, a non-defective product estimation parameter learning unit 21, an over-detection discrimination parameter learning unit 22, a pass / fail discrimination unit 23, and an over-detection discrimination unit 24 as function realization units. The over-detection discrimination parameter learning unit 22 includes a defective candidate image extraction unit 22a, a first image acquisition unit 22b, and a second image acquisition unit 22c.
[0044] Further, a non-defective product estimation parameter 30 and an over-detection discrimination parameter 31 are stored in the memory 12 of the appearance inspection device 10. The non-defective product estimation parameter 30 includes an initial non-defective product estimation parameter 30a and a final non-defective product estimation parameter 30b.
[0045] Details of each of the function realization units provided in the processor 11 and each of the parameters stored in the memory 12 will be described later.
[0046] 2. Overall processing sequence of the appearance inspection device The overall processing sequence of the appearance inspection device 10 in this embodiment is shown in FIG. 2. The processing sequence is roughly divided into a learning phase 101 and an inspection phase 102.
[0047] In the learning phase 101, the image acquisition unit acquires a learning non-defective product image 105 obtained by imaging a learning non-defective product 103 (104). The learning non-defective product image is acquired by imaging the surface or the inside of the learning non-defective product as a digital video by the imaging means 13.
[0048] Note that, as another example of "acquisition", it may be sufficient to simply receive an image captured by another system and store it in the memory 12 of the appearance inspection device 10.
[0049] Next, in the good product parameter learning unit, using the learning good product image 105, the good product estimation parameters used in the pass / fail discrimination unit (details will be described with reference to FIG. 4 described later) are learned to obtain the initial good product estimation parameters 107 (106).
[0050] The good product estimation parameters are internal parameters of a good product estimator based on machine learning that takes as input the image captured by the image acquisition unit and outputs a pseudo good product image for difference calculation. As the good product estimator, various existing machine learning engines can be used. For example, a neural network as shown in FIG. 3 described later can be mentioned.
[0051] Generally, the image of the inspection object (inspection image) acquired in the image acquisition unit is input to the good product estimator, and by comparing and inspecting the output pseudo good product image and the inspection image, the locations with large differences are discriminated as defective. However, as shown in FIG. 5 described later, since there are variations in brightness and shape even in the learning good products, good product parts with a large difference in appearance from the representative good products are often detected as defective (over-detected).
[0052] In this embodiment, in the over-detection discrimination parameter learning unit, the learning good product image is input to the pass / fail discrimination unit, and using the initial good product estimation parameters 107, the inspection image of the good product candidate (hereinafter simply referred to as "good product candidate") and the inspection image of the defective candidate (hereinafter simply referred to as "defective candidate") are separated, and the over-detection discrimination parameters 109 used in the over-detection discrimination unit are learned so as to discriminate the good product candidate as a non-over-detected inspection image (hereinafter simply referred to as "non-over-detected") and the defective candidate as an over-detected inspection image (hereinafter simply referred to as "over-detected") (108).
[0053] The over-detection discrimination parameter is an internal parameter of an over-detection discriminator based on machine learning that discriminates between over-detection and non-over-detection, with the images discriminated as defective candidates in the pass / fail discrimination process among the images captured by the image acquisition unit as the input. As the over-detection discriminator, various existing machine learning engines can be used. For example, deep neural networks represented by Convolutional Neural Network (CNN), Support Vector Machine (SVM) / Support Vector Regress (SVR), k-nearest neighbor (k-NN), etc. can be mentioned. These engines can handle classification problems.
[0054] Also, in this embodiment, in the non-defective product estimation parameter learning unit, the learning non-defective product images are divided into non-defective product candidates and defective candidates in the pass / fail discrimination process. The non-defective product candidates are input to the over-detection discrimination unit, and the non-defective product candidates discriminated as over-detected, and the defective candidates are input to the over-detection discrimination unit. The defective candidates discriminated as non-over-detected are used to additionally learn the non-defective product estimation parameters to obtain the final non-defective product estimation parameter 111 (110). The details of the additional learning of the non-defective product estimation parameters will be described with reference to FIG. 11 below. Note that the initial non-defective product estimation parameter 107 may be used as the final non-defective product estimation parameter 111 without performing this additional learning.
[0055] In inspection phase 102, the image acquisition unit acquires an inspection image 122 obtained by imaging the inspection object 120 (121). The inspection image 122 is acquired by imaging the surface or inside of the inspection object 120 as a digital video by the imaging means 13.
[0056] Next, as shown in FIG. 4 described later, the inspection image is input to the pass / fail discrimination unit, and using the final non-defective product estimation parameter 111, it is discriminated whether it is a non-defective product candidate or a defective candidate (123). Next, among the inspection images, the inspection image 124 discriminated as a defective candidate in 123 is input to the over-detection discrimination unit, and it is discriminated whether it is over-detected or non-over-detected, and the inspection image discriminated as non-over-detected is output as a defective image 126 (125). The defective image 126 is confirmed by the inspector (127), and if there are defects or the like, countermeasures are fed back to the manufacturing process.
[0057] 3. Good product estimator As the good product estimator for estimating the pseudo-good product image from the input image in this embodiment, for example, a convolutional neural network described in the literature (Dong, Chao, et al. "Image super-resolution using deep convolutional networks." arXiv preprint arXiv:1501.00092 (2014)) can be used.
[0058] Specifically, a neural network having a three-layer structure as shown in FIG. 3 may be used. Here, Y is the input image, F1(Y) and F2(Y) represent intermediate data, and F(Y) is the estimation result of the pseudo-good product image.
[0059] Note that the intermediate data and the estimation result are calculated by the following formulas (1) to (3). However, "*" represents the convolution operation. Here, W1 is n1 filters of size c0×f1×f1, c0 is the number of channels of the input image, and f1 represents the size of the spatial filter. By convolving the input image with the filter of size c0×f1×f1 n1 times, an n1-dimensional feature map can be obtained. B1 is an n1-dimensional vector and is the bias component corresponding to n1 filters. Similarly, W2 is n2 filters of size n1×f2×f2, B2 is an n2-dimensional vector, W3 is c0 filters of size n2×f3×f3, and B3 is a c0-dimensional vector. F1(Y)=max(0, W1*Y + B1) …(1) F2(Y)=max(0, W2*F1(Y) + B2) …(2) F(Y) = W3*F2(Y) + B3 …(3) The aforementioned c0 is a value determined by the number of channels of the input image. Also, f1, f2, n1, and n2 are hyperparameters determined by the user before the learning sequence. For example, f1 = 9, f2 = 5, n1 = 128, and n2 = 64 may be used. The parameters adjusted in the good product estimation parameter learning section are W1, W2, W3, B1, B2, and B3.
[0060] In the learning of the good product estimation parameters, by inputting the learning good product images into the good product estimator, pseudo good product images are estimated, the estimation error between the learning good product images and the pseudo good product images is calculated, and the good product estimation parameters are updated so that the estimation error becomes small. Learning is performed by repeating this process for a predetermined number N1 of good product estimation parameter learning times.
[0061] Note that even if the number of repetitions is less than N1, learning may be terminated if the estimation error is small or if an operation to end learning is received from a user such as an inspector.
[0062] In the update of the good product estimation parameters, general error backpropagation in the learning of neural networks may be used. Also, when calculating the estimation error, all of the learning good product images may be used, or a mini-batch method may be employed. That is, several images may be randomly extracted from the learning good product images, and the update of the good product estimation parameters may be repeatedly executed.
[0063] Furthermore, patch images may be randomly cut out from the learning good product images and used as the input image Y of the neural network. Thereby, learning can be performed efficiently.
[0064] Note that other configurations may be used as the configuration of the convolutional neural network shown above. For example, the number of layers may be changed, a network with four or more layers may be used, or a configuration with skip connections may be adopted.
[0065] 4. Good or Bad Discrimination A method for discriminating whether an inspection image is a good product candidate or a bad product candidate using the good or bad discrimination unit in this embodiment is shown in FIG. 4. First, using the good product estimation parameters 306 learned by the good product estimation parameter learning unit, a pseudo good product image 308 is estimated from the inspection image 301 (307). In FIG. 4, as an example, three inspection images 302, 303, 304 and a defect 305 are illustrated. Also, pseudo good product images 309, 310, 311 estimated from each of the inspection images 302, 303, 304 are shown in FIG. 4.
[0066] Next, a difference image 313 between the inspection image 301 and the pseudo-good product image 308 is calculated (312). In FIG. 4, difference images 314, 315, and 316 corresponding to the inspection images 302, 303, and 304 respectively are illustrated. Next, using the difference image 313 as an input, a portion where the pixel value of the difference image is smaller than a predetermined pass / fail discrimination threshold TH is defined as a good product candidate, and a portion where the pixel value of the difference image is larger than TH is defined as a defective candidate, and a pass / fail discrimination result 318 is output (317). In FIG. 4, pass / fail discrimination results 319, 320, and 321 corresponding to the inspection images 302, 303, and 304 respectively, and a defective candidate 322 are illustrated.
[0067] 5. Overdetection discrimination 5.1 General problems
[0068] As described above, in this embodiment, in the overdetection discrimination parameter learning unit, a learning good product image is input to the pass / fail discrimination unit, divided into a good product candidate and a defective candidate, and the overdetection discrimination parameter is learned so as to discriminate the good product candidate as non-overdetected and the defective candidate as overdetected.
[0069] A general problem is that due to variations in brightness and shape even among good products, good product parts with a significantly different appearance from typical good products are often discriminated as defective (overdetected). A general appearance inspection method by learning using only good product images is shown in FIG. 5.
[0070] In the learning phase 401, first, using the learning good product image 402, a good product estimation parameter 408 is learned (407). In FIG. 5, as an example, three learning good product images 403, 404, and 405, and an overdetection unit 406 are illustrated.
[0071] In the inspection phase 410, as described with reference to FIG. 4, the pass / fail discrimination is performed on the inspection image 411 using the good product estimation parameter 408 to obtain a pass / fail discrimination result 418 (417). FIG. 5 illustrates, as an example, three inspection images 412, 413, 414, a defect 415, and an over-detection portion 416. Also, FIG. 5 illustrates pass / fail discrimination results 419, 420, 421 corresponding to the inspection images 412, 413, 414 respectively, and a defective portion 422. As shown in FIG. 5, the over-detection portion 416 is over-detected. This occurs because when there are a small number of learning good product images having an over-detection portion, the features of the over-detection portion cannot be sufficiently learned.
[0072] What is discriminated as a defect by the method described in FIG. 5 is an over-detection portion in a good product or an abnormal portion in a defective product. Therefore, if it is possible to discriminate whether the portion discriminated as a defect by the method described in FIG. 5 is over-detection or non-over-detection, by setting the portion discriminated as non-over-detection as a defect, only the defective portion can be detected and over-detection can be reduced.
[0073] In this embodiment, in the learning phase, the over-detection discrimination parameter is learned such that the learning good product image is input to the pass / fail discrimination unit and divided into a good product candidate and a defective candidate, and the good product candidate is discriminated as non-over-detection and the defective candidate is discriminated as over-detection. In the inspection phase, the inspection image is input to the pass / fail discrimination unit to discriminate whether it is a good product candidate or a defective candidate, the inspection image discriminated as a defective candidate is input to the over-detection discrimination unit to discriminate whether it is over-detection or non-over-detection, and the inspection image discriminated as non-over-detection is output as a defective image. There are several examples of the method for learning the over-detection discrimination parameter in the learning phase of this embodiment. Hereinafter, representative examples will be specifically described.
[0074] 5.2 Method 1 for Learning the Over-Detection Discrimination Parameter An example of the method for learning the over-detection discrimination parameter in this embodiment will be described with reference to FIG. 6.
[0075] In the example shown in FIG. 6, first, a pass / fail discrimination is performed on the learning good product images 501 using the initial good product estimation parameters 506 to obtain a pass / fail discrimination result 508 (507). In FIG. 6, as an example, three learning good product images 502, 503, 504 and an over-detection unit 505 are illustrated. Also, in FIG. 6, pass / fail discrimination results 509, 510, 511 corresponding to the learning good product images 502, 503, 504 respectively, and defective candidates 512 are illustrated.
[0076] Next, among the learning good product images 501, an image having a location discriminated as a defective candidate in the pass / fail discrimination is set as a defective candidate image 514 (513). Next, among the learning good product images 501, an image having no location discriminated as a defective candidate in the pass / fail discrimination (an image in which the entire area of the image is discriminated as a good product candidate) is set as a good product candidate image 516 (515). Next, an over-detection discrimination parameter 518 is learned so as to discriminate the defective candidate image 514 as over-detected and the good product candidate image 516 as non-over-detected (517).
[0077] In the learning of the over-detection discrimination parameter, by inputting the defective candidate image and the good product candidate image into the over-detection discriminator, it is discriminated whether it is over-detected or non-over-detected. Based on the discrimination result, a discrimination error is calculated, and the over-detection discrimination parameter is updated so that the discrimination error becomes small. Learning is performed by repeating this process a predetermined number N2 of times of learning the over-detection discrimination parameter.
[0078] The discrimination error is calculated by Equation (4). In Equation (4), t_i is the correct label of image i (i = 1, 2,..., N, N: the number of learning good product images), and y_i is the label representing the discrimination result of image i. For example, the label for over-detection can be set to 1 and the label for non-over-detection can be set to 0. Note that even if the number of repetitions is less than N2, learning may be terminated if the discrimination error is small or if an operation to end learning is received from a user such as an inspector. L = {Σ(t_i - y_i)^2} / N …(4)
[0079] 5.3 Method 2 for Learning Over-Detection Discrimination Parameters An example of a method for learning over-detection discrimination parameters different from the example described in 5.2 in this embodiment will be described with reference to FIG. 7.
[0080] In the example shown in FIG. 7, first, in the same manner as the method described in 5.2, using the initial good product estimation parameter 602, a pass / fail discrimination is performed on the learning good product image 601 to obtain a pass / fail discrimination result 604 (603).
[0081] Next, using the defective candidate image extraction section, the locations discriminated as defective candidates in the pass / fail discrimination are extracted as a defective candidate image 606 (605). Using the first image acquisition section, as shown in FIG. 10 described later, the defective candidate image 606 is displayed on the GUI, and the inspector selects a first image 608 from the defective candidate image 606 (607). Using the second image acquisition section, from the learning good product image 601, the locations other than the first image 608 are extracted as a second image 610 (609), and an over-detection discrimination parameter 612 is learned so as to discriminate the first image 608 as over-detected and the second image 610 as non-over-detected (611).
[0082] Therefore, in the example shown in FIG. 7, by extracting the locations discriminated as defective candidates by the pass / fail discrimination section, the characteristics of the over-detection section can be learned better, and an improvement in the accuracy of over-detection discrimination can be expected.
[0083] 5.4 Method 3 for Learning Over-Detection Discrimination Parameters An example of a method for learning over-detection discrimination parameters different from the examples described in 5.2 to 5.3 in this embodiment will be described with reference to FIG. 8.
[0084] In the example shown in FIG. 8, first, in the same manner as the method described in 5.2, using the initial good product estimation parameter 702, a pass / fail discrimination is performed on the learning good product image 701 to obtain a pass / fail discrimination result 704 (703).
[0085] Next, among the good product images for learning 701, an image with a location determined as a defect candidate in the pass / fail determination is set as the defect candidate image 706 (705). Using the first image acquisition unit, the defect candidate image 706 is displayed on the GUI. An inspector selects the first image 708 from the defect candidate image 706 (707). Using the second image acquisition unit, an image other than the first image 708 is set as the second image 710 from the good product images for learning 701 (709). The over-detection discrimination parameter 612 is learned so as to determine that the first image 708 is over-detected and the second image 710 is not over-detected (711).
[0086] Therefore, in the example shown in FIG. 8, by acquiring a defect candidate image determined as a defect candidate by the pass / fail determination unit and selecting the first image from this defect candidate image, the characteristics of the over-detection unit can be learned better, and an improvement in the accuracy of over-detection discrimination can be expected.
[0087] 5.5 Method for Learning Over-Detection Discrimination Parameter 4 An example of a method for learning an over-detection discrimination parameter different from the examples described in 5.2 to 5.4 in this embodiment will be described with reference to FIG. 9.
[0088] In the example shown in FIG. 9, first, in the same manner as the method described in 5.2, pass / fail determination is performed on the good product image for learning 801 using the initial good product estimation parameter 802, and a pass / fail determination result 804 is obtained (803).
[0089] Next, using the first image acquisition unit, a location determined as a defect candidate in the pass / fail determination is cut out as the first image 806 from the good product image for learning 801 (805). Using the second image acquisition unit, a location other than the first image 806 (a location determined as a good product candidate in the pass / fail determination) is cut out as the second image 808 from the good product image for learning 801 (807). The over-detection discrimination parameter 810 is learned so as to determine that the first image 806 is over-detected and the second image 808 is not over-detected (809).
[0090] Therefore, in the example shown in FIG. 9, by cutting out a location determined as a defect candidate by the pass / fail determination unit as the first image, the characteristics of the over-detection unit can be learned better, and an improvement in the accuracy of over-detection discrimination can be expected.
[0091] 5.6 Method for learning over-detection discrimination parameters 5 In this embodiment, an example of a method for learning over-detection discrimination parameters different from the examples described in 5.2 to 5.5 will be described with reference to FIG. 10.
[0092] In the example shown in FIG. 10, first, in the same manner as the method described in 5.2, using the initial good product estimation parameter 902, a pass / fail discrimination is performed on the learning good product image 901 to obtain a pass / fail discrimination result 904 (903).
[0093] Next, for the portions determined to be defective candidates in the pass / fail discrimination of the learning good product image 901, the learning good product image 901 and the difference image calculated at the time of pass / fail discrimination are cut out, and a pair of the two cut-out images is defined as the first image pair 906 (905). In FIG. 10, as an example, three images 907, 908, and 909 obtained by cutting out defective candidate portions from the learning good product image are shown. Also, in FIG. 10, difference images 910, 911, and 912 corresponding to the images 907, 908, and 909 respectively, and first image pairs 913, 914, and 915 are shown.
[0094] Next, for the portions other than the first image 906 of the learning good product image 901 (portions determined to be good product candidates in the pass / fail discrimination), the learning good product image 901 and the difference image calculated at the time of pass / fail discrimination are cut out, and a pair of the two cut-out images is defined as the second image pair 917 (916). In FIG. 10, as an example, three images 918, 919, and 920 obtained by cutting out good product candidate portions from the learning good product image are shown. Also, in FIG. 10, difference images 921, 922, and 923 corresponding to the images 918, 919, and 920 respectively, and second image pairs 924, 925, and 926 are shown.
[0095] Next, the over-detection discrimination parameter 928 is learned so as to discriminate the first image pair 906 as over-detection and the second image pair 917 as non-over-detection (927).
[0096] Therefore, in the example shown in FIG. 10, for each of the locations determined as good product candidates and defective candidates in the pass / fail determination, the pass / fail determination unit cuts out the learning good product image and the difference image calculated at the time of pass / fail determination, thereby determining whether the inspection image is a good product candidate or a defective candidate. Thus, it is possible to reliably determine whether the inspection image is a good product candidate or a defective candidate.
[0097] In addition, in the example shown in FIG. 10, since the over-detection discrimination parameter is learned using this difference image and the learning good product image, the characteristics of the over-detection unit can be learned better, and an improvement in the accuracy of over-detection discrimination can be expected.
[0098] 5.7 Effect of Over-Detection Discrimination In the appearance inspection apparatus according to the present embodiment, in the learning phase, the over-detection discrimination parameter is learned by the method described in 5.2 to 5.7. In the inspection phase, what is determined as a defective candidate by pass / fail determination is an over-detection part in a good product or a defective part.
[0099] Therefore, using the over-detection discrimination parameter learned in the learning phase, for the location determined as a defective candidate by pass / fail determination, it is determined whether it is over-detection or non-over-detection, and by setting the location determined as non-over-detection as defective, only the defective part can be detected, and reduction of over-detection becomes possible.
[0100] Therefore, according to the present embodiment, it is possible to realize an appearance inspection apparatus and an appearance inspection method capable of inspecting with high accuracy whether an object to be inspected is a good product or a defective product.
[0101] 6. Additional Learning A method for additionally learning the good product estimation parameter using the good product estimation parameter learning unit in the present embodiment will be described with reference to FIG. 11.
[0102] First, using the initial good product estimation parameter 1002, a pass / fail discrimination is performed on the learning good product image 1001, and an image in which there is no location discriminated as a defective candidate (an image in which the entire area is discriminated as a good product candidate) is acquired as the good product candidate image 1004, and an image in which there is a location discriminated as a defective candidate is acquired as the defective candidate image 1005 (1003).
[0103] Next, using the over-detection discrimination parameter 1006 learned by the over-detection discrimination parameter learning unit, the good product candidate image is input to the over-detection discrimination unit, and an image discriminated as over-detected is acquired as the over-detection image 1008 (1007).
[0104] Next, using the over-detection discrimination parameter 1006 learned by the over-detection discrimination parameter learning unit, the defective candidate image is input to the over-detection discrimination unit, and an image discriminated as non-over-detected is acquired as the non-over-detection image 1010 (1009).
[0105] Next, using the initial good product estimation parameter as the initial value of the good product estimation parameter, additional learning is performed using the over-detection image 1008 and the non-over-detection image 1010 to obtain the final good product estimation parameter 1012 (1011).
[0106] Therefore, in the example shown in FIG. 11, by performing additional learning using the over-detection image and the non-over-detection image, the characteristics of the over-detection unit can be further learned, and an improvement in the accuracy of over-detection discrimination can be expected.
Example
[0107] 7. Schematic configuration of the appearance inspection device FIG. 12 is a diagram showing the schematic configuration of the appearance inspection device according to the second embodiment.
[0108] The processor 11 of the appearance inspection device 10 has an image acquisition unit 20, a good product estimation parameter learning unit 21, an over-detection discrimination parameter learning unit 22, and a normal discrimination parameter learning unit 25 as function realization units.
[0109] Also, the memory 12 of the appearance inspection device 10 stores a good product estimation parameter 30, an over-detection discrimination parameter 31, and a normal discrimination parameter 32.
[0110] 8. Normal discrimination As the appearance inspection device in this embodiment, a processing sequence different from the processing sequence in FIG. 1 will be described with reference to FIG. 13. The processing sequence is roughly divided into a learning phase 1101 and an inspection phase 1102.
[0111] In the learning phase 1101, in the image acquisition unit, a good product 1103 for learning is imaged to obtain a good product image 1105 for learning (1104). Next, in the good product estimation parameter learning unit, using the good product image 1105 for learning, the good product estimation parameter 1107 used in the good / bad discrimination unit is learned (1106: similar to 106 in FIG. 1).
[0112] Next, in the over-detection discrimination parameter learning unit, the good product image 1106 for learning is input to the good / bad discrimination unit, and using the good product estimation parameter 1107, it is divided into good product candidates and bad product candidates, and the over-detection discrimination parameter 1109 used in the over-detection discrimination unit is learned so as to discriminate good product candidates as non-over-detected and bad product candidates as over-detected (1108: similar to 108 in FIG. 1).
[0113] Next, in the normal discrimination parameter learning unit, the good product image 1106 for learning is input to the good / bad discrimination unit, and using the good product estimation parameter 1107, it is divided into good product candidates and bad product candidates, and the normal discrimination parameter 1111 used in the normal discrimination unit is learned so as to discriminate good product candidates as normal and bad product candidates as not normal (abnormal) (1110).
[0114] The normal discrimination parameter is an internal parameter of a normal discriminator based on machine learning that discriminates between normal and abnormal, taking as input the images among those captured by the image acquisition unit that are discriminated as good product candidates in the pass / fail discrimination process. As the normal discriminator, similar to the over-detection discriminator, various existing machine learning engines can be used. For example, deep neural networks represented by Convolutional Neural Network (CNN), Support Vector Machine (SVM) / Support Vector Regress (SVR), k-nearest neighbor (k-NN), etc. These engines can handle classification problems.
[0115] In inspection phase 1102, the image acquisition unit captures the inspection object 1112 to obtain an inspection image 1114 (1113: similar to 121 in FIG. 1). Next, the inspection image is input to the pass / fail discrimination unit and divided into good product candidates 1118 and bad product candidates 1116 using the good product estimation parameter 1107 (1115).
[0116] Next, among the inspection images, the inspection images 1116 discriminated as bad product candidates in 1115 are input to the over-detection discrimination unit to discriminate between over-detection and non-over-detection, and those discriminated as non-over-detection are output as bad images 1120 (1117: similar to 125 in FIG. 1).
[0117] Next, among the inspection images, the inspection images 1118 discriminated as good product candidates in 1115 are input to the normal discrimination unit to discriminate between normal and abnormal, and those discriminated as abnormal are output as bad images 1120 (1119). The inspector checks the bad images 1120 (1121), and if there are defects or the like, countermeasures are fed back to the manufacturing process.
[0118] A common problem is that since there are variations in brightness and shape even among defective products, defective parts whose appearance is similar to that of non-defective products are often misjudged as non-defective products (missed defects). What is judged as a non-defective product candidate in the pass / fail discrimination process is a normal part in non-defective products or a missed part in defective products. Therefore, if it is possible to determine whether a location judged as a non-defective product candidate in the pass / fail discrimination process is normal or abnormal, by regarding the locations judged as abnormal as defective, it is possible to detect defective parts that have been conventionally missed.
[0119] As described above, according to the examples shown in FIGS. 12 and 13, in the automation of appearance inspection utilizing machine learning, when learning using only images of non-defective products, it is possible to reduce the over-detection of non-defective product parts whose appearance is significantly different from that of typical non-defective products, and reduce the overlooking of defective parts whose appearance is similar to that of non-defective products. As a result, it becomes possible to accurately inspect whether the inspection object is a non-defective product or a defective product.
[0120] 9.GUI In the appearance inspection apparatus 10 of the above-described Example 1 and Example 2, an example of a Graphical User Interface (GUI) for a user such as an inspector to select a first image from defective candidate images when specifying, for example, the number of learning times of non-defective product estimation parameters and over-detection discrimination parameters, and when performing learning of over-detection discrimination parameters, is shown in FIG. 14.
[0121] The pass / fail discrimination results 1202 of learning non-defective product images are displayed on this GUI 1201. As an example, FIG. 14 illustrates the pass / fail discrimination results 1203, 1204, and 1205 of three learning non-defective product images.
[0122] An input section 1206 for specifying parameters used in the learning phase of the appearance inspection apparatus is displayed on this GUI 1201. The input section 1206 is composed of an input section 1207 for specifying the number of learning times N1 of non-defective product estimation parameters, an input section 1208 for specifying the pass / fail discrimination threshold TH, and an input section 1209 for specifying the number of learning times N2 of over-detection discrimination parameters.
[0123] When learning the over-detection discrimination parameters in this GUI 1201, a selection unit 1210 for a user such as an inspector to select a first image from defective candidate images is displayed. The selection unit 1210 is composed of a defective candidate image display unit 1211 that displays defective candidate images, an add button 1218, a return button 1219, and a first image display unit 1220 that displays the first image.
[0124] When a user such as an inspector selects a defective candidate image displayed on the defective candidate image display unit 1211 and presses the add button 1218, the selected image is added to the first image. Also, when a user such as an inspector selects the first image displayed on the first image display unit 1220 and presses the return button 1219, the selected image is excluded from the first image. FIG. 14 illustrates, as an example, defective candidate images 1212 to 1217 and first images 1221 to 1223.
[0125] 10. Summary As described above, in this embodiment, in the automation of appearance inspection using machine learning, a mechanism is provided in which an image determined to be a defective candidate by pass / fail discrimination determines whether it is an over-detection or a non-over-detection, and an image determined to be a non-over-detection is output as a defect. Thereby, it is possible to reduce the over-detection of good product parts whose appearance is significantly different from that of typical good products. Also, a mechanism is provided in which an image determined to be a good product candidate by pass / fail discrimination determines whether it is normal or abnormal, and an image determined to be abnormal is output as a defect. Thereby, it is possible to reduce the overlooking of defective parts whose appearance is similar to that of good products. That is, it becomes possible to accurately inspect whether the inspection object is a good product or a defective product.
[0126] 11. Others Note that the above-described embodiments are those in which the configuration has been described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described. Also, for a part of the configuration of each embodiment, it is possible to add, delete, or replace it with other configurations.
[0127] As an example, in this embodiment, two-dimensional image data is handled as input information. However, the present invention can also be applied when one-dimensional signals such as ultrasonic received waves or three-dimensional volume data acquired by a laser range finder or the like are used as input information.
[0128] In addition, each of the above-described configurations, functions, processing units, processing means, etc. may be realized in hardware by designing a part or all of them, for example, by using an integrated circuit. Further, the present invention can also be realized by a program code of software that realizes the functions of the embodiments. In this case, a storage medium recording the program code is provided to a computer, and a processor included in the computer reads the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code itself and the storage medium storing it constitute the present invention. As a storage medium for supplying such a program code, for example, a flexible disk, a CD-ROM, a DVD-ROM, a hard disk, an SSD (Solid State Drive), an optical disk, a magneto-optical disk, a CD-R, a magnetic tape, a non-volatile memory card, a ROM, etc. are used.
[0129] Also, the program code for realizing the functions described in this embodiment can be implemented in a wide range of programs or script languages such as assembler, C / C++, perl, Shell, PHP, Java (registered trademark), Python, etc.
[0130] Furthermore, all or part of the program code of the software that realizes the functions of each embodiment may be stored in the memory 12 in advance, or, if necessary, may be stored in the memory 12 from a non-temporary storage device of another device connected to the network or from a non-temporary storage medium via a schematic external I / F included in the appearance inspection device 10.
[0131] Furthermore, the program code of the software that realizes the functions of the embodiments may be distributed via a network, stored in a storage means such as a hard disk or memory of a computer or a storage medium such as a CD-RW or CD-R, and the processor provided in the computer may read and execute the program code stored in the storage means or the storage medium.
[0132] In the above-described embodiments, the control lines and information lines indicate those considered necessary for the description, and not necessarily all the control lines and information lines are shown on the product. All the components may be interconnected.
Description of Reference Numerals
[0133] 10…Appearance inspection device 11…Processor 12…Memory 13…Imaging means 14…Input means 15…Display means 20…Image acquisition unit 21…Good product estimation parameter learning unit 22…Overdetection discrimination parameter learning unit 22a…Defect candidate image extraction unit 22b…First image acquisition unit 22c…Second image acquisition unit 23…Acceptability discrimination unit 24…Overdetection discrimination unit 25…Normal discrimination parameter learning unit 30, 1107…Good product estimation parameters 30a, 107…Initial good product estimation parameters 30b, 111…Final good product estimation parameters 31, 109, 1109…Overdetection discrimination parameters 32, 1111…Normal discrimination parameters 105, 1105…Good product images for learning 107…Initial good product estimation parameters 109…Overdetection discrimination parameters 120, 1112…Objects to be inspected 122, 1114…Inspection images 124, 1116…Defect candidates 126, 1120…Defect images 1118…Good product candidates
Claims
1. A computer for discriminating whether an object is a good product or a defective product, wherein the computer has a processor, and the processor performs an image acquisition step of acquiring an inspection image of the object, a pass / fail discrimination step of discriminating whether the inspection image acquired in the image acquisition step is an inspection image of a good product candidate or an inspection image of a defective candidate, an over-detection discrimination step of discriminating whether the inspection image discriminated as a defective candidate in the pass / fail discrimination step is an inspection image of over-detection or a non-over-detection inspection image that is not over-detected, a good product estimation parameter learning step of learning a good product estimation parameter used in the pass / fail discrimination step using a learning good product image acquired in the image acquisition step, an over-detection discrimination parameter learning step of learning an over-detection discrimination parameter used in the over-detection discrimination step using the learning good product image and executes, in the over-detection discrimination parameter learning step, the learning good product image discriminated as a non-over-detection as a result of performing the pass / fail discrimination step using the learning good product image as the inspection image, and the learning good product image discriminated as a defective candidate as a result is discriminated as over-detection, and the over-detection discrimination parameter is learned A computer characterized by the above.
2. In the computer according to Claim 1, the over-detection discrimination parameter learning step includes a defective candidate image extraction step of using, as a defective candidate image, a location where the learning good product image is discriminated as an inspection image of a defective candidate in the pass / fail discrimination step, a first image acquisition step of selecting a first image from the defective candidate image, a second image acquisition step of using, as a second image, an area other than the first image from the learning good product image and is provided with, in the over-detection discrimination parameter learning step, the over-detection discrimination parameter is learned so that the first image is an inspection image of over-detection and the second image is an inspection image of non-over-detection A computer characterized by the above.
3. In the computer according to Claim 1, the over-detection discrimination parameter learning step includes a first image acquisition step of selecting a first image from the learning good product image discriminated as an inspection image of a defective candidate in the pass / fail discrimination step, a second image acquisition step of selecting, as a second image, the inspection image other than the first image from the learning good product image and is provided with In the over-detection discrimination parameter learning step, the over-detection discrimination parameter is learned so as to discriminate that the first image is the inspection image of over-detection and the second image is the inspection image of non-over-detection. A computer characterized by the above.
4. In the computer according to claim 1, the over-detection discrimination parameter learning step includes: a first image acquisition step of using, as the first image, a location where it is determined in the pass / fail discrimination step that the learning good product image is the inspection image of a defective candidate; and a second image acquisition step of using, as the second image, a location where it is determined in the pass / fail discrimination step that the learning good product image is the inspection image of a good product candidate, and in the over-detection discrimination parameter learning step, the over-detection discrimination parameter is learned so as to discriminate that the first image is the inspection image of over-detection and the second image is the inspection image of non-over-detection. A computer characterized by the above.
5. In the computer according to claim 1, in the good product estimation parameter learning step, using, among the inspection images determined to be good product candidates in the pass / fail discrimination step, the inspection images determined to be over-detected in the over-detection discrimination step, and among the inspection images determined to be defective candidates in the pass / fail discrimination step, the inspection images determined to be non-over-detected in the over-detection discrimination step, the good product estimation parameter is additionally learned. A computer characterized by the above.
6. In the computer according to claim 1, in the good product estimation parameter learning step, based on the learning good product image, the good product estimation parameter is learned so as to estimate this learning good product image, and in the pass / fail discrimination step, using the good product estimation parameter, a pseudo good product image is estimated from the inspection image, and by calculating a difference image between the inspection image and the pseudo good product image, it is discriminated whether the inspection image is the inspection image of a good product candidate or the inspection image of a defective candidate. A computer characterized by the above.
7. In the computer according to claim 6, in the over-detection discrimination parameter learning step, the over-detection discrimination parameter is learned using the difference image obtained in the pass / fail discrimination step and the learning good product image. A computer characterized by the above.
8. In the computer according to claim 1, A normal discrimination step of discriminating whether the inspection image is a normal inspection image or an abnormal inspection image that is not normal based on the inspection image determined to be an inspection image of a good product candidate in the pass / fail discrimination step among the inspection images; A normal discrimination parameter learning step of learning a normal discrimination parameter used in the normal discrimination step using the learning good product image; comprising; In the normal discrimination parameter learning step, the learning good product image is used as the inspection image in the pass / fail discrimination step, and the normal discrimination parameter is learned so as to discriminate the inspection image of the good product candidate as the normal inspection image and the inspection image of the bad product candidate as the abnormal inspection image. A computer characterized by the above.
9. An appearance inspection method executed by a computer for discriminating whether an object is a good product or a bad product, an image acquisition step of acquiring an inspection image of the object; a pass / fail discrimination step of discriminating whether the inspection image acquired in the image acquisition step is an inspection image of a good product candidate or an inspection image of a bad product candidate; an over-detection discrimination step of discriminating whether the inspection image determined to be a bad product candidate in the pass / fail discrimination step is an over-detected inspection image or a non-over-detected inspection image that is not over-detected; a good product estimation parameter learning step of learning a good product estimation parameter used in the pass / fail discrimination step using the learning good product image acquired in the image acquisition step; an over-detection discrimination parameter learning step of learning an over-detection discrimination parameter used in the over-detection discrimination step using the learning good product image; comprising; In the over-detection discrimination parameter learning step, the learning good product image is used as the inspection image to perform the pass / fail discrimination step, and the learning good product image determined to be a good product candidate as a result is discriminated as non-over-detected, and the learning good product image determined to be a bad product candidate as a result is discriminated as over-detected, so as to learn the over-detection discrimination parameter. An appearance inspection method characterized by the above.
10. In the appearance inspection method according to Claim 9, the over-detection discrimination parameter learning step includes a bad product candidate image cutting step of using, as a bad product candidate image, a location where the learning good product image is determined to be an inspection image of a bad product candidate in the pass / fail discrimination step; a first image acquisition step of selecting a first image from the bad product candidate image; a second image acquisition step of using, as a second image, an area other than the first image from the learning good product image. comprising; In the over-detection discrimination parameter learning step, the over-detection discrimination parameter is learned so as to discriminate that the first image is the inspection image of over-detection and the second image is the inspection image of non-over-detection. An appearance inspection method characterized by the above.
11. In the appearance inspection method according to Claim 9, the over-detection discrimination parameter learning step includes a first image acquisition step of selecting a first image from the learning good product images determined to be inspection images of defective candidates in the pass / fail discrimination step, and a second image acquisition step of selecting, as a second image, the inspection images other than the first image among the learning good product images and in the over-detection discrimination parameter learning step, the over-detection discrimination parameter is learned so as to discriminate that the first image is the inspection image of over-detection and the second image is the inspection image of non-over-detection. An appearance inspection method characterized by the above.
12. In the appearance inspection method according to Claim 9, the over-detection discrimination parameter learning step includes a first image acquisition step of using, as a first image, the location where the learning good product image is determined to be an inspection image of defective candidates in the pass / fail discrimination step, and a second image acquisition step of using, as a second image, the location where the learning good product image is determined to be an inspection image of good product candidates in the pass / fail discrimination step and in the over-detection discrimination parameter learning step, the over-detection discrimination parameter is learned so as to discriminate that the first image is the inspection image of over-detection and the second image is the inspection image of non-over-detection. An appearance inspection method characterized by the above.
13. In the appearance inspection method according to Claim 9, in the good product estimation parameter learning step, using the inspection images determined to be over-detected in the over-detection discrimination step among the inspection images determined to be good product candidates in the pass / fail discrimination step and the inspection images determined to be non-over-detected in the over-detection discrimination step among the inspection images determined to be defective candidates in the pass / fail discrimination step, the good product estimation parameter is additionally learned. An appearance inspection method characterized by the above.
14. In the appearance inspection method according to Claim 9, in the good product estimation parameter learning step, based on the learning good product image, the good product estimation parameter is learned so as to estimate this learning good product image. In the pass / fail determination step, a pseudo-good product image is estimated from the inspection image using the good product estimation parameter, and a difference image between the inspection image and the pseudo-good product image is calculated, thereby determining whether the inspection image is the inspection image of a good product candidate or the inspection image of a defective product candidate. An appearance inspection method characterized by the above.
15. A computer program for causing a computer to execute the appearance inspection method according to Claims 9 to 14.
Citation Information
Patent Citations
Learning device, learning method, and recording medium
CN112862062A
Inspection method, inspection device, inspection program and recording medium
JP2018036241A
Information processing apparatus, information processing method, and program
JP2018120300A
Device and method for image inspection
JP2019087181A
Generation device and computer program and generation method
JP2020160616A