JP2020181532A - Image determination device and image determination method - Google Patents

Image determination device and image determination method Download PDF

Info

Publication number
JP2020181532A
JP2020181532A JP2019086135A JP2019086135A JP2020181532A JP 2020181532 A JP2020181532 A JP 2020181532A JP 2019086135 A JP2019086135 A JP 2019086135A JP 2019086135 A JP2019086135 A JP 2019086135A JP 2020181532 A JP2020181532 A JP 2020181532A
Authority
JP
Japan
Prior art keywords
image
determination
normality
values
function
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
JP2019086135A
Other languages
Japanese (ja)
Inventor
林 伸一
Shinichi Hayashi
伸一 林
三宅 正人
Masato Miyake
正人 三宅
直史 茅島
Tadashi Kayashima
直史 茅島
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2019086135A priority Critical patent/JP2020181532A/en
Publication of JP2020181532A publication Critical patent/JP2020181532A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

To improve the determination accuracy of processing that determines the normality of an image.SOLUTION: A storage unit 711 stores a restoration model 721 that extracts a feature from input data and creates output data restored from the extracted feature. The storage unit 711 further stores a reference value 722 that is obtained by causing the restoration model to learn a normal image at a plurality of times, and is based on a plurality of values of a function indicating a difference between the input data and the output data. A learning processing unit 712 causes the restoration model 721 to learn an image to be determined at a plurality of times to acquire the plurality of values of the function. A determination unit 713 determines the normality of the image to be determined by using the reference value 722 and the plurality of values of the function acquired by causing the restoration model 721 to learn the image to be determined at a plurality of times, and an output unit 714 outputs a determination result indicating the normality of the image to be determined.SELECTED DRAWING: Figure 7

Description

本発明は、画像判定装置及び画像判定方法に関する。 The present invention relates to an image determination device and an image determination method.

工場の生産ライン等において、製造された製品の傷、凹み、汚れ等の不良部分を検出するために、外観検査が実施されている。この外観検査では、各生産ラインに配置された検査員が、あらかじめ規定された検査基準に基づいて目視で判別を行うことにより、製品が不良品であるか否かが判定される。 Visual inspections are carried out on production lines of factories and the like in order to detect defective parts such as scratches, dents, and stains on manufactured products. In this visual inspection, an inspector assigned to each production line visually determines whether or not the product is defective based on a predetermined inspection standard.

しかし、検査基準は、「視力○○で○m離れて傷がみえないこと」、「○×○ミリ範囲の傷が○個以下」のような、テキストで表現されることが多い。この場合、様々な形態を取る不良部分に対して、限られた検査時間内で個人の感覚に依存して判定が行われるため、判定結果にばらつきが生じる。このため、段階的に複数の検査員を配置して誤判定を防ぐ等の対策が行われることが多く、人件費がかさむ要因となる。 However, the inspection criteria are often expressed in texts such as "no scratches can be seen at a distance of XX m with visual acuity XX" and "less than XX scratches in the XX mm range". In this case, since the determination is made depending on the individual's sense within the limited inspection time for the defective portion taking various forms, the determination result varies. For this reason, measures such as allocating a plurality of inspectors in stages to prevent erroneous judgments are often taken, which causes an increase in labor costs.

そこで、近年では、パターンマッチング法、特徴抽出法等の画像処理技術を用いた自動判定システムの導入が進んでいる。 Therefore, in recent years, the introduction of an automatic determination system using image processing techniques such as a pattern matching method and a feature extraction method has been progressing.

異常検知に関連して、自己符号化器を用いて異常を検知する技術が知られている(例えば、特許文献1及び特許文献2を参照)。ディープラーニング等を用いてコンクリート構造物の施工品質を評価する技術も知られている(例えば、特許文献3を参照)。 In relation to abnormality detection, a technique for detecting an abnormality using a self-encoder is known (see, for example, Patent Document 1 and Patent Document 2). A technique for evaluating the construction quality of a concrete structure using deep learning or the like is also known (see, for example, Patent Document 3).

特開2018−73258号公報JP-A-2018-73258 特開2018−112863号公報Japanese Unexamined Patent Publication No. 2018-12863 特開2016−142601号公報Japanese Unexamined Patent Publication No. 2016-142601

画像処理技術を用いた自動判定システムでは、製品を撮影した撮影画像に対する判定結果の精度を、検査基準に沿った実用的なレベルまで向上させることは困難である。 With an automatic determination system using image processing technology, it is difficult to improve the accuracy of the determination result for the captured image of the product to a practical level in line with the inspection standard.

なお、かかる問題は、工場の生産ライン等における製品の外観検査に限らず、様々な撮影対象を撮影した撮影画像の正常性を判定する処理において生ずるものである。 It should be noted that such a problem occurs not only in the visual inspection of the product on the production line of the factory but also in the process of determining the normality of the photographed images of various photographed objects.

1つの側面において、本発明は、画像の正常性を判定する処理の判定精度を向上させることを目的とする。 In one aspect, the present invention aims to improve the determination accuracy of a process for determining the normality of an image.

1つの案では、画像判定装置は、記憶部、学習処理部、判定部、及び出力部を含む。記憶部は、入力データから特徴を抽出し、抽出された特徴から復元された出力データを生成する、復元モデルを記憶する。さらに、記憶部は、復元モデルに正常画像を複数回学習させることで取得された、入力データと出力データとの誤差を示す関数の複数の値に基づく、基準値を記憶する。 In one proposal, the image determination device includes a storage unit, a learning processing unit, a determination unit, and an output unit. The storage unit stores a restored model that extracts features from the input data and generates output data restored from the extracted features. Further, the storage unit stores a reference value based on a plurality of values of a function indicating an error between the input data and the output data, which is acquired by having the restoration model learn the normal image a plurality of times.

学習処理部は、復元モデルに判定対象画像を複数回学習させることで、関数の複数の値を取得する。判定部は、復元モデルに判定対象画像を複数回学習させることで取得された関数の複数の値と、基準値とを用いて、判定対象画像の正常性を判定し、出力部は、判定対象画像の正常性を示す判定結果を出力する。 The learning processing unit acquires a plurality of values of the function by causing the restoration model to learn the image to be determined a plurality of times. The judgment unit determines the normality of the judgment target image using the plurality of values of the function acquired by training the restoration model multiple times and the reference value, and the output unit determines the judgment target. Outputs the judgment result indicating the normality of the image.

1つの側面において、画像の正常性を判定する処理の判定精度を向上させることができる。 In one aspect, the determination accuracy of the process for determining the normality of the image can be improved.

画像処理装置の学習時における機能的構成図である。It is a functional block diagram at the time of learning of an image processing apparatus. 損失関数の値の変化を示す図である。It is a figure which shows the change of the value of a loss function. 正常画像の復元処理を示す図である。It is a figure which shows the restoration process of a normal image. 画像処理装置の判定時における機能的構成図である。It is a functional block diagram at the time of determination of an image processing apparatus. 正常画像に対する判定処理を示す図である。It is a figure which shows the determination process for a normal image. 異常画像に対する判定処理を示す図である。It is a figure which shows the determination process for an abnormal image. 画像判定装置の機能的構成図である。It is a functional block diagram of an image determination device. 画像判定処理のフローチャートである。It is a flowchart of an image determination process. 外観検査システムの機能的構成図である。It is a functional block diagram of a visual inspection system. 判定対象画像を示す図である。It is a figure which shows the image to be determined. 正常画像及び判定対象画像に対する損失関数の値の変化を示す図である。It is a figure which shows the change of the value of the loss function with respect to a normal image and a judgment target image. 正常画像に対する損失関数の値を示す図である。It is a figure which shows the value of the loss function with respect to a normal image. 判定対象画像に対する損失関数の値を示す図である。It is a figure which shows the value of the loss function with respect to the image to be determined. 学習処理のフローチャートである。It is a flowchart of a learning process. 判定処理のフローチャートである。It is a flowchart of a determination process. 情報処理装置の構成図である。It is a block diagram of an information processing apparatus.

以下、図面を参照しながら、実施形態を詳細に説明する。
上述したように、近年の外観検査では、パターンマッチング法、特徴抽出法等の画像処理技術の導入が進んでいる。
Hereinafter, embodiments will be described in detail with reference to the drawings.
As described above, in recent visual inspections, the introduction of image processing techniques such as a pattern matching method and a feature extraction method is progressing.

パターンマッチング法では、撮影画像と正常画像との重ね合わせにより、差分の有無が判定される。正常画像は、傷、凹み、汚れ等の不良部分を含まない、良好な製品(良品)が写っている画像である。このようなパターンマッチング法では、撮影画像と正常画像との間における位置ずれが生じない撮影環境を整備するか、又は別の画像処理により位置ずれ補正を行うことが望ましく、整備コスト又は処理負荷が増加する。また、照明の明るさ又は方向によって撮影画像と正常画像との間に差分が生じる場合、誤判定が増加する。 In the pattern matching method, the presence or absence of a difference is determined by superimposing the captured image and the normal image. A normal image is an image showing a good product (good product) that does not include defective parts such as scratches, dents, and stains. In such a pattern matching method, it is desirable to prepare a shooting environment in which no positional deviation occurs between the captured image and the normal image, or to correct the positional deviation by another image processing, which increases the maintenance cost or processing load. To increase. Further, when a difference occurs between the captured image and the normal image depending on the brightness or direction of the illumination, the erroneous determination increases.

特徴抽出法では、異常パターンとしてあらかじめ想定される特徴が撮影画像から探索される。このため、傷又は汚れの場所、太さ、傾き、面積等が異なる多数の異常パターンが存在する場合、すべての異常パターンを漏れなく検出することは難しい。 In the feature extraction method, a feature assumed in advance as an abnormal pattern is searched from the captured image. Therefore, when there are many abnormal patterns having different scratches or stains, thickness, inclination, area, etc., it is difficult to detect all the abnormal patterns without omission.

最近では、機械学習に代表される人工知能を活用した画像判定技術の導入も検討されている。この画像判定技術は、大きく以下の2つの方法に分けられる。
(M1)SVM(Support Vector Machine)、CNN(Convolutional Neural Network)等のモデルに、正常画像及び異常画像と教師ラベルとを学習させ、学習後のモデルを用いて撮影画像を分類する分類方法。
(M2)畳み込み自己符号化器(Convolutional Auto Encoder,CAE)に正常画像を学習させ、学習後のCAEに対する入力画像と出力画像との差分に基づいて、入力画像が正常か否かを判別する判別方法。
Recently, the introduction of image judgment technology utilizing artificial intelligence represented by machine learning is also being considered. This image determination technique can be roughly divided into the following two methods.
(M1) A classification method in which a model such as SVM (Support Vector Machine) or CNN (Convolutional Neural Network) is made to learn a normal image and an abnormal image and a teacher label, and the photographed image is classified using the model after learning.
(M2) A convolutional autoencoder (CAE) is trained to learn a normal image, and a determination is made to determine whether the input image is normal or not based on the difference between the input image and the output image for the learned CAE. Method.

異常画像は、不良部分を含む不良品が写っている画像である。(M1)の分類方法には、以下のような問題がある。
(a)大量の正常画像及び大量の異常画像をモデルに学習させることが望ましいが、不良品の発生数が少ない場合、学習に十分な量の異常画像を用意することが困難である。
(b)学習されていない異常パターンを含む撮影画像の分類精度が低下する。
(c)正常画像及び異常画像に対する教師ラベルは、各画像が正常画像又は異常画像のいずれであるかを示し、作業者によって付与される。このため、目視検査の場合と同様のばらつきが教師ラベルに生じ、分類結果に影響を及ぼす。
An abnormal image is an image showing a defective product including a defective portion. The classification method of (M1) has the following problems.
(A) It is desirable to train a model with a large amount of normal images and a large number of abnormal images, but when the number of defective products is small, it is difficult to prepare a sufficient amount of abnormal images for learning.
(B) The classification accuracy of captured images including unlearned abnormal patterns is reduced.
(C) A teacher label for a normal image and an abnormal image indicates whether each image is a normal image or an abnormal image, and is given by an operator. For this reason, the same variation as in the case of visual inspection occurs in the teacher label, which affects the classification result.

一方、(M2)の判別方法では、正常画像のみを使用して学習が行われ、教師ラベルも不要なため、(a)〜(c)のような問題が生じない利点がある。 On the other hand, the discrimination method (M2) has an advantage that the problems (a) to (c) do not occur because learning is performed using only normal images and no teacher label is required.

図1は、(M2)の判別方法を用いる画像処理装置の学習時における機能的構成例を示している。図1の画像処理装置101は、CAE111及び損失関数112を含み、CAE111は、符号化部121及び復号部122を含む。 FIG. 1 shows an example of a functional configuration at the time of learning of an image processing apparatus using the discrimination method (M2). The image processing apparatus 101 of FIG. 1 includes a CAE 111 and a loss function 112, and the CAE 111 includes a coding unit 121 and a decoding unit 122.

符号化部121は、入力画像から特徴を抽出して、抽出された特徴を符号化する。復号部122は、符号化された特徴を復号し、特徴から復元された復元画像を出力画像として出力する。符号化部121及び復号部122は、ニューラルネットワークを用いて生成され、重み及びバイアスをパラメータとして含む。 The coding unit 121 extracts features from the input image and encodes the extracted features. The decoding unit 122 decodes the encoded feature and outputs the restored image restored from the feature as an output image. The coding unit 121 and the decoding unit 122 are generated using a neural network and include weights and biases as parameters.

学習時には、入力画像として正常画像がCAE111に入力され、CAE111は、正常画像の特徴から復元された復元画像を出力する。損失関数112は、CAE111に入力される入力画像と、CAE111から出力される出力画像との誤差を示す関数である。画像処理装置101は、損失関数112を用いて、正常画像と復元画像との誤差を評価し、損失関数の値が小さくなるように、CAE111内部のパラメータを調整しながら、正常画像に対する学習を繰り返す。 At the time of learning, a normal image is input to CAE111 as an input image, and CAE111 outputs a restored image restored from the features of the normal image. The loss function 112 is a function indicating an error between the input image input to the CAE 111 and the output image output from the CAE 111. The image processing device 101 evaluates the error between the normal image and the restored image by using the loss function 112, and repeats learning for the normal image while adjusting the parameters inside the CAE 111 so that the value of the loss function becomes small. ..

図2は、学習時における損失関数の値の変化の例を示している。横軸の学習回数は、同じ正常画像に対する学習の繰り返し回数を表し、縦軸は、計算された損失関数の値を表す。この例では、学習回数が増加するにつれて損失関数の値が減少しており、学習回数が5回を超えると、損失関数の値は十分に小さな値に収束している。 FIG. 2 shows an example of a change in the value of the loss function during learning. The horizontal axis represents the number of times of learning for the same normal image, and the vertical axis represents the value of the calculated loss function. In this example, the value of the loss function decreases as the number of learnings increases, and when the number of learnings exceeds 5, the value of the loss function converges to a sufficiently small value.

図3は、学習が進んだ状態における正常画像の復元処理の例を示している。CAE111は、複数の正常画像301各々の特徴を学習して、正常画像302を復元する。このように、十分に学習が進んだ状態になると、CAE111内部に正常画像302を復元するためのパラメータが蓄積され、正常画像301を入力すれば、同様の正常画像302が復元画像として出力されるようになる。 FIG. 3 shows an example of a normal image restoration process in a state where learning has progressed. The CAE 111 learns the characteristics of each of the plurality of normal images 301 and restores the normal image 302. In this way, when the learning is sufficiently advanced, the parameters for restoring the normal image 302 are accumulated inside the CAE 111, and if the normal image 301 is input, the same normal image 302 is output as the restored image. Will be.

図4は、図1の画像処理装置101の判定時における機能的構成例を示している。図4の画像処理装置101は、学習後のCAE111、画像差分抽出部401、及び異常判定部402を含む。 FIG. 4 shows an example of a functional configuration at the time of determination of the image processing device 101 of FIG. The image processing device 101 of FIG. 4 includes a CAE 111 after learning, an image difference extraction unit 401, and an abnormality determination unit 402.

判定時には、入力画像として判定対象画像がCAE111に入力され、CAE111は、判定対象画像の特徴から復元された復元画像を出力する。画像差分抽出部401は、判定対象画像の画素値と復元画像の画素値との直接的な差分を計算し、異常判定部402は、計算された差分の大きさに基づいて、判定対象画像が正常画像又は異常画像のいずれであるかを判定する。 At the time of determination, the determination target image is input to CAE111 as an input image, and CAE111 outputs the restored image restored from the features of the determination target image. The image difference extraction unit 401 calculates the direct difference between the pixel value of the determination target image and the pixel value of the restored image, and the abnormality determination unit 402 determines that the determination target image is based on the calculated difference magnitude. Determine whether it is a normal image or an abnormal image.

図5は、正常画像に対する判定処理の例を示している。判定対象画像501が正常画像である場合、CAE111は、判定対象画像501とほぼ同様の正常画像を復元画像502として出力する。この場合、判定対象画像501と復元画像502との差分は、比較的小さくなる。 FIG. 5 shows an example of determination processing for a normal image. When the determination target image 501 is a normal image, the CAE 111 outputs a normal image substantially the same as the determination target image 501 as the restored image 502. In this case, the difference between the determination target image 501 and the restored image 502 is relatively small.

図6は、異常画像に対する判定処理の例を示している。傷611が写っている異常画像が判定対象画像601である場合、CAE111は、判定対象画像601をなんとか正常画像に合わせ込もうとする。ところが、CAE111によって復元された復元画像602は、傷611の名残りを示す異常部分612がある程度残った画像となる。この場合、判定対象画像601と復元画像602との差分は、図5の場合よりも大きくなる。 FIG. 6 shows an example of determination processing for an abnormal image. When the abnormal image in which the scratch 611 is shown is the determination target image 601, the CAE 111 manages to match the determination target image 601 with the normal image. However, the restored image 602 restored by CAE111 is an image in which an abnormal portion 612 showing the remnants of the scratch 611 remains to some extent. In this case, the difference between the determination target image 601 and the restored image 602 is larger than that in the case of FIG.

異常判定部402は、判定対象画像と復元画像との差分が一定値以下である場合、判定対象画像が正常画像であると判定し、差分が一定値よりも大きい場合、判定対象画像が異常画像であると判定する。 The abnormality determination unit 402 determines that the determination target image is a normal image when the difference between the determination target image and the restored image is less than a certain value, and when the difference is larger than a certain value, the determination target image is an abnormality image. Is determined to be.

しかしながら、(M2)の判別方法には、以下のような問題がある。
上述したように、外観検査の現場では、あらかじめ規定された検査基準に基づいて製品が検査されるため、例えば、傷の程度(濃淡、深さ、又は反射)を考慮して製品を検査することが望ましい。傷の程度を考慮した検査基準としては、次のようなものが挙げられる。
(C1)目立つ傷の場合は、傷の長さ、幅、又は範囲が小さくても異常とみなす。
(C2)薄くかすれた傷のように、傷が小さい場合は異常とみなさず、傷が所定範囲以上に広がっている場合、又は複数個所に点在している場合に、初めて異常とみなす。
However, the discrimination method of (M2) has the following problems.
As mentioned above, in the field of visual inspection, the product is inspected based on the inspection standard specified in advance. Therefore, for example, the product should be inspected in consideration of the degree of scratches (shade, depth, or reflection). Is desirable. The following are examples of inspection criteria that take into account the degree of scratches.
(C1) In the case of a conspicuous scratch, even if the length, width, or range of the scratch is small, it is regarded as abnormal.
(C2) If the scratch is small, such as a thin and faint scratch, it is not considered to be abnormal, and if the scratch spreads beyond a predetermined range or is scattered in multiple places, it is considered to be abnormal for the first time.

しかし、(M2)の判別方法では、判定対象画像と復元画像との差分に基づいて、判定対象画像に対する判定が行われる。このため、判定対象画像に、製品の位置ずれ、傾き、明るさの差異等のように、不良部分ではないが正常画像とは異なる部分が含まれている場合、判定対象画像と復元画像との差分が大きくなり、異常画像であると誤判定されやすくなる。また、本来の検出対象である傷に由来する差分が、傷以外の部分に由来する差分の中に埋もれてしまい、異常画像の見逃しが発生することもあり得る。 However, in the determination method (M2), the determination target image is determined based on the difference between the determination target image and the restored image. For this reason, if the judgment target image includes a part that is not a defective part but is different from the normal image, such as a product misalignment, inclination, difference in brightness, etc., the judgment target image and the restored image The difference becomes large, and it becomes easy to be erroneously determined as an abnormal image. In addition, the difference derived from the scratch that is the original detection target may be buried in the difference derived from the portion other than the scratch, and the abnormal image may be overlooked.

したがって、判定対象画像に対する判定結果の精度を、傷の程度を考慮した検査基準に沿った実用的なレベルまで向上させることは困難である。 Therefore, it is difficult to improve the accuracy of the judgment result for the judgment target image to a practical level in line with the inspection standard considering the degree of scratches.

図7は、実施形態の画像判定装置の機能的構成例を示している。図7の画像判定装置701は、記憶部711、学習処理部712、判定部713、及び出力部714を含む。 FIG. 7 shows an example of a functional configuration of the image determination device of the embodiment. The image determination device 701 of FIG. 7 includes a storage unit 711, a learning processing unit 712, a determination unit 713, and an output unit 714.

記憶部711は、入力データから特徴を抽出し、抽出された特徴から復元された出力データを生成する、復元モデル721を記憶する。さらに、記憶部711は、復元モデル721に正常画像を複数回学習させることで取得された、入力データと出力データとの誤差を示す関数の複数の値に基づく、基準値722を記憶する。学習処理部712及び判定部713は、復元モデル721及び基準値722を用いて画像判定処理を行う。 The storage unit 711 stores the restoration model 721 that extracts features from the input data and generates output data restored from the extracted features. Further, the storage unit 711 stores a reference value 722 based on a plurality of values of a function indicating an error between the input data and the output data, which is acquired by causing the restoration model 721 to learn the normal image a plurality of times. The learning processing unit 712 and the determination unit 713 perform image determination processing using the restoration model 721 and the reference value 722.

図8は、図7の画像判定装置701が行う画像判定処理の例を示すフローチャートである。まず、学習処理部712は、復元モデル721に判定対象画像を複数回学習させることで、関数の複数の値を取得する(ステップ801)。次に、判定部713は、復元モデル721に判定対象画像を複数回学習させることで取得された関数の複数の値と、基準値とを用いて、判定対象画像の正常性を判定する(ステップ802)。そして、出力部714は、判定対象画像の正常性を示す判定結果を出力する(ステップ803)。 FIG. 8 is a flowchart showing an example of the image determination process performed by the image determination device 701 of FIG. 7. First, the learning processing unit 712 acquires a plurality of values of the function by causing the restoration model 721 to learn the image to be determined a plurality of times (step 801). Next, the determination unit 713 determines the normality of the determination target image by using the plurality of values of the function acquired by training the restoration model 721 a plurality of times and the reference value (step). 802). Then, the output unit 714 outputs a determination result indicating the normality of the determination target image (step 803).

図7の画像判定装置701によれば、画像の正常性を判定する処理の判定精度を向上させることができる。 According to the image determination device 701 of FIG. 7, the determination accuracy of the process for determining the normality of the image can be improved.

図9は、図7の画像判定装置701を含む外観検査システムの機能的構成例を示している。図9の外観検査システムは、画像判定装置901及び撮像装置902を含み、学習モード及び判定モードの2種類の動作モードを有する。外観検査の検査対象は、生産ライン904上の製品903である。 FIG. 9 shows a functional configuration example of the visual inspection system including the image determination device 701 of FIG. The visual inspection system of FIG. 9 includes an image determination device 901 and an image pickup device 902, and has two types of operation modes, a learning mode and a determination mode. The inspection target of the visual inspection is the product 903 on the production line 904.

画像判定装置901は、図7の画像判定装置701に対応し、記憶部911、画像取得部912、画像加工部913、学習処理部914、計算部915、判定部916、及び出力部917を含む。記憶部911、学習処理部914、判定部916、及び出力部917は、図7の記憶部711、学習処理部712、判定部713、及び出力部714にそれぞれ対応する。 The image determination device 901 corresponds to the image determination device 701 of FIG. 7, and includes a storage unit 911, an image acquisition unit 912, an image processing unit 913, a learning processing unit 914, a calculation unit 915, a determination unit 916, and an output unit 917. .. The storage unit 911, the learning processing unit 914, the determination unit 916, and the output unit 917 correspond to the storage unit 711, the learning processing unit 712, the determination unit 713, and the output unit 714 of FIG. 7, respectively.

撮像装置902は、例えば、CCD(Charged-Coupled Device)、CMOS(Complementary Metal-Oxide-Semiconductor)等の撮像素子を有するカメラであり、判定モードにおいて製品903を撮影する。画像取得部912は、撮影された画像を撮像装置902から取得し、取得した画像を判定対象画像926として記憶部911に格納する。 The image pickup device 902 is a camera having an image pickup element such as a CCD (Charged-Coupled Device) or a CMOS (Complementary Metal-Oxide-Semiconductor), and photographs the product 903 in the determination mode. The image acquisition unit 912 acquires the captured image from the image pickup apparatus 902, and stores the acquired image as the determination target image 926 in the storage unit 911.

画像加工部913は、判定対象画像926を複数の領域に分割する。例えば、複数の領域としては、n×n(nは2以上の整数)のブロックが用いられる。判定対象画像926に写っている判定対象の不良部分は、製品全体の大きさと比較して小さいことが多い。この場合、判定対象画像926を分割して領域毎に画像を評価することで、判定精度をより向上させることができる。 The image processing unit 913 divides the determination target image 926 into a plurality of regions. For example, as a plurality of regions, blocks of n × n (n is an integer of 2 or more) are used. The defective portion of the determination target shown in the determination target image 926 is often small compared to the size of the entire product. In this case, the determination accuracy can be further improved by dividing the determination target image 926 and evaluating the image for each region.

図10は、複数のブロックに分割された判定対象画像926の例を示している。判定対象画像1001は、縦横の境界線によって8×8(64個)のブロック1002に分割されている。 FIG. 10 shows an example of the determination target image 926 divided into a plurality of blocks. The determination target image 1001 is divided into 8 × 8 (64 pieces) blocks 1002 by vertical and horizontal boundaries.

画像加工部913は、判定対象画像926に写っている不良部分を目立たせるために、ソーベルフィルタ、エッジフィルタ等によるフィルタ加工のような画像変換を施すこともできる。 The image processing unit 913 can also perform image conversion such as filter processing by a sobel filter, an edge filter, or the like in order to make the defective portion reflected in the determination target image 926 stand out.

記憶部911は、CAE921、損失関数922、画像集合923−1、及び画像集合923−2を記憶する。 The storage unit 911 stores the CAE921, the loss function 922, the image set 923-1 and the image set 923-2.

CAE921は、学習前の復元モデルの一例であり、入力画像から特徴を抽出し、抽出された特徴から復元された出力画像を生成する。判定対象画像926が複数の領域に分割される場合、CAE921も領域毎に用意される。例えば、判定対象画像926が64個の領域に分割される場合、記憶部911は、64個のCAE921を記憶する。 CAE921 is an example of a restoration model before learning, extracts features from an input image, and generates an output image restored from the extracted features. When the determination target image 926 is divided into a plurality of regions, CAE921 is also prepared for each region. For example, when the determination target image 926 is divided into 64 areas, the storage unit 911 stores 64 CAE921s.

損失関数922は、CAE921の損失関数である。例えば、損失関数922としては、入力画像と出力画像との間のクロスエントロピー誤差、最小二乗誤差等を示す関数が用いられる。 The loss function 922 is the loss function of CAE921. For example, as the loss function 922, a function indicating a cross entropy error between an input image and an output image, a least squares error, and the like is used.

画像集合923−1は、CAE921に入力される学習用の正常画像の集合であり、画像集合923−2は、学習後のCAE924に入力される正常画像の集合である。不良部分を含まない良品を撮像装置902によって撮影することで、これらの正常画像を取得することができる。 The image set 923-1 is a set of normal images for learning input to CAE921, and the image set 923-2 is a set of normal images input to CAE924 after learning. These normal images can be obtained by photographing a non-defective product that does not include a defective portion with the image pickup apparatus 902.

学習モードにおいて、画像加工部913は、画像集合923−1及び画像集合923−2に含まれる各正常画像を複数の領域に分割し、領域毎の正常画像を生成する。学習処理部914は、領域毎のCAE921に、画像集合923−1から生成された領域毎の正常画像を複数回学習させることで、CAE921内部のパラメータを決定する。 In the learning mode, the image processing unit 913 divides each normal image included in the image set 923-1 and the image set 923-2 into a plurality of regions, and generates a normal image for each region. The learning processing unit 914 determines the parameters inside the CAE921 by causing the CAE921 for each region to learn the normal image for each region generated from the image set 923-1 a plurality of times.

学習処理部914は、領域毎の損失関数922の値が小さくなるように、CAE921内部のパラメータを調整しながら学習を繰り返し、損失関数922の値の変化量が所定値よりも小さくなると、得られたパラメータを学習結果に決定する。そして、学習処理部914は、領域毎のCAE921に決定されたパラメータを設定することで、学習後における領域毎のCAE924を生成して、記憶部911に格納する。 The learning processing unit 914 repeats learning while adjusting the parameters inside CAE921 so that the value of the loss function 922 for each region becomes small, and when the amount of change in the value of the loss function 922 becomes smaller than a predetermined value, it is obtained. The parameters are determined as the learning result. Then, the learning processing unit 914 generates a CAE 924 for each area after learning by setting the parameters determined in the CAE 921 for each area, and stores the CAE 924 in the storage unit 911.

次に、学習処理部914は、領域毎のCAE924に、画像集合923−2から生成された領域毎の正常画像を複数回学習させることで、領域毎の損失関数922の複数の値を取得する。これらの値は、画像集合923−2の学習における損失関数922の履歴情報を表す。計算部915は、取得された領域毎の損失関数922の複数の値を用いて、領域毎の基準値925を計算し、記憶部911に格納する。 Next, the learning processing unit 914 acquires a plurality of values of the loss function 922 for each region by causing the CAE 924 for each region to learn the normal image for each region generated from the image set 923-2 a plurality of times. .. These values represent the historical information of the loss function 922 in the training of the image set 923-2. The calculation unit 915 calculates a reference value 925 for each area using a plurality of values of the acquired loss function 922 for each area, and stores the reference value 925 for each area in the storage unit 911.

CAE924及び基準値925は、図7の復元モデル721及び基準値722にそれぞれ対応する。復元モデル721としてCAE924を用いることで、入力画像と出力画像との誤差を示す関数として、損失関数922を用いることが可能になる。 The CAE 924 and the reference value 925 correspond to the restoration model 721 and the reference value 722 of FIG. 7, respectively. By using CAE924 as the restoration model 721, it becomes possible to use the loss function 922 as a function indicating the error between the input image and the output image.

画像集合923−2に含まれる正常画像の枚数は、画像集合923−1に含まれる学習用の正常画像の枚数よりも少数でよい。例えば、100個の良品を撮影することで100枚の正常画像が取得された場合、そのうち90枚〜99枚の正常画像を画像集合923−1として用い、残りの10枚〜1枚の正常画像を画像集合923−2として用いることができる。画像集合923−2は、画像集合923−1の一部分であっても構わない。多数の正常画像を含む画像集合923−1をCAE921に学習させることで、高い復元性能を有するCAE924を生成することができる。 The number of normal images included in the image set 923-2 may be smaller than the number of normal images for learning included in the image set 923-1. For example, when 100 normal images are obtained by shooting 100 good products, 90 to 99 normal images are used as an image set 923-1 and the remaining 10 to 1 normal images are used. Can be used as the image set 923-2. The image set 923-2 may be a part of the image set 923-1. By training CAE921 with an image set 923-1 containing a large number of normal images, CAE924 having high restoration performance can be generated.

また、画像集合923−2の各正常画像に対する学習の繰り返し回数(エポック数)は、画像集合923−1の各正常画像に対する学習のエポック数よりも少数でよい。例えば、画像集合923−1に対するエポック数が数千回〜数万回である場合でも、画像集合923−2に対するエポック数は数回〜10回程度で構わない。 Further, the number of repetitions of learning (number of epochs) for each normal image of the image set 923-2 may be smaller than the number of learning epochs for each normal image of the image set 923-1. For example, even if the number of epochs for the image set 923-1 is several thousand to tens of thousands, the number of epochs for the image set 923-2 may be several to ten times.

判定モードにおいて、画像加工部913は、判定対象画像926を複数の領域に分割し、領域毎の判定対象画像を生成する。学習処理部914は、領域毎のCAE924に領域毎の判定対象画像を複数回学習させることで、領域毎の損失関数922の複数の値を取得する。これらの値は、領域毎の判定対象画像の学習における損失関数922の履歴情報を表す。判定対象画像926に対するエポック数としては、画像集合923−2に対するエポック数を用いることができる。 In the determination mode, the image processing unit 913 divides the determination target image 926 into a plurality of regions and generates a determination target image for each region. The learning processing unit 914 acquires a plurality of values of the loss function 922 for each region by causing the CAE 924 for each region to learn the determination target image for each region a plurality of times. These values represent the history information of the loss function 922 in learning the image to be determined for each region. As the number of epochs for the image to be determined 926, the number of epochs for the image set 923-2 can be used.

判定部916は、領域毎の判定対象画像を用いて取得された損失関数922の複数の値と、領域毎の基準値925とを用いて、その判定対象画像の正常性を示す指標を計算する。そして、判定部916は、領域毎に計算された指標と閾値T1とを比較することで、判定対象画像926の正常性を判定し、判定対象画像926の正常性を示す判定結果927を記憶部911に格納する。判定結果927は、判定対象画像926が正常画像又は異常画像のいずれであるかを示す。出力部917は、判定結果927を出力する。 The determination unit 916 calculates an index indicating the normality of the determination target image using a plurality of values of the loss function 922 acquired using the determination target image for each region and the reference value 925 for each region. .. Then, the determination unit 916 determines the normality of the determination target image 926 by comparing the index calculated for each region with the threshold value T1, and stores the determination result 927 indicating the normality of the determination target image 926. Store in 911. The determination result 927 indicates whether the determination target image 926 is a normal image or an abnormal image. The output unit 917 outputs the determination result 927.

図11は、画像集合923−2の領域毎の正常画像に対する学習と、領域毎の判定対象画像に対する学習における、損失関数922の値の変化の例を示している。横軸は、学習回数を表し、縦軸は、計算された損失関数922の値を表す。 FIG. 11 shows an example of the change in the value of the loss function 922 in the learning for the normal image for each region of the image set 923-2 and the learning for the determination target image for each region. The horizontal axis represents the number of learnings, and the vertical axis represents the calculated value of the loss function 922.

判定対象画像Qは異常画像であり、いずれの学習回数においても、判定対象画像Qに対する損失関数922の値は、画像集合923−2に含まれる正常画像P1〜正常画像P5に対する損失関数922の値よりも大きくなっている。 The judgment target image Q is an abnormal image, and the value of the loss function 922 for the judgment target image Q is the value of the loss function 922 for the normal images P1 to the normal image P5 included in the image set 923-2 at any number of learning times. Is bigger than.

図12は、画像集合923−2の領域毎の正常画像に対する学習における、損失関数922の値の例を示している。図12では、正常画像P1〜正常画像P5に対する損失関数922の値が示されており、正常画像P6〜正常画像P10に対する損失関数922の値は省略されている。m回(m=1〜10)の列の数値は、m回目の学習が終了した時点における損失関数922の値を表し、累計は、1回〜10回の列の数値の総和を表す。 FIG. 12 shows an example of the value of the loss function 922 in learning the normal image for each region of the image set 923-2. In FIG. 12, the values of the loss function 922 for the normal images P1 to P5 are shown, and the values of the loss function 922 for the normal images P6 to P10 are omitted. The numerical value in the column of m times (m = 1 to 10) represents the value of the loss function 922 at the time when the m-th learning is completed, and the cumulative total represents the sum of the numerical values in the columns of 1 to 10 times.

計算部915は、例えば、画像集合923−2の各正常画像に対する損失関数922の累計の統計値S及び標準偏差σを用いて、次式により、領域毎の基準値Rを計算する。
R=S+σ (1)
The calculation unit 915 calculates the reference value R for each region by the following equation, for example, using the cumulative statistical value S and the standard deviation σ of the loss function 922 for each normal image of the image set 923-2.
R = S + σ (1)

式(1)の統計値Sとしては、複数の累計の平均値、中央値、総和等が用いられる。そして、計算部915は、計算された基準値Rを基準値925として記録する。 As the statistical value S of the equation (1), the average value, the median value, the total value, etc. of a plurality of cumulative totals are used. Then, the calculation unit 915 records the calculated reference value R as the reference value 925.

図13は、領域毎の判定対象画像Qに対する学習における、損失関数922の値の例を示している。 FIG. 13 shows an example of the value of the loss function 922 in learning for the determination target image Q for each region.

判定部916は、領域毎の判定対象画像に対する損失関数922の累計Lと基準値Rとを用いて、次式により、その判定対象画像の正常性を示す指標Kを計算する。
K=L/R (2)
The determination unit 916 calculates an index K indicating the normality of the determination target image by the following equation using the cumulative L of the loss function 922 and the reference value R for the determination target image for each region.
K = L / R (2)

判定対象画像が正常画像と近似しているほど、指標Kは小さくなり、判定対象画像が正常画像と異なっているほど、指標Kは大きくなる。そこで、判定部916は、すべての領域について指標Kを計算し、いずれか1つ以上の領域において指標Kが閾値T1よりも大きい場合、判定対象画像926は異常画像であると判定する。この場合、判定対象画像926に写っている製品は、不良品と判定される。指標Kに基づく判定を行うことで、複数回の学習における損失関数922の履歴情報を用いて、領域毎の判定対象画像の正常性を判定することができる。 The closer the judgment target image is to the normal image, the smaller the index K, and the more different the judgment target image is from the normal image, the larger the index K. Therefore, the determination unit 916 calculates the index K for all the regions, and if the index K is larger than the threshold value T1 in any one or more regions, the determination target image 926 is determined to be an abnormal image. In this case, the product shown in the determination target image 926 is determined to be a defective product. By performing the determination based on the index K, it is possible to determine the normality of the image to be determined for each region by using the history information of the loss function 922 in the multiple learnings.

一方、すべての領域において指標Kが閾値T1以下である場合、判定部916は、すべての領域における指標Kの総和を求め、指標Kの総和と閾値T2とを比較することで、判定対象画像926の正常性を判定する。 On the other hand, when the index K is equal to or less than the threshold value T1 in all the regions, the determination unit 916 obtains the sum of the index K in all the regions and compares the sum of the index K with the threshold value T2 to determine the image to be determined 926. Judge the normality of.

例えば、判定部916は、指標Kの総和が閾値T2よりも大きい場合、判定対象画像926は異常画像であると判定し、指標Kの総和が閾値T2以下である場合、判定対象画像926は正常画像であると判定する。判定対象画像926が正常画像と判定された場合、判定対象画像926に写っている製品は、良品と判定される。指標Kの総和に基づく判定を行うことで、製品の表面に薄く広がったかすり傷、汚れ等を有する不良品を検出することが可能になる。 For example, the determination unit 916 determines that the determination target image 926 is an abnormal image when the total sum of the index K is larger than the threshold value T2, and the determination target image 926 is normal when the total sum of the index K is equal to or less than the threshold value T2. Judged as an image. When the determination target image 926 is determined to be a normal image, the product shown in the determination target image 926 is determined to be a non-defective product. By making a judgment based on the sum of the indexes K, it becomes possible to detect a defective product having scratches, stains, etc. that have spread thinly on the surface of the product.

閾値T1及び閾値T2は、外観検査における検査基準が変更された場合に微調整されるチューニング用パラメータであり、検査対象の製品に合わせて設定される。例えば、生産ラインにおいて発生する不良のレベル、製品の撮影環境等に合わせて閾値T1及び閾値T2を設定してもよい。 The threshold value T1 and the threshold value T2 are tuning parameters that are finely adjusted when the inspection standard in the visual inspection is changed, and are set according to the product to be inspected. For example, the threshold value T1 and the threshold value T2 may be set according to the level of defects generated in the production line, the shooting environment of the product, and the like.

図9の画像判定装置901によれば、判定対象画像926の画素値と復元画像の画素値との直接的な差分の代わりに、判定対象画像926に対する損失関数922の履歴情報を用いて、判定対象画像926の正常性が判定される。これにより、判定対象画像926に、製品の位置ずれ、傾き、明るさの差異等の撮影環境の差異が発生している場合であっても、その影響を吸収することが可能になる。このため、指標Kが閾値T1を超えたり、指標Kの総和が閾値T2を超えたりすることが抑制され、異常画像であると誤判定される可能性が低下する。 According to the image determination device 901 of FIG. 9, the determination is made by using the history information of the loss function 922 for the determination target image 926 instead of the direct difference between the pixel value of the determination target image 926 and the pixel value of the restored image. The normality of the target image 926 is determined. As a result, even if there is a difference in the shooting environment such as a position shift, an inclination, or a difference in brightness of the product in the determination target image 926, it is possible to absorb the influence. Therefore, it is suppressed that the index K exceeds the threshold value T1 and the total sum of the index K exceeds the threshold value T2, and the possibility of erroneous determination as an abnormal image is reduced.

また、複数の正常画像を画像集合923−2として用いることで、様々な正常画像に対する損失関数922の履歴情報を、基準値R及び指標Kに反映させることができる。これにより、判定対象画像926の画素値と復元画像の画素値との差分だけでは区別することが難しい、傷の濃淡、傷の範囲、別の物体の写り込み等の差異を、指標Kに反映させることができる。 Further, by using a plurality of normal images as the image set 923-2, the history information of the loss function 922 for various normal images can be reflected in the reference value R and the index K. As a result, the difference in the shade of the scratch, the range of the scratch, the reflection of another object, etc., which is difficult to distinguish only by the difference between the pixel value of the image to be judged 926 and the pixel value of the restored image, is reflected in the index K. Can be made to.

したがって、図9の画像判定装置901によれば、製品の画像を用いた外観検査における不良品の判定精度が、図4の画像処理装置101よりも向上する。 Therefore, according to the image determination device 901 of FIG. 9, the accuracy of determining a defective product in the visual inspection using the image of the product is improved as compared with the image processing device 101 of FIG.

図14は、学習モードにおいて画像判定装置901が行う学習処理の例を示すフローチャートである。画像集合923−1及び画像集合923−2に含まれる各正常画像は、画像加工部913によって、n×nのブロックに分割される。 FIG. 14 is a flowchart showing an example of learning processing performed by the image determination device 901 in the learning mode. Each normal image included in the image set 923-1 and the image set 923-2 is divided into n × n blocks by the image processing unit 913.

まず、学習処理部914は、画像集合923−1の正常画像を対象として、ブロック毎にステップ1401〜ステップ1403の処理を繰り返す。 First, the learning processing unit 914 repeats the processing of steps 1401 to 1403 for each block for the normal image of the image set 923-1.

学習処理部914は、ブロック毎の正常画像の色諧調を0〜255の階調値で正規化し(ステップ1401)、ブロック毎のCAE921に、正規化された正常画像を学習させる(ステップ1402)。ステップ1402の学習におけるエポック数は、例えば、数千回〜数万回であり、バッチサイズは、例えば、16枚、32枚等である。そして、学習処理部914は、学習により決定されたパラメータをブロック毎のCAE921に設定することで、学習後におけるブロック毎のCAE924を生成する(ステップ1403)。 The learning processing unit 914 normalizes the color tone of the normal image for each block with a gradation value of 0 to 255 (step 1401), and causes CAE921 for each block to learn the normalized normal image (step 1402). The number of epochs in the learning of step 1402 is, for example, several thousand to tens of thousands, and the batch size is, for example, 16 or 32. Then, the learning processing unit 914 generates CAE924 for each block after learning by setting the parameter determined by learning to CAE921 for each block (step 1403).

次に、学習処理部914は、画像集合923−2の正常画像を対象として、ブロック毎にステップ1404〜ステップ1407の処理を繰り返す。 Next, the learning processing unit 914 repeats the processes of steps 1404 to 1407 for each block with respect to the normal image of the image set 923-2.

学習処理部914は、ステップ1401と同様にして、ブロック毎の正常画像の色諧調を正規化し(ステップ1404)、ブロック毎のCAE924に、正規化された正常画像を学習させる(ステップ1405)。ステップ1405の学習におけるエポック数は、例えば、数回〜10回である。そして、計算部915は、ブロック毎の損失関数922の値の累計を計算する(ステップ1406)。ステップ1404〜ステップ1406の処理は、画像集合923−2の正常画像毎に繰り返される。 The learning processing unit 914 normalizes the color tone of the normal image for each block in the same manner as in step 1401 (step 1404), and causes the CAE 924 for each block to learn the normalized normal image (step 1405). The number of epochs in the learning of step 1405 is, for example, several to 10 times. Then, the calculation unit 915 calculates the cumulative value of the loss function 922 for each block (step 1406). The processes of steps 1404 to 1406 are repeated for each normal image of the image set 923-2.

次に、計算部915は、ブロック毎の損失関数922の値の累計を用いて、式(1)によりブロック毎の基準値925を計算する(ステップ1407)。 Next, the calculation unit 915 calculates the reference value 925 for each block by the equation (1) using the cumulative value of the loss function 922 for each block (step 1407).

図15は、判定モードにおいて画像判定装置901が行う判定処理の例を示すフローチャートである。判定対象画像926は、画像加工部913によって、n×nのブロックに分割される。 FIG. 15 is a flowchart showing an example of the determination process performed by the image determination device 901 in the determination mode. The determination target image 926 is divided into n × n blocks by the image processing unit 913.

まず、学習処理部914は、判定対象画像926のブロック毎にステップ1501〜ステップ1504の処理を繰り返す。 First, the learning processing unit 914 repeats the processes of steps 1501 to 1504 for each block of the determination target image 926.

学習処理部914は、図14のステップ1401と同様にして、ブロック毎の判定対象画像の色諧調を正規化し(ステップ1501)、ブロック毎のCAE924に、正規化された判定対象画像を学習させる(ステップ1502)。ステップ1502の学習におけるエポック数は、ステップ1405におけるエポック数と同様である。そして、判定部916は、ブロック毎の損失関数922の値の累計を計算し(ステップ1503)、計算された累計とブロック毎の基準値925とを用いて、式(2)によりブロック毎の指標Kを計算する(ステップ1504)。 The learning processing unit 914 normalizes the color tone of the judgment target image for each block (step 1501) in the same manner as in step 1401 of FIG. 14, and causes the CAE 924 for each block to learn the normalized judgment target image (step 1501). Step 1502). The number of epochs in the learning in step 1502 is the same as the number of epochs in step 1405. Then, the determination unit 916 calculates the cumulative value of the loss function 922 for each block (step 1503), and uses the calculated cumulative total and the reference value 925 for each block to use the index for each block according to the equation (2). Calculate K (step 1504).

次に、判定部916は、ブロック毎に計算された指標K、閾値T1、及び閾値T2を用いて、判定対象画像926の正常性を判定し、判定結果927を生成する(ステップ1505)。そして、出力部917は、判定結果927を出力する。 Next, the determination unit 916 determines the normality of the determination target image 926 using the index K, the threshold value T1, and the threshold value T2 calculated for each block, and generates a determination result 927 (step 1505). Then, the output unit 917 outputs the determination result 927.

図1及び図4の画像処理装置101の構成は一例に過ぎず、画像処理装置101の用途又は条件に応じて一部の構成要素を省略又は変更してもよい。 The configuration of the image processing device 101 of FIGS. 1 and 4 is only an example, and some components may be omitted or changed depending on the use or conditions of the image processing device 101.

図7の画像判定装置701の構成は一例に過ぎず、画像判定装置701の用途又は条件に応じて一部の構成要素を省略又は変更してもよい。 The configuration of the image determination device 701 in FIG. 7 is only an example, and some components may be omitted or changed depending on the use or conditions of the image determination device 701.

図9の外観検査システムの構成は一例に過ぎず、外観検査システムの用途又は条件に応じて一部の構成要素を省略又は変更してもよい。例えば、事前に画像集合923−1、画像集合923−2、及び判定対象画像926が記憶部911に格納されている場合は、画像取得部912を省略することができる。画像集合923−1の正常画像、画像集合923−2の正常画像、及び判定対象画像926それぞれを分割する必要がない場合は、画像加工部913を省略することができる。事前に基準値925が記憶部911に格納されている場合は、計算部915を省略することができる。 The configuration of the visual inspection system of FIG. 9 is only an example, and some components may be omitted or changed depending on the use or conditions of the visual inspection system. For example, when the image set 923-1, the image set 923-2, and the determination target image 926 are stored in the storage unit 911 in advance, the image acquisition unit 912 can be omitted. When it is not necessary to divide the normal image of the image set 923-1, the normal image of the image set 923-2, and the determination target image 926, the image processing unit 913 can be omitted. If the reference value 925 is stored in the storage unit 911 in advance, the calculation unit 915 can be omitted.

図7の復元モデル721として、CAE以外のモデルを用いても構わない。例えば、図9のCAE921及びCAE924の代わりに、VAE(Variational Auto Encoder)等の自己符号化器を用いることもできる。損失関数922の代わりに、入力データと出力データとの誤差を示す別の関数を用いることもできる。 As the restoration model 721 of FIG. 7, a model other than CAE may be used. For example, instead of CAE921 and CAE924 in FIG. 9, a self-encoder such as VAE (Variational Auto Encoder) can be used. Instead of the loss function 922, another function indicating the error between the input data and the output data can be used.

図9の画像判定装置901は、製品の外観検査に限らず、様々な撮影対象を撮影した撮影画像の正常性を判定する処理に適用することができる。例えば、判定対象の撮影画像は、監視カメラの映像に含まれる画像であってもよい。 The image determination device 901 of FIG. 9 can be applied not only to the appearance inspection of the product but also to the process of determining the normality of the captured images obtained by capturing various imaging targets. For example, the captured image to be determined may be an image included in the image of the surveillance camera.

図8、図14、及び図15のフローチャートは一例に過ぎず、画像判定装置の構成又は条件に応じて一部の処理を省略又は変更してもよい。例えば、図9の画像判定装置901において、画像集合923−1及び画像集合923−2の正常画像を正規化する必要がない場合は、図14のステップ1401及びステップ1404の処理を省略することができる。判定対象画像926を正規化する必要がない場合は、図15のステップ1501の処理を省略することができる。CAE924及び基準値925が外部の装置によって生成される場合は、図14の学習処理を省略することができる。 The flowcharts of FIGS. 8, 14 and 15 are merely examples, and some processes may be omitted or changed depending on the configuration or conditions of the image determination device. For example, in the image determination device 901 of FIG. 9, when it is not necessary to normalize the normal images of the image set 923-1 and the image set 923-2, the processes of steps 1401 and 1404 of FIG. 14 may be omitted. it can. When it is not necessary to normalize the determination target image 926, the process of step 1501 in FIG. 15 can be omitted. When the CAE 924 and the reference value 925 are generated by an external device, the learning process of FIG. 14 can be omitted.

図2及び図11〜図13に示した損失関数の値は一例に過ぎず、損失関数の値は、CAEの学習対象の画像に応じて変化する。図3に示した復元処理と図5及び図6に示した判定処理は一例に過ぎず、復元処理及び判定処理は、CAEの学習対象の画像に応じて変化する。図10に示した判定対象画像1001の分割方法は一例に過ぎず、画像加工部913は、判定対象画像1001を別の形状の領域に分割することもできる。 The value of the loss function shown in FIGS. 2 and 11 to 13 is only an example, and the value of the loss function changes according to the image to be learned by CAE. The restoration process shown in FIG. 3 and the determination process shown in FIGS. 5 and 6 are merely examples, and the restoration process and the determination process change according to the image to be learned by CAE. The method of dividing the determination target image 1001 shown in FIG. 10 is only an example, and the image processing unit 913 can also divide the determination target image 1001 into regions having different shapes.

式(1)及び式(2)は一例に過ぎず、画像判定装置901は、別の数式を用いて基準値R及び指標Kを計算してもよい。例えば、式(1)の右辺の標準偏差σを省略しても構わない。 Equations (1) and (2) are merely examples, and the image determination device 901 may calculate the reference value R and the index K using another mathematical expression. For example, the standard deviation σ on the right side of the equation (1) may be omitted.

図16は、図7の画像判定装置701及び図9の画像判定装置901として用いられる情報処理装置の構成例を示している。図16の情報処理装置は、CPU(Central Processing Unit)1601、メモリ1602、入力装置1603、出力装置1604、補助記憶装置1605、媒体駆動装置1606、及びネットワーク接続装置1607を含む。これらの構成要素はバス1608により互いに接続されている。図9の撮像装置902は、バス1608に接続されていてもよい。 FIG. 16 shows a configuration example of an information processing device used as the image determination device 701 of FIG. 7 and the image determination device 901 of FIG. The information processing device of FIG. 16 includes a CPU (Central Processing Unit) 1601, a memory 1602, an input device 1603, an output device 1604, an auxiliary storage device 1605, a medium drive device 1606, and a network connection device 1607. These components are connected to each other by bus 1608. The image pickup apparatus 902 of FIG. 9 may be connected to the bus 1608.

メモリ1602は、例えば、ROM(Read Only Memory)、RAM(Random Access Memory)、フラッシュメモリ等の半導体メモリであり、処理に用いられるプログラム及びデータを格納する。メモリ1602は、図7の記憶部711又は図9の記憶部911として用いることができる。 The memory 1602 is, for example, a semiconductor memory such as a ROM (Read Only Memory), a RAM (Random Access Memory), or a flash memory, and stores a program and data used for processing. The memory 1602 can be used as the storage unit 711 of FIG. 7 or the storage unit 911 of FIG.

CPU1601(プロセッサ)は、例えば、メモリ1602を利用してプログラムを実行することにより、図7の学習処理部712及び判定部713として動作する。CPU1601は、メモリ1602を利用してプログラムを実行することにより、図9の画像取得部912、画像加工部913、学習処理部914、計算部915、及び判定部916としても動作する。 The CPU 1601 (processor) operates as the learning processing unit 712 and the determination unit 713 in FIG. 7 by executing a program using, for example, the memory 1602. The CPU 1601 also operates as the image acquisition unit 912, the image processing unit 913, the learning processing unit 914, the calculation unit 915, and the determination unit 916 in FIG. 9 by executing the program using the memory 1602.

入力装置1603は、例えば、キーボード、ポインティングデバイス等であり、オペレータ又はユーザからの指示又は情報の入力に用いられる。出力装置1604は、例えば、表示装置、プリンタ、スピーカ等であり、オペレータ又はユーザへの問い合わせ又は指示、及び処理結果の出力に用いられる。処理結果は、判定結果927であってもよい。出力装置1604は、図9の出力部917として用いることができる。 The input device 1603 is, for example, a keyboard, a pointing device, or the like, and is used for inputting instructions or information from an operator or a user. The output device 1604 is, for example, a display device, a printer, a speaker, or the like, and is used for inquiries or instructions to an operator or a user, and output of a processing result. The processing result may be the determination result 927. The output device 1604 can be used as the output unit 917 of FIG.

補助記憶装置1605は、例えば、磁気ディスク装置、光ディスク装置、光磁気ディスク装置、テープ装置等である。補助記憶装置1605は、ハードディスクドライブ又はフラッシュメモリであってもよい。情報処理装置は、補助記憶装置1605にプログラム及びデータを格納しておき、それらをメモリ1602にロードして使用することができる。補助記憶装置1605は、図7の記憶部711又は図9の記憶部911として用いることができる。 The auxiliary storage device 1605 is, for example, a magnetic disk device, an optical disk device, a magneto-optical disk device, a tape device, or the like. The auxiliary storage device 1605 may be a hard disk drive or a flash memory. The information processing device can store programs and data in the auxiliary storage device 1605 and load them into the memory 1602 for use. The auxiliary storage device 1605 can be used as the storage unit 711 of FIG. 7 or the storage unit 911 of FIG.

媒体駆動装置1606は、可搬型記録媒体1609を駆動し、その記録内容にアクセスする。可搬型記録媒体1609は、メモリデバイス、フレキシブルディスク、光ディスク、光磁気ディスク等である。可搬型記録媒体1609は、CD−ROM(Compact Disk Read Only Memory)、DVD(Digital Versatile Disk)、USB(Universal Serial Bus)メモリ等であってもよい。オペレータ又はユーザは、この可搬型記録媒体1609にプログラム及びデータを格納しておき、それらをメモリ1602にロードして使用することができる。 The medium drive device 1606 drives the portable recording medium 1609 and accesses the recorded contents. The portable recording medium 1609 is a memory device, a flexible disk, an optical disk, a magneto-optical disk, or the like. The portable recording medium 1609 may be a CD-ROM (Compact Disk Read Only Memory), a DVD (Digital Versatile Disk), a USB (Universal Serial Bus) memory, or the like. The operator or the user can store programs and data in the portable recording medium 1609 and load them into the memory 1602 for use.

このように、処理に用いられるプログラム及びデータを格納するコンピュータ読み取り可能な記録媒体は、メモリ1602、補助記憶装置1605、又は可搬型記録媒体1609のような、物理的な(非一時的な)記録媒体である。 In this way, the computer-readable recording medium that stores the programs and data used for processing is physical (non-temporary) recording such as memory 1602, auxiliary storage device 1605, or portable recording medium 1609. It is a medium.

ネットワーク接続装置1607は、LAN(Local Area Network)、WAN(Wide Area Network)等の通信ネットワークに接続され、通信に伴うデータ変換を行う通信インタフェース回路である。情報処理装置は、プログラム及びデータを外部の装置からネットワーク接続装置1607を介して受信し、それらをメモリ1602にロードして使用することができる。ネットワーク接続装置1607は、図9の出力部917として用いることができる。 The network connection device 1607 is a communication interface circuit that is connected to a communication network such as a LAN (Local Area Network) or WAN (Wide Area Network) and performs data conversion associated with communication. The information processing device can receive programs and data from an external device via the network connection device 1607, load them into the memory 1602, and use them. The network connection device 1607 can be used as the output unit 917 of FIG.

なお、情報処理装置が図16のすべての構成要素を含む必要はなく、用途又は条件に応じて一部の構成要素を省略することも可能である。例えば、オペレータ又はユーザとのインタフェースが不要な場合は、入力装置1603及び出力装置1604を省略してもよい。可搬型記録媒体1609又は通信ネットワークを使用しない場合は、媒体駆動装置1606又はネットワーク接続装置1607を省略してもよい。 It is not necessary for the information processing apparatus to include all the components of FIG. 16, and some components may be omitted depending on the application or conditions. For example, if an interface with an operator or a user is not required, the input device 1603 and the output device 1604 may be omitted. When the portable recording medium 1609 or the communication network is not used, the medium driving device 1606 or the network connecting device 1607 may be omitted.

開示の実施形態とその利点について詳しく説明したが、当業者は、特許請求の範囲に明確に記載した本発明の範囲から逸脱することなく、様々な変更、追加、省略をすることができるであろう。 Having described in detail the embodiments of the disclosure and its advantages, those skilled in the art will be able to make various changes, additions and omissions without departing from the scope of the invention as expressly stated in the claims. Let's do it.

図1乃至図16を参照しながら説明した実施形態に関し、さらに以下の付記を開示する。
(付記1)
入力データから特徴を抽出し、抽出された特徴から復元された出力データを生成する、復元モデルを記憶するとともに、前記復元モデルに正常画像を複数回学習させることで取得された、前記入力データと前記出力データとの誤差を示す関数の複数の値に基づく、基準値を記憶する記憶部と、
前記復元モデルに判定対象画像を複数回学習させることで、前記関数の複数の値を取得する学習処理部と、
前記復元モデルに前記判定対象画像を複数回学習させることで取得された前記関数の複数の値と、前記基準値とを用いて、前記判定対象画像の正常性を判定する判定部と、
前記判定対象画像の正常性を示す判定結果を出力する出力部と、
を備えることを特徴とする画像判定装置。
(付記2)
前記基準値は、前記復元モデルに前記正常画像を複数回学習させることで取得された前記関数の複数の値から計算され、
前記判定部は、前記復元モデルに前記判定対象画像を複数回学習させることで取得された前記関数の複数の値と、前記基準値とを用いて、前記判定対象画像の正常性を示す指標を計算し、前記指標と閾値とを比較することで、前記判定対象画像の正常性を判定することを特徴とする付記1記載の画像判定装置。
(付記3)
前記正常画像は、第1画像内の複数の領域それぞれの正常画像のうち、いずれかの正常画像であり、
前記判定対象画像は、第2画像内の複数の領域それぞれの判定対象画像のうち、いずれかの判定対象画像であり、
前記記憶部は、領域毎の復元モデルを記憶するとともに、前記領域毎の復元モデルに領域毎の正常画像を複数回学習させることで取得された、領域毎の関数の複数の値に基づく、領域毎の基準値を記憶し、
前記領域毎の基準値は、前記領域毎の関数の複数の値から計算され、
前記学習処理部は、前記領域毎の復元モデルに領域毎の判定対象画像を複数回学習させることで、領域毎の関数の複数の値を取得し、
前記判定部は、領域毎の判定対象画像を用いて取得された前記領域毎の関数の複数の値と、前記領域毎の基準値とを用いて、前記領域毎の判定対象画像の正常性を示す指標を計算し、前記指標と第1閾値とを比較することで、前記第2画像の正常性を判定し、
前記出力部は、前記第2画像の正常性を示す判定結果を出力することを特徴とする付記1記載の画像判定装置。
(付記4)
前記判定部は、前記領域毎の判定対象画像の正常性を示す指標の総和を求め、前記指標の総和と第2閾値とを比較することで、前記第2画像の正常性を判定することを特徴とする付記3記載の画像判定装置。
(付記5)
前記復元モデルは、学習前の復元モデルに正常画像の集合を学習させることで生成されることを特徴とする付記1乃至4のいずれか1項に記載の画像判定装置。
(付記6)
前記復元モデルは自己符号化器であり、前記関数は、前記自己符号化器の損失関数であることを特徴とする付記1乃至5のいずれか1項に記載の画像判定装置。
(付記7)
コンピュータによって実行される画像判定方法であって、
前記コンピュータが、
入力データから特徴を抽出し、抽出された特徴から復元された出力データを生成する、復元モデルに、判定対象画像を複数回学習させることで、前記入力データと前記出力データとの誤差を示す関数の複数の値を取得し、
前記復元モデルに正常画像を複数回学習させることで取得された前記関数の複数の値に基づく基準値と、前記復元モデルに前記判定対象画像を複数回学習させることで取得された前記関数の複数の値とを用いて、前記判定対象画像の正常性を判定し、
前記判定対象画像の正常性を示す判定結果を出力する、
ことを特徴とする画像判定方法。
(付記8)
前記基準値は、前記復元モデルに前記正常画像を複数回学習させることで取得された前記関数の複数の値から計算され、
前記コンピュータは、前記復元モデルに前記判定対象画像を複数回学習させることで取得された前記関数の複数の値と、前記基準値とを用いて、前記判定対象画像の正常性を示す指標を計算し、前記指標と閾値とを比較することで、前記判定対象画像の正常性を判定することを特徴とする付記7記載の画像判定方法。
(付記9)
前記正常画像は、第1画像内の複数の領域それぞれの正常画像のうち、いずれかの正常画像であり、
前記判定対象画像は、第2画像内の複数の領域それぞれの判定対象画像のうち、いずれかの判定対象画像であり、
前記コンピュータは、領域毎の復元モデルを記憶するとともに、前記領域毎の復元モデルに領域毎の正常画像を複数回学習させることで取得された、領域毎の関数の複数の値に基づく、領域毎の基準値を記憶し、
前記領域毎の基準値は、前記領域毎の関数の複数の値から計算され、
前記コンピュータは、前記領域毎の復元モデルに領域毎の判定対象画像を複数回学習させることで、領域毎の関数の複数の値を取得し、領域毎の判定対象画像を用いて取得された前記領域毎の関数の複数の値と、前記領域毎の基準値とを用いて、前記領域毎の判定対象画像の正常性を示す指標を計算し、前記指標と第1閾値とを比較することで、前記第2画像の正常性を判定し、前記第2画像の正常性を示す判定結果を出力することを特徴とする付記7記載の画像判定方法。
(付記10)
前記コンピュータは、前記領域毎の判定対象画像の正常性を示す指標の総和を求め、前記指標の総和と第2閾値とを比較することで、前記第2画像の正常性を判定することを特徴とする付記9記載の画像判定方法。
(付記11)
前記復元モデルは、学習前の復元モデルに正常画像の集合を学習させることで生成されることを特徴とする付記7乃至10のいずれか1項に記載の画像判定方法。
(付記12)
前記復元モデルは自己符号化器であり、前記関数は、前記自己符号化器の損失関数であることを特徴とする付記7乃至11のいずれか1項に記載の画像判定方法。
The following additional notes will be further disclosed with respect to the embodiments described with reference to FIGS. 1 to 16.
(Appendix 1)
With the input data obtained by extracting features from the input data and generating the output data restored from the extracted features, storing the restored model, and training the restored model multiple times for normal images. A storage unit that stores a reference value based on a plurality of values of a function indicating an error from the output data, and a storage unit.
A learning processing unit that acquires a plurality of values of the function by causing the restoration model to learn the image to be determined a plurality of times.
A determination unit that determines the normality of the determination target image by using the plurality of values of the function acquired by training the restoration model a plurality of times and the reference value.
An output unit that outputs a judgment result indicating the normality of the judgment target image, and
An image determination device comprising.
(Appendix 2)
The reference value is calculated from a plurality of values of the function obtained by training the restoration model a plurality of times of the normal image.
The determination unit uses a plurality of values of the function acquired by causing the restoration model to learn the determination target image a plurality of times and the reference value to obtain an index indicating the normality of the determination target image. The image determination device according to Appendix 1, wherein the normality of the image to be determined is determined by calculating and comparing the index and the threshold value.
(Appendix 3)
The normal image is one of the normal images of each of the plurality of regions in the first image.
The determination target image is one of the determination target images of each of the plurality of regions in the second image.
The storage unit stores the restoration model for each area, and is based on a plurality of values of the function for each area, which is acquired by having the restoration model for each area learn a normal image for each area a plurality of times. Memorize each reference value and
The reference value for each region is calculated from a plurality of values of the function for each region.
The learning processing unit acquires a plurality of values of the function for each region by causing the restoration model for each region to learn the image to be determined for each region a plurality of times.
The determination unit uses a plurality of values of the function for each region acquired by using the determination target image for each region and a reference value for each region to determine the normality of the determination target image for each region. The normality of the second image is determined by calculating the indicated index and comparing the index with the first threshold value.
The image determination device according to Appendix 1, wherein the output unit outputs a determination result indicating the normality of the second image.
(Appendix 4)
The determination unit determines the normality of the second image by obtaining the sum of the indexes indicating the normality of the determination target image for each region and comparing the total of the indexes with the second threshold value. The image determination device according to Appendix 3, which is a feature.
(Appendix 5)
The image determination device according to any one of Supplementary note 1 to 4, wherein the restoration model is generated by training a set of normal images in a restoration model before learning.
(Appendix 6)
The image determination device according to any one of Supplementary note 1 to 5, wherein the restoration model is a self-encoder, and the function is a loss function of the self-encoder.
(Appendix 7)
An image determination method performed by a computer
The computer
A function that indicates an error between the input data and the output data by having the restored model train the image to be judged multiple times to extract features from the input data and generate the output data restored from the extracted features. Get multiple values of
A reference value based on a plurality of values of the function acquired by having the restoration model learn a normal image a plurality of times, and a plurality of the functions acquired by having the restoration model learn the determination target image a plurality of times. The normality of the image to be determined is determined by using the value of.
Outputs a judgment result indicating the normality of the judgment target image.
An image determination method characterized by this.
(Appendix 8)
The reference value is calculated from a plurality of values of the function obtained by training the restoration model a plurality of times of the normal image.
The computer calculates an index indicating the normality of the determination target image by using the plurality of values of the function acquired by having the restoration model learn the determination target image a plurality of times and the reference value. The image determination method according to Appendix 7, wherein the normality of the determination target image is determined by comparing the index with the threshold value.
(Appendix 9)
The normal image is one of the normal images of each of the plurality of regions in the first image.
The determination target image is one of the determination target images of each of the plurality of regions in the second image.
The computer stores the restoration model for each area and trains the restoration model for each area a plurality of times to learn a normal image for each area, and is based on a plurality of values of the function for each area. Memorize the reference value of
The reference value for each region is calculated from a plurality of values of the function for each region.
The computer acquires a plurality of values of the function for each region by causing the restoration model for each region to learn the image to be determined for each region a plurality of times, and obtains the image to be determined for each region. By using a plurality of values of the function for each region and a reference value for each region, an index indicating the normality of the image to be determined for each region is calculated, and the index is compared with the first threshold value. The image determination method according to Appendix 7, wherein the normality of the second image is determined, and a determination result indicating the normality of the second image is output.
(Appendix 10)
The computer is characterized in that the totality of indicators indicating the normality of the determination target image for each region is obtained, and the normality of the second image is determined by comparing the total sum of the indicators with the second threshold value. The image determination method according to Appendix 9.
(Appendix 11)
The image determination method according to any one of Supplementary note 7 to 10, wherein the restoration model is generated by training a set of normal images in a restoration model before learning.
(Appendix 12)
The image determination method according to any one of Supplementary note 7 to 11, wherein the restoration model is a self-encoder, and the function is a loss function of the self-encoder.

101 画像処理装置
111、921、924 CAE
112 損失関数
121 符号化部
122 復号部
301、302 正常画像
401 画像差分抽出部
402 異常判定部
501、601 判定対象画像
502、602 復元画像
701、901 画像判定装置
711、911 記憶部
712、914 学習処理部
713、916 判定部
714、917 出力部
721 復元モデル
722 基準値
902 撮像装置
903 製品
904 生産ライン
912 画像取得部
913 画像加工部
915 計算部
922 損失関数
923−1、923−2 画像集合
925 基準値
926、1001 判定対象画像
927 判定結果
1002 ブロック
1601 CPU
1602 メモリ
1603 入力装置
1604 出力装置
1605 補助記憶装置
1606 媒体駆動装置
1607 ネットワーク接続装置
1608 バス
1609 可搬型記録媒体
101 Image processing equipment 111, 921, 924 CAE
112 Loss function 121 Encoding unit 122 Decoding unit 301, 302 Normal image 401 Image difference extraction unit 402 Abnormality determination unit 501, 601 Judgment target image 502, 602 Restored image 701, 901 Image determination device 711, 911 Storage unit 712, 914 Learning Processing unit 713, 916 Judgment unit 714, 917 Output unit 721 Restoration model 722 Reference value 902 Image pickup device 903 Product 904 Production line 912 Image acquisition unit 913 Image processing unit 915 Calculation unit 922 Loss function 923-1, 923-2 Image set 925 Reference value 926, 1001 Judgment target image 927 Judgment result 1002 block 1601 CPU
1602 Memory 1603 Input device 1604 Output device 1605 Auxiliary storage device 1606 Media drive device 1607 Network connection device 1608 Bus 1609 Portable recording medium

Claims (6)

入力データから特徴を抽出し、抽出された特徴から復元された出力データを生成する、復元モデルを記憶するとともに、前記復元モデルに正常画像を複数回学習させることで取得された、前記入力データと前記出力データとの誤差を示す関数の複数の値に基づく、基準値を記憶する記憶部と、
前記復元モデルに判定対象画像を複数回学習させることで、前記関数の複数の値を取得する学習処理部と、
前記復元モデルに前記判定対象画像を複数回学習させることで取得された前記関数の複数の値と、前記基準値とを用いて、前記判定対象画像の正常性を判定する判定部と、
前記判定対象画像の正常性を示す判定結果を出力する出力部と、
を備えることを特徴とする画像判定装置。
With the input data obtained by extracting features from the input data and generating the output data restored from the extracted features, storing the restored model, and training the restored model multiple times for normal images. A storage unit that stores a reference value based on a plurality of values of a function indicating an error from the output data, and a storage unit.
A learning processing unit that acquires a plurality of values of the function by causing the restoration model to learn the image to be determined a plurality of times.
A determination unit that determines the normality of the determination target image by using the plurality of values of the function acquired by training the restoration model a plurality of times and the reference value.
An output unit that outputs a judgment result indicating the normality of the judgment target image, and
An image determination device comprising.
前記基準値は、前記復元モデルに前記正常画像を複数回学習させることで取得された前記関数の複数の値から計算され、
前記判定部は、前記復元モデルに前記判定対象画像を複数回学習させることで取得された前記関数の複数の値と、前記基準値とを用いて、前記判定対象画像の正常性を示す指標を計算し、前記指標と閾値とを比較することで、前記判定対象画像の正常性を判定することを特徴とする請求項1記載の画像判定装置。
The reference value is calculated from a plurality of values of the function obtained by training the restoration model a plurality of times of the normal image.
The determination unit uses a plurality of values of the function acquired by having the restoration model learn the determination target image a plurality of times and the reference value to obtain an index indicating the normality of the determination target image. The image determination device according to claim 1, wherein the normality of the determination target image is determined by calculating and comparing the index with the threshold value.
前記正常画像は、第1画像内の複数の領域それぞれの正常画像のうち、いずれかの正常画像であり、
前記判定対象画像は、第2画像内の複数の領域それぞれの判定対象画像のうち、いずれかの判定対象画像であり、
前記記憶部は、領域毎の復元モデルを記憶するとともに、前記領域毎の復元モデルに領域毎の正常画像を複数回学習させることで取得された、領域毎の関数の複数の値に基づく、領域毎の基準値を記憶し、
前記領域毎の基準値は、前記領域毎の関数の複数の値から計算され、
前記学習処理部は、前記領域毎の復元モデルに領域毎の判定対象画像を複数回学習させることで、領域毎の関数の複数の値を取得し、
前記判定部は、領域毎の判定対象画像を用いて取得された前記領域毎の関数の複数の値と、前記領域毎の基準値とを用いて、前記領域毎の判定対象画像の正常性を示す指標を計算し、前記指標と第1閾値とを比較することで、前記第2画像の正常性を判定し、
前記出力部は、前記第2画像の正常性を示す判定結果を出力することを特徴とする請求項1記載の画像判定装置。
The normal image is one of the normal images of each of the plurality of regions in the first image.
The determination target image is one of the determination target images of each of the plurality of regions in the second image.
The storage unit stores the restoration model for each area, and is based on a plurality of values of the function for each area, which is acquired by having the restoration model for each area learn a normal image for each area a plurality of times. Memorize each reference value and
The reference value for each region is calculated from a plurality of values of the function for each region.
The learning processing unit acquires a plurality of values of the function for each region by causing the restoration model for each region to learn the image to be determined for each region a plurality of times.
The determination unit uses a plurality of values of the function for each region acquired by using the determination target image for each region and a reference value for each region to determine the normality of the determination target image for each region. The normality of the second image is determined by calculating the indicated index and comparing the index with the first threshold value.
The image determination device according to claim 1, wherein the output unit outputs a determination result indicating the normality of the second image.
前記判定部は、前記領域毎の判定対象画像の正常性を示す指標の総和を求め、前記指標の総和と第2閾値とを比較することで、前記第2画像の正常性を判定することを特徴とする請求項3記載の画像判定装置。 The determination unit determines the normality of the second image by obtaining the sum of the indexes indicating the normality of the determination target image for each region and comparing the total of the indexes with the second threshold value. The image determination device according to claim 3, which is characterized. 前記復元モデルは、学習前の復元モデルに正常画像の集合を学習させることで生成されることを特徴とする請求項1乃至4のいずれか1項に記載の画像判定装置。 The image determination device according to any one of claims 1 to 4, wherein the restoration model is generated by training a set of normal images in a restoration model before learning. コンピュータによって実行される画像判定方法であって、
前記コンピュータが、
入力データから特徴を抽出し、抽出された特徴から復元された出力データを生成する、復元モデルに、判定対象画像を複数回学習させることで、前記入力データと前記出力データとの誤差を示す関数の複数の値を取得し、
前記復元モデルに正常画像を複数回学習させることで取得された前記関数の複数の値に基づく基準値と、前記復元モデルに前記判定対象画像を複数回学習させることで取得された前記関数の複数の値とを用いて、前記判定対象画像の正常性を判定し、
前記判定対象画像の正常性を示す判定結果を出力する、
ことを特徴とする画像判定方法。
An image determination method performed by a computer
The computer
A function that indicates an error between the input data and the output data by having the restored model train the image to be judged multiple times to extract features from the input data and generate the output data restored from the extracted features. Get multiple values of
A reference value based on a plurality of values of the function acquired by having the restoration model learn a normal image a plurality of times, and a plurality of the functions acquired by having the restoration model learn the determination target image a plurality of times. The normality of the image to be determined is determined by using the value of.
Outputs a judgment result indicating the normality of the judgment target image.
An image determination method characterized by this.
JP2019086135A 2019-04-26 2019-04-26 Image determination device and image determination method Pending JP2020181532A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019086135A JP2020181532A (en) 2019-04-26 2019-04-26 Image determination device and image determination method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019086135A JP2020181532A (en) 2019-04-26 2019-04-26 Image determination device and image determination method

Publications (1)

Publication Number Publication Date
JP2020181532A true JP2020181532A (en) 2020-11-05

Family

ID=73024290

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019086135A Pending JP2020181532A (en) 2019-04-26 2019-04-26 Image determination device and image determination method

Country Status (1)

Country Link
JP (1) JP2020181532A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022137841A1 (en) * 2020-12-25 2022-06-30 コニカミノルタ株式会社 Anomaly detection system, learning device, anomaly detection program, and learning program
WO2022172470A1 (en) * 2021-02-12 2022-08-18 オムロン株式会社 Image inspection device, image inspection method, and trained model generation device
WO2022172469A1 (en) * 2021-02-12 2022-08-18 オムロン株式会社 Image inspection device, image inspection method, and trained model generation device
JP2023016030A (en) * 2021-07-20 2023-02-01 フジツウ テクノロジー ソリューションズ ゲーエムベーハー Method and apparatus for analyzing product, training method, system, computer program, and computer-readable storage medium
WO2023223884A1 (en) * 2022-05-16 2023-11-23 ブラザー工業株式会社 Computer program and inspection device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022137841A1 (en) * 2020-12-25 2022-06-30 コニカミノルタ株式会社 Anomaly detection system, learning device, anomaly detection program, and learning program
WO2022172470A1 (en) * 2021-02-12 2022-08-18 オムロン株式会社 Image inspection device, image inspection method, and trained model generation device
WO2022172469A1 (en) * 2021-02-12 2022-08-18 オムロン株式会社 Image inspection device, image inspection method, and trained model generation device
JP2023016030A (en) * 2021-07-20 2023-02-01 フジツウ テクノロジー ソリューションズ ゲーエムベーハー Method and apparatus for analyzing product, training method, system, computer program, and computer-readable storage medium
JP7405915B2 (en) 2021-07-20 2023-12-26 フジツウ テクノロジー ソリューションズ ゲーエムベーハー Methods and apparatus for analyzing products, training methods, systems, computer programs, and computer-readable storage media
WO2023223884A1 (en) * 2022-05-16 2023-11-23 ブラザー工業株式会社 Computer program and inspection device

Similar Documents

Publication Publication Date Title
JP2020181532A (en) Image determination device and image determination method
CN109871895B (en) Method and device for detecting defects of circuit board
EP4280153A1 (en) Defect detection method, apparatus and system
US9582872B2 (en) Optical film defect detection method and system thereof
US11715190B2 (en) Inspection system, image discrimination system, discrimination system, discriminator generation system, and learning data generation device
US20170330315A1 (en) Information processing apparatus, method for processing information, discriminator generating apparatus, method for generating discriminator, and program
CN110880175B (en) Welding spot defect detection method, system and equipment
JP7059883B2 (en) Learning device, image generator, learning method, and learning program
KR100868884B1 (en) Flat glass defect information system and classification method
JP2007156655A (en) Variable region detection apparatus and its method
CN110634137A (en) Bridge deformation monitoring method, device and equipment based on visual perception
CN113850749A (en) Method for training defect detector
CN111415339A (en) Image defect detection method for complex texture industrial product
CN115830004A (en) Surface defect detection method, device, computer equipment and storage medium
JP7298176B2 (en) Defect inspection device and trained model
JP2010071826A (en) Teacher data preparation method, and image sorting method and image sorter
JP7459697B2 (en) Anomaly detection system, learning device, anomaly detection program, learning program, anomaly detection method, and learning method
US7646892B2 (en) Image inspecting apparatus, image inspecting method, control program and computer-readable storage medium
WO2016092783A1 (en) Information processing apparatus, method for processing information, discriminator generating apparatus, method for generating discriminator, and program
JP2019095932A (en) Abnormality determination method and device
KR20230036650A (en) Defect detection method and system based on image patch
JP2005252451A (en) Image quality inspection method and image quality inspection apparatus
US10679336B2 (en) Detecting method, detecting apparatus, and computer readable storage medium
CN116109543A (en) Method and device for quickly identifying and reading data and computer readable storage medium
CN117474915B (en) Abnormality detection method, electronic equipment and storage medium