JP7519232B2 - Anomaly detection method, anomaly detection device, and anomaly detection program - Google Patents
Anomaly detection method, anomaly detection device, and anomaly detection program Download PDFInfo
- Publication number
- JP7519232B2 JP7519232B2 JP2020141853A JP2020141853A JP7519232B2 JP 7519232 B2 JP7519232 B2 JP 7519232B2 JP 2020141853 A JP2020141853 A JP 2020141853A JP 2020141853 A JP2020141853 A JP 2020141853A JP 7519232 B2 JP7519232 B2 JP 7519232B2
- Authority
- JP
- Japan
- Prior art keywords
- normal
- learning
- model
- image
- overdetection
- 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.)
- Active
Links
- 238000001514 detection method Methods 0.000 title claims description 85
- 230000005856 abnormality Effects 0.000 claims description 77
- 230000002159 abnormal effect Effects 0.000 claims description 73
- 238000013145 classification model Methods 0.000 claims description 48
- 238000000034 method Methods 0.000 claims description 43
- 238000010801 machine learning Methods 0.000 claims description 33
- 238000011156 evaluation Methods 0.000 claims description 28
- 230000008569 process Effects 0.000 claims description 25
- 238000012549 training Methods 0.000 claims description 19
- 230000007246 mechanism Effects 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 24
- 230000002950 deficient Effects 0.000 description 8
- 238000012545 processing Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 239000000463 material Substances 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 238000013507 mapping Methods 0.000 description 3
- 238000012706 support-vector machine Methods 0.000 description 3
- 208000009119 Giant Axonal Neuropathy Diseases 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 230000006835 compression Effects 0.000 description 2
- 238000007906 compression Methods 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 201000003382 giant axonal neuropathy 1 Diseases 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000013598 vector Substances 0.000 description 2
- 230000008859 change Effects 0.000 description 1
- 238000004040 coloring Methods 0.000 description 1
- 235000009508 confectionery Nutrition 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 239000004615 ingredient Substances 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000007637 random forest analysis Methods 0.000 description 1
- 238000011867 re-evaluation Methods 0.000 description 1
- 238000000611 regression analysis Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Description
開示の実施形態は、異常検知方法、異常検知装置および異常検知プログラムに関する。 The disclosed embodiments relate to an anomaly detection method, an anomaly detection device, and an anomaly detection program.
従来、機械学習を利用して、画像解析を行う技術が知られている。たとえば、特許文献1に開示の技術は、分類結果が既知である複数の画像について算出した特徴ベクトルを用いて機械学習を実行し、機械学習で得られた結果に基づいて、分類結果が未知である画像の分類を行うものである。
Conventionally, techniques for performing image analysis using machine learning are known. For example, the technique disclosed in
こうした技術を利用することにより、たとえば製造された製品の画像から、かかる製品が正常品であるか否か、また、正常品でなければ何が異常か、を分類することができる。 By using this technology, for example, it is possible to classify from an image of a manufactured product whether the product is normal or not, and if not, what is abnormal about it.
しかしながら、上述した従来技術には、機械学習を利用した異常検知を簡便に且つ精度よく行ううえで、さらなる改善の余地がある。 However, the above-mentioned conventional techniques leave room for further improvement in terms of easily and accurately detecting anomalies using machine learning.
具体的には、たとえば上述した製品の異常に傷や色ムラといった無数のパターンが存在する場合、それらのパターンをすべて分類可能な分類モデルを生成するためには、大量の学習用データの収集と長時間の学習が必要であり、煩雑である。 Specifically, for example, if the product abnormalities mentioned above include countless patterns such as scratches and uneven coloring, generating a classification model that can classify all of these patterns requires the collection of a large amount of training data and a long period of training, which is cumbersome.
また、通常の運用において、取得が容易なのは正常時の正常画像であり、異常発生時の異常画像は入手が困難である。したがって、運用の初期段階等においては、十分に分類パターンを学習することが難しく、分類モデルの精度を担保できなかった。 In addition, during normal operation, it is easy to obtain normal images when things are normal, but it is difficult to obtain abnormal images when an abnormality occurs. Therefore, in the early stages of operation, it is difficult to sufficiently learn classification patterns, and the accuracy of the classification model cannot be guaranteed.
実施形態の一態様は、上記に鑑みてなされたものであって、機械学習を利用した異常検知を簡便に且つ精度よく行うことができる異常検知方法、異常検知装置および異常検知プログラムを提供することを目的とする。 One aspect of the embodiment has been made in consideration of the above, and aims to provide an anomaly detection method, an anomaly detection device, and an anomaly detection program that can easily and accurately perform anomaly detection using machine learning.
実施形態の一態様に係る異常検知方法は、正常学習工程と、評価工程と、判定工程と、異常学習工程とを含む。前記正常学習工程は、互いに競合する生成ネットワークと識別ネットワークとからなり、前記生成ネットワークにスキップ接続モデルを配置した敵対的生成ネットワークにより、正例となる学習用画像を用いた機械学習である正常学習を実行することによって、前記正例となる学習用画像である正常画像をモデル化した正常モデルを生成する。前記評価工程は、判定対象画像を前記正常モデルへ入力することによって取得される前記正常モデルの出力値に基づいて前記判定対象画像の異常度を算出する。前記判定工程は、前記異常度に基づいて前記判定対象画像が異常であるか否かを判定する。前記異常学習工程は、負例となる学習用画像を用いた機械学習である異常学習を実行することによって、前記負例となる学習用画像である異常画像のパターンをモデル化した異常分類モデルを生成する。また、前記判定工程は、前記正常モデルの出力値に基づいて前記判定対象画像が異常である場合の確度が所定の第1閾値よりも小である場合に、前記判定対象画像を前記異常分類モデルへ入力することによって取得される前記異常分類モデルの出力値に基づいて前記パターンを判定する。 The anomaly detection method according to one aspect of the embodiment includes a normal learning step, an evaluation step, a judgment step , and an abnormality learning step . The normal learning step is composed of a generative network and a discriminative network that compete with each other, and a skip connection model is arranged in the generative network, and a normal model is generated by modeling a normal image that is a training image that is a positive example by performing normal learning, which is machine learning, using a training image that is a positive example. The evaluation step calculates an abnormality degree of the judgment target image based on an output value of the normal model obtained by inputting a judgment target image to the normal model. The judgment step judges whether or not the judgment target image is abnormal based on the abnormality degree. The abnormality learning step generates an abnormality classification model that models a pattern of an abnormal image that is a training image that is a negative example by performing abnormality learning, which is machine learning, using a training image that is a negative example. Furthermore, the judgment step judges the pattern based on an output value of the abnormality classification model obtained by inputting the judgment target image to the abnormality classification model when the probability that the judgment target image is abnormal based on the output value of the normal model is smaller than a predetermined first threshold value.
実施形態の一態様によれば、機械学習を利用した異常検知を簡便に且つ精度よく行うことができる。 According to one aspect of the embodiment, anomaly detection using machine learning can be performed easily and accurately.
以下、添付図面を参照して、本願の開示する異常検知方法、異常検知装置および異常検知プログラムの実施形態を詳細に説明する。なお、以下に示す実施形態によりこの発明が限定されるものではない。 Below, the embodiments of the anomaly detection method, anomaly detection device, and anomaly detection program disclosed in the present application will be described in detail with reference to the attached drawings. Note that the present invention is not limited to the embodiments described below.
まず、実施形態に係る異常検知方法の概要について、図1~図9を参照して説明する。図1は、実施形態に係る異常検知方法の概要説明図(その1)である。また、図2および図3は、正常モデルがオートエンコーダである場合の説明図(その1)および(その2)である。また、図4および図5は、正常モデルがスキップ接続モデルである場合の説明図(その1)および(その2)である。また、図6~図9は、実施形態に係る異常検知方法の概要説明図(その2)~(その5)である。 First, an overview of the anomaly detection method according to the embodiment will be described with reference to Figs. 1 to 9. Fig. 1 is an overview diagram (part 1) of the anomaly detection method according to the embodiment. Figs. 2 and 3 are explanatory diagrams (part 1) and (part 2) of the case where the normal model is an autoencoder. Figs. 4 and 5 are explanatory diagrams (part 1) and (part 2) of the case where the normal model is a skip connection model. Figs. 6 to 9 are explanatory diagrams (part 2) to (part 5) of the anomaly detection method according to the embodiment.
実施形態に係る異常検知方法では、基本的に、正常データのみを学習し、学習の結果生成される正常モデルを用いて異常検知を行う。正常データのみを学習するため、異常データの収集や、異常の種類や位置を教示するいわゆるアノテーション作業の必要がない。さらに、異常データを学習する方法に比べて、想定外の未知の異常を検知できる可能性が高い。 In the anomaly detection method according to the embodiment, basically, only normal data is learned, and anomalies are detected using a normal model generated as a result of the learning. Because only normal data is learned, there is no need to collect abnormal data or perform so-called annotation work to teach the type and location of anomalies. Furthermore, compared to methods that do not learn abnormal data, there is a high possibility that unexpected and unknown anomalies can be detected.
具体的に、図1に示すように、実施形態に係る異常検知方法では、まず正常な製品の画像である「正常画像」のみを学習用データセットとした機械学習を実行し(ステップS1)、正常モデル124を生成する。
Specifically, as shown in FIG. 1, in the anomaly detection method according to the embodiment, first, machine learning is performed using only "normal images," which are images of normal products, as a learning dataset (step S1), and a
なお、「正常画像」であっても、照度等にばらつきがある場合があるので、図1に示すように、「正常画像」にも複数の正常パターンを準備することが好ましい。これにより、照度等のばらつきに頑健な正常モデル124を生成することが可能となる。
Note that even in a "normal image," there may be variation in illuminance, etc., so as shown in FIG. 1, it is preferable to prepare multiple normal patterns for the "normal image." This makes it possible to generate a
そして、実施形態に係る異常検知方法では、生成した正常モデル124へ判定対象となる「判定対象画像」を入力し、これにより正常モデル124が出力する出力値に基づいて正常との誤差(以下、「異常度」という)とかかる異常度の確度を算出する(ステップS2)。そして、異常度が大きければ、異常と判定する(ステップS3)。
In the anomaly detection method according to the embodiment, the "image to be judged" is input to the generated
すなわち、実施形態に係る異常検知方法では、「正常画像」のみに基づく正常モデル124により、正常か異常かを判定することとした。つまり、実施形態に係る異常検知方法では、正常との誤差である異常度に基づき異常を検知するため、多種多様の異常パターンを学習していなくとも、未知の異常を異常として検知することが可能である。これにより、運用初期で学習用データが少ない段階でも、正常モデル124を用いた異常判定が可能となる。
In other words, in the anomaly detection method according to the embodiment, normality or abnormality is determined using a
なお、図8等を用いた説明で後述するが、実施形態に係る異常検知方法では、正常モデル124では判定困難な場合、たとえば前述の確度が低いような場合、判定対象画像中の正常画像との差分部分である異常対象領域を抽出する。かかる異常対象領域に基づいては、後述する異常分類モデル125を用いた異常分類処理を行うことができる。かかる点については、図8に示す異常分類処理の説明で述べる。
As will be described later using FIG. 8 etc., in the anomaly detection method according to the embodiment, when it is difficult to make a judgment using the
また、抽出された異常判定領域や、異常分類処理の結果、ならびに、これを視認する人の知見等により、過検知の可能性があると判定できる場合がある。かかる場合、実施形態に係る異常検知方法では、異常か過検知かを識別する過検知モデル126を用いた再判定処理を行うことができる。かかる点については、図8および図9を用いた説明で後述する。
In addition, it may be possible to determine that there is a possibility of overdetection based on the extracted anomaly determination area, the results of the anomaly classification process, and the knowledge of the person visually observing the area. In such cases, the anomaly detection method according to the embodiment can perform a re-determination process using an
ところで、正常モデル124としてオートエンコーダを用いることが広く知られている。正常画像を学習したオートエンコーダにより、入力される判定対象画像を再構築し、判定対象画像と再構築データの差分(前述の異常度に相当)をとることで異常を検知することができる。
Incidentally, it is widely known to use an autoencoder as the
図2に示すように、オートエンコーダは、ディープラーニングにおけるニューラルネットワークの仕組みの一つであり、エンコーダとデコーダからなるニューラルネットワークである。 As shown in Figure 2, an autoencoder is one of the neural network mechanisms in deep learning, and is a neural network consisting of an encoder and a decoder.
エンコーダは、入力データに対し、畳み込みを行う1以上の中間層を介した次元圧縮(ダウンサンプリング)を行って特徴マップ(圧縮された特徴表現であり、潜在変数とも言う)を抽出する。デコーダは、かかる特徴マップから1以上の中間層を介した入力データの再構築(アップサンプリング)を行い、出力データとして出力する。 The encoder performs dimensional compression (downsampling) on the input data through one or more intermediate layers that perform convolution, extracting a feature map (a compressed feature representation, also called a latent variable). The decoder reconstructs (upsampling) the input data from the feature map through one or more intermediate layers, and outputs it as output data.
なお、図2に示すように、エンコーダにおいては、入力に近い中間層ほど局所的特徴が抽出され、入力から遠い中間層ほど大域的特徴が抽出される。局所的特徴は、色やエッジ等に関係する。一方、大域的特徴は、形状等に関係する。 As shown in Figure 2, in an encoder, local features are extracted from intermediate layers closer to the input, while global features are extracted from intermediate layers farther from the input. Local features relate to color, edges, etc. Global features, on the other hand, relate to shape, etc.
しかしながら、オートエンコーダでは、次元圧縮を経て再構築されたデータは平均的となり、画像の場合、図3に示すようにぼやける欠点がある。このため、図3に示すように、判定対象画像として正常画像が入力された場合でも、ある程度の異常度が生じてしまう。このため、検知精度の面で難がある。 However, with autoencoders, the data reconstructed after dimensional compression becomes average, and in the case of images, it has the drawback of being blurred, as shown in Figure 3. For this reason, as shown in Figure 3, even when a normal image is input as the image to be judged, a certain degree of abnormality will occur. This creates problems in terms of detection accuracy.
このようなオートエンコーダ以外では、スキップ接続モデル(以下、「U-Net」と称する場合がある)が知られている。図4に示すように、スキップ接続モデルは、エンコーダの各中間層で出力される特徴マップを、デコーダにおいて対応する各中間層の特徴マップに連結するスキップ接続を導入したモデルである。かかるスキップ接続により、ぼやけのない鮮明なデータの再構築が可能となる。 In addition to such autoencoders, the skip connection model (hereinafter sometimes referred to as "U-Net") is also known. As shown in Figure 4, the skip connection model is a model that introduces skip connections that connect the feature maps output in each hidden layer of the encoder to the feature maps of the corresponding hidden layers in the decoder. Such skip connections enable clear reconstruction of data without blurring.
ただし、図5に示すように、スキップ接続モデルでは、入力されたデータを恒等写像として再構築しやすい。したがって、異常画像も恒等写像化して再構築された場合、異常度はほぼ0となる。このため、異常検知は困難となる。 However, as shown in Figure 5, in the skip connection model, it is easy to reconstruct input data as an identity map. Therefore, if an abnormal image is also reconstructed using an identity map, the degree of abnormality will be almost 0. This makes it difficult to detect anomalies.
そこで、実施形態に係る異常検知方法では、互いに競合する生成ネットワークと識別ネットワークとからなり、生成ネットワークにスキップ接続モデルを配置した敵対的生成ネットワーク(GAN:Generative Adversarial Networks)により、正常モデル124を生成することとした。
Therefore, in the anomaly detection method according to the embodiment, a
具体的には、図6に示すように、実施形態に係る異常検知方法では、異常検知装置10(図10参照)の正常学習部112が、生成ネットワーク112aと識別ネットワーク112bとからなり、生成ネットワーク112aにスキップ接続モデル112aaを配置したGANにより、正常モデル124を生成する
Specifically, as shown in FIG. 6, in the anomaly detection method according to the embodiment, the
基本的なGANは、エンコーダがなく、またスキップ接続の概念もない。なお、異常検知にGANを適用した例もあるが(AnoGAN、Efficient GAN等)、スキップ接続モデルではなく、局所的特徴に対する再構築誤差は大きくなると考えられる。 Basic GANs do not have an encoder and do not have the concept of skip connection. Although there are examples of applying GANs to anomaly detection (AnoGAN, Efficient GAN, etc.), they are not skip connection models and reconstruction errors for local features are thought to be large.
これに対し、実施形態に係る異常検知方法では、エンコーダを有するスキップ接続モデル112aaにGANの学習アルゴリズムを組み込むことによって、再構築に際しての恒等写像を抑制する。具体的には、生成ネットワーク112aは、正常画像に基づいて偽画像を生成する。
In contrast, in the anomaly detection method according to the embodiment, the identity mapping during reconstruction is suppressed by incorporating a GAN learning algorithm into the skip connection model 112aa having an encoder. Specifically, the
また、識別ネットワーク112bは、正常画像および偽画像をたとえば交互に入力し、入力される画像の真偽を識別する。識別結果は、生成ネットワーク112aおよび識別ネットワーク112bへフィードバックされ、生成ネットワーク112aは識別ネットワーク112bを欺こうと学習し、識別ネットワーク112bはより正確に識別しようと学習する。
The
そして、生成ネットワーク112aが生成する偽画像に対し、識別ネットワーク112bの判定確率が半々となるまで学習が繰り返される。そして、学習が完了した段階の識別ネットワーク112bが正常モデル124となる。
Then, learning is repeated until the
また、図6に示すように、正常学習部112は、Attention機構112abをさらに含む。Attention機構112abは、画像の注視領域を重み付けする機構である。Attention機構112abは、たとえば特徴マップに対し、Attentionマップを乗じることによって注視領域を重み付けする。
As shown in FIG. 6, the
Attention機構112abは、再構築に際して特に大域的特徴を結合する効果を高めるように注視領域を重み付けする。なお、Attention機構112abは、ユーザの操作により動作してもよいし、自動的に動作するようにしてもよい。自動的に動作させる場合、公知のSelf-Attention GAN等のアルゴリズムを用いることができる。 The attention mechanism 112ab weights the attention area so as to enhance the effect of combining global features during reconstruction. The attention mechanism 112ab may be operated by a user's operation or may be operated automatically. When operating automatically, a known algorithm such as Self-Attention GAN can be used.
また、図6に示すように、正常学習部112は、ノイズ付加部112acをさらに含む。ノイズ付加部112acは、自己教師あり学習として、正常画像にノイズを付加し、ノイズを復元するように学習させる。たとえば、正常学習部112は、ノイズ付加部112acに正常画像の一部を隠すようにノイズを付加させ、隠された一部が再現されるように学習させる。これにより、恒等写像を抑制するとともに、データ拡張の効果によりモデルの汎化性を向上させる。
As shown in FIG. 6, the
正常学習部112が実行するこのような正常学習処理により生成される正常モデル124を用いることにより、図7に示すように、正常画像が入力された場合には正常画像が鮮明に再構築され、異常度はほぼ0となる。一方で、異常画像が入力された場合には恒等写像が抑制されて正常画像が鮮明に再構築され、異常度も明確に導出されることとなる。これにより、精度よく異常検知を行うことが可能となる。
By using the
なお、既に述べたが、実施形態に係る異常検知方法では、正常モデル124では判定困難な場合、たとえば前述の確度が低いような場合、判定対象画像中の正常画像との差分部分である異常対象領域を抽出する。かかる異常対象領域に基づいては、異常分類モデル125を用いた異常分類処理を行うことができる。
As already mentioned, in the anomaly detection method according to the embodiment, when it is difficult to make a judgment using the
具体的には、図8に示すように、実施形態に係る異常検知方法では、過去に検知した不良品の画像(すなわち「異常画像」)の異常対象領域R1,R2,R3…を学習用データセットとした機械学習を実行し(ステップS11)、異常分類モデル125を生成する。
Specifically, as shown in FIG. 8, in the anomaly detection method according to the embodiment, machine learning is performed using anomaly target regions R1, R2, R3, etc. of images of previously detected defective products (i.e., "anomaly images") as a learning dataset (step S11), and an
すなわち、実施形態に係る異常検知方法では、正常画像をモデル化した正常モデル124だけでなく、過去の異常検知時の異常画像に基づいて異常パターンをモデル化した異常分類モデル125をあわせて用いることによって、検知精度を向上させることとした。
In other words, in the anomaly detection method according to the embodiment, detection accuracy is improved by using not only the
ここで、「異常画像」は、図中に示すように、たとえば「文字違い」や「欠けあり」、「突起あり」といった異常パターンごとでクラスタリングされている。かかる異常画像に基づいて生成される異常分類モデル125により、言わば不良品の異常パターンをモデル化することができる。
Here, as shown in the figure, the "abnormal images" are clustered according to abnormality patterns, such as "character errors," "missing parts," and "protrusions." The
そして、実施形態に係る異常検知方法では、かかる異常分類モデル125に対し、たとえば正常モデル124に基づいて異常と判定された「判定対象画像」の異常対象領域RXを入力する。その結果として、異常分類モデル125は、分類結果(たとえば図中の「クラスID」)とかかる分類結果に対する確度を算出する(ステップS12)。
In the anomaly detection method according to the embodiment, the
ここで、分類結果に対する確度が大きい場合は、既知の異常パターンである可能性が高いので、実施形態に係る異常検知方法では、異常分類モデル125から得た分類結果を通知する(ステップS13)。
Here, if the accuracy of the classification result is high, it is highly likely to be a known abnormality pattern, so in the anomaly detection method according to the embodiment, the classification result obtained from the
一方で、分類結果に対する確度が小さい場合、未知の異常パターンである可能性がある。そこで、かかる場合は、実施形態に係る異常検知方法では、人の知見等に基づき、新しい異常パターンの分類クラスを追加設定し、該当の異常対象領域を用いた追加学習を行い、異常分類モデル125を更新することができる。これにより、運用中においても適宜、異常分類モデル125の精度を向上させることができる。
On the other hand, if the accuracy of the classification result is low, it may be an unknown abnormal pattern. In such a case, the anomaly detection method according to the embodiment can add a classification class for a new abnormal pattern based on human knowledge, etc., perform additional learning using the corresponding abnormality target area, and update the
さらに、たとえば分類結果に対する確度が小さ過ぎる場合、正常を異常と検知した過検知である可能性がある。そこで、かかる場合は、実施形態に係る異常検知方法では、過検知モデル126で再判定を行うことができる(ステップS14)。 Furthermore, for example, if the accuracy of the classification result is too low, there is a possibility of overdetection, in which normality is detected as an abnormality. In such a case, the anomaly detection method according to the embodiment can perform a re-evaluation using the overdetection model 126 (step S14).
図9に示すように、実施形態に係る異常検知方法では、たとえば過去に検知した異常画像および過検知画像を学習用データセットとした機械学習を実行し(ステップS21)、過検知モデル126を生成する。既に述べたように、過検知モデル126は、異常か過検知かを識別する識別モデルである。
As shown in FIG. 9, in the anomaly detection method according to the embodiment, for example, machine learning is performed using previously detected anomaly images and overdetection images as a learning dataset (step S21), and an
そして、かかる過検知モデル126に対し、たとえば異常分類モデル125に基づいて異常と判定されたが確度が小さ過ぎる判定対象画像を入力する。その結果として、過検知モデル126は、異常か過検知かを出力する(ステップS22)。
Then, the
このように、実施形態に係る異常検知方法では、正常学習部112が、生成ネットワーク112aと識別ネットワーク112bとからなり、生成ネットワーク112aにスキップ接続モデル112aaを配置したGANにより、正常モデル124を生成することとした。
In this way, in the anomaly detection method according to the embodiment, the
したがって、実施形態に係る異常検知方法によれば、機械学習を利用した異常検知を簡便に且つ精度よく行うことができる。 Therefore, the anomaly detection method according to the embodiment can easily and accurately detect anomalies using machine learning.
以下、上述した異常検知方法を適用した実施形態に係る異常検知装置10の構成について、さらに具体的に説明する。
The configuration of the
図10は、実施形態に係る異常検知装置10の構成例を示すブロック図である。なお、図10では、本実施形態の特徴を説明するために必要な構成要素を機能ブロックで表しており、一般的な構成要素についての記載を省略している。
Figure 10 is a block diagram showing an example of the configuration of an
換言すれば、図10に図示される各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。たとえば、各機能ブロックの分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的または物理的に分散・統合して構成することが可能である。 In other words, each component shown in FIG. 10 is a functional concept, and does not necessarily have to be physically configured as shown. For example, the specific form of distribution and integration of each functional block is not limited to that shown, and all or part of it can be functionally or physically distributed and integrated in any unit depending on various loads, usage conditions, etc.
なお、図10を用いた説明では、これまでに既に述べた構成要素については、説明を簡略するか、省略する場合がある。 Note that in the explanation using Figure 10, the explanation of components that have already been described may be simplified or omitted.
図10に示すように、異常検知装置10は、制御部11と、記憶部12とを備える。制御部11は、取得部111と、正常学習部112と、異常学習部113と、過検知学習部114と、評価部115と、判定部116とを備える。
As shown in FIG. 10, the
記憶部12は、ハードディスクドライブや不揮発性メモリ、レジスタといった記憶デバイスであって、正常学習用データセット121と、異常学習用データセット122と、過検知学習用データセット123と、正常モデル124と、異常分類モデル125と、過検知モデル126と、評価情報127とを記憶する。評価情報127は、異常度情報127aと、分類結果127bと、確度情報127cとを含む。
The
制御部11は、異常検知装置10の全体制御を行う。取得部111は、クラスタリングされた学習用画像を取得する。学習用画像は、正常モデル124を生成するための正常学習用の正常画像と、異常分類モデル125を生成するための異常学習用の異常画像と、過検知モデル126を生成するための過検知学習用の異常画像および過検知画像とを含む。
The
また、取得部111は、異常学習における異常対象領域を取得する。かかる領域はたとえば、異常検知装置10に接続されたキーボードやマウス、タッチパネルといった操作部20から指定することができる。なお、予め異常対象領域の識別に関する情報を記憶部12などに保持しておき、取得部111は、かかる情報から異常対象領域を抽出することとしてもよい。異常対象領域のそれぞれには分類クラスが紐付けられている。
The
また、取得部111は、取得した学習用画像のうちの正常画像を正常学習用データセット121へ格納する。また、取得部111は、異常画像のうちの異常対象領域を異常学習用データセット122へ格納する。また、取得部111は、取得した学習用画像のうちの異常画像および過検知画像を過検知学習用データセット123へ格納する。
The
また、取得部111は、後述する判定部116から追加学習要との判定結果を受け付けた場合に、該当の異常画像の異常対象領域RXを追加学習用として取得して、異常学習用データセット122へ格納する。
When the
正常学習部112は、正常学習用データセット121を取得し、これを用いた機械学習により正常モデル124を生成する正常学習処理を実行する。本実施形態に係る正常学習処理については図6を用いて説明済みのため、ここでの説明は省略する。
The
異常学習部113は、異常学習用データセット122を取得し、これを用いた機械学習により異常分類モデル125を生成する異常学習処理を実行する。本実施形態に係る異常学習処理については図8を用いて説明済みのため、ここでの説明は省略する。
The
過検知学習部114は、過検知学習用データセット123を取得し、これを用いた機械学習により過検知モデル126を生成する過検知学習処理を実行する。本実施形態に係る過検知学習処理については図9を用いて説明済みのため、ここでの説明は省略する。
The
なお、異常学習処理および過検知学習処理のアルゴリズムには、ディープラーニング以外のアルゴリズムを用いてもよい。たとえば、SVM(Support Vector Machine)のようなパターン識別器を用いたサポートベクタ回帰等の回帰分析手法により機械学習を実行し、異常分類モデル125および過検知モデル126を生成してもよい。また、ここで、パターン識別器はSVMに限らず、たとえばアダブースト(AdaBoost)などであってもよい。また、ランダムフォレストなどを用いてもよい。
Note that algorithms other than deep learning may be used for the anomaly learning process and the overdetection learning process. For example, machine learning may be performed by a regression analysis method such as support vector regression using a pattern classifier such as an SVM (Support Vector Machine) to generate the
また、正常学習部112、異常学習部113および過検知学習部114はそれぞれ、各学習処理の実行前や実行時に、操作部20から各種パラメータの入力を受け付け、これを反映した各学習処理を実行することが可能である。
In addition, the
評価部115は、判定対象画像を取得し、これを正常モデル124へ入力して、正常モデル124からの出力結果を受け取る。そして、評価部115は、受け取った出力結果に基づいて判定対象画像の異常度および確度を算出し、異常度情報127aおよび確度情報127cへ格納する。異常度は、たとえば判定対象画像の画素ごとの正常状態からの乖離度の総和である。
The
また、評価部115は、後述する判定部116から、正常モデル124によれば異常だが所定の第1閾値よりも確度が小さいとの判定結果を受け付けた場合に、かかる判定結果に含まれる異常対象領域RXを異常分類モデル125へ入力して、異常分類モデル125からの出力結果を受け取る。そして、評価部115は、受け取った出力結果を分類結果127bおよび確度情報127cへ格納する。
When the
また、評価部115は、判定部116から、正常モデル124または異常分類モデル125によれば異常だが第1閾値よりもさらに小さい所定の第2閾値よりも確度が小さいとの判定結果を受け付けた場合に、判定対象画像を過検知モデル126へ入力して、過検知モデル126からの出力結果を受け取る。そして、評価部115は、受け取った出力結果を判定部116へ通知する。
When the
判定部116は、異常度情報127aおよび確度情報127cを参照して、正常モデル124による異常度が所定の判定閾値より大であり、確度が所定の第1閾値より大である場合に、異常検知装置10に接続された表示部30等を介して正常モデル124による異常を通知する。
The
また、判定部116は、正常モデル124による異常度が所定の判定閾値より大であるが、確度が所定の第1閾値より小である場合に、すなわち正常モデル124では判定が難しい場合に、判定対象画像から異常対象領域RXを抽出し、かかる異常対象領域RXを含む、正常モデル124によれば異常だが確度が小さいとの判定結果を取得部111へ通知する。
In addition, when the degree of abnormality according to the
また、判定部116は、分類結果127bおよび確度情報127cを参照して、異常分類モデル125による確度が所定の第1閾値より大である場合に、表示部30等を介して異常分類モデル125による異常と分類結果127bを通知する。
The
また、判定部116は、異常分類モデル125による確度が所定の第1閾値より小であり、さらに第1閾値よりも小さい所定の第2閾値よりも確度が小である場合に、正常モデル124または異常分類モデル125によれば異常だが第2閾値よりも確度が小さいとの判定結果を取得部111へ通知する。
In addition, when the accuracy according to the
また、判定部116は、評価部115から過検知モデル126の出力結果を受け付けた場合に、表示部30等を介して、かかる出力結果である異常か過検知かを通知する。
When the
また、判定部116は、異常分類モデル125による確度が所定の第1閾値より小であるが、第1閾値よりも小さい所定の第2閾値よりは確度が大である場合に、追加学習要との判定結果を取得部111へ通知するとともに、該当の異常画像の異常対象領域RXを異常分類モデル125の追加学習用として取得部111に取得させる。
In addition, when the accuracy based on the
取得部111は、かかる通知に基づいて、操作部20等を介して新しい異常パターンの分類クラスの追加設定を受け付ける。異常学習部113は、かかる追加学習用の異常対象領域RXおよび追加設定の内容に基づいて異常学習を実行し、異常分類モデル125を更新する。
Based on this notification, the
次に、これまでの説明を分かりやすくするために、実施形態に係る異常検知方法による検知結果の具体例を図11~図16に示す。図11~図16は、検知結果の具体例を示す図(その1)~(その6)である。 Next, to make the above explanation easier to understand, specific examples of detection results using the anomaly detection method according to the embodiment are shown in Figs. 11 to 16. Figs. 11 to 16 are diagrams (part 1) to (part 6) showing specific examples of detection results.
上記したように、正常モデル124の生成には、図11に示すように、「正常品」の正常画像が用いられる。すなわち、正常学習用データセット121には、図11に示すような正常画像が格納され、正常学習部112がこれを用いて正常モデル124を生成する。
As described above, to generate the
なお、既に述べたように、正常画像にも照度が異なる等、複数の正常パターンを準備することが好ましい。これにより、照度のばらつきに頑健な正常モデル124を生成することが可能となる。
As already mentioned, it is preferable to prepare multiple normal patterns, such as normal images with different illuminances. This makes it possible to generate a
また、異なるのは照度に限らず、たとえば輝度や彩度、位置、角度等であってもよい。また、図11には、歯車を一例として挙げているが、異常の検知対象を問うものではなく、菓子等であってもよいし、後に示すように弁当の盛り付け、各種の材料、印字の内容等であってもよい。 The difference is not limited to illuminance, but may be brightness, saturation, position, angle, etc. Also, while FIG. 11 shows a gear as an example, the object of anomaly detection is not limited, and it may be sweets, or as will be shown later, the arrangement of bento boxes, various ingredients, printed content, etc.
ここで、図12にM1部として示すように、「欠け」のある不良品があったものとする。かかる不良品の画像が判定対象画像として入力された場合、評価部115はかかる画像を正常モデル124へ入力し、その出力値に基づいて同図の「検知結果」に示すように、欠けの位置に相当する領域を異常対象領域RXとして抽出することができる。
Here, assume that there is a defective product with a "chipped" part, as shown as part M1 in FIG. 12. When an image of such a defective product is input as the image to be judged, the
また、図13に示すのは、「傷」(図中のM2部参照)のある不良品である。かかる不良品の画像が判定対象画像として入力された場合は、同図の「検知結果」に示すように、傷の位置に相当する領域を異常対象領域RXとして抽出することができる。 Also, Figure 13 shows a defective product with a "scratch" (see part M2 in the figure). When an image of such a defective product is input as the image to be judged, the area corresponding to the position of the scratch can be extracted as the abnormal target area RX, as shown in the "detection result" in the figure.
また、図14に示すのは、弁当の盛り付けの異常を検知対象とする場合である。かかる場合、正常品に対し、たとえば梅干しの「抜け」(すなわち、置き忘れ)がある不良品の画像が判定対象画像として入力された場合は、同図に示すように、梅干しが置かれるべき位置に相当する領域を異常対象領域RXとして抽出することができる。 Figure 14 shows a case where abnormalities in the presentation of a bento box are to be detected. In this case, when an image of a defective product, for example a pickled plum that is "missing" (i.e., left behind) is input as the image to be judged, the area corresponding to the position where the pickled plum should be placed can be extracted as the abnormal target area RX, as shown in the figure.
また、図15に示すのは、各種の材料の異常、ここでは箱に複数入れられた同じ材料の異常を検知対象とする場合である。かかる場合、たとえば「変色」した材料が含まれる画像が判定対象画像として入力された場合は、同図に示すように、変色した材料の位置に相当する領域を異常対象領域RXとして抽出することができる。 Figure 15 shows a case where the detection target is an abnormality in various materials, in this case, the same material placed in a box in multiple locations. In such a case, if an image containing a "discolored" material is input as the image to be judged, the area corresponding to the position of the discolored material can be extracted as the abnormal target area RX, as shown in the figure.
また、図16に示すのは、印字の内容の異常を検知対象とする場合である。かかる場合、正常品に対し、たとえば印字の「擦れ」がある不良品の画像が判定対象画像として入力された場合は、同図に示すように、印字の擦れがある位置に相当する領域を異常対象領域RXとして抽出することができる。 Figure 16 shows a case where abnormalities in the printed content are the object of detection. In this case, if an image of a defective product, for example, with "rubbed" print, is input as the image to be judged, compared to a normal product, the area corresponding to the position where the rubbed print is located can be extracted as the abnormal target area RX, as shown in the figure.
次に、実施形態に係る異常検知装置10が実行する処理手順について、図17および図18を用いて説明する。図17および図18は、実施形態に係る異常検知装置10が実行する処理手順を示すフローチャート(その1)および(その2)である。
Next, the processing procedure executed by the
図17に示すように、まず学習対象期間であるか否かが判定される(ステップS101)。学習対象期間は、たとえば異常検知装置10の運用初回や、運用前に予め正常モデル124、異常分類モデル125および過検知モデル126を作成しておく場合の所定期間に相当する。
As shown in FIG. 17, first, it is determined whether or not it is the learning period (step S101). The learning period corresponds to, for example, the first operation of the
ここで、学習対象期間である場合(ステップS101,Yes)、正常学習部112が正常画像の学習用データセット(すなわち、正常学習用データセット121)から、生成ネットワーク112aにスキップ接続モデル112aaを配置したGANにより正常モデル124を生成する(ステップS102)。
If it is the learning period (step S101, Yes), the
また、異常学習部113が、異常対象領域の学習用データセット(すなわち、異常学習用データセット122)から機械学習により異常分類モデル125を生成する(ステップS103)。
The
また、過検知学習部114が、異常画像および過検知画像の学習用データセット(すなわち、過検知学習用データセット123)から機械学習により過検知モデル126を生成する(ステップS104)。
The
つづいて、または、ステップS101で学習対象期間でない場合(ステップS101,No)、ステップS105(図18参照)へ移行する。 Next, or if it is not the learning period in step S101 (step S101, No), proceed to step S105 (see Figure 18).
ステップS105では、図18に示すように、評価部115が、判定対象画像を正常モデル124へ入力し、異常度と確度を算出する(ステップS105)。そして、判定部116が、異常度が所定の判定閾値より大であるか否かを判定する(ステップS106)。
In step S105, as shown in FIG. 18, the
ここで、異常度が所定の判定閾値より大である場合(ステップS106,Yes)、判定部116が、確度が所定の第1閾値より大であるか否かを判定する(ステップS107)。異常度が所定の判定閾値より小である場合(ステップS106,No)、処理を終了する。
If the degree of abnormality is greater than the predetermined judgment threshold (step S106, Yes), the
つづいて、確度が所定の第1閾値より大である場合(ステップS107,Yes)、判定部116は正常モデル124による異常を通知し(ステップS108)、処理を終了する。
Next, if the accuracy is greater than a predetermined first threshold (step S107, Yes), the
また、確度が所定の第1閾値より小である場合(ステップS107,No)、判定部116は、判定対象画像から、異常対象領域RXを抽出する(ステップS109)。そして、評価部115が、異常対象領域RXを異常分類モデル125へ入力し、分類結果と確度を算出する(ステップS110)。
If the accuracy is less than the first threshold (step S107, No), the
そして、判定部116が、確度が第1閾値より大であるか否かを判定する(ステップS111)。ここで、確度が第1閾値より大である場合(ステップS111,Yes)、判定部116は、異常分類モデル125による異常と分類結果を通知し(ステップS112)、処理を終了する。
Then, the
一方、確度が第1閾値より小である場合(ステップS111,No)、つづいて判定部116は、確度が第1閾値よりもさらに小さい所定の第2閾値よりも小であるか否かを判定する(ステップS113)。
On the other hand, if the certainty is smaller than the first threshold (step S111, No), the
ここで、確度が第2閾値よりも小である場合(ステップS113,Yes)、評価部115が、判定対象画像を過検知モデル126へ入力し、判定部116が過検知モデル126の出力結果に基づいて再判定を行う(ステップS114)。そして、判定部116は、再判定結果を通知し(ステップS115)、処理を終了する。
Here, if the accuracy is less than the second threshold (step S113, Yes), the
一方、確度が第2閾値よりも大である場合(ステップS113,No)、取得部111が、操作部20等を介した該当の異常対象領域RXの分類クラスの追加設定を受け付ける(ステップS116)。
On the other hand, if the accuracy is greater than the second threshold (step S113, No), the
そして、異常学習部113が、該当の異常対象領域RXを追加学習分とした機械学習により異常分類モデル125を更新し(ステップS117)、処理を終了する。
Then, the
なお、上述してきた実施形態に係る異常検知装置10は、たとえば図19に示すような構成のコンピュータ60によって実現される。図19は、異常検知装置10の機能を実現するコンピュータの一例を示すハードウェア構成図である。コンピュータ60は、CPU(Central Processing Unit)61、RAM(Random Access Memory)62、ROM(Read Only Memory)63、HDD(Hard Disk Drive)64、通信インタフェース(I/F)65、入出力インタフェース(I/F)66、およびメディアインタフェース(I/F)67を備える。
The
CPU61は、ROM63またはHDD64に格納されたプログラムに基づいて動作し、各部の制御を行う。ROM63は、コンピュータ60の起動時にCPU61によって実行されるブートプログラムや、コンピュータ60のハードウェアに依存するプログラム等を格納する。
The CPU 61 operates based on a program stored in the ROM 63 or the
HDD64は、CPU61によって実行されるプログラムおよび当該プログラムによって使用されるデータ等を格納する。通信インタフェース65は、通信ネットワークを介して他の機器からデータを受信してCPU61へ送り、CPU61が生成したデータを、通信ネットワークを介して他の機器へ送信する。
The
CPU61は、入出力インタフェース66を介して、ディスプレイやプリンタ等の出力装置、および、キーボードやマウス等の入力装置を制御する。CPU61は、入出力インタフェース66を介して、入力装置からデータを取得する。また、CPU61は、生成したデータを、入出力インタフェース66を介して出力装置へ出力する。
The CPU 61 controls output devices such as a display and a printer, and input devices such as a keyboard and a mouse, via the input/
メディアインタフェース67は、記録媒体68に格納されたプログラムまたはデータを読み取り、RAM62を介してCPU61に提供する。CPU61は、当該プログラムを、メディアインタフェース67を介して記録媒体68からRAM62上にロードし、ロードしたプログラムを実行する。記録媒体68は、たとえばDVD(Digital Versatile Disc)、PD(Phase change rewritable Disk)等の光学記録媒体、MO(Magneto-Optical disk)等の光磁気記録媒体、テープ媒体、磁気記録媒体、または半導体メモリ等である。
The media interface 67 reads the program or data stored in the
たとえば、コンピュータ60が異常検知装置10として機能する場合、コンピュータ60のCPU61は、RAM62上にロードされた異常検知プログラムを実行することにより、制御部11の各機能を実現する。また、HDD64には、記憶部12内のデータが記憶される。コンピュータ60のCPU61は、これらのプログラムを、記録媒体68から読み取って実行するが、他の例として、他の装置から、通信ネットワークを介してこれらのプログラムを取得してもよい。
For example, when the
上述してきたように、実施形態に係る異常検知装置10は、正常学習部112と、評価部115と、判定部116とを備える。正常学習部112は、互いに競合する生成ネットワーク112aと識別ネットワーク112bとからなり、生成ネットワーク112aにスキップ接続モデル112aaを配置した敵対的生成ネットワークにより、正例となる学習用画像を用いた機械学習である正常学習を実行することによって、上記正例となる学習用画像である正常画像をモデル化した正常モデル124を生成する。評価部115は、判定対象画像を正常モデル124へ入力することによって取得される正常モデル124の出力値に基づいて判定対象画像の異常度を算出する。判定部116は、上記異常度に基づいて判定対象画像が異常であるか否かを判定する。
As described above, the
したがって、本実施形態に係る異常検知装置10によれば、機械学習を利用した異常検知を簡便に且つ精度よく行うことができる。
Therefore, the
なお、上述した実施形態では、正常モデル124、異常分類モデル125および過検知モデル126の3つを組み合わせる例を挙げて説明したが、必ずしも3つ同時に組み合わせる必要はない。たとえば、基本的に正常モデル124および異常分類モデル125を組み合わせた異常検知を行うこととし、過検知モデル126についてはオプション的に選択可能としてもよい。また、たとえば、基本的に正常モデル124および過検知モデル126を組み合わせることとし、異常分類モデル125についてはオプション的に選択可能としてもよい。
In the above embodiment, an example of combining the
さらなる効果や変形例は、当業者によって容易に導き出すことができる。このため、本発明のより広範な態様は、以上のように表しかつ記述した特定の詳細および代表的な実施形態に限定されるものではない。したがって、添付の特許請求の範囲およびその均等物によって定義される総括的な発明の概念の精神または範囲から逸脱することなく、様々な変更が可能である。 Further advantages and modifications may readily occur to those skilled in the art. Therefore, the invention in its broader aspects is not limited to the specific details and representative embodiments shown and described above. Accordingly, various modifications may be made without departing from the spirit or scope of the general inventive concept as defined by the appended claims and equivalents thereof.
10 異常検知装置
11 制御部
111 取得部
112 正常学習部
113 異常学習部
114 過検知学習部
115 評価部
116 判定部
12 記憶部
121 正常学習用データセット
122 異常学習用データセット
123 過検知学習用データセット
124 正常モデル
125 異常分類モデル
126 過検知モデル
127 評価情報
127a 異常度情報
127b 分類結果
127c 確度情報
REFERENCE SIGNS
Claims (8)
判定対象画像を前記正常モデルへ入力することによって取得される前記正常モデルの出力値に基づいて前記判定対象画像の異常度を算出する評価工程と、
前記異常度に基づいて前記判定対象画像が異常であるか否かを判定する判定工程と、
負例となる学習用画像を用いた機械学習である異常学習を実行することによって、前記負例となる学習用画像である異常画像のパターンをモデル化した異常分類モデルを生成する異常学習工程と
を含み、
前記判定工程は、
前記正常モデルの出力値に基づいて前記判定対象画像が異常である場合の確度が所定の第1閾値よりも小である場合に、前記判定対象画像を前記異常分類モデルへ入力することによって取得される前記異常分類モデルの出力値に基づいて前記パターンを判定する
ことを特徴とする異常検知方法。 A normal learning process for generating a normal model by performing normal learning, which is machine learning using training images that are positive examples, using a generative adversarial network that is composed of a generative network and a discriminative network that compete with each other and in which a skip connection model is arranged in the generative network, and generating a normal model that models the normal images that are training images that are positive examples;
an evaluation step of calculating an abnormality degree of the target image based on an output value of the normal model obtained by inputting the target image to the normal model;
a determination step of determining whether the target image is abnormal or not based on the degree of abnormality ;
an anomaly learning process for generating an anomaly classification model that models a pattern of an abnormal image that is a learning image serving as a negative example by executing anomaly learning, which is a machine learning process using learning images serving as negative examples;
Including,
The determination step includes:
When the probability that the target image is abnormal based on the output value of the normal model is smaller than a predetermined first threshold, the pattern is determined based on the output value of the abnormality classification model obtained by inputting the target image to the abnormality classification model.
The anomaly detection method according to the present invention is characterized in that
判定対象画像を前記正常モデルへ入力することによって取得される前記正常モデルの出力値に基づいて前記判定対象画像の異常度を算出する評価工程と、an evaluation step of calculating an abnormality degree of the target image based on an output value of the normal model obtained by inputting the target image to the normal model;
前記異常度に基づいて前記判定対象画像が異常であるか否かを判定する判定工程と、a determination step of determining whether the target image is abnormal or not based on the degree of abnormality;
負例および過検知例となる学習用画像を用いた機械学習である過検知学習を実行することによって、異常であるか過検知であるかを識別する過検知モデルを生成する過検知学習工程とAn overdetection learning process for generating an overdetection model for distinguishing between an anomaly and an overdetection by executing overdetection learning, which is machine learning using learning images that are negative examples and overdetection examples;
を含み、Including,
前記判定工程は、The determination step includes:
前記正常モデルの出力値に基づいて前記判定対象画像が異常である場合の確度が所定の第2閾値よりも小である場合に、前記判定対象画像を前記過検知モデルへ入力することによって取得される前記過検知モデルの出力値に基づいて前記異常であるか過検知であるかを判定するWhen the probability that the image to be determined is abnormal based on the output value of the normal model is smaller than a predetermined second threshold, the image to be determined is determined to be abnormal or overdetected based on the output value of the overdetection model obtained by inputting the image to be determined into the overdetection model.
ことを特徴とする異常検知方法。The anomaly detection method according to the present invention is characterized in that
前記正常学習工程は、
前記スキップ接続モデルにおいて前記正常画像の少なくとも大域的特徴が結合されるように前記Attention機構を用いて前記正常画像の注視領域を重み付けさせる
ことを特徴とする請求項1または2に記載の異常検知方法。 The generating network includes an Attention mechanism,
The normal learning step includes:
The method according to claim 1 or 2, further comprising weighting the attention region of the normal image using the attention mechanism such that at least global features of the normal image are combined in the skip connection model.
前記正常学習工程は、
自己教師あり学習として前記ノイズ付加部を用いて前記正常画像にノイズを付加させ、前記スキップ接続モデルにおいて前記ノイズが復元されるように正常学習を実行する
ことを特徴とする請求項1、2または3に記載の異常検知方法。 The generator network includes a noise adder;
The normal learning step includes:
The anomaly detection method described in claim 1 , 2 or 3, characterized in that noise is added to the normal image using the noise addition unit as self-supervised learning, and normal learning is performed so that the noise is restored in the skip connection model.
判定対象画像を前記正常モデルへ入力することによって取得される前記正常モデルの出力値に基づいて前記判定対象画像の異常度を算出する評価部と、
前記異常度に基づいて前記判定対象画像が異常であるか否かを判定する判定部と、
負例となる学習用画像を用いた機械学習である異常学習を実行することによって、前記負例となる学習用画像である異常画像のパターンをモデル化した異常分類モデルを生成する異常学習部と
を備え、
前記判定部は、
前記正常モデルの出力値に基づいて前記判定対象画像が異常である場合の確度が所定の第1閾値よりも小である場合に、前記判定対象画像を前記異常分類モデルへ入力することによって取得される前記異常分類モデルの出力値に基づいて前記パターンを判定する
ことを特徴とする異常検知装置。 a normal learning unit that generates a normal model by modeling a normal image, which is a training image serving as a positive example, by executing normal learning, which is machine learning using a training image serving as a positive example, using an adversarial generative network that is composed of a generative network and a discriminative network that compete with each other and has a skip connection model arranged in the generative network;
an evaluation unit that calculates an abnormality degree of the target image based on an output value of the normal model obtained by inputting the target image to the normal model;
a determination unit that determines whether the determination target image is abnormal or not based on the degree of abnormality ;
an anomaly learning unit that generates an anomaly classification model that models a pattern of an abnormal image that is a learning image serving as a negative example by executing anomaly learning, which is a machine learning method using the learning image serving as a negative example;
Equipped with
The determination unit is
When the probability that the target image is abnormal based on the output value of the normal model is smaller than a predetermined first threshold, the pattern is determined based on the output value of the abnormality classification model obtained by inputting the target image to the abnormality classification model.
An anomaly detection device comprising :
判定対象画像を前記正常モデルへ入力することによって取得される前記正常モデルの出力値に基づいて前記判定対象画像の異常度を算出する評価部と、an evaluation unit that calculates an abnormality degree of the target image based on an output value of the normal model obtained by inputting the target image to the normal model;
前記異常度に基づいて前記判定対象画像が異常であるか否かを判定する判定部と、a determination unit that determines whether the determination target image is abnormal or not based on the degree of abnormality;
負例および過検知例となる学習用画像を用いた機械学習である過検知学習を実行することによって、異常であるか過検知であるかを識別する過検知モデルを生成する過検知学習部とAn overdetection learning unit that generates an overdetection model that distinguishes between an anomaly and an overdetection by executing overdetection learning, which is a machine learning method using learning images that are negative examples and overdetection examples;
を備え、Equipped with
前記判定部は、The determination unit is
前記正常モデルの出力値に基づいて前記判定対象画像が異常である場合の確度が所定の第2閾値よりも小である場合に、前記判定対象画像を前記過検知モデルへ入力することによって取得される前記過検知モデルの出力値に基づいて前記異常であるか過検知であるかを判定するWhen the probability that the image to be determined is abnormal based on the output value of the normal model is smaller than a predetermined second threshold, the image to be determined is determined to be abnormal or overdetected based on the output value of the overdetection model obtained by inputting the image to be determined into the overdetection model.
ことを特徴とする異常検知装置。An anomaly detection device comprising:
判定対象画像を前記正常モデルへ入力することによって取得される前記正常モデルの出力値に基づいて前記判定対象画像の異常度を算出する評価手順と、
前記異常度に基づいて前記判定対象画像が異常であるか否かを判定する判定手順と、
負例となる学習用画像を用いた機械学習である異常学習を実行することによって、前記負例となる学習用画像である異常画像のパターンをモデル化した異常分類モデルを生成する異常学習手順と
をコンピュータに実行させ、
前記判定手順は、
前記正常モデルの出力値に基づいて前記判定対象画像が異常である場合の確度が所定の第1閾値よりも小である場合に、前記判定対象画像を前記異常分類モデルへ入力することによって取得される前記異常分類モデルの出力値に基づいて前記パターンを判定する
ことを特徴とする異常検知プログラム。 A normal learning procedure in which a machine learning normal learning is performed using training images that are positive examples using a generative network and a discriminative network that compete with each other, the generative network being configured with a skip connection model, to generate a normal model that models the normal images that are training images that are positive examples;
An evaluation procedure for calculating an abnormality degree of the target image based on an output value of the normal model obtained by inputting the target image to the normal model;
a determination step of determining whether the target image is abnormal or not based on the degree of abnormality ;
an anomaly learning procedure for generating an anomaly classification model that models a pattern of an abnormal image that is a negative example learning image by executing anomaly learning, which is a machine learning procedure using a negative example learning image;
Run the following on your computer :
The determination procedure includes:
When the probability that the target image is abnormal based on the output value of the normal model is smaller than a predetermined first threshold, the pattern is determined based on the output value of the abnormality classification model obtained by inputting the target image to the abnormality classification model.
An anomaly detection program comprising :
判定対象画像を前記正常モデルへ入力することによって取得される前記正常モデルの出力値に基づいて前記判定対象画像の異常度を算出する評価手順と、An evaluation procedure for calculating an abnormality degree of the target image based on an output value of the normal model obtained by inputting the target image to the normal model;
前記異常度に基づいて前記判定対象画像が異常であるか否かを判定する判定手順と、a determination step of determining whether the target image is abnormal or not based on the degree of abnormality;
負例および過検知例となる学習用画像を用いた機械学習である過検知学習を実行することによって、異常であるか過検知であるかを識別する過検知モデルを生成する過検知学習手順とAn overdetection learning procedure that generates an overdetection model that can distinguish between an anomaly and an overdetection by performing overdetection learning, which is a machine learning method using learning images that are negative examples and overdetection examples;
をコンピュータに実行させ、Run the following on your computer:
前記判定手順は、The determination procedure includes:
前記正常モデルの出力値に基づいて前記判定対象画像が異常である場合の確度が所定の第2閾値よりも小である場合に、前記判定対象画像を前記過検知モデルへ入力することによって取得される前記過検知モデルの出力値に基づいて前記異常であるか過検知であるかを判定するWhen the probability that the image to be determined is abnormal based on the output value of the normal model is smaller than a predetermined second threshold, the image to be determined is determined to be abnormal or overdetected based on the output value of the overdetection model obtained by inputting the image to be determined into the overdetection model.
ことを特徴とする異常検知プログラム。An anomaly detection program comprising:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020141853A JP7519232B2 (en) | 2020-08-25 | 2020-08-25 | Anomaly detection method, anomaly detection device, and anomaly detection program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020141853A JP7519232B2 (en) | 2020-08-25 | 2020-08-25 | Anomaly detection method, anomaly detection device, and anomaly detection program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2022037623A JP2022037623A (en) | 2022-03-09 |
| JP7519232B2 true JP7519232B2 (en) | 2024-07-19 |
Family
ID=80494925
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2020141853A Active JP7519232B2 (en) | 2020-08-25 | 2020-08-25 | Anomaly detection method, anomaly detection device, and anomaly detection program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7519232B2 (en) |
Families Citing this family (10)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7639744B2 (en) * | 2022-03-15 | 2025-03-05 | トヨタ自動車株式会社 | Inspection device and inspection method |
| KR102888117B1 (en) * | 2022-03-23 | 2025-11-19 | 주식회사 Lg 경영개발원 | An artificial intelligence apparatus for detecting defective products based on product images and method thereof |
| JP2024017208A (en) * | 2022-07-27 | 2024-02-08 | 株式会社日立製作所 | Computing devices, information presentation systems, mobile objects |
| JP7844282B2 (en) * | 2022-07-29 | 2026-04-13 | 株式会社日立産機システム | Inspection apparatus and method |
| JP7764416B2 (en) * | 2023-02-28 | 2025-11-05 | 株式会社東芝 | Anomaly detection device, processing device, anomaly detection method, and program |
| WO2024181037A1 (en) * | 2023-03-01 | 2024-09-06 | 日本電気株式会社 | Data processing device, data processing method, and program |
| CN118674980B (en) * | 2024-06-06 | 2025-01-21 | 武汉工程大学 | Anomaly detection method based on attention U-shaped convolutional network |
| CN118823506B (en) * | 2024-06-20 | 2025-09-23 | 华中科技大学 | Diffusion model fine-tuning method and device for few-sample defect image generation |
| KR102760992B1 (en) | 2024-09-02 | 2025-01-24 | 중앙대학교 산학협력단 | Method for generating deformed images for anomaly detection and computing device for performing the same |
| CN119723165A (en) * | 2024-12-02 | 2025-03-28 | 西北工业大学 | An industrial image anomaly detection method based on pseudo-anomaly sample generation |
Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019161342A1 (en) | 2018-02-17 | 2019-08-22 | Regeneron Pharmaceuticals, Inc. | Gan-cnn for mhc peptide binding prediction |
| US20190333198A1 (en) | 2018-04-25 | 2019-10-31 | Adobe Inc. | Training and utilizing an image exposure transformation neural network to generate a long-exposure image from a single short-exposure image |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7228967B2 (en) * | 2018-07-02 | 2023-02-27 | 三菱電機株式会社 | joint |
-
2020
- 2020-08-25 JP JP2020141853A patent/JP7519232B2/en active Active
Patent Citations (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2019161342A1 (en) | 2018-02-17 | 2019-08-22 | Regeneron Pharmaceuticals, Inc. | Gan-cnn for mhc peptide binding prediction |
| US20190333198A1 (en) | 2018-04-25 | 2019-10-31 | Adobe Inc. | Training and utilizing an image exposure transformation neural network to generate a long-exposure image from a single short-exposure image |
Non-Patent Citations (1)
| Title |
|---|
| Samet AKCAY, et.al.,"Skip-GANomaly: Skip Connected and Adversarially Trained Encoder-Decoder Anomaly Detection",arXiv,2019年,https://arxiv.org/abs/1901.08954 |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2022037623A (en) | 2022-03-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7519232B2 (en) | Anomaly detection method, anomaly detection device, and anomaly detection program | |
| CN110852983B (en) | Method for detecting defects in semiconductor devices | |
| US12125268B2 (en) | Method and device for testing the robustness of an artificial neural network | |
| Elangovan et al. | Glaucoma assessment from color fundus images using convolutional neural network | |
| JP7106391B2 (en) | Image determination method, image determination device, and image determination program | |
| KR101938992B1 (en) | Explainable computeraided diagnosis system and the method thereof | |
| JP7830482B2 (en) | Method and apparatus for grading images of collected items using image segmentation and image analysis. | |
| JP2015087903A (en) | Apparatus and method for information processing | |
| CN107004265A (en) | Information processor, the method for processing information, discriminator generating means, the method and program for generating discriminator | |
| CN109840554A (en) | A kind of Alzheimer's disease MRI image classification method based on SVM-RFE-MRMR algorithm | |
| JP7206892B2 (en) | Image inspection device, learning method for image inspection, and image inspection program | |
| JP2021119442A (en) | Anomaly detection method, anomaly detection device, anomaly detection program and learning method | |
| JP7453813B2 (en) | Inspection equipment, inspection methods, programs, learning devices, learning methods, and learned datasets | |
| Mousavi et al. | Cyst identification in retinal optical coherence tomography images using hidden Markov model | |
| WO2023012967A1 (en) | Generation method, information processing device, and generation program | |
| US11657099B2 (en) | Information processing apparatus evaluating similarity between medical data, information processing method, and storage medium | |
| CN1989524A (en) | System and method for automated suspicious object boundary determination | |
| Ferrari et al. | GRD‐Net: Generative‐Reconstructive‐Discriminative Anomaly Detection with Region of Interest Attention Module | |
| JP7385046B2 (en) | Color spot prediction method, device, equipment and storage medium | |
| Szijártó et al. | Design of a machine learning system to predict the thickness of a melanoma lesion in a non-invasive way from dermoscopic images | |
| JP7557302B2 (en) | Apparatus, method and system for generating a model for identifying an object of interest from an image - Patents.com | |
| JP2019139386A (en) | Image determination method, image determination device and image determination program | |
| CN117083630A (en) | Information processing device, control program and control method | |
| JP7830372B2 (en) | Training methods, equipment, and programs | |
| KR20220067617A (en) | System, method and program for creating tranining data using x-ray attenuation equation and method for detecting foreighn material using thereof |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20210212 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230605 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240315 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240402 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240424 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240625 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20240708 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7519232 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |