JP2020085583A - Inspection device and inspection method - Google Patents
Inspection device and inspection method Download PDFInfo
- Publication number
- JP2020085583A JP2020085583A JP2018218146A JP2018218146A JP2020085583A JP 2020085583 A JP2020085583 A JP 2020085583A JP 2018218146 A JP2018218146 A JP 2018218146A JP 2018218146 A JP2018218146 A JP 2018218146A JP 2020085583 A JP2020085583 A JP 2020085583A
- Authority
- JP
- Japan
- Prior art keywords
- data
- learning
- label
- neural network
- inaccurate
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Image Analysis (AREA)
Abstract
Description
本開示は、画像を用いた検査対象物の検査技術に関するものである。 The present disclosure relates to a technique for inspecting an inspection target using an image.
特許文献1には、ニューラルネットワークを用いて画像を用いた検査対象物の検査を実行する技術が開示されている。このような検査を実行する前には、検査員の目視による検査結果を正解ラベルとして付与した学習データを用いて、ニューラルネットワークの学習が予め実行される。正解ラベルは、例えば、検査対象物が良品であるか不良品であるか示すラベルである。十分な精度で画像による検査を実行させるようにするには、正しいラベル付きの学習データを大量にニューラルネットワークに与えることが重要となる。
しかしながら、検査員がラベル付けした学習データには、しばしばラベルが不正確なデータが存在する。不正確なラベルが発生する原因は、単にヒューマンエラーによるものもあれば、検査員による良否判定基準のバラつきによるものもある。そこで、従来から、ニューラルネットワークの学習の際に、不正確なラベルを有する学習データの影響を低減したいという要望があった。 However, the training data labeled by the inspector often includes data with incorrect labels. The cause of the inaccurate label may be simply due to a human error, or may be due to the variation of the quality criterion by the inspector. Therefore, there has conventionally been a demand for reducing the influence of learning data having an incorrect label when learning a neural network.
本開示の一形態によれば、ニューラルネットワークを用いて検査対象物の検査を行う検査装置が提供される。この検査装置は、ラベル付きデータの集合である学習データをトレーニングデータとバリデーションデータとに区分し、前記トレーニングデータを用いて前記ニューラルネットワークの第1の学習を実行するとともに、前記第1の学習後の前記ニューラルネットワークを用いて前記バリデーションデータの検証を実行することによって前記バリデーションデータのうちでラベルが不正確であるラベル不正確データを抽出する第1学習実行部と、前記学習データを用いて前記ニューラルネットワークの第2の学習を実行する第2学習実行部と、前記第2の学習後の前記ニューラルネットワークを用いて前記検査対象物の検査を行う検査実行部と、を備え、前記第2学習実行部は、前記学習データのうち、前記ラベル不正確データについては予め定められた複数のラベルの中から1つのラベルをランダムに選択して付与した状態で前記第2の学習に使用する。 According to an aspect of the present disclosure, there is provided an inspection device that inspects an inspection target using a neural network. This inspection apparatus divides learning data, which is a set of labeled data, into training data and validation data, executes the first learning of the neural network using the training data, and performs the first learning after the first learning. A first learning execution unit for extracting label inaccurate data in which the label is inaccurate from the validation data by executing verification of the validation data using the neural network; A second learning execution unit that executes a second learning of the neural network; and an inspection execution unit that inspects the inspection target using the neural network after the second learning, the second learning Of the learning data, the execution unit uses the label inaccurate data for the second learning in a state where one label is randomly selected from a plurality of predetermined labels and given.
A. 第1実施形態
図1は、実施形態における検査システムのブロック図である。この検査システムは、撮像装置100と、目視検査装置200と、データベース300と、検査装置400とを含んでいる。
A. First Embodiment FIG. 1 is a block diagram of an inspection system in the embodiment. This inspection system includes an
撮像装置100は、検査対象物の画像MDを撮影する。目視検査装置200は、画像MDを検査員が目視で観察して検査対象物の良否を判定し、画像MDに良否ラベルを付与するために使用される。良否ラベルが付与された画像は、学習データLDとしてデータベース300に登録される。
The
検査装置400は、情報取得部410と、学習実行部420と、ニューラルネットワーク430と、検査実行部440と、検査結果出力部450とを有する。これらの各部は、プロセッサーがコンピュータープログラムを実行することによって実現しても良く、ハードウェア回路で実現してもよい。
The
情報取得部410は、撮像装置100で撮影された画像MD、又は、データベース300に保存されている学習データLDを取得する。
The
学習実行部420は、ニューラルネットワーク430の学習を実行する。この際、学習実行部420は、情報取得部410を介してデータベース300から学習データLDを取得する。学習実行部420は、第1学習実行部422と第2学習実行部424とを含む。第1学習実行部422と第2学習実行部424の処理内容については後述する。
The
検査実行部440は、学習済のニューラルネットワーク430を用いて、画像MDに対する判定を実行する。この際、検査実行部440は、撮像装置100で撮影された画像MDを情報取得部410を介して取得する。
The
検査結果出力部450は、検査実行部440で得られた検査結果を出力する機能を有する。検査結果出力部450は、例えば表示装置によって実現できる。
The inspection
図2は、ニューラルネットワーク430の構成例を示す説明図である。ニューラルネットワーク430は、入力層432と中間層434と全結合層436と出力層438とを有する。このニューラルネットワーク430は、中間層434が畳み込みフィルターとプーリング層とを含む畳み込みニューラルネットワークである。但し、畳み込みニューラルネットワーク以外のニューラルネットワークを用いても良い。
FIG. 2 is an explanatory diagram showing a configuration example of the
入力層432には、撮像装置100で撮影された画像MDが入力される。中間層434は、畳み込みフィルター層とプーリング層とを含む。中間層434は、これらのフィルター層とプーリング層を複数含んでいても良い。中間層434では、画像MDに応じた複数の特徴量が出力されて、全結合層436に入力される。全結合層436は、複数の全結合層を含んでいても良い。出力層438は、3つの出力ノードを含み、これらの出力ノードから3つの判定スコアS1,S2,S3が出力される。3つの判定スコアS1〜S3は、それらの和が1.0になるように正規化されている。
The image MD captured by the
図3は、判定スコアS1〜S3の例を示す説明図である。判定スコアS1,S2,S3は、例えば、それぞれ以下を示す値である。
(1)判定スコアS1:検査対象物が良品である確率。
(2)判定スコアS2:検査対象物が第1種の不良Aである確率。
(3)判定スコアS3:検査対象物が第2種の不良Bである確率。
FIG. 3 is an explanatory diagram showing an example of the determination scores S1 to S3. The determination scores S1, S2, S3 are, for example, the following values.
(1) Judgment score S1: Probability that the inspection object is non-defective.
(2) Judgment score S2: Probability that the inspection object is the first-type defect A.
(3) Judgment score S3: Probability that the inspection object is the second type defect B.
良品の判定スコアS1を基準に、判定閾値Thに従って良否の判定を行う。具体的には、良品の判定スコアS1が判定閾値Thを超える場合には、判定結果として良品ラベルを採用する。一方、良品の判定スコアS1が判定閾値Th以下の場合には、不良の判定スコアS2,S3のうち、最も高いスコアをもつ不良ラベルを採用する。例えば、図3の例では、良品の判定スコアS1の値が0.8であり、判定閾値Thを超えているので、「良品」という結果が判定ラベルとして使用される。これらの判定スコアS1〜S3は例示であり、他の判定スコアを出力するようにニューラルネットワーク430を構成してもよい。但し、ニューラルネットワーク430は、「良品」である確率を示す1つの判定スコアと、1種以上の「不良」である確率をそれぞれ示す1つ以上の判定スコアとを出力するように構成されていることが好ましい。
Based on the determination score S1 of non-defective product, the quality is determined according to the determination threshold Th. Specifically, when the determination score S1 of the non-defective product exceeds the determination threshold Th, the non-defective product label is adopted as the determination result. On the other hand, if the non-defective judgment score S1 is equal to or lower than the judgment threshold Th, the defective label having the highest score among the defective judgment scores S2 and S3 is adopted. For example, in the example of FIG. 3, the value of the determination score S1 for the non-defective product is 0.8, which exceeds the determination threshold Th. Therefore, the result of “non-defective product” is used as the determination label. These determination scores S1 to S3 are examples, and the
図4は、実施形態の全体処理手順を示すフローチャートである。ステップS100では、ニューラルネットワーク430に対して第1の学習を実行して、ラベルが不正確であるラベル不正確データを抽出する。ステップS200では、ラベル不正確データに対してランダムにラベルを付与した状態で、ニューラルネットワーク430に対して第2の学習を実行する。ステップS300では、第2の学習を実行した後のニューラルネットワーク430を用いて検査対象物の検査を実行する。ステップS100とステップS200の詳細手順については後述する。
FIG. 4 is a flowchart showing the overall processing procedure of the embodiment. In step S100, a first learning is performed on the
図5は、学習データLDの構成例を示す説明図である。学習データLDの各データは、画像MDに良否ラベルLBが付与されたものである。学習データLDは複数のデータの集合なので、「学習データセット」とも呼ぶ。通常のニューラルネットワークの機械学習では、イテレーションとエポックによる学習が実行されることが多い。イテレーションとは、学習データLDの中から1バッチ分の複数のデータを抽出し、その1バッチ分のデータで学習を実行することを意味する。エポックとは、イテレーションの繰り返しによる学習データLDの全体を使用した学習を意味する。本実施形態では、ステップS200における第2の学習においてこのような学習を実行する。 FIG. 5 is an explanatory diagram showing a configuration example of the learning data LD. Each data of the learning data LD is the image MD with the quality label LB. Since the learning data LD is a set of a plurality of data, it is also called “learning data set”. In ordinary machine learning of neural networks, learning by iteration and epoch is often executed. The iteration means that a plurality of data for one batch is extracted from the learning data LD and the learning is executed by the data for one batch. The epoch means learning using the entire learning data LD by repeating iterations. In the present embodiment, such learning is executed in the second learning in step S200.
図6は、図4のステップS100の詳細手順を示すフローチャートである。ステップS100の処理は、第1学習実行部422によって実行される。ステップS110では、学習データLDを取得する。ステップS120〜S170では、以下で説明するクロスバリデーション処理を実行する。クロスバリデーション処理では、学習データLDをトレーニングデータとバリデーションデータに区分し、その区分を変更して学習と検証とを複数回実行する。
FIG. 6 is a flowchart showing the detailed procedure of step S100 of FIG. The process of step S100 is executed by the first
図7は、クロスバリデーション処理の内容を示す説明図である。この例では、学習データLDの全体が3つのサブデータセットDS1〜DS3に区分される。1回目の処理では、1番目と2番目のサブデータセットDS1,DS2をトレーニングデータとして使用してニューラルネットワーク430の学習を実行する。トレーニングデータを用いた学習を「第1の学習」と呼ぶ。第1の学習が終了すると、3番目のサブデータセットDS3をバリデーションデータとして使用して学習済のニューラルネットワーク430の検証を実行する。この検証により、バリデーションデータDS3が、ニューラルネットワーク430を用いた判定結果と元の判定ラベルとが一致するデータDS3aと、一致しないデータDS3bとに分類される。判定結果が一致しないデータDS3bは、ラベルが不正確であるラベル不正確データとして抽出される。
FIG. 7 is an explanatory diagram showing the contents of the cross validation process. In this example, the entire learning data LD is divided into three sub data sets DS1 to DS3. In the first processing, learning of the
クロスバリデーションの2回目の処理では、1番目と3番目のサブデータセットDS1,DS3をトレーニングデータとして使用してニューラルネットワーク430の第1の学習を実行する。この第1の学習は、1回目の処理で学習されたものに対してでは無く、初期化されたニューラルネットワーク430に対して実行される。その後、2番目のサブデータセットDS2をバリデーションデータとして使用して学習済のニューラルネットワーク430の検証を実行する。この検証の結果、バリデーションデータDS2が、ニューラルネットワーク430を用いた判定結果と元の判定ラベルとが一致するデータDS2aと、一致しないデータDS2bとに分類される。判定結果が一致しないデータDS2bは、ラベルが不正確であるラベル不正確データとして抽出される。
In the second cross-validation processing, the first learning of the
3回目の処理では、2番目と3番目のサブデータセットDS2,DS3をトレーニングデータとして使用してニューラルネットワーク430の学習を実行し、1番目のサブデータセットDS1をバリデーションデータとして使用して学習済のニューラルネットワーク430の検証を実行する。この検証の結果、バリデーションデータDS1が、ニューラルネットワーク430を用いた判定結果と元の判定ラベルとが一致するデータDS1aと、一致しないデータDS1bとに分類される。判定結果が一致しないデータDS1bは、ラベルが不正確であるラベル不正確データとして抽出される。
In the third processing, the
このクロスバリデーション処理が終了すると、図7の下部に示すように、元の学習データLDが、ラベルが正確であるラベル正確データLDaと、ラベルが不正確であるラベル不正確データLDbに分類される。なお、クロスバリデーション処理における学習データLDの区分数は3に限らず、2以上の任意の整数に設定可能である。 When this cross-validation process is completed, as shown in the lower part of FIG. 7, the original learning data LD is classified into the label correct data LDa with the correct label and the label inaccurate data LDb with the incorrect label. .. The number of classifications of the learning data LD in the cross validation process is not limited to 3, and can be set to any integer of 2 or more.
上述のようなクロスバリデーション処理を行わずに、学習データLDの一部をトレーニングデータとして使用し、他の一部をバリデーションデータとして使用してラベル不正確データを抽出するようにしてもよい。但し、クロスバリデーション処理を行うようにすれば、学習データLDを構成する各データについてラベル不正確データに該当するか否かを決定することが可能である。 Instead of performing the above-described cross-validation processing, a part of the learning data LD may be used as training data and the other part may be used as validation data to extract the label inaccurate data. However, if the cross-validation processing is performed, it is possible to determine whether or not each data forming the learning data LD corresponds to the label inaccurate data.
図6のステップS120〜S170は、クロスバリデーション処理の詳細手順である。まず、ステップS120では、学習データLDをトレーニングデータとバリデーションデータに区分する。ステップS130では、ニューラルネットワーク430を初期化する。ステップS140では、トレーニングデータを用いて第1の学習を実行する。ステップS150では、バリデーションデータを用いて検証を実行することによって、ラベル不正確データを抽出する。ステップS160では、クロスバリデーション処理が終了したか否かを判定し、終了していなければステップS170に進み、トレーニングデータとバリデーションデータの区分を変更してステップS130〜S150を再度実行する。クロスバリデーション処理が終了した場合には,ステップS160からステップS180に進む。
Steps S120 to S170 of FIG. 6 are detailed procedures of the cross validation process. First, in step S120, the learning data LD is divided into training data and validation data. In step S130, the
ステップS180では、クロスバリデーション処理で抽出されたラベル不正確データLDbのうちの一部を選択してラベル不正確データを絞り込み、ステップS190では、絞り込まれたラベル不正確データのラベルを修正する。 In step S180, a part of the label inaccurate data LDb extracted by the cross validation process is selected to narrow down the label inaccurate data, and in step S190, the label of the narrowed down label inaccurate data is corrected.
図8は、クロスバリデーション処理による検証結果とラベル修正の例を示す説明図である。図8の上段には、元の学習データLDについて、4つの画像D1〜D4とその良否ラベルの例が描かれている。第1の画像D1の良否ラベルは「良品」であり、第2の画像D2の良否ラベルは「不良A」、第3の画像D3の良否ラベルは「不良B」、第4の画像D4の良否ラベルは「良品」である。図8には、元の学習データの一部として、良否ラベルに対応する良否ラベルスコア値Srefも描かれている。良否ラベルスコア値Srefは、良否ラベルが「良品」である場合には1.0に設定され、良否ラベルが「良品」でない場合には0に設定される値である。後述するように、この良否ラベルスコア値Srefは、第1学習実行部422によって設定され、ステップS180でのラベル不正確データの絞り込み処理において利用される。
FIG. 8 is an explanatory diagram showing an example of the verification result and the label correction by the cross validation process. In the upper part of FIG. 8, four images D1 to D4 and their pass/fail labels are drawn for the original learning data LD. The quality label of the first image D1 is "good", the quality label of the second image D2 is "defective A", the quality label of the third image D3 is "bad B", and the quality of the fourth image D4 is good. The label is "good product". In FIG. 8, a pass/fail label score value Sref corresponding to the pass/fail label is also drawn as a part of the original learning data. The quality label score value Sref is a value that is set to 1.0 when the quality label is “good” and is set to 0 when the quality label is not “good”. As will be described later, the quality label score value Sref is set by the first
図8の中段には、4つの画像D1〜D4をバリデーションデータとして用いた検証によって得られた判定ラベル及び判定スコアS1〜S3と、後述するラベル不正確度Fと、一致/不一致の判定結果とが描かれている。第1の画像D1では、検査対象物が良品である確率を示す第1の判定スコアS1が0.9であり、図3で説明した判定閾値Th以上なので判定ラベルは「良品」となる。第2の画像D2の判定ラベルも「良品」となり、第3の画像D3の判定ラベルは「不良B」、第4の画像D4の判定ラベルは「不良A」となる。検証結果の最下段には、更に、検証で得られた判定ラベルと元の良否ラベルとの一致/不一致が示されている。検証で得られた判定ラベルと元のラベルとが不一致である画像D2,D4のデータは、図6のステップS150において、ラベルが不正確であるラベル不正確データとして抽出される。 In the middle part of FIG. 8, the determination labels and determination scores S1 to S3 obtained by the verification using the four images D1 to D4 as validation data, the label inaccuracy F described later, and the determination result of match/mismatch are shown. Is drawn. In the first image D1, the first determination score S1 indicating the probability that the inspection object is a non-defective item is 0.9, which is equal to or greater than the determination threshold Th described in FIG. 3, and thus the determination label is “non-defective item”. The determination label of the second image D2 is also “non-defective”, the determination label of the third image D3 is “defective B”, and the determination label of the fourth image D4 is “defective A”. At the bottom of the verification result, the match/mismatch between the determination label obtained by the verification and the original pass/fail label is further shown. The data of the images D2 and D4 in which the determination label obtained by the verification and the original label do not match are extracted as label inaccurate data in which the label is inaccurate in step S150 of FIG.
図8に示したラベル不正確度Fは、図6のステップS180における絞り込み処理において利用することができる。絞り込み処理としては、例えば、ラベル不正確度Fを用いた絞り込み処理と、目視による絞り込み処理のうちの一方を利用することが可能である。 The label inaccuracy F shown in FIG. 8 can be used in the narrowing-down process in step S180 of FIG. As the narrowing down process, for example, one of the narrowing down process using the label inaccuracy F and the narrowing down process by visual inspection can be used.
<ラベル不正確度Fを用いた絞り込み処理>
ラベル不正確度Fは、元の良否ラベルが不正確である程度を示す値であり、例えば次式で算出される。
F=|Sref −S1| …(1)
ここで、Srefは元の学習データの良否ラベルを表す良否ラベルスコアであり、S1は検査対象物が良品である確率を示す判定スコアである。図8に示したように、一致判定が「不一致」である2つの画像D2,D4のうち、画像D2のラベル不正確度Fは0.8であり、画像D4のラベル不正確度Fは0.6である。この例では、画像D2の方が画像D4よりも元の良否ラベルの不正確度が高い。
<Refining process using label inaccuracy F>
The label inaccuracy F is a value indicating the degree to which the original pass/fail label is inaccurate, and is calculated, for example, by the following equation.
F=|Sref-S1|... (1)
Here, Sref is a pass/fail label score indicating the pass/fail label of the original learning data, and S1 is a determination score indicating the probability that the inspection object is a pass item. As shown in FIG. 8, the label inaccuracy F of the image D2 is 0.8 and the label inaccuracy F of the image D4 is 0 out of the two images D2 and D4 whose coincidence determination is “mismatch”. .6. In this example, the inaccuracy of the original pass/fail label is higher in the image D2 than in the image D4.
ラベル不正確度Fを用いたラベル不正確データの絞り込み処理では、ラベル不正確度Fが高い順に優先してラベル不正確データを選択してその絞り込みを行う。具体的には、例えば、ラベル不正確度Fが予め定められた閾値よりも高いラベル不正確データを選択することによってラベル不正確データを絞り込むことができる。或いは、ラベル不正確度Fが高い順に予め設定された個数のラベル不正確データを選択することによってラベル不正確データを絞り込むようにしてもよい。こうすれば、ラベルの不正確度の高いデータをラベル不正確データとして抽出できるので、不正確なラベルを有する学習データの影響をより効率的に低減できる。 In the process of narrowing down the label inaccurate data using the label inaccuracies F, the label inaccurate data is preferentially selected in the descending order of the label inaccuracies F and narrowed down. Specifically, for example, the label inaccuracy data can be narrowed down by selecting the label inaccurate data whose label inaccuracy F is higher than a predetermined threshold value. Alternatively, the label inaccurate data may be narrowed down by selecting a preset number of label inaccurate data in descending order of the label inaccuracies F. In this way, data with high label inaccuracy can be extracted as label inaccurate data, so that the influence of learning data having an inaccurate label can be reduced more efficiently.
図8の最下段に示したラベルの修正例では、ラベル不正確度Fがより高い画像D2の良否ラベルが、「不良A」から「不正確」に修正されている。また、ラベル不正確度Fがより低い画像D4の良否ラベルが、「良品」から「不良A」に修正されている。後者の修正後のラベル「不良A」は、検証において第2学習実行部424によって得られた判定ラベルである。良否ラベルが「不正確」とされたデータは、図6のステップS180においてラベル不正確データとして選択されたデータであることを示している。なお、「不正確」という良否ラベルを使用する代わりに、フラグなどの他のデータを使用してラベル不正確データとラベル正確データとを区別するようにしてもよい。
In the label correction example shown at the bottom of FIG. 8, the pass/fail label of the image D2 having a higher label inaccuracy F is corrected from “bad A” to “inaccurate”. Further, the pass/fail label of the image D4 having a lower label inaccuracy F is corrected from “good item” to “defective A”. The latter corrected label “Bad A” is the determination label obtained by the second
<目視による絞り込み処理>
目視による絞り込み処理では、検証で得られた判定ラベルと元の良否ラベルとが不一致である画像を目視で再確認することによって、ラベル不正確データを絞り込む。この際、明らかに元の良否ラベルに誤りのあるデータについては検証結果で得られた判定ラベルに修正し、良否ラベルに誤りがあるか否かの判定が難しいデータについてはラベルを「不正確」に修正するようにしてもよい。この処理では、目視で確認しながらラベルの不正確度の高いデータをラベル不正確データとして抽出できる。
<Visual narrowing down process>
In the visual narrowing-down process, the label inaccuracy data is narrowed down by visually reconfirming an image in which the determination label obtained by the verification and the original pass/fail label do not match. At this time, if the data that clearly has an error in the original pass/fail label is corrected to the determination label obtained from the verification result, and if it is difficult to determine whether the pass/fail label has an error, the label is “inaccurate”. It may be corrected to. In this process, data with high label inaccuracy can be extracted as label inaccurate data while visually confirming.
なお、図6のステップS180を省略して、ステップS150で抽出されたラベル不正確データをそのままステップS190におけるラベル修正の対象としてもよい。この場合には、ステップS150で抽出された全てのラベル不正確データについて、元の良否ラベルが「不正確」に修正される。こうしてステップS100の処理が終了すると、図4のステップS200の処理が実行される。 Note that step S180 in FIG. 6 may be omitted, and the label inaccurate data extracted in step S150 may be used as it is for the label correction in step S190. In this case, the original pass/fail labels are corrected to “inaccurate” for all the label inaccurate data extracted in step S150. When the process of step S100 is completed in this way, the process of step S200 of FIG. 4 is executed.
図9は、図4のステップS200の詳細手順を示すフローチャートである。ステップS200の処理は、第2学習実行部424によって実行される。ステップS210では、ニューラルネットワーク430を初期化する。但し、この初期化を省略して、第1の学習で学習済のニューラルネットワーク430を用いて第2の学習を行っても良い。
FIG. 9 is a flowchart showing the detailed procedure of step S200 of FIG. The process of step S200 is executed by the second
ステップS220では、第1の学習においてラベルが修正された学習データLDから、1バッチ分に相当する複数のデータを取得する。1バッチ分のデータを取得する際には、良否ラベルが「不正確」であるラベル不正確データを、予め設定した選択割合で選択することが好ましい。ステップS230では、1バッチ分のデータのうちのラベル不正確データに対して、予め定められた複数のラベルの中から1つのラベルをランダムに選択して付与する。本実施形態では、ランダムに付与するラベルとして、本来使用すべき複数の良否ラベルである「良品」、「不良A」、「不良B」のうちの一つがランダムに選択される。ステップS240では、1バッチ分の学習データを使用して第2の学習を実行する。ステップS250では、学習が終了したか否かを判定し、終了していなければステップS210以降の処理を繰り返す。例えば、学習データLDの全体を使用した1エポックの学習が、予め定められたエポック数だけ実行された場合に、学習が終了したものと判定される。 In step S220, a plurality of data corresponding to one batch is acquired from the learning data LD whose label has been corrected in the first learning. When acquiring the data for one batch, it is preferable to select the label inaccurate data whose quality label is “inaccurate” at a preset selection ratio. In step S230, one label is randomly selected from a plurality of predetermined labels and given to the label inaccurate data in one batch of data. In the present embodiment, one of a plurality of non-defective labels, “defective A”, “defective A”, and “defective B”, which should be originally used, is randomly selected as the label to be randomly given. In step S240, the second learning is executed using the learning data for one batch. In step S250, it is determined whether or not the learning is completed, and if it is not completed, the processes in step S210 and thereafter are repeated. For example, when the learning of one epoch using the entire learning data LD is executed by a predetermined number of epochs, it is determined that the learning is completed.
このように、第2の学習において、ラベル不正確データに対してランダムにラベルを付与することによって、学習時に意図的に学習データにノイズを加えることができ、ニューラルネットワーク430を正則化してその判定精度を向上させることが可能である。第2の学習では、学習データLDの全体を使用した1エポックの学習を、数十から数百エポック以上実行することによってニューラルネットワーク430の判定精度を高めることが好ましい。
As described above, in the second learning, by randomly assigning labels to the inaccurate label data, noise can be intentionally added to the learning data at the time of learning, and the
こうしてステップS200の処理が終了すると、図4のステップS300において、学習済のニューラルネットワーク430を使用して、検査実行部440が検査対象物の検査を実行する。
When the processing of step S200 is completed in this way, in step S300 of FIG. 4, the
図10は、実施例と比較例のROC曲線を示すグラフである。図10の横軸は見逃し率であり、縦軸は誤検出率である。見逃し率は、元の良否ラベルが「良品」でないデータを「良品」と誤判定した割合である。誤検出率は、元の良否ラベルが「良品」であるデータを「不良A」または「不良B」と誤判定した割合である。図10の複数の点は、図3の判定閾値Thが異なる場合の値を示している。判定閾値Thが小さくなると、良品と判定される割合が増加し、不良と判定される割合が減少する。従って、判定閾値Thが小さいほど誤検出率は低下するが、見逃し率が増大する。 FIG. 10 is a graph showing ROC curves of the example and the comparative example. The horizontal axis of FIG. 10 is the missed rate, and the vertical axis is the false detection rate. The missed rate is a rate of erroneously determining that the data whose original quality label is not “good” is “good”. The erroneous detection rate is a rate at which the data whose original quality label is “non-defective” is erroneously determined as “defective A” or “defective B”. A plurality of points in FIG. 10 indicate values when the determination threshold Th in FIG. 3 is different. When the determination threshold Th becomes smaller, the rate of being determined to be non-defective increases and the rate of determining to be defective decreases. Therefore, the smaller the determination threshold Th is, the lower the false detection rate is, but the higher the oversight rate is.
実施例のROC曲線は、上述した実施形態に従って学習を行ったニューラルネットワーク430を用いて、実際の検査データを使用して精度評価を行った結果である。比較例のROC曲線は、元の学習データLDをそのまま用いて学習を行ったニューラルネットワーク430を用いて、実施例と同じ検査データを使用して精度評価を行った場合の結果である。この結果により、ラベル不正確データにランダムにラベルを適用することによって、ニューラルネットワーク430の判定精度が向上することが確認できた。
The ROC curve of the example is the result of accuracy evaluation using the actual inspection data using the
このように、上記実施形態では、学習データLDのうちのラベル不正確データについては、ランダムにラベルを付与した状態でニューラルネットワーク430の学習を実行するので、学習データLDの中に不正確なラベルを有するデータが存在していても、その影響を低減してより正しい検査を実行することが可能となる。
As described above, in the above-described embodiment, for the label inaccurate data of the learning data LD, the learning of the
B. 他の実施形態
本開示は、上述した実施形態に限られるものではなく、その趣旨を逸脱しない範囲において種々の形態で実現することができる。例えば、本開示は、以下の形態(aspect)によっても実現可能である。以下に記載した各形態中の技術的特徴に対応する上記実施形態中の技術的特徴は、本開示の課題の一部又は全部を解決するために、あるいは、本開示の効果の一部又は全部を達成するために、適宜、差し替えや、組み合わせを行うことが可能である。また、その技術的特徴が本明細書中に必須なものとして説明されていなければ、適宜、削除することが可能である。
B. Other Embodiments The present disclosure is not limited to the above-described embodiments, and can be realized in various forms without departing from the spirit of the present disclosure. For example, the present disclosure can also be realized by the following aspects. The technical features in the above embodiments corresponding to the technical features in the embodiments described below are to solve some or all of the problems of the present disclosure, or some or all of the effects of the present disclosure. In order to achieve the above, it is possible to appropriately replace or combine. If the technical features are not described as essential in this specification, they can be deleted as appropriate.
(1)本開示の第1の形態によれば、ニューラルネットワークを用いて検査対象物の検査を行う検査装置が提供される。この検査装置は、ラベル付きデータの集合である学習データをトレーニングデータとバリデーションデータとに区分し、前記トレーニングデータを用いて前記ニューラルネットワークの第1の学習を実行するとともに、前記第1の学習後の前記ニューラルネットワークを用いて前記バリデーションデータの検証を実行することによって前記バリデーションデータのうちでラベルが不正確であるラベル不正確データを抽出する第1学習実行部と、前記学習データを用いて前記ニューラルネットワークの第2の学習を実行する第2学習実行部と、前記第2の学習後の前記ニューラルネットワークを用いて前記検査対象物の検査を行う検査実行部と、を備え、前記第2学習実行部は、前記学習データのうち、前記ラベル不正確データについては予め定められた複数のラベルの中から1つのラベルをランダムに選択して付与した状態で前記第2の学習に使用する。
この検査装置によれば、学習データのうちのラベル不正確データについてはランダムにラベルを付与した状態でニューラルネットワークの学習を実行するので、不正確なラベルを有する学習データが存在していても、その影響を低減してより正しい検査を実行することが可能となる。
(1) According to the first aspect of the present disclosure, there is provided an inspection device that inspects an inspection target using a neural network. This inspection apparatus divides learning data, which is a set of labeled data, into training data and validation data, executes the first learning of the neural network using the training data, and performs the first learning after the first learning. A first learning execution unit for extracting label inaccurate data in which the label is inaccurate from the validation data by executing verification of the validation data using the neural network; A second learning execution unit that executes a second learning of the neural network; and an inspection execution unit that inspects the inspection target using the neural network after the second learning, the second learning Of the learning data, the execution unit uses the label inaccurate data for the second learning in a state where one label is randomly selected from a plurality of predetermined labels and given.
According to this inspection device, for the label inaccurate data of the learning data, since the learning of the neural network is executed in the state where the label is randomly assigned, even if the learning data having the inaccurate label exists, It is possible to reduce the influence and perform a more correct inspection.
(2)上記検査装置において、前記第1学習実行部は、前記学習データの前記トレーニングデータと前記バリデーションデータの区分を変更して前記第1の学習と前記検証とを実行するクロスバリデーション処理によって、前記学習データを構成する各データについて前記ラベル不正確データに該当するか否かを決定するものとしてもよい。
この検査装置によれば、学習データを構成する各データについてラベル不正確データか否かを決定するので、不正確なラベルを有する学習データの影響を低減してより正しい検査を実行することが可能となる。
(2) In the inspection device, the first learning execution unit changes the classification of the training data and the validation data of the learning data, and performs cross validation processing for performing the first learning and the verification. It may be possible to determine whether or not each data forming the learning data corresponds to the label inaccurate data.
According to this inspection device, since it is determined whether or not each data forming the learning data is the label inaccurate data, it is possible to reduce the influence of the learning data having the inaccurate label and perform the correct inspection. Becomes
(3)上記検査装置において、前記第1学習実行部は、前記第1の学習後の前記ニューラルネットワークを用いた前記バリデーションデータの検証の結果から前記バリデーションデータのラベルの不正確度を推定し、前記不正確度が高い順に前記バリデーションデータを優先して前記ラベル不正確データとして抽出するものとしてもよい。
この検査装置によれば、ラベルの不正確度の高いデータをラベル不正確データとして抽出できるので、不正確なラベルを有する学習データの影響をより効率的に低減できる。
(3) In the inspection device, the first learning execution unit estimates the inaccuracy of the label of the validation data from the result of verification of the validation data using the neural network after the first learning, The validation data may be preferentially extracted in the descending order of the inaccuracy as the label inaccurate data.
According to this inspection device, since data with high label inaccuracy can be extracted as label inaccurate data, the influence of learning data having an inaccurate label can be reduced more efficiently.
(4)本開示の第2の形態によれば、ニューラルネットワークを用いて検査対象物の検査を行う検査方法が提供される。この検査方法は、ラベル付きデータの集合である学習データからトレーニングデータとバリデーションデータとを抽出し、前記トレーニングデータを用いて前記ニューラルネットワークの第1の学習を実行するとともに、前記第1の学習後の前記ニューラルネットワークを用いて前記バリデーションデータの検証を実行することによって前記バリデーションデータのうちでラベルが不正確であるラベル不正確データを抽出する第1学習実行工程と、前記学習データを用いて前記ニューラルネットワークの第2の学習を実行する第2学習実行工程と、前記第2の学習後の前記ニューラルネットワークを用いて前記検査対象物の検査を行う検査実行工程と、を備え、前記第2学習実行工程では、前記学習データのうち、前記ラベル不正確データについては予め定められた複数のラベルの中から1つのラベルをランダムに選択して付与した状態で前記第2の学習に使用する。
この検査方法によれば、学習データのうちのラベル不正確データについてはランダムにラベルを付与した状態でニューラルネットワークの学習を実行するので、学習データの中に不正確なラベルを有する学習データが存在していても、その影響を低減してより正しい検査を実行することが可能となる。
(4) According to the second aspect of the present disclosure, there is provided an inspection method for inspecting an inspection object using a neural network. This inspection method extracts training data and validation data from training data that is a set of labeled data, executes the first learning of the neural network using the training data, and executes the first learning after the first learning. A first learning execution step of extracting label inaccurate data in which the label is inaccurate from the validation data by executing verification of the validation data using the neural network of A second learning execution step of executing a second learning of the neural network; and an inspection execution step of inspecting the inspection object by using the neural network after the second learning, the second learning In the execution step, of the learning data, the label inaccurate data is used for the second learning in a state where one label is randomly selected from a plurality of predetermined labels and given.
According to this inspection method, the learning of the neural network is performed in a state where labels are randomly assigned to the inaccurate label data of the learning data, so that there is learning data having an inaccurate label in the learning data. Even if it does, the influence can be reduced and a more correct inspection can be performed.
100…撮像装置、200…目視検査装置、300…データベース、400…検査装置、410…情報取得部、420…学習実行部、422…第1学習実行部、424…第2学習実行部、430…ニューラルネットワーク、432…入力層、434…中間層、436…全結合層、438…出力層、440…検査実行部、450…検査結果出力部 100... Imaging device, 200... Visual inspection device, 300... Database, 400... Inspection device, 410... Information acquisition part, 420... Learning execution part, 422... First learning execution part, 424... Second learning execution part, 430... Neural network, 432... Input layer, 434... Intermediate layer, 436... Full connection layer, 438... Output layer, 440... Inspection execution unit, 450... Inspection result output unit
Claims (4)
ラベル付きデータの集合である学習データをトレーニングデータとバリデーションデータとに区分し、前記トレーニングデータを用いて前記ニューラルネットワークの第1の学習を実行するとともに、前記第1の学習後の前記ニューラルネットワークを用いて前記バリデーションデータの検証を実行することによって前記バリデーションデータのうちでラベルが不正確であるラベル不正確データを抽出する第1学習実行部と、
前記学習データを用いて前記ニューラルネットワークの第2の学習を実行する第2学習実行部と、
前記第2の学習後の前記ニューラルネットワークを用いて前記検査対象物の検査を行う検査実行部と、
を備え、
前記第2学習実行部は、前記学習データのうち、前記ラベル不正確データについては予め定められた複数のラベルの中から1つのラベルをランダムに選択して付与した状態で前記第2の学習に使用する、検査装置。 An inspection device for inspecting an inspection object using a neural network,
Learning data, which is a set of labeled data, is divided into training data and validation data, the first learning of the neural network is performed using the training data, and the neural network after the first learning is executed. A first learning execution unit for extracting label inaccurate data in which the label is inaccurate from the validation data by executing verification of the validation data using
A second learning execution unit that executes second learning of the neural network using the learning data;
An inspection execution unit that inspects the inspection object using the neural network after the second learning;
Equipped with
Of the learning data, the second learning execution unit randomly selects one label from a plurality of predetermined labels for the label inaccurate data, and applies the label to the second learning in a state where the label is randomly selected. Inspection device to be used.
前記第1学習実行部は、前記学習データの前記トレーニングデータと前記バリデーションデータの区分を変更して前記第1の学習と前記検証とを実行するクロスバリデーション処理によって、前記学習データを構成する各データについて前記ラベル不正確データに該当するか否かを決定する、検査装置。 The inspection apparatus according to claim 1, wherein
The first learning execution unit changes the classification of the training data and the validation data of the learning data, and performs cross validation to perform the first learning and the verification. The inspection device for determining whether or not the label inaccurate data corresponds to.
前記第1学習実行部は、前記第1の学習後の前記ニューラルネットワークを用いた前記バリデーションデータの検証の結果から前記バリデーションデータのラベルの不正確度を推定し、前記不正確度が高い順に前記バリデーションデータを優先して前記ラベル不正確データとして抽出する、検査装置。 The inspection apparatus according to claim 1 or 2, wherein
The first learning execution unit estimates the inaccuracy of the label of the validation data from the result of the verification of the validation data using the neural network after the first learning, and the inaccuracy in descending order of the inaccuracy. An inspection device that preferentially extracts validation data as the label inaccurate data.
ラベル付きデータの集合である学習データからトレーニングデータとバリデーションデータとを抽出し、前記トレーニングデータを用いて前記ニューラルネットワークの第1の学習を実行するとともに、前記第1の学習後の前記ニューラルネットワークを用いて前記バリデーションデータの検証を実行することによって前記バリデーションデータのうちでラベルが不正確であるラベル不正確データを抽出する第1学習実行工程と、
前記学習データを用いて前記ニューラルネットワークの第2の学習を実行する第2学習実行工程と、
前記第2の学習後の前記ニューラルネットワークを用いて前記検査対象物の検査を行う検査実行工程と、
を備え、
前記第2学習実行工程では、前記学習データのうち、前記ラベル不正確データについては予め定められた複数のラベルの中から1つのラベルをランダムに選択して付与した状態で前記第2の学習に使用する、検査方法。 An inspection method for inspecting an inspection object using a neural network,
Training data and validation data are extracted from the learning data that is a set of labeled data, the first learning of the neural network is performed using the training data, and the neural network after the first learning is executed. A first learning execution step of extracting label inaccurate data in which the label is inaccurate among the validation data by executing verification of the validation data using
A second learning execution step of performing a second learning of the neural network using the learning data;
An inspection execution step of inspecting the inspection object using the neural network after the second learning;
Equipped with
In the second learning execution step, for the label inaccurate data among the learning data, one label is randomly selected from a plurality of predetermined labels and is given to the second learning. The inspection method to use.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018218146A JP2020085583A (en) | 2018-11-21 | 2018-11-21 | Inspection device and inspection method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018218146A JP2020085583A (en) | 2018-11-21 | 2018-11-21 | Inspection device and inspection method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2020085583A true JP2020085583A (en) | 2020-06-04 |
Family
ID=70907531
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018218146A Pending JP2020085583A (en) | 2018-11-21 | 2018-11-21 | Inspection device and inspection method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2020085583A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPWO2020240770A1 (en) * | 2019-05-30 | 2020-12-03 | ||
JPWO2021053776A1 (en) * | 2019-09-18 | 2021-03-25 | ||
JP7081859B1 (en) | 2021-09-08 | 2022-06-07 | アイ・ピー・ファイン株式会社 | Evaluated literature diagnostic system |
JP2022122269A (en) * | 2021-02-09 | 2022-08-22 | 日本電気株式会社 | Data processing method, and learning method and device for neural network |
WO2022185362A1 (en) * | 2021-03-01 | 2022-09-09 | 日本電信電話株式会社 | Assistance device, assistance method, and program |
-
2018
- 2018-11-21 JP JP2018218146A patent/JP2020085583A/en active Pending
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPWO2020240770A1 (en) * | 2019-05-30 | 2020-12-03 | ||
JP7359206B2 (en) | 2019-05-30 | 2023-10-11 | 日本電信電話株式会社 | Learning devices, learning methods, and programs |
JPWO2021053776A1 (en) * | 2019-09-18 | 2021-03-25 | ||
JP2022122269A (en) * | 2021-02-09 | 2022-08-22 | 日本電気株式会社 | Data processing method, and learning method and device for neural network |
JP7290183B2 (en) | 2021-02-09 | 2023-06-13 | 日本電気株式会社 | Data processing method, neural network learning method and device |
WO2022185362A1 (en) * | 2021-03-01 | 2022-09-09 | 日本電信電話株式会社 | Assistance device, assistance method, and program |
JP7081859B1 (en) | 2021-09-08 | 2022-06-07 | アイ・ピー・ファイン株式会社 | Evaluated literature diagnostic system |
JP2023038961A (en) * | 2021-09-08 | 2023-03-20 | アイ・ピー・ファイン株式会社 | Evaluated document diagnostic system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2020085583A (en) | Inspection device and inspection method | |
US10964004B2 (en) | Automated optical inspection method using deep learning and apparatus, computer program for performing the method, computer-readable storage medium storing the computer program, and deep learning system thereof | |
EP3502966B1 (en) | Data generation apparatus, data generation method, and data generation program | |
US10885618B2 (en) | Inspection apparatus, data generation apparatus, data generation method, and data generation program | |
JP2019109563A (en) | Data generation device, data generation method, and data generation program | |
JP6584250B2 (en) | Image classification method, classifier configuration method, and image classification apparatus | |
JP6063756B2 (en) | Teacher data creation support device, teacher data creation device, image classification device, teacher data creation support method, teacher data creation method, and image classification method | |
JP2018005640A (en) | Classifying unit generation device, image inspection device, and program | |
KR20190075707A (en) | Method for sorting products using deep learning | |
JPH11344450A (en) | Instruction data forming method and defect classifying method and apparatus thereof | |
WO2010023791A1 (en) | Method and device for defect inspection | |
CN107004265A (en) | Information processor, the method for processing information, discriminator generating means, the method and program for generating discriminator | |
JP7054436B2 (en) | Detection system, information processing device, evaluation method and program | |
WO2021225097A1 (en) | Image inspection device, image inspection method, and program | |
US20220076404A1 (en) | Defect management apparatus, method and non-transitory computer readable medium | |
KR20210105335A (en) | Classification of defects in semiconductor specimens | |
CN113222913A (en) | Circuit board defect detection positioning method and device and storage medium | |
CN112633461A (en) | Application assistance system and method, and computer-readable recording medium | |
WO2023029491A1 (en) | Panel array short circuit detection method and apparatus, electronic device, and storage medium | |
CN117372424B (en) | Defect detection method, device, equipment and storage medium | |
KR101782364B1 (en) | Vision inspection method based on learning data | |
JP7440823B2 (en) | Information processing device, information processing method and program | |
JP6425468B2 (en) | Teacher data creation support method, image classification method, teacher data creation support device and image classification device | |
JP7498890B2 (en) | Image Inspection Equipment | |
US20220335708A1 (en) | Data cleaning device, data cleaning method and face verification method |