JP2021174194A - Learning data processing device, learning device, learning data processing method, and program - Google Patents
Learning data processing device, learning device, learning data processing method, and program Download PDFInfo
- Publication number
- JP2021174194A JP2021174194A JP2020076673A JP2020076673A JP2021174194A JP 2021174194 A JP2021174194 A JP 2021174194A JP 2020076673 A JP2020076673 A JP 2020076673A JP 2020076673 A JP2020076673 A JP 2020076673A JP 2021174194 A JP2021174194 A JP 2021174194A
- Authority
- JP
- Japan
- Prior art keywords
- learning
- image
- images
- data
- unit
- 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
Links
- 238000012545 processing Methods 0.000 title claims abstract description 64
- 238000003672 processing method Methods 0.000 title claims abstract description 9
- 230000002950 deficient Effects 0.000 claims abstract description 92
- 238000004364 calculation method Methods 0.000 claims abstract description 66
- 230000005856 abnormality Effects 0.000 claims abstract description 35
- 238000012549 training Methods 0.000 claims description 34
- 238000007689 inspection Methods 0.000 claims description 21
- 238000013450 outlier detection Methods 0.000 claims 1
- 230000010365 information processing Effects 0.000 abstract description 27
- 238000010801 machine learning Methods 0.000 abstract description 14
- 230000000694 effects Effects 0.000 abstract 1
- 238000000034 method Methods 0.000 description 46
- 230000007547 defect Effects 0.000 description 40
- 238000001514 detection method Methods 0.000 description 31
- 238000003860 storage Methods 0.000 description 23
- 238000010586 diagram Methods 0.000 description 9
- 238000002360 preparation method Methods 0.000 description 6
- 238000013528 artificial neural network Methods 0.000 description 5
- 238000011156 evaluation Methods 0.000 description 5
- 238000003384 imaging method Methods 0.000 description 5
- 238000004891 communication Methods 0.000 description 4
- 238000009826 distribution Methods 0.000 description 4
- 230000006870 function Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000004519 manufacturing process Methods 0.000 description 2
- 102220218873 rs1060503403 Human genes 0.000 description 2
- 102200044937 rs121913396 Human genes 0.000 description 2
- 239000003814 drug Substances 0.000 description 1
- 235000013305 food Nutrition 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 238000012706 support-vector machine Methods 0.000 description 1
- 230000007723 transport mechanism Effects 0.000 description 1
- 238000011179 visual inspection Methods 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
この発明は、学習用データ処理装置、学習装置、学習用データ処理方法、およびプログラムに関する。 The present invention relates to a learning data processing device, a learning device, a learning data processing method, and a program.
食品、医薬品または工業製品等の製造工程においては、製造ラインに検査工程を設けて、不良品の検出等の検査が行われる場合がある。製品の検査は、人間が目視で行っており(目視検査)、人的コストが高いという問題があった。このため、検査工程の一部または全部を自動化するべく、機械によって自動的に製品を検査するシステムの開発が進められている。 In the manufacturing process of foods, pharmaceuticals, industrial products, etc., an inspection process may be provided on the manufacturing line to perform inspections such as detection of defective products. Product inspection is performed visually by humans (visual inspection), and there is a problem that human cost is high. Therefore, in order to automate a part or all of the inspection process, a system for automatically inspecting products by a machine is being developed.
例えば、特許文献1には、機械学習を利用して欠陥検査する技術が開示されている。具体的には、第1の学習部は、正常データの集合を用いて、正常データを判別するための第1のモデルを学習する。この第1の学習部は、良品画像のみで機械学習を行う。このように、良品画像のみを用いて機械学習を行い、良品と不良品とを選別する検査装置が、広く知られている。 For example, Patent Document 1 discloses a technique for performing defect inspection using machine learning. Specifically, the first learning unit learns a first model for discriminating normal data by using a set of normal data. This first learning unit performs machine learning only with non-defective images. As described above, an inspection device that performs machine learning using only non-defective product images and sorts out non-defective products and defective products is widely known.
しかしながら、機械学習を行うためのデータセットについて、数千枚から数万枚の大量の良品画像が必要となる場合がある。このように、大量の画像を準備した場合、データセット中に意図せず不良品データが混入する虞がある。そのような場合、生成される学習済モデルの精度が低くなるという問題が生じる。 However, a large number of good images of thousands to tens of thousands may be required for a data set for machine learning. When a large number of images are prepared in this way, defective product data may be unintentionally mixed in the data set. In such a case, there arises a problem that the accuracy of the generated trained model becomes low.
本発明の目的は、機械学習のデータセット中の複数の良品画像に混入した不良品画像を効率良く除去する技術を提供することにある。 An object of the present invention is to provide a technique for efficiently removing defective images mixed in a plurality of non-defective images in a machine learning data set.
上記課題を解決するため、本願の第1発明は、学習用のデータセットに含まれる複数の学習用画像から不適切な画像を除去する学習用データ処理装置であって、前記学習用画像のそれぞれについて異常度を示すスコアを算出する異常度算出部と、前記スコアに基づいて、前記データセットから不適切な前記学習用画像を除去するデータクレンジング部と、を有する。 In order to solve the above problems, the first invention of the present application is a learning data processing device that removes an inappropriate image from a plurality of learning images included in a learning data set, and each of the learning images. It has an abnormality degree calculation unit for calculating a score indicating an abnormality degree, and a data cleansing unit for removing an inappropriate learning image from the data set based on the score.
本願の第2発明は、第1発明の学習用データ処理装置であって、入力された画像の再構成画像を出力する第1画像再構成部をさらに有し、前記異常度算出部は、前記第1画像再構成部へ入力された前記学習用画像と前記第1画像再構成部から出力された前記再構成画像との差分画像を生成する第1差分画像生成部と、前記第1差分画像生成部において生成された前記差分画像に基づいて、前記スコアを算出するスコア算出部と、を含み、前記データクレンジング部は、全ての前記学習用画像について前記異常度算出部が算出した前記スコアに基づいて、良品の範囲を示す閾値を算出する閾値算出部と、前記閾値算出部の算出した前記閾値に基づいて、前記データセットから、良品の範囲に含まれない前記学習用画像を除去する不良品データ除去部と、を含む。 The second invention of the present application is the learning data processing apparatus of the first invention, further including a first image reconstructing unit for outputting a reconstructed image of the input image, and the abnormality degree calculation unit is described above. A first difference image generation unit that generates a difference image between the learning image input to the first image reconstruction unit and the reconstruction image output from the first image reconstruction unit, and the first difference image. The data cleansing unit includes a score calculation unit that calculates the score based on the difference image generated by the generation unit, and the data cleansing unit uses the score calculated by the abnormality degree calculation unit for all the learning images. Based on the threshold calculation unit that calculates the threshold indicating the range of the non-defective product, and the learning image that is not included in the range of the non-defective product is removed from the data set based on the threshold calculated by the threshold calculation unit. Includes a non-defective data removal unit.
本願の第3発明は、第2発明の学習用データ処理装置であって、画像を入力および出力とする第1学習モデルと、複数の標本画像を前記第1学習モデルに入力し、入力された前記標本画像の再構成画像を出力するように学習させた第1学習済データと、をさらに有し、前記第1画像再構成部は、入力画像を、前記第1学習済データを適用した前記第1学習モデルに入力して、前記入力画像の再構成画像を生成する。 The third invention of the present application is the learning data processing apparatus of the second invention, in which a first learning model that inputs and outputs images and a plurality of sample images are input to the first learning model and input. The first image reconstructing unit further has a first trained data trained to output a reconstructed image of the sample image, and the first image reconstructing unit applies the input image to the first trained data. Input to the first training model to generate a reconstructed image of the input image.
本願の第4発明は、第3発明の学習用データ処理装置であって、前記第1学習済データは、前記データセットに含まれる複数の学習用画像を前記標本画像として入力して学習させた学習済データである。 The fourth invention of the present application is the learning data processing apparatus of the third invention, and the first trained data is trained by inputting a plurality of learning images included in the data set as the sample images. It is trained data.
本願の第5発明は、第3発明または第4発明の学習用データ処理装置であって、前記第1学習モデルに教師なし学習を行うことにより第1学習済データを生成する第1学習部を有する。 The fifth invention of the present application is the learning data processing apparatus of the third invention or the fourth invention, and the first learning unit which generates the first trained data by performing unsupervised learning on the first learning model. Have.
本願の第6発明は、第1発明の学習用データ処理装置であって、画像を入力とし、特徴量であるスコアを出力とする第1学習モデルと、複数の標本画像を前記第1学習モデルに入力し、入力された前記標本画像の外れ値検知を行った結果を前記スコアとして出力するように学習させた第1学習済データと、をさらに有し、前記異常度算出部は、入力画像を、前記第1学習済データを適用した前記第1学習モデルに入力して、前記スコアを取得する。 The sixth invention of the present application is the learning data processing apparatus of the first invention, which is a first learning model in which an image is input and a score which is a feature amount is output, and a plurality of sample images are used as the first learning model. The first trained data is further provided with the first trained data that is input to and trained to output the result of detecting the outlier of the input sample image as the score, and the abnormality degree calculation unit is the input image. Is input to the first training model to which the first trained data is applied, and the score is acquired.
本願の第7発明は、対象物を検査する検査装置を構築するための学習装置であって、学習用のデータセットに含まれる複数の学習用画像から不適切な画像を除去する、第1発明ないし第6発明のいずれかの学習用データ処理装置と、前記学習用データ処理装置によって不適切な画像が除去された処理済データセットを用いて学習を行う第2学習部と、を有し、前記第2学習部は、前記処理済データセットに含まれる複数の前記学習用画像を、画像を入力および出力とする第2学習モデルに入力し、前記第2学習モデルが入力された前記学習用画像の再構成画像を出力するように学習させた第2学習済データを生成する。 The seventh invention of the present application is a learning device for constructing an inspection device for inspecting an object, and is a first invention for removing an inappropriate image from a plurality of learning images included in a learning data set. It also has a learning data processing device according to any one of the sixth inventions, and a second learning unit that performs learning using a processed data set from which inappropriate images have been removed by the learning data processing device. The second learning unit inputs a plurality of the learning images included in the processed data set into a second learning model that inputs and outputs images, and the second learning model is input to the learning model. Image reconstruction Generates second trained data trained to output an image.
本願の第8発明は、学習用のデータセットに含まれる複数の学習用画像から不適切な画像を除去する学習用データ処理方法であって、a)前記学習用画像のそれぞれについて異常度を示すスコアを算出する異常度算出工程と、b)前記スコアに基づいて、前記データセットから不適切な前記学習用画像を除去するデータクレンジング工程と、を有する。 The eighth invention of the present application is a training data processing method for removing an inappropriate image from a plurality of training images included in a training data set, and a) indicates an abnormality degree for each of the training images. It has an abnormality degree calculation step of calculating a score, and b) a data cleansing step of removing an inappropriate learning image from the data set based on the score.
本願の第9発明は、第8発明の学習用データ処理方法であって、前記工程a)は、a1)前記学習用画像の再構成を行う画像再構成工程と、a2)前記工程a1)において入力された前記学習用画像と前記工程a1)において出力された前記再構成画像との差分画像を生成する第1差分画像生成工程と、a3)前記工程a2)において生成された前記差分画像に基づいて、前記スコアを算出するスコア算出工程と、を含み、前記工程b)は、b1)全ての前記学習用画像について前記工程a)において算出された前記スコアに基づいて、良品の範囲を示す閾値を算出する閾値算出工程と、b2)前記工程b1)において算出された前記閾値に基づいて、前記データセットから、良品の範囲に含まれない前記学習用画像を除去する不良品データ除去工程と、を含む。 The ninth invention of the present application is the learning data processing method of the eighth invention, and the step a) is a1) an image reconstruction step of reconstructing the learning image, and a2) the step a1). Based on the first difference image generation step of generating the difference image between the input learning image and the reconstructed image output in the step a1) and the difference image generated in a3) step a2). Including the score calculation step of calculating the score, the step b) is a threshold indicating the range of non-defective products based on the score calculated in the step a) for b1) all the learning images. A threshold calculation step for calculating the above, and a defective product data removal step for removing the learning image not included in the range of good products from the data set based on the threshold calculated in b2) step b1). including.
本願の第10発明は、コンピュータに、学習用のデータセットに含まれる複数の学習用画像から不適切な画像を除去する学習用データ処理を行わせるためのプログラムであって、前記コンピュータに、a)前記学習用画像のそれぞれについて異常度を示すスコアを算出する異常度算出工程と、b)前記スコアに基づいて、前記データセットから不適切な前記学習用画像を除去するデータクレンジング工程と、を実行させる。 The tenth invention of the present application is a program for causing a computer to perform training data processing for removing an inappropriate image from a plurality of training images included in a training data set, and the computer is used to perform a. ) An abnormality degree calculation step of calculating a score indicating an abnormality degree for each of the training images, and b) a data cleansing step of removing an inappropriate learning image from the data set based on the score. Let it run.
本願の第11発明は、第10発明のプログラムであって、前記工程a)は、a1)前記学習用画像の再構成を行う画像再構成工程と、a2)前記工程a1)において入力された前記学習用画像と前記工程a1)において出力された前記再構成画像との差分画像を生成する第1差分画像生成工程と、a3)前記工程a2)において生成された前記差分画像に基づいて、前記スコアを算出するスコア算出工程と、を含み、前記工程b)は、b1)全ての前記学習用画像について前記工程a)において算出された前記スコアに基づいて、良品の範囲を示す閾値を算出する閾値算出工程と、b2)前記工程b1)において算出された前記閾値に基づいて、前記データセットから、良品の範囲に含まれない前記学習用画像を除去する不良品データ除去工程と、を含む。 The eleventh invention of the present application is the program of the tenth invention, and the step a) is an image reconstruction step of a1) reconstructing the learning image and a2) the input in the step a1). The score is based on the first difference image generation step of generating a difference image between the learning image and the reconstructed image output in the step a1) and the difference image generated in a3) step a2). Including the score calculation step of calculating the above, the step b) is a threshold for calculating a threshold indicating the range of non-defective products based on the score calculated in the step a) for b1) all the learning images. It includes a calculation step and a defective product data removal step of removing the learning image not included in the range of non-defective products from the data set based on the threshold value calculated in b2) step b1).
本願の第1発明〜第11発明によれば、機械学習のデータセット中の複数の良品画像に混入した不良品画像を効率良く除去することができる。 According to the first to eleventh inventions of the present application, it is possible to efficiently remove defective images mixed in a plurality of non-defective images in a machine learning data set.
以下、添付の図面を参照しながら、本発明の実施形態について説明する。なお、この実施形態に記載されている構成要素はあくまでも例示であり、本発明の範囲をそれらのみに限定する趣旨のものではない。図面においては、理解容易のため、必要に応じて各部の寸法や数が誇張または簡略化して図示されている場合がある。 Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that the components described in this embodiment are merely examples, and the scope of the present invention is not limited to them. In the drawings, the dimensions and numbers of each part may be exaggerated or simplified as necessary for easy understanding.
<1.第1実施形態>
<1−1.検査装置の構成>
図1は、第1実施形態の検査装置10を示す図である。検査装置10は、対象物90の画像を解析することによって、対象物90の欠陥を検出する。対象物90は、具体的には錠剤であるが、錠剤に限定されない。検査装置10は、カメラ110と、情報処理装置120とを備える。カメラ110は、情報処理装置120と電気的に接続されている。カメラ110は、イメージセンサを備えている。カメラ110は、イメージセンサを用いて対象物90を撮像することにより得られる画像信号を、情報処理装置120へ出力する。カメラ110に撮像される対象物90は、所定の位置に停止していてもよいし、ベルトコンベアなどの搬送機構により、所定の方向へ移動していてもよい。
<1. First Embodiment>
<1-1. Inspection device configuration>
FIG. 1 is a diagram showing an
図2は、第1実施形態の情報処理装置120のハードウェア構成を示す図である。情報処理装置120は、コンピュータとしての構成を備える。具体的には、情報処理装置120は、プロセッサ121と、RAM123と、記憶部125と、入力部127と、表示部129と、機器I/F131と、通信I/F133とを備える。プロセッサ121、RAM123、記憶部125、入力部127、表示部129、機器I/F131および通信I/F133は、バス135を介して互いに電気的に接続されている。
FIG. 2 is a diagram showing a hardware configuration of the
プロセッサ121は、具体的には、CPUまたはGPUを含む。RAM123は、情報の読み出しおよび書き込みが可能な記憶媒体であって、具体的には、SDRAMである。記憶部125は、情報の読み出しおよび書き込みが可能な記録媒体であって、具体的には、HDD(ハードディスクドライブ)またはSSD(ソリッドステートドライブ)を含む。なお、記憶部125は、可搬性を有する光ディスク、磁気ディスクまたは半導体メモリ等を含んでもよい。記憶部125は、プログラムPを記憶している。プロセッサ121は、RAM123を作業領域として、プログラムPを実行することにより、各種の機能を実現する。なお、プログラムPは、ネットワークを介して、情報処理装置120に提供または配布されるようにしてもよい。
Specifically, the
入力部127は、ユーザの操作入力を受け付ける入力デバイスであり、具体的には、マウスまたはキーボードなどである。表示部129は、各種情報を表す画像を表示する表示デバイスであり、具体的には、液晶ディスプレイである。
The
機器I/F131は、カメラ110を情報処理装置120に電気的に接続するためのインターフェースである。通信I/F133は、情報処理装置120をインターネットなどのネットワークと接続するためのインターフェースである。カメラ110は、通信I/F133を介して情報処理装置120と接続されてもよい。すなわち、検査装置10は、カメラ110を備えていることは必須ではなく、情報処理装置120のみを備えていてもよい。
The device I /
図3は、第1実施形態の情報処理装置120が備える機能的な構成を示す図である。図4は、情報処理装置120が備える機能的な構成の一部をより詳細に示す図である。
FIG. 3 is a diagram showing a functional configuration included in the
図3に示すように、情報処理装置120は、第1学習部20と、学習用データ処理部30と、第2学習部40と、欠陥検出部50とを有する。
As shown in FIG. 3, the
第1学習部20、学習用データ処理部30および第2学習部40は、検査装置を構成する欠陥検出部50を構築するための構成である。欠陥検出部50の後述する第2学習モデルM2を精度よく学習させるためには、多数の対象物の良品の画像(以下「良品画像」という)が必要となる。しかしながら、多数の対象物の画像を含む学習用のデータセットを準備する際に、不良品の画像(以下「不良品画像」という)が混入する恐れがある。そこで、この情報処理装置120は、不良品画像が混入している可能性がある学習用のデータセットを用いて、学習用のデータセットに含まれる複数の学習用画像から不適切な不良品画像を除去する学習用データ処理部30を有する。
The
本実施形態では、検査装置の一部である欠陥検出部50と、欠陥検出部50を構築するための第1学習部20、学習用データ処理部30および第2学習部40が同じ情報処理装置120内に含まれているが、本発明はこれに限られない。第1学習部20、学習用データ処理部30および第2学習部40は、検査装置10に備えられていることは必須ではなく、別のコンピュータに備えられていてもよい。
In the present embodiment, the
第1学習部20は、学習用データ処理部30の後述する第1学習モデルM1の学習を行う。具体的には、第1学習部20は、第1学習モデルM1に対して、教師なし学習を行う。
The
学習用データ処理部30は、学習用のデータセットに含まれる複数の学習用画像から不適切な画像を除去する学習用データ処理装置の一例である。学習用データ処理部30は、第2学習部40が欠陥検出部50の後述する第2学習モデルM2の学習を行う際に用いられる学習用のデータセットD30に対して処理を行う。
The learning
学習用データ処理部30は、第1学習モデルM1、第1学習済データD1、第1画像再構成部31、異常度算出部32およびデータクレンジング部33を有する。第1学習モデルM1および第1学習済データD1は、記憶部125に保存されている。第1画像再構成部31、異常度算出部32およびデータクレンジング部33は、プロセッサ121がプログラムPに従って動作することにより実現される機能である。
The learning
第1学習モデルM1は、画像を入力とし、画像を出力とする学習モデルである。第1学習モデルM1は、例えば、ニューラルネットワークを用いたオートエンコーダ、または、変分オートエンコーダ(Variational Autoencoder)である。 The first learning model M1 is a learning model that inputs an image and outputs an image. The first learning model M1 is, for example, an autoencoder using a neural network or a variational autoencoder (Variational Autoencoder).
第1学習済データD1は、第1学習部20が第1学習モデルM1に対して学習を行うことにより得られた学習済データである。第1学習部20は、機械学習によって第1学習済データD1を生成し、記憶部125に記憶させる。
The first learned data D1 is learned data obtained by the
具体的には、第1学習済データD1は、学習用の対象物の画像である複数の標本画像D20を第1学習モデルM1に入力し、入力された標本画像D20の再構成画像を出力するように学習させた学習済データである。 Specifically, the first trained data D1 inputs a plurality of sample images D20, which are images of objects for training, into the first learning model M1 and outputs a reconstructed image of the input sample image D20. It is the trained data trained in this way.
複数の標本画像D20は、複数の対象物90をカメラ110で撮像することによって得られる画像である。このとき、複数の標本画像D20は、全て良品の画像であることが好ましい。しかしながら、現実的な準備の観点から、第1学習部20が第1学習モデルM1の学習に用いる複数の標本画像D20と、学習用データ処理部30がデータクレンジング処理を行う対象となるデータセットD30に含まれる複数の学習用画像とは、同じものを用いる。すなわち、第1学習済データD1は、データセットD30に含まれる複数の学習用画像を標本画像D20として入力して学習させた学習済データである。
The plurality of sample images D20 are images obtained by capturing a plurality of
第1学習済データD1を適用した第1学習モデルM1(以下「学習済第1学習モデルL1」と称する)は、標本画像D20を入力とし、入力された標本画像の再構成画像を出力するように動作する。学習に用いられる複数の標本画像D20の大部分は良品の画像であるため、学習済第1学習モデルL1に良品の画像が入力された場合、出力される再構成画像の再現度が高いのに対して、学習済第1学習モデルL1に不良品の画像が入力された場合、出力される再構成画像の再現度が低くなる。 The first learning model M1 (hereinafter referred to as "learned first learning model L1") to which the first trained data D1 is applied receives the sample image D20 as an input and outputs a reconstructed image of the input sample image. Works on. Since most of the plurality of sample images D20 used for learning are non-defective images, when a non-defective image is input to the trained first learning model L1, the reproducibility of the output reconstructed image is high. On the other hand, when an image of a defective product is input to the trained first learning model L1, the reproducibility of the output reconstructed image becomes low.
第1画像再構成部31は、入力された画像の再構成画像を出力する。具体的には、第1画像再構成部31は、複数の学習用画像が含まれるデータセットD30を、学習済第1学習モデルL1へと入力し、データセットD30に含まれる複数の学習用画像のそれぞれの再構成画像を含む第1再構成画像D31を生成する処理を実行する。第1画像再構成部31は、学習済第1学習モデルL1から出力された第1再構成画像D31を、異常度算出部32へと引き渡す。
The first
異常度算出部32は、データセットD30に含まれる学習用画像のそれぞれについて異常度を示すスコアを算出する。図4に示すように、異常度算出部32は、第1差分画像生成部321と、スコア算出部322とを有する。
The abnormality
第1差分画像生成部321は、第1画像再構成部31へ入力されたデータセットD30に含まれる複数の学習用画像のそれぞれと、第1画像再構成部31から出力された第1再構成画像D31のそれぞれとについて、差分を取り、差分画像D321を生成する。
The first difference
スコア算出部322は、差分画像D321に基づいて、データセットD30に含まれる学習用画像のそれぞれについて、異常度を示すスコアを算出する。スコアは、例えば、差分画像D321の全ての画素についての輝度の合計値である。そして、スコア算出部322は、データセットD30の学習用画像毎のスコアを全て含むスコアデータD32をデータクレンジング部33へと引き渡す。
The
データクレンジング部33は、異常度算出部32の算出したスコアに基づいて、データセットD30から不適切な学習用画像を除去する。データクレンジング部33は、閾値算出部331と、不良品データ除去部332とを有する。
The
閾値算出部331は、スコアデータD32に含まれる全スコアに基づいて、良品の範囲を示す閾値D33を算出する。本実施形態では、閾値算出部331は、スコアデータD32に含まれるスコアを統計的に処理し、その結果に基づいて閾値D33を算出する。不良品データ除去部332は、閾値D33に基づいて、データセットD30から、良品の範囲に含まれない学習用画像を除去した処理済データセットD40を生成する。
The threshold
第2学習部40は、図3に示すように、欠陥検出部50の後述する第2学習モデルM2の学習を行う。具体的には、学習用データ処理部30によって不適切な学習用画像が除去された処理済データセットD40を用いて、欠陥検出部50の第2学習モデルM2の学習を行う。
As shown in FIG. 3, the
欠陥検出部50は、対象物90をカメラ110で撮像することによって得られた対象物画像に基づいて、対象物90の欠陥を検出する。欠陥検出部50は、第2学習モデルM2と、第2学習済データD2と、第2画像再構成部51と、第2差分画像生成部52と、欠陥検出処理部53とを有する。第2学習モデルM2および第2学習済データD2は、記憶部125に保存されている。第2画像再構成部51、第2差分画像生成部52および欠陥検出処理部53は、プロセッサ121がプログラムPに従って動作することにより実現される機能である。
The
第2学習モデルM2は、画像を入力とし、画像を出力とする学習モデルである。第2学習モデルM2は、例えば、ニューラルネットワークを用いたオートエンコーダ、または、変分オートエンコーダ(Variational Autoencoder)である。第1学習モデルM1と、第2学習モデルM2とは、全く同じ学習モデルが用いられてもよいし、異なる学習モデルが用いられてもよい。例えば、第1学習モデルM1と、第2学習モデルM2とに、同じオートエンコーダが用いられてもよいし、層数や入出力パラメータ数の異なるオートエンコーダが用いられてもよい。 The second learning model M2 is a learning model that inputs an image and outputs an image. The second learning model M2 is, for example, an autoencoder using a neural network or a variational autoencoder (Variational Autoencoder). Exactly the same learning model may be used for the first learning model M1 and the second learning model M2, or different learning models may be used. For example, the same autoencoder may be used for the first learning model M1 and the second learning model M2, or autoencoders having different numbers of layers and input / output parameters may be used.
第2学習済データD2は、第2学習部40が第2学習モデルM2に対して学習を行うことにより得られた学習済データである。第2学習部40は、機械学習によって第2学習済データD2を生成し、記憶部125に記憶させる。
The second learned data D2 is learned data obtained by the
具体的には、第2学習済データD2は、処理済データセットD40を第2学習モデルM2に入力し、入力された処理済データセットD40に含まれる学習用画像の再構成画像を出力するように学習させた学習済データである。 Specifically, the second trained data D2 inputs the processed data set D40 into the second learning model M2, and outputs a reconstructed image of the training image included in the input processed data set D40. It is the trained data trained by.
第2学習済データD2を適用した第2学習モデルM2(以下「学習済第2学習モデルL2」と称する)は、処理済データセットD40に含まれる学習用画像を入力し、入力された学習用画像の再構成画像を出力するように動作する。学習に用いられる処理済データセットD40に含まれる学習用画像は、学習用データ処理部30のデータクレンジング処理により、良品画像である確率が非常に高まっている。このため、学習済第2学習モデルL2は、入力画像が良品画像である場合も、入力画像が不良品画像である場合も、再構成画像として良品に近い画像を出力する。
The second learning model M2 (hereinafter referred to as “learned second learning model L2”) to which the second trained data D2 is applied inputs a learning image included in the processed data set D40, and is used for input learning. Image reconstruction Operates to output an image. The learning image included in the processed data set D40 used for learning has a very high probability of being a good image due to the data cleansing process of the learning
第2画像再構成部51は、入力された画像の再構成画像を出力する。具体的には、第2画像再構成部51には、欠陥検査を行うべき対象物90をカメラ110で撮像することによって得られた対象物画像D50が入力される。そして、第2画像再構成部51は、対象物画像D50を学習済第2学習モデルL2へと入力し、学習済第2学習モデルL2によって再構成された第2再構成画像D51を第2差分画像生成部52へと引き渡す。
The second
第2差分画像生成部52は、第2画像再構成部51へ入力された対象物画像D50と、第2画像再構成部51から出力された第2再構成画像D51について、差分を取り、第2差分画像D52を生成する。
The second difference
欠陥検出処理部53は、第2差分画像D52に基づいて欠陥の有無を検出し、欠陥の有無を検査結果D60として出力する。
The defect
プロセッサ121は、欠陥検出処理部53によって出力される検査結果D60を、表示部129に表示してもよい。
The
<1−2.第1学習処理>
第1学習部20が行う第1学習処理S10について、図5を参照しつつ説明する。図5は、本実施形態の第1学習処理S10の流れを示すフローチャートである。第1学習処理S10では、第1学習モデルM1を用いて、入力画像の再構成画像を出力するためのパラメータ等である第1学習済データD1を生成する。
<1-2. 1st learning process>
The first learning process S10 performed by the
図5に示すように、情報処理装置120は、まず、複数の標本画像D20を準備する準備工程を行う(ステップS11)。具体的には、プロセッサ121は、複数の対象物90をカメラ110で撮像することによって、複数の標本画像D20を取得する。そして、プロセッサ121は、取得した複数の標本画像D20を記憶部125に記憶させる。
As shown in FIG. 5, the
この複数の標本画像D20が、処理前のデータセットD30としても用いられる。このとき、準備される複数の対象物90の大部分が良品であるが、まれに不良品が混入している場合がある。このため、複数の標本画像D20には、ごく一部分に不良品が混入している虞がある。
The plurality of sample images D20 are also used as the data set D30 before processing. At this time, most of the plurality of
準備工程S11が完了すると、第1学習部20は、準備工程S11で取得した複数の標本画像D20の一部(例えば100枚分の画像)を小データセットとして、第1学習モデルM1に入力して第1学習済データD1を生成する、第1学習工程を実行する(ステップS12)。なお、「学習済データを生成する」の用語は、既に生成された学習済データを更新することを含む。
When the preparation step S11 is completed, the
具体的には、第1学習工程S12では、第1学習部20は、小データセットを学習済第1学習モデルL1(第1回の第1学習工程S12では第1学習モデルM1)に入力し、再構成画像を生成する。そして、入力した画像と再構成画像とがどの程度近似しているかの評価指標を算出する。評価指標には、例えば、入力された標本画像と出力された再構成画像との差分(誤差)の2乗和が用いられる。その後、算出した評価指標に基づいて、バックプロパゲーションにより、第1学習モデルM1を構成するニューラルネットの重み付けのパラメータ等を含む第1学習済データD1を更新する。
Specifically, in the first learning process S12, the
続いて、第1学習部20は、第1学習モデルM1の学習が終了したか否かを判断する(ステップS13)。具体的には、直前の第1学習工程S12で算出された評価指標が、所定の範囲内に収束したか否かを判断する。すなわち、直前の第1学習工程S12で生成された第1学習済データD1を適用した第1学習モデルM1が、標本画像に近似した再構成画像を所望の精度で生成しているか否かを判断する。具体的には、例えば、第1学習工程S12で算出された評価指標が所定の閾値よりも小さい場合、第1学習モデルM1の学習が終了したと判断する。なお、ステップS13において、全ての標本画像D20についての学習が所定の回数終了した場合にも、学習が終了したと判断してもよい。
Subsequently, the
ステップS13において、第1学習モデルM1の学習が終了していないと判断すると(ステップS13:No)、プロセッサ121は、第1学習工程S12に戻り、次の小データセットについて学習を行う。
If it is determined in step S13 that the learning of the first learning model M1 has not been completed (step S13: No), the
ステップS13において第1学習モデルM1の学習が終了したと判断すると(ステップS13:Yes)、プロセッサ121は、第1学習部20が生成した第1学習済データD1を記憶部125に保存する保存工程を実行する(ステップS14)。
When it is determined in step S13 that the learning of the first learning model M1 is completed (step S13: Yes), the
図6は、本実施形態の第1学習済データD1を適用した第1学習モデルM1、すなわち、学習済第1学習モデルL1に対して、良品画像G11を入力した様子を概念的に示す図である。図7は、学習済第1学習モデルL1に対して、不良品画像G12を入力した様子を概念的に示す図である。 FIG. 6 is a diagram conceptually showing a state in which a non-defective image G11 is input to the first learning model M1 to which the first learned data D1 of the present embodiment is applied, that is, the trained first learning model L1. be. FIG. 7 is a diagram conceptually showing a state in which the defective product image G12 is input to the trained first learning model L1.
図6および図7に示すように、第1学習モデルM1は、具体的には、エンコーダとデコーダとを有するニューラルネットワークである。エンコーダは、入力画像を次元圧縮することにより潜在変数を求める。デコーダは、潜在変数から元の入力画像を再現する。なお、図6において示される第1学習モデルM1の入力層および出力層の要素数や、隠れ層の数は、一例に過ぎず、これに限られない。 As shown in FIGS. 6 and 7, the first learning model M1 is specifically a neural network having an encoder and a decoder. The encoder finds the latent variable by dimensionally compressing the input image. The decoder reproduces the original input image from the latent variables. The number of elements of the input layer and the output layer of the first learning model M1 shown in FIG. 6 and the number of hidden layers are merely examples, and are not limited thereto.
図6に示すように、学習済第1学習モデルL1に欠陥の無い対象物90を撮像した良品画像G11を入力した場合、学習済第1学習モデルL1から出力される再構成画像G21は、比較的再現度が高い。すなわち、再構成画像G21は、入力した良品画像G11との差分が小さい。これに対し、図7に示すように、学習済第1学習モデルL1に欠陥部分91を有する対象物90を撮像した不良品画像G12を入力した場合、学習済第1学習モデルL1から出力される再構成画像G22は、不良品の欠陥部分91を十分に再現しない。すなわち、再構成画像G22は、入力した不良品画像G12との差分が大きい。欠陥部分91は、例えば、対象物90に付着した汚れまたは異物、欠け等である。
As shown in FIG. 6, when a non-defective image G11 in which a defect-
<1−3.データクレンジング処理>
次に、学習用データ処理部30が行うデータクレンジング処理S20について、図8を参照しつつ説明する。図8は、本実施形態のデータクレンジング処理S20の流れを示すフローチャートである。データクレンジング処理S20は、学習済第1学習モデルL1を用いて、学習用のデータセットD30に含まれる複数の学習用画像から不適切な画像を除去するデータ処理である。
<1-3. Data cleansing process>
Next, the data cleansing process S20 performed by the learning
図8に示すように、情報処理装置120は、まず、処理前のデータセットD30を準備する準備工程を行う(ステップS21)。具体的には、本実施形態において、処理前のデータセットD30に含まれる複数の学習用画像は第1学習処理S10で用いられた複数の標本画像D20と同じものであるため、プロセッサ121は、記憶部125から複数の標本画像D20を処理前のデータセットD30として読み出す。
As shown in FIG. 8, the
次に、第1画像再構成部31は、準備工程S21によって得られたデータセットD30の各学習用画像から学習済第1学習モデルL1を用いて第1再構成画像D31を生成する、第1画像再構成工程を行う(ステップS22)。具体的には、第1画像再構成部31は、データセットD30に含まれる学習用画像を学習済第1学習モデルL1に入力し、その出力である第1再構成画像D31を取得する。そして、プロセッサ121は、取得した第1再構成画像D31を記憶部125に記憶させる。
Next, the first
続いて、第1差分画像生成部321は、記憶部125に記憶されたデータセットD30の学習用画像と、第1画像再構成工程S22で当該学習用画像から生成された第1再構成画像D31とから第1差分画像D321を生成する第1差分画像生成工程を行う(ステップS23)。具体的には、学習用画像の各画素の輝度と、第1再構成画像D31の各画素の輝度との差分をとることにより、第1差分画像D321を生成する。そして、プロセッサ121は、取得した第1差分画像D321を記憶部125に記憶させる。
Subsequently, the first difference
ここで、図9および図10は、本実施形態に係るデータクレンジング処理の各段階で得られる画像の例を示した図である。なお、図9における学習用画像G31は、対象物90が良品である場合の画像であるのに対し、図10における学習用画像G32は、対象物90が欠陥部分91を有する不良品である場合の画像である。図11は、図9および図10に示す第1差分画像G51,G52を拡大して示した図である。
Here, FIGS. 9 and 10 are diagrams showing examples of images obtained at each stage of the data cleansing process according to the present embodiment. The learning image G31 in FIG. 9 is an image when the
対象物90が良品である場合、図9に示すように、第1画像再構成工程S22で入力される学習用画像G31と、第1画像再構成工程S22で生成される第1再構成画像G41とが、近似した画像となる。すなわち、この場合、第1再構成画像G41の各画素の輝度は、学習用画像G31の各画素の輝度と近似する。このため、図9に示すように、第1差分画像G51は、近似した画像の輝度が相殺され、各画素の輝度が小さい画像となる。
When the
一方、対象物90が不良品である場合、図10に示すように、第1画像再構成工程S22で入力される学習用画像G32には、欠陥部分91が現れている。このような場合、前述の通り、欠陥部分91を含む学習用画像G32から生成された第1再構成画像G42は、学習用画像G32から欠陥部分91が除かれたような画像となる。
On the other hand, when the
したがって、第1差分画像G52のうち、対象物90の正常な部分については、学習用画像G32と近似した画像の輝度が相殺され、各画素の輝度が小さい。一方、第1差分画像G42のうち、欠陥部分91については、学習用画像G32と第1再構成画像G42の輝度の差が大きいため、当該部分の輝度は、正常な部分に比べて大きくなる。したがって、図10に示すように、第1差分画像G52において欠陥部分91は白っぽく表示されている。このように、第1差分画像G52を得ることにより、欠陥部分91を特異的に抽出することができる。
Therefore, in the normal portion of the
その後、データセットD30に含まれる学習用画像のそれぞれについて、スコア算出部322が異常度を示すスコアを算出するスコア算出工程を行う(ステップS24)。本実施形態において、スコアは、差分画像D321のすべての画素についての輝度の合計値である。そして、スコア算出部322は、データセットD30の学習用画像毎のスコアをすべて含むスコアデータD32をデータクレンジング部33の閾値算出部331へと引き渡す。
After that, for each of the learning images included in the data set D30, the
閾値算出部331は、スコアデータD32に含まれる全スコアに基づいて、良品の範囲を示す閾値D33を算出する閾値算出工程を行う(ステップS25)。本実施形態の閾値算出部331は、スコアデータD32に含まれる全スコアを統計処理し、その処理結果に基づいて閾値D33を算出する。
The threshold
図12は、スコアデータD32の一例に含まれるスコアをヒストグラムで表示した図である。図12において、横軸はスコアの値であり、縦軸は各スコアにおけるデータ数である。 FIG. 12 is a diagram showing a histogram of scores included in an example of score data D32. In FIG. 12, the horizontal axis is the score value, and the vertical axis is the number of data in each score.
本実施形態では、上述のように、差分画像D321において、対象物90の欠陥部分91の輝度が大きくなる。このため、良品の差分画像D321におけるスコアはおおよそ正規分布となり、不良品の差分画像D321におけるスコアは良品のスコアに比べて大きい値を取る。したがって、スコアデータD32に含まれる全スコアの度数分布において、図12に示すように、正規分布の右裾(スコアが大きい方)が長い度数分布が得られる。
In the present embodiment, as described above, in the difference image D321, the brightness of the
このようなスコアデータD32に対して、閾値算出部331は、閾値算出工程S25において、スコアの平均値Sや標準偏差σ等の値を求める統計処理を行う。そして、閾値算出部331は、良品の範囲を示す閾値D33を算出する。閾値D33には、良品の下限値を示す第1閾値Th1と、良品のスコア上限値を示す第2閾値Th2とを含む。
For such score data D32, the threshold
本実施形態では、第1閾値Th1および第2閾値Th2は、スコアの平均値Sおよび標準偏差σを基準として、以下のように算出される。
Th1=S―3*σ
Th2=S+3*σ
In the present embodiment, the first threshold value Th1 and the second threshold value Th2 are calculated as follows with reference to the average value S of the scores and the standard deviation σ.
Th1 = S-3 * σ
Th2 = S + 3 * σ
なお、本実施形態の閾値算出部331は、統計処理を行って閾値D33を算出したが、本発明はこれに限られない。閾値算出部331は、予め指定された枚数分の差分画像D321をスコアの大きい順に選択し、これらの差分画像D321が排除されるように閾値D33を設定してもよい。また、閾値算出部331は、良品のスコア下限値である第1閾値Th1を設けず、良品のスコア上限値である第2閾値Th2をスコアの平均値Sの定数倍として算出してもよい。閾値算出部331の閾値D33の算出方法はこれらに限られず、対象物90の種類や目的等の条件に応じて、適宜選択され得る。
The threshold
最後に、不良品データ除去部332は、閾値D33に基づいて、データセットD30から、良品の範囲に含まれない学習用画像を除去する不良品データ除去工程を行う(ステップS26)。具体的には、不良品データ除去部332は、第1閾値Th1よりも小さいスコアを有する差分画像D321に対応する学習用画像と、第2閾値Th2よりも大きいスコアを有する差分画像D321に対応する学習用画像とを、データセットD30から除去し、処理済データセットD40を生成する。そして、プロセッサ121は、生成された処理済データセットD40を記憶部125に記憶させる。
Finally, the defective product
このデータクレンジング処理S20によって、処理前のデータセットD30から不良品画像が除去された処理済データセットD40が生成される。この処理済データセットD40を用いて、欠陥検出に用いられる第2学習モデルM2の学習を行うことにより、第2学習モデルM2の機械学習の精度を高めることができる。 The data cleansing process S20 generates a processed data set D40 in which defective images are removed from the data set D30 before processing. By learning the second learning model M2 used for defect detection using this processed data set D40, the accuracy of machine learning of the second learning model M2 can be improved.
<1−4.第2学習処理>
第2学習部40が行う第2学習処理S30について、図13を参照しつつ説明する。図13は、本実施形態の第2学習処理S30の流れを示すフローチャートである。第2学習処理S30では、第2学習モデルM2を用いて、入力画像の再構成画像を出力するためのパラメータ等である第2学習済データD2を生成する。
<1-4. Second learning process>
The second learning process S30 performed by the
図13に示すように、情報処理装置120は、まず、処理済データセットD40を準備する準備工程を行う(ステップS31)。具体的には、プロセッサ121は、記憶部125に記憶された処理済データセットD40を読み出す。
As shown in FIG. 13, the
準備工程S31が完了すると、第2学習部40は、準備工程S31で取得した処理済データセットD40に含まれる複数の学習用画像の一部(例えば100枚分の画像)を小データセットとして、第2学習モデルM2に入力して第2学習済データD2を生成する、第2学習工程を実行する(ステップS32)。本実施形態の第2学習工程S32は、第1学習処理S10の第1学習工程S12と同様に行われる。
When the preparation step S31 is completed, the
続いて、第2学習部40は、第2学習モデルM2の学習が終了したか否かを判断する(ステップS33)。本実施形態のステップS33は、第1学習処理S10のステップS13と同様に行われる。
Subsequently, the
ステップS33において、第2学習モデルM2の学習が終了していないと判断すると(ステップS33:No)、プロセッサ121は、第2学習工程S32に戻り、次の小データセットについて学習を行う。
If it is determined in step S33 that the learning of the second learning model M2 has not been completed (step S33: No), the
ステップS33において第2学習モデルM2の学習が終了したと判断すると(ステップS33:Yes)、プロセッサ121は、第2学習部40が生成した第2学習済データD2を記憶部125に保存する保存工程を実行する(ステップS34)。
When it is determined in step S33 that the learning of the second learning model M2 is completed (step S33: Yes), the
このように、第1学習処理S10と同様の手順で第2学習処理S30を行うことにより、学習済第2学習モデルL2は、学習済第1学習モデルL1と同様に、入力画像に基づいて、欠陥部分を十分に再現しない再構成画像を出力する学習モデルとして学習させることができる。このとき、第2学習処理S30では、第1学習処理S10で学習に用いられた処理前のデータセットS30よりも不良品の混入率の低い処理済データセットD40を用いて機械学習を行うことができる。これにより、学習済第2学習モデルL2は、より精度よく学習を行うことができる。 In this way, by performing the second learning process S30 in the same procedure as the first learning process S10, the trained second learning model L2 is based on the input image as in the trained first learning model L1. It can be trained as a learning model that outputs a reconstructed image that does not sufficiently reproduce the defective part. At this time, in the second learning process S30, machine learning can be performed using the processed data set D40 having a lower mixing rate of defective products than the pre-processed data set S30 used for learning in the first learning process S10. can. As a result, the trained second learning model L2 can perform learning more accurately.
<1−5.欠陥検出処理>
最後に、欠陥検出部50における学習済第2学習モデルL2を用いた欠陥検出処理S40について、図14を参照しつつ説明する。この欠陥検出処理S40では、対象物90を撮像して得られた対象物画像D50に基づいて、対象物90の欠陥を検出する。図14は、本実施形態の欠陥検出部50における欠陥検出処理の流れを示すフローチャートである。
<1-5. Defect detection process>
Finally, the defect detection process S40 using the trained second learning model L2 in the
図14に示すように、情報処理装置120は、まず、検査対象となる対象物90を撮影して、対象物画像D50を取得する撮像工程を行う(ステップS41)。具体的には、プロセッサ121は、カメラ110を用いて、検査対象である対象物を撮像することによって、対象物画像D50を取得する。そして、プロセッサ121は、取得した対象物画像D50を記憶部125に記憶させる。
As shown in FIG. 14, the
次に、第2画像再構成部51は、撮像工程S41によって得られた対象物画像D50から学習済第2学習モデルL2を用いて第2再構成画像D51を生成する、第2画像再構成工程を実行する(ステップS42)。具体的には、第2画像再構成部51は、対象物画像D50を、第2学習済データD2を適用した第2学習モデルM2に入力し、その出力である第2再構成画像D51を取得する。そして、プロセッサ121は、取得した第2再構成画像D51を記憶部125に記憶させる。
Next, the second
続いて、第2差分画像生成部52は、記憶部125に記憶された対象物画像D50および第2再構成画像D51から第2差分画像D52を生成する、第2差分画像生成工程を実行する(ステップS43)。具体的には、第2差分画像生成部52は、対象物画像D50の各画素の輝度と、第2再構成画像D51の各画素の輝度との差分を取ることにより、第2差分画像D52を生成する。そして、プロセッサ121は、生成された第2差分画像D52を記憶部125に記憶させる。
Subsequently, the second difference
最後に、欠陥検出処理部53は、第2差分画像D52に基づいて、対象物90に欠陥が有るか否かを判断する、欠陥検出工程を実行する(ステップS44)。上述のように、第2差分画像D52において、対象物90の欠陥部分91は輝度が大きい領域となる。この特徴を用いて、欠陥検出処理部53は、対象物90に欠陥が有るか否かを判断する。具体的な判断方法は、適宜、選択し得る。そして、欠陥検出処理部53は、欠陥検出の有無を検査結果D60として出力する。
Finally, the defect
<2.第2実施形態>
図15は、第2実施形態の情報処理装置120Aが備える機能的な構成を示す図である。図15に示す情報処理装置120Aは、第1実施形態と異なる構成である第1学習部20Aおよび学習用データ処理部30Aと、第1実施形態と同様の構成である第2学習部40および欠陥検出部50とを有する。なお、図15中、第1実施形態と同様の構成については、同じ符号を付している。
<2. Second Embodiment>
FIG. 15 is a diagram showing a functional configuration included in the
第1学習部20Aは、学習用データ処理部30Aの後述する第1学習モデルM1Aの学習を行う。具体的には、第1学習部20Aは、第1学習モデルM1Aに対して、教師なし学習を行う。
The
学習用データ処理部30Aは、学習用のデータセットに含まれる複数の学習用画像から不適切な画像を除去する学習用データ処理装置の一例である。学習用データ処理部30Aは、第1学習モデルM1A、第1学習済データD1A、異常度算出部32Aおよびデータクレンジング部33Aを有する。
The learning
第1学習モデルM1Aは、One Class SVM(One Class Support Vector Machine)である。One Class SVMは、分類(Classification)を行うことにより、外れ値検知を行うことができる。なお、第1学習モデルM1Aは、One Classニューラルネットワークをはじめとする、その他の教師なし学習を行う機械学習モデルであってもよい。 The first learning model M1A is a One Class SVM (One Class Support Vector Machine). One Class SVM can detect outliers by performing classification. The first learning model M1A may be another machine learning model that performs unsupervised learning, such as a One Class neural network.
第1学習済データD1Aは、第1学習部20Aが第1学習モデルM1Aに対して学習を行うことにより得られた学習済データである。第1学習部20Aは、機械学習によって第1学習済データD1Aを生成する。
The first learned data D1A is learned data obtained by the
具体的には、第1学習済データD1Aは、学習用の対象物の画像である複数の標本画像D20を第1学習モデルM1Aに入力し、特徴量を算出することにより、適切に外れ値検知を行うように学習させた学習済データである。 Specifically, the first trained data D1A appropriately detects outliers by inputting a plurality of sample images D20, which are images of objects for training, into the first learning model M1A and calculating the feature amount. It is the trained data trained to perform.
第1学習済データD1Aを適用した第1学習モデルM1A(以下「学習済第1学習モデルL1A」と称する)は、標本画像D20を入力とし、入力された標本画像が外れ値であるか否かをスコアとして出力する。 The first learning model M1A (hereinafter referred to as "trained first learning model L1A") to which the first trained data D1A is applied receives the sample image D20 as an input, and whether or not the input sample image is an outlier. Is output as a score.
異常度算出部32Aは、データセットD30に含まれる学習用画像のそれぞれを学習済第1学習モデルL1Aに入力し、それぞれの学習用画像に対するスコアを取得する。そして、異常度算出部32Aは、データセットD30の学習用画像毎のスコアを全て含むスコアデータD32Aをデータクレンジング部33Aへと引き渡す。
The abnormality
データクレンジング部33Aは、異常度算出部32Aの算出したスコアに基づいて、データセットD30から不適切な学習用画像を除去する。すなわち、データクレンジング部33Aは、予め学習済第1学習モデルL1Aが外れ値と判断した学習用画像を、データセットD30から除去した処理済データセットD40Aを出力する。
The data cleansing unit 33A removes an inappropriate learning image from the data set D30 based on the score calculated by the abnormality
<3.変形例>
以上、実施形態について説明してきたが、本発明は上記のようなものに限定されるものではなく、様々な変形および組み合わせが可能である。
<3. Modification example>
Although the embodiments have been described above, the present invention is not limited to the above, and various modifications and combinations are possible.
この発明は詳細に説明されたが、上記の説明は、すべての局面において、例示であって、この発明がそれに限定されるものではない。例示されていない無数の変形例が、この発明の範囲から外れることなく想定され得るものと解される。上記各実施形態および各変形例で説明した各構成は、相互に矛盾しない限り適宜組み合わせたり、省略したりすることができる。 Although the present invention has been described in detail, the above description is exemplary in all aspects and the invention is not limited thereto. It is understood that innumerable variations not illustrated can be assumed without departing from the scope of the present invention. The configurations described in the above embodiments and the modifications can be appropriately combined or omitted as long as they do not conflict with each other.
10 検査装置
20,20A 第1学習部
31 第1画像再構成部
32,32A 異常度算出部
33,33A データクレンジング部
40 第2学習部
50 欠陥検出部
90 対象物
321 第1差分画像生成部
322 スコア算出部
331 閾値算出部
332 不良品データ除去部
D1,D1A 第1学習済データ
D2 第2学習済データ
D20 標本画像
D30 データセット
D31 第1再構成画像
D32,D32A スコアデータ
D321 第1差分画像
D33 閾値
D40,D40A 処理済データセット
L1,L1A 学習済第1学習モデル
L2 学習済第2学習モデル
M1,M1A 第1学習モデル
M2 第2学習モデル
P プログラム
10
Claims (11)
前記学習用画像のそれぞれについて異常度を示すスコアを算出する異常度算出部と、
前記スコアに基づいて、前記データセットから不適切な前記学習用画像を除去するデータクレンジング部と、
を有する、学習用データ処理装置。 A training data processing device that removes inappropriate images from a plurality of training images included in a training data set.
An abnormality degree calculation unit that calculates a score indicating an abnormality degree for each of the learning images, and an abnormality degree calculation unit.
A data cleansing unit that removes inappropriate training images from the data set based on the score.
A data processing device for learning.
入力された画像の再構成画像を出力する第1画像再構成部
をさらに有し、
前記異常度算出部は、
前記第1画像再構成部へ入力された前記学習用画像と前記第1画像再構成部から出力された前記再構成画像との差分画像を生成する第1差分画像生成部と、
前記第1差分画像生成部において生成された前記差分画像に基づいて、前記スコアを算出するスコア算出部と、
を含み、
前記データクレンジング部は、
全ての前記学習用画像について前記異常度算出部が算出した前記スコアに基づいて、良品の範囲を示す閾値を算出する閾値算出部と、
前記閾値算出部の算出した前記閾値に基づいて、前記データセットから、良品の範囲に含まれない前記学習用画像を除去する不良品データ除去部と、
を含む、学習用データ処理装置。 The learning data processing device according to claim 1.
Reconstruction of the input image Further having a first image reconstruction unit for outputting an image,
The abnormality degree calculation unit
A first difference image generation unit that generates a difference image between the learning image input to the first image reconstruction unit and the reconstruction image output from the first image reconstruction unit.
A score calculation unit that calculates the score based on the difference image generated by the first difference image generation unit, and a score calculation unit.
Including
The data cleansing unit
A threshold value calculation unit that calculates a threshold value indicating the range of non-defective products based on the score calculated by the abnormality degree calculation unit for all the learning images.
Based on the threshold value calculated by the threshold value calculation unit, a defective product data removal unit that removes the learning image not included in the non-defective product range from the data set, and a defective product data removal unit.
Data processing equipment for learning, including.
画像を入力および出力とする第1学習モデルと、
複数の標本画像を前記第1学習モデルに入力し、入力された前記標本画像の再構成画像を出力するように学習させた第1学習済データと、
をさらに有し、
前記第1画像再構成部は、
入力画像を、前記第1学習済データを適用した前記第1学習モデルに入力して、前記入力画像の再構成画像を生成する、学習用データ処理装置。 The learning data processing device according to claim 2.
The first learning model that inputs and outputs images,
The first trained data in which a plurality of sample images are input to the first training model and trained to output a reconstructed image of the input sample images, and
Have more
The first image reconstruction unit is
A training data processing device that inputs an input image to the first learning model to which the first trained data is applied to generate a reconstructed image of the input image.
前記第1学習済データは、前記データセットに含まれる複数の学習用画像を前記標本画像として入力して学習させた学習済データである、学習用データ処理装置。 The learning data processing device according to claim 3.
The first trained data is a training data processing device which is trained data obtained by inputting a plurality of training images included in the data set as the sample images and training them.
前記第1学習モデルに教師なし学習を行うことにより第1学習済データを生成する第1学習部
を有する、学習用データ処理装置。 The learning data processing device according to claim 3 or 4.
A learning data processing device having a first learning unit that generates first learned data by performing unsupervised learning on the first learning model.
画像を入力とし、特徴量であるスコアを出力とする第1学習モデルと、
複数の標本画像を前記第1学習モデルに入力し、入力された前記標本画像の外れ値検知を行った結果を前記スコアとして出力するように学習させた第1学習済データと、
をさらに有し、
前記異常度算出部は、
入力画像を、前記第1学習済データを適用した前記第1学習モデルに入力して、前記スコアを取得する、学習用データ処理装置。 The learning data processing device according to claim 1.
The first learning model that inputs an image and outputs a score that is a feature,
The first trained data obtained by inputting a plurality of sample images into the first training model and training the input results of outlier detection of the sample images to be output as the score.
Have more
The abnormality degree calculation unit
A training data processing device that inputs an input image into the first learning model to which the first trained data is applied and acquires the score.
学習用のデータセットに含まれる複数の学習用画像から不適切な画像を除去する、請求項1ないし請求項6のいずれかに記載の学習用データ処理装置と、
前記学習用データ処理装置によって不適切な画像が除去された処理済データセットを用いて学習を行う第2学習部と、
を有し、
前記第2学習部は、前記処理済データセットに含まれる複数の前記学習用画像を、画像を入力および出力とする第2学習モデルに入力し、前記第2学習モデルが入力された前記学習用画像の再構成画像を出力するように学習させた第2学習済データを生成する、学習装置。 It is a learning device for constructing an inspection device that inspects an object.
The learning data processing apparatus according to any one of claims 1 to 6, which removes inappropriate images from a plurality of learning images included in a learning data set.
A second learning unit that performs learning using a processed data set from which inappropriate images have been removed by the learning data processing device, and
Have,
The second learning unit inputs a plurality of the learning images included in the processed data set into a second learning model that inputs and outputs images, and the second learning model is input to the learning model. Image reconstruction A learning device that generates second trained data trained to output an image.
a)前記学習用画像のそれぞれについて異常度を示すスコアを算出する異常度算出工程と、
b)前記スコアに基づいて、前記データセットから不適切な前記学習用画像を除去するデータクレンジング工程と、
を有する、学習用データ処理方法。 A training data processing method that removes inappropriate images from multiple training images contained in a training dataset.
a) An abnormality degree calculation step of calculating a score indicating an abnormality degree for each of the learning images, and
b) A data cleansing step that removes inappropriate learning images from the dataset based on the score.
A data processing method for learning.
前記工程a)は、
a1)前記学習用画像の再構成を行う画像再構成工程と、
a2)前記工程a1)において入力された前記学習用画像と前記工程a1)において出力された前記再構成画像との差分画像を生成する第1差分画像生成工程と、
a3)前記工程a2)において生成された前記差分画像に基づいて、前記スコアを算出するスコア算出工程と、
を含み、
前記工程b)は、
b1)全ての前記学習用画像について前記工程a)において算出された前記スコアに基づいて、良品の範囲を示す閾値を算出する閾値算出工程と、
b2)前記工程b1)において算出された前記閾値に基づいて、前記データセットから、良品の範囲に含まれない前記学習用画像を除去する不良品データ除去工程と、
を含む、学習用データ処理方法。 The learning data processing method according to claim 8.
In step a),
a1) An image reconstruction step of reconstructing the learning image and
a2) A first difference image generation step of generating a difference image between the learning image input in the step a1) and the reconstructed image output in the step a1).
a3) A score calculation step of calculating the score based on the difference image generated in the step a2), and
Including
In step b),
b1) A threshold calculation step of calculating a threshold indicating the range of non-defective products based on the score calculated in the step a) for all the learning images.
b2) A defective product data removal step of removing the learning image not included in the range of non-defective products from the data set based on the threshold value calculated in the step b1).
Data processing methods for learning, including.
前記コンピュータに、
a)前記学習用画像のそれぞれについて異常度を示すスコアを算出する異常度算出工程と、
b)前記スコアに基づいて、前記データセットから不適切な前記学習用画像を除去するデータクレンジング工程と、
を実行させる、プログラム。 A program for causing a computer to perform training data processing for removing inappropriate images from a plurality of training images included in a training data set.
On the computer
a) An abnormality degree calculation step of calculating a score indicating an abnormality degree for each of the learning images, and
b) A data cleansing step that removes inappropriate learning images from the dataset based on the score.
A program that runs.
前記工程a)は、
a1)前記学習用画像の再構成を行う画像再構成工程と、
a2)前記工程a1)において入力された前記学習用画像と前記工程a1)において出力された前記再構成画像との差分画像を生成する第1差分画像生成工程と、
a3)前記工程a2)において生成された前記差分画像に基づいて、前記スコアを算出するスコア算出工程と、
を含み、
前記工程b)は、
b1)全ての前記学習用画像について前記工程a)において算出された前記スコアに基づいて、良品の範囲を示す閾値を算出する閾値算出工程と、
b2)前記工程b1)において算出された前記閾値に基づいて、前記データセットから、良品の範囲に含まれない前記学習用画像を除去する不良品データ除去工程と、
を含む、プログラム。
The program according to claim 10.
In step a),
a1) An image reconstruction step of reconstructing the learning image and
a2) A first difference image generation step of generating a difference image between the learning image input in the step a1) and the reconstructed image output in the step a1).
a3) A score calculation step of calculating the score based on the difference image generated in the step a2), and
Including
In step b),
b1) A threshold calculation step of calculating a threshold indicating the range of non-defective products based on the score calculated in the step a) for all the learning images.
b2) A defective product data removal step of removing the learning image not included in the range of non-defective products from the data set based on the threshold value calculated in the step b1).
Including the program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020076673A JP7414629B2 (en) | 2020-04-23 | 2020-04-23 | Learning data processing device, learning device, learning data processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020076673A JP7414629B2 (en) | 2020-04-23 | 2020-04-23 | Learning data processing device, learning device, learning data processing method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021174194A true JP2021174194A (en) | 2021-11-01 |
JP7414629B2 JP7414629B2 (en) | 2024-01-16 |
Family
ID=78279639
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020076673A Active JP7414629B2 (en) | 2020-04-23 | 2020-04-23 | Learning data processing device, learning device, learning data processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7414629B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP4216079A1 (en) * | 2022-03-25 | 2023-07-26 | Beijing Baidu Netcom Science Technology Co., Ltd. | Product recognition method, model training method, device and electronic device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018005773A (en) * | 2016-07-07 | 2018-01-11 | 株式会社リコー | Abnormality determination device and abnormality determination method |
JP2018112863A (en) * | 2017-01-11 | 2018-07-19 | 株式会社東芝 | Abnormality detecting device, abnormality detecting method, and abnormality detecting program |
JP2020035097A (en) * | 2018-08-28 | 2020-03-05 | 株式会社モルフォ | Image identification device, image identification method, and image identification program |
-
2020
- 2020-04-23 JP JP2020076673A patent/JP7414629B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018005773A (en) * | 2016-07-07 | 2018-01-11 | 株式会社リコー | Abnormality determination device and abnormality determination method |
JP2018112863A (en) * | 2017-01-11 | 2018-07-19 | 株式会社東芝 | Abnormality detecting device, abnormality detecting method, and abnormality detecting program |
JP2020035097A (en) * | 2018-08-28 | 2020-03-05 | 株式会社モルフォ | Image identification device, image identification method, and image identification program |
Non-Patent Citations (1)
Title |
---|
工藤 郁弥 外3名: "畳み込みオートエンコーダを用いた工業製品の不良検査", 電子情報通信学会技術研究報告 VOL.118 NO.492 [ONLINE], vol. 第118巻 第492号, JPN6023043231, 4 March 2019 (2019-03-04), JP, pages 31 - 36, ISSN: 0005179596 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP4216079A1 (en) * | 2022-03-25 | 2023-07-26 | Beijing Baidu Netcom Science Technology Co., Ltd. | Product recognition method, model training method, device and electronic device |
Also Published As
Publication number | Publication date |
---|---|
JP7414629B2 (en) | 2024-01-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7004145B2 (en) | Defect inspection equipment, defect inspection methods, and their programs | |
CN110428475B (en) | Medical image classification method, model training method and server | |
WO2023077404A1 (en) | Defect detection method, apparatus and system | |
JP7453813B2 (en) | Inspection equipment, inspection methods, programs, learning devices, learning methods, and learned datasets | |
JP7435303B2 (en) | Inspection device, unit selection device, inspection method, and inspection program | |
US11348349B2 (en) | Training data increment method, electronic apparatus and computer-readable medium | |
WO2021181749A1 (en) | Learning device, image inspection device, learned parameter, learning method, and image inspection method | |
US20220076404A1 (en) | Defect management apparatus, method and non-transitory computer readable medium | |
US20240095983A1 (en) | Image augmentation techniques for automated visual inspection | |
JP2021174194A (en) | Learning data processing device, learning device, learning data processing method, and program | |
CN113016023B (en) | Information processing method and computer-readable non-transitory recording medium | |
CN113763384B (en) | Defect detection method and defect detection device in industrial quality inspection | |
US20240005477A1 (en) | Index selection device, information processing device, information processing system, inspection device, inspection system, index selection method, and index selection program | |
JP7460391B2 (en) | LEARNING DEVICE, IMAGE INSPECTION DEVICE, PROGRAM, AND LEARNING METHOD | |
KR20230036650A (en) | Defect detection method and system based on image patch | |
JP7499337B2 (en) | Inspection system, learning method, inspection method, and storage medium | |
US20230005120A1 (en) | Computer and Visual Inspection Method | |
WO2023100474A1 (en) | System, image processing method, and program | |
US20230054119A1 (en) | Method and device with defect detection | |
JP7437610B2 (en) | Image inspection device, image inspection method, and trained model generation device | |
WO2021229901A1 (en) | Image inspection device, image inspection method, and prelearned model generation device | |
JP2023104488A (en) | Machine learning device, machine learning method, machine learning program, inspection device, inspection method, and inspection program | |
CN114820428A (en) | Image processing method and image processing apparatus | |
JP2023128940A (en) | Appearance analysis system, appearance analysis method, and program | |
JP2022182702A (en) | Evaluation program, evaluation method, and information processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20221219 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20231018 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20231024 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20231208 |
|
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: 20231226 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20231228 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7414629 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |