Appearance inspection apparatus
The appearance inspection device corrects the judgment threshold using normal product abnormality degrees to prevent normal products from being misclassified as defective, enhancing accuracy in visual inspection.
Patent Information
- Application Number
- JP2024129986
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2026-02-19
AI Technical Summary
Existing visual inspection devices erroneously judge normal products as defective products.
An appearance inspection device that derives the degree of abnormality in an inspection image and sets a judgment threshold based on the abnormality degree of normal products to correct the standard threshold, using a learning model to generate a reproduced image and calculate the difference with the inspection image.
Prevents normal products from being erroneously determined as defective by adjusting the judgment threshold based on normal product abnormality degrees, reducing false positives.
Smart Images

Figure 2026027796000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a visual inspection apparatus. [Background technology]
[0002] Patent Document 1 discloses a technology that enables a visual inspection device that captures an object to be inspected and compares the acquired image with a group of images that are deemed to be good products to determine whether a defective product has been mistakenly determined to be good. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2013-142558 Summary of the Invention [Problem to be solved by the invention]
[0004] However, there is room for improvement in the prior art in that it erroneously judges normal products to be abnormal products. An object of one aspect of the present disclosure is to provide a visual inspection device that is able to suppress erroneous determination of normal products as defective products. [Means for solving the problem]
[0005] In order to solve the above problem, an appearance inspection device according to one embodiment of the present disclosure is an appearance inspection device that inspects the appearance of an inspection object based on an inspection image, which is an image of the inspection object, and is equipped with an abnormality degree derivation unit that derives the degree of abnormality of the inspection object indicated by the inspection image, and a judgment unit that judges that the appearance of the inspection object corresponding to the abnormality degree is included if the abnormality degree derived by the abnormality degree derivation unit is equal to or greater than a judgment threshold, and is characterized in that the judgment threshold is a value obtained by correcting a standard threshold based on the abnormality degree of an abnormal product among the inspection objects that should be judged to have an abnormality in its appearance, based on the abnormality degree of a normal product among the inspection objects that should be judged to have no abnormality in its appearance. [Effects of the Invention]
[0006] According to one aspect of the present disclosure, it is possible to prevent a normal product from being erroneously determined to be a defective product. [Brief explanation of the drawings]
[0007] [Figure 1] 1 is a diagram illustrating a configuration of a visual inspection apparatus according to an embodiment of the present disclosure. [Figure 2] 1 is a diagram used to explain appearance inspection by an appearance inspection device according to an embodiment of the present disclosure. [Figure 3] FIG. 10 is a diagram used to explain a determination threshold value. [Figure 4] FIG. 10 is a diagram used to explain correction of a determination threshold value. DETAILED DESCRIPTION OF THE INVENTION
[0008] FIG. 1 is a diagram showing the configuration of a visual inspection apparatus according to an embodiment of the present disclosure. 1 is, for example, a computer, and includes a control unit 10, a storage unit 11, and an input / output interface 12. The appearance inspection device 1 is an inspection device that inspects the appearance of an inspection object 5 based on an inspection image that is an image of the inspection object 5. The inspection image is, for example, an image of the inspection object 5 captured using an imaging unit 3.
[0009] The inspection object 5 is, for example, a flat part. The imaging unit 3 is composed of, for example, a sensor (camera). The imaging unit 3 is arranged so that the inspection object 5 is included in its imaging range. The lighting 4 is, for example, a ring-shaped lighting unit, and is arranged so as to illuminate at least the imaging range of the imaging unit 3 when imaging the inspection object 5.
[0010] In inspecting the appearance of the inspection object 5 (hereinafter referred to as appearance inspection), if there is an abnormality such as a dent, scratch, dent, or oil adhesion on the side of the inspection object 5, the inspection object is judged to be a defective product. If there is no abnormality in the inspection object 5, the inspection object 5 is judged to be a normal product.
[0011] The control unit 10 is, for example, a CPU (Central Processing Unit), and reads out a program from the storage unit 11 and executes it. The storage unit 11 is, for example, a hard disk drive (HDD) or a solid state drive (SSD). The storage unit 11 stores programs executed by the control unit 10 and trained learning models. The storage unit 11 also includes a random access memory (RAM) that the control unit 10 uses as a workspace. The input / output interface 12 includes, for example, a USB (Universal Serial Bus) terminal, a LAN (Local Area Network) terminal, etc. The control unit 10 transmits and receives information to and from, for example, the imaging unit 3 and an external server via the input / output interface 12.
[0012] 2 is a diagram used to explain appearance inspection by an appearance inspection apparatus according to an embodiment of the present disclosure. A control unit 10 of the appearance inspection apparatus 1 executes a program stored in a memory unit 11 to function as an inspection image acquisition unit 100, a reproduction image acquisition unit 101, an abnormality degree derivation unit 102, a judgment unit 103, and a threshold setting unit 104.
[0013] The inspection image acquisition unit 100 acquires an inspection image of the inspection object 5. For example, the inspection image acquisition unit 100 acquires the inspection image from the imaging unit 3 via the input / output interface 12. The inspection image acquisition unit 100 inputs the acquired inspection image to the reproduction image acquisition unit 101 and the abnormality degree derivation unit 102.
[0014] The reproduction image acquisition unit 101 performs image processing to enhance edges on the inspection image to generate an edge-enhanced image, and inputs an input image including at least the edge-enhanced image to the learning model M stored in the storage unit 11. In addition to the edge-enhanced image of the inspection object 5, the input image may further include an inspection image of the inspection object 5.
[0015] The learning model M is a model that has previously learned the relationship between an inspection image of a normal inspection object 5 and an input image of the inspection object 5. The learning model M includes a generator constructed using, for example, a generative adversarial network technique. When an input image of the inspection object 5 is input to the generator of the learning model M, a reproduced image of the inspection object 5 is generated using pix2pix, a type of image generation algorithm. The reproduced image is an inspection image generated from the input image of the inspection object 5, assuming that the inspection object 5 is a normal product. If the inspection object 5 is a normal product, the reproduced image of the inspection object 5 closely reproduces the inspection image of the inspection object 5. If the inspection object 5 is an abnormal product, the reproduced image of the inspection object 5 does not include abnormalities such as dents, scratches, dents, or oil adhesions that are included in the inspection image. The reproduced image acquisition unit 101 inputs the reproduced image output from the learning model M to the anomaly degree derivation unit 102.
[0016] The abnormality degree derivation unit 102 derives the degree of abnormality d of the inspection object 5 indicated by the inspection image, based on the inspection image input from the inspection image acquisition unit 100 and the reproduction image input from the reproduction image acquisition unit 101. The abnormality degree derivation unit 102 generates, for example, a difference image between the inspection image input from the inspection image acquisition unit 100 and the reproduction image input from the reproduction image acquisition unit 101. The difference image is generated, for example, by calculating the difference between the pixel values of the inspection image and the pixel values of the reproduction image for each pixel position. The abnormality degree derivation unit 102 derives the degree of abnormality d of the inspection object 5 based on the value obtained by dividing the sum of squares of the pixel values of the difference image by the number of pixels in the difference image.
[0017] If the degree of abnormality d of the inspection object 5 derived by the degree of abnormality derivation unit 102 is equal to or greater than the determination threshold Dth, the determination unit 103 determines that the appearance of the inspection object 5 corresponding to the degree of abnormality d includes an abnormality (the inspection object 5 is a defective product). The determination threshold Dth is set by the threshold setting unit 104 using a method described later.
[0018] FIG. 3 is a diagram used to explain the judgment threshold. In FIG. 3, an example of a distribution curve of the degree of abnormality d derived for the inspection image of an abnormal sample is shown by a dashed line, and an example of a distribution curve of the degree of abnormality d derived for the inspection image of a normal sample is shown by a solid line. An abnormal sample is an example of an inspection object that should be determined to include an abnormality in its appearance. A normal sample is an example of an inspection object that should be determined to include no abnormality in its appearance. The degree of abnormality d for the inspection image of an abnormal sample has a minimum value of d1min and a maximum value of d1max. The degree of abnormality d for the inspection image of a normal sample has a minimum value of d2min and a maximum value of d2max. In the example shown in FIG. 3, d2max is greater than d1min.
[0019] If the determination threshold Dth is set to d1min, the determination unit 103 may erroneously determine some normal samples as abnormal, but will not erroneously determine abnormal samples as normal. The value of the determination threshold Dth at which abnormal samples are not erroneously determined as normal is called the reference threshold. In the example of FIG. 3, the reference threshold is d1min. The threshold setting unit 104 corrects the reference threshold d1min by Δd based on the abnormality degree d of the normal samples to set the determination threshold Dth, thereby reducing the possibility of erroneously determining normal samples as abnormal.
[0020] Fig. 4 is a diagram used to explain the correction of the judgment threshold, which schematically shows an inspection image 200 of an abnormal sample whose abnormality level d was the minimum value d1min and an inspection image 300 of a normal sample whose abnormality level d was the minimum value d2min. Assume that inspection image 200 of a defective product sample contains an abnormality in pixel region 201. Of the abnormality degree d (= d1min) of inspection image 200, the partial abnormality degree of pixel region 201 containing the abnormality is defined as D1. The partial abnormality degree of pixel region 201 is, for example, a value obtained by dividing the sum of squares of pixel values of pixel region 201 in the differential image of inspection image 200 by the number of pixels in inspection image 200. The partial abnormality degree D1 of pixel region 201 plus the partial abnormality degrees of pixel regions of inspection image 200 other than pixel region 201 gives the abnormality degree d (= d1min) of inspection image 200.
[0021] As shown in FIG. 4, inspection image 300 of the normal sample is composed of pixel region 301 and pixel region 302. Pixel region 301 is composed of pixels in the same pixel position as pixel region 201 in inspection image 300 of the normal sample. Pixel region 302 is inspection image 300 of the normal sample minus pixel region 301. Of the abnormality degree d (= d2min) of inspection image 300, the partial abnormality degree of pixel region 302 is defined as D2. The partial abnormality degree of pixel region 302 is, for example, the sum of squares of the pixel values of pixel region 302 in the difference image of inspection image 300 divided by the number of pixels in inspection image 300. The partial abnormality degree D2 of pixel region 302 plus the partial abnormality degree of pixel region 301 equals the abnormality degree d (= d2min) of inspection image 300.
[0022] The threshold setting unit 104 sets the determination threshold Dth to D1+D2. That is, the threshold setting unit 104 sets the determination threshold Dth to a value obtained by correcting the reference threshold d1min by Δd=d1min−(D1+D2).
[0023] When attempting to appropriately set the judgment threshold Dth using machine learning, it is necessary to prepare a large number of inspection images of abnormal products for additional learning. However, because normal production processes are designed to reduce the rate of abnormality occurrence, it can take an enormous amount of time to collect a sufficient number of abnormal products. When setting the judgment threshold Dth as in the threshold setting unit 104, it is sufficient for the user of the visual inspection device 1 to prepare at least one abnormal product that they consider to be a limit sample of an abnormal product, so the judgment threshold Dth can be quickly set to an appropriate value.
[0024] [Modification] In the above embodiment, the threshold setting unit 104 sets the reference threshold d1min to a value obtained by correcting the reference threshold d1min by d1min-(D1+D2). However, the correction value Δd used by the threshold setting unit 104 to correct the reference threshold d1min is not limited to d1min-(D1+D2). For example, the threshold setting unit 104 may further correct the reference threshold d1min based on the partial abnormality degree d2min-D2 of the pixel region 301. For example, several percent of the partial abnormality degree d2min-D2 of the pixel region 301 may be further subtracted from the reference threshold d1min, or several percent of the partial abnormality degree d2min-D2 of the pixel region 301 may be further added to the reference threshold d1min.
[0025] In the above embodiment, the visual inspection device 1 performs a visual inspection of the inspection object 5, but the scope of application of the present disclosure is not limited to visual inspection. The present disclosure can also be applied to inspections other than visual inspections as long as they use images of the inspection object 5, such as non-destructive inspections that inspect items such as defects and deterioration in the internal structure of the inspection object 5. Possible examples of non-destructive inspections include inspections that use X-ray images or thermography images.
[0026] [Software implementation example] The functions of the visual inspection device 1 (hereinafter referred to as the "device") can be realized by a program that causes a computer to function as the device, and a program that causes a computer to function as each control block of the device (particularly each part included in the control unit 10). In this case, the device includes a computer having at least one control device (e.g., a processor) and at least one storage device (e.g., a memory) as hardware for executing the program. The control device and storage device execute the program, thereby realizing the functions described in each of the above embodiments. The program may be non-transitory and may be recorded on one or more computer-readable recording media. The recording media may or may not be included in the device. In the latter case, the program may be supplied to the device via any wired or wireless transmission medium. In addition, some or all of the functions of each of the control blocks can be realized by logic circuits. For example, integrated circuits in which logic circuits that function as each of the control blocks are formed are also included in the scope of the present disclosure. In addition, the functions of each of the control blocks can also be realized by, for example, a quantum computer.
[0027] 〔summary〕 An appearance inspection device according to one aspect of the present disclosure is an appearance inspection device that inspects the appearance of an inspection object based on an inspection image, which is an image of the inspection object, and is equipped with an abnormality degree derivation unit that derives the degree of abnormality of the inspection object indicated by the inspection image, and a judgment unit that judges that the appearance of the inspection object corresponding to the abnormality degree is included if the abnormality degree derived by the abnormality degree derivation unit is equal to or greater than a judgment threshold, wherein the judgment threshold is a value obtained by correcting a standard threshold based on the abnormality degree of an abnormal product among the inspection objects that should be judged to have an abnormality in its appearance, based on the abnormality degree of a normal product among the inspection objects that should be judged to have no abnormality in its appearance. In an appearance inspection device that derives the degree of abnormality of an inspection object shown in an inspection image and determines that the appearance of the inspection object contains an abnormality if the degree of abnormality is equal to or greater than a threshold, the degree of abnormality is also derived for inspection images of normal products, which can lead to erroneous determinations in which normal products are determined to be abnormal, depending on the threshold. In this regard, according to one aspect of the present disclosure, the reference threshold based on the degree of abnormality of abnormal products is corrected based on the degree of abnormality of normal products, thereby preventing the occurrence of such erroneous determinations due to the degree of abnormality of normal products.
[0028] In the appearance inspection device according to one aspect of the present disclosure, the device includes a threshold setting unit that sets the judgment threshold based on the degree of abnormality of the normal product and the degree of abnormality of the defective product. The degree of abnormality of a normal product may vary depending on the test object. In this regard, according to one aspect of the present disclosure, a determination threshold is set based on the degree of abnormality of a normal product and the degree of abnormality of a defective product, so that the occurrence of the above-mentioned erroneous determination can be suppressed regardless of the test object.
[0029] [Additional Notes] The present disclosure is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. Embodiments obtained by appropriately combining the technical means disclosed in different embodiments are also included in the technical scope of the present disclosure. [Explanation of symbols]
[0030] 1. Visual inspection equipment 5. Inspection subjects 10 Control Unit 11 Storage section 102 Abnormality degree derivation part 103 Judgment section 104 Threshold setting unit 200, 300 inspection images d Abnormality d1min reference threshold Dth judgment threshold
Claims
1. 1. A visual inspection apparatus for inspecting the visual appearance of an object to be inspected based on an inspection image that is an image of the object to be inspected, an abnormality degree deriving unit that derives an abnormality degree of the inspection object indicated by the inspection image; a determination unit that, when the degree of abnormality derived by the abnormality degree derivation unit is equal to or greater than a determination threshold, determines that an abnormality is included in the appearance of the inspection object corresponding to the degree of abnormality, An appearance inspection device characterized in that the judgment threshold is a value obtained by correcting a standard threshold based on the degree of abnormality of an abnormal product among the inspection objects that should be determined to have an abnormality in its appearance, based on the degree of abnormality of a normal product among the inspection objects that should be determined to have no abnormality in its appearance.
2. 2. The visual inspection device according to claim 1, further comprising a threshold setting unit that sets the determination threshold based on the degree of abnormality of the normal product and the degree of abnormality of the defective product.
Citation Information
Patent Citations
Visual inspection device, visual inspection method and computer program
JP2013142558A