WO2021181749A1 - Learning device, image inspection device, learned parameter, learning method, and image inspection method - Google Patents

Learning device, image inspection device, learned parameter, learning method, and image inspection method Download PDF

Info

Publication number
WO2021181749A1
WO2021181749A1 PCT/JP2020/041655 JP2020041655W WO2021181749A1 WO 2021181749 A1 WO2021181749 A1 WO 2021181749A1 JP 2020041655 W JP2020041655 W JP 2020041655W WO 2021181749 A1 WO2021181749 A1 WO 2021181749A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
inspection
learning
unit
variance
Prior art date
Application number
PCT/JP2020/041655
Other languages
French (fr)
Japanese (ja)
Inventor
悟史 岡本
Original Assignee
株式会社Screenホールディングス
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 株式会社Screenホールディングス filed Critical 株式会社Screenホールディングス
Publication of WO2021181749A1 publication Critical patent/WO2021181749A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Definitions

  • the present invention relates to a technique for detecting an abnormality in an object.
  • an inspection process may be provided on the manufacturing line to perform inspections such as detection of defective products.
  • Product inspection is performed visually by humans (visual inspection), and there is a problem that human cost is high. Therefore, in order to automate a part or all of the inspection process, a system for automatically inspecting products by a machine is being developed.
  • a defect inspection method using a machine learning technique called a convolutional neural network has been proposed.
  • a general method using a convolutional neural network consists of a convolutional layer and a fully connected layer, and learns to classify non-defective products and defective products.
  • the convolutional layer the feature amount of the image is extracted, and in the fully connected layer in the final stage, it is learned to perform the identification using the feature amount.
  • the trained network outputs a judgment result indicating whether the product is non-defective or defective.
  • machine learning that learns by giving a correct label indicating whether it is a good product or a defective product is called supervised learning.
  • Patent Document 1 points out that a sufficient amount of good and defective products are required for learning, and proposes an inspection by unsupervised learning. Specifically, learning is performed so as to reconstruct the input image using a convolutional neural network called an autoencoder composed of a convolutional layer in the first half and a deconvolutional layer in the second half. Only non-defective images are used for learning.
  • the convolution layer compresses the input image into smaller data, and the deconvolution layer restores the original input image from the compressed data.
  • the convolutional layer in the first half can output the feature amount of the image.
  • the feature amount extracted using the learned convolution layer is input to a classifier such as an isolation forest, and the quality of the product is judged.
  • Patent Document 2 acquires a difference image between an image input to the autoencoder and an image output by the autoencoder in order to discriminate defects in industrial parts in which a part of the image is slightly different. By learning the autoencoder using only non-defective images, the image reconstructed by the autoencoder becomes an image without defects, so that the defective portion can be detected by taking the difference.
  • Non-Patent Document 1 describes an inspection technique using a Variational Auto-Encoder (VAE).
  • Variational Auto-Encoder is a kind of auto-encoder and enables more advanced learning by introducing a probabilistic model.
  • the output of the variational auto-encoder is modeled with a multivariate normal distribution, and the mean and variance of the normal distribution are estimated in consideration of the restoration error, instead of simply reconstructing each pixel. Learning is done like this. By considering not only the input / output difference but also how much error occurs during restoration, more accurate defect detection is possible.
  • Non-Patent Document 1 has a problem that the accuracy is greatly reduced when the brightness distribution of each pixel of a plurality of images used for learning does not follow a normal distribution. For example, if the luminance distribution has a shape that is extremely biased to the left and right, the difference between the actual luminance and the average value becomes large, so that over-detection may increase.
  • An object of the present invention is to provide a technique for suppressing over-detection when detecting an abnormality in an image.
  • the first aspect is a learning device for constructing an image inspection device, in which a plurality of object images are used as learning data so that an error between input and output is reduced and For each unit pixel, it is provided with a learning unit that learns a probability model so as to output the mean, variance, and higher-order statistics of the distribution approximated by a specific distribution.
  • the second aspect is the learning device of the first aspect, and the object image is a non-defective product image obtained by capturing a non-defective product.
  • the third aspect is the learning device of the first aspect or the second aspect, and the specific distribution is a normal distribution.
  • the fourth aspect is a learning device according to any one of the first to third aspects, and the probability model is a variational autoencoder.
  • the fifth aspect is the learning device of any one of the first to fourth aspects, and the higher-order statistics are skewness or kurtosis.
  • the sixth aspect is an image inspection device using a learning model trained by any one of the learning devices of the first to fifth aspects, and the inspection image to be inspected is obtained by the learning unit.
  • a statistic acquisition unit that inputs to the probabilistic model having the learned parameters and acquires the average, variance, and higher-order statistics for each unit pixel with respect to the inspection image, and an average acquired by the statistic acquisition unit. It includes an abnormality detection unit that detects an abnormality in the inspection image based on the variance and higher-order statistics.
  • a seventh aspect is the image inspection device of the sixth aspect, in which the abnormality detection unit detects a unit pixel of the inspection image in which the higher-order statistics acquired by the statistic acquisition unit exceeds a predetermined threshold value. Exclude and detect anomalies.
  • the eighth aspect is a learned parameter of the probability model acquired by the learning device of any one of the first to fifth aspects.
  • the ninth aspect is a learning method for constructing an image inspection method, in which a plurality of object images are used as training data so that an error between input and output is reduced, and a specific object is specified for each unit pixel. It involves training a probabilistic model to output the mean, variance, and higher-order statistics of the distribution approximated by the distribution.
  • the tenth aspect is an image inspection apparatus, in which a plurality of object images are used as training data, and the distribution is approximated by a specific distribution for each unit pixel so that the error between input and output is reduced.
  • Statistic acquisition to obtain mean, variance, and higher-order statistics for each unit pixel of an inspection image using a probabilistic model with trained parameters trained to output mean, variance, and higher-order statistics.
  • a unit and an abnormality detection unit that detects an abnormality in the inspection image based on the average, dispersion, and higher-order statistics for each unit pixel of the inspection image obtained by the statistic acquisition unit.
  • the eleventh aspect is the image inspection device of the tenth aspect, and the abnormality detection unit detects a unit pixel of the inspection image in which the higher-order statistics acquired by the statistic acquisition unit exceeds a predetermined threshold value. Exclude and detect anomalies.
  • the twelfth aspect is an image inspection method, in which a plurality of object images are used as training data, and the distribution is approximated by a specific distribution for each unit pixel so that the error between input and output is reduced.
  • Statistic acquisition to obtain mean, variance, and higher-order statistics for each unit pixel of an inspection image using a probabilistic model with trained parameters trained to output mean, variance, and higher-order statistics.
  • the step includes an abnormality detection step of detecting an abnormality in the inspection image based on the average, dispersion, and higher-order statistics of the inspection image for each unit pixel obtained by the statistic generation step.
  • unit pixels that do not follow a specific distribution can be specified based on higher-order statistics estimated using a probability model, overdetection can be suppressed.
  • FIG. 1 is a diagram showing an image inspection device 10 of an embodiment.
  • the image inspection device 10 detects defects (abnormalities) in the object 90 by analyzing the image of the object 90.
  • the object 90 is specifically a tablet, but is not limited to a tablet.
  • the image inspection device 10 includes a camera 110 and an information processing device 120.
  • the camera 110 is electrically connected to the information processing device 120.
  • the camera 110 includes an image sensor.
  • the camera 110 outputs an image signal obtained by imaging the object 90 using the image sensor to the information processing device 120.
  • the object 90 imaged by the camera 110 may be stopped at a predetermined position, or may be moved in a predetermined direction by a transport mechanism such as a belt conveyor.
  • FIG. 2 is a diagram showing a hardware configuration of the information processing device 120 of the embodiment.
  • the information processing device 120 has a configuration as a computer.
  • the information processing device 120 includes a processor 121, a RAM 123, a storage unit 125, an input unit 127, a display unit 129, an apparatus I / F 131, and a communication I / F 133.
  • the processor 121, the RAM 123, the storage unit 125, the input unit 127, the display unit 129, the device I / F 131, and the communication I / F 133 are electrically connected to each other via the bus 135.
  • the processor 121 includes a CPU or a GPU.
  • the RAM 123 is a storage medium capable of reading and writing information, and specifically, an SDRAM.
  • the storage unit 125 is a recording medium capable of reading and writing information, and specifically includes an HDD (hard disk drive) or an SSD (solid state drive).
  • the storage unit 125 may include a ROM, a portable optical disk, a magnetic disk, a semiconductor memory, or the like.
  • the storage unit 125 stores the program P.
  • the processor 121 realizes various functions by executing the program P with the RAM 123 as a work area.
  • the program P may be provided or distributed to the information processing apparatus 120 via the network.
  • the input unit 127 is an input device that accepts user's operation input, specifically, a mouse, a keyboard, or the like.
  • the display unit 129 is a display device that displays images representing various types of information, and is specifically a liquid crystal display.
  • the device I / F 131 is an interface for electrically connecting the camera 110 to the information processing device 120.
  • the communication I / F 133 is an interface for connecting the information processing device 120 to a network such as the Internet.
  • the camera 110 may be connected to the information processing device 120 via the communication I / F 133. That is, the image inspection device 10 is not essential to include the camera 110, and may include only the information processing device 120.
  • FIG. 3 is a diagram showing a functional configuration included in the information processing device 120 of the embodiment.
  • the information processing device 120 includes an acquisition unit 141, a learning unit 143, and an inspection unit 145.
  • the acquisition unit 141, the learning unit 143, and the inspection unit 145 are functions realized by operating the processor 121 according to the program P.
  • the learning unit 143 is not essential to be provided in the information processing device 120, and may be provided in another computer.
  • the acquisition unit 141 acquires the object image 91 obtained by capturing the object 90 with the camera 110.
  • the image to be inspected is referred to as an inspection image.
  • the learning unit 143 performs learning using the variational autoencoder 20, which is a probability model described later.
  • the inspection unit 145 inputs the inspection image to the variational autoencoder 20 and detects an abnormality in the inspection image based on the output result.
  • FIG. 4 is a diagram conceptually showing the variational autoencoder 20.
  • An autoencoder is a neural network technology, also called a self-encoder.
  • VAE Variational Auto Encoder
  • GAN Generative Adversarial Network
  • the variational autoencoder 20 is a function composed of a neural network.
  • the data x (object image 91) is input to the convolutional layer 21 and converted into a dimensionally reduced latent variable z.
  • the latent variable z is input to the first deconvolution layer 231 and the reconstruction data x'is output.
  • the convolution layer 21 is also referred to as an encoder
  • the first deconvolution layer 231 is also referred to as a decoder.
  • the encoder and the decoder are trained so that the reconstructed data x'is close to the data x.
  • the data x and the latent variable z are treated as random variables. That is, the encoder (convolution layer 21) and the decoder (first deconvolution layer 231) are not deterministic and are stochastic transformations that include sampling from the probability distributions p (z
  • ⁇ (x) and ⁇ (z) are projection functions that output each of the parameters ⁇ and ⁇ of the probability distribution with respect to the inputs (x and z).
  • z) are approximated by a normal distribution.
  • the output of the decoder becomes the parameters of the probability distribution approximated with the normal distribution (mean ⁇ x and variance ⁇ x 2 ). That is, when the object image 91 is input to the variational autoencoder 20 as the data x, the first deconvolution layer 231 outputs the average ⁇ x and the variance ⁇ x 2 for each pixel of the object image 91.
  • the average ⁇ x output by the first deconvolution layer 231 represents an image obtained by reconstructing the object image 91 input to the variational autoencoder 20. Further, the variance ⁇ x 2 output by the first deconvolution layer 231 represents the variation at the time of reconstruction.
  • z) are approximated by a normal distribution, and may be approximated by a distribution other than the normal distribution such as the Bernoulli distribution or the multinomial distribution.
  • the variational autoencoder 20 has a second deconvolution layer 233.
  • the second deconvolution layer 233 is connected to the output side of the convolution layer 21.
  • the second deconvolution layer 233 outputs high-order statistics for each pixel of the object image 91 input to the convolution layer 21 from the latent variable z output by the convolution layer 21.
  • the higher-order statistic output by the second deconvolution layer 233 is skewness.
  • the skewness is a statistic that indicates the degree of skewness of the distribution. If the distribution is not biased, it becomes 0, and if it is biased to the left or right, the value goes up or down.
  • the skewness output by the second deconvolution layer 233 is a value indicating how much the mean ⁇ x and the variance ⁇ x 2 output by the first deconvolution layer 231 are distorted with respect to the normal distribution.
  • the average and the variance are output from the first deconvolution layer 231 and the skewness is output from the second deconvolution layer 233.
  • the mean, variance, and skewness may be output from a common deconvolution layer.
  • the learning unit 143 performs learning using the variational autoencoder 20.
  • As the learning data as the plurality of object images 91, a non-defective image obtained by imaging a non-defective object 90 is used.
  • the learning unit 143 learns to update the internal parameters so as to minimize the error (reconstruction error) between the input and the output in the variational autoencoder 20.
  • An error function L (x) is defined for this learning.
  • the learning unit 143 inputs each good product image to the variational autoencoder 20, and learns to reconstruct each input good product image by using the probabilistic re-descent method, so that the convolution layer 21, the first The internal parameters of the deconvolution layer 231 and the second deconvolution layer 233 are updated.
  • the following equation is the error function L (x) used during learning.
  • error function L (x) i and j indicate the element numbers of the non-defective images of the training data.
  • the mean ⁇ xi and variance ⁇ xi 2 of the normal distribution are learned by using the log-likelihood of the normal distribution as an error function.
  • SVAE is designed to approximately optimize the skewness of the mean and variance of the normal distribution with a squared error. As a result, the output of the second reverse convolution 233 is brought closer to the skewness.
  • the i-th input image x i and is a parameter of the normal distribution estimated is determined from the average mu xi and standard deviation ⁇ xi (x i - ⁇ xi) 3 / ⁇ xi 3, the network output The error of skewness is minimized. This means that only the error of one non-defective image with respect to the distribution is calculated, but the approximation is stochastically performed by repeatedly updating the internal parameters using a huge number of non-defective images.
  • the learning unit 143 completes the learning using the variational autoencoder 20, the learning unit 143 stores the learned internal parameters (learned parameters) in the storage unit 125.
  • the inspection unit 145 includes a statistic acquisition unit 31, an abnormality degree acquisition unit 33, a correction unit 35, and an abnormality detection unit 37.
  • the contents of the process executed by the inspection unit 145 will be described in detail below.
  • FIG. 5 is a diagram conceptually showing the flow of inspection by the inspection unit 145.
  • FIG. 5 shows a case where the inspection image 93 to be inspected has a defective portion NG1.
  • the statistic acquisition unit 31 of the inspection unit 145 inputs the inspection image 93 to the variational autoencoder 20 having the learned internal parameters. Then, the variable auto encoder 20 has an average image 931 representing the average of the normal distribution, a dispersion image 933 showing the variance of the normal distribution, and a skewness image 935 showing the skewness of the normal distribution for each pixel of the inspection image 93. And output.
  • the abnormality degree acquisition unit 33 of the inspection unit 145 calculates the abnormality degree for each pixel of the inspection image 93 based on the inspection image 93 and the average image 931 and the dispersion image 933 acquired by the statistic acquisition unit 31.
  • the degree of anomaly may be, for example, the Mahalanobis distance.
  • the Mahalanobis distance is determined by, for example, (x k ⁇ ⁇ k ) 2 / ⁇ k 2 (where k represents the element number of each pixel).
  • the defect portion NG1 included in the inspection image 93 is detected in the abnormality degree image 937 as a high-luminance portion indicating that the abnormality degree is large.
  • the abnormality degree image 937 a portion having a large abnormality degree is detected in addition to the defect portion NG1.
  • the shining portion of the object 90 in the inspection image 93 is detected with a large degree of abnormality. Therefore, when the abnormality determination is made based on the abnormality degree image 937, there is a possibility that over-detection in which the abnormality is determined other than the defect portion NG1 may occur.
  • the anomaly degree image 937 is obtained on the assumption that the brightness distribution of each pixel follows a normal distribution. Therefore, for pixels whose estimated luminance distribution does not follow the normal distribution, the degree of abnormality tends to be high, which may cause over-detection. Therefore, the correction unit 35 of the inspection unit 145 corrects the abnormality degree image 937 in order to suppress over-detection. Specifically, the correction unit 35 performs a process of removing from the anomaly image 937 the pixels whose skewness exceeds a predetermined threshold value among the skewness images 935 as pixels that do not follow the normal distribution. That is, the correction unit 35 generates the correction image 939 based on the abnormality degree image 937 and the skewness degree image 935. As shown in FIG. 5, the shining portion in the inspection image 93 has a relatively large skewness in the skewness image 935. Therefore, in the corrected image 939, the degree of abnormality of the shining portion is removed.
  • the abnormality detection unit 37 of the inspection unit 145 determines whether or not each pixel of the inspection image 93 is abnormal based on the degree of abnormality of the corrected image 939. Specifically, the abnormality detection unit 37 determines in the corrected image 939 that a pixel whose degree of abnormality exceeds a predetermined threshold value is abnormal. The abnormality detection unit 37 may display the determination result on the display unit 129. The abnormality detection unit 37 may display information indicating the coordinates of the pixel determined to be abnormal or the degree of abnormality on the display unit 129.
  • the variational autoencoder 20 by training the variational autoencoder 20 so as to output the skewness which is a high-order statistic, the pixels whose luminance distribution does not follow the normal distribution are based on the skewness. Can be identified. Therefore, by correcting the abnormality degree image based on the skewness, over-detection of the abnormality in the inspection image 93 can be suppressed.
  • skewness is adopted as a higher-order statistic, but kurtosis or a higher-order statistic may be adopted.
  • the following equation may be adopted as the SVAE of the error function L (x) that trains the variational autoencoder 20 so as to output the kurtosis.
  • Image inspection device 100 Image inspection device 120 Information processing device (learning device) 125 Storage unit 143 Learning unit 145 Variational auto-encoder 31 Statistics acquisition unit 33 Abnormality acquisition unit 35 Correction unit 37 Abnormality detection unit 90 Object 91 Object image 93 Inspection image 931 Average image 933 Distributed image 935 Skewness Image 937 Anomaly image 939 Corrected image

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Analytical Chemistry (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Chemical & Material Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

An image inspection device (100) is provided with a learning unit (143), a statistic acquisition unit (31), and an abnormality detection unit (37). The learning unit (143), taking a plurality of target object images as learning data, learns a variational autoencoder so as to reduce an input/output error and so as to output a mean, variance, and a higher-order statistic of a distribution approximated with a specific distribution for respective unit pixels. The statistic acquisition unit (31) inputs an inspection image to be inspected to the variational autoencoder and acquires a mean, variance, and skewness of each of the pixels of the inspection image. The abnormality detection unit (37) detects an abnormality in the inspection image on the basis of the mean, variance, and higher-order statistic for each of the unit pixels of the inspection image obtained by the statistic acquisition unit (31).

Description

学習装置、画像検査装置、学習済みパラメータ、学習方法、および画像検査方法Learning device, image inspection device, learned parameters, learning method, and image inspection method
 この発明は、対象物の異常を検出する技術に関する。 The present invention relates to a technique for detecting an abnormality in an object.
 食品、医薬品または工業製品等の製造工程においては、製造ラインに検査工程を設けて、不良品の検出等の検査が行われる場合がある。製品の検査は、人間が目視で行っており(目視検査)、人的コストが高いという問題があった。このため、検査工程の一部または全部を自動化するべく、機械によって自動的に製品を検査するシステムの開発が進められている。 In the manufacturing process of foods, pharmaceuticals, industrial products, etc., an inspection process may be provided on the manufacturing line to perform inspections such as detection of defective products. Product inspection is performed visually by humans (visual inspection), and there is a problem that human cost is high. Therefore, in order to automate a part or all of the inspection process, a system for automatically inspecting products by a machine is being developed.
 近年では、畳み込みニューラルネットワークと呼ばれる機械学習技術を用いた欠陥検査手法が提案されている。畳み込みニューラルネットワークを用いた一般的な手法は、ネットワークを畳み込み層および全結合層で構成し、良品と不良品とを分類するように学習を行う。このとき、畳み込み層では、画像の特徴量を抽出し、最終段の全結合層では、特徴量を用いた識別を行うように学習される。学習済みのネットワークは、検査したいサンプルの画像が入力されると、良品か不良品かを示す判定結果を出力する。このように、良品か不良品かを示す正解ラベルを与えて学習する機械学習は、教師あり学習と呼ばれる。 In recent years, a defect inspection method using a machine learning technique called a convolutional neural network has been proposed. A general method using a convolutional neural network consists of a convolutional layer and a fully connected layer, and learns to classify non-defective products and defective products. At this time, in the convolutional layer, the feature amount of the image is extracted, and in the fully connected layer in the final stage, it is learned to perform the identification using the feature amount. When the image of the sample to be inspected is input, the trained network outputs a judgment result indicating whether the product is non-defective or defective. In this way, machine learning that learns by giving a correct label indicating whether it is a good product or a defective product is called supervised learning.
 特許文献1は、学習に充分な量の良品と不良品が必要であることを指摘し、教師なし学習での検査を提案している。具体的には、前半は畳み込み層、後半は逆畳み込み層で構成されたオートエンコーダと呼ばれる畳み込みニューラルネットワークを用いて、入力された画像を再構成するように学習が行われる。学習には、良品の画像のみが使用される。畳み込み層は、入力された画像をより小さいデータに圧縮し、逆畳み込み層は、圧縮したデータから元の入力された画像を復元する。このような学習により、前半の畳み込み層は、画像の特徴量を出力できるようになる。学習済みの畳み込み層を用いて抽出した特徴量を、アイソレーションフォレストなどの識別器に入力し、製品の良否が判定される。 Patent Document 1 points out that a sufficient amount of good and defective products are required for learning, and proposes an inspection by unsupervised learning. Specifically, learning is performed so as to reconstruct the input image using a convolutional neural network called an autoencoder composed of a convolutional layer in the first half and a deconvolutional layer in the second half. Only non-defective images are used for learning. The convolution layer compresses the input image into smaller data, and the deconvolution layer restores the original input image from the compressed data. By such learning, the convolutional layer in the first half can output the feature amount of the image. The feature amount extracted using the learned convolution layer is input to a classifier such as an isolation forest, and the quality of the product is judged.
 特許文献2は、画像の一部が僅かに異なる工業部品の欠陥を判別するべく、オートエンコーダに入力した画像と、オートエンコーダが出力する画像との差分画像を取得する。オートエンコーダを良品の画像のみを用いて学習することにより、オートエンコーダで再構成される画像は、欠陥のない画像となるため、差分を取ることによって、欠陥部位が検出可能となる。 Patent Document 2 acquires a difference image between an image input to the autoencoder and an image output by the autoencoder in order to discriminate defects in industrial parts in which a part of the image is slightly different. By learning the autoencoder using only non-defective images, the image reconstructed by the autoencoder becomes an image without defects, so that the defective portion can be detected by taking the difference.
 非特許文献1は、変分オートエンコーダ(VAE:Variational Auto Encoder)を用いる検査技術が記載されている。変分オートエンコーダは、オートエンコーダの一種であり、確率モデルを導入することによって、より高度な学習を可能にしている。非特許文献1では、変分オートエンコーダの出力を多変量正規分布でモデル化しており、各画素を単純に再構成するのではなく、復元誤差を考慮して、正規分布の平均および分散を推定するような学習が行われる。入出力の差分だけでなく、復元時にどの程度の誤差が生じるかを考慮することによって、より精度の高い欠陥検出が可能とされている。 Non-Patent Document 1 describes an inspection technique using a Variational Auto-Encoder (VAE). Variational Auto-Encoder is a kind of auto-encoder and enables more advanced learning by introducing a probabilistic model. In Non-Patent Document 1, the output of the variational auto-encoder is modeled with a multivariate normal distribution, and the mean and variance of the normal distribution are estimated in consideration of the restoration error, instead of simply reconstructing each pixel. Learning is done like this. By considering not only the input / output difference but also how much error occurs during restoration, more accurate defect detection is possible.
特開2019-087181号公報JP-A-2019-087181 特開2018-195119号公報JP-A-2018-195119
 しかしながら、非特許文献1に記載の手法は、学習に用いられる複数の画像の各画素の輝度分布が正規分布に従っていない場合、精度が大きく低下する問題がある。例えば、輝度分布が極端に左右に偏った形状をしていた場合、実際の輝度と、平均値との差が大きくなってしまうため、過検出が増大する可能性がある。 However, the method described in Non-Patent Document 1 has a problem that the accuracy is greatly reduced when the brightness distribution of each pixel of a plurality of images used for learning does not follow a normal distribution. For example, if the luminance distribution has a shape that is extremely biased to the left and right, the difference between the actual luminance and the average value becomes large, so that over-detection may increase.
 本発明の目的は、画像における異常を検出する際の過検出を抑制する技術を提供することにある。 An object of the present invention is to provide a technique for suppressing over-detection when detecting an abnormality in an image.
 上記課題を解決するため、第1態様は、画像検査装置を構築するための学習装置であって、複数の対象物画像を学習用データとし、入力と出力の誤差が小さくなるように、かつ、単位画素ごとに、特定の分布で近似された分布の平均、分散、および高次統計量を出力するように確率モデルを学習する学習部を備える。 In order to solve the above problem, the first aspect is a learning device for constructing an image inspection device, in which a plurality of object images are used as learning data so that an error between input and output is reduced and For each unit pixel, it is provided with a learning unit that learns a probability model so as to output the mean, variance, and higher-order statistics of the distribution approximated by a specific distribution.
 第2態様は、第1態様の学習装置であって、前記対象物画像が、良品を撮像した良品画像である。 The second aspect is the learning device of the first aspect, and the object image is a non-defective product image obtained by capturing a non-defective product.
 第3態様は、第1態様または第2態様の学習装置であって、前記特定の分布が、正規分布である。 The third aspect is the learning device of the first aspect or the second aspect, and the specific distribution is a normal distribution.
 第4態様は、第1態様から第3態様のいずれか1つの学習装置であって、前記確率モデルが、変分オートエンコーダである。 The fourth aspect is a learning device according to any one of the first to third aspects, and the probability model is a variational autoencoder.
 第5態様は、第1態様から第4態様のいずれか1つの学習装置であって、前記高次統計量が、歪度または尖度である。 The fifth aspect is the learning device of any one of the first to fourth aspects, and the higher-order statistics are skewness or kurtosis.
 第6態様は、第1態様から第5態様のいずれか1つの学習装置により学習が行われた学習モデルを用いる画像検査装置であって、検査対象である検査画像を、前記学習部によって得られた学習済みパラメータを有する前記確率モデルに入力し、前記検査画像に対する単位画素ごとの平均、分散、および高次統計量を取得する統計量取得部と、前記統計量取得部によって取得される平均、分散、および高次統計量に基づいて、前記検査画像における異常を検出する異常検出部とを含む。 The sixth aspect is an image inspection device using a learning model trained by any one of the learning devices of the first to fifth aspects, and the inspection image to be inspected is obtained by the learning unit. A statistic acquisition unit that inputs to the probabilistic model having the learned parameters and acquires the average, variance, and higher-order statistics for each unit pixel with respect to the inspection image, and an average acquired by the statistic acquisition unit. It includes an abnormality detection unit that detects an abnormality in the inspection image based on the variance and higher-order statistics.
 第7態様は、第6態様の画像検査装置であって、前記異常検出部は、前記検査画像のうち、前記統計量取得部によって取得された高次統計量が所定の閾値を越える単位画素を除外して、異常を検出する。 A seventh aspect is the image inspection device of the sixth aspect, in which the abnormality detection unit detects a unit pixel of the inspection image in which the higher-order statistics acquired by the statistic acquisition unit exceeds a predetermined threshold value. Exclude and detect anomalies.
 第8態様は、第1態様から第5態様のいずれか1つの学習装置によって取得される、前記確率モデルの学習済みパラメータである。 The eighth aspect is a learned parameter of the probability model acquired by the learning device of any one of the first to fifth aspects.
 第9態様は、画像検査方法を構築するための学習方法であって、複数の対象物画像を学習用データとし、入力と出力の誤差が小さくなるように、かつ、単位画素ごとに、特定の分布で近似された分布の平均、分散、および高次統計量を出力するように確率モデルを学習する工程を含む。 The ninth aspect is a learning method for constructing an image inspection method, in which a plurality of object images are used as training data so that an error between input and output is reduced, and a specific object is specified for each unit pixel. It involves training a probabilistic model to output the mean, variance, and higher-order statistics of the distribution approximated by the distribution.
 第10態様は、画像検査装置であって、複数の対象物画像を学習用データとし、入力と出力の誤差が小さくなるように、かつ、単位画素ごとに、特定の分布で近似された分布の平均、分散、および高次統計量を出力するように学習された学習済みパラメータを有する確率モデルを用いて、検査画像の各単位画素に対する平均、分散、および高次統計量を取得する統計量取得部と、前記統計量取得部によって得られる、前記検査画像の各単位画素に対する平均、分散、および高次統計量に基づいて、前記検査画像における異常を検出する異常検出部とを備える。 The tenth aspect is an image inspection apparatus, in which a plurality of object images are used as training data, and the distribution is approximated by a specific distribution for each unit pixel so that the error between input and output is reduced. Statistic acquisition to obtain mean, variance, and higher-order statistics for each unit pixel of an inspection image using a probabilistic model with trained parameters trained to output mean, variance, and higher-order statistics. A unit and an abnormality detection unit that detects an abnormality in the inspection image based on the average, dispersion, and higher-order statistics for each unit pixel of the inspection image obtained by the statistic acquisition unit.
 第11態様は、第10態様の画像検査装置であって、前記異常検出部は、前記検査画像のうち、前記統計量取得部によって取得された高次統計量が所定の閾値を越える単位画素を除外して、異常を検出する。 The eleventh aspect is the image inspection device of the tenth aspect, and the abnormality detection unit detects a unit pixel of the inspection image in which the higher-order statistics acquired by the statistic acquisition unit exceeds a predetermined threshold value. Exclude and detect anomalies.
 第12態様は、画像検査方法であって、複数の対象物画像を学習用データとし、入力と出力の誤差が小さくなるように、かつ、単位画素ごとに、特定の分布で近似された分布の平均、分散、および高次統計量を出力するように学習された学習済みパラメータを有する確率モデルを用いて、検査画像の各単位画素に対する平均、分散、および高次統計量を取得する統計量取得工程と、前記統計量生成工程によって得られる、前記検査画像の各単位画素に対する平均、分散、および高次統計量に基づいて、前記検査画像における異常を検出する異常検出工程とを含む。 The twelfth aspect is an image inspection method, in which a plurality of object images are used as training data, and the distribution is approximated by a specific distribution for each unit pixel so that the error between input and output is reduced. Statistic acquisition to obtain mean, variance, and higher-order statistics for each unit pixel of an inspection image using a probabilistic model with trained parameters trained to output mean, variance, and higher-order statistics. The step includes an abnormality detection step of detecting an abnormality in the inspection image based on the average, dispersion, and higher-order statistics of the inspection image for each unit pixel obtained by the statistic generation step.
 本発明によると、確率モデルを用いて推定された高次統計量に基づいて、特定の分布に従わない単位画素を特定できるため、過検出を抑制できる。 According to the present invention, since unit pixels that do not follow a specific distribution can be specified based on higher-order statistics estimated using a probability model, overdetection can be suppressed.
実施形態の検査装置を示す図である。It is a figure which shows the inspection apparatus of embodiment. 実施形態の情報処理装置のハードウェア構成を示す図である。It is a figure which shows the hardware configuration of the information processing apparatus of embodiment. 実施形態の情報処理装置が備える機能的な構成を示す図である。It is a figure which shows the functional structure which the information processing apparatus of an embodiment has. 変分オートエンコーダを概念的に示す図である。It is a figure which shows the variational autoencoder conceptually. 検査部による検査の流れを概念的に示す図である。It is a figure which conceptually shows the flow of inspection by an inspection part.
 以下、添付の図面を参照しながら、本発明の実施形態について説明する。なお、この実施形態に記載されている構成要素はあくまでも例示であり、本発明の範囲をそれらのみに限定する趣旨のものではない。図面においては、理解容易のため、必要に応じて各部の寸法や数が誇張又は簡略化して図示されている場合がある。 Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that the components described in this embodiment are merely examples, and the scope of the present invention is not limited to them. In the drawings, the dimensions and numbers of each part may be exaggerated or simplified as necessary for easy understanding.
 <1. 実施形態>
 図1は、実施形態の画像検査装置10を示す図である。画像検査装置10は、対象物90の画像を解析することによって、対象物90の欠陥(異常)を検出する。対象物90は、具体的には錠剤であるが、錠剤に限定されない。画像検査装置10は、カメラ110と、情報処理装置120とを備える。カメラ110は、情報処理装置120と電気的に接続されている。カメラ110は、イメージセンサを備えている。カメラ110は、イメージセンサを用いて対象物90を撮像することにより得られる画像信号を、情報処理装置120へ出力する。カメラ110に撮像される対象物90は、所定の位置に停止していてもよいし、ベルトコンベヤなどの搬送機構により、所定の方向へ移動していてもよい。
<1. Embodiment>
FIG. 1 is a diagram showing an image inspection device 10 of an embodiment. The image inspection device 10 detects defects (abnormalities) in the object 90 by analyzing the image of the object 90. The object 90 is specifically a tablet, but is not limited to a tablet. The image inspection device 10 includes a camera 110 and an information processing device 120. The camera 110 is electrically connected to the information processing device 120. The camera 110 includes an image sensor. The camera 110 outputs an image signal obtained by imaging the object 90 using the image sensor to the information processing device 120. The object 90 imaged by the camera 110 may be stopped at a predetermined position, or may be moved in a predetermined direction by a transport mechanism such as a belt conveyor.
 図2は、実施形態の情報処理装置120のハードウェア構成を示す図である。情報処理装置120は、コンピュータとしての構成を備える。具体的には、情報処理装置120は、プロセッサ121と、RAM123と、記憶部125と、入力部127と、表示部129と、機器I/F131と、通信I/F133とを備える。プロセッサ121、RAM123、記憶部125、入力部127、表示部129、機器I/F131および通信I/F133は、バス135を介して互いに電気的に接続されている。 FIG. 2 is a diagram showing a hardware configuration of the information processing device 120 of the embodiment. The information processing device 120 has a configuration as a computer. Specifically, the information processing device 120 includes a processor 121, a RAM 123, a storage unit 125, an input unit 127, a display unit 129, an apparatus I / F 131, and a communication I / F 133. The processor 121, the RAM 123, the storage unit 125, the input unit 127, the display unit 129, the device I / F 131, and the communication I / F 133 are electrically connected to each other via the bus 135.
 プロセッサ121は、具体的には、CPUまたはGPUを含む。RAM123は、情報の読み出しおよび書き込みが可能な記憶媒体であって、具体的には、SDRAMである。記憶部125は、情報の読み出しおよび書き込みが可能な記録媒体であって、具体的には、HDD(ハードディスクドライブ)またはSSD(ソリッドステートドライブ)を含む。なお、記憶部125は、ROM、可搬性を有する光ディスク、磁気ディスクまたは半導体メモリ等を含んでもよい。記憶部125は、プログラムPを記憶している。プロセッサ121は、RAM123を作業領域として、プログラムPを実行することにより、各種の機能を実現する。なお、プログラムPは、ネットワークを介して、情報処理装置120に提供または配布されるようにしてもよい。 Specifically, the processor 121 includes a CPU or a GPU. The RAM 123 is a storage medium capable of reading and writing information, and specifically, an SDRAM. The storage unit 125 is a recording medium capable of reading and writing information, and specifically includes an HDD (hard disk drive) or an SSD (solid state drive). The storage unit 125 may include a ROM, a portable optical disk, a magnetic disk, a semiconductor memory, or the like. The storage unit 125 stores the program P. The processor 121 realizes various functions by executing the program P with the RAM 123 as a work area. The program P may be provided or distributed to the information processing apparatus 120 via the network.
 入力部127は、ユーザの操作入力を受け付ける入力デバイスであり、具体的には、マウスまたはキーボードなどである。表示部129は、各種情報を表す画像を表示する表示デバイスであり、具体的には、液晶ディスプレイである。 The input unit 127 is an input device that accepts user's operation input, specifically, a mouse, a keyboard, or the like. The display unit 129 is a display device that displays images representing various types of information, and is specifically a liquid crystal display.
 機器I/F131は、カメラ110を情報処理装置120に電気的に接続するためのインターフェースである。通信I/F133は、情報処理装置120をインターネットなどのネットワークと接続するためのインターフェースである。カメラ110は、通信I/F133を介して情報処理装置120と接続されてもよい。すなわち、画像検査装置10は、カメラ110を備えていることは必須ではなく、情報処理装置120のみを備えていてもよい。 The device I / F 131 is an interface for electrically connecting the camera 110 to the information processing device 120. The communication I / F 133 is an interface for connecting the information processing device 120 to a network such as the Internet. The camera 110 may be connected to the information processing device 120 via the communication I / F 133. That is, the image inspection device 10 is not essential to include the camera 110, and may include only the information processing device 120.
 図3は、実施形態の情報処理装置120が備える機能的な構成を示す図である。情報処理装置120は、取得部141、学習部143、および検査部145を備える。取得部141、学習部143、および検査部145は、プロセッサ121がプログラムPにしたがって動作することにより実現される機能である。なお、学習部143は、情報処理装置120に備えられることは必須ではなく、別のコンピュータに備えられてもよい。 FIG. 3 is a diagram showing a functional configuration included in the information processing device 120 of the embodiment. The information processing device 120 includes an acquisition unit 141, a learning unit 143, and an inspection unit 145. The acquisition unit 141, the learning unit 143, and the inspection unit 145 are functions realized by operating the processor 121 according to the program P. The learning unit 143 is not essential to be provided in the information processing device 120, and may be provided in another computer.
 取得部141は、カメラ110で対象物90を撮像した対象物画像91を取得する。なお、対象物画像91のうち、検査対象となる画像を検査画像と称する。学習部143は、後述する確率モデルである変分オートエンコーダ20を用いて、学習を行う。検査部145は、検査画像を変分オートエンコーダ20に入力し、その出力結果に基づいて、検査画像における異常を検出する。 The acquisition unit 141 acquires the object image 91 obtained by capturing the object 90 with the camera 110. Of the object images 91, the image to be inspected is referred to as an inspection image. The learning unit 143 performs learning using the variational autoencoder 20, which is a probability model described later. The inspection unit 145 inputs the inspection image to the variational autoencoder 20 and detects an abnormality in the inspection image based on the output result.
 <2.ネットワークの構築>
 図4は、変分オートエンコーダ20を概念的に示す図である。オートエンコーダとは、自己符号化器とも称される、ニューラルネットの技術である。画像検査装置100では、オートエンコーダの一例として、変分オートエンコーダ(VAE:Variational Auto Encoder)が利用される。なお、エンコーダとして、敵対的生成ネットワーク(GAN:Generative Adversarial Network)が用いられてもよい。
<2. Network construction>
FIG. 4 is a diagram conceptually showing the variational autoencoder 20. An autoencoder is a neural network technology, also called a self-encoder. In the image inspection apparatus 100, a variational auto-encoder (VAE: Variational Auto Encoder) is used as an example of the autoencoder. A Generative Adversarial Network (GAN) may be used as the encoder.
 変分オートエンコーダ20は、ニューラルネットで構成される関数である。変分オートエンコーダ20では、データx(対象物画像91)が、畳み込み層21に入力され、次元削減された潜在変数zに変換される。そして、潜在変数zは、第1逆畳み込み層231に入力されて、再構成データx´が出力される。畳み込み層21はエンコーダとも称され、第1逆畳み込み層231は、デコーダとも称される。そして、再構成データx´がデータxに近くなるように、エンコーダおよびデコーダを学習させる。 The variational autoencoder 20 is a function composed of a neural network. In the variational autoencoder 20, the data x (object image 91) is input to the convolutional layer 21 and converted into a dimensionally reduced latent variable z. Then, the latent variable z is input to the first deconvolution layer 231 and the reconstruction data x'is output. The convolution layer 21 is also referred to as an encoder, and the first deconvolution layer 231 is also referred to as a decoder. Then, the encoder and the decoder are trained so that the reconstructed data x'is close to the data x.
 なお、変分オートエンコーダ20では、データxおよび潜在変数zが、確率変数として扱われる。つまり、エンコーダ(畳み込み層21)およびデコーダ(第1逆畳み込み層231)は、決定論的ではなく、確率分布p(z|x),p(x|z)からのサンプリングを含む確率的な変換を行う。また、確率分布p(z│x)としては、変分法で近似された確率分布q(z│x)が用いられる。さらに、変分オートエンコーダ20では、確率分布q(z|x),p(x|z)は、限られた個数のパラメータで決まる特定の分布で近似される。確率分布q(z|x),p(x|z)は、特定の分布で近似される場合、次式で表される。 In the variational autoencoder 20, the data x and the latent variable z are treated as random variables. That is, the encoder (convolution layer 21) and the decoder (first deconvolution layer 231) are not deterministic and are stochastic transformations that include sampling from the probability distributions p (z | x), p (x | z). I do. Further, as the probability distribution p (z│x), the probability distribution q (z│x) approximated by the variational method is used. Further, in the variational autoencoder 20, the probability distributions q (z | x) and p (x | z) are approximated by a specific distribution determined by a limited number of parameters. The probability distributions q (z | x) and p (x | z) are expressed by the following equations when approximated by a specific distribution.
 q(z|x)=q(z|φ(x))
 p(x|z)=p(x|θ(z))
q (z | x) = q (z | φ (x))
p (x | z) = p (x | θ (z))
 ここで、φ(x)、θ(z)は、入力(xおよびz)に対して、確率分布のパラメータφおよびθの各々を出力する射影関数である。 Here, φ (x) and θ (z) are projection functions that output each of the parameters φ and θ of the probability distribution with respect to the inputs (x and z).
 本実施形態では、確率分布q(z|x),p(x|z)は、正規分布で近似されるものとする。確率分布p(x|z)が正規分布で近似されることにより、デコーダの出力は、正規分布で近似された確率分布のパラメータ(平均μおよび分散σ )となる。すなわち、データxとして対象物画像91が変分オートエンコーダ20に入力されると、第1逆畳み込み層231は、対象物画像91の各画素に対する平均μおよび分散σ を出力する。 In this embodiment, the probability distributions q (z | x) and p (x | z) are approximated by a normal distribution. By approximating the probability distribution p (x | z) with a normal distribution, the output of the decoder becomes the parameters of the probability distribution approximated with the normal distribution (mean μ x and variance σ x 2 ). That is, when the object image 91 is input to the variational autoencoder 20 as the data x, the first deconvolution layer 231 outputs the average μ x and the variance σ x 2 for each pixel of the object image 91.
 第1逆畳み込み層231が出力する平均μは、変分オートエンコーダ20に入力される対象物画像91を再構成した画像を表す。また、第1逆畳み込み層231が出力する分散σ は、再構成時のばらつきを表す。 The average μ x output by the first deconvolution layer 231 represents an image obtained by reconstructing the object image 91 input to the variational autoencoder 20. Further, the variance σ x 2 output by the first deconvolution layer 231 represents the variation at the time of reconstruction.
 なお、確率分布q(z|x),p(x|z)が、正規分布で近似されることは必須ではなく、ベルヌーイ分布や多項分布など、正規分布以外の分布で近似されてもよい。 It is not essential that the probability distributions q (z | x) and p (x | z) are approximated by a normal distribution, and may be approximated by a distribution other than the normal distribution such as the Bernoulli distribution or the multinomial distribution.
 図4に示すように、変分オートエンコーダ20は、第2逆畳み込み層233を有する。第2逆畳み込み層233は、畳み込み層21の出力側に連結される。第2逆畳み込み層233は、畳み込み層21が出力する潜在変数zから、畳み込み層21に入力された対象物画像91の各画素に対する高次統計量を出力する。 As shown in FIG. 4, the variational autoencoder 20 has a second deconvolution layer 233. The second deconvolution layer 233 is connected to the output side of the convolution layer 21. The second deconvolution layer 233 outputs high-order statistics for each pixel of the object image 91 input to the convolution layer 21 from the latent variable z output by the convolution layer 21.
 本実施形態では、第2逆畳み込み層233が出力する高次統計量は、歪度であるものとする。歪度は、分布の歪み度合いを表す統計量であり、分布に偏りが無い場合は0になり、左右に偏ると値が上下する。 In the present embodiment, the higher-order statistic output by the second deconvolution layer 233 is skewness. The skewness is a statistic that indicates the degree of skewness of the distribution. If the distribution is not biased, it becomes 0, and if it is biased to the left or right, the value goes up or down.
 第2逆畳み込み層233が出力する歪度は、第1逆畳み込み層231が出力する平均μおよび分散σ が、正規分布に対してどの程度歪んでいたか、を表す値である。 The skewness output by the second deconvolution layer 233 is a value indicating how much the mean μ x and the variance σ x 2 output by the first deconvolution layer 231 are distorted with respect to the normal distribution.
 本実施形態では、平均および分散が第1逆畳み込み層231から、歪度が第2逆畳み込み層233から、それぞれ出力される。このように、逆畳み込み層を分けることによって、各出力の精度が高められる。ただし、平均、分散、および歪度が、共通の逆畳み込み層から出力されるようにしてもよい。 In the present embodiment, the average and the variance are output from the first deconvolution layer 231 and the skewness is output from the second deconvolution layer 233. By separating the deconvolution layers in this way, the accuracy of each output is improved. However, the mean, variance, and skewness may be output from a common deconvolution layer.
 <ネットワークの学習>
 学習部143は、変分オートエンコーダ20を用いて学習を行う。学習用データとして、複数の対象物画像91は、良品の対象物90を撮像して得られる良品画像が使用される。学習部143は、変分オートエンコーダ20における入力と出力の誤差(再構成誤差)を最小化するように、内部パラメータを更新する学習を行う。この学習のために、誤差関数L(x)が定義される。学習部143は、各良品画像を変分オートエンコーダ20に入力し、確率的再急降下法を用いて、入力された各良品画像を再構成するように学習することによって、畳み込み層21、第1逆畳み込み層231、および第2逆畳み込み層233の内部パラメータを更新する。次の式は、学習時に使用される誤差関数L(x)である。
<Network learning>
The learning unit 143 performs learning using the variational autoencoder 20. As the learning data, as the plurality of object images 91, a non-defective image obtained by imaging a non-defective object 90 is used. The learning unit 143 learns to update the internal parameters so as to minimize the error (reconstruction error) between the input and the output in the variational autoencoder 20. An error function L (x) is defined for this learning. The learning unit 143 inputs each good product image to the variational autoencoder 20, and learns to reconstruct each input good product image by using the probabilistic re-descent method, so that the convolution layer 21, the first The internal parameters of the deconvolution layer 231 and the second deconvolution layer 233 are updated. The following equation is the error function L (x) used during learning.
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000001
 誤差関数L(x)において、i,jは、学習用データの良品画像の要素番号を示している。誤差関数L(x)では、非特許文献1に記載された誤差関数に、歪度を最適化するための誤差SVAEが追加されている。正規分布の平均μxiおよび分散σxi については、正規分布の対数尤度を誤差関数とすることにより学習する。SVAEは、正規分布の平均と分散に対する歪度を、二乗誤差で近似的に最適化するようになっている。これにより、第2逆たたみ込みそう233の出力が、歪度に近づけられる。 In the error function L (x), i and j indicate the element numbers of the non-defective images of the training data. The error function L (x), the error function described in Non-Patent Document 1, the error S VAE for optimizing the skewness is added. The mean μ xi and variance σ xi 2 of the normal distribution are learned by using the log-likelihood of the normal distribution as an error function. SVAE is designed to approximately optimize the skewness of the mean and variance of the normal distribution with a squared error. As a result, the output of the second reverse convolution 233 is brought closer to the skewness.
 具体的には、i番目の入力画像xと、推定した正規分布のパラメータである平均μxiおよび標準偏差σxiから求められる(x-μxi/σxi と、ネットワークの出力であるskewnessの誤差を最小化するようになっている。これは、分布に対する一つの良品画像の誤差しか計算していないことになるが、膨大な良品画像を用いて繰り返し内部パラメータの更新を行うことによって、確率的に近似が行われる。学習部143は、変分オートエンコーダ20を用いての学習を完了すると、学習済みの内部パラメータ(学習済みパラメータ)を記憶部125に保存する。 Specifically, the i-th input image x i, and is a parameter of the normal distribution estimated is determined from the average mu xi and standard deviation σ xi (x i -μ xi) 3 / σ xi 3, the network output The error of skewness is minimized. This means that only the error of one non-defective image with respect to the distribution is calculated, but the approximation is stochastically performed by repeatedly updating the internal parameters using a huge number of non-defective images. When the learning unit 143 completes the learning using the variational autoencoder 20, the learning unit 143 stores the learned internal parameters (learned parameters) in the storage unit 125.
 図3に示すように、検査部145は、統計量取得部31、異常度取得部33、補正部35、および異常検出部37を備える。検査部145が実行する処理の内容について、次に詳述する。 As shown in FIG. 3, the inspection unit 145 includes a statistic acquisition unit 31, an abnormality degree acquisition unit 33, a correction unit 35, and an abnormality detection unit 37. The contents of the process executed by the inspection unit 145 will be described in detail below.
 <欠陥検知>
 図5は、検査部145による検査の流れを概念的に示す図である。図5では、検査対象である検査画像93が、欠陥部NG1を有する場合を示している。
<Defect detection>
FIG. 5 is a diagram conceptually showing the flow of inspection by the inspection unit 145. FIG. 5 shows a case where the inspection image 93 to be inspected has a defective portion NG1.
 まず、検査部145の統計量取得部31は、図5に示すように、学習済みの内部パラメータを有する変分オートエンコーダ20に、検査画像93を入力する。すると、変分オートエンコーダ20は、検査画像93の各画素に対する、正規分布の平均を表す平均画像931と、正規分布の分散を表す分散画像933と、正規分布の歪度を表す歪度画像935とを出力する。 First, as shown in FIG. 5, the statistic acquisition unit 31 of the inspection unit 145 inputs the inspection image 93 to the variational autoencoder 20 having the learned internal parameters. Then, the variable auto encoder 20 has an average image 931 representing the average of the normal distribution, a dispersion image 933 showing the variance of the normal distribution, and a skewness image 935 showing the skewness of the normal distribution for each pixel of the inspection image 93. And output.
 検査部145の異常度取得部33は、検査画像93と、統計量取得部31によって取得された平均画像931および分散画像933とに基づいて、検査画像93の各画素に対する異常度を算出する。異常度は、例えば、マハラノビス距離としてもよい。マハラノビス距離は、例えば、(x-μ/σ (ただし、kは各画素の要素番号を表す。)により求められる。 The abnormality degree acquisition unit 33 of the inspection unit 145 calculates the abnormality degree for each pixel of the inspection image 93 based on the inspection image 93 and the average image 931 and the dispersion image 933 acquired by the statistic acquisition unit 31. The degree of anomaly may be, for example, the Mahalanobis distance. The Mahalanobis distance is determined by, for example, (x k − μ k ) 2 / σ k 2 (where k represents the element number of each pixel).
 より具体的には、異常度取得部33は、検査画像93および平均画像931における、対応する画素同士の輝度(xおよびμ)の差分(=x-μ)を計算する。さらに異常度取得部33は、得られた差分を2乗した値(=(x―μ)を、分散画像933における対応する画素の分散σ で除算する。異常度取得部33は、このような演算処理を検査画像93の全画素に対して行うことにより、異常度画像937を取得する。 More specifically, the abnormality degree acquisition unit 33, the inspection image 93 and average image 931, calculates a difference (= x k -μ k) of the corresponding pixels to the luminance (x k and mu k). Further, the abnormality degree acquisition unit 33 divides the obtained difference squared value (= (x k − μ k ) 2 ) by the variance σ k 2 of the corresponding pixel in the variance image 933. The abnormality degree acquisition unit 33 acquires the abnormality degree image 937 by performing such arithmetic processing on all the pixels of the inspection image 93.
 図5に示すように、検査画像93に含まれていた欠陥部NG1は、異常度画像937において、異常度が大きいことを表す高輝度の部分として検出されている。しかしながら、矢印で示すように、異常度画像937では、欠陥部NG1以外にも、異常度が大きい部分が検出されている。具体的には、検査画像93における対象物90のてかり部分が、大きな異常度となって検出されている。このため、異常度画像937に基づいて異常判定が行われた場合、欠陥部NG1以外も異常と判定される過検出が起きる可能性がある。 As shown in FIG. 5, the defect portion NG1 included in the inspection image 93 is detected in the abnormality degree image 937 as a high-luminance portion indicating that the abnormality degree is large. However, as shown by the arrow, in the abnormality degree image 937, a portion having a large abnormality degree is detected in addition to the defect portion NG1. Specifically, the shining portion of the object 90 in the inspection image 93 is detected with a large degree of abnormality. Therefore, when the abnormality determination is made based on the abnormality degree image 937, there is a possibility that over-detection in which the abnormality is determined other than the defect portion NG1 may occur.
 ここで、異常度画像937は、各画素の輝度分布が、正規分布に従うものと仮定して求められている。このため、推定される輝度分布が正規分布に従わない画素については、異常度が高くなりやすく、過検出の要因となりうる。そこで、検査部145の補正部35は、過検出を抑制するため、異常度画像937の補正を行う。具体的には、補正部35は、歪度画像935のうち、歪度が所定の閾値を越える画素を、正規分布に従わない画素として、異常度画像937から除去する処理を行う。すなわち、補正部35は、異常度画像937および歪度画像935に基づいて、補正画像939を生成する。図5に示すように、検査画像93におけるてかり部分は、歪度画像935において歪度が比較的大きい。こため、補正画像939では、てかり部分の異常度が除去される。 Here, the anomaly degree image 937 is obtained on the assumption that the brightness distribution of each pixel follows a normal distribution. Therefore, for pixels whose estimated luminance distribution does not follow the normal distribution, the degree of abnormality tends to be high, which may cause over-detection. Therefore, the correction unit 35 of the inspection unit 145 corrects the abnormality degree image 937 in order to suppress over-detection. Specifically, the correction unit 35 performs a process of removing from the anomaly image 937 the pixels whose skewness exceeds a predetermined threshold value among the skewness images 935 as pixels that do not follow the normal distribution. That is, the correction unit 35 generates the correction image 939 based on the abnormality degree image 937 and the skewness degree image 935. As shown in FIG. 5, the shining portion in the inspection image 93 has a relatively large skewness in the skewness image 935. Therefore, in the corrected image 939, the degree of abnormality of the shining portion is removed.
 検査部145の異常検出部37は、補正画像939の異常度に基づいて、検査画像93の各画素が異常であるか否かを判定する。具体的には、異常検出部37は、補正画像939において、異常度が所定の閾値を越える画素を異常と判定する。異常検出部37は、判定結果を、表示部129に表示してもよい。異常検出部37は、異常と判定した画素の座標または異常度を表す情報を、表示部129に表示してもよい。 The abnormality detection unit 37 of the inspection unit 145 determines whether or not each pixel of the inspection image 93 is abnormal based on the degree of abnormality of the corrected image 939. Specifically, the abnormality detection unit 37 determines in the corrected image 939 that a pixel whose degree of abnormality exceeds a predetermined threshold value is abnormal. The abnormality detection unit 37 may display the determination result on the display unit 129. The abnormality detection unit 37 may display information indicating the coordinates of the pixel determined to be abnormal or the degree of abnormality on the display unit 129.
 以上のように、本実施形態では、高次統計量である歪度を出力するように変分オートエンコーダ20を学習させることにより、輝度分布が正規分布に従わない画素を、歪度に基づいて特定することができる。したがって、歪度に基づいて、異常度画像を補正することによって、検査画像93における異常の過検出を抑制できる。 As described above, in the present embodiment, by training the variational autoencoder 20 so as to output the skewness which is a high-order statistic, the pixels whose luminance distribution does not follow the normal distribution are based on the skewness. Can be identified. Therefore, by correcting the abnormality degree image based on the skewness, over-detection of the abnormality in the inspection image 93 can be suppressed.
 <3. 変形例>
 以上、実施形態について説明してきたが、本発明は上記のようなものに限定されるものではなく、様々な変形が可能である。
<3. Modification example>
Although the embodiments have been described above, the present invention is not limited to the above, and various modifications are possible.
 例えば、上記実施形態では、高次統計量として、歪度が採用されているが、尖度、または、より高次の統計量が採用されてもよい。尖度を出力させるように変分オートエンコーダ20を学習させる、誤差関数L(x)のSVAEとして、次式を採用してもよい。 For example, in the above embodiment, skewness is adopted as a higher-order statistic, but kurtosis or a higher-order statistic may be adopted. The following equation may be adopted as the SVAE of the error function L (x) that trains the variational autoencoder 20 so as to output the kurtosis.
Figure JPOXMLDOC01-appb-M000002
Figure JPOXMLDOC01-appb-M000002
 この発明は詳細に説明されたが、上記の説明は、すべての局面において、例示であって、この発明がそれに限定されるものではない。例示されていない無数の変形例が、この発明の範囲から外れることなく想定され得るものと解される。上記各実施形態及び各変形例で説明した各構成は、相互に矛盾しない限り適宜組み合わせたり、省略したりすることができる。 Although the present invention has been described in detail, the above description is exemplary in all aspects and the invention is not limited thereto. It is understood that innumerable variations not illustrated can be assumed without departing from the scope of the present invention. The configurations described in the above embodiments and the modifications can be appropriately combined or omitted as long as they do not conflict with each other.
 10 画像検査装置
 100 画像検査装置
 120 情報処理装置(学習装置)
 125 記憶部
 143 学習部
 145 検査部
 20 変分オートエンコーダ
 31 統計量取得部
 33 異常度取得部
 35 補正部
 37 異常検出部
 90 対象物
 91 対象物画像
 93 検査画像
 931 平均画像
 933 分散画像
 935 歪度画像
 937 異常度画像
 939 補正画像
10 Image inspection device 100 Image inspection device 120 Information processing device (learning device)
125 Storage unit 143 Learning unit 145 Variational auto-encoder 31 Statistics acquisition unit 33 Abnormality acquisition unit 35 Correction unit 37 Abnormality detection unit 90 Object 91 Object image 93 Inspection image 931 Average image 933 Distributed image 935 Skewness Image 937 Anomaly image 939 Corrected image

Claims (12)

  1.  画像検査装置を構築するための学習装置であって、
     複数の対象物画像を学習用データとし、入力と出力の誤差が小さくなるように、かつ、単位画素ごとに、特定の分布で近似された分布の平均、分散、および高次統計量を出力するように確率モデルを学習する学習部、
    を備える、学習装置。
    It is a learning device for constructing an image inspection device.
    Multiple object images are used as training data, and the mean, variance, and higher-order statistics of the distribution approximated by a specific distribution are output for each unit pixel so that the error between input and output is small. Learning department, which learns a probabilistic model,
    A learning device equipped with.
  2.  請求項1に記載の学習装置であって、
     前記対象物画像が、良品を撮像した良品画像である、学習装置。
    The learning device according to claim 1.
    A learning device in which the object image is a non-defective image obtained by imaging a non-defective product.
  3.  請求項1または請求項2に記載の学習装置であって、
     前記特定の分布が、正規分布である、学習装置。
    The learning device according to claim 1 or 2.
    A learning device in which the specific distribution is a normal distribution.
  4.  請求項1から請求項3のいずれか1項に記載の学習装置であって、
     前記確率モデルが、変分オートエンコーダである、学習装置。
    The learning device according to any one of claims 1 to 3.
    A learning device in which the probability model is a variational autoencoder.
  5.  請求項1から請求項4のいずれか1項に記載の学習装置であって、
     前記高次統計量が、歪度または尖度である、学習装置。
    The learning device according to any one of claims 1 to 4.
    A learning device in which the higher-order statistics are skewness or kurtosis.
  6.  請求項1から請求項5のいずれか1項に記載の学習装置により学習が行われた学習モデルを用いる画像検査装置であって、
     検査対象である検査画像を、前記学習部によって得られた学習済みパラメータを有する前記確率モデルに入力し、前記検査画像に対する単位画素ごとの平均、分散、および高次統計量を取得する統計量取得部と、
     前記統計量取得部によって取得される平均、分散、および高次統計量に基づいて、前記検査画像における異常を検出する異常検出部と、
    を含む、画像検査装置。
    An image inspection apparatus using a learning model in which learning is performed by the learning apparatus according to any one of claims 1 to 5.
    Statistic acquisition in which the inspection image to be inspected is input to the probability model having the learned parameters obtained by the learning unit, and the mean, variance, and higher-order statistics for each unit pixel with respect to the inspection image are acquired. Department and
    An abnormality detection unit that detects an abnormality in the inspection image based on the mean, variance, and higher-order statistics acquired by the statistic acquisition unit.
    Imaging inspection equipment, including.
  7.  請求項6に記載の画像検査装置であって、
     前記異常検出部は、
     前記検査画像のうち、前記統計量取得部によって取得された高次統計量が所定の閾値を越える単位画素を除外して、異常を検出する、画像検査装置。
    The image inspection apparatus according to claim 6.
    The abnormality detection unit
    An image inspection device for detecting an abnormality by excluding unit pixels in which the higher-order statistics acquired by the statistic acquisition unit exceeds a predetermined threshold value from the inspection images.
  8.  請求項1から請求項5のいずれか1項に記載の学習装置によって取得される、前記確率モデルの学習済みパラメータ。 A trained parameter of the probability model acquired by the learning device according to any one of claims 1 to 5.
  9.  画像検査方法を構築するための学習方法であって、
     複数の対象物画像を学習用データとし、入力と出力の誤差が小さくなるように、かつ、単位画素ごとに、特定の分布で近似された分布の平均、分散、および高次統計量を出力するように確率モデルを学習する工程、
    を含む、学習方法。
    It is a learning method for constructing an image inspection method.
    Multiple object images are used as training data, and the mean, variance, and higher-order statistics of the distribution approximated by a specific distribution are output for each unit pixel so that the error between input and output is small. The process of learning a stochastic model,
    Learning methods, including.
  10.  画像検査装置であって、
     複数の対象物画像を学習用データとし、入力と出力の誤差が小さくなるように、かつ、
    単位画素ごとに、特定の分布で近似された分布の平均、分散、および高次統計量を出力するように学習された学習済みパラメータを有する確率モデルを用いて、検査画像の各単位画素に対する平均、分散、および高次統計量を取得する統計量取得部と、
     前記統計量取得部によって得られる、前記検査画像の各単位画素に対する平均、分散、および高次統計量に基づいて、前記検査画像における異常を検出する異常検出部と、
    を備える、画像検査装置。
    It is an image inspection device
    Multiple object images are used as learning data so that the error between input and output is small, and
    For each unit pixel, the mean, variance, and mean for each unit pixel of the inspection image using a probabilistic model with trained parameters trained to output the mean, variance, and higher-order statistics of the distribution approximated by a particular distribution. , Variance, and statistic acquisition unit to acquire higher-order statistics,
    An abnormality detection unit that detects an abnormality in the inspection image based on the average, variance, and higher-order statistics of the inspection image for each unit pixel obtained by the statistic acquisition unit.
    An image inspection device.
  11.  請求項10に記載の画像検査装置であって、
     前記異常検出部は、前記検査画像のうち、前記統計量取得部によって取得された高次統計量が所定の閾値を越える単位画素を除外して、異常を検出する、画像検査装置。
    The image inspection apparatus according to claim 10.
    The abnormality detection unit is an image inspection device that detects an abnormality by excluding unit pixels in which the higher-order statistics acquired by the statistic acquisition unit exceeds a predetermined threshold value from the inspection images.
  12.  画像検査方法であって、
     複数の対象物画像を学習用データとし、入力と出力の誤差が小さくなるように、かつ、単位画素ごとに、特定の分布で近似された分布の平均、分散、および高次統計量を出力するように学習された学習済みパラメータを有する確率モデルを用いて、検査画像の各単位画素に対する平均、分散、および高次統計量を取得する統計量取得工程と、
     前記統計量生成工程によって得られる、前記検査画像の各単位画素に対する平均、分散、および高次統計量に基づいて、前記検査画像における異常を検出する異常検出工程と、
    を含む、画像検査方法。
    It is an image inspection method
    Multiple object images are used as training data, and the mean, variance, and higher-order statistics of the distribution approximated by a specific distribution are output for each unit pixel so that the error between input and output is small. A statistic acquisition process for acquiring the mean, variance, and higher-order statistics for each unit pixel of the inspection image using a probabilistic model with the trained parameters trained in this way.
    An abnormality detection step of detecting an abnormality in the inspection image based on the average, variance, and higher-order statistics of the inspection image for each unit pixel obtained by the statistic generation step.
    Imaging inspection methods, including.
PCT/JP2020/041655 2020-03-10 2020-11-09 Learning device, image inspection device, learned parameter, learning method, and image inspection method WO2021181749A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020-041013 2020-03-10
JP2020041013A JP7426261B2 (en) 2020-03-10 2020-03-10 Learning device, image inspection device, learned parameters, learning method, and image inspection method

Publications (1)

Publication Number Publication Date
WO2021181749A1 true WO2021181749A1 (en) 2021-09-16

Family

ID=77671506

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2020/041655 WO2021181749A1 (en) 2020-03-10 2020-11-09 Learning device, image inspection device, learned parameter, learning method, and image inspection method

Country Status (2)

Country Link
JP (1) JP7426261B2 (en)
WO (1) WO2021181749A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024068203A1 (en) 2022-09-28 2024-04-04 Carl Zeiss Smt Gmbh Computer implemented method for defect detection in an imaging dataset of a wafer, corresponding computer-readable medium, computer program product and systems making use of such methods

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7439157B2 (en) * 2022-03-30 2024-02-27 本田技研工業株式会社 Inspection equipment
WO2024034451A1 (en) * 2022-08-08 2024-02-15 株式会社神戸製鋼所 Trained model generation method, assessment device, assessment method, and program

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018195119A (en) * 2017-05-18 2018-12-06 住友電装株式会社 Abnormality detecting apparatus and abnormality detecting method
JP2019016292A (en) * 2017-07-10 2019-01-31 凸版印刷株式会社 Content generation device, content generation method, and program
JP2019506739A (en) * 2016-01-06 2019-03-07 ケーエルエー−テンカー コーポレイション Feature selection and automatic processing window monitoring through outlier detection
US20190287230A1 (en) * 2018-03-19 2019-09-19 Kla-Tencor Corporation Semi-supervised anomaly detection in scanning electron microscope images
US20190332900A1 (en) * 2018-04-30 2019-10-31 Elekta Ab Modality-agnostic method for medical image representation
JP6621117B1 (en) * 2018-10-25 2019-12-18 株式会社アルム Image processing apparatus, image processing system, and image processing program
JP2019537135A (en) * 2016-11-04 2019-12-19 ディープマインド テクノロジーズ リミテッド Understanding and generating scenes using neural networks
US20200034654A1 (en) * 2018-07-30 2020-01-30 Siemens Healthcare Gmbh Deep Variational Method for Deformable Image Registration
JP2020035097A (en) * 2018-08-28 2020-03-05 株式会社モルフォ Image identification device, image identification method, and image identification program

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019506739A (en) * 2016-01-06 2019-03-07 ケーエルエー−テンカー コーポレイション Feature selection and automatic processing window monitoring through outlier detection
JP2019537135A (en) * 2016-11-04 2019-12-19 ディープマインド テクノロジーズ リミテッド Understanding and generating scenes using neural networks
JP2018195119A (en) * 2017-05-18 2018-12-06 住友電装株式会社 Abnormality detecting apparatus and abnormality detecting method
JP2019016292A (en) * 2017-07-10 2019-01-31 凸版印刷株式会社 Content generation device, content generation method, and program
US20190287230A1 (en) * 2018-03-19 2019-09-19 Kla-Tencor Corporation Semi-supervised anomaly detection in scanning electron microscope images
US20190332900A1 (en) * 2018-04-30 2019-10-31 Elekta Ab Modality-agnostic method for medical image representation
US20200034654A1 (en) * 2018-07-30 2020-01-30 Siemens Healthcare Gmbh Deep Variational Method for Deformable Image Registration
JP2020035097A (en) * 2018-08-28 2020-03-05 株式会社モルフォ Image identification device, image identification method, and image identification program
JP6621117B1 (en) * 2018-10-25 2019-12-18 株式会社アルム Image processing apparatus, image processing system, and image processing program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024068203A1 (en) 2022-09-28 2024-04-04 Carl Zeiss Smt Gmbh Computer implemented method for defect detection in an imaging dataset of a wafer, corresponding computer-readable medium, computer program product and systems making use of such methods

Also Published As

Publication number Publication date
JP2021144314A (en) 2021-09-24
JP7426261B2 (en) 2024-02-01

Similar Documents

Publication Publication Date Title
WO2021181749A1 (en) Learning device, image inspection device, learned parameter, learning method, and image inspection method
JPWO2020031984A1 (en) Parts inspection method and inspection system
JP7004145B2 (en) Defect inspection equipment, defect inspection methods, and their programs
US11645744B2 (en) Inspection device and inspection method
US20140348415A1 (en) System and method for identifying defects in welds by processing x-ray images
WO2020055555A1 (en) Deep auto-encoder for equipment health monitoring and fault detection in semiconductor and display process equipment tools
JP6844563B2 (en) Inspection equipment, image identification equipment, identification equipment, inspection method, and inspection program
JP7435303B2 (en) Inspection device, unit selection device, inspection method, and inspection program
JP6347589B2 (en) Information processing apparatus, information processing method, and program
JP2024504735A (en) System and method for manufacturing quality control using automated visual inspection
JP7453813B2 (en) Inspection equipment, inspection methods, programs, learning devices, learning methods, and learned datasets
JP7459697B2 (en) Anomaly detection system, learning device, anomaly detection program, learning program, anomaly detection method, and learning method
JP7414629B2 (en) Learning data processing device, learning device, learning data processing method, and program
KR20230036650A (en) Defect detection method and system based on image patch
CN113837173A (en) Target object detection method and device, computer equipment and storage medium
JP2021135630A (en) Learning device, image inspection device, learned data set, and learning method
US20230274409A1 (en) Method for automatic quality inspection of an aeronautical part
Kim et al. CECvT: Initial Diagnosis of Anomalies in Thermal Images
JP7446697B2 (en) Teacher data creation method and creation device
US20240112325A1 (en) Automatic Optical Inspection Using Hybrid Imaging System
JP2023008416A (en) Abnormality detection system and abnormality detection method
WO2022181304A1 (en) Inspection system and inspection program
WO2021229901A1 (en) Image inspection device, image inspection method, and prelearned model generation device
KR102640093B1 (en) Method, apparatus and computer program for correction artifact in image of object
US20230316718A1 (en) Learning model generating method and inspection device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20924063

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20924063

Country of ref document: EP

Kind code of ref document: A1