# US 2019/0378263 A1 · Industrial image inspection method and system and computer readable recording medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2019/0378263 A1
- Document ID: US20190378263A1
- Status: Published application
- Kind: A1
- Application number: 16/217,904
- Filed: 2018-12-12
- Published: 2019-12-12
- Earliest claimed: 2018-06-08
- Assignees: Industrial Technology Research Institute
- Applicants: Industrial Technology Research Institute
- Inventors: Yu-Ting Lai; Jwu-Sheng Hu; Ya-Hui Tsai; Keng-Hao Chang
- Web page: https://patentgrep.com/patent/US20190378263A1

## CPC

- G06T 7/001: {using an image reference approach}
- G06F 18/2155: {characterised by the incorporation of unlabelled data, e.g. multiple instance learning [MIL], semi-supervised techniques using expectation-maximisation [EM] or naïve labelling}
- G06F 18/22: Matching criteria, e.g. proximity measures
- G06F 18/2413: based on distances to training or reference patterns
- G06T 7/0004: {Industrial image inspection}
- G06V 10/761: {Proximity, similarity or dissimilarity measures}
- G06V 10/764: using classification, e.g. of video objects
- G06V 10/7753: {Incorporation of unlabelled data, e.g. multiple instance learning [MIL]}
- G06V 10/82: using neural networks
- G06T 2207/20081: Training; Learning
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

An industrial image inspection method includes: generating a test latent vector of a test image; measuring a distance between a training latent vector of a normal image and the test latent vector of the test image; and judging whether the test image is normal or defected according to the distance between the training latent vector of the normal image and the test latent vector of the test image.

## Claims

### Claim 1

An industrial image inspection method, comprising:
generating a test latent vector of a test image;
measuring a distance between a training latent vector of a normal image and the test latent vector of the test image; and
judging whether the test image is normal or defected according to the distance between the training latent vector of the normal image and the test latent vector of the test image.

### Claim 2 (depends on 1)

The industrial image inspection method according to claim 1, wherein the step of generating the test latent vector of the test image comprises:
initializing the test latent vector of the test image;
inputting the test latent vector of the test image to a generator to make the generator generate a generated image;
determining a pixel value difference between the generated image and the test image;
calculating a loss function according to the pixel value difference between the generated image and the test image, and updating the test latent vector of the test image;
inputting the updated test latent vector of the test image to the generator to make the generator generate the generated image again if it is judged that the test latent vector of the test image is not optimum; and
recording the optimum test latent vector of the test image and a mean and a variance of the test latent vector if it is judged that the test latent vector of the test image is optimum.

### Claim 3 (depends on 2)

The industrial image inspection method according to claim 2, wherein when the test latent vector of the test image is initialized, the test latent vector of the test image is randomly generated using Gaussian distribution from a unit circle.

### Claim 4 (depends on 2)

The industrial image inspection method according to claim 2, wherein the step of measuring the distance between the training latent vector of the normal image and the test latent vector of the test image comprises: measuring the distance between the training latent vector of the normal image and the optimum test latent vector of the test image according to the mean and the variance of the test latent vector, and a mean and a variance of the training latent vector.

### Claim 5 (depends on 2)

The industrial image inspection method according to claim 2, wherein if the distance between the training latent vector of the normal image and the test latent vector of the test image is smaller than a threshold value, then the test image is judged as normal, or otherwise the test image is judged as defected.

### Claim 6 (depends on 1)

The industrial image inspection method according to claim 1, further comprising: in a training stage,
initializing the training latent vector of the normal image;
inputting the training latent vector of the normal image to a generator to make the generator generate a generated image;
inputting the normal image and the generated image to a discriminator;
comparing, by the discriminator, the normal image with the generated image, and determining whether the discriminator discriminates the normal image from the generated image or not;
calculating a loss function according to a labeling difference, and updating the generator, the discriminator and the training latent vector of the normal image;
recording a model and parameters of the generator, the training latent vector of the normal image, and a mean and a variance of the training latent vector if the generator generates an expected result; and
projecting the training latent vector back to a unit circle using norm constraint, and inputting the obtained training latent vector to the generator to continue training the generator if the generator fails to generate the expected result.

### Claim 7

An industrial image inspection system, comprising:
an automated optical inspection apparatus performing automated optical inspection on a plurality of samples; and
an image inspection module, coupled to the automated optical inspection apparatus and configured to:
generate a test latent vector of a test image outputted from the automated optical inspection apparatus;
measure a distance between a training latent vector of a normal image and the test latent vector of the test image; and
judge whether the test image is normal or defected according to the distance between the training latent vector of the normal image and the test latent vector of the test image.

### Claim 8 (depends on 7)

The industrial image inspection system according to claim 7, wherein the image inspection module is configured to:
initialize the test latent vector of the test image;
input the test latent vector of the test image to a generator of the image inspection module to make the generator generate a generated image;
determine a pixel value difference between the generated image and the test image;
calculate a loss function according to the pixel value difference between the generated image and the test image, and update the test latent vector of the test image;
input the updated test latent vector of the test image to the generator to make the generator generate the generated image again if it is judged that the test latent vector of the test image is not optimum; and
record the optimum test latent vector of the test image and a mean and a variance of the test latent vector if it is judged that the test latent vector of the test image is optimum.

### Claim 9 (depends on 8)

The industrial image inspection system according to claim 8, wherein when the test latent vector of the test image is initialized, the image inspection module randomly generates the test latent vector of the test image using Gaussian distribution from a unit circle.

### Claim 10 (depends on 8)

The industrial image inspection system according to claim 8, wherein the image inspection module measures the distance between the training latent vector of the normal image and the optimum test latent vector of the test image according to the mean and the variance of the test latent vector, and a mean and a variance of the training latent vector.

### Claim 11 (depends on 8)

The industrial image inspection system according to claim 8, wherein if the distance between the training latent vector of the normal image and the test latent vector of the test image is smaller than a threshold value, then the image inspection module judges the test image as normal, or otherwise the image inspection module judges the test image as defected.

### Claim 12 (depends on 7)

The industrial image inspection system according to claim 7, wherein the image inspection module is configured to, in a training stage:
initialize the training latent vector of the normal image;
input the training latent vector of the normal image to a generator of the image inspection module to make the generator generate a generated image;
input the normal image together with the generated image to a discriminator of the image inspection module;
compare, by the discriminator, the normal image with the generated image, and determine whether the discriminator discriminates the normal image from the generated image or not;
calculate a loss function according to a labeling difference, and update the generator, the discriminator and the training latent vector of the normal image;
record a model and parameters of the generator, the training latent vector of the normal image, and a mean and a variance of the training latent vector if the generator generates an expected result; and
project the training latent vector back to a unit circle using norm constraint, and input the obtained training latent vector to the generator to continue training the generator if the generator fails to generate the expected result.

### Claim 13 (depends on 1)

A computer readable recording medium capable of executing the industrial image inspection method according to claim 1 when being loaded and executed by an industrial image inspection system.
