Determination device, learning device, determination method, learning method, determination program, and learning program
By using a mask with material information-based color for image generation and removing base regions, the system enhances defect inspection accuracy by reducing false judgments and improving boundary reconstruction, addressing the challenges of overlapping material boundaries and fine irregularities in existing AI systems.
Patent Information
- Application Number
- PCT/JP2024/012806
- 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 image generation AI systems for defect inspection face challenges in accurately determining defects in inspection images, leading to false judgments due to difficulties in reconstructing normal images, especially when the inspection area overlaps material boundaries or includes regions with fine irregularities, resulting in erroneous determinations.
The system employs a mask with material information based on CAD data added as color information to generate masked images, allowing for accurate reconstruction of material boundaries and reducing false judgments by comparing the inspection image with a reconstructed image after removing the base area, which is difficult to reconstruct.
This approach effectively reduces misjudgments in defect inspection by ensuring accurate reconstruction of material boundaries and suppressing the influence of base regions, thereby improving the accuracy of defect detection.
Smart Images

Figure JP2024012806_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 image generation AI, there are cases where it is difficult to reconstruct a normal image as the reconstructed image. In such cases, the difference between the inspection image and the reconstructed image becomes large, and there is a possibility that the inspection image may be erroneously determined to contain 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 judgment device includes a trained image reconstruction unit that has been trained to reconstruct a first image from a first mask image in which a mask is superimposed on an inspection area of a first image, which is an image of an object to be inspected and which has been determined not to contain a defect, and the mask is colored according to the type of material contained in the corresponding area of the object to be inspected, and the first image is reconstructed by inputting a second mask image in which the mask corresponding to the inspection area of a second image of the object to be inspected is superimposed on the inspection area of the first image to the trained image reconstruction unit, and the judgment unit compares the second image with a second reconstructed 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 present using a trained image generation AI. FIG. 2A is a first diagram showing an example of an erroneous judgment. FIG. 2B is a second 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 first diagram showing an example of a judgment processing method when determining whether or not a defect is present using a trained image generation AI in an inspection system according to the first embodiment. FIG. 3C is a second diagram showing an example of a judgment processing method when determining whether or not a defect is present using a trained image generation AI in an inspection system according to the first embodiment. FIG. 4 is a diagram showing an example of the system configuration of an inspection system in the learning phase according to the first embodiment. FIG. 5 is a diagram showing an example of the 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 determination device. Fig. 10 is a diagram showing a specific example of processing by an inference unit of the determination 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 determination processing by the determination device of the inspection system according to the first embodiment.
[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.
[0020] (1) Case 1: An example of an erroneous determination is when the object to be inspected is made up of multiple types of materials, and the inspection area where the mask is superimposed overlaps the boundary between the materials, making it difficult to reconstruct a normal image. This will be explained in detail using Figure 2A. Figure 2A is a first diagram showing an example of an erroneous determination.
[0021] In Figure 2A, inspection image 201 is an example of an inspection image that has been erroneously determined by the trained image generation AI 120 to contain a defect, even though it does not actually contain a defect. The inspection object corresponding to inspection image 201 has the following configuration: - Made of two different types of materials - The boundary between the two types of materials overlaps with the inspection area where the mask is superimposed.
[0022] In the case of inspection image 201, when the masked inspection image with a mask superimposed thereon is input to trained image generation AI 120, trained image generation AI 120 reconstructs reconstructed image 202. As shown in Figure 2A, in the case of reconstructed image 202, the boundary portion of the two types of materials is not properly reconstructed (see reference numeral 203).
[0023] In such cases, the error between the reconstructed image and the inspection image becomes large, resulting in the inspection image being erroneously determined to contain a defect even though the defect is not actually present.
[0024] In contrast, in the inspection system according to the first embodiment, material information is added to the mask as color information in order to appropriately reconstruct the boundary portion of the material and reduce erroneous determinations (details will be described later).
[0025] (2) Case 2 Another example of an erroneous determination is when the object to be inspected is made up of multiple types of materials, and the inspection area where the mask is superimposed contains a material from which it is difficult to reconstruct a normal image, making it difficult to reconstruct a normal image. This will be explained in detail using Figure 2B. Figure 2B is a second diagram showing an example of an erroneous determination.
[0026] In FIG. 2B , inspection image 210 is another example of an inspection image that is erroneously determined by trained image generation AI 120 to contain a defect, even though it does not actually contain a defect. The inspection object corresponding to inspection image 210 has the following configuration: - It is made up of two different types of materials. - Of the two types of materials, one material (the white area in inspection image 210) has little surface irregularity, while the other material (the hatched area in inspection image 210) has fine, irregular surface irregularities. - Of the two types of materials, the material with fine, irregular surface irregularities corresponds to the base of the inspection object, and the material with little surface irregularities corresponds to the part of the inspection object other than the base (for example, the circuit part if the inspection object is a printed circuit board).
[0027] In the case of inspection image 210, when the masked inspection image on which the mask is superimposed is input to trained image generation AI 120, trained image generation AI 120 reconstructs reconstructed image 220. As shown in Figure 2B, in the case of reconstructed image 220, in region 211 on which the mask is superimposed, white region 222 (region corresponding to material with little surface irregularity) is reconstructed as an image similar to white region 212 of inspection image 210 (region corresponding to material with little surface irregularity).
[0028] On the other hand, areas 223 and 224 (areas corresponding to materials with fine, irregular surface irregularities) do not reconstruct images like the hatched areas 213 and 214 (areas corresponding to materials with fine, irregular surface irregularities) in inspection image 210. Specifically, areas 223 and 224 (areas corresponding to materials with fine, irregular surface irregularities) do not reconstruct the fine, irregular surface irregularities, and a flat image is reconstructed. In other words, in the case of inspection image 210, the inspection area includes a base area from which it is difficult to reconstruct a normal image.
[0029] In such a case, the error between the reconstructed image 220 and the inspection image 210 becomes large, and the inspection image 210 is erroneously determined to contain a defect.
[0030] In contrast, in the inspection system according to the first embodiment, in order to suppress the influence of the background area, which makes it difficult to reconstruct a normal image, and reduce erroneous judgments, the background area is removed when calculating the error between the reconstructed image 220 and the inspection image 210 (details will be described later).
[0031] <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.
[0032] The difference from the learning processing method of the comparative example shown in Figure 1A is that in the case of Figure 3A, material information based on CAD (Computer Aided Design) data is added as color information to the mask used to generate the masked normal image.
[0033] Specifically, in the case of Figure 3A, the mask is generated, for example, by the following procedure: a) A normal image is acquired from the inspection images taken by the inspection system, and CAD data of the inspection object corresponding to the acquired normal image is acquired; b) CAD data of the inspection area is extracted from the acquired CAD data, and the type of material included in the extracted CAD data is identified; and c) A mask is generated by adding a different color to each identified type of material.
[0034] In this way, the inspection system according to the first embodiment uses a mask to which material information based on CAD data is added as color information. This makes it possible to properly reconstruct the material boundary, even in cases where the inspection area where the mask is superimposed overlaps the boundary of the materials, making it difficult to reconstruct a normal image, thereby reducing erroneous determinations.
[0035] The above-described procedure for generating a mask is merely an example, and the mask may be generated by other procedures. For example, the mask may be generated by switching the order of steps b) and c). Specifically, the mask may be generated by identifying the types of materials included in the acquired CAD data, adding a different color to each identified type of material, and then extracting CAD data of the inspection area from the CAD data to which the colors have been added.
[0036] 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.
[0037] 3B is a first diagram showing an example of a determination processing method for determining whether or not a defect is present using a trained image generation AI in the inspection system according to the first embodiment. The differences from FIG. 2A are that in the case of FIG. 3B, material information based on CAD data is added as color information to the mask used in generating the masked inspection image, and that when comparing the inspection image and the reconstructed image and calculating the error, the background area is removed from each of the inspection image and the reconstructed image before calculating the error.
[0038] As shown in Figure 3B, even when the boundary between two types of materials overlaps with the inspection area on which the mask is superimposed, the boundary can be appropriately reconstructed by adding material information based on CAD data as color information to the mask superimposed on the inspection area. As a result, when the inspection image does not contain a defect (as in the upper part of Figure 3B), it can be appropriately determined that a defect is not contained. Furthermore, when the inspection image contains a defect (as in the lower part of Figure 3B), it can be appropriately determined that a defect is contained.
[0039] In the case of the inspection image shown in Figure 3B, the material of the base region is not a material with fine irregularities on the surface, so the effect of calculating the error after removing the base region is not very great. For this reason, a detailed description of the process of calculating the error after removing the base region will be omitted here.
[0040] 3C is a second diagram showing an example of a determination processing method for determining whether or not a defect is present using the trained image generation AI in the inspection system according to the first embodiment. The differences from FIG. 2B are that in the case of FIG. 3C, material information based on CAD data is added as color information to the mask used in generating the masked inspection image, and that when comparing the inspection image and the reconstructed image and calculating the error, the background area is removed from each of the inspection image and the reconstructed image before calculating the error.
[0041] 3C, the size of the mask superimposed on the boundary between the two types of materials is small, so adding material information based on CAD data as color information does not have much effect. Therefore, a detailed description of the process of adding material information based on CAD data as color information will be omitted here, and instead, the process of calculating the error after removing the background area will be described.
[0042] As shown in Figure 3C, the process of calculating an error after removing the base area is performed as follows: - Remove the base area from the inspection image, which is an inspection area where a mask is superimposed and which has been identified as the base based on CAD data. - Remove the base area from the inspection area where a mask is superimposed and which has been identified as the base based on CAD data, from the reconstructed image. - Compare the inspection image from which the base area has been removed with the reconstructed image from which the base area has been removed, and calculate an error.
[0043] This makes it possible to suppress the influence of the background area even when the inspection area overlaid with the mask includes a background area from which it is difficult to reconstruct a normal image. As a result, when the inspection image does not include a defect (as in the upper part of FIG. 3C ), it is possible to appropriately determine that a defect is not included. Furthermore, when the inspection image includes a defect (as in the lower part of FIG. 3C ), it is possible to appropriately determine that a defect is included.
[0044] In this way, the inspection system according to the first embodiment can reduce erroneous judgments even in cases where it is difficult to reconstruct a normal image, i.e., cases where it is difficult to reconstruct a normal image because the inspection area where the mask is superimposed overlaps the boundary portion of the material, or cases where it is difficult to reconstruct a normal image because the inspection area includes a base area where it is difficult to reconstruct a normal image.
[0045] <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.
[0046] 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 .
[0047] 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.
[0048] 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.
[0049] 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.
[0050] 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.
[0051] 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.
[0052] The learning 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. The learning dataset generation unit 441 also reads CAD data of the printed circuit board 430 and extracts regions corresponding to inspection images (normal images) that are determined to contain no defects from the read CAD data. The learning dataset generation unit 441 also generates a mask in which the inspection region is colored in a color corresponding to the type of material, based on the CAD data of the extracted region.
[0053] In addition, the training dataset generation unit 441 associates the following with each other: - the inspection images (normal images) of each extracted region; - the results of the visual inspection; - the regions extracted from the CAD data corresponding to the inspection images of each region; and - the generated mask, and stores them in the training dataset storage unit 443 as a training dataset.
[0054] The learning unit 442 reads out the 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 generates a masked normal image by superimposing the generated mask on the inspection region of the extracted inspection image (normal image) of each region. The learning unit 442 also performs a learning process on the model so that the inspection image (normal image) of each region is reconstructed from the generated masked normal image.
[0055] The image generation AI described above is used as the model for which learning processing is performed by the learning unit 442. Hereinafter, this model will be referred to as the "image reconstruction unit."
[0056] <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.
[0057] 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.
[0058] 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).
[0059] 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.
[0060] 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.
[0061] The communication device 505 is a communication device for communicating with other devices (in this embodiment, the AOI device 410).
[0062] 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.
[0063] 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.
[0064] <Details of Each Unit of the Learning Device> Next, the details of each unit of the learning device 440 (here, the learning data set generation unit 441 and the learning unit 442) will be described.
[0065] (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, 611, 620, and 621 of regions 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" status.
[0066] 6 shows that, of the inspection images 610, 611, 620, and 621 for each region, the inspection images 620 and 621 are abnormal images with a "visual inspection result: NG." Therefore, the learning dataset generation unit 441 extracts the inspection images 610 and 611 (examples of first images; normal images with a "visual inspection result: OK") for each region to generate a learning dataset 630.
[0067] As shown in FIG. 6, the learning data set 630 has the following information items: "ID," "inspection image," "visual inspection result," "CAD data," and "mask."
[0068] "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 630, only "OK" is stored in "visual inspection result."
[0069] "CAD data" stores CAD data of an area corresponding to the inspection image (normal image) stored in "inspection image," extracted from the CAD data of the corresponding inspection object (e.g., printed circuit board 430).
[0070] "Mask" stores a mask generated by extracting an inspection area onto which a mask is superimposed from the CAD data stored in "CAD data" and applying a color according to the type of material. Alternatively, "Mask" stores a mask generated by applying a color according to the type of material to the CAD data stored in "CAD data" and extracting an inspection area onto which a mask is superimposed.
[0071] (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 740.
[0072] The image input unit 710 reads out the inspection images of each region (e.g., inspection images 610, 611 (normal images)) stored in the "inspection images" of the training dataset 630 stored in the training dataset storage unit 443, and inputs them to the mask unit 720.
[0073] The mask unit 720 reads out the mask stored in "mask" of the training dataset 630 stored in the training dataset storage unit 443. The mask unit 720 also generates a masked normal image (an example of a first mask image; for example, masked normal images 721 and 722) by superimposing the read-out mask on the inspection region of the inspection image (normal image) input by the image input unit 710. The mask unit 720 also inputs the generated masked normal images 721 and 722 to the image reconstruction unit 730.
[0074] The image reconstruction unit 730 reconstructs a reconstructed image (an example of a first reconstructed image, for example, reconstructed images 731 and 732 ) based on the masked normal images 721 and 722 , and outputs the reconstructed images 731 and 732 to the comparison / modification unit 740 .
[0075] The comparison / modification unit 740 compares the reconstructed images 731 and 732 reconstructed by the image reconstruction unit 730 with the inspection image (normal image, for example, inspection images 610 and 611) 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.
[0076] As a result, the image reconstruction unit 730 performs a learning process so that the inspection images 610 and 611 (normal images) are reconstructed from the masked normal images 721 and 722 generated by the mask unit 720 .
[0077] The trained image reconstruction unit that has undergone the training process to reconstruct an inspection image (normal image) is used in the inspection phase, which will be described later.
[0078] <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.
[0079] As shown in FIG. 8, an inspection system 800 in the inspection phase includes the AOI device 410 and a determination device 810 .
[0080] 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.
[0081] 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.
[0082] 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 when an automatic visual inspection is performed on an object to be inspected (e.g., a printed circuit board 430). The inference unit 811 then generates a masked inspection image by superimposing a mask on the inspection region of the acquired inspection image 420 of each region. The inference unit 811 then inputs the generated masked inspection image to the trained image reconstruction unit to reconstruct a reconstructed image. The inference unit 811 then compares the reconstructed image with the inspection image 420 to determine whether or not the inspection image 420 of each region contains a defect. The inference unit 811 then notifies the output unit 812 of the determination result.
[0083] 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.
[0084] 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.
[0085] <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.
[0086] 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).
[0087] <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 removal unit 1040, and a determination unit 1050.
[0088] The image input unit 1010 acquires the inspection image of each region (an example of a second image) from the input image data set 1000 including the inspection image of each region transmitted from the AOI device 410, and inputs the acquired inspection image to the mask unit 1020. Note that, when the image input unit 1010 acquires the inspection image of each region, it is assumed that the input image data set 1000 has been generated in advance.
[0089] As shown in FIG. 10, an input image data set 1000 has the following information items: "ID," "inspection image," "CAD data," and "mask."
[0090] "ID" stores an identifier that identifies the inspection image of each region. "Inspection Image" stores the inspection image of each region. "CAD Data" stores CAD data of the region corresponding to the inspection image stored in "Inspection Image" that is extracted from the CAD data of the corresponding inspection object (e.g., printed circuit board 430). "Mask" stores a mask generated by extracting an inspection region to be superimposed on the mask from the CAD data stored in "CAD Data" and applying a color according to the type of material. Alternatively, "Mask" stores a mask generated by applying a color according to the type of material to the CAD data stored in "CAD Data" and extracting an inspection region to be superimposed on the mask.
[0091] The mask unit 1020 reads out the mask stored in "mask" of the input image data set 1000. The mask unit 1020 also generates a masked inspection image (an example of a second mask image, e.g., masked inspection images 1021 and 1022) by superimposing the read-out mask on the inspection region of the inspection image input by the image input unit 1010. The mask unit 1020 then inputs the generated masked inspection images 1021 and 1022 to the trained image reconstruction unit 1030.
[0092] The trained image reconstruction unit 1030 is a trained model generated by performing a learning process on the image reconstruction unit 730 in the learning phase. The trained image reconstruction unit 1030 reconstructs a reconstructed image (an example of a second reconstructed image; for example, reconstructed images 1031 and 1032) based on the masked inspection image.
[0093] The removal unit 1040 reads out the type of material from the "CAD data" of the input image data set 1000 and identifies the material corresponding to the base (material B and material D in the example of FIG. 10 ). The removal unit 1040 also removes the base region, which is the region of the identified material, from the inspection image read out by the image input unit 1010, and notifies the determination unit 1050 of the inspection image after removal. The removal unit 1040 also removes the base region, which is the region of the identified material, from the reconstructed images 1031 and 1032 reconstructed by the trained image reconstruction unit 1030, and notifies the determination unit 1050 of the reconstructed image after removal.
[0094] The determining unit 1050 compares the inspection image after removal notified by the removing unit 1040 with the reconstructed image after removal, and determines whether or not the inspection image contains a defect.
[0095] Specifically, the determination unit 1050 calculates the mean square error (MSE) of the pixel values of each pixel in the inspection image after removal and the reconstructed image after removal. The determination unit 1050 then 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 read by the image input unit 1010 contains a defect.
[0096] In this way, the inference unit 811 reconstructs a reconstructed image from a masked inspection image on which a mask with color information corresponding to material information is superimposed. This allows the inference unit 811 to properly reconstruct the material boundary even in cases where it is difficult to reconstruct a normal image because the inspection area on which the mask is superimposed overlaps the material boundary (inspection image with ID=101). As a result, the inference unit 811 can reduce erroneous determinations.
[0097] Furthermore, the inference unit 811 compares the reconstructed image with the inspection image after removing the background area to determine whether or not a defect is included. As a result, even in a case where the inspection area overlaid with the mask includes a background area that makes it difficult to reconstruct a normal image (such as the inspection image with ID=102), the inference unit 811 can suppress the influence of the background area. As a result, the inference unit 811 can reduce erroneous determinations.
[0098] <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.
[0099] In step S1101, the learning data set generation unit 441 of the learning device 440 acquires, from the AOI device 410, an inspection image of each area including a defect candidate.
[0100] 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 of each region. The learning data set generation unit 441 of the learning device 440 also acquires CAD data, extracts regions corresponding to normal images with "visual inspection result: OK", and generates a mask.
[0101] In step S1103, the training dataset generation unit 441 of the training device 440 generates a training dataset.
[0102] In step S1104, the learning unit 442 of the learning device 440 generates a masked normal image by superimposing a mask included in the training dataset on the inspection area of the inspection image (normal image) of each area included in the training dataset.
[0103] In step S1105, the learning unit 442 of the learning device 440 performs a learning process on the image reconstruction unit 730 so that an inspection image (normal image) is reconstructed from the generated masked normal image.
[0104] In step S1106, the learning unit 442 of the learning device 440 determines whether or not to end the learning process. If it is determined in step S1106 that the learning process is to be continued (NO in step S1106), the process returns to step S1101.
[0105] On the other hand, if it is determined in step S1106 that the learning process is to be ended (YES in step S1106), the process proceeds to step S1107.
[0106] In step S1107, the learning unit 442 of the learning device 440 outputs the learned image reconstruction unit 1030, and ends the learning process.
[0107] <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.
[0108] In step S1201, the inference unit 811 of the determination device 810 acquires, from the AOI device 410, an inspection image of each area including a defect candidate.
[0109] In step S1202, the inference unit 811 of the determination device 810 extracts an area of the CAD data corresponding to the inspection image of each acquired area, and generates a mask.
[0110] In step S1203, the inference unit 811 of the determination device 810 generates a masked inspection image by superimposing the generated mask on the inspection region of the inspection image of each acquired region.
[0111] In step S1204, the inference unit 811 of the determination device 810 inputs the generated masked inspection image to the trained image reconstruction unit 1030 to reconstruct a reconstructed image.
[0112] In step S1205, the inference unit 811 of the determination device 810 generates a post-removal inspection image by removing the background region from the inspection image acquired in step S1201. Also, the inference unit 811 of the determination device 810 generates a post-removal reconstructed image by removing the background region from the reconstructed image reconstructed in step S1204.
[0113] In step S1206, the inference unit 811 of the determination device 810 compares the inspection image after the removal with the reconstructed image after the removal to determine whether or not the inspection image acquired in step S1201 includes a defect. The inference unit 811 of the determination device 810 outputs the determination result.
[0114] In step S1207, the inference unit 811 of the determination device 810 determines whether or not to end the determination process. If it is determined in step S1207 that the determination process is to be continued (NO in step S1207), the process returns to step S1201.
[0115] On the other hand, if it is determined in step S1207 that the determination process should be ended (YES in step S1207), the determination process is ended.
[0116] <Summary> As is clear from the above explanation, the inspection system 400 according to the first embodiment: generates a training dataset including normal images determined to contain no defects among inspection images of an object to be inspected, and masks that are superimposed on inspection areas of the normal images and that are colored according to the type of material contained in the corresponding area of the object to be inspected; generates a trained image reconstruction unit by learning to reconstruct a normal image included in the training dataset from a masked normal image in which a mask is superimposed on an inspection area of the normal image included in the training dataset.
[0117] Furthermore, the inspection system 800 according to the first embodiment: - Generates a masked inspection image by superimposing a mask, colored according to the type of material contained in the corresponding area of the object to be inspected, onto the inspection area of the inspection image obtained by photographing the object to be inspected. - Reconstructs a reconstructed image by inputting the masked inspection image into a trained image reconstruction unit. - Determines whether or not the inspection image obtained by photographing the object to be inspected contains a defect by comparing the inspection image obtained by removing the background area from the inspection image obtained by photographing the object to the reconstructed image obtained by removing the background area from the reconstructed image.
[0118] As a result, according to the first embodiment, even in cases where it is difficult to reconstruct a normal image, it is possible to reduce erroneous determinations in the inspection system.
[0119] [Second Embodiment] In the first embodiment, the details of the colors applied when generating the mask were not mentioned. However, the colors applied when generating the mask may be any colors as long as they are different for each type of material. For example, in the first embodiment, the image captured by the AOI device 410 is a monochrome image, and in the first embodiment, colors (white, black, gray) similar to the colors of the images captured by the AOI device 410 are applied to the mask. However, the colors applied when generating the mask do not need to be similar to the colors of the images captured by the AOI device 410, and any colors can be applied.
[0120] In the first embodiment, a mask colored according to the type of material is used to enable appropriate reconstruction of the boundary portions of the materials. However, instead of being colored according to the type of material, the mask may be, for example, a mask with a border line drawn around the boundary portions of the materials. However, a mask colored according to the type of material contains more information than a mask with a border line drawn around the boundary portions of the materials, and therefore, the boundary portions of the materials can be more appropriately reconstructed.
[0121] Furthermore, in the first embodiment, no detailed description is given of the extraction method for extracting CAD data of an area corresponding to the inspection image transmitted from the AOI device 410. However, when extracting the CAD data of the corresponding area, processing such as position correction or size correction may be performed on the CAD data in accordance with the inspection image. This is because the inspection image transmitted from the AOI device 410 may be shifted in position and size relative to the CAD data depending on the shooting conditions of the AOI device 410.
[0122] Furthermore, in the first embodiment, the position of the inspection area onto which the mask is superimposed is not mentioned, 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, the size of the mask to be superimposed is not mentioned, but it is assumed that the size of the mask 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 onto which the mask is superimposed, and it is possible to superimpose a mask at any position and size.
[0123] 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.
[0124] 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.
[0125] 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.
[0126] This application claims priority based on Japanese Patent Application No. 2023-054110, filed on March 29, 2023, the entire contents of which are incorporated herein by reference.
[0127] 400: Inspection system 410: AOI device 440: Learning device 441: Learning dataset generation unit 442: Learning unit 630: Learning dataset 710: Image input unit 720: Mask unit 730: Image reconstruction unit 740: Comparison / modification unit 810: Determination device 811: Inference unit 812: Output unit 1000: Input image dataset 1010: Image input unit 1020: Mask unit 1030: Learned image reconstruction unit 1040: Removal unit 1050: Determination unit
Claims
1. A judgment device having: a trained image reconstruction unit that has been trained to reconstruct a first image from a first mask image in which a mask is superimposed on an inspection area of a first image obtained by photographing an object to be inspected and which is determined to contain no defects, the mask being colored according to the type of material contained in the corresponding area of the object to be inspected; and a judgment unit that compares a second reconstructed image reconstructed by inputting a second mask image in which the mask corresponding to the inspection area of a second image obtained by photographing the object to the trained image reconstruction unit and which corresponds to the inspection area of the second image obtained by photographing the object to be inspected, with the second image, and judges whether the second image contains a defect or not.
2. The determination device of claim 1, further comprising a removal unit that generates a second image after removal in which an area containing a specific type of material has been removed from the second image, and a second reconstructed image after removal in which an area containing a specific type of material has been removed from the second reconstructed image, wherein the determination unit determines whether or not the second image contains a defect by comparing the second image after removal with the second reconstructed image after removal.
3. The determination device of claim 2, 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 after removal and the second reconstructed image after removal 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 after removal and the second reconstructed image after removal does not satisfy a predetermined condition.
4. The determination device described in claim 1, wherein the mask superimposed on the first image is CAD data in which an area corresponding to the inspection area of the first image is extracted from the CAD data of the object to be inspected, and the CAD data is colored by identifying the type of material contained in the corresponding area of the object to be inspected.
5. A determination device as described in claim 4, wherein when an area corresponding to the inspection area of the first image is extracted from the CAD data of the object to be inspected, the position and size of the CAD data of the object to be inspected are corrected according to the first image.
6. The determination device described in claim 1, wherein the mask superimposed on the second image is CAD data in which an area corresponding to the inspection area of the second image is extracted from the CAD data of the object to be inspected, and the CAD data is colored by identifying the type of material contained in the corresponding area of the object to be inspected.
7. A determination device as described in claim 6, wherein when an area corresponding to the inspection area of the second image is extracted from the CAD data of the object to be inspected, the position and size of the CAD data of the object to be inspected are corrected according to the second image.
8. A learning device comprising: a mask unit that generates a first mask image by superimposing a mask, which is superimposed on an inspection area of a first image, which is determined to contain no defects, among images of an object to be inspected, on the inspection area of the first image, the mask being colored according to the type of material contained in the corresponding area of the object to be inspected; and an image reconstruction unit that outputs a first reconstructed image when the first mask image is input, wherein the image reconstruction unit is trained to make the first reconstructed image closer to the first image.
9. A judgment method in which a computer of a judgment device storing a trained image reconstruction unit that has been trained to reconstruct a first image from a first mask image in which an inspection area of a first image taken of an object to be inspected is determined to contain no defects, the mask being colored according to the type of material contained in the corresponding area of the object to be inspected, the first image being superimposed on the inspection area of the first image, the computer executing a judgment process of comparing a second reconstructed image reconstructed by inputting a second mask image in which the mask corresponding to the inspection area of a second image taken of the object to be inspected and superimposed on the second mask image to the trained image reconstruction unit, with the second image, and determining whether or not the second image contains a defect.
10. A learning method in which a computer of a learning device executes a masking process in which a first mask image is generated by superimposing a mask on an inspection area of a first image, which is an image of an object to be inspected and which is determined to contain no defects, on the inspection area of the first image, the mask being colored according to the type of material contained in the corresponding area of the object to be inspected; and an image reconstructing process in which an image reconstructing unit outputs a first reconstructed image when the first mask image is input, wherein the image reconstructing process performs a learning process on the image reconstructing unit so that the first reconstructed image approaches the first image.
11. A judgment program for causing a computer of a judgment device storing a trained image reconstruction unit that has been trained to reconstruct a first image from a first mask image in which an inspection area of a first image taken of an object to be inspected is determined to contain no defects, the mask being colored according to the type of material contained in the corresponding area of the object to be inspected, the first image being superimposed on the inspection area of the first image, the trained image reconstruction unit being configured to execute a judgment process of comparing a second reconstructed image reconstructed by inputting a second mask image in which the mask corresponding to the inspection area of a second image taken of the object to be inspected and superimposed on the second image, with the second image, and determining whether or not the second image contains a defect.
12. 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, which is superimposed on an inspection area of a first image of an image of an object to be inspected that is determined to contain no defects, on the inspection area of the first image, the mask being colored according to the type of material contained in the corresponding area of the object to be inspected, and an image reconstructing process in which an image reconstructing unit outputs a first reconstructed image when the first mask image is input, wherein the image reconstructing process is a learning program that performs a learning process on the image reconstructing unit so that the first reconstructed image approaches the first image.
Citation Information
Patent Citations
Multivariate and multi-resolution retinal image anomaly detection system
JP2021151522A
Inspection system, inspection method and inspection program
JP2022114331A
Determination system, image generation apparatus, image generation method, and image generation program
JP2022142555A
Overhead wire fitting abnormality detection device
JP2022159010A
