Determining device, learning device, determining method, learning method, determining program, and learning program
By generating and using multiple mask images to reconstruct composite images, the inspection system effectively reduces misjudgments in identifying defects in printed circuit boards, accurately distinguishing between defective and non-defective products.
Patent Information
- Application Number
- PCT/JP2024/012794
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-29
- Filing Date
- 2024-03-28
- Publication Date
- 2024-10-03
AI Technical Summary
Existing inspection systems using image generation AI to detect defects in printed circuit boards can incorrectly identify non-defective products as defective due to manufacturing variations, leading to misjudgments.
The system generates multiple mask images by arranging smaller mask pieces at predetermined intervals and reconstructs images using these masks to create a composite image, reducing errors by accounting for shape changes within non-defective products.
This approach reduces misjudgments by accurately distinguishing between defective and non-defective images, ensuring that non-defective products are not incorrectly identified as defective.
Smart Images

Figure JP2024012794_03102024_PF_FP_ABST
Abstract
Description
Determination device, learning device, determination method, learning method, determination program, and learning program
[0001] The present invention relates to a determination device, a learning device, a determination method, a learning method, a determination program, and a learning program.
[0002] There is a known inspection system in which an inspector visually inspects an image of an object to be inspected, such as a printed circuit board, that is determined to contain a defect, to determine whether the object is good or defective.
[0003] In this inspection system, for example, image generation AI (artificial intelligence) that has been trained to reconstruct normal images is applied to determine whether or not the inspection image contains defects.
[0004] This image generation AI reconstructs a masked inspection image by superimposing a mask on the inspection image, and compares it with the inspection image to determine whether the inspection image is normal. Therefore, this image generation AI can make an appropriate determination even when a new type of defect occurs.
[0005] Japanese Patent Application Laid-Open No. 2022-114331
[0006] On the other hand, in the case of the above-mentioned inspection object, there are cases where manufacturing variations occur within the range of non-defective products. In such cases, the difference between the inspection image and the reconstructed image becomes large, and the image generation AI may erroneously determine that the inspection image contains a defect even though it is a normal image.
[0007] One aspect of the present invention aims to reduce false positives in an inspection system.
[0008] According to one aspect, the determination device includes an image reconstruction unit that outputs a first reconstructed image when a first mask image generated by superimposing a mask on an inspection area of a first image, which is an image of an object to be inspected and is determined not to contain a defect, is input, the image reconstruction unit having learned to make the first reconstructed image approach the first image; a synthesis unit that synthesizes the second reconstructed images to generate a second synthesized image when a plurality of second mask images generated by sequentially superimposing a plurality of masks on the inspection area of a second image, which is an image of the object to be inspected, are input to the trained image reconstruction unit to reconstruct the second reconstructed images; and a determination unit that compares the second synthesized image with the second image and determines whether the second image contains a defect.
[0009] It is possible to reduce false positives in the inspection system.
[0010] FIG. 1A is a diagram for explaining an example of a comparative example learning processing method for an image generation AI. FIG. 1B is a diagram for explaining an example of a comparative example judgment processing method when determining whether or not a defect is included using a trained image generation AI. FIG. 2 is a diagram showing an example of an erroneous judgment. FIG. 3A is a diagram showing an example of a learning processing method for an image generation AI in an inspection system according to the first embodiment. FIG. 3B is a diagram showing an example of a judgment processing method when determining whether or not a defect is included using a trained image generation AI in an inspection system according to the first embodiment. FIG. 4 is a diagram showing an example of a system configuration of an inspection system in a learning phase according to the first embodiment. FIG. 5 is a diagram showing an example of a hardware configuration of a learning device. FIG. 6 is a diagram showing a specific example of processing by a learning dataset generation unit of the learning device. FIG. 7 is a diagram showing a specific example of processing by a learning unit of the learning device. FIG. 8 is a diagram showing an example of a system configuration of an inspection system in an inspection phase according to the first embodiment. FIG. 9 is a diagram showing an example of a hardware configuration of a judgment device. FIG. 10 is a diagram showing a specific example of processing by an inference unit of the judgment device. FIG. 11 is a flowchart showing the flow of learning processing by the learning device of the inspection system according to the first embodiment. Fig. 12 is a flowchart showing the flow of a determination process by the determination device of the inspection system according to the first embodiment. Fig. 13 is a diagram for explaining an overview of the verification process. Fig. 14 is a diagram showing an example of a verification result. Fig. 15 is a diagram showing another example of a first mask and a plurality of second masks.
[0011] Hereinafter, each embodiment will be described with reference to the accompanying drawings. In this specification and drawings, components having substantially the same functional configurations are designated by the same reference numerals, and redundant description will be omitted.
[0012] [First embodiment] <Explanation of comparative learning processing method and judgment processing method for image generation AI> As will be described later, in the inspection system according to the first embodiment, in order to reduce erroneous judgments, a learning processing method and judgment processing method different from general learning processing methods and judgment processing methods are applied to the image generation AI.
[0013] Therefore, in the following, we will first explain a general learning processing method and judgment processing method for image generation AI (referred to as the learning processing method and judgment processing method of the comparative example). Next, we will list cases in which erroneous judgments occur in the learning processing method and judgment processing method of the comparative example, and then explain the learning processing method and judgment processing method for image generation AI in the inspection system according to the first embodiment, which can reduce such erroneous judgments.
[0014] FIG. 1A is a diagram for explaining an example of a comparative example learning processing method for an image generation AI. As shown in FIG. 1A, in the comparative example learning processing method, the image generation AI 110 undergoes learning processing in the following procedure. Among the inspection images captured by the inspection system, an inspection image (referred to as a normal image) when the inspection object is determined to be a non-defective product is acquired, and a mask-attached normal image is generated by superimposing a mask on the inspection area. The generated mask-attached normal image is input to the image generation AI 110, and the reconstructed image output from the image generation AI 110 is compared with the normal image to calculate an error. The model parameters of the image generation AI 110 are updated so as to reduce the calculated error. This processing is performed on multiple normal images to perform learning processing on the image generation AI 110, generating a trained image generation AI.
[0015] Next, we will explain a comparative example of a judgment processing method in which the generated trained image generation AI is used to determine whether or not an inspection image contains a defect.
[0016] FIG. 1B is a diagram illustrating an example of a comparative example determination processing method when a trained image generation AI is used to determine whether or not a defect is present. As shown in the upper part of FIG. 1B , in the comparative example, the trained image generation AI 120 performs the determination processing using the following procedure to determine whether or not a defect is present. An inspection image captured by an inspection system is acquired, and a masked inspection image is generated by superimposing a mask on the inspection area. The generated masked inspection image is input to the trained image generation AI 120, which then outputs a reconstructed image. The error between the reconstructed image output by the trained image generation AI 120 and the inspection image is calculated, and a result is obtained that the error is small. Note that the trained image generation AI 120 is trained to reconstruct a normal image from the input masked inspection image, so the reconstructed image output by the trained image generation AI 120 is close to the normal image. Therefore, a small calculated error can be said to indicate that the inspection image is close to the normal image. As a result, it can be determined that the inspection image does not contain a defect.
[0017] On the other hand, as shown in the lower part of Figure 1B, in the comparative example, a judgment process is performed using the trained image generation AI 120 using the following procedure to determine whether a defect is present. An inspection image captured by the inspection system is acquired, and a masked inspection image is generated by superimposing a mask on the inspection area. The generated masked inspection image is input to the trained image generation AI 120, which outputs a reconstructed image. The error between the reconstructed image output by the trained image generation AI 120 and the inspection image is calculated, and a result is obtained that the error is large. Note that, as described above, the trained image generation AI 120 is trained to reconstruct a normal image from the input masked inspection image, so the reconstructed image output by the trained image generation AI 120 is close to the normal image. Therefore, a large calculated error can be said to mean that the inspection image is far from the normal image. As a result, it can be determined that the inspection image contains a defect.
[0018] 1B, for the sake of simplicity, it is assumed that the determination of whether or not the inspection image contains a defect is made based on the magnitude of the calculated error. However, the determination of whether or not the inspection image contains a defect is not limited to this, and may be made, for example, by performing image processing using the inspection image and a reconstructed image, and making the determination based on the results of the image processing. However, in this embodiment, for the sake of simplicity, a case will be described in which the determination of whether or not the inspection image contains a defect is made based on the magnitude of the calculated error.
[0019] <Explanation of Misjudgment> Next, a case will be described in which the trained image generation AI 120 erroneously judges that an inspection image that should be judged not to contain a defect contains a defect. Figure 2 is a diagram showing an example of a misjudgment.
[0020] In Figure 2, inspection image 210 is an inspection image that does not contain a defect and is an example of an inspection image that has been erroneously determined to contain a defect by the trained image generation AI 120. The inspection object corresponding to inspection image 210 has the following characteristics: - The shape of a portion of the inspection object has changed in the inspection area (see reference numeral 211). - The change in the shape of a portion of the inspection object is due to manufacturing variation and is within the range of a non-defective product.
[0021] In the case of inspection image 210, when a mask is superimposed on the image and input to trained image generation AI 120, trained image generation AI 120 outputs, for example, reconstructed image 220 shown in Figure 2. As shown in Figure 2, reconstructed image 220 output by trained image generation AI 120 is a typical normal image, and partial changes in the shape of the object to be inspected cannot be reconstructed (see reference numeral 221).
[0022] Therefore, when the reconstructed image 220 is compared with the inspection image 210, the difference between the two becomes large, and it is erroneously determined that the inspection image 210 contains a defect.
[0023] In order to reduce erroneous judgments in such cases, the inspection system according to the first embodiment is configured as follows: A first mask is generated in which multiple mask pieces, each smaller than the mask to be superimposed on the inspection area, are regularly arranged at predetermined intervals (an integer multiple of the size of the mask pieces) in the vertical, horizontal, and diagonal directions. A plurality of second masks are generated in which multiple mask pieces are regularly arranged at positions that fill the predetermined vertical intervals, horizontal intervals, and diagonal intervals of the first mask. A number of second masks are generated according to the size of the intervals. A plurality of reconstructed images are reconstructed by inputting an image (masked inspection image) in which the first mask and multiple second masks are sequentially superimposed into a trained image generation AI. A composite image is generated by combining the multiple reconstructed images.
[0024] By adopting the above configuration, the inspection system according to the first embodiment is able to reconstruct changes in the shape of a portion of the object being inspected that occur due to manufacturing variations within the range of non-defective products, thereby reducing erroneous judgments.
[0025] <Learning Processing Method for Image Generation AI in Inspection System According to First Embodiment> A learning processing method for the image generation AI in the inspection system according to the first embodiment will be described. Fig. 3A is a diagram showing an example of the learning processing method for the image generation AI in the inspection system according to the first embodiment.
[0026] The difference from the learning processing method of the comparative example shown in Figure 1A is that in the case of Figure 3A, the mask used when generating a masked normal image to be input to the image generation AI 310 includes: - A first mask in which multiple mask pieces smaller in size than the mask superimposed on the inspection area are regularly arranged vertically, horizontally, and diagonally at predetermined intervals (intervals that are integer multiples of the size of the mask pieces).
[0027] Using this learning processing method, the inspection system according to the first embodiment can generate a trained image generation AI that can reconstruct changes in the shape of a portion of an inspection object caused by manufacturing variations within the range of good products.
[0028] Next, we will explain the determination processing method used in the inspection system according to the first embodiment to determine whether or not a defect is present using a trained image generation AI.
[0029] 3B is a diagram showing an example of a determination processing method when determining whether or not a defect is present using a trained image generation AI in the inspection system according to the first embodiment. The difference from FIG. 1B is that the method in FIG. 3B includes: a first mask in which a plurality of mask pieces smaller than the mask superimposed on the inspection area are regularly arranged at predetermined intervals (intervals that are an integer multiple of the size of the mask pieces) in the vertical, horizontal, and diagonal directions; and three types of second masks in which a plurality of mask pieces are regularly arranged at positions that fill the predetermined vertical intervals, predetermined horizontal intervals, and predetermined diagonal intervals of the first mask.
[0030] Furthermore, the difference from the judgment processing method of the comparative example shown in Figure 1B is that in the case of Figure 3B, four masked inspection images, in which a first mask and three types of second masks are sequentially superimposed, are input into the trained image generation AI 320 to reconstruct four reconstructed images, and a composite image is generated by combining the four reconstructed images.
[0031] With this determination processing method, the inspection system according to the first embodiment can reconstruct changes in the shape of a portion of the object being inspected that occur due to manufacturing variations within the range of non-defective products, thereby reducing the error between the inspection image and the composite image. As a result, it is determined that the inspection image does not contain a defect (it is no longer erroneously determined that the inspection image contains a defect), thereby reducing erroneous determinations.
[0032] <System Configuration of Inspection System (Learning Phase)> Next, a system configuration of an inspection system in a learning phase according to the first embodiment to which the image generation AI is applied will be described. Fig. 4 is a diagram showing an example of the system configuration of the inspection system in the learning phase according to the first embodiment.
[0033] As shown in FIG. 4, an inspection system 400 in the learning phase includes an automated optical inspection (AOI) device 410 and a learning device 440 .
[0034] The AOI device 410 performs an automatic visual inspection of the printed circuit board 430. The AOI device 410 scans the printed circuit board 430 with a camera and detects defect candidates by inspecting various inspection items. The inspection items inspected by the AOI device 410 include, for example, circuit width, circuit spacing, missing pads / no pads, circuit shorts, etc.
[0035] The inspection image 420 of each area containing the defect candidate detected by the AOI device 410 is transmitted to the learning device 440 and also to the inspection line. On the inspection line, an inspector 421 or the like visually inspects the inspection image 420 of each area containing the defect candidate. Note that the AOI device 410 is set to excessively detect the inspection image of each area containing the defect candidate so as not to classify a defective product as a non-defective product.
[0036] An inspector 421 or the like visually inspects the inspection image 420 of each region to determine whether or not a defect is present, and ultimately determines whether the printed circuit board 430 is a good product or a defective product. Specifically, if none of the inspection images 420 of each region containing defect candidates contain a defect, the printed circuit board 430 is determined to be a good product. On the other hand, if any of the inspection images 420 of each region containing defect candidates contains a defect, the printed circuit board 430 is determined to be a defective product.
[0037] The inspector 421 or the like notifies the learning device 440 of the results of the visual inspection (the result of determining whether or not the inspection image 420 of each region contains a defect). In the example of Fig. 1, "visual inspection result: OK" indicates that it has been determined that the image of the region containing the defect candidate does not contain a defect, and "visual inspection result: NG" indicates that it has been determined that the image of the region containing the defect candidate contains a defect.
[0038] A learning program is installed in the learning device 440, and the learning device 440 functions as a learning dataset generation unit 441 and a learning unit 442 by executing the program.
[0039] The training dataset generation unit 441 extracts inspection images (normal images) that are determined to contain no defects as a result of visual inspection by an inspector 421 or the like from the inspection images 420 of each region containing defect candidates transmitted from the AOI device 410, and generates a training dataset. In addition, the training dataset generation unit 441 stores the generated training dataset in the training dataset storage unit 443.
[0040] The learning unit 442 reads out an inspection image (normal image) of each region included in the training dataset stored in the training dataset storage unit 443. The learning unit 442 also superimposes a first mask on the inspection region of the extracted inspection image (normal image) of each region to generate a masked normal image. When the generated masked normal image is input, the learning unit 442 performs a learning process on a model that outputs a reconstructed image so that the reconstructed image approaches the normal image.
[0041] Note that an image generation AI is used as the model for which learning processing is performed by the learning unit 442. Hereinafter, this model will be referred to as an "image reconstruction unit."
[0042] <Hardware Configuration of Learning Device> Next, the hardware configuration of the learning device 440 will be described. Fig. 5 is a diagram showing an example of the hardware configuration of the learning device. As shown in Fig. 5, the learning device 440 has a processor 501, a memory 502, an auxiliary storage device 503, an I / F (Interface) device 504, a communication device 505, and a drive device 506. Note that each piece of hardware in the learning device 440 is connected to each other via a bus 507.
[0043] The processor 501 has various computing devices such as a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), etc. The processor 501 reads various programs (for example, a learning program) into the memory 502 and executes them.
[0044] The memory 502 has a main storage device such as a read-only memory (ROM) or a random access memory (RAM). The processor 501 and the memory 502 form a so-called computer, and the processor 501 executes various programs read onto the memory 502, causing the computer to realize, for example, the above-mentioned functions (the training dataset generation unit 441 and the training unit 442).
[0045] The auxiliary storage device 503 stores various programs and various data used when the various programs are executed by the processor 501. For example, the training dataset storage unit 443 is realized in the auxiliary storage device 503.
[0046] The I / F device 504 is a connection device that connects an operation device 510 and a display device 511, which are examples of external devices, with the learning device 440. The I / F device 504 accepts operations for the learning device 440 (for example, an operation to input the results of a visual inspection by an inspector 421, or an operation to input instructions for a learning process by an administrator (not shown) of the learning device 440) via the operation device 510. The I / F device 504 also outputs the results of the learning process by the learning device 440 and displays them to the administrator of the learning device 440 via the display device 511.
[0047] The communication device 505 is a communication device for communicating with other devices (in this embodiment, the AOI device 410).
[0048] The drive device 506 is a device for loading a recording medium 512. The recording medium 512 here includes media that record information optically, electrically, or magnetically, such as a CD-ROM, a flexible disk, a magneto-optical disk, etc. The recording medium 512 may also include semiconductor memories that record information electrically, such as ROMs, flash memories, etc.
[0049] The various programs to be installed in the auxiliary storage device 503 are installed, for example, by setting the distributed recording medium 512 in the drive device 506 and reading the various programs recorded on the recording medium 512 by the drive device 506. Alternatively, the various programs to be installed in the auxiliary storage device 503 may be installed by being downloaded from a network via the communication device 505.
[0050] <Details of Each Unit of the Learning Apparatus> Next, the details of each unit of the learning apparatus 440 (here, the learning data set generation unit 441 and the learning unit 442) will be described.
[0051] (1) Specific Example of Processing by the Training Data Set Generator Fig. 6 is a diagram showing a specific example of processing by the training data set generator of the training device. As shown in Fig. 6, when inspection images 610 to 630 of each area including defect candidates are transmitted from the AOI device 410, the training data set generator 441 extracts normal images with a "visual inspection result: OK" rating.
[0052] 6 shows that, of the inspection images 610 to 630 in each region, inspection image 630 is an abnormal image with a "visual inspection result: NG." Therefore, the learning dataset generation unit 441 extracts the inspection images 610 and 620 (normal images with a "visual inspection result: OK") from each region to generate a learning dataset 640.
[0053] As shown in FIG. 6, the learning data set 640 has the following information items: "ID," "inspection image," and "visual inspection result."
[0054] "ID" stores an identifier that identifies the inspection image (normal image) of each region. "Inspection image" stores the inspection image (normal image) of each region. "Visual inspection result" stores the result of the visual inspection of the inspection image (normal image) of each region. Note that since only normal images with "visual inspection result: OK" are stored in the learning dataset 640, only "OK" is stored in "visual inspection result."
[0055] (2) Specific Example of Processing by the Learning Unit Fig. 7 is a diagram showing a specific example of processing by the learning unit of the learning device. As shown in Fig. 7, the learning unit 442 has an image input unit 710, a mask unit 720, an image reconstruction unit 730, and a comparison / modification unit 750.
[0056] The image input unit 710 reads out the test image (an example of the first image, for example, test image 610 (normal image)) of each region stored in the "test image" of the training dataset 640 stored in the training dataset storage unit 443, and inputs it to the mask unit 720.
[0057] The mask unit 720 generates a masked normal image (an example of a first mask image, for example, a masked normal image 760) by superimposing a previously generated first mask on the inspection region of the inspection image input by the image input unit 710. Furthermore, the mask unit 720 inputs the generated masked normal image 760 to the image reconstruction unit 730.
[0058] The image reconstructing unit 730 reconstructs the masked normal image 760 and outputs a reconstructed image (an example of a first reconstructed image, for example, a reconstructed image 762).
[0059] The comparison / modification unit 750 compares the reconstructed image 762 output by the image reconstruction unit 730 with the inspection image (normal image, for example, inspection image 610) read out by the image input unit 710, and updates the model parameters of the image reconstruction unit 730 so that the two images match.
[0060] As a result, when the image reconstruction unit 730 reconstructs the reconstructed image 762 from the masked normal image 760, a learning process is performed so that the reconstructed image 762 approaches the test image (normal image).
[0061] The trained image reconstruction unit, which has undergone a training process so that the reconstructed image approaches the inspection image (normal image), is used in the inspection phase, which will be described later.
[0062] In this way, the learning unit 442 can generate a trained image generation AI that can reconstruct changes in the shape of a part of an object to be inspected that occur due to manufacturing variations within the range of good products.
[0063] <System Configuration of Inspection System (Inspection Phase)> Next, a system configuration of the inspection system according to the first embodiment in the inspection phase will be described. Fig. 8 is a diagram showing an example of the system configuration of the inspection system according to the first embodiment in the inspection phase.
[0064] As shown in FIG. 8, an inspection system 800 in the inspection phase includes the AOI device 410 and a determination device 810 .
[0065] Of these, the AOI device 410 is the same as the AOI device 410 of the inspection system 400 in the learning phase, and therefore a description thereof will be omitted here.
[0066] A determination program is installed in the determination device 810, and by executing this program, the determination device 810 functions as an inference unit 811 and an output unit 812.
[0067] The inference unit 811 includes a trained image reconstruction unit generated during the learning phase. The inference unit 811 acquires the inspection image 420 of each region transmitted from the AOI device 410 by performing an automatic visual inspection of the object under inspection (e.g., a printed circuit board 430). The inference unit 811 then generates multiple masked inspection images (an example of multiple second mask images) by sequentially superimposing a first mask and multiple second masks on the inspection region of the acquired inspection image 420 of each region (an example of a second image). The inference unit 811 then sequentially inputs the generated masked inspection images to the trained image reconstruction unit to reconstruct multiple reconstructed images (an example of multiple second reconstructed images). The inference unit 811 then combines the multiple reconstructed images to generate a composite image (an example of a second composite image). The inference unit 811 then compares the composite image with the inspection image 420 to determine whether the inspection image 420 of each region contains a defect. The inference unit 811 then notifies the output unit 812 of the determination result.
[0068] The output unit 812 outputs the judgment result notified by the inference unit 811 to the inspection line. On the inspection line, an inspector 421 visually inspects the inspection image of each region containing a defect candidate. However, during the inspection phase, the inspection line refers to the judgment result output by the output unit 812 and excludes, from the inspection images 420 of each region containing a defect candidate, those that are judged by the judgment device 810 not to contain a defect. Then, on the inspection line, from the inspection images 420 of each region containing a defect candidate, the inspection images 820 that are judged by the judgment device 810 to contain a defect are assigned to visual inspection. In other words, the output unit 812 outputs the inspection images 820 so that visual inspection can be performed on the inspection images 820 that are judged to contain a defect.
[0069] In this way, when the AOI device 410 performs an automatic visual inspection of the inspection object and detects the inspection image 420 of each area containing a defect candidate, the inspection line allocates the inspection image that is determined to contain a defect by the determination device 810 to visual inspection. As a result, the inspection system 800 makes it possible to reduce the number of inspection images allocated to visual inspection, thereby reducing the workload of the inspector 421 in visual inspection.
[0070] <Hardware Configuration of Determination Device> Next, the hardware configuration of the determination device 810 will be described. Fig. 9 is a diagram showing an example of the hardware configuration of the determination device. As shown in Fig. 9, the hardware configuration of the determination device 810 is generally the same as the hardware configuration of the learning device 440, and therefore, differences from the hardware configuration of the learning device 440 will be mainly described here.
[0071] 9, a processor 901 reads and executes various programs (e.g., a determination program) onto a memory 902. When the processor 901 executes the various programs read onto the memory 902, a computer formed by the processor 901 and the memory 902 realizes, for example, the above-mentioned functions (the inference unit 811 and the output unit 812).
[0072] <Details of Each Unit of the Determination Device> Next, the details of each unit of the determination device 810 (here, the inference unit 811) will be described. Fig. 10 is a diagram showing a specific example of processing by the inference unit of the determination device. As shown in Fig. 10, the inference unit 811 has an image input unit 1010, a mask unit 1020, a learned image reconstruction unit 1030, a synthesis unit 1040, and a determination unit 1050.
[0073] The image input unit 1010 acquires the inspection image 420 of each area transmitted from the AOI device 410 and inputs it to the mask unit 1020 .
[0074] The mask unit 1020 generates four masked inspection images (e.g., four masked inspection images 1060) by sequentially superimposing the first mask and three types of second masks on the inspection region of the inspection image input by the image input unit 1010. Furthermore, the mask unit 1020 inputs the generated four masked inspection images 1060 to the trained image reconstruction unit 1030.
[0075] The trained image reconstruction unit 1030 is a trained model generated by performing a training process on the image reconstruction unit 730 in the training phase. The trained image reconstruction unit 1030 reconstructs four reconstructed images (e.g., four reconstructed images 1061) based on the four masked inspection images 1060.
[0076] The synthesis unit 1040 synthesizes the four reconstructed images 1061 reconstructed by the learned image reconstruction unit 1030 to generate a composite image (for example, a composite image 1062). The synthesis unit 1040 also notifies the determination unit 1050 of the generated composite image 1062.
[0077] The determination unit 1050 compares the composite image 1062 notified by the composition unit 1040 with the inspection image input by the image input unit 1010, and determines whether or not the inspection image contains a defect.
[0078] Specifically, the determination unit 1050 calculates the mean square error (MSE) of the pixel values of each pixel in the composite image and the inspection image. Subsequently, the determination unit 1050 determines whether the calculated MSE is equal to or less than a predetermined threshold (Th). If the determination unit 1050 determines that the calculated MSE is equal to or less than the predetermined threshold, it determines that the inspection image read by the image input unit 1010 does not contain a defect. On the other hand, if the determination unit 1050 determines that the calculated MSE exceeds the predetermined threshold, it determines that the inspection image input by the image input unit 1010 contains a defect.
[0079] In this way, the inference unit 811 can reconstruct the change in the shape of a part of the object to be inspected that occurs due to manufacturing variations within the range of non-defective products, thereby reducing the error between the inspection image and the composite image. As a result, the inference unit 811 can prevent the inspection image from being erroneously determined to contain a defect when no defect is present, thereby reducing erroneous determinations.
[0080] <Learning Process Flow> Next, a description will be given of the flow of the learning process by the learning device 440 of the inspection system 400. Fig. 11 is a flowchart showing the flow of the learning process by the learning device of the inspection system according to the first embodiment.
[0081] In step S1101, the learning data set generation unit 441 of the learning device 440 acquires the inspection image 420 of each area including a defect candidate from the AOI device 410.
[0082] In step S1102, the learning data set generation unit 441 of the learning device 440 extracts normal images with "visual inspection result: OK" from the acquired inspection images 420 of each region.
[0083] In step S1103, the training dataset generation unit 441 of the training device 440 generates a training dataset.
[0084] In step S1104, the learning unit 442 of the learning device 440 generates a masked normal image by superimposing a first mask on the inspection region of the inspection image (normal image) of each region included in the learning dataset.
[0085] In step S1105, the learning unit 442 of the learning device 440 reconstructs a reconstructed image from the generated masked normal image.
[0086] In step S1106, the learning unit 442 of the learning device 440 performs a learning process on the image reconstruction unit by updating the model parameters of the image reconstruction unit so that the reconstructed image approaches the inspection image (normal image).
[0087] In step S1107, the learning unit 442 of the learning device 440 determines whether or not to end the learning process. If it is determined in step S1107 that the learning process is to be continued (NO in step S1107), the process returns to step S1103.
[0088] On the other hand, if it is determined in step S1107 that the learning process is to be ended (YES in step S1107), the process proceeds to step S1108.
[0089] In step S1108, the learning unit 442 of the learning device 440 outputs the learned image reconstruction unit, and the learning process ends.
[0090] <Flow of Determination Process> Next, a description will be given of the flow of the determination process by the determination device 810 of the inspection system 800. Fig. 12 is a flowchart showing the flow of the determination process by the determination device of the inspection system according to the first embodiment.
[0091] In step S1201, the inference unit 811 of the determination device 810 acquires the inspection image 420 of each area including a defect candidate from the AOI device 410.
[0092] In step S1202, the inference unit 811 of the determination device 810 generates a plurality of masked inspection images by superimposing the first mask and a plurality of second masks on the inspection region of the acquired inspection image 420 of each region.
[0093] In step S1203, the inference unit 811 of the determination device 810 inputs the generated masked inspection images to the trained image reconstruction unit, thereby reconstructing a plurality of reconstructed images.
[0094] In step S1204, the inference unit 811 of the determination device 810 synthesizes the multiple reconstructed images to generate a composite image.
[0095] In step S1205, the inference unit 811 of the determination device 810 compares the inspection image acquired in step S1201 with the composite image generated in step S1204 and calculates the MSE to determine whether or not the inspection image contains a defect. The inference unit 811 of the determination device 810 also outputs the determination result.
[0096] In step S1206, the inference unit 811 of the determination device 810 determines whether or not to end the determination process. If it is determined in step S1206 that the determination process is to be continued (NO in step S1206), the process returns to step S1201.
[0097] On the other hand, if it is determined in step S1206 that the determination process should be ended (YES in step S1206), the determination process ends.
[0098] <Verification of Inference Unit> Next, the accuracy of generation when a reconstructed image is reconstructed using the inference unit 811 of the determination device 810 and a composite image is generated is verified. The accuracy of generation of a composite image is verified by the following procedure: 1) A comparison device is prepared. 2) Different first masks are superimposed on the same normal image to generate different learning datasets, and learning is performed using each learning dataset to generate: - an inference unit (the trained image reconstruction unit) of the comparison device, and - an inference unit 811 (the trained image reconstruction unit 1030) of the determination device 810. 3) The same verification image is input to the inference unit of the comparison device and the inference unit 811 of the determination device 810, respectively, to reconstruct the reconstructed image and generate a composite image. 4) The error between the input verification image and the composite image generated by the inference unit of the comparison device, and the error between the input verification image and the composite image generated by the inference unit 811 of the determination device 810 are calculated. 5) Repeat steps 3) and 4) above for multiple verification images, and compare the average error values to verify the accuracy of synthetic image generation.
[0099] Fig. 13 is a diagram for explaining an overview of the verification process. Of these, Fig. 13(a) shows an overview of the process performed by the inference unit of the comparison device. As indicated by reference numeral 1310, the inference unit of the comparison device generates a masked verification image using four rectangular masks (one first mask and three second masks, each including one rectangular mask piece) superimposed on each of the four regions obtained by dividing an inspection region 1311.
[0100] Specifically, as indicated by the reference numeral 1312, the inference unit of the comparison device generates four masked verification images by superimposing four rectangular masks on the verification image 1301, respectively.
[0101] Next, the inference unit of the comparison device reconstructs a reconstructed image for each of the four generated masked verification images to generate a composite image 1313. Furthermore, the inference unit of the comparison device calculates the error between the verification image 1301 and the composite image 1313.
[0102] 13B shows an overview of processing by the inference unit 811 of the determination device 810. As indicated by the reference numeral 1320, the inference unit 811 of the determination device 810 generates a masked verification image using four grid-shaped masks (one first mask and three second masks each including a plurality of mask pieces arranged in a grid pattern) superimposed on an inspection area 1321.
[0103] Specifically, as indicated by the reference numeral 1322, the inference unit 811 of the determination device 810 generates four masked verification images by superimposing four grid-shaped masks on the verification image 1301, respectively.
[0104] Next, the inference unit 811 of the determination device 810 reconstructs a reconstructed image for each of the four generated masked verification images, and generates a composite image 1323. Furthermore, the inference unit 811 of the determination device 810 calculates the error between the verification image 1301 and the composite image 1323.
[0105] 14 is a diagram showing an example of the verification result, in which reference numeral 1410 denotes the average value of the pixel value error for each pixel between a plurality of verification images and a plurality of composite images generated by an inference unit of a comparison device based on the plurality of verification images.
[0106] Also, in Figure 14, symbol 1420 indicates the average value of the pixel value error for each pixel between multiple verification images and multiple composite images generated by the inference unit 811 of the judgment device 810 based on the multiple verification images.
[0107] Comparing the average error value (=3.69) shown by reference numeral 1410 with the average error value (2.61) shown by reference numeral 1420, the average error value shown by reference numeral 1420 is 29.3% smaller than the average error value shown by reference numeral 1410. This indicates that the inference unit 811 of the determination device 810 has higher accuracy in generating a synthetic image than the inference unit of the comparison device.
[0108] In addition, by improving the accuracy of generating a composite image by the inference unit 811 of the determination device 810, the risk of erroneously determining that an image is abnormal even though it is normal can be reduced.
[0109] <Summary> As is clear from the above description, the inspection system 400 according to the first embodiment: generates a first mask by regularly arranging a plurality of mask pieces, each smaller than the mask to be superimposed on the inspection area, at predetermined intervals in the vertical, horizontal, and diagonal directions; generates a number of second masks corresponding to the size of the intervals, each of which has a plurality of mask pieces regularly arranged at positions that fill the predetermined vertical intervals, horizontal intervals, and diagonal intervals of the first mask; generates a masked normal image by superimposing the first mask on the inspection area of a normal image determined to contain no defects among images of the object to be inspected; reconstructs a reconstructed image by inputting the generated masked normal image, and generates a trained image reconstruction unit by performing a learning process on the image reconstruction unit so that the reconstructed image approaches the inspection image (normal image).
[0110] As a result, the inspection system 400 according to the first embodiment can generate a trained image generation AI that can reconstruct changes in the shape of a portion of an object to be inspected that occur due to manufacturing variations within the range of non-defective products.
[0111] Furthermore, the inspection system 800 according to the first embodiment: - Generates multiple masked inspection images by sequentially superimposing a first mask and multiple second masks on the inspection area of an inspection image obtained by photographing an object to be inspected; - Reconstructs multiple reconstructed images by inputting the generated multiple masked inspection images into a trained image reconstruction unit, and then generates a composite image by combining the multiple reconstructed images; - Compares the inspection image with the composite image to determine whether the inspection image contains a defect.
[0112] As a result, the inspection system 800 according to the first embodiment can reconstruct changes in the shape of a portion of the object being inspected that occur due to manufacturing variations within the range of non-defective products, thereby reducing the error between the inspection image and the composite image. As a result, the inspection system 800 according to the first embodiment can prevent the inspection image from being erroneously determined to contain a defect even when no defect is present, thereby reducing erroneous determinations.
[0113] [Second Embodiment] In the first embodiment, a first mask is generated by regularly arranging a plurality of mask pieces, each smaller than the mask to be superimposed on the inspection area, at intervals equal to the size of the mask pieces in the vertical, horizontal, and diagonal directions. Also, in the first embodiment, three types of second masks are generated by regularly arranging mask pieces at positions that fill the horizontal, vertical, and diagonal intervals equal to the size of the mask pieces.
[0114] However, the method for generating the first mask and the plurality of second masks is not limited to this. Figure 15 shows another example of the first mask and the plurality of second masks. Of these, Figure 15(a) shows the first mask and three types of second masks shown in the first embodiment for comparison.
[0115] On the other hand, Figure 15(b) shows the generated: - a first mask in which multiple mask pieces smaller in size than the mask to be superimposed on the inspection area are regularly arranged at intervals equal to the size of the mask pieces in the vertical direction and at intervals twice the size of the mask pieces in the horizontal and diagonal directions; - one type of second mask in which mask pieces are regularly arranged at positions that fill the vertical intervals equal to the size of the mask pieces, and five types of second masks in which mask pieces are regularly arranged at positions that fill the horizontal intervals and diagonal intervals that are twice the size of the mask pieces.
[0116] Figure 15(c) shows the generated: - a first mask in which multiple mask pieces smaller than the mask to be superimposed on the inspection area are regularly arranged at intervals twice the size of the mask pieces in the vertical and diagonal directions and at intervals equal to the size of the mask pieces in the horizontal direction; - one type of second mask in which mask pieces are regularly arranged at positions that fill horizontal intervals equal to the size of the mask pieces, and five types of second masks in which mask pieces are regularly arranged at positions that fill vertical intervals and diagonal intervals that are twice the size of the mask pieces.
[0117] Figure 15(d) shows the generated state of: - a first mask in which multiple mask pieces smaller in size than the mask to be superimposed on the inspection area are regularly arranged at intervals equal to the size of the mask pieces in the vertical direction and at intervals equal to the size of the mask pieces in the horizontal direction; and - one type of second mask in which mask pieces are regularly arranged at positions that fill the horizontal and vertical intervals equal to the size of the mask pieces.
[0118] Figure 15(e) shows the generated: - a first mask in which a plurality of mask pieces smaller in size than the mask to be superimposed on the inspection area and larger in size than the mask pieces shown in Figures 15(a) to (d) are regularly arranged vertically, horizontally and diagonally at intervals equal to the size of the mask pieces; and - three types of second masks in which mask pieces are regularly arranged at positions that fill the horizontal intervals, vertical intervals and diagonal intervals equal to the size of the mask pieces.
[0119] As described above, there are various methods for generating the first mask and the plurality of second masks, and they are generated taking into consideration the size of the inspection image to be acquired, the size of defects contained in the inspection image, and the like.
[0120] [Third Embodiment] In the learning device 440 of the first embodiment, the mask unit 720 has been described as generating a masked normal image using a first mask. However, the method for generating a masked normal image is not limited to this. For example, a masked normal image may be generated using one of a plurality of second masks.
[0121] In addition, in the learning device 440 of the first embodiment, the mask unit 720 has been described as performing learning processing on the image reconstruction unit 730 by generating a masked normal image using one type of mask. However, the method of learning processing on the image reconstruction unit 730 is not limited to this, and for example, learning processing may be performed by generating a masked normal image using multiple types of masks (e.g., a first mask and a second mask, or multiple second masks).
[0122] Furthermore, the learning device 440 of the first embodiment described above is configured without a synthesis unit. However, the configuration of the learning device 440 is not limited to this, and a synthesis unit may be provided, similar to the determination device 810. In this case, the learning device 440 inputs multiple masked normal images generated by sequentially superimposing a first mask and multiple second masks to the image reconstruction unit 730, and generates a composite image by synthesizing the multiple reconstructed images reconstructed by the image reconstruction unit 730 using the synthesis unit. As a result, the learning device 440 performs a learning process on the image reconstruction unit 730 so that the composite image approaches the test image (normal image).
[0123] Furthermore, in the first embodiment, no mention was made of the position of the inspection area on which the first mask and the multiple second masks are superimposed, but it is assumed that the inspection area is adjusted to be located at the center of the inspection image in the AOI device 410. Furthermore, in the first embodiment, no mention was made of the size of the masks to be superimposed, but it is assumed that the size of the masks to be superimposed is adjusted according to the size of the inspection area in the inspection image transmitted from the AOI device 410. However, there are no restrictions on the position and size of the inspection area on which the masks are superimposed, and it is possible to superimpose a mask at any position and size.
[0124] Furthermore, in the first embodiment, the details of the process of determining whether or not an inspection image contains a defect by performing image processing using the inspection image and the reconstructed image are not mentioned, but examples of such processing include the following: Calculating the absolute difference between each pixel of the inspection image and the reconstructed image to generate a difference image. Performing binarization processing on the difference image to extract areas where the absolute difference value is equal to or greater than a threshold. Performing contour extraction processing on the difference image after binarization processing to extract contours of areas where the absolute difference value is equal to or greater than a threshold. Determining that a defect is contained if the shape and size of the extracted contour satisfy predetermined conditions, and determining that a defect is not contained if the shape and size of the extracted contour do not satisfy the predetermined conditions.
[0125] In this way, by determining whether or not an inspection image contains a defect based on the results of image processing, the accuracy of the determination can be improved compared to when the determination is based on the magnitude of the error.
[0126] The present invention is not limited to the configurations described in the above embodiments, but may be combined with other elements, etc. These aspects can be changed without departing from the spirit of the present invention, and can be appropriately determined depending on the application form.
[0127] This application claims priority based on Japanese Patent Application No. 2023-054111, filed on March 29, 2023, the entire contents of which are incorporated herein by reference.
[0128] 400: Inspection system 410: AOI device 440: Learning device 441: Learning data set generation unit 442: Learning unit 640: Learning data set 710: Image input unit 720: Mask unit 730: Image reconstruction unit 750: Comparison / modification unit 810: Determination device 811: Inference unit 812: Output unit 1010: Image input unit 1020: Mask unit 1030: Learned image reconstruction unit 1040: Synthesis unit 1050: Determination unit
Claims
1. A judgment device comprising: an image reconstruction unit that outputs a first reconstructed image when a first mask image generated by superimposing a mask on an inspection area of a first image, which is determined to contain no defects, is input, said first reconstructed image being learned to approximate the first image; a synthesis unit that synthesizes a plurality of second reconstructed images to generate a second synthetic image when a plurality of second mask images generated by sequentially superimposing a plurality of masks on the inspection area of a second image, which is an image of an object to be inspected, are input to the trained image reconstruction unit to reconstruct a plurality of second reconstructed images; and a judgment unit that compares the second synthetic image with the second image and judges whether the second image contains a defect or not.
2. The determination device of claim 1, wherein the multiple masks include a first mask and multiple second masks, the first mask is generated by regularly arranging multiple mask pieces smaller than a mask to be superimposed on the inspection area at predetermined intervals in the vertical, horizontal and diagonal directions, and the second masks are generated in a number corresponding to the size of the intervals by regularly arranging multiple mask pieces at positions that fill the predetermined vertical intervals, predetermined horizontal intervals and predetermined diagonal intervals of the first mask.
3. The determination device of claim 1, wherein the multiple masks include a first mask and multiple second masks, the first mask is generated by regularly arranging multiple mask pieces smaller in size than a mask to be superimposed on the inspection area at predetermined intervals in the vertical and horizontal directions, and the second masks are generated in a number corresponding to the size of the intervals by regularly arranging multiple mask pieces at positions that fill the predetermined vertical intervals and predetermined horizontal intervals of the first mask.
4. The determination device according to claim 2 or 3, wherein the predetermined interval is an integer multiple of the size of the mask pieces.
5. The determination device described in claim 1, wherein the determination unit determines that the second image does not contain a defect if a value calculated based on the error in pixel values of each pixel between the second image and the second composite image satisfies a predetermined condition, and determines that the second image contains a defect if a value calculated based on the error in pixel values of each pixel between the second image and the second composite image does not satisfy a predetermined condition.
6. A learning device comprising: a mask unit which generates a first mask image by superimposing a mask on an inspection area of a normal image, determined to contain no defects, among images of an object to be inspected; and an image reconstruction unit which outputs a first reconstructed image when the first mask image is input, wherein the mask is generated by regularly arranging a plurality of mask pieces, each smaller in size than the mask superimposed on the inspection area, at least in the vertical and horizontal directions at predetermined intervals, and the image reconstruction unit is trained to make the first reconstructed image approach the normal image.
7. The learning device according to claim 6, wherein the mask is generated by regularly arranging a plurality of mask pieces smaller in size than the mask to be superimposed on the inspection area at predetermined intervals in the vertical, horizontal and diagonal directions.
8. A judgment method comprising: an image reconstruction unit that outputs a first reconstructed image when a first mask image generated by superimposing a mask on an inspection area of a first image, which is determined to contain no defects, is input; and a judgment device computer that stores a trained image reconstruction unit that has been trained to make the first reconstructed image approach the first image executes the following judgment method: a synthesis step of synthesizing the multiple second reconstructed images to generate a second synthesized image when multiple second mask images generated by sequentially superimposing multiple masks on the inspection area of a second image, which is an image of an object to be inspected, are input to the trained image reconstruction unit to reconstruct multiple second reconstructed images; and a judgment step of comparing the second synthesized image with the second image to judge whether the second image contains a defect or not.
9. A learning method in which a computer of a learning device executes a masking process for generating a first mask image by superimposing a mask on an inspection area of a normal image, which is determined to contain no defects, among images of an object to be inspected, and an image reconstructing process for outputting a first reconstructed image by an image reconstructing unit when the first mask image is input, wherein the mask is generated by regularly arranging a plurality of mask pieces, each of which is smaller in size than the mask superimposed on the inspection area, at least in the vertical and horizontal directions with a predetermined interval between each piece, and the image reconstructing process executes a learning process on the image reconstructing unit so that the first reconstructed image approaches the normal image.
10. An image reconstruction unit that outputs a first reconstructed image when a first mask image generated by superimposing a mask is input into an inspection area of a first image, which is determined to contain no defects, among images of an object to be inspected, and a judgment program for causing a computer of a judgment device storing a trained image reconstruction unit that has been trained to make the first reconstructed image approach the first image to execute the following judgment program: a synthesis process for synthesizing the multiple second reconstructed images to generate a second composite image when multiple second mask images generated by sequentially superimposing multiple masks into the inspection area of a second image, which is an image of an object to be inspected, are input into the trained image reconstruction unit to reconstruct multiple second reconstructed images; and a judgment process for comparing the second composite image with the second image and judging whether the second image contains a defect or not.
11. A learning program that causes a computer of a learning device to execute a masking process for generating a first mask image by superimposing a mask on an inspection area of a normal image, which is determined to contain no defects, among images of an object to be inspected, and an image reconstructing process for outputting a first reconstructed image by an image reconstructing unit when the first mask image is input, wherein the mask is generated by regularly arranging a plurality of mask pieces, which are smaller in size than the mask superimposed on the inspection area, at least in the vertical and horizontal directions with a predetermined interval between them, and wherein the image reconstructing process performs a learning process on the image reconstructing unit so that the first reconstructed image approaches the normal image.
Citation Information
Patent Citations
Inspection system, inspection method and inspection program
JP2022114331A
System for detecting defect and computer-readable medium
JP2022168944A
Inspection device, inspection method, inspection program, learning device, learning method, and learning program
WO2021019865A1
Cited By
Image determination device, image determination method, and image determination program
WO2026225298A1
