JP2020030565A - Image determination method, image determination device and image determination program - Google Patents

Image determination method, image determination device and image determination program Download PDF

Info

Publication number
JP2020030565A
JP2020030565A JP2018155150A JP2018155150A JP2020030565A JP 2020030565 A JP2020030565 A JP 2020030565A JP 2018155150 A JP2018155150 A JP 2018155150A JP 2018155150 A JP2018155150 A JP 2018155150A JP 2020030565 A JP2020030565 A JP 2020030565A
Authority
JP
Japan
Prior art keywords
image
learning
determination
abnormal
normal
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.)
Granted
Application number
JP2018155150A
Other languages
Japanese (ja)
Other versions
JP7106391B2 (en
Inventor
馬場 大輔
Daisuke Baba
大輔 馬場
浩平 有吉
Kohei Ariyoshi
浩平 有吉
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 JP2018155150A priority Critical patent/JP7106391B2/en
Publication of JP2020030565A publication Critical patent/JP2020030565A/en
Application granted granted Critical
Publication of JP7106391B2 publication Critical patent/JP7106391B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

To simply perform image determination using machine learning with high accuracy.SOLUTION: An image determination device includes a first learning unit, a second learning unit, an evaluation unit, a first determination unit, and a second determination unit. The first learning unit generates a normal model obtained by modeling a normal image by first learning being machine learning using a learning image to be a positive example. The second learning unit generates an abnormal classification model obtained by modeling a pattern of an abnormal image by second learning being machine learning using a learning image to be a negative example. The evaluation unit evaluates the degree of deviation from a normal state of a determination object image on the basis of an output value of the normal model. The first determination unit determines whether the determination object image is abnormal on the basis of the degree of deviation. The second determination unit determines a pattern of an abnormal image on the basis of the output value of the abnormal classification model obtained by inputting the determination object image to the abnormal classification model in the case where the first determination unit determines that the determination object image is abnormal.SELECTED DRAWING: Figure 2

Description

開示の実施形態は、画像判定方法、画像判定装置および画像判定プログラムに関する。   An embodiment of the present disclosure relates to an image determination method, an image determination device, and an image determination program.

従来、機械学習を利用して、画像解析を行う技術が知られている。たとえば、特許文献1に開示の技術は、分類結果が既知である複数の画像について算出した特徴ベクトルを用いて機械学習を実行し、機械学習で得られた結果に基づいて、分類結果が未知である画像の分類を行うものである。   2. Description of the Related Art Conventionally, a technique for performing image analysis using machine learning is known. For example, the technology disclosed in Patent Literature 1 executes machine learning using a feature vector calculated for a plurality of images whose classification results are known, and the classification result is unknown based on the result obtained by the machine learning. This classifies a certain image.

こうした技術を利用することにより、たとえば製造された製品の画像から、かかる製品が正常品であるか否か、また、正常品でなければ何が異常か、を分類することができる。   By using such a technique, it is possible to classify, for example, from an image of a manufactured product, whether or not the product is a normal product, and what is abnormal if the product is not a normal product.

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

しかしながら、上述した従来技術には、機械学習を利用した画像判定を簡便に且つ精度よく行ううえで、さらなる改善の余地がある。   However, the above-described conventional technology has room for further improvement in performing image determination using machine learning simply and accurately.

具体的には、たとえば上述した製品の異常に傷や色ムラといった無数のパターンが存在する場合、それらのパターンをすべて分類可能な分類モデルを生成するためには、大量の学習用データの収集と長時間の学習が必要であり、煩雑である。   Specifically, for example, when there are countless patterns such as scratches and color unevenness in the above-described product abnormalities, in order to generate a classification model capable of classifying all of the patterns, it is necessary to collect a large amount of learning data. It requires long learning and is complicated.

また、通常の運用において、取得が容易なのは正常時の正常画像であり、異常発生時の異常画像は入手が困難である。したがって、運用の初期段階等においては、十分に分類パターンを学習することが難しく、分類モデルの精度を担保できなかった。   Further, in normal operation, it is easy to acquire a normal image in a normal state, and it is difficult to obtain an abnormal image when an abnormality occurs. Therefore, it is difficult to sufficiently learn the classification pattern in the initial stage of operation or the like, and the accuracy of the classification model cannot be secured.

また、正常画像であっても、いわゆる外れ値に該当するような正常画像がある場合、これを正常分として学習してしまうと、分類モデルに精度劣化が生じるおそれがある。   In addition, even if it is a normal image, if there is a normal image corresponding to a so-called outlier, if this is learned as a normal part, accuracy of the classification model may be degraded.

実施形態の一態様は、上記に鑑みてなされたものであって、機械学習を利用した画像判定を簡便に且つ精度よく行うことができる画像判定方法、画像判定装置および画像判定プログラムを提供することを目的とする。   An aspect of the embodiment is made in view of the above, and provides an image determination method, an image determination device, and an image determination program that can easily and accurately perform image determination using machine learning. With the goal.

実施形態の一態様に係る画像判定方法は、第1学習工程と、第2学習工程と、評価工程と、第1判定工程と、第2判定工程とを含む。前記第1学習工程は、正例となる学習用画像を用いた機械学習である第1学習を実行することによって、正常画像をモデル化した正常モデルを生成する。前記第2学習工程は、負例となる前記学習用画像を用いた機械学習である第2学習を実行することによって、異常画像のパターンをモデル化した異常分類モデルを生成する。前記評価工程は、判定対象画像を前記正常モデルへ入力することによって得られる該正常モデルの出力値に基づいて前記判定対象画像の正常状態からの乖離度を評価する。前記第1判定工程は、前記乖離度に基づいて前記判定対象画像が異常であるか否かを判定する。前記第2判定工程は、前記第1判定工程によって前記判定対象画像が異常であると判定された場合に、前記判定対象画像を前記異常分類モデルへ入力することによって得られる該異常分類モデルの出力値に基づいて前記パターンを判定する。   The image determination method according to one aspect of the embodiment includes a first learning step, a second learning step, an evaluation step, a first determination step, and a second determination step. The first learning step generates a normal model in which a normal image is modeled by executing first learning which is machine learning using a learning image serving as a positive example. The second learning step generates an abnormality classification model in which a pattern of an abnormal image is modeled by executing second learning that is machine learning using the learning image, which is a negative example. The evaluation step evaluates a degree of deviation of the determination target image from a normal state based on an output value of the normal model obtained by inputting the determination target image to the normal model. The first determination step determines whether or not the determination target image is abnormal based on the degree of divergence. The second determination step is an output of the abnormality classification model obtained by inputting the determination target image to the abnormality classification model when the determination target image is determined to be abnormal by the first determination step. The pattern is determined based on the value.

実施形態の一態様によれば、機械学習を利用した画像判定を簡便に且つ精度よく行うことができる。   According to one aspect of the embodiment, image determination using machine learning can be performed easily and accurately.

図1Aは、実施形態に係る画像判定方法の概要説明図(その1)である。FIG. 1A is a schematic explanatory diagram (part 1) of an image determination method according to the embodiment. 図1Bは、実施形態に係る画像判定方法の概要説明図(その2)である。FIG. 1B is a schematic explanatory diagram (part 2) of the image determination method according to the embodiment. 図2は、実施形態に係る画像判定装置のブロック図である。FIG. 2 is a block diagram of the image determination device according to the embodiment. 図3Aは、正常画像の具体例を示す図である。FIG. 3A is a diagram illustrating a specific example of a normal image. 図3Bは、正常モデルによる検知結果の具体例を示す図(その1)である。FIG. 3B is a diagram (part 1) illustrating a specific example of a detection result by the normal model. 図3Cは、正常モデルによる検知結果の具体例を示す図(その2)である。FIG. 3C is a diagram (part 2) illustrating a specific example of the detection result by the normal model. 図3Dは、正常モデルによる検知結果の具体例を示す図(その3)である。FIG. 3D is a diagram (part 3) illustrating a specific example of the detection result using the normal model. 図3Eは、正常モデルによる検知結果の具体例を示す図(その4)である。FIG. 3E is a diagram (part 4) illustrating a specific example of the detection result by the normal model. 図3Fは、正常モデルによる検知結果の具体例を示す図(その5)である。FIG. 3F is a diagram (part 5) illustrating a specific example of the detection result using the normal model. 図3Gは、正常モデルによる検知結果の具体例を示す図(その6)である。FIG. 3G is a diagram (part 6) illustrating a specific example of the detection result using the normal model. 図4Aは、画像判定装置が実行する処理手順を示すフローチャート(その1)である。FIG. 4A is a flowchart (part 1) illustrating a processing procedure executed by the image determination device. 図4Bは、画像判定装置が実行する処理手順を示すフローチャート(その2)である。FIG. 4B is a flowchart (part 2) illustrating a processing procedure executed by the image determination device. 図5は、画像判定装置の機能を実現するコンピュータの一例を示すハードウェア構成図である。FIG. 5 is a hardware configuration diagram illustrating an example of a computer that implements the functions of the image determination device. 図6Aは、その他の実施形態に係る学習用画像の具体例を示す図(その1)である。FIG. 6A is a diagram (part 1) illustrating a specific example of a learning image according to another embodiment. 図6Bは、その他の実施形態に係る学習用画像の具体例を示す図(その2)である。FIG. 6B is a diagram (part 2) illustrating a specific example of a learning image according to another embodiment. 図6Cは、その他の実施形態に係る判定対象画像の具体例を示す図(その1)である。FIG. 6C is a diagram (part 1) illustrating a specific example of a determination target image according to another embodiment. 図6Dは、その他の実施形態に係る判定対象画像の具体例を示す図(その2)である。FIG. 6D is a diagram (part 2) illustrating a specific example of a determination target image according to another embodiment.

以下、添付図面を参照して、本願の開示する画像判定方法、画像判定装置および画像判定プログラムの実施形態を詳細に説明する。なお、以下に示す実施形態によりこの発明が限定されるものではない。   Hereinafter, embodiments of an image determination method, an image determination device, and an image determination program disclosed in the present application will be described in detail with reference to the accompanying drawings. The present invention is not limited by the embodiments described below.

まず、実施形態に係る画像判定方法の概要について、図1Aおよび図1Bを参照して説明する。図1Aおよび図1Bは、実施形態に係る画像判定方法の概要説明図(その1)および(その2)である。   First, an outline of an image determination method according to the embodiment will be described with reference to FIGS. 1A and 1B. 1A and 1B are schematic explanatory diagrams (part 1) and (part 2) of an image determination method according to the embodiment.

なお、以下では、製品として歯車が製造され、かかる歯車の出荷前検査等において不良品を検知する場合を例に挙げて説明を行う。   In the following, a case where a gear is manufactured as a product and a defective product is detected in a pre-shipment inspection or the like of the gear will be described as an example.

図1Aに示すように、実施形態に係る画像判定方法では、まず正常な歯車の画像である「正常画像」のみを学習用データセットとした機械学習を実行し(ステップS1)、正常モデル12cを生成する。   As shown in FIG. 1A, in the image determination method according to the embodiment, first, machine learning is performed using only a “normal image” which is a normal gear image as a learning data set (step S1), and the normal model 12c is converted to a normal model. Generate.

なお、「正常画像」であっても、照度等にばらつきがある場合があるので、図1Aに示すように、「正常画像」にも複数の正常パターンを準備することが好ましい。これにより、照度等のばらつきに頑健な正常モデル12cを生成することが可能となる。   Note that, even in the case of the “normal image”, there are cases where the illuminance and the like vary, so that it is preferable to prepare a plurality of normal patterns in the “normal image” as shown in FIG. 1A. This makes it possible to generate a normal model 12c that is robust against variations in illuminance and the like.

そして、実施形態に係る画像判定方法では、生成した正常モデル12cへ判定対象となる「判定対象画像」を入力し、これにより正常モデル12cが出力する出力値に基づいて正常との誤差(以下、「正常状態からの乖離度」または単に「乖離度」と言う)を画素ごとに算出する(ステップS2)。そして、かかる乖離度の総和が大きければ、異常と判定する(ステップS3)。   In the image determination method according to the embodiment, a “determination target image” to be determined is input to the generated normal model 12c, and an error from normal (hereinafter, referred to as “normal”) based on an output value output by the normal model 12c. “Degree of deviation from normal state” or simply “degree of deviation” is calculated for each pixel (step S2). Then, if the sum of the deviations is large, it is determined that there is an abnormality (step S3).

すなわち、実施形態に係る画像判定方法では、「正常画像」のみに基づく正常モデル12cにより、まず正常か異常かを判定することとした。つまり、実施形態に係る画像判定方法では、正常状態からの乖離度に基づき異常を検知するため、多種多量の異常パターンを学習していなくとも、未知の異常を異常として検知することが可能である。これにより、運用初期で学習用データが少ない段階でも、正常モデル12cを用いた異常判定が可能となる。   That is, in the image determination method according to the embodiment, the normal model 12c based on only the “normal image” first determines whether the image is normal or abnormal. That is, in the image determination method according to the embodiment, since an abnormality is detected based on the degree of deviation from a normal state, it is possible to detect an unknown abnormality as an abnormality without learning a large number of abnormal patterns. . Thereby, even in a stage where the amount of learning data is small in the initial stage of operation, it is possible to determine an abnormality using the normal model 12c.

なお、図3B等を用いた説明で後述するが、実施形態に係る画像判定方法では、ステップS2で算出した画素ごとの乖離度が割り当てられたマッピング画像を生成し、かかるマッピング画像から異常とされる異常対象領域を抽出する。かかる異常対象領域に基づいては、後述する異常分類モデル12dを用いた異常分類処理を行うことができる。かかる点については、図1Bに示す異常分類処理で述べる。   As will be described later with reference to FIG. 3B and the like, in the image determination method according to the embodiment, a mapping image to which the degree of deviation for each pixel calculated in step S2 is assigned is generated, and the mapping image is determined to be abnormal. The abnormal target area is extracted. Based on such an abnormality target area, an abnormality classification process using an abnormality classification model 12d described later can be performed. This point will be described in the abnormality classification process shown in FIG. 1B.

また、図1AのステップS3で異常と判定された場合であっても、抽出された異常判定領域や、これを視認する人の知見等により、誤検知と判定できる場合がある。かかる場合は、実施形態に係る画像判定方法では、該当の判定対象画像を用いた追加学習を行い(ステップS4)、正常モデル12cを更新する。これにより、運用中においても適宜、正常モデル12cの精度を向上させることができる。   In addition, even if it is determined that there is an abnormality in step S3 of FIG. 1A, there may be a case where an erroneous detection can be determined based on the extracted abnormality determination region or the knowledge of a person who visually recognizes the region. In such a case, the image determination method according to the embodiment performs additional learning using the corresponding determination target image (step S4), and updates the normal model 12c. Accordingly, the accuracy of the normal model 12c can be appropriately improved even during operation.

ところで、上記した正常モデル12cによっては、異常を検知することはできても、その異常のパターンまで分類することはできない。そこで、実施形態に係る画像判定方法では、図1Bに示すように、過去に検知した不良品の画像(以下、「異常画像」と言う)の異常対象領域R1,R2,R3…を学習用データセットとした機械学習を実行し(ステップS5)、異常分類モデル12dを生成する。   By the way, depending on the normal model 12c described above, even if an abnormality can be detected, the pattern of the abnormality cannot be classified. Therefore, in the image determination method according to the embodiment, as shown in FIG. 1B, the abnormal target regions R1, R2, R3... Of the image of the defective product detected in the past (hereinafter referred to as “abnormal image”) are used as the learning data. The set machine learning is executed (step S5), and the abnormality classification model 12d is generated.

すなわち、実施形態に係る画像判定方法では、正常画像をモデル化した正常モデル12cだけでなく、過去の異常検知時の異常画像に基づいて異常パターンをモデル化した異常分類モデル12dをあわせて用いることによって、異常パターンの分類まで行うこととした。   That is, in the image determination method according to the embodiment, not only the normal model 12c that models the normal image but also the abnormality classification model 12d that models the abnormal pattern based on the abnormal image at the time of the past abnormality detection is used. Therefore, the classification of abnormal patterns was performed.

ここで、「異常画像」は、図中に示すように、たとえば「文字違い」や「欠け有り」といった異常パターンごとでクラスタリングされている。かかる異常画像に基づいて生成される異常分類モデル12dにより、言わば不良品の異常パターンをモデル化することができる。   Here, as shown in the figure, the “abnormal images” are clustered for each abnormal pattern such as “wrong character” or “missing”. An abnormal pattern of a defective product can be modeled by the abnormal classification model 12d generated based on the abnormal image.

そして、実施形態に係る画像判定方法では、かかる異常分類モデル12dに対し、たとえば正常モデル12cに基づいて異常と判定された「判定対象画像」の異常対象領域RXを入力する。その結果として、異常分類モデル12dは、分類結果(たとえば図中の「クラスID」)とかかる分類結果に対する類似度を出力する(ステップS6)。   In the image determination method according to the embodiment, the abnormal target region RX of the “determination target image” determined to be abnormal based on, for example, the normal model 12c is input to the abnormal classification model 12d. As a result, the abnormal classification model 12d outputs a classification result (for example, “class ID” in the figure) and a degree of similarity to the classification result (Step S6).

なお、ここで、分類結果に対する類似度が小さい場合、未知の異常パターンである可能性がある。そこで、かかる場合は、実施形態に係る画像判定方法では、人の知見等に基づき、新しい異常パターンの分類クラスを追加設定し、該当の異常対象領域を用いた追加学習を行い(ステップS7)、異常分類モデル12dを更新する。これにより、運用中においても適宜、異常分類モデル12dの精度を向上させることができる。   Here, when the degree of similarity to the classification result is small, there is a possibility that the pattern is an unknown abnormal pattern. Therefore, in such a case, the image determination method according to the embodiment additionally sets a new abnormal pattern classification class based on human knowledge and the like, and performs additional learning using the corresponding abnormal target area (step S7). The abnormality classification model 12d is updated. Thereby, the accuracy of the abnormality classification model 12d can be appropriately improved even during operation.

一方、分類結果に対する類似度が大きい場合は、既知の異常パターンである可能性が高いので、実施形態に係る画像判定方法では、異常分類モデル12dから得た分類結果を通知することとなる(ステップS8)。   On the other hand, when the degree of similarity to the classification result is large, there is a high possibility that the pattern is a known abnormal pattern. Therefore, the image determination method according to the embodiment notifies the classification result obtained from the abnormal classification model 12d (step S8).

なお、異常分類モデル12dには、図中のクラスID「004」に示すように、外れ値を示す正常分を含むことができる。かかる外れ値の正常分を異常パターンとして含んでおき、異常分類モデル12dにより分類結果としてかかるクラスID「004」が得られたならば、これを異常でなく正常と通知することによって、仮に外れ値の正常分で正常モデル12cを追加学習した場合に起こりうる正常モデル12cの精度劣化を防止することができる。   It should be noted that the abnormal classification model 12d can include a normal part indicating an outlier as shown by the class ID “004” in the figure. The normal part of the outlier is included as an abnormal pattern, and if the class ID “004” is obtained as a classification result by the abnormal classification model 12d, this is notified as normal rather than abnormal, thereby temporarily setting the outlier. The accuracy degradation of the normal model 12c which can occur when the normal model 12c is additionally learned with the normal component can be prevented.

以下、上述した画像判定方法を適用した画像判定装置10の構成について、さらに具体的に説明する。   Hereinafter, the configuration of the image determination device 10 to which the above-described image determination method is applied will be described more specifically.

図2は、本実施形態に係る画像判定装置10のブロック図である。なお、図2では、本実施形態の特徴を説明するために必要な構成要素を機能ブロックで表しており、一般的な構成要素についての記載を省略している。   FIG. 2 is a block diagram of the image determination device 10 according to the present embodiment. In FIG. 2, components necessary for explaining the features of the present embodiment are represented by functional blocks, and descriptions of general components are omitted.

換言すれば、図2に図示される各構成要素は機能概念的なものであり、必ずしも物理的に図示の如く構成されていることを要しない。たとえば、各機能ブロックの分散・統合の具体的形態は図示のものに限られず、その全部または一部を、各種の負荷や使用状況等に応じて、任意の単位で機能的または物理的に分散・統合して構成することが可能である。   In other words, each component illustrated in FIG. 2 is a functional concept and does not necessarily need to be physically configured as illustrated. For example, the specific form of distribution / integration of each functional block is not limited to the illustrated one, and all or a part of the functional blocks may be functionally or physically distributed in arbitrary units according to various loads and usage conditions. -It is possible to integrate and configure.

なお、図2を用いた説明では、これまでに既に述べた構成要素については、説明を簡略化するか、省略する場合がある。   In the description using FIG. 2, the description of the components already described above may be simplified or omitted.

図2に示すように、画像判定装置10は、制御部11と、記憶部12とを備える。制御部11は、取得部11aと、第1学習部11bと、第2学習部11cと、評価部11dと、第1判定部11eと、第2判定部11fとを備える。   As shown in FIG. 2, the image determination device 10 includes a control unit 11 and a storage unit 12. The control unit 11 includes an acquisition unit 11a, a first learning unit 11b, a second learning unit 11c, an evaluation unit 11d, a first determination unit 11e, and a second determination unit 11f.

記憶部12は、ハードディスクドライブや不揮発性メモリ、レジスタといった記憶デバイスであって、第1学習用データセット12aと、第2学習用データセット12bと、正常モデル12cと、異常分類モデル12dと、評価情報12eとを記憶する。評価情報12eは、乖離度情報12eaと、マッピング画像12ebと、分類結果12ecと、類似度12edとを含む。   The storage unit 12 is a storage device such as a hard disk drive, a non-volatile memory, or a register, and includes a first learning data set 12a, a second learning data set 12b, a normal model 12c, an abnormal classification model 12d, The information 12e is stored. The evaluation information 12e includes divergence information 12ea, a mapping image 12eb, a classification result 12ec, and a similarity 12ed.

制御部11は、画像判定装置10の全体制御を行う。取得部11aは、クラスタリングされた学習用画像を取得する。学習用画像は、正常モデル12cを生成するための第1学習用の正常画像と、異常分類モデル12dを生成するための第2学習用の異常画像とを含む。   The control unit 11 performs overall control of the image determination device 10. The acquisition unit 11a acquires a learning image that has been clustered. The learning image includes a first learning normal image for generating the normal model 12c and a second learning abnormal image for generating the abnormal classification model 12d.

また、取得部11aは、第2学習における異常対象領域を取得する。かかる領域はたとえば、画像判定装置10に接続されたキーボードやマウス、タッチパネルといった操作部20から指定することができる。なお、予め異常対象領域の識別に関する情報を記憶部12などに保持しておき、取得部11aは、かかる情報から異常対象領域を抽出することとしてもよい。異常対象領域のそれぞれには分類クラスが紐付けられている。   Further, the acquiring unit 11a acquires an abnormal target area in the second learning. Such an area can be designated from the operation unit 20 such as a keyboard, a mouse, and a touch panel connected to the image determination device 10, for example. Note that information regarding the identification of the abnormal target area may be stored in the storage unit 12 or the like in advance, and the acquiring unit 11a may extract the abnormal target area from the information. A classification class is associated with each of the abnormal target areas.

また、取得部11aは、取得した学習用画像のうちの正常画像を第1学習用データセット12aへ格納する。また、取得部11aは、異常画像のうちの異常対象領域を第2学習用データセット12bへ格納する。   The acquisition unit 11a stores a normal image among the acquired learning images in the first learning data set 12a. The acquisition unit 11a stores the abnormal target area in the abnormal image in the second learning data set 12b.

また、取得部11aは、後述する第1判定部11eから誤検知との判定結果を受け付けた場合に、該当の正常画像を追加学習用として取得して、第1学習用データセット12aへ格納する。   Further, when receiving a determination result of erroneous detection from a first determination unit 11e described later, the obtaining unit 11a obtains the corresponding normal image for additional learning and stores it in the first learning data set 12a. .

また、取得部11aは、後述する第2判定部11fから追加学習要との判定結果を受け付けた場合に、該当の異常画像の異常対象領域RXを追加学習用として取得して、第2学習用データセット12bへ格納する。   In addition, when the determination unit 11a receives a determination result indicating that additional learning is necessary from the second determination unit 11f described later, the obtaining unit 11a obtains the abnormal target region RX of the corresponding abnormal image for additional learning, and obtains the second learning target region RX. The data is stored in the data set 12b.

第1学習部11bは、第1学習用データセット12aを取得し、これを用いた機械学習を実行して、正常モデル12cを生成する。第2学習部11cは、第2学習用データセット12bを取得し、これを用いた機械学習を実行して、異常分類モデル12dを生成する。   The first learning unit 11b acquires the first learning data set 12a, executes machine learning using the data set 12a, and generates a normal model 12c. The second learning unit 11c acquires the second learning data set 12b, performs machine learning using the data set 12b, and generates the abnormality classification model 12d.

なお、機械学習のアルゴリズムとしては、VAE(Variational Auto Encoder)やGAN(Generative Adversarial Network)等を用いることができる。これらのアルゴリズムについては公知であるので、ここでの詳しい説明は省略する。   Note that VAE (Variational Auto Encoder), GAN (Generative Adversarial Network), or the like can be used as an algorithm for machine learning. Since these algorithms are publicly known, detailed description thereof is omitted here.

評価部11dは、判定対象画像を取得し、これを正常モデル12cへ入力して、正常モデル12cからの出力結果を受け取る。そして、評価部11dは、受け取った出力結果に基づいて判定対象画像の画素ごとの乖離度を算出し、乖離度情報12eaへ格納する。また、評価部11dは、算出した乖離度をそれぞれ各画素に割り当てたマッピング画像12ebを生成する。   The evaluation unit 11d acquires the image to be determined, inputs the acquired image to the normal model 12c, and receives an output result from the normal model 12c. Then, the evaluation unit 11d calculates the divergence for each pixel of the determination target image based on the received output result, and stores the calculated divergence in the divergence information 12ea. Further, the evaluation unit 11d generates a mapping image 12eb in which the calculated divergence is assigned to each pixel.

また、評価部11dは、後述する第1判定部11eから判定対象画像が異常との判定結果を受け付けた場合に、かかる判定結果に含まれる異常対象領域RXを異常分類モデル12dへ入力して、異常分類モデル12dからの出力結果を受け取る。そして、評価部11dは、受け取った出力結果を分類結果12ecおよび類似度12edへ格納する。   In addition, when the evaluation unit 11d receives a determination result that the determination target image is abnormal from the first determination unit 11e described below, the evaluation unit 11d inputs the abnormality target region RX included in the determination result to the abnormality classification model 12d, An output result from the abnormality classification model 12d is received. Then, the evaluation unit 11d stores the received output result in the classification result 12ec and the similarity 12ed.

第1判定部11eは、乖離度情報12eaを参照して、乖離度の総和が所定の判定閾値より大である場合に、画像判定装置10に接続された表示部30等を介して異常を通知する。   The first determination unit 11e refers to the divergence degree information 12ea and notifies an abnormality via the display unit 30 or the like connected to the image determination apparatus 10 when the sum of the divergence degrees is larger than a predetermined determination threshold. I do.

また、第1判定部11eは、かかる乖離度の総和が所定の判定閾値より大である場合に、該当の判定対象画像を評価部11dから取得して追加学習の対象となる画像であるか否か、すなわち、誤検知であるか否かを判定する。   When the sum of the deviations is greater than a predetermined determination threshold, the first determination unit 11e acquires the corresponding determination target image from the evaluation unit 11d and determines whether the image is a target of additional learning. That is, it is determined whether the detection is erroneous.

かかる判定は、たとえば誤検知を識別する閾値を別途設けたうえで、乖離度の総和や乖離度のばらつきといった乖離度に関する統計量等がかかる閾値以上であるか否かにより行うことができる。また、第1判定部11eは、該当の判定対象画像またはマッピング画像12ebを表示部30へ表示させ、人の知見等により誤検知であるか否かを判定させて、その判定結果を受け付けるようにしてもよい。   This determination can be made based on, for example, separately providing a threshold for identifying erroneous detection, and then determining whether or not a statistic related to the divergence, such as the sum of the divergence or the variation in the divergence, is equal to or larger than the threshold. In addition, the first determination unit 11e causes the display unit 30 to display the corresponding determination target image or the mapping image 12eb, determines whether or not a false detection has been made based on human knowledge, and accepts the determination result. You may.

また、第1判定部11eは、誤検知であると判定された場合に、かかる判定結果を取得部11aへ通知するとともに、該当の判定対象画像を正常モデル12cの追加学習用として取得部11aに取得させる。第1学習部11bは、かかる追加学習用の画像に基づいて第1学習を実行し、正常モデル12cを更新する。   In addition, when it is determined that the detection is erroneous, the first determination unit 11e notifies the acquisition unit 11a of the determination result, and sends the corresponding determination target image to the acquisition unit 11a for additional learning of the normal model 12c. Get it. The first learning unit 11b executes the first learning based on the image for the additional learning, and updates the normal model 12c.

また、第1判定部11eは、誤検知でないと判定された場合に、マッピング画像12ebから異常対象領域RXを抽出し、かかる異常対象領域RXを含む異常との判定結果を取得部11aへ通知する。   In addition, when it is determined that there is no false detection, the first determination unit 11e extracts the abnormality target region RX from the mapping image 12eb, and notifies the acquisition unit 11a of the determination result of the abnormality including the abnormality target region RX. .

第2判定部11fは、分類結果12ecおよび類似度12edを参照して、類似度12edが所定の判定閾値より大である場合に、表示部30等を介して分類結果12ecを通知する。   The second determination unit 11f refers to the classification result 12ec and the similarity 12ed, and notifies the classification result 12ec via the display unit 30 and the like when the similarity 12ed is larger than a predetermined determination threshold.

また、第2判定部11fは、類似度12edが所定の判定閾値以下である場合に、追加学習要との判定結果を取得部11aへ通知するとともに、該当の異常画像の異常対象領域RXを異常分類モデル12dの追加学習用として取得部11aに取得させる。   Further, when the similarity 12ed is equal to or smaller than the predetermined determination threshold, the second determination unit 11f notifies the acquisition unit 11a of the determination result indicating that additional learning is necessary, and sets the abnormality target area RX of the corresponding abnormal image to abnormal. The acquisition unit 11a acquires the classification model 12d for additional learning.

取得部11aは、かかる通知に基づいて、操作部20等を介して新しい異常パターンの分類クラスの追加設定を受け付ける。第2学習部11cは、かかる追加学習用の異常対象領域RXおよび追加設定の内容に基づいて第2学習を実行し、異常分類モデル12dを更新する。   The acquiring unit 11a receives additional setting of a new abnormal pattern classification class via the operation unit 20 or the like based on the notification. The second learning unit 11c executes the second learning based on the abnormality target region RX for the additional learning and the content of the additional setting, and updates the abnormality classification model 12d.

次に、これまでの説明を分かりやすくするために、正常画像、および、正常モデル12cによる検知結果の具体例を図3A〜図3Gに示す。図3Aは、正常画像の具体例を示す図である。また、図3B〜図3Gは、正常モデル12cによる検知結果の具体例を示す図(その1)〜(その6)である。   Next, in order to make the description so far easy to understand, FIGS. 3A to 3G show specific examples of a normal image and a detection result by the normal model 12c. FIG. 3A is a diagram illustrating a specific example of a normal image. FIGS. 3B to 3G are diagrams (part 1) to (part 6) showing specific examples of the detection results obtained by the normal model 12c.

上記したように、正常モデル12cの生成には、図3Aに示すように、「正常品」の正常画像が用いられる。すなわち、第1学習用データセット12aには、図3Aに示すような正常画像が格納され、第1学習部11bがこれを用いて正常モデル12cを生成する。なお、既に述べたように、正常画像にも照度が異なる等、複数の正常パターンを準備することが好ましい。これにより、照度のばらつきに頑健な正常モデル12cを生成することが可能となる。また、異なるのは照度に限らず、たとえば輝度や彩度、角度等であってもよい。   As described above, a normal image of a “normal product” is used to generate the normal model 12c, as shown in FIG. 3A. That is, a normal image as shown in FIG. 3A is stored in the first learning data set 12a, and the first learning unit 11b generates a normal model 12c using the normal image. Note that, as described above, it is preferable to prepare a plurality of normal patterns, such as a case where the illuminance differs even for a normal image. This makes it possible to generate a normal model 12c that is robust to variations in illuminance. What is different is not limited to the illuminance, but may be, for example, luminance, saturation, angle, or the like.

そして、このような正常画像から生成された正常モデル12cに対しては、評価部11dが判定対象画像を入力することとなる。そして、その結果得られる正常モデル12cの出力値に基づいて、評価部11dは画素ごとの乖離度を算出するとともに、マッピング画像12ebを生成する。   Then, for the normal model 12c generated from such a normal image, the evaluation unit 11d inputs the determination target image. Then, based on the output value of the normal model 12c obtained as a result, the evaluation unit 11d calculates the degree of divergence for each pixel and generates the mapping image 12eb.

ここで、図3Bに示す「不良品#1」があったものとする。図中のM1部に示すように、「不良品#1」は、刻印されるべき文字が違う「文字違い」の不良品である。かかる「不良品#1」の画像が判定対象画像として入力された場合、評価部11dはかかる画像を正常モデル12cへ入力し、その出力値に基づいて同図の「検知結果」に示すようなマッピング画像12ebを生成する。   Here, it is assumed that there is “defective product # 1” shown in FIG. 3B. As shown in the M1 part in the figure, "defective product # 1" is a defective product having a "character difference" in which characters to be engraved are different. When the image of “defective product # 1” is input as the image to be determined, the evaluation unit 11d inputs the image to the normal model 12c, and based on the output value, as shown in “Detection result” in FIG. Generate the mapping image 12eb.

すなわち、図3Bの例の例においては、文字の刻印位置に相当する領域が明らかに他の領域とは異なるマッピング画像12ebが生成される。第1判定部11eは、乖離度の総和が所定の判定閾値より大であるならば(すなわち異常ならば)、かかる他とは異なる領域を異常対象領域RXとして抽出することとなる。   That is, in the example of the example of FIG. 3B, a mapping image 12eb in which an area corresponding to the position of engraving a character is clearly different from other areas is generated. If the sum of the divergence degrees is larger than a predetermined determination threshold value (that is, if it is abnormal), the first determination unit 11e extracts a region different from the others as the abnormality target region RX.

また、図3Cに示すのは、歯車の一部が欠けている(図中のM2部参照)「欠け有り」の「不良品#2」である。かかる「不良品#2」の画像が判定対象画像として入力された場合は、同図の「検知結果」に示すように、欠けの位置に相当する領域が明らかに他の領域とは異なるマッピング画像12ebが生成され、異常ならば、かかる他とは異なる領域が異常対象領域RXとして抽出されることとなる。   Further, FIG. 3C shows “defective product # 2” of “with chipping” in which a part of the gear is missing (see M2 portion in the drawing). When the image of “defective product # 2” is input as the image to be determined, as shown in the “detection result” in the figure, the mapping image where the area corresponding to the missing position is clearly different from the other areas 12eb is generated and if abnormal, a region different from the others is extracted as the abnormal target region RX.

また、図3Dに示すのは、内径の一部に突起が形成された(図中のM3部参照)「突起有り」の「不良品#3」である。かかる「不良品#3」の画像が判定対象画像として入力された場合は、同図の「検知結果」に示すように、突起の位置に相当する領域が明らかに他の領域とは異なるマッピング画像12ebが生成され、異常ならば、かかる他とは異なる領域が異常対象領域RXとして抽出されることとなる。   FIG. 3D shows “defective product # 3” having “projection” in which a projection is formed on a part of the inner diameter (see the M3 part in the figure). When the image of “defective product # 3” is input as the image to be determined, as shown in the “detection result” in the drawing, the area corresponding to the position of the projection is clearly different from the other areas. 12eb is generated and if abnormal, a region different from the others is extracted as the abnormal target region RX.

また、図3Eに示すのは、内径が正規の寸法でない(図中のM4部参照)「内径違い」の「不良品#4」である。かかる「不良品#4」の画像が判定対象画像として入力された場合は、同図の「検知結果」に示すように、歯車の内径部に相当する領域が明らかに他の領域とは異なるマッピング画像12ebが生成され、異常ならば、かかる他とは異なる領域が異常対象領域RXとして抽出されることとなる。   Further, FIG. 3E shows “defective product # 4” of “difference in inner diameter” whose inner diameter is not a regular size (see M4 part in the figure). When such an image of “defective product # 4” is input as the image to be determined, as shown in the “detection result” of the figure, the area corresponding to the inner diameter portion of the gear is clearly different from the other areas. If the image 12eb is generated and abnormal, an area different from the others is extracted as the abnormal target area RX.

また、図3Fに示すのは、内径の周縁部が正規の寸法でない(図中のM5部参照)「周縁部違い」の「不良品#5」である。かかる「不良品#5」の画像が判定対象画像として入力された場合は、同図の「検知結果」に示すように、歯車の内径部の周縁部に相当する領域が明らかに他の領域とは異なるマッピング画像12ebが生成され、異常ならば、かかる他とは異なる領域が異常対象領域RXとして抽出されることとなる。   Also, FIG. 3F shows “defective product # 5” of “peripheral part difference” in which the peripheral part of the inner diameter is not a regular dimension (see M5 part in the figure). When the image of “defective product # 5” is input as the image to be determined, as shown in the “detection result” of FIG. Is generated, and if abnormal, an area different from the others is extracted as the abnormal target area RX.

また、図3Gに示すのは、汚損のある(図中のM6部参照)「汚損有り」の「不良品#6」である。かかる「不良品#6」の画像が判定対象画像として入力された場合は、同図の「検知結果」に示すように、汚損部分に相当する領域が明らかに他の領域とは異なるマッピング画像12ebが生成され、異常ならば、かかる他とは異なる領域が異常対象領域RXとして抽出されることとなる。   Also, FIG. 3G shows “defective product # 6” of “stained” (stained (see M6 in the figure)). When such an image of “defective product # 6” is input as the image to be determined, as shown in “Detection result” of FIG. 12, the mapping image 12eb where the area corresponding to the stained part is clearly different from the other areas Is generated, and if it is abnormal, a region different from the others is extracted as the abnormal target region RX.

そして、抽出された各異常対象領域RXは、第2学習用データセット12bへ格納され、第2学習部11cがこれを用いて異常分類モデル12dを生成または更新することとなる。   Then, each extracted abnormal target region RX is stored in the second learning data set 12b, and the second learning unit 11c generates or updates the abnormal classification model 12d using this.

次に、実施形態に係る画像判定装置10が実行する処理手順について、図4Aおよび図4Bを用いて説明する。図4Aおよび図4Bは、実施形態に係る画像判定装置10が実行する処理手順を示すフローチャート(その1)および(その2)である。   Next, a processing procedure executed by the image determination device 10 according to the embodiment will be described with reference to FIGS. 4A and 4B. FIGS. 4A and 4B are flowcharts (part 1) and (part 2) illustrating a processing procedure executed by the image determination device 10 according to the embodiment.

図4Aに示すように、まず学習対象期間であるか否かが判定される(ステップS101)。学習対象期間は、たとえば画像判定装置10の運用初回や、運用前に予め正常モデル12cおよび異常分類モデル12dを作成しておく場合の所定期間に相当する。   As shown in FIG. 4A, first, it is determined whether or not it is a learning target period (step S101). The learning target period corresponds to, for example, the first operation of the image determination apparatus 10 or a predetermined period in which the normal model 12c and the abnormal classification model 12d are created before operation.

ここで、学習対象期間である場合(ステップS101,Yes)、第1学習部11bが正常画像の学習用データセット(すなわち、第1学習用データセット12a)から機械学習により正常モデル12cを生成する(ステップS102)。   Here, if it is the learning target period (step S101, Yes), the first learning unit 11b generates the normal model 12c by machine learning from the learning data set of the normal image (that is, the first learning data set 12a). (Step S102).

そして、取得部11aが、過去に検知した異常画像中の異常対象領域と分類クラスの設定を受け付ける(ステップS103)。そして、第2学習部11cが、異常対象領域の学習用データセット(すなわち、第2学習用データセット12b)から機械学習により異常分類モデル12dを生成する(ステップS104)。   Then, the acquiring unit 11a receives the setting of the abnormal target area and the classification class in the abnormal image detected in the past (Step S103). Then, the second learning unit 11c generates the abnormality classification model 12d by machine learning from the learning data set of the abnormal target area (that is, the second learning data set 12b) (Step S104).

なお、学習対象期間でない場合(ステップS101,No)、ステップS105(図4B参照)へ移行する。   If the period is not the learning target period (No at Step S101), the process proceeds to Step S105 (see FIG. 4B).

つづいて、図4Bに示すように、評価部11dが、判定対象画像を正常モデル12cへ入力し、画素ごとの正常状態からの乖離度を算出する(ステップS105)。そして、第1判定部11eが、乖離度の総和が所定の判定閾値より大であるか否かを判定する(ステップS106)。   Subsequently, as illustrated in FIG. 4B, the evaluation unit 11d inputs the determination target image to the normal model 12c, and calculates the degree of deviation of each pixel from the normal state (Step S105). Then, the first determination unit 11e determines whether the sum of the degrees of deviation is larger than a predetermined determination threshold (Step S106).

ここで、乖離度の総和が所定の判定閾値より大である場合(ステップS106,Yes)、第1判定部11eは異常を通知し(ステップS107)、つづいて誤検知であるか否かを判定する(ステップS108)。なお、乖離度の総和が所定の判定閾値以下である場合(ステップS106,No)、処理を終了する。   Here, if the sum of the divergence degrees is larger than the predetermined determination threshold value (step S106, Yes), the first determination unit 11e notifies an abnormality (step S107), and subsequently determines whether or not an erroneous detection is made. (Step S108). If the sum of the divergence degrees is equal to or smaller than the predetermined determination threshold value (No in step S106), the process ends.

ステップS108で誤検知でないと判定された場合(ステップS108,No)、第1判定部11eが、解離度が各画素に割り当てられたマッピング画像12ebから、異常対象領域RXを抽出する(ステップS109)。   When it is determined in Step S108 that the detection is not erroneous (Step S108, No), the first determination unit 11e extracts the abnormal target area RX from the mapping image 12eb in which the dissociation degree is assigned to each pixel (Step S109). .

一方、ステップS108で誤検知であると判定された場合(ステップS108,Yes)、第1学習部11bが、該当の画像を追加学習分とした機械学習により正常モデル12cを更新し(ステップS110)、処理を終了する。   On the other hand, if it is determined in step S108 that the detection is erroneous (step S108, Yes), the first learning unit 11b updates the normal model 12c by machine learning using the corresponding image as additional learning (step S110). , And the process ends.

ステップS109の後、評価部11dが、異常対象領域RXを異常分類モデル12dへ入力し、分類結果と類似度を算出する(ステップS111)。   After step S109, the evaluation unit 11d inputs the abnormality target region RX to the abnormality classification model 12d, and calculates the classification result and the similarity (step S111).

そして、第2判定部11fが、類似度が所定の判定閾値より大であるか否かを判定する(ステップS112)。ここで、類似度が所定の判定閾値より大である場合(ステップS112,Yes)、第2判定部11fは、分類結果を通知する(ステップS113)。   Then, the second determination unit 11f determines whether or not the similarity is greater than a predetermined determination threshold (Step S112). Here, when the similarity is larger than the predetermined determination threshold (Step S112, Yes), the second determination unit 11f notifies the classification result (Step S113).

一方、類似度が所定の判定閾値以下である場合(ステップS112,No)、取得部11aが、操作部20等を介した該当の異常対象領域RXの分類クラスの追加設定を受け付ける(ステップS114)。   On the other hand, when the similarity is equal to or smaller than the predetermined determination threshold (No at Step S112), the acquiring unit 11a receives additional setting of the classification class of the corresponding abnormal target region RX via the operation unit 20 or the like (Step S114). .

そして、第2学習部11cが、該当の異常対象領域RXを追加学習分とした機械学習により異常分類モデル12dを更新し(ステップS115)、処理を終了する。   Then, the second learning unit 11c updates the abnormality classification model 12d by machine learning using the corresponding abnormality target region RX as additional learning (step S115), and ends the process.

なお、上述してきた実施形態に係る画像判定装置10は、たとえば図5に示すような構成のコンピュータ60によって実現される。図5は、画像判定装置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を備える。   Note that the image determination device 10 according to the above-described embodiment is realized by, for example, a computer 60 having a configuration as shown in FIG. FIG. 5 is a hardware configuration diagram illustrating an example of a computer that realizes the functions of the image determination 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, and 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 unit. The ROM 63 stores a boot program executed by the CPU 61 when the computer 60 is started, a program depending on hardware of the computer 60, and the like.

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

CPU61は、入出力インタフェース66を介して、ディスプレイやプリンタ等の出力装置、および、キーボードやマウス等の入力装置を制御する。CPU61は、入出力インタフェース66を介して、入力装置からデータを取得する。また、CPU61は、生成したデータを、入出力インタフェース66を介して出力装置へ出力する。   The CPU 61 controls an output device such as a display and a printer and an input device such as a keyboard and a mouse via the input / output interface 66. The CPU 61 acquires data from an input device via the input / output interface 66. Further, the CPU 61 outputs the generated data to the output device 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 a program or data stored in the recording medium 68 and provides the program or data 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), a PD (Phase Change Rewritable Disk), a magneto-optical recording medium such as an MO (Magneto-Optical disk), a tape medium, a magnetic recording medium, or a semiconductor memory. And so on.

たとえば、コンピュータ60が実施形態に係る画像判定装置10として機能する場合、コンピュータ60のCPU61は、RAM62上にロードされたプログラムを実行することにより、制御部11の各機能を実現する。また、HDD64には、記憶部12内のデータが記憶される。コンピュータ60のCPU61は、これらのプログラムを、記録媒体68から読み取って実行するが、他の例として、他の装置から、通信ネットワークを介してこれらのプログラムを取得してもよい。   For example, when the computer 60 functions as the image determination device 10 according to the embodiment, the CPU 61 of the computer 60 implements each function of the control unit 11 by executing a program loaded on the RAM 62. The data in the storage unit 12 is stored in the HDD 64. Although the CPU 61 of the computer 60 reads these programs from the recording medium 68 and executes them, as another example, these programs may be obtained from another device via a communication network.

上述してきたように、実施形態に係る画像判定装置10は、第1学習部11bと、第2学習部11cと、評価部11dと、第1判定部11eと、第2判定部11fとを含む。第1学習部11bは、正例となる学習用画像を用いた機械学習である第1学習を実行することによって、正常画像をモデル化した正常モデル12cを生成する。第2学習部11cは、負例となる学習用画像を用いた機械学習である第2学習を実行することによって、異常画像のパターンをモデル化した異常分類モデル12dを生成する。評価部11dは、判定対象画像を正常モデル12cへ入力することによって得られる正常モデル12cの出力値に基づいて判定対象画像の正常状態からの乖離度を評価する。第1判定部11eは、上記乖離度に基づいて判定対象画像が異常であるか否かを判定する。第2判定部11fは、第1判定部11eによって判定対象画像が異常であると判定された場合に、判定対象画像を異常分類モデル12dへ入力することによって得られる異常分類モデル12dの出力値に基づいて上記パターンを判定する。   As described above, the image determination device 10 according to the embodiment includes the first learning unit 11b, the second learning unit 11c, the evaluation unit 11d, the first determination unit 11e, and the second determination unit 11f. . The first learning unit 11b generates a normal model 12c that models a normal image by executing first learning that is machine learning using a learning image serving as a positive example. The second learning unit 11c generates an abnormality classification model 12d that models a pattern of an abnormal image by executing a second learning that is a machine learning using a learning image that is a negative example. The evaluation unit 11d evaluates the degree of deviation of the determination target image from the normal state based on the output value of the normal model 12c obtained by inputting the determination target image to the normal model 12c. The first determination unit 11e determines whether the determination target image is abnormal based on the degree of divergence. When the first determination unit 11e determines that the determination target image is abnormal, the second determination unit 11f outputs the output value of the abnormality classification model 12d obtained by inputting the determination target image to the abnormality classification model 12d. The above pattern is determined based on the pattern.

したがって、本実施形態に係る画像判定装置10によれば、機械学習を利用した画像判定を簡便に且つ精度よく行うことができる。   Therefore, according to the image determination device 10 according to the present embodiment, it is possible to easily and accurately perform image determination using machine learning.

(その他の実施形態)
ところで、上述した実施形態では、画像判定装置10を歯車の不良品の検知に用いる場合を例に挙げたが、無論、画像判定装置10の用途を限定するものではない。たとえば、画像判定装置10は、駐車場の満空判別に用いることができる。
(Other embodiments)
By the way, in the above-described embodiment, the case where the image determination device 10 is used for detecting defective gears has been described as an example, but the application of the image determination device 10 is of course not limited. For example, the image determination device 10 can be used for determining whether a parking lot is full or empty.

図6Aおよび図6Bは、その他の実施形態に係る学習用画像の具体例を示す図(その1)および(その2)である。また、図6Cおよび図6Dは、その他の実施形態に係る判定対象画像の具体例を示す図(その1)および(その2)である。   6A and 6B are diagrams (part 1) and (part 2) showing specific examples of a learning image according to another embodiment. 6C and 6D are diagrams (part 1) and (part 2) showing specific examples of the determination target image according to another embodiment.

満空判別は、駐車場の駐車スペースの空き状況を判定するものである。かかる満空判別において駐車場の完全空車状態を正例とする場合、学習用画像は図6Aおよび図6Bに示すようなものとなる。   The vacancy determination is for determining the availability of a parking space in a parking lot. When the fully empty state of the parking lot is taken as a positive example in the full / vacancy determination, the learning images are as shown in FIGS. 6A and 6B.

なお、図6Aおよび図6Bに示すように、同じ完全空車状態であっても、たとえば照度の異なる画像が学習用画像として取得されることで、時間帯や天候などの違いによる結果のばらつきを吸収した画像判定を行うことが可能となる。なお、既に述べたが、異なるのは照度に限らず、たとえば輝度や彩度、角度などであってもよい。   As shown in FIGS. 6A and 6B, even in the same completely empty state, for example, images having different illuminances are acquired as learning images, thereby absorbing variations in results due to differences in time zones, weather, and the like. This makes it possible to perform the determined image determination. Note that, as already described, the difference is not limited to the illuminance, but may be, for example, luminance, saturation, or angle.

そして、満空判別は、このような学習用画像に基づいて作成された正常モデル12cおよび異常分類モデル12dにより、駐車場の駐車スペースの空き状況を判定することとなる。たとえば、図6Cに示す画像が判定対象画像として入力されるものとする。   In the full / vacancy determination, the availability of the parking space in the parking lot is determined by the normal model 12c and the abnormal classification model 12d created based on the learning images. For example, assume that the image shown in FIG. 6C is input as a determination target image.

かかる場合、正常モデル12cから得られる乖離度により、少なくとも完全空車状態ではないことを判定することができる。また、そのうえで、異常と判定されるならば、異常対象領域RXとしては、図6Cで車両が駐車中の領域、すなわち図6Aに示す領域R11,R12に対応する領域が抽出される。そして、かかる異常対象領域RXが異常分類モデル12dへ入力されることによって、たとえば領域R11,R12に車両が駐車中であるとの分類結果を得ることができる。なお、分類結果のパターンとしては、車両の駐車中に限らず、人がいる、油染みがある、影が差している等、様々な状況を網羅することが可能である。   In such a case, it can be determined at least that the vehicle is not completely empty based on the degree of deviation obtained from the normal model 12c. Further, if it is determined that there is an abnormality, the area where the vehicle is parked in FIG. 6C, that is, the areas corresponding to the areas R11 and R12 shown in FIG. 6A are extracted as the abnormality target area RX. Then, by inputting the abnormality target region RX to the abnormality classification model 12d, it is possible to obtain a classification result indicating that the vehicle is parked in the regions R11 and R12, for example. In addition, the pattern of the classification result is not limited to when the vehicle is parked, and can cover various situations such as presence of a person, presence of oil spots, and shadows.

なお、図6Cは「照度:高」の画像であるが、これは図6Aに示したのと同じく「照度:高」の学習用画像を学習していたことにより、精度よく判定することが可能となる。   FIG. 6C shows an image of “illuminance: high”, which can be determined with high accuracy by learning the learning image of “illuminance: high” as shown in FIG. 6A. Becomes

また、たとえば、図6Dに示す画像が判定対象画像として入力されるものとする。かかる場合も、正常モデル12cから得られる乖離度により、少なくとも完全空車状態ではないことを判定することができ、そのうえで、図6Dで車両が駐車中の領域、すなわち図6Bに示す領域R13,R14に対応する領域が異常対象領域RXとして抽出される。そして、かかる異常対象領域RXが異常分類モデル12dへ入力されることによって、たとえば領域R13,R14に車両が駐車中であるとの分類結果を得ることができる。なお、図6Dは「照度:低」の画像であるが、これは図6Bに示したのと同じく「照度:低」の学習用画像を学習していたことにより、精度よく判定することが可能となる。   Also, for example, it is assumed that the image shown in FIG. 6D is input as the determination target image. In this case as well, it can be determined at least that the vehicle is not completely empty based on the degree of divergence obtained from the normal model 12c, and then the vehicle is parked in FIG. 6D, that is, the regions R13 and R14 shown in FIG. 6B. The corresponding area is extracted as the abnormal target area RX. Then, by inputting the abnormality target region RX into the abnormality classification model 12d, it is possible to obtain a classification result that the vehicle is parked in the regions R13 and R14, for example. FIG. 6D shows an image of “illuminance: low”, which can be accurately determined by learning the learning image of “illuminance: low” as shown in FIG. 6B. Becomes

また、図6Cおよび図6Dに示した例は、普通乗用車が駐車されている場合を示すものであるが、駐車スペースごとに異なる種類の車両、たとえば軽車両や、トラックなどが駐車されている画像を学習用画像として用いることで、該当の駐車スペースに駐車中の車両の種類まで特定することが可能である。また、無論、車両が駐車中であると判定された駐車スペースの数を計数することで、残りの駐車スペースの数を報知することも可能となる。   The examples shown in FIGS. 6C and 6D show a case where an ordinary passenger car is parked. However, an image in which different types of vehicles, such as light vehicles and trucks, are parked for each parking space. Is used as the learning image, it is possible to specify even the type of the vehicle parked in the corresponding parking space. It is also possible to notify the number of remaining parking spaces by counting the number of parking spaces where it is determined that the vehicle is parked.

また、上述した実施形態では、機械学習のアルゴリズムとしてVAEやGANを用いることとしたが、用いるアルゴリズムを限定するものではない。したがって、SVM(Support Vector Machine)のようなパターン識別器を用いたサポートベクタ回帰等の回帰分析手法により機械学習を実行し、正常モデル12cおよび異常分類モデル12dを生成してもよい。また、ここで、パターン識別器はSVMに限らず、たとえばアダブースト(AdaBoost)などであってもよい。また、ランダムフォレストなどを用いてもよい。   In the above-described embodiment, VAE or GAN is used as the machine learning algorithm, but the algorithm to be used is not limited. Therefore, the normal model 12c and the abnormal classification model 12d may be generated by executing machine learning by a regression analysis technique such as support vector regression using a pattern classifier such as an SVM (Support Vector Machine). Here, the pattern classifier is not limited to the SVM, and may be, for example, AdaBoost. Further, a random forest or the like may be used.

さらなる効果や変形例は、当業者によって容易に導き出すことができる。このため、本発明のより広範な態様は、以上のように表しかつ記述した特定の詳細および代表的な実施形態に限定されるものではない。したがって、添付の特許請求の範囲およびその均等物によって定義される総括的な発明の概念の精神または範囲から逸脱することなく、様々な変更が可能である。   Further effects and modifications can be easily derived by those skilled in the art. For this reason, the broader aspects of the present invention are 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 画像判定装置
11a 取得部
11b 第1学習部
11c 第2学習部
11d 評価部
11e 第1判定部
11f 第2判定部
12a 第1学習用データセット
12b 第2学習用データセット
12c 正常モデル
12d 異常分類モデル
12e 評価情報
12ea 乖離度情報
12eb マッピング画像
12ec 分類結果
12ed 類似度
Reference Signs List 10 image determination device 11a acquisition unit 11b first learning unit 11c second learning unit 11d evaluation unit 11e first determination unit 11f second determination unit 12a first learning data set 12b second learning data set 12c normal model 12d abnormality classification Model 12e Evaluation information 12ea Deviation information 12eb Mapping image 12ec Classification result 12ed Similarity

Claims (7)

正例となる学習用画像を用いた機械学習である第1学習を実行することによって、正常画像をモデル化した正常モデルを生成する第1学習工程と、
負例となる前記学習用画像を用いた機械学習である第2学習を実行することによって、異常画像のパターンをモデル化した異常分類モデルを生成する第2学習工程と、
判定対象画像を前記正常モデルへ入力することによって得られる該正常モデルの出力値に基づいて前記判定対象画像の正常状態からの乖離度を評価する評価工程と、
前記乖離度に基づいて前記判定対象画像が異常であるか否かを判定する第1判定工程と、
前記第1判定工程によって前記判定対象画像が異常であると判定された場合に、前記判定対象画像を前記異常分類モデルへ入力することによって得られる該異常分類モデルの出力値に基づいて前記パターンを判定する第2判定工程と
を含むことを特徴とする画像判定方法。
A first learning step of generating a normal model in which a normal image is modeled by executing first learning which is machine learning using a learning image serving as a positive example;
A second learning step of generating an abnormal classification model that models a pattern of an abnormal image by executing second learning that is machine learning using the learning image as a negative example;
An evaluation step of evaluating a degree of deviation from a normal state of the determination target image based on an output value of the normal model obtained by inputting the determination target image to the normal model,
A first determination step of determining whether the determination target image is abnormal based on the divergence degree;
When the determination target image is determined to be abnormal by the first determination step, the pattern is determined based on an output value of the abnormality classification model obtained by inputting the determination target image to the abnormality classification model. A second determining step of determining.
前記第1判定工程は、
前記乖離度に基づいて前記判定対象画像が異常であるとの判定結果が誤検知であると判定される場合に、前記判定対象画像を追加学習分とした前記第1学習を前記第1学習工程に実行させることによって前記正常モデルを更新する
ことを特徴とする請求項1に記載の画像判定方法。
The first determination step includes:
When the determination result that the determination target image is abnormal is determined to be erroneous detection based on the divergence degree, the first learning using the determination target image as additional learning is performed in the first learning step. 2. The image determination method according to claim 1, wherein the normal model is updated by executing the method.
前記第1判定工程は、
前記判定対象画像が異常である場合に、前記乖離度が各画素に割り当てられたマッピング画像から前記乖離度に基づいて異常対象領域を抽出し、当該異常対象領域を前記異常分類モデルへ入力させ、
前記第2判定工程は、
当該異常対象領域が前記異常分類モデルへ入力されることによって得られる分類結果および該分類結果に対する類似度に基づいて前記パターンを判定する
ことを特徴とする請求項1または2に記載の画像判定方法。
The first determination step includes:
When the determination target image is abnormal, the degree of divergence is extracted from the mapping image assigned to each pixel based on the degree of divergence based on the degree of divergence, and the abnormal target area is input to the abnormality classification model,
The second determination step includes:
The image determination method according to claim 1, wherein the pattern is determined based on a classification result obtained by inputting the abnormal target area to the abnormality classification model and a degree of similarity to the classification result. .
前記第2判定工程は、
前記類似度が所定の判定閾値以下である場合に、前記異常対象領域を追加学習分とした前記第2学習を前記第2学習工程に実行させることによって前記異常分類モデルを更新する
ことを特徴とする請求項3に記載の画像判定方法。
The second determination step includes:
When the similarity is equal to or less than a predetermined determination threshold, the abnormality classification model is updated by causing the second learning step to execute the second learning in which the abnormality target area is added learning. The image determination method according to claim 3.
前記第2学習工程は、
外れ値を示す前記正常画像を前記負例となる前記学習用画像として用いて前記第2学習を実行し、
前記第2判定工程は、
前記類似度が所定の判定閾値より大であり、かつ、前記分類結果が前記外れ値の前記正常画像を示す場合に、前記判定対象画像は正常であると通知する
ことを特徴とする請求項3または4に記載の画像判定方法。
The second learning step includes:
Performing the second learning using the normal image indicating an outlier as the learning image serving as the negative example;
The second determination step includes:
The method according to claim 3, wherein when the similarity is greater than a predetermined determination threshold and the classification result indicates the normal image having the outlier, the determination target image is notified as being normal. Or the image determination method according to 4.
正例となる学習用画像を用いた機械学習である第1学習を実行することによって、正常画像をモデル化した正常モデルを生成する第1学習部と、
負例となる前記学習用画像を用いた機械学習である第2学習を実行することによって、異常画像のパターンをモデル化した異常分類モデルを生成する第2学習部と、
判定対象画像を前記正常モデルへ入力することによって得られる該正常モデルの出力値に基づいて前記判定対象画像の正常状態からの乖離度を評価する評価部と、
前記乖離度に基づいて前記判定対象画像が異常であるか否かを判定する第1判定部と、
前記第1判定部によって前記判定対象画像が異常であると判定された場合に、前記判定対象画像を前記異常分類モデルへ入力することによって得られる該異常分類モデルの出力値に基づいて前記パターンを判定する第2判定部と
を備えることを特徴とする画像判定装置。
A first learning unit that generates a normal model in which a normal image is modeled by executing first learning that is machine learning using a learning image serving as a positive example;
A second learning unit that generates an abnormality classification model that models an abnormal image pattern by executing second learning that is machine learning using the learning image that is a negative example;
An evaluation unit that evaluates a degree of deviation from a normal state of the determination target image based on an output value of the normal model obtained by inputting the determination target image to the normal model,
A first determination unit that determines whether the determination target image is abnormal based on the divergence degree;
When the first determination unit determines that the determination target image is abnormal, the pattern is determined based on an output value of the abnormality classification model obtained by inputting the determination target image to the abnormality classification model. And a second determination unit for determining.
正例となる学習用画像を用いた機械学習である第1学習を実行することによって、正常画像をモデル化した正常モデルを生成する第1学習手順と、
負例となる前記学習用画像を用いた機械学習である第2学習を実行することによって、異常画像のパターンをモデル化した異常分類モデルを生成する第2学習手順と、
判定対象画像を前記正常モデルへ入力することによって得られる該正常モデルの出力値に基づいて前記判定対象画像の正常状態からの乖離度を評価する評価手順と、
前記乖離度に基づいて前記判定対象画像が異常であるか否かを判定する第1判定手順と、
前記第1判定手順によって前記判定対象画像が異常であると判定された場合に、前記判定対象画像を前記異常分類モデルへ入力することによって得られる該異常分類モデルの出力値に基づいて前記パターンを判定する第2判定手順と
をコンピュータに実行させることを特徴とする画像判定プログラム。
A first learning procedure of generating a normal model in which a normal image is modeled by executing first learning which is machine learning using a learning image serving as a positive example;
A second learning procedure of generating an abnormal classification model that models an abnormal image pattern by executing second learning that is machine learning using the learning image as a negative example;
An evaluation procedure for evaluating a degree of deviation from a normal state of the determination target image based on an output value of the normal model obtained by inputting the determination target image to the normal model,
A first determination procedure for determining whether the determination target image is abnormal based on the divergence degree;
When the determination target image is determined to be abnormal by the first determination procedure, the pattern is determined based on an output value of the abnormality classification model obtained by inputting the determination target image to the abnormality classification model. An image determination program for causing a computer to execute a second determination procedure for determining.
JP2018155150A 2018-08-22 2018-08-22 Image determination method, image determination device, and image determination program Active JP7106391B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018155150A JP7106391B2 (en) 2018-08-22 2018-08-22 Image determination method, image determination device, and image determination program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018155150A JP7106391B2 (en) 2018-08-22 2018-08-22 Image determination method, image determination device, and image determination program

Publications (2)

Publication Number Publication Date
JP2020030565A true JP2020030565A (en) 2020-02-27
JP7106391B2 JP7106391B2 (en) 2022-07-26

Family

ID=69622496

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018155150A Active JP7106391B2 (en) 2018-08-22 2018-08-22 Image determination method, image determination device, and image determination program

Country Status (1)

Country Link
JP (1) JP7106391B2 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111767802A (en) * 2020-06-05 2020-10-13 京东数字科技控股有限公司 Method and device for detecting abnormal state of object
JP2021170204A (en) * 2020-04-15 2021-10-28 株式会社Ridge−i Information processor, information processing method, and information processing program
CN114113101A (en) * 2020-08-31 2022-03-01 罗伯特·博世有限公司 Abnormality determination model generation method, abnormality determination model generation device, and inspection device
JP7323841B1 (en) 2022-11-30 2023-08-09 株式会社エクサウィザーズ Abnormality detection method, abnormality detection system and program
JP7455014B2 (en) 2020-07-10 2024-03-25 株式会社ディスコ processing equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000057349A (en) * 1998-08-10 2000-02-25 Hitachi Ltd Method for sorting defect, device therefor and method for generating data for instruction
WO2017094267A1 (en) * 2015-12-01 2017-06-08 株式会社Preferred Networks Abnormality detection system, abnormality detection method, abnormality detection program, and method for generating learned model
JP2018112996A (en) * 2017-01-13 2018-07-19 キヤノン株式会社 Video recognition device, video recognition method and program
JP2018116364A (en) * 2017-01-16 2018-07-26 キヤノン株式会社 Dictionary generation device, evaluation device, dictionary generation method, evaluation method, and program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000057349A (en) * 1998-08-10 2000-02-25 Hitachi Ltd Method for sorting defect, device therefor and method for generating data for instruction
WO2017094267A1 (en) * 2015-12-01 2017-06-08 株式会社Preferred Networks Abnormality detection system, abnormality detection method, abnormality detection program, and method for generating learned model
JP2018112996A (en) * 2017-01-13 2018-07-19 キヤノン株式会社 Video recognition device, video recognition method and program
JP2018116364A (en) * 2017-01-16 2018-07-26 キヤノン株式会社 Dictionary generation device, evaluation device, dictionary generation method, evaluation method, and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
進藤 智則: "教師なしディープラーニングで製造不良品を自動検出 武蔵精密工業が自動車ギア検査にautoencoder", 日経ROBOTICS, JPN6022021541, 10 April 2018 (2018-04-10), JP, pages 3 - 8, ISSN: 0004785869 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2021170204A (en) * 2020-04-15 2021-10-28 株式会社Ridge−i Information processor, information processing method, and information processing program
JP6994224B2 (en) 2020-04-15 2022-01-14 株式会社Ridge-i Information processing equipment, information processing methods and information processing programs
CN111767802A (en) * 2020-06-05 2020-10-13 京东数字科技控股有限公司 Method and device for detecting abnormal state of object
CN111767802B (en) * 2020-06-05 2024-02-06 京东科技控股股份有限公司 Method and device for detecting abnormal state of object
JP7455014B2 (en) 2020-07-10 2024-03-25 株式会社ディスコ processing equipment
CN114113101A (en) * 2020-08-31 2022-03-01 罗伯特·博世有限公司 Abnormality determination model generation method, abnormality determination model generation device, and inspection device
JP7323841B1 (en) 2022-11-30 2023-08-09 株式会社エクサウィザーズ Abnormality detection method, abnormality detection system and program
JP2024079411A (en) * 2022-11-30 2024-06-11 株式会社エクサウィザーズ Anomaly detection method, anomaly detection system, and program

Also Published As

Publication number Publication date
JP7106391B2 (en) 2022-07-26

Similar Documents

Publication Publication Date Title
JP7106391B2 (en) Image determination method, image determination device, and image determination program
US10896351B2 (en) Active machine learning for training an event classification
CN107403424B (en) Vehicle loss assessment method and device based on image and electronic equipment
CN110852983B (en) Method for detecting defect in semiconductor device
US20220269996A1 (en) Information processing apparatus, information processing method, and storage medium
US20160098636A1 (en) Data processing apparatus, data processing method, and recording medium that stores computer program
US10115189B2 (en) Image processing apparatus, image processing method, and recording medium
WO2020039882A1 (en) Discrimination device and machine learning method
JP7164014B2 (en) Systems and methods for identifying source code from binaries using machine learning
JP2018206373A (en) Method and device for classifying targets for vehicle
JP7434829B2 (en) Model generation device, estimation device, model generation method, and model generation program
WO2019159853A1 (en) Image processing device, image processing method, and recording medium
CN111783665A (en) Action recognition method and device, storage medium and electronic equipment
JP2019106119A (en) Detection system, information processing apparatus, evaluation method, and program
JP6255944B2 (en) Image analysis apparatus, image analysis method, and image analysis program
US20150116543A1 (en) Information processing apparatus, information processing method, and storage medium
JP2019220014A (en) Image analyzing apparatus, image analyzing method and program
JP2021033564A (en) Image classification method, image classification device and image classification program
JP2022037623A (en) Abnormality detection method, abnormality detection device, and abnormality detection program
US10007842B2 (en) Same person determination device and method, and control program therefor
JP2019139386A (en) Image determination method, image determination device and image determination program
CN115362445A (en) Data sorting device, data sorting method, and data sorting program
US20190286225A1 (en) Information processing apparatus and non-transitory computer readable medium
JP7206892B2 (en) Image inspection device, learning method for image inspection, and image inspection program
WO2022241574A1 (en) Texture mapping to polygonal models for industrial inspections

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210604

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220516

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220531

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220607

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: 20220705

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220713

R150 Certificate of patent or registration of utility model

Ref document number: 7106391

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150