Image inspection device, image inspection method, and trained model generation device

By inputting non-defective images with surrounding context into a trained model, the method ensures accurate feature vector plotting, improving defect detection in image inspection by preventing false negatives.

JP7533263B2Active Publication Date: 2024-08-14OMRON CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
JP2021020384
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-02-12
Publication Date
2024-08-14
Estimated Expiration
2041-02-12

AI Technical Summary

Technical Problem

Conventional image inspection methods fail to accurately distinguish between non-defective images with special patterns and defective images due to feature vectors being plotted far apart in the feature space, leading to overlooked defects.

Method used

The method involves inputting non-defective divided images and their surrounding images into a trained model to output feature amounts, ensuring feature vectors for non-defective images with special patterns are plotted closer to non-defective images, and using images with varying feature values based on position to accurately learn and identify patterns, preventing defective products from being missed.

Benefits of technology

This approach enhances inspection accuracy by plotting feature vectors of non-defective images with special patterns near non-defective sets, allowing for precise defect detection and preventing false negatives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007533263000003
    Figure 0007533263000003
  • Figure 0007533263000008
    Figure 0007533263000008
  • Figure 0007533263000012
    Figure 0007533263000012
Patent Text Reader

Abstract

To plot a feature vector of a non-defective article image including a special pattern close to a feature vector of a non-defective article image, and plot a feature vector of an inspection image of a defective article away from the feature vector of the non-defective article image.SOLUTION: An image inspection device (20) comprises: an extraction unit (260) that inputs inspection division images and an inspection surrounding-containing image to a learned model (55) having learned to output feature quantities with non-defective article division images and a non-defective article surrounding-containing image as input, and thereby extracts feature vectors with the feature quantities for the inspection division images as components; an acquisition unit (270) that, in a feature space, acquires a defect degree indicating the degree of defects of the inspection division images corresponding to the feature vectors based on a set formed by points indicated by the extracted feature vectors and a plurality of feature vectors (129) for the plurality of non-defective article division images; and an inspection unit (280) that inspects an inspection target (TA) based on the defect degree.SELECTED DRAWING: Figure 7
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to an image inspection device, an image inspection method, and a trained model generation device. [Background technology]

[0002] 2. Description of the Related Art Image inspection devices that inspect an object based on an image captured of the object are known.

[0003] For example, Patent Document 1 describes an anomaly determination device that performs anomaly determination based on inputted determination target image data, which has a process execution means that generates reconstructed image data from the feature amounts of the determination target image data using reconstruction parameters for reconstructing normal image data from feature amounts extracted from a normal image data group, and executes anomaly determination processing for performing anomaly determination based on difference information between the generated reconstructed image data and the determination target image data. When the determination target image data includes image data of multiple channels, the anomaly determination device of Patent Document 1 generates reconstructed image data for each channel from the feature amounts of the image data of each channel using reconstruction parameters, and performs anomaly determination based on difference information between each generated reconstructed image data and the image data of each channel of the determination target image data. [Prior art documents] [Patent documents]

[0004] [Patent Document 1] JP 2018-5773 A Summary of the Invention [Problem to be solved by the invention]

[0005] Here, in the past, there was a method in which a good-quality image of a good object was divided into smaller pieces and input, and a trained model was used that was trained to output the feature quantities of the good-quality image, and defects in the inspection image were detected based on the feature vector extracted from the inspection image and the feature vector of the good-quality image in feature space.

[0006] However, when a special pattern is present locally in a good product image, the feature vector of the good product image containing this special pattern will be plotted at a position in the feature space away from the feature vectors of other good product images, which may result in the object containing the special pattern being detected as a defective product.

[0007] Furthermore, if another good product image contains a pattern that is good in one location and defective in another location, the feature vector of the inspection image that contains such a pattern in the other location will be plotted near the feature vector of the good product image in feature space, which may result in the defective product being overlooked.

[0008] The present invention has been made in consideration of the above circumstances, and one of its objectives is to provide an image inspection device, an image inspection method, and a trained model generation device that are capable of plotting feature vectors of good product images that include special patterns close to the feature vectors of good product images, and plotting feature vectors of inspection images of defective products farther away. [Means for solving the problem]

[0009] An image inspection device according to one embodiment of the present disclosure includes an extraction unit that inputs an inspection split image, which is a split image of an inspection object of a good product, and an inspection surroundings-containing image based on an image surrounding the inspection split image, into a trained model that has been trained to output features using as input a good product split image, which is a split image of an inspection object of a good product, and an inspection surroundings-containing image based on an image surrounding the inspection split image, and extracts feature vectors whose components are the feature amounts for the inspection split image, an acquisition unit that acquires a defect degree indicating the degree of defect in the inspection split image corresponding to the feature vector based on a point indicated by the feature vector and a set formed by a plurality of feature vectors for a plurality of good product split images in a feature space represented by the extracted feature vector, and an inspection unit that inspects the inspection object based on the defect degree.

[0010] According to this aspect, the inspection divided image and the inspection surroundings-containing image are input to a trained model that has been trained to output features using the good divided image and the good surroundings-containing image as inputs, and a feature vector for the inspection divided image is extracted. As a result, compared to a case where the trained model is trained using only the good divided image and the points indicated by the feature vectors of the good divided image containing the special pattern are plotted at positions far from the points indicated by the feature vectors of the good divided images containing other patterns, the trained model is trained using the good surroundings-containing image, in which the feature amount changes greatly depending on the position, so that the distance between the points indicated by the feature vectors for the good divided images at the same position can be plotted close to each other, and the distance between the points indicated by the feature vectors for the good divided images at different positions can be plotted far from each other, so that the pattern specific to the good divided image can be accurately learned, and in the feature space, the points indicated by the feature vectors for the inspection divided image are plotted close to the set formed by the feature vectors for the corresponding good divided images. Therefore, in the feature space, a point indicated by a feature vector for an inspection split image including a special pattern can be plotted near a set formed by feature vectors for multiple good product split images corresponding to the inspection split image, and a defect degree with a small degree of defect can be obtained to determine that the product is good. In addition, the trained model can learn different judgment criteria according to the position and part in the good product image of the inspection target of a good product by using the image containing the good product surroundings, and in the feature space, the points indicated by the feature vector for each inspection split image are collected in different ranges and regions according to the position of the inspection split image in the inspection image. Therefore, in the feature space, a point indicated by a feature vector for an inspection split image at another position including a pattern that is good at one position but defective at another position can be plotted far away from the set formed by multiple feature vectors for multiple good product split images at the other position, and a defect degree with a large degree of defect can be obtained to suppress overlooking of defective products.Therefore, the degree of defect of the inspection split image is obtained based on the point indicated by the feature vector for the inspection split image in the feature space and a set formed by multiple feature vectors for multiple good product split images, and the inspection object is inspected based on this degree of defect, thereby improving the inspection accuracy of the inspection object.

[0011] In the above-described aspect, the inspection periphery-containing image may include an image obtained by reducing the image surrounding the inspection divided image.

[0012] According to this aspect, the inspection-periphery-containing image includes an image obtained by reducing the image surrounding the inspection divided image, which makes it possible to suppress the influence of the inspection-periphery-containing image from being large in the output of the feature amount by the trained model, and to extract the feature vector for the inspection divided image with high accuracy.

[0013] In the above-mentioned aspect, the acquisition unit may acquire the degree of defect of the inspection division image corresponding to the extracted feature vector based on the distance between the point indicated by the feature vector and a set in a feature space represented by the feature vector.

[0014] According to this aspect, the defect degree of the inspection divided image corresponding to the feature vector is obtained based on the distance between the point indicated by the feature vector and a set formed by the feature vectors of the plurality of non-defective divided images in the feature space, thereby making it possible to easily indicate the degree of defect of the inspection divided image.

[0015] In the above-mentioned aspect, the acquisition unit may acquire the degree of defect of the inspection split image corresponding to the extracted feature vector based on the distance between a point indicated by the feature vector and a point indicated by one of the multiple feature vectors of the multiple good product split images in a feature space represented by the extracted feature vector.

[0016] According to this embodiment, the defect degree of the inspection divided image corresponding to the feature vector is obtained based on the distance between the point indicated by the feature vector and one of the feature vectors of the non-defective divided images in the feature space, which makes it possible to easily indicate the degree of the defect of the inspection divided image.

[0017] In the above-described aspect, the degree of defect may be a value indicating the degree of defect in the inspection divided image.

[0018] According to this aspect, the degree of a defect in the inspection divided image can be quantitatively indicated.

[0019] In the above-mentioned aspect, the inspection section may generate a defect degree image based on a plurality of defect degrees, and inspect the inspection object based on the defect degree image.

[0020] According to this aspect, it is possible to easily determine whether the object to be inspected is a non-defective or defective product, and inspection with high inspection accuracy can be easily achieved.

[0021] In the above-described aspect, a division unit that divides the inspection image of the inspection object into a plurality of inspection divided images may be further provided.

[0022] According to this aspect, the inspection apparatus further includes a dividing section that divides the inspection image of the inspection object into a plurality of inspection divided images, whereby the inspection divided images can be easily obtained.

[0023] In the above-described aspect, an imaging unit for acquiring an inspection image of the inspection object may be further provided.

[0024] According to this aspect, the inspection apparatus further includes an imaging unit for acquiring an inspection image of the inspection object, which makes it possible to easily obtain the inspection image.

[0025] An image inspection method according to another aspect of the present disclosure includes the steps of inputting an inspection split image, which is a split image of an inspection object of a good product, and an inspection surroundings-containing image based on an image surrounding the inspection split image, into a trained model that has been trained to output features using as input a good product split image, which is a split image of an inspection object of a good product, and an inspection surroundings-containing image based on an image surrounding the inspection split image, and extracting feature vectors whose components are the feature amounts for the inspection split image; acquiring a defect degree indicating the degree of defect in the inspection split image corresponding to the feature vector, based on a point indicated by the feature vector and a set formed by a plurality of feature vectors for a plurality of good product split images, in a feature space represented by the extracted feature vector; and inspecting the inspection object based on the defect degree.

[0026] According to this aspect, the inspection divided image and the inspection surroundings-containing image are input to a trained model that has been trained to output features using the good divided image and the good surroundings-containing image as inputs, and a feature vector for the inspection divided image is extracted. As a result, compared to a case where the trained model is trained using only the good divided image and the points indicated by the feature vectors of the good divided image containing the special pattern are plotted at positions far from the points indicated by the feature vectors of the good divided images containing other patterns, the trained model is trained using the good surroundings-containing image, in which the feature amount changes greatly depending on the position, so that the distance between the points indicated by the feature vectors for the good divided images at the same position can be plotted close to each other, and the distance between the points indicated by the feature vectors for the good divided images at different positions can be plotted far from each other, so that the pattern specific to the good divided image can be accurately learned, and in the feature space, the points indicated by the feature vectors for the inspection divided image are plotted close to the set formed by the feature vectors for the corresponding good divided images. Therefore, in the feature space, a point indicated by a feature vector for an inspection split image including a special pattern can be plotted near a set formed by feature vectors for multiple good product split images corresponding to the inspection split image, and a defect degree with a small degree of defect can be obtained to determine that the product is good. In addition, the trained model can learn different judgment criteria according to the position and part in the good product image of the inspection target of a good product by using the image containing the good product surroundings, and in the feature space, the points indicated by the feature vector for each inspection split image are collected in different ranges and regions according to the position of the inspection split image in the inspection image. Therefore, in the feature space, a point indicated by a feature vector for an inspection split image at another position including a pattern that is good at one position but defective at another position can be plotted far away from the set formed by multiple feature vectors for multiple good product split images at the other position, and a defect degree with a large degree of defect can be obtained to suppress overlooking of defective products.Therefore, the degree of defect of the inspection split image is obtained based on the point indicated by the feature vector for the inspection split image in the feature space and a set formed by multiple feature vectors for multiple good product split images, and the inspection object is inspected based on this degree of defect, thereby improving the inspection accuracy of the inspection object.

[0027] A trained model generation device according to another aspect of the present disclosure includes a model generation unit that generates a trained model trained to output features using as input a good product divided image, which is a divided image of a good product inspection object, and a good product surroundings-containing image based on an image surrounding the good product divided image.

[0028] According to this aspect, a trained model is generated that is trained to output features using a good-product divided image and a good-product surroundings-containing image as inputs. As a result, compared to a case where a trained model is trained using only good-product divided images and a point indicated by a feature vector of a good-product divided image including a special pattern is plotted at a position far from a point indicated by a feature vector of a good-product divided image including other patterns, the trained model is trained using a good-product surroundings-containing image in which the feature amount changes greatly depending on the position, so that the distance between the points indicated by the feature vectors for good-product divided images at the same position can be plotted close to each other and the distance between the points indicated by the feature vectors for good-product divided images at different positions can be plotted far from each other. Therefore, a pattern specific to a good-product divided image can be accurately learned, and in the feature space, a point indicated by a feature vector for an inspection divided image including a special pattern can be plotted close to a set formed by the feature vectors for a plurality of good-product divided images corresponding to the inspection divided image. In addition, the trained model can learn different judgment criteria depending on the position and part in the good product image of the inspection target object of good product by the good product surroundings-containing image, and in the feature space, the points indicated by the feature vector for each inspection split image are collected in different ranges and regions depending on the position of the inspection split image in the inspection image. Therefore, in the feature space, a point indicated by the feature vector for the inspection split image at another position, which includes a pattern that is good at one position but defective at another position, can be plotted far away from the set formed by the multiple feature vectors for the multiple good product split images at the other positions. Effect of the Invention

[0029] According to the present invention, the feature vectors of the non-defective product images including special patterns can be plotted close to the feature vectors of the non-defective product images, and the feature vectors of the inspection images of defective products can be plotted farther away. [Brief description of the drawings]

[0030] [Figure 1] FIG. 1 is a configuration diagram illustrating a schematic configuration of an image inspection system according to an embodiment. [Diagram 2]FIG. 2 is a configuration diagram showing the physical configuration of a trained model generation device and an image inspection device in one embodiment. [Diagram 3] FIG. 3 is a configuration diagram showing a functional block configuration of a trained model generation device in one embodiment. [Figure 4] FIG. 4 is a conceptual diagram for explaining generation of a non-defective divided image and an image including non-defective surroundings by the learning image data set generation unit shown in FIG. [Diagram 5] FIG. 5 is a conceptual diagram for explaining a first example learning model used by the model generating unit shown in FIG. [Figure 6] FIG. 6 is a conceptual diagram for explaining a second example of a learning model used by the model generating unit shown in FIG. [Figure 7] FIG. 7 is a configuration diagram showing the configuration of functional blocks of an image inspection device in one embodiment. [Figure 8] FIG. 8 is a conceptual diagram for explaining an example of a method for acquiring the defect degree. [Figure 9] FIG. 9 is a conceptual diagram for explaining another example of a method for acquiring the defect degree. [Figure 10] FIG. 10 is a conceptual diagram for explaining the processes performed by the division unit, the learning image dataset generation unit, the extraction unit, and the acquisition unit shown in FIG. [Figure 11] FIG. 11 is a diagram showing an example of the inspection image. [Figure 12] FIG. 12 is a conceptual diagram for explaining the process performed by the inspection unit shown in FIG. [Figure 13] FIG. 13 is a diagram showing an example of a defect degree image. [Figure 14] FIG. 14 is a flowchart illustrating an example of a trained model generation process performed by a trained model generation device in one embodiment. [Figure 15] FIG. 15 is a flowchart for explaining an example of image inspection processing performed by an image inspection device in one embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0031] An embodiment of the present invention will be described below. In the following description of the drawings, the same or similar parts are denoted by the same or similar reference numerals. However, the drawings are schematic. Therefore, specific dimensions, etc. should be judged in light of the following description. In addition, it goes without saying that the drawings include parts with different dimensional relationships and ratios. Furthermore, the technical scope of the present invention should not be interpreted as being limited to the embodiment.

[0032] First, the configuration of an image inspection system according to an embodiment will be described with reference to Fig. 1. Fig. 1 is a configuration diagram illustrating a schematic configuration of an image inspection system 1 in an embodiment.

[0033] As shown in FIG. 1, the image inspection system 1 includes an image inspection device 20 and lighting IL. The image inspection device 20 is connected to a trained model generation device 10 via a communication network NW. The lighting IL irradiates light L onto an inspection object TA. The image inspection device 20 captures reflected light R and inspects the inspection object TA based on an image of the inspection object TA (hereinafter also referred to as an "inspection image"). The trained model generation device 10 generates a trained model used by the image inspection device 20 to perform inspection.

[0034] Next, the physical configuration of a trained model generation device and an image inspection device according to an embodiment will be described with reference to Fig. 2. Fig. 2 is a configuration diagram showing the physical configuration of a trained model generation device 10 and an image inspection device 20 in an embodiment.

[0035] 2, the trained model generation device 10 and the image inspection device 20 each include a processor 31, a memory 32, a storage device 33, a communication device 34, an input device 35, and an output device 36. These components are connected to each other via a bus so as to be able to transmit and receive data to and from each other.

[0036] In the example shown in Fig. 2, the trained model generation device 10 and the image inspection device 20 are each configured with one computer, but the present invention is not limited to this. The trained model generation device 10 and the image inspection device 20 may each be realized by combining multiple computers. The configuration shown in Fig. 2 is an example, and the trained model generation device 10 and the image inspection device 20 may each include other configurations, or may not include some of these configurations.

[0037] The processor 31 is configured to control the operation of each part of the trained model generating device 10 and the image inspection device 20. The processor 31 is configured to include integrated circuits such as a central processing unit (CPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a programmable logic device (PLD), a field programmable gate array (FPGA), and a system-on-a-chip (SoC).

[0038] The memory 32 and the storage device 33 are configured to store programs, data, etc. The memory 32 is configured, for example, of a Read Only Memory (ROM), an Erasable Programmable ROM (EPROM), an Electrically Erasable Programmable ROM (EEPROM), and / or a Random Access Memory (RAM), etc. The storage device 33 is configured, for example, of a storage such as a Hard Disk Drive (HDD), a Solid State Drive (SSD), and / or an embedded Multi Media Card (eMMC).

[0039] The communication device 34 is configured to perform communication via at least one of a wired and wireless network, and is configured to include, for example, a network card, a communication module, an interface for connecting to other devices, and the like.

[0040] The input device 35 is configured to allow a user to input information through an operation by the user. The input device 35 includes, for example, a keyboard, a touch panel, a mouse, a pointing device, and / or a microphone.

[0041] The output device 36 is configured to output information. The output device 36 includes a display device such as a liquid crystal display, an EL (Electro Luminescence) display, a plasma display, or an LCD (Liquid Crystal Display), and / or a speaker.

[0042] Next, functional blocks of a trained model generating device according to an embodiment will be described with reference to Figs. 3 to 6. Fig. 3 is a configuration diagram showing the configuration of functional blocks of a trained model generating device 10 in an embodiment. Fig. 4 is a conceptual diagram for explaining generation of a good-product divided image and a good-product surroundings-containing image by the training image data set generating unit 131 shown in Fig. 3. Fig. 5 is a conceptual diagram for explaining a first example of a learning model 51 used by the model generating unit 135 shown in Fig. 3. Fig. 6 is a conceptual diagram for explaining a second example of a learning model 52 used by the model generating unit 135 shown in Fig. 3.

[0043] As shown in FIG. 3, the trained model generation device 10 includes a communication unit 110, a storage unit 120, and a learning unit 130.

[0044] The communication unit 110 is configured to be able to transmit and receive various information. For example, the communication unit 110 transmits a trained model 55 (described later) to the image inspection device 20 via the communication network NW. The communication unit 110 also receives non-defective images from other devices via the communication network NW. That is, the communication unit 110 acquires non-defective images that are images of the inspection object TA that has been determined to be non-defective. The multiple non-defective images acquired by the communication unit 110 (hereinafter, when there is no need to distinguish between them, one of them is also referred to as a "non-defective image 40") are written and stored in the storage unit 120.

[0045] The storage unit 120 is configured to store various types of information. For example, the storage unit 120 stores a non-defective product image 40, a plurality of learning image data sets (hereinafter, when there is no distinction between them, one of them is also referred to as a "learning image data set 124"), a trained model 55, and a plurality of feature vectors (hereinafter, when there is no distinction between them, one of them is also referred to as a "feature vector 129").

[0046] The learning unit 130 is for learning a learning model to generate a trained model. The learning unit 130 includes, for example, a learning image dataset generation unit 131 and a model generation unit 135.

[0047] The training image dataset generation unit 131 is configured to generate the training image dataset 124. The training image dataset 124 is a set of image data used to generate the trained model 55.

[0048] More specifically, the learning image dataset generation unit 131 reads out a plurality of good-quality images 40 stored in the memory unit 120, and generates, for each of the good-quality images 40, images (hereinafter referred to as "good-quality divided images") by dividing the good-quality images 40 into a plurality of parts.

[0049] 4, the learning image dataset generation unit 131 generates a total of 25 good product divided images by dividing one good product image 40 into, for example, five in each of the vertical and horizontal directions. Note that the good product image 40 may be divided into 2 to 24 good product divided images, or may be divided into 26 or more good product divided images. In addition, the shape of the good product divided images is not limited to a rectangle, and may be any shape.

[0050] Further, the learning image data set generating unit 131 generates a good product surroundings-containing image for a good product divided image based on images arranged around the good product divided image. For example, the learning image data set generating unit 131 generates a good product surroundings-containing image for each of the nine good product divided images, excluding the 16 good product divided images arranged on the edge, out of the 25 good product divided images included in the good product image 40. Note that the good product surroundings-containing image may be generated by generating pixel values ​​of the area protruding from the inspection image for each of the 16 good product divided images arranged on the edge. In this case, the pixel values ​​of the protruding area may be generated using a specific value determined by the user, or may be generated by copying the pixel values ​​of the image edge closest to the good product divided image.

[0051] Then, the learning image data set generation unit 131 generates a learning image data set 124 configured to include the non-defective divided images and the non-defective surroundings-containing images of the non-defective divided images.

[0052] For example, the learning image data set generating unit 131 generates a first good product surroundings-containing image 404 including the surrounding good product divided images for the first good product divided image 400 located second from the left and second from the top in the good product image 40. The first good product divided image 400 and the first good product surroundings-containing image 404 constitute one learning image data set 124. Similarly, the learning image data set generating unit 131 generates a second good product surroundings-containing image 406 for the second good product divided image 402 located third from the left and second from the top in the good product image 40, and generates a learning image data set 124 including the second good product divided image 402 and the second good product surroundings-containing image 406. In this way, a learning image data set 124 is generated for each of the nine good product divided images. The generated multiple learning image data sets 124 are written and stored in the storage unit 120.

[0053] In the example shown in FIG. 4, the first non-defective surroundings-containing image 404 includes eight non-defective divided images located around the first non-defective divided image 400 as non-defective surroundings images, but the non-defective surroundings-containing image is not limited to this example. The non-defective surroundings-containing image may not include, for example, some of the eight non-defective divided images around the first non-defective divided image 400. In addition, the non-defective surroundings-containing image is not limited to being composed of units of non-defective divided images, and may be composed of any units. In other words, the non-defective surroundings-containing image may be composed of units smaller than the non-defective divided images, or may be composed of units larger than the non-defective divided images.

[0054] In addition, when the resolution of the good product divided image and the resolution of the good product surroundings containing image are the same, if the number of pixels of the good product surroundings image is greater than the number of pixels of the good product divided image, the good product surroundings containing image will contribute more to the learning process than the good product divided image. Therefore, if the expressive ability of the learning model used is low, it may not be possible to obtain the feature amount of the good product divided image described later with sufficient accuracy.

[0055] For the above reasons, it is preferable that the contribution of the good product surroundings-containing image to the learning process is smaller than the contribution of the good product divided image to the learning process. Therefore, it is preferable that the image around the good product divided image included in the good product surroundings-containing image is reduced. More specifically, it is preferable that the image around the good product divided image is reduced so that the size of the reduced good product surroundings image, i.e., the number of pixels, is smaller than the size of the good product divided image, i.e., the number of pixels. This reduction is performed, for example, by the learning image data set generation unit 131. At this time, the learning image data set generation unit 131 may reduce only the image around the good product divided image, or may reduce the remaining image included in the good product surroundings-containing image, for example, the good product divided image, together with the image around the good product divided image.

[0056] The model generation unit 135 is configured to perform a learning process in which a learning model learns a plurality of learning image data sets 124, and generate a trained model 55. The trained model 55 is a model that receives a non-defective divided image and a non-defective surroundings-containing image as input, and outputs feature quantities.

[0057] As shown in FIG. 5, the learning model 51 used by the model generation unit 135 to generate the trained model 55 is, for example, an autoencoder, which is a type of neural network and also a method of unsupervised machine learning, and the autoencoder includes an input layer 511, an output layer 517, and an intermediate layer 515 arranged between the input layer 511 and the output layer 517.

[0058] The learning model 51 is not limited to using an autoencoder. For example, the learning model 51 may use PCA (Principal Component Analysis). The intermediate layer 515 is not limited to one layer, and may be two or more layers.

[0059] The input layer 511 and the output layer 517 each have two channels. Specifically, the input layer 511 has a first input channel 512 and a second input channel 513, and the output layer 517 has a first output channel 518 and a second output channel 519. The non-defective divided image and the corresponding non-defective surroundings-containing image are input to different channels. For example, the non-defective divided image is input to the first input channel 512, and the non-defective surroundings-containing image is input to the second input channel 513. The non-defective divided image and the non-defective surroundings-containing image input to the input layer 511 are reduced in image dimension in the intermediate layer 515, and the dimension is restored in the output layer 517 and output. Specifically, an output non-defective divided image corresponding to the non-defective divided image is output from the first output channel 518, and an output non-defective surroundings-containing image corresponding to the non-defective surroundings-containing image is output from the second output channel 519. The autoencoder learns weights (also called coefficients) so that the sum of the difference between the non-defective divided image and the output non-defective divided image (hereinafter also called "first difference") and the difference between the non-defective surroundings-containing image and the output non-defective surroundings-containing image (hereinafter also called "second difference") is minimized. More specifically, each node represented by a circle performs unique weighting on each edge represented by a line, and the weighted value is input to the node of the next layer. By learning the weights in this weighting, the sum of the first difference and the second difference is minimized. This learning makes it possible to output features from the intermediate layer 515.

[0060] Here, the feature is a variable that quantitatively represents the feature of the object to be found. The feature output from the intermediate layer 515 characterizes the image as a non-defective divided image, and specifically includes the arrangement of shading in the non-defective divided image, the brightness in the non-defective divided image, red alone, green alone, blue alone, or a histogram of red, green, and blue (RGB). In general, it is rare that a non-defective divided image can be recognized as a non-defective divided image using only one type of feature, and it is often possible to recognize a non-defective divided image as a non-defective divided image using multiple types of feature. As described above, by reducing the contribution of the non-defective surroundings-containing image to the learning process, in other words, by increasing the contribution of the non-defective divided image to the learning process, the trained model 55 outputs a feature for the non-defective divided image that takes the non-defective surroundings-containing image into consideration.

[0061] A feature vector is a vector representation of one or more features as components. The number of features represents the dimension of the feature vector. A space represented by feature vectors, in other words, a space spanned by feature vectors, is called a feature space, and a feature vector is represented as one point on the feature space. For example, when the output layer 505 is trained to output d features (d is a positive integer), the trained model 55 can extract a feature vector 129 of a d-dimensional vector from an input image, and the extracted feature vector 129 can be represented as one point in the feature space of the d-dimensional space.

[0062] 6, the learning model 52 used by the model generation unit 135 to generate the trained model 55 uses, for example, an autoencoder similar to the learning model 51 shown in FIG 5, and the autoencoder includes an input layer 521, an output layer 527, and an intermediate layer 525 arranged between the input layer 521 and the output layer 527. Note that the learning model 52 may use, for example, PCA, and the intermediate layer 525 may have two or more layers.

[0063] The input layer 521 and the output layer 527 each have one channel. The good-product divided image and the corresponding good-product surroundings-containing image are combined to generate a combined image. When the combined image is input to the input layer 521, the dimension of the combined image is reduced in the intermediate layer 525. Then, the dimension is returned in the output layer 527 to output an output combined image corresponding to the combined image. The autoencoder learns weights so that the difference between the combined image and the output combined image is minimized. More specifically, each node represented by a circle performs unique weighting on each edge represented by a line, and the weighted value is input to the node of the next layer. By learning the weights in this weighting, the difference between the combined image and the output combined image is minimized. This learning makes it possible to output features from the intermediate layer 525.

[0064] Furthermore, the model generation unit 135 extracts feature vectors 129 for each good-product divided image in the process of generating the trained model 55. The extracted feature vectors 129 are written and stored in the storage unit 120. For example, when j good-product images are each divided into 25 good-product divided images and a learning image data set 124 is generated for each of the k good-product divided images, the number of extracted and stored feature vectors 129 is, for example, j×k. Note that the dimensions d of the multiple feature vectors 129 may be the same or different from each other.

[0065] In this way, by generating a trained model 55 that is trained to output features using a good product split image and an image containing good product surroundings as input, as described in detail below, compared to a case in which the trained model 55 is trained using only good product split images and the points indicated by the feature vectors of a good product split image containing a special pattern are plotted at a position far from the points indicated by the feature vectors of good product split images containing other patterns, the trained model 55 also learns using images containing good product surroundings, in which the features change greatly depending on the position, making it possible to plot the distance between points indicated by feature vectors for good product split images at the same position close to each other and the distance between points indicated by feature vectors for good product split images at different positions farther away, so that patterns unique to good product split images can be accurately learned, and in feature space, the points indicated by the feature vectors for an inspection split image containing a special pattern can be plotted near the set formed by the feature vectors for multiple good product split images corresponding to the inspection split image. Furthermore, the trained model 55 can learn different judgment criteria according to the position and part in the good product image of the inspection target object TA by using the good product surroundings-containing image, and in the feature space, the points indicated by the feature vector for each inspection split image are collected in different ranges and regions according to the position of the inspection split image in the inspection image. Therefore, in the feature space, a point indicated by the feature vector for an inspection split image at another position, including a pattern that is good at one position but defective at another position, can be plotted far away from the set formed by multiple feature vectors for multiple good product split images at the other positions.

[0066] At least one of the learning image dataset generation unit 131 and the model generation unit 135 may be realized by the processor 31 executing a program stored in the storage device 33. When executing a program, the program may be stored in a storage medium. The storage medium storing the program may be a non-transitory computer readable medium. The non-transitory storage medium is not particularly limited, and may be, for example, a storage medium such as a USB memory or a CD-ROM (Compact Disc ROM).

[0067] Next, functional blocks of an image inspection device according to an embodiment will be described with reference to Figs. 7 to 13. Fig. 7 is a configuration diagram showing the configuration of functional blocks of an image inspection device 20 in an embodiment. Fig. 8 is a conceptual diagram for explaining an example of a method for acquiring a defect degree. Fig. 9 is a conceptual diagram for explaining another example of a method for acquiring a defect degree. Fig. 10 is a conceptual diagram for explaining processing by the division unit 240, the inspection image data set generation unit 250, the extraction unit 260, and the acquisition unit 270 shown in Fig. 7. Fig. 11 is a diagram showing an example of an inspection image 60. Fig. 12 is a conceptual diagram for explaining processing by the inspection unit 280 shown in Fig. 7. Fig. 13 is a diagram showing an example of a defect degree image 70.

[0068] As shown in FIG. 7, the image inspection device 20 includes a communication unit 210, a memory unit 220, an imaging unit 230, a division unit 240, an inspection image dataset generation unit 250, an extraction unit 260, an acquisition unit 270, and an inspection unit 280.

[0069] The communication unit 210 is configured to be able to transmit and receive various information. For example, the communication unit 210 receives the trained model 55 and the multiple feature vectors 129 from the trained model generation device 10 via the communication network NW. The received trained model 55 and the multiple feature vectors 129 are written and stored in the storage unit 220.

[0070] The storage unit 220 is configured to store various types of information. For example, the storage unit 220 stores the trained model 55 and a plurality of feature vectors 129. In this manner, by providing the storage unit 220 that stores a plurality of trained models 55, the trained model can be easily read out.

[0071] The imaging section 230 is for acquiring an inspection image of the inspection object TA. The imaging section 230 is configured to include an imaging device such as a camera. The imaging section 230 of this embodiment receives reflected light R from the inspection object TA and acquires the inspection image. The imaging section 230 then outputs the acquired inspection image to the division section 240. In this manner, by acquiring the inspection image of the inspection object TA, the inspection image can be easily obtained.

[0072] The division unit 240 is configured to divide the inspection image of the inspection object TA into a plurality of inspection split images. More specifically, the division unit 240 divides the inspection image by a method similar to that used to divide a non-defective image in the trained model generation device 10. Specifically, the division unit 240 divides the inspection image of the inspection object TA into five in the vertical direction and five in the horizontal direction, thereby generating 25 inspection split images. Then, the division unit 240 outputs the generated inspection split images to the inspection image dataset generation unit 250. In this manner, by dividing the inspection image of the inspection object TA into a plurality of inspection split images, the inspection split images can be easily obtained.

[0073] The inspection image data set generating unit 250 is configured to generate an inspection periphery-containing image for an inspection divided image based on images arranged around the inspection divided image. The inspection periphery-containing image is an image based on at least a part of the images around the inspection divided image. The inspection image data set generating unit 250 may generate the inspection periphery-containing image based on a pre-specified algorithm, or may generate the inspection periphery-containing image based on a user's operation.

[0074] Moreover, the inspection image data set generating unit 250 is configured to generate an inspection image data set including the inspection divided image and the generated inspection surroundings-containing image.

[0075] More specifically, the inspection image data set generating unit 250 generates an inspection periphery-containing image for each of the multiple inspection divided images to generate multiple inspection image data sets. In this embodiment, the inspection image data set generating unit 250 generates an inspection periphery-containing image for 9 inspection divided images excluding the edge inspection divided images among the 25 inspection divided images generated by the dividing unit 240. Here, as described above, when the good product surroundings-containing image is reduced during the learning process, it is preferable that the inspection image data set generating unit 250 reduces the image surrounding the inspection divided image in accordance with the reduction of the good product surroundings-containing image, and the inspection periphery-containing image includes this reduced image. The inspection image data set generating unit 250 outputs the generated inspection image data set to the extracting unit 260.

[0076] The extraction unit 260 is configured to input the inspection image data set to the trained model 55 and extract a feature vector having a feature amount for the inspection divided image included in the inspection image data set as a component. Specifically, the extraction unit 260 reads out the trained model 55 stored in the storage unit 220 and sequentially inputs each of the multiple inspection image data sets to the trained model 55. As described above, since the trained model 55 is trained to output the feature amount of the input image, the extraction unit 260 can obtain one or more feature amounts for the input inspection divided image from the trained model 55. This extracts a feature vector having one or more feature amounts as components. Then, the extraction unit 260 outputs the extracted multiple feature vectors to the acquisition unit 270. Note that the feature vector of the inspection divided image extracted by the extraction unit 260 is a d-dimensional vector, the same as the feature vector 129 for the non-defective divided image.

[0077] The acquiring unit 270 is configured to acquire, for each of the extracted feature vectors, a defect degree indicating the degree of defect of the inspection divided image corresponding to the feature vector, based on a point indicated by the feature vector in a feature space represented by the feature vector and a set formed by the feature vectors for the non-defective divided images. The defect degree may be, for example, a level, step, class, grade, layer, etc., which indicates the degree discretely, or a number, etc., which indicates the degree continuously.

[0078] Specifically, the acquiring unit 270 reads out a plurality of feature vectors 129 stored in the storage unit 220, and plots points indicated by each feature vector 129 in a feature space that is a d-dimensional space. As a result, for example, in a two-dimensional feature space, a set S1 indicated by a dashed line is formed by black dots indicated by each feature vector 129, as shown in Fig. 8. This set is formed according to, for example, a position in the non-defective product image 40. Note that the acquiring unit 270 may form the set S1 in the feature space in advance based on the plurality of feature vectors 129, and write and store information about the set S1 in the storage unit 220.

[0079] Next, the acquiring unit 270 plots in the feature space the point indicated by the feature vector for the inspection split image at the position corresponding to the set S1, among the multiple feature vectors input from the extracting unit 260. In Fig. 10, the feature vector for the inspection split image at the corresponding position is indicated by a white circle point P1. Then, the acquiring unit 270 acquires the defect degree of the inspection split image based on the point P1 indicated by the feature vector for this inspection split image and the set S1.

[0080] More specifically, the acquisition unit 270 is configured to acquire, for each of the extracted feature vectors, the degree of defect of the inspection split image corresponding to the feature vector based on the distance in feature space between the point indicated by the feature vector and a set formed by the feature vectors for the good product split images.

[0081] In the example shown in Fig. 8, in a feature space represented by a feature vector having the first feature amount and the second feature amount as components, the acquisition unit 270 acquires the degree of defect of an inspection split image based on the distance between a point P1 indicated by the feature vector for a certain inspection split image and a set S1 of a plurality of feature vectors for a plurality of good product split images corresponding to the inspection split image. This degree of defect is, for example, a value according to the distance. In this way, the degree of defect of the inspection split image corresponding to the feature vector is acquired based on the distance between the point P1 indicated by the feature vector and the set S1 formed by the plurality of feature vectors for a plurality of good product split images in the feature space, so that the degree of defect of the inspection split image can be easily indicated.

[0082] Alternatively, the acquisition section 270 may be configured to acquire the degree of defect of the inspection split image corresponding to each of the extracted feature vectors based on the distance in feature space between a point indicated by the feature vector and a point indicated by one of the feature vectors for the plurality of good product split images.

[0083] For example, as shown in FIG. 9, in a feature space expressed by a feature vector having the first feature amount and the second feature amount as components, the acquisition unit 270 acquires the defect degree of an inspection split image based on the distance between a point P2 indicated by the feature vector of a certain inspection split image and a point included in a set S2 of a plurality of feature vectors for a plurality of good product split images corresponding to the inspection split image. This defect degree is, for example, a value according to the distance. In addition, the point included in the set S2 is, for example, a point closest to the point P2 among the plurality of points included in the set S2. The acquisition unit 270 can calculate the distance between each of the plurality of points included in the set S2 and the point P2 and determine the point closest to the point P2. In this way, the defect degree of the inspection split image corresponding to the feature vector is acquired based on the distance in the feature space between the point P2 indicated by the feature vector and a point indicated by one of the plurality of feature vectors for the plurality of good product split images, so that the degree of defect of the inspection split image can be easily indicated.

[0084] The acquiring unit 270 repeatedly performs the above procedure for each of the feature vectors extracted by the extracting unit 260, and acquires the defect degree of each of the inspection divided images. Then, the acquiring unit 270 outputs the acquired defect degrees to the inspection unit 280.

[0085] 10, the inspection image 42 of the inspection object TA acquired by the imaging unit 230 is divided into five parts vertically and horizontally by the dividing unit 240 to generate 25 inspection divided images. For each of the nine inspection divided images excluding the edge inspection divided images among the 25 inspection divided images generated, the inspection image dataset generating unit 250 generates an inspection periphery-containing image. For example, a first inspection periphery-containing image 424 is generated for the first inspection divided image 420, and a second inspection periphery-containing image 426 is generated for the second inspection divided image 422. A pair of the inspection divided image and the inspection periphery-containing image becomes the inspection image dataset.

[0086] The extraction unit 260 inputs each of the nine inspection image data sets generated to the trained model. The feature amounts for each of the nine inspection divided images are output from the trained model, and the extraction unit 260 extracts nine feature vectors whose components are the feature amounts output for each of the nine inspection image data sets. For example, a first feature vector 440 is extracted based on the first inspection divided image 420 and the first inspection surroundings-containing image 424, and a second feature vector 442 is extracted based on the second inspection divided image 422 and the second inspection surroundings-containing image 426.

[0087] The acquiring unit 270 acquires the defect degree of the inspection divided image corresponding to each of the nine extracted feature vectors based on the point indicated by the feature vector and a set of multiple feature vectors for multiple good divided images. This allows the defect degree of each of the nine inspection divided images to be acquired. For example, the first defect degree 460 is acquired based on the first feature vector 440, and the second defect degree 462 is acquired based on the second feature vector 442.

[0088] 11, an inspection image 60 of an inspection target TA, which is known to be a non-defective product, is divided into, for example, six inspection divided images 600, 602, 604, 606, 608, and 610. Of these six inspection divided images, the inspection divided images 602, 606, and 608 contain similar patterns. Also, the inspection divided image 604 contains a special pattern different from the other inspection divided images.

[0089] Unlike the trained model 55 of the present embodiment, if a trained model is generated using these six inspection divided images without using a good product surroundings-containing image, the trained model may extract and output feature amounts of the patterns of the inspection divided images 602, 604, or 608, but depending on the expressive ability of the trained model, the feature amount of the special pattern included in the inspection divided image 604 may not be sufficiently extracted. In this case, in the feature space, the point indicated by the feature vector of the inspection divided image 604 including the special pattern may be plotted at a position away from the set formed by the feature vectors of the other inspection divided images 600, 602, 606, 608, and 610. As a result, the degree of defect of the inspection divided image 604 becomes large, and the inspection target TA, which is a good product, may be determined to be a defective product.

[0090] In contrast, the image inspection device 20 of this embodiment inputs the inspection split images 600, 602, 604, 606, 608, and 610 and the inspection surroundings-containing image into a trained model 55 that has been trained to output features using images containing the good product surroundings as input in addition to the good product split images, and extracts feature vectors for the inspection split images 600, 602, 604, 606, 608, and 610. As a result, compared to a case where only good-product divided images are used for learning and points indicated by feature vectors of good-product divided images including special patterns are plotted far from points indicated by feature vectors of good-product divided images including other patterns, the learned model 55 learns using images including good-product surroundings in which the feature amount changes greatly depending on the position, making it possible to plot points indicated by feature vectors for good-product divided images at the same position close to each other and points indicated by feature vectors for good-product divided images at different positions far from each other, so that patterns specific to good-product divided images can be accurately learned, and in the feature space, points indicated by feature vectors for each of the inspection divided images 600, 602, 604, 606, 608, and 610 are plotted near the sets formed by the feature vectors for the corresponding good-product divided images. Therefore, in the feature space, points indicated by the feature vector for the inspection divided image 604 including a special pattern can be plotted near the sets formed by the feature vectors for the multiple good-product divided images corresponding to the inspection divided image 604, and a defect degree with a small degree of defect can be obtained to determine the product as a good product.

[0091] In addition, when generating one trained model using an inspection split image including a pattern that is good at one position but defective at another position in an inspection image of another inspection target TA that is known to be a good product, the point indicated by the feature vector of the inspection split image including such a pattern may be plotted near the set formed by the feature vector of the other inspection split image in the feature space. Therefore, the degree of defect of the inspection split image including such a pattern at the other position becomes small, and the inspection target TA of the inspection image including the inspection split image that is actually defective is judged to be a good product, and the defective product may be overlooked.

[0092] Even in such a case, in the image inspection device 20 of this embodiment, the trained model 55 can learn different judgment criteria according to the position and part in the good product image of the inspection target object TA of a good product by the good product surroundings-containing image, and in the feature space, the points indicated by the feature vectors for each inspection divided image are collected in different ranges and regions according to the position of the inspection divided image in the inspection image. Therefore, in the feature space, the points indicated by the feature vectors for the inspection divided image at another position, including a pattern that is good at one position but defective at another position, can be plotted far away from the set formed by the multiple feature vectors for the multiple good product divided images at the other positions, and the degree of defect with a large degree of defect can be obtained to suppress overlooking defective products.

[0093] In addition, the inspection periphery-containing image in this embodiment includes an image obtained by reducing the image surrounding the inspection divided image. This makes it possible to suppress the influence of the inspection periphery-containing image from increasing in the output of the feature amount by the trained model 55, and to extract the feature vector for the inspection divided image with high accuracy.

[0094] Returning to the description of Fig. 7, the inspection unit 280 is configured to inspect the inspection object TA based on the defect degree. In this way, the defect degree of the inspection divided image is acquired based on the point indicated by the feature vector for the inspection divided image and the set formed by the multiple feature vectors for the multiple good product divided images in the feature space, and the inspection object TA is inspected based on this defect degree, thereby improving the inspection accuracy of the inspection object TA.

[0095] The above-mentioned degree of defect is preferably a value indicating the degree of defect in the divided inspection image, thereby making it possible to quantitatively indicate the degree of defect in the divided inspection image.

[0096] In this case, the inspection section 280 is configured to generate a defect degree image based on the multiple defect degrees acquired by the acquisition section 270, and to inspect the inspection object TA based on the defect degree image. This makes it easy to determine whether the inspection object is a good product or a defective product, and makes it easy to realize inspection with high inspection accuracy.

[0097] Specifically, as shown in FIG. 12, the inspection unit 280 generates a plurality of partial images 480, 482, 484, by imaging a plurality of defect degrees 460, 462, 464, acquired by the acquisition unit 270 based on their respective values. Each of the plurality of partial images 480, 482, 484, is, for example, a grayscale image in which the defect degree value is converted into black and white gradation, or a color image in which the defect degree value is converted into RGB gradation. The inspection unit 280 generates a defect degree image 48 by integrating the generated plurality of partial images 480, 482, 484,. The vertical and horizontal sizes (number of pixels) of the defect degree image 48 may be the same as or different from those of the inspection image 42. Then, the inspection unit 280 judges whether the inspection target TA is a non-defective product based on the defect degree image 48.

[0098] 13, the defect degree image 70 includes, for example, two defective portion images 700 and 702. The defective portion image 700 is a partial image having a relatively low degree of defect, and the defective portion image 702 is a partial image having a relatively high degree of defect.

[0099] The inspection section 280, for example, determines that the inspection object TA is a good product when the proportion of the defective portion images 700, 702 in the defect degree image 70 is below a predetermined threshold, and determines that the inspection object TA is not a good product, i.e., a defective product, when the proportion exceeds the predetermined threshold.

[0100] Alternatively, the inspection section 280 may detect defects in the inspection object TA based on the presence or absence of defective portion images 700, 702 included in the defect degree image .

[0101] At least one of the division unit 240, the inspection image data set generation unit 250, the extraction unit 260, the acquisition unit 270, and the inspection unit 280 may be realized by the processor 31 executing a program stored in the storage device 33. When executing a program, the program may be stored in a storage medium. The storage medium storing the program may be a computer-readable non-transitory storage medium. The non-transitory storage medium is not particularly limited, and may be, for example, a storage medium such as a USB memory or a CD-ROM.

[0102] Next, a processing procedure performed by the trained model generation device according to an embodiment will be described with reference to Fig. 14. Fig. 14 is a flowchart for explaining an example of a trained model generation process S100 performed by the trained model generation device 10 in an embodiment.

[0103] 14, first, the communication unit 110 acquires a plurality of non-defective product images 40 via the communication network NW (step S101). The acquired non-defective product images 40 are stored in the storage unit 120.

[0104] Next, the learning image data set generation unit 131 reads out a plurality of non-defective product images 40 from the storage unit 120, and generates a plurality of learning image data sets 124 based on the plurality of non-defective product images 40 (step S102). As described above, the learning image data set 124 includes non-defective product divided images and non-defective product surrounding oil-containing images.

[0105] Next, the model generation unit 135 generates a trained model 55 by training the trained model 55 to output features using the multiple training image data sets 124 generated in step S102 (step S103). The generated trained model 55 and multiple feature vectors 129 extracted during the generation process of the trained model 55 are stored in the storage unit 120.

[0106] Next, the communication unit 110 transmits the trained model 55 generated in step S103 and a plurality of feature vectors 129 extracted in the generation process to the image inspection device 20 via the communication network NW (step S104). This allows the image inspection device 20 to use the trained model generated by the trained model generation device 10.

[0107] After step S104, the trained model generation device 10 ends the trained model generation process S100.

[0108] Next, a processing procedure performed by an image inspection apparatus according to an embodiment will be described with reference to Fig. 15. Fig. 15 is a flowchart for explaining an example of an image inspection process S200 performed by an image inspection apparatus 20 in an embodiment.

[0109] In the following example, it is assumed that the communication unit 210 receives the trained model 55 and multiple feature vectors 129 from the trained model generation device 10, and that the trained model 55 and multiple feature vectors 129 are stored in the memory unit 220.

[0110] 15, first, the imaging unit 230 acquires an inspection image of the inspection object TA (step S201). The acquired inspection image is output to the division unit 240.

[0111] Next, the dividing unit 240 divides the inspection image acquired in step S201, and the inspection image data set generating unit 250 generates an inspection surroundings-containing image for each of the divided inspection divided images to generate a plurality of inspection image data sets (step S202). As described above, the inspection image data set includes the inspection divided image and the inspection surroundings-containing image. The generated plurality of inspection image data sets are output to the extracting unit 260.

[0112] Next, the extraction unit 260 reads out the trained model 55 stored in advance in the storage unit 220, inputs each of the multiple test image data sets generated in step S207 to the trained model 55, and extracts multiple feature vectors (step S203). The generated multiple feature vectors are output to the acquisition unit 270.

[0113] Next, the acquisition unit 270 reads out the multiple feature vectors 129 stored in advance in the storage unit 220, and acquires the defect degrees of the multiple inspection divided images for each of the multiple feature vectors extracted in step S207 based on the points indicated by the feature vectors in the feature space and the sets formed by the multiple feature vectors 129 for the corresponding multiple non-defective divided images (step S204). The acquired multiple defect degrees are output to the inspection unit 280.

[0114] Next, the inspection unit 280 generates a plurality of partial images from the respective values ​​of the plurality of defect degrees obtained in step S204, and integrates the generated partial images to generate a defect degree image (step S205).

[0115] Next, the inspection unit 280 inspects the inspection target TA based on the defect degree image generated in step S205 (step S206).

[0116] After step S206, the image inspection device 20 ends the image inspection process S200.

[0117] The sequence and flow charts described in this embodiment may be rearranged as long as no inconsistency occurs in the processing.

[0118] The exemplary embodiment of the present invention has been described above. According to the image inspection device 20 and the image inspection method of this embodiment, the inspection divided images 600, 602, 604, 606, 608, and 610 and the inspection surroundings-containing image are input to the trained model 55 that has been trained to output features using the non-defective divided image and the non-defective surroundings-containing image as input, and feature vectors for the inspection divided images 600, 602, 604, 606, 608, and 610 are extracted. As a result, compared to a case where only good-product divided images are used for learning and points indicated by feature vectors of good-product divided images including special patterns are plotted far from points indicated by feature vectors of good-product divided images including other patterns, the learned model 55 learns using images including good-product surroundings in which the feature amount changes greatly depending on the position, making it possible to plot points indicated by feature vectors for good-product divided images at the same position close to each other and points indicated by feature vectors for good-product divided images at different positions far from each other, so that patterns specific to good-product divided images can be accurately learned, and in the feature space, points indicated by feature vectors for each of the inspection divided images 600, 602, 604, 606, 608, and 610 are plotted near the sets formed by the feature vectors for the corresponding good-product divided images. Therefore, in the feature space, points indicated by the feature vector for the inspection divided image 604 including a special pattern can be plotted near the sets formed by the feature vectors for the multiple good-product divided images corresponding to the inspection divided image 604, and a defect degree with a small degree of defect can be obtained to determine the product as a good product. In addition, the trained model 55 can learn different judgment criteria depending on the position and part in the good product image of the good product inspection object TA by using the image containing the good product surroundings, and in the feature space, the points indicated by the feature vector for each inspection split image are collected in different ranges and regions depending on the position of the inspection split image in the inspection image.Therefore, in the feature space, a point indicated by a feature vector for an inspection divided image at another position, including a pattern that is good at one position but defective at another position, can be plotted far away from a set formed by a plurality of feature vectors for a plurality of good divided images at the other position, and a defect degree with a large degree of defect can be obtained to suppress overlooking of defective products. Therefore, the defect degree of the inspection divided image is obtained based on the point indicated by the feature vector for the inspection divided image and the set formed by the plurality of feature vectors for a plurality of good divided images in the feature space, and the inspection object TA is inspected based on this defect degree, thereby improving the inspection accuracy of the inspection object TA.

[0119] In addition, according to the trained model generating device 10 of this embodiment, a trained model 55 is generated that is trained to output features using a good product divided image and a good product surroundings-containing image as inputs. As a result, compared to a case where only good product divided images are used for training and a point indicated by a feature vector of a good product divided image including a special pattern is plotted at a position far from a point indicated by a feature vector of a good product divided image including other patterns, the trained model 55 is trained using images including good product surroundings in which the feature amount changes greatly depending on the position, so that it is possible to plot the distance between points indicated by feature vectors for good product divided images at the same position close to each other and the distance between points indicated by feature vectors for good product divided images at different positions far from each other, so that a pattern specific to a good product divided image can be accurately learned, and in the feature space, a point indicated by a feature vector for an inspection divided image including a special pattern can be plotted close to a set formed by feature vectors for a plurality of good product divided images corresponding to the inspection divided image. Furthermore, the trained model 55 can learn different judgment criteria according to the position and part in the good product image of the inspection target object TA by using the good product surroundings-containing image, and in the feature space, the points indicated by the feature vector for each inspection split image are collected in different ranges and regions according to the position of the inspection split image in the inspection image. Therefore, in the feature space, a point indicated by the feature vector for an inspection split image at another position, including a pattern that is good at one position but defective at another position, can be plotted far away from the set formed by multiple feature vectors for multiple good product split images at the other positions.

[0120] The above-described embodiments are intended to facilitate understanding of the present invention, and are not intended to limit the present invention. The present invention may be modified / improved without departing from the spirit thereof, and equivalents are also included in the present invention. In other words, even if a person skilled in the art appropriately modifies the design of the embodiments, the embodiment is included in the scope of the present invention as long as it has the characteristics of the present invention. For example, the elements of the embodiments and their arrangements, materials, conditions, shapes, sizes, etc. are not limited to those exemplified, and can be appropriately modified. In addition, the embodiments are merely examples, and it goes without saying that partial replacement or combination of the configurations shown in different embodiments is possible, and these are also included in the scope of the present invention as long as they include the characteristics of the present invention.

[0121] [Appendix 1] an extraction unit (260) that inputs an inspection divided image, which is a divided image of an inspection object (TA), and an inspection periphery-containing image, which is based on an image surrounding the inspection divided image, into a trained model (55) that has been trained to output features using as input a good-quality divided image, which is a divided image of an inspection object (TA) that is a good-quality, and a good-quality surroundings-containing image, which is based on an image surrounding the inspection divided image, and extracts feature vectors each having the feature amount for the inspection divided image as components; an acquisition unit (270) that acquires a defect degree indicating the degree of defect of the inspection divided image corresponding to the extracted feature vector based on a point indicated by the feature vector and a set formed by a plurality of feature vectors (129) for a plurality of non-defective divided images in a feature space represented by the extracted feature vector; and an inspection unit (280) that inspects the inspection target (TA) based on the degree of defect. Imaging inspection equipment (20). [Appendix 9] A trained model (55) is trained to output features using a non-defective divided image, which is a divided image of an inspection object (TA), and a non-defective surroundings-containing image, which is based on an image surrounding the inspection divided image, as inputs, and extracts feature vectors each having the feature for the inspection divided image as components; A step of acquiring a defect degree indicating the degree of defect of the inspection divided image corresponding to the extracted feature vector based on a point indicated by the feature vector and a set formed by a plurality of feature vectors (129) for a plurality of non-defective divided images in a feature space represented by the extracted feature vector; Inspecting the inspection object (TA) based on the defect degree, Imaging methods. [Appendix 10] A model generating unit (135) is provided which generates a trained model (55) trained to output features using a non-defective divided image, which is a divided image of a non-defective inspection target (TA), and a non-defective surroundings-containing image based on an image surrounding the non-defective divided image as input. A trained model generation device (10). [Explanation of symbols]

[0122] 1...image inspection system, 10...model generation device, 20...image inspection device, 31...processor, 32...memory, 33...storage device, 34...communication device, 35...input device, 36...output device, 40...good product image, 42...inspection image, 48...defect level image, 51...learning model, 52...learning model, 55...trained model, 60...inspection image, 70...defect level image, 110...communication unit, 120...storage unit, 124...learning image data sensor 129...feature vector, 130...learning unit, 131...learning image data set generation unit, 135...model generation unit, 210...communication unit, 220...storage unit, 230...imaging unit, 240...segmentation unit, 250...inspection image data set generation unit, 260...extraction unit, 270...acquisition unit, 280...inspection unit, 400...first non-defective divided image, 402...second non-defective divided image, 404...first non-defective surroundings-containing image, 406...second non-defective surroundings-containing image, 4 20...first inspection divided image, 422...second inspection divided image, 424...first inspection surroundings-containing image, 426...second inspection surroundings-containing image, 440...first feature vector, 442...second feature vector, 480...partial image, 482...partial image, 484...partial image, 511...input layer, 512...first input channel, 513...second input channel, 515...intermediate layer, 517...output layer, 518...first output channel, 519...second output channel, 521...input layer, 525...intermediate layer, 527...output layer, 600...inspection divided image, 602...inspection divided image, 604...inspection divided image, 606...inspection divided image, 608...inspection divided image, 700...defective portion image, 702...defective portion image, IL...illumination, L...light, NW...communication network, P1...point, P2...point, R...reflected light, S1...set, S2...set, S100...model generation processing, S200...image inspection processing, TA...inspection object.

Claims

1. an extraction unit that inputs an inspection split image, which is a split image of an inspection object, and an inspection periphery-containing image, which is based on an image surrounding the inspection split image, to a trained model that has been trained to output features using a non-defective split image, which is a split image of an inspection object of a non-defective item, and a non-defective surroundings-containing image, which is based on an image surrounding the inspection split image, and extracts feature vectors each having the feature amount for the inspection split image as components; an acquisition unit that acquires a defect degree indicating the degree of defect of the inspection divided image corresponding to the feature vector based on a point indicated by the extracted feature vector in a feature space represented by the feature vector and a set formed by a plurality of feature vectors for a plurality of the non-defective divided images; and an inspection unit that inspects the inspection object based on the defect degree. Image inspection equipment.

2. The inspection surroundings-containing image includes an image obtained by reducing an image surrounding the inspection divided image. The image inspection device according to claim 1 .

3. the acquiring unit acquires the defect degree of the inspection divided image corresponding to the extracted feature vector based on a distance between a point indicated by the feature vector and the set in a feature space represented by the extracted feature vector.

3. An image inspection device according to claim 1 or 2.

4. the acquiring unit acquires the defect degree of the inspection divided image corresponding to the extracted feature vector based on a distance between a point indicated by the feature vector and a point indicated by one of the plurality of feature vectors for the plurality of non-defective divided images in a feature space represented by the extracted feature vector; 3. An image inspection device according to claim 1 or 2.

5. The defect degree is a value indicating the degree of a defect in the inspection divided image.

5. An image inspection device according to claim 1.

6. the inspection unit generates a defect degree image based on the plurality of defect degrees, and inspects the inspection object based on the defect degree image.

6. An image inspection device according to claim 5.

7. A division unit that divides an inspection image of an inspection object into a plurality of the inspection divided images.

7. An image inspection device according to claim 1.

8. Further comprising an imaging unit for acquiring an inspection image of the inspection object. An image inspection device according to any one of claims 1 to 7.

9. a step of inputting an inspection split image, which is a split image of an inspection object, and an inspection periphery-containing image, which is based on an image surrounding the inspection split image, into a trained model that has been trained to output features using a good-item split image, which is a split image of an inspection object of a good item, and a good-item surroundings-containing image, which is based on an image surrounding the inspection split image, and extracting feature vectors each having the feature amounts for the inspection split image as components; a step of acquiring a defect degree indicating the degree of defect of the inspection divided image corresponding to the feature vector based on a point indicated by the extracted feature vector in a feature space represented by the feature vector and a set formed by a plurality of feature vectors for a plurality of the non-defective divided images; and inspecting the inspection object based on the defect degree. Imaging methods.

10. A model generating unit generates a trained model that is trained to output features using a non-defective divided image, which is a divided image of a non-defective inspection object, and a non-defective surroundings-containing image based on an image surrounding the non-defective divided image as input. Trained model generator.

Citation Information

Patent Citations

  • Abnormality determination device and abnormality determination method

    JP2018005773A

  • Determination device, determination method, and program

    JP2020052520A

  • JPP6664574B

  • JPP6818961B

  • Efficient defect localization / segmentation for surface defect inspection

    US20200160083A1