Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP7519232B2 - Anomaly detection method, anomaly detection device, and anomaly detection program - Google Patents
[go: Go Back, main page]

JP7519232B2 - Anomaly detection method, anomaly detection device, and anomaly detection program - Google Patents

Anomaly detection method, anomaly detection device, and anomaly detection program Download PDF

Info

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
Application number
JP2020141853A
Other languages
Japanese (ja)
Other versions
JP2022037623A (en
Inventor
修司 千田
大輔 馬場
浩平 有吉
健太郎 斉藤
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.)
YE Digital Co Ltd
Original Assignee
YE Digital Co 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 YE Digital Co Ltd filed Critical YE Digital Co Ltd
Priority to JP2020141853A priority Critical patent/JP7519232B2/en
Publication of JP2022037623A publication Critical patent/JP2022037623A/en
Application granted granted Critical
Publication of JP7519232B2 publication Critical patent/JP7519232B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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 Patent Document 1 performs machine learning using feature vectors calculated for multiple images whose classification results are known, and classifies images whose classification results are unknown based on the results obtained by the machine learning.

こうした技術を利用することにより、たとえば製造された製品の画像から、かかる製品が正常品であるか否か、また、正常品でなければ何が異常か、を分類することができる。 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.

特開2015-011552号公報JP 2015-011552 A

しかしながら、上述した従来技術には、機械学習を利用した異常検知を簡便に且つ精度よく行ううえで、さらなる改善の余地がある。 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.

図1は、実施形態に係る異常検知方法の概要説明図(その1)である。FIG. 1 is a schematic explanatory diagram (part 1) of an anomaly detection method according to an embodiment. 図2は、正常モデルがオートエンコーダである場合の説明図(その1)である。FIG. 2 is an explanatory diagram (part 1) of a case where the normal model is an autoencoder. 図3は、正常モデルがオートエンコーダである場合の説明図(その2)である。FIG. 3 is an explanatory diagram (part 2) of the case where the normal model is an autoencoder. 図4は、正常モデルがスキップ接続モデルである場合の説明図(その1)である。FIG. 4 is an explanatory diagram (part 1) of a case where the normal model is a skip connection model. 図5は、正常モデルがスキップ接続モデルである場合の説明図(その2)である。FIG. 5 is an explanatory diagram (part 2) of the case where the normal model is a skip connection model. 図6は、実施形態に係る異常検知方法の概要説明図(その2)である。FIG. 6 is a schematic explanatory diagram (part 2) of the anomaly detection method according to the embodiment. 図7は、実施形態に係る異常検知方法の概要説明図(その3)である。FIG. 7 is a schematic explanatory diagram (part 3) of the anomaly detection method according to the embodiment. 図8は、実施形態に係る異常検知方法の概要説明図(その4)である。FIG. 8 is a schematic explanatory diagram (part 4) of the anomaly detection method according to the embodiment. 図9は、実施形態に係る異常検知方法の概要説明図(その5)である。FIG. 9 is a schematic explanatory diagram (part 5) of the anomaly detection method according to the embodiment. 図10は、実施形態に係る異常検知装置の構成例を示すブロック図である。FIG. 10 is a block diagram illustrating an example of the configuration of an anomaly detection device according to an embodiment. 図11は、検知結果の具体例を示す図(その1)である。FIG. 11 is a diagram (part 1) showing a specific example of the detection result. 図12は、検知結果の具体例を示す図(その2)である。FIG. 12 is a diagram (part 2) showing a specific example of the detection result. 図13は、検知結果の具体例を示す図(その3)である。FIG. 13 is a diagram (part 3) showing a specific example of the detection result. 図14は、検知結果の具体例を示す図(その4)である。FIG. 14 is a diagram (part 4) showing a specific example of the detection result. 図15は、検知結果の具体例を示す図(その5)である。FIG. 15 is a diagram (part 5) showing a specific example of the detection result. 図16は、検知結果の具体例を示す図(その6)である。FIG. 16 is a diagram (part 6) showing a specific example of the detection result. 図17は、実施形態に係る異常検知装置が実行する処理手順を示すフローチャート(その1)である。FIG. 17 is a flowchart (part 1) illustrating a processing procedure executed by the anomaly detection device according to the embodiment. 図18は、実施形態に係る異常検知装置が実行する処理手順を示すフローチャート(その2)である。FIG. 18 is a flowchart (part 2) illustrating the processing procedure executed by the anomaly detection device according to the embodiment. 図19は、異常検知装置の機能を実現するコンピュータの一例を示すハードウェア構成図である。FIG. 19 is a hardware configuration diagram illustrating an example of a computer that realizes the functions of the anomaly detection device.

以下、添付図面を参照して、本願の開示する異常検知方法、異常検知装置および異常検知プログラムの実施形態を詳細に説明する。なお、以下に示す実施形態によりこの発明が限定されるものではない。 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 normal model 124 is generated.

なお、「正常画像」であっても、照度等にばらつきがある場合があるので、図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 normal model 124 that is robust to variations in illuminance, etc.

そして、実施形態に係る異常検知方法では、生成した正常モデル124へ判定対象となる「判定対象画像」を入力し、これにより正常モデル124が出力する出力値に基づいて正常との誤差(以下、「異常度」という)とかかる異常度の確度を算出する(ステップS2)。そして、異常度が大きければ、異常と判定する(ステップS3)。 In the anomaly detection method according to the embodiment, the "image to be judged" is input to the generated normal model 124, and the error from normality (hereinafter referred to as the "degree of abnormality") and the accuracy of the degree of abnormality are calculated based on the output value output by the normal model 124 (step S2). If the degree of abnormality is large, it is judged to be abnormal (step S3).

すなわち、実施形態に係る異常検知方法では、「正常画像」のみに基づく正常モデル124により、正常か異常かを判定することとした。つまり、実施形態に係る異常検知方法では、正常との誤差である異常度に基づき異常を検知するため、多種多様の異常パターンを学習していなくとも、未知の異常を異常として検知することが可能である。これにより、運用初期で学習用データが少ない段階でも、正常モデル124を用いた異常判定が可能となる。 In other words, in the anomaly detection method according to the embodiment, normality or abnormality is determined using a normal model 124 based only on "normal images." In other words, in the anomaly detection method according to the embodiment, anomalies are detected based on the degree of anomaly, which is the error from normality, so it is possible to detect unknown anomalies as anomalies even without learning a wide variety of abnormality patterns. This makes it possible to determine anomalies using the normal model 124 even in the early stages of operation when there is little learning data.

なお、図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 normal model 124, for example when the aforementioned accuracy is low, an abnormal target area, which is a difference part between the judgment target image and the normal image, is extracted. Based on such an abnormal target area, an abnormality classification process can be performed using the anomaly classification model 125 described later. This point will be described in the explanation of the anomaly classification process shown in FIG. 8.

また、抽出された異常判定領域や、異常分類処理の結果、ならびに、これを視認する人の知見等により、過検知の可能性があると判定できる場合がある。かかる場合、実施形態に係る異常検知方法では、異常か過検知かを識別する過検知モデル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 overdetection model 126 that distinguishes between an anomaly and an overdetection. This point will be described later with reference to FIGS. 8 and 9.

ところで、正常モデル124としてオートエンコーダを用いることが広く知られている。正常画像を学習したオートエンコーダにより、入力される判定対象画像を再構築し、判定対象画像と再構築データの差分(前述の異常度に相当)をとることで異常を検知することができる。 Incidentally, it is widely known to use an autoencoder as the normal model 124. An autoencoder that has learned normal images reconstructs the input image to be judged, and anomalies can be detected by calculating the difference between the image to be judged and the reconstructed data (corresponding to the degree of anomaly mentioned above).

図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 normal model 124 is generated using a generative adversarial network (GAN) consisting of a competing generative network and discriminative network, with a skip connection model placed in the generative network.

具体的には、図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 normal learning unit 112 of the anomaly detection device 10 (see FIG. 10) is composed of a generation network 112a and a discrimination network 112b, and generates a normal model 124 by a GAN in which a skip connection model 112aa is arranged in the generation network 112a.

基本的な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 generative network 112a generates a false image based on a normal image.

また、識別ネットワーク112bは、正常画像および偽画像をたとえば交互に入力し、入力される画像の真偽を識別する。識別結果は、生成ネットワーク112aおよび識別ネットワーク112bへフィードバックされ、生成ネットワーク112aは識別ネットワーク112bを欺こうと学習し、識別ネットワーク112bはより正確に識別しようと学習する。 The discrimination network 112b also inputs normal and fake images alternately, for example, and discriminates between the authenticity and falsity of the input images. The discrimination results are fed back to the generative network 112a and the discrimination network 112b, so that the generative network 112a learns to deceive the discrimination network 112b, and the discrimination network 112b learns to discriminate more accurately.

そして、生成ネットワーク112aが生成する偽画像に対し、識別ネットワーク112bの判定確率が半々となるまで学習が繰り返される。そして、学習が完了した段階の識別ネットワーク112bが正常モデル124となる。 Then, learning is repeated until the discrimination network 112b has a 50/50 probability of making a judgment on the false images generated by the generation network 112a. Then, the discrimination network 112b at the stage where learning is completed becomes the normal model 124.

また、図6に示すように、正常学習部112は、Attention機構112abをさらに含む。Attention機構112abは、画像の注視領域を重み付けする機構である。Attention機構112abは、たとえば特徴マップに対し、Attentionマップを乗じることによって注視領域を重み付けする。 As shown in FIG. 6, the normal learning unit 112 further includes an Attention mechanism 112ab. The Attention mechanism 112ab is a mechanism that weights the attention area of an image. The Attention mechanism 112ab weights the attention area, for example, by multiplying the feature map by the Attention map.

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 normal learning unit 112 further includes a noise addition unit 112ac. The noise addition unit 112ac adds noise to the normal image as self-supervised learning, and learns to restore the noise. For example, the normal learning unit 112 causes the noise addition unit 112ac to add noise so as to hide a part of the normal image, and learns to reproduce the hidden part. This suppresses the identity mapping, and improves the generalizability of the model through the effect of data expansion.

正常学習部112が実行するこのような正常学習処理により生成される正常モデル124を用いることにより、図7に示すように、正常画像が入力された場合には正常画像が鮮明に再構築され、異常度はほぼ0となる。一方で、異常画像が入力された場合には恒等写像が抑制されて正常画像が鮮明に再構築され、異常度も明確に導出されることとなる。これにより、精度よく異常検知を行うことが可能となる。 By using the normal model 124 generated by such normal learning processing executed by the normal learning unit 112, as shown in FIG. 7, when a normal image is input, the normal image is clearly reconstructed and the degree of abnormality is approximately 0. On the other hand, when an abnormal image is input, the identity mapping is suppressed, the normal image is clearly reconstructed, and the degree of abnormality is also clearly derived. This makes it possible to perform anomaly detection with high accuracy.

なお、既に述べたが、実施形態に係る異常検知方法では、正常モデル124では判定困難な場合、たとえば前述の確度が低いような場合、判定対象画像中の正常画像との差分部分である異常対象領域を抽出する。かかる異常対象領域に基づいては、異常分類モデル125を用いた異常分類処理を行うことができる。 As already mentioned, in the anomaly detection method according to the embodiment, when it is difficult to make a judgment using the normal model 124, for example when the aforementioned accuracy is low, an abnormal target region, which is the difference between the target image and the normal image, is extracted. Based on such an abnormal target region, an anomaly classification process can be performed using the anomaly classification model 125.

具体的には、図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 anomaly classification model 125 is generated.

すなわち、実施形態に係る異常検知方法では、正常画像をモデル化した正常モデル124だけでなく、過去の異常検知時の異常画像に基づいて異常パターンをモデル化した異常分類モデル125をあわせて用いることによって、検知精度を向上させることとした。 In other words, in the anomaly detection method according to the embodiment, detection accuracy is improved by using not only the normal model 124 that models a normal image, but also the anomaly classification model 125 that models an abnormal pattern based on an abnormal image from a past anomaly detection.

ここで、「異常画像」は、図中に示すように、たとえば「文字違い」や「欠けあり」、「突起あり」といった異常パターンごとでクラスタリングされている。かかる異常画像に基づいて生成される異常分類モデル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 abnormality classification model 125 generated based on such abnormal images can model the abnormality patterns of defective products, so to speak.

そして、実施形態に係る異常検知方法では、かかる異常分類モデル125に対し、たとえば正常モデル124に基づいて異常と判定された「判定対象画像」の異常対象領域RXを入力する。その結果として、異常分類モデル125は、分類結果(たとえば図中の「クラスID」)とかかる分類結果に対する確度を算出する(ステップS12)。 In the anomaly detection method according to the embodiment, the anomaly classification model 125 receives, for example, an abnormal target region RX of the "image to be determined" that has been determined to be abnormal based on the normal model 124. As a result, the anomaly classification model 125 calculates the classification result (for example, the "class ID" in the figure) and the accuracy of the classification result (step S12).

ここで、分類結果に対する確度が大きい場合は、既知の異常パターンである可能性が高いので、実施形態に係る異常検知方法では、異常分類モデル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 anomaly classification model 125 is notified (step S13).

一方で、分類結果に対する確度が小さい場合、未知の異常パターンである可能性がある。そこで、かかる場合は、実施形態に係る異常検知方法では、人の知見等に基づき、新しい異常パターンの分類クラスを追加設定し、該当の異常対象領域を用いた追加学習を行い、異常分類モデル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 anomaly classification model 125. This makes it possible to improve the accuracy of the anomaly classification model 125 as needed even during operation.

さらに、たとえば分類結果に対する確度が小さ過ぎる場合、正常を異常と検知した過検知である可能性がある。そこで、かかる場合は、実施形態に係る異常検知方法では、過検知モデル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 overdetection model 126 is generated. As already mentioned, the overdetection model 126 is an identification model that distinguishes between an anomaly and an overdetection.

そして、かかる過検知モデル126に対し、たとえば異常分類モデル125に基づいて異常と判定されたが確度が小さ過ぎる判定対象画像を入力する。その結果として、過検知モデル126は、異常か過検知かを出力する(ステップS22)。 Then, the overdetection model 126 is input with a judgment target image that has been judged to be abnormal based on the anomaly classification model 125 but with too low a degree of accuracy. As a result, the overdetection model 126 outputs whether the image is abnormal or an overdetection (step S22).

このように、実施形態に係る異常検知方法では、正常学習部112が、生成ネットワーク112aと識別ネットワーク112bとからなり、生成ネットワーク112aにスキップ接続モデル112aaを配置したGANにより、正常モデル124を生成することとした。 In this way, in the anomaly detection method according to the embodiment, the normal learning unit 112 is composed of a generation network 112a and a discrimination network 112b, and a normal model 124 is generated by a GAN in which a skip connection model 112aa is placed in the generation network 112a.

したがって、実施形態に係る異常検知方法によれば、機械学習を利用した異常検知を簡便に且つ精度よく行うことができる。 Therefore, the anomaly detection method according to the embodiment can easily and accurately detect anomalies using machine learning.

以下、上述した異常検知方法を適用した実施形態に係る異常検知装置10の構成について、さらに具体的に説明する。 The configuration of the anomaly detection device 10 according to the embodiment to which the above-mentioned anomaly detection method is applied will be described in more detail below.

図10は、実施形態に係る異常検知装置10の構成例を示すブロック図である。なお、図10では、本実施形態の特徴を説明するために必要な構成要素を機能ブロックで表しており、一般的な構成要素についての記載を省略している。 Figure 10 is a block diagram showing an example of the configuration of an anomaly detection device 10 according to an embodiment. Note that in Figure 10, components necessary for explaining the features of this embodiment are shown as functional blocks, and descriptions of general components are omitted.

換言すれば、図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 anomaly detection device 10 includes a control unit 11 and a memory unit 12. The control unit 11 includes an acquisition unit 111, a normal learning unit 112, an abnormality learning unit 113, an overdetection learning unit 114, an evaluation unit 115, and a judgment unit 116.

記憶部12は、ハードディスクドライブや不揮発性メモリ、レジスタといった記憶デバイスであって、正常学習用データセット121と、異常学習用データセット122と、過検知学習用データセット123と、正常モデル124と、異常分類モデル125と、過検知モデル126と、評価情報127とを記憶する。評価情報127は、異常度情報127aと、分類結果127bと、確度情報127cとを含む。 The storage unit 12 is a storage device such as a hard disk drive, non-volatile memory, or a register, and stores a normal learning dataset 121, an abnormal learning dataset 122, an overdetection learning dataset 123, a normal model 124, an abnormality classification model 125, an overdetection model 126, and evaluation information 127. The evaluation information 127 includes anomaly degree information 127a, a classification result 127b, and accuracy information 127c.

制御部11は、異常検知装置10の全体制御を行う。取得部111は、クラスタリングされた学習用画像を取得する。学習用画像は、正常モデル124を生成するための正常学習用の正常画像と、異常分類モデル125を生成するための異常学習用の異常画像と、過検知モデル126を生成するための過検知学習用の異常画像および過検知画像とを含む。 The control unit 11 performs overall control of the anomaly detection device 10. The acquisition unit 111 acquires clustered learning images. The learning images include normal images for normal learning to generate a normal model 124, abnormal images for abnormal learning to generate an anomaly classification model 125, and abnormal images and overdetection images for overdetection learning to generate an overdetection model 126.

また、取得部111は、異常学習における異常対象領域を取得する。かかる領域はたとえば、異常検知装置10に接続されたキーボードやマウス、タッチパネルといった操作部20から指定することができる。なお、予め異常対象領域の識別に関する情報を記憶部12などに保持しておき、取得部111は、かかる情報から異常対象領域を抽出することとしてもよい。異常対象領域のそれぞれには分類クラスが紐付けられている。 The acquisition unit 111 also acquires anomaly target regions in anomaly learning. Such regions can be specified, for example, from an operation unit 20 such as a keyboard, mouse, or touch panel connected to the anomaly detection device 10. Note that information related to identifying anomaly target regions may be stored in advance in the storage unit 12, etc., and the acquisition unit 111 may extract anomaly target regions from such information. Each anomaly target region is associated with a classification class.

また、取得部111は、取得した学習用画像のうちの正常画像を正常学習用データセット121へ格納する。また、取得部111は、異常画像のうちの異常対象領域を異常学習用データセット122へ格納する。また、取得部111は、取得した学習用画像のうちの異常画像および過検知画像を過検知学習用データセット123へ格納する。 The acquisition unit 111 also stores normal images from the acquired learning images in a normal learning dataset 121. The acquisition unit 111 also stores abnormal target regions from the abnormal images in an abnormal learning dataset 122. The acquisition unit 111 also stores abnormal images and overdetection images from the acquired learning images in an overdetection learning dataset 123.

また、取得部111は、後述する判定部116から追加学習要との判定結果を受け付けた場合に、該当の異常画像の異常対象領域RXを追加学習用として取得して、異常学習用データセット122へ格納する。 When the acquisition unit 111 receives a judgment result indicating that additional learning is required from the judgment unit 116 described below, the acquisition unit 111 acquires the abnormal target region RX of the corresponding abnormal image for additional learning and stores it in the abnormality learning dataset 122.

正常学習部112は、正常学習用データセット121を取得し、これを用いた機械学習により正常モデル124を生成する正常学習処理を実行する。本実施形態に係る正常学習処理については図6を用いて説明済みのため、ここでの説明は省略する。 The normal learning unit 112 acquires the normal learning dataset 121 and executes a normal learning process to generate a normal model 124 by machine learning using the normal learning dataset. The normal learning process according to this embodiment has already been described using FIG. 6, so a description thereof will be omitted here.

異常学習部113は、異常学習用データセット122を取得し、これを用いた機械学習により異常分類モデル125を生成する異常学習処理を実行する。本実施形態に係る異常学習処理については図8を用いて説明済みのため、ここでの説明は省略する。 The anomaly learning unit 113 acquires an anomaly learning dataset 122 and executes an anomaly learning process that uses the dataset to generate an anomaly classification model 125 through machine learning. The anomaly learning process according to this embodiment has already been described using FIG. 8, so a description thereof will be omitted here.

過検知学習部114は、過検知学習用データセット123を取得し、これを用いた機械学習により過検知モデル126を生成する過検知学習処理を実行する。本実施形態に係る過検知学習処理については図9を用いて説明済みのため、ここでの説明は省略する。 The overdetection learning unit 114 acquires an overdetection learning dataset 123 and executes an overdetection learning process to generate an overdetection model 126 by machine learning using the dataset. The overdetection learning process according to this embodiment has already been described using FIG. 9, so a description thereof will be omitted here.

なお、異常学習処理および過検知学習処理のアルゴリズムには、ディープラーニング以外のアルゴリズムを用いてもよい。たとえば、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 anomaly classification model 125 and the overdetection model 126. Here, the pattern classifier is not limited to an SVM, and may be, for example, AdaBoost. Random forests, etc. may also be used.

また、正常学習部112、異常学習部113および過検知学習部114はそれぞれ、各学習処理の実行前や実行時に、操作部20から各種パラメータの入力を受け付け、これを反映した各学習処理を実行することが可能である。 In addition, the normal learning unit 112, the abnormal learning unit 113, and the overdetection learning unit 114 can each receive input of various parameters from the operation unit 20 before or during the execution of each learning process, and execute each learning process that reflects this.

評価部115は、判定対象画像を取得し、これを正常モデル124へ入力して、正常モデル124からの出力結果を受け取る。そして、評価部115は、受け取った出力結果に基づいて判定対象画像の異常度および確度を算出し、異常度情報127aおよび確度情報127cへ格納する。異常度は、たとえば判定対象画像の画素ごとの正常状態からの乖離度の総和である。 The evaluation unit 115 acquires the image to be judged, inputs it to the normal model 124, and receives the output result from the normal model 124. The evaluation unit 115 then calculates the degree of abnormality and accuracy of the image to be judged based on the received output result, and stores them in the abnormality degree information 127a and accuracy information 127c. The degree of abnormality is, for example, the sum of the deviation from the normal state for each pixel of the image to be judged.

また、評価部115は、後述する判定部116から、正常モデル124によれば異常だが所定の第1閾値よりも確度が小さいとの判定結果を受け付けた場合に、かかる判定結果に含まれる異常対象領域RXを異常分類モデル125へ入力して、異常分類モデル125からの出力結果を受け取る。そして、評価部115は、受け取った出力結果を分類結果127bおよび確度情報127cへ格納する。 When the evaluation unit 115 receives a judgment result from the judgment unit 116 (described later) indicating that the object is abnormal according to the normal model 124 but the accuracy is lower than a predetermined first threshold, the evaluation unit 115 inputs the abnormal target region RX included in the judgment result to the abnormality classification model 125 and receives the output result from the abnormality classification model 125. The evaluation unit 115 then stores the received output result in the classification result 127b and accuracy information 127c.

また、評価部115は、判定部116から、正常モデル124または異常分類モデル125によれば異常だが第1閾値よりもさらに小さい所定の第2閾値よりも確度が小さいとの判定結果を受け付けた場合に、判定対象画像を過検知モデル126へ入力して、過検知モデル126からの出力結果を受け取る。そして、評価部115は、受け取った出力結果を判定部116へ通知する。 When the evaluation unit 115 receives a judgment result from the judgment unit 116 indicating that the image is abnormal according to the normal model 124 or the anomaly classification model 125 but has a lower probability of being abnormal than a predetermined second threshold that is even lower than the first threshold, the evaluation unit 115 inputs the image to be judged to the overdetection model 126 and receives the output result from the overdetection model 126. The evaluation unit 115 then notifies the judgment unit 116 of the received output result.

判定部116は、異常度情報127aおよび確度情報127cを参照して、正常モデル124による異常度が所定の判定閾値より大であり、確度が所定の第1閾値より大である場合に、異常検知装置10に接続された表示部30等を介して正常モデル124による異常を通知する。 The judgment unit 116 refers to the abnormality degree information 127a and the accuracy information 127c, and if the degree of abnormality based on the normal model 124 is greater than a predetermined judgment threshold and the accuracy is greater than a predetermined first threshold, notifies the abnormality based on the normal model 124 via a display unit 30 or the like connected to the anomaly detection device 10.

また、判定部116は、正常モデル124による異常度が所定の判定閾値より大であるが、確度が所定の第1閾値より小である場合に、すなわち正常モデル124では判定が難しい場合に、判定対象画像から異常対象領域RXを抽出し、かかる異常対象領域RXを含む、正常モデル124によれば異常だが確度が小さいとの判定結果を取得部111へ通知する。 In addition, when the degree of abnormality according to the normal model 124 is greater than a predetermined judgment threshold but the accuracy is less than a predetermined first threshold, i.e., when judgment is difficult using the normal model 124, the judgment unit 116 extracts an abnormal target area RX from the judgment target image, and notifies the acquisition unit 111 of the judgment result that the image is abnormal according to the normal model 124, but the accuracy is low, including the abnormal target area RX.

また、判定部116は、分類結果127bおよび確度情報127cを参照して、異常分類モデル125による確度が所定の第1閾値より大である場合に、表示部30等を介して異常分類モデル125による異常と分類結果127bを通知する。 The determination unit 116 also refers to the classification result 127b and the accuracy information 127c, and when the accuracy based on the anomaly classification model 125 is greater than a predetermined first threshold, notifies the user of the abnormality based on the anomaly classification model 125 and the classification result 127b via the display unit 30, etc.

また、判定部116は、異常分類モデル125による確度が所定の第1閾値より小であり、さらに第1閾値よりも小さい所定の第2閾値よりも確度が小である場合に、正常モデル124または異常分類モデル125によれば異常だが第2閾値よりも確度が小さいとの判定結果を取得部111へ通知する。 In addition, when the accuracy according to the abnormality classification model 125 is smaller than a predetermined first threshold and is also smaller than a predetermined second threshold that is smaller than the first threshold, the determination unit 116 notifies the acquisition unit 111 of the determination result that the abnormality is determined to be abnormal according to the normal model 124 or the abnormality classification model 125 but the accuracy is smaller than the second threshold.

また、判定部116は、評価部115から過検知モデル126の出力結果を受け付けた場合に、表示部30等を介して、かかる出力結果である異常か過検知かを通知する。 When the determination unit 116 receives the output result of the overdetection model 126 from the evaluation unit 115, it notifies the user via the display unit 30 or the like whether the output result is an abnormality or an overdetection.

また、判定部116は、異常分類モデル125による確度が所定の第1閾値より小であるが、第1閾値よりも小さい所定の第2閾値よりは確度が大である場合に、追加学習要との判定結果を取得部111へ通知するとともに、該当の異常画像の異常対象領域RXを異常分類モデル125の追加学習用として取得部111に取得させる。 In addition, when the accuracy based on the anomaly classification model 125 is smaller than a predetermined first threshold but is greater than a predetermined second threshold that is smaller than the first threshold, the determination unit 116 notifies the acquisition unit 111 of the determination result that additional learning is required, and causes the acquisition unit 111 to acquire the abnormal target region RX of the corresponding abnormal image for additional learning of the anomaly classification model 125.

取得部111は、かかる通知に基づいて、操作部20等を介して新しい異常パターンの分類クラスの追加設定を受け付ける。異常学習部113は、かかる追加学習用の異常対象領域RXおよび追加設定の内容に基づいて異常学習を実行し、異常分類モデル125を更新する。 Based on this notification, the acquisition unit 111 accepts additional settings for the classification class of the new abnormality pattern via the operation unit 20, etc. The abnormality learning unit 113 executes abnormality learning based on the abnormality target area RX for such additional learning and the contents of the additional settings, and updates the abnormality classification model 125.

次に、これまでの説明を分かりやすくするために、実施形態に係る異常検知方法による検知結果の具体例を図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 normal model 124, normal images of "normal products" are used as shown in FIG. 11. That is, the normal learning dataset 121 stores normal images as shown in FIG. 11, and the normal learning unit 112 uses these to generate the normal model 124.

なお、既に述べたように、正常画像にも照度が異なる等、複数の正常パターンを準備することが好ましい。これにより、照度のばらつきに頑健な正常モデル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 normal model 124 that is robust to variations in illuminance.

また、異なるのは照度に限らず、たとえば輝度や彩度、位置、角度等であってもよい。また、図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 evaluation unit 115 inputs the image to the normal model 124, and based on the output value, the area corresponding to the position of the chip can be extracted as the abnormal target area RX, as shown in the "detection result" in the same figure.

また、図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 anomaly detection device 10 according to the embodiment will be described with reference to FIG. 17 and FIG. 18. FIG. 17 and FIG. 18 are flowcharts (part 1) and (part 2) showing the processing procedure executed by the anomaly detection device 10 according to the embodiment.

図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 anomaly detection device 10, or a predetermined period when the normal model 124, the anomaly classification model 125, and the overdetection model 126 are created in advance before operation.

ここで、学習対象期間である場合(ステップS101,Yes)、正常学習部112が正常画像の学習用データセット(すなわち、正常学習用データセット121)から、生成ネットワーク112aにスキップ接続モデル112aaを配置したGANにより正常モデル124を生成する(ステップS102)。 If it is the learning period (step S101, Yes), the normal learning unit 112 generates a normal model 124 from the learning dataset of normal images (i.e., the normal learning dataset 121) using a GAN in which the skip connection model 112aa is placed in the generation network 112a (step S102).

また、異常学習部113が、異常対象領域の学習用データセット(すなわち、異常学習用データセット122)から機械学習により異常分類モデル125を生成する(ステップS103)。 The anomaly learning unit 113 also generates an anomaly classification model 125 by machine learning from the learning dataset for the anomaly target area (i.e., the anomaly learning dataset 122) (step S103).

また、過検知学習部114が、異常画像および過検知画像の学習用データセット(すなわち、過検知学習用データセット123)から機械学習により過検知モデル126を生成する(ステップS104)。 The overdetection learning unit 114 also generates an overdetection model 126 by machine learning from a learning dataset of abnormal images and overdetection images (i.e., the overdetection learning dataset 123) (step S104).

つづいて、または、ステップ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 evaluation unit 115 inputs the image to be judged into the normal model 124 and calculates the degree of abnormality and the accuracy (step S105). Then, the judgment unit 116 judges whether the degree of abnormality is greater than a predetermined judgment threshold (step S106).

ここで、異常度が所定の判定閾値より大である場合(ステップS106,Yes)、判定部116が、確度が所定の第1閾値より大であるか否かを判定する(ステップS107)。異常度が所定の判定閾値より小である場合(ステップS106,No)、処理を終了する。 If the degree of abnormality is greater than the predetermined judgment threshold (step S106, Yes), the judgment unit 116 judges whether the certainty is greater than a predetermined first threshold (step S107). If the degree of abnormality is less than the predetermined judgment threshold (step S106, No), the process ends.

つづいて、確度が所定の第1閾値より大である場合(ステップS107,Yes)、判定部116は正常モデル124による異常を通知し(ステップS108)、処理を終了する。 Next, if the accuracy is greater than a predetermined first threshold (step S107, Yes), the judgment unit 116 notifies the normal model 124 of an abnormality (step S108) and terminates the process.

また、確度が所定の第1閾値より小である場合(ステップS107,No)、判定部116は、判定対象画像から、異常対象領域RXを抽出する(ステップS109)。そして、評価部115が、異常対象領域RXを異常分類モデル125へ入力し、分類結果と確度を算出する(ステップS110)。 If the accuracy is less than the first threshold (step S107, No), the determination unit 116 extracts an abnormal target region RX from the image to be determined (step S109). The evaluation unit 115 then inputs the abnormal target region RX to the abnormality classification model 125 and calculates the classification result and accuracy (step S110).

そして、判定部116が、確度が第1閾値より大であるか否かを判定する(ステップS111)。ここで、確度が第1閾値より大である場合(ステップS111,Yes)、判定部116は、異常分類モデル125による異常と分類結果を通知し(ステップS112)、処理を終了する。 Then, the determination unit 116 determines whether the accuracy is greater than the first threshold value (step S111). If the accuracy is greater than the first threshold value (step S111, Yes), the determination unit 116 notifies the anomaly and classification result according to the anomaly classification model 125 (step S112), and ends the process.

一方、確度が第1閾値より小である場合(ステップS111,No)、つづいて判定部116は、確度が第1閾値よりもさらに小さい所定の第2閾値よりも小であるか否かを判定する(ステップS113)。 On the other hand, if the certainty is smaller than the first threshold (step S111, No), the determination unit 116 then determines whether the certainty is smaller than a predetermined second threshold that is even smaller than the first threshold (step S113).

ここで、確度が第2閾値よりも小である場合(ステップS113,Yes)、評価部115が、判定対象画像を過検知モデル126へ入力し、判定部116が過検知モデル126の出力結果に基づいて再判定を行う(ステップS114)。そして、判定部116は、再判定結果を通知し(ステップS115)、処理を終了する。 Here, if the accuracy is less than the second threshold (step S113, Yes), the evaluation unit 115 inputs the image to be judged to the overdetection model 126, and the judgment unit 116 performs a re-judgment based on the output result of the overdetection model 126 (step S114). Then, the judgment unit 116 notifies the re-judgment result (step S115), and ends the process.

一方、確度が第2閾値よりも大である場合(ステップS113,No)、取得部111が、操作部20等を介した該当の異常対象領域RXの分類クラスの追加設定を受け付ける(ステップS116)。 On the other hand, if the accuracy is greater than the second threshold (step S113, No), the acquisition unit 111 accepts additional setting of the classification class of the corresponding abnormal target area RX via the operation unit 20, etc. (step S116).

そして、異常学習部113が、該当の異常対象領域RXを追加学習分とした機械学習により異常分類モデル125を更新し(ステップS117)、処理を終了する。 Then, the anomaly learning unit 113 updates the anomaly classification model 125 through machine learning using the corresponding anomaly target area RX as additional learning (step S117), and ends the process.

なお、上述してきた実施形態に係る異常検知装置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 anomaly detection device 10 according to the embodiment described above is realized by a computer 60 having a configuration as shown in FIG. 19, for example. FIG. 19 is a hardware configuration diagram showing an example of a computer that realizes the functions of the anomaly detection device 10. The computer 60 includes a CPU (Central Processing Unit) 61, a RAM (Random Access Memory) 62, a ROM (Read Only Memory) 63, a HDD (Hard Disk Drive) 64, a communication interface (I/F) 65, an input/output interface (I/F) 66, and a media interface (I/F) 67.

CPU61は、ROM63またはHDD64に格納されたプログラムに基づいて動作し、各部の制御を行う。ROM63は、コンピュータ60の起動時にCPU61によって実行されるブートプログラムや、コンピュータ60のハードウェアに依存するプログラム等を格納する。 The CPU 61 operates based on a program stored in the ROM 63 or the HDD 64, and controls each part. The ROM 63 stores a boot program executed by the CPU 61 when the computer 60 starts up, programs that depend on the hardware of the computer 60, etc.

HDD64は、CPU61によって実行されるプログラムおよび当該プログラムによって使用されるデータ等を格納する。通信インタフェース65は、通信ネットワークを介して他の機器からデータを受信してCPU61へ送り、CPU61が生成したデータを、通信ネットワークを介して他の機器へ送信する。 The HDD 64 stores the programs executed by the CPU 61 and the data used by the programs. The communication interface 65 receives data from other devices via the communication network and sends it to the CPU 61, and transmits data generated by the CPU 61 to other devices via the communication network.

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/output interface 66. The CPU 61 acquires data from the input devices via the input/output interface 66. The CPU 61 also outputs the data it generates to the output devices via the input/output interface 66.

メディアインタフェース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 recording medium 68 and provides it to the CPU 61 via the RAM 62. The CPU 61 loads the program from the recording medium 68 onto the RAM 62 via the media interface 67 and executes the loaded program. The recording medium 68 is, for example, an optical recording medium such as a DVD (Digital Versatile Disc) or a PD (Phase change rewritable Disc), a magneto-optical recording medium such as an MO (Magneto-Optical disk), a tape medium, a magnetic recording medium, or a semiconductor memory.

たとえば、コンピュータ60が異常検知装置10として機能する場合、コンピュータ60のCPU61は、RAM62上にロードされた異常検知プログラムを実行することにより、制御部11の各機能を実現する。また、HDD64には、記憶部12内のデータが記憶される。コンピュータ60のCPU61は、これらのプログラムを、記録媒体68から読み取って実行するが、他の例として、他の装置から、通信ネットワークを介してこれらのプログラムを取得してもよい。 For example, when the computer 60 functions as the anomaly detection device 10, the CPU 61 of the computer 60 executes an anomaly detection program loaded onto the RAM 62, thereby implementing each function of the control unit 11. In addition, the data in the storage unit 12 is stored in the HDD 64. The CPU 61 of the computer 60 reads and executes these programs from the recording medium 68, but as another example, the CPU 61 may obtain these programs from another device via a communication network.

上述してきたように、実施形態に係る異常検知装置10は、正常学習部112と、評価部115と、判定部116とを備える。正常学習部112は、互いに競合する生成ネットワーク112aと識別ネットワーク112bとからなり、生成ネットワーク112aにスキップ接続モデル112aaを配置した敵対的生成ネットワークにより、正例となる学習用画像を用いた機械学習である正常学習を実行することによって、上記正例となる学習用画像である正常画像をモデル化した正常モデル124を生成する。評価部115は、判定対象画像を正常モデル124へ入力することによって取得される正常モデル124の出力値に基づいて判定対象画像の異常度を算出する。判定部116は、上記異常度に基づいて判定対象画像が異常であるか否かを判定する。 As described above, the anomaly detection device 10 according to the embodiment includes a normal learning unit 112, an evaluation unit 115, and a judgment unit 116. The normal learning unit 112 is composed of a generative network 112a and a discriminative network 112b that compete with each other, and generates a normal model 124 that models a normal image that is a training image that is a positive example by executing normal learning, which is machine learning using a training image that is a positive example, by an adversarial generative network in which a skip connection model 112aa is arranged in the generative network 112a. The evaluation unit 115 calculates the degree of abnormality of the judgment target image based on the output value of the normal model 124 obtained by inputting the judgment target image to the normal model 124. The judgment unit 116 judges whether the judgment target image is abnormal or not based on the degree of abnormality.

したがって、本実施形態に係る異常検知装置10によれば、機械学習を利用した異常検知を簡便に且つ精度よく行うことができる。 Therefore, the anomaly detection device 10 according to this embodiment can easily and accurately detect anomalies using machine learning.

なお、上述した実施形態では、正常モデル124、異常分類モデル125および過検知モデル126の3つを組み合わせる例を挙げて説明したが、必ずしも3つ同時に組み合わせる必要はない。たとえば、基本的に正常モデル124および異常分類モデル125を組み合わせた異常検知を行うこととし、過検知モデル126についてはオプション的に選択可能としてもよい。また、たとえば、基本的に正常モデル124および過検知モデル126を組み合わせることとし、異常分類モデル125についてはオプション的に選択可能としてもよい。 In the above embodiment, an example of combining the normal model 124, the anomaly classification model 125, and the overdetection model 126 has been described, but it is not necessary to combine the three at the same time. For example, anomaly detection may be performed basically by combining the normal model 124 and the anomaly classification model 125, with the overdetection model 126 being selectable as an option. Also, for example, the normal model 124 and the overdetection model 126 may be basically combined, with the anomaly classification model 125 being selectable as an option.

さらなる効果や変形例は、当業者によって容易に導き出すことができる。このため、本発明のより広範な態様は、以上のように表しかつ記述した特定の詳細および代表的な実施形態に限定されるものではない。したがって、添付の特許請求の範囲およびその均等物によって定義される総括的な発明の概念の精神または範囲から逸脱することなく、様々な変更が可能である。 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 LIST 10 Anomaly detection device 11 Control unit 111 Acquisition unit 112 Normal learning unit 113 Anomaly learning unit 114 Overdetection learning unit 115 Evaluation unit 116 Judgment unit 12 Storage unit 121 Normal learning data set 122 Anomaly learning data set 123 Overdetection learning data set 124 Normal model 125 Anomaly classification model 126 Overdetection model 127 Evaluation information 127a Anomaly degree information 127b Classification result 127c Accuracy information

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
互いに競合する生成ネットワークと識別ネットワークとからなり、前記生成ネットワークにスキップ接続モデルを配置した敵対的生成ネットワークにより、正例となる学習用画像を用いた機械学習である正常学習を実行することによって、前記正例となる学習用画像である正常画像をモデル化した正常モデルを生成する正常学習工程と、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 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機構を含み、
前記正常学習工程は、
前記スキップ接続モデルにおいて前記正常画像の少なくとも大域的特徴が結合されるように前記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またはに記載の異常検知方法。
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 :
互いに競合する生成ネットワークと識別ネットワークとからなり、前記生成ネットワークにスキップ接続モデルを配置した敵対的生成ネットワークにより、正例となる学習用画像を用いた機械学習である正常学習を実行することによって、前記正例となる学習用画像である正常画像をモデル化した正常モデルを生成する正常学習部と、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 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 :
互いに競合する生成ネットワークと識別ネットワークとからなり、前記生成ネットワークにスキップ接続モデルを配置した敵対的生成ネットワークにより、正例となる学習用画像を用いた機械学習である正常学習を実行することによって、前記正例となる学習用画像である正常画像をモデル化した正常モデルを生成する正常学習手順と、A normal learning procedure in which a normal model is generated by modeling normal images, which are training images serving as positive examples, by executing normal learning, which is machine learning using a generative adversarial network consisting 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;
判定対象画像を前記正常モデルへ入力することによって取得される前記正常モデルの出力値に基づいて前記判定対象画像の異常度を算出する評価手順と、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:
JP2020141853A 2020-08-25 2020-08-25 Anomaly detection method, anomaly detection device, and anomaly detection program Active JP7519232B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7228967B2 (en) * 2018-07-02 2023-02-27 三菱電機株式会社 joint

Patent Citations (2)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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 computer­aided 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