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 PDF

Info

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
Application number
JP2020076673A
Other languages
Japanese (ja)
Other versions
JP7414629B2 (en
Inventor
崇也 木村
Takaya Kimura
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Screen Holdings Co Ltd
Original Assignee
Screen Holdings Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Screen Holdings Co Ltd filed Critical Screen Holdings Co Ltd
Priority to JP2020076673A priority Critical patent/JP7414629B2/en
Publication of JP2021174194A publication Critical patent/JP2021174194A/en
Application granted granted Critical
Publication of JP7414629B2 publication Critical patent/JP7414629B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

To provide a learning data processing device, a data processing method, a program, and a learning device that efficiently remove a defective image mixed with a plurality of conforming images in a data set of machine learning.SOLUTION: In an information processing device, a learning data processing part 30 has a first image re-constitution part which reconstitutes an image, an abnormality level calculation part, and a data cleansing part. The abnormality level calculation part includes: a first difference image generation part which generates a difference image D321 between a learning image and a first re-constituted image D31 reconstituted by the first image re-constitution part; and a score calculation part which calculates scores based upon the difference image D321. The data cleansing part includes: a threshold calculation part which calculates a threshold D33 indicative of a range of conforming images based upon scores of all learning images; and a defective data removal part which removes learning images not included in the range of the conforming images from a data set D30 based upon the threshold D33.EFFECT: A defective image is efficiently removed which is mixed with a plurality of conforming images in the data set of machine learning.SELECTED DRAWING: Figure 4

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.

特開2018−120300号公報JP-A-2018-120300

しかしながら、機械学習を行うためのデータセットについて、数千枚から数万枚の大量の良品画像が必要となる場合がある。このように、大量の画像を準備した場合、データセット中に意図せず不良品データが混入する虞がある。そのような場合、生成される学習済モデルの精度が低くなるという問題が生じる。 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.

第1実施形態の検査装置を示す図である。It is a figure which shows the inspection apparatus of 1st Embodiment. 第1実施形態の情報処理装置のハードウェア構成を示す図である。It is a figure which shows the hardware configuration of the information processing apparatus of 1st Embodiment. 第1実施形態の情報処理装置が備える機能的な構成を示す図である。It is a figure which shows the functional structure which the information processing apparatus of 1st Embodiment has. 第1実施形態の情報処理装置が備える機能的な構成の一部を示す図である。It is a figure which shows a part of the functional structure which the information processing apparatus of 1st Embodiment has. 第1実施形態の第1学習処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the 1st learning process of 1st Embodiment. 第1実施形態の学習済の第1学習モデルに対して良品画像を入力した様子を概念的に示す図である。It is a figure which conceptually shows the state that the good product image was input to the trained 1st learning model of 1st Embodiment. 第1実施形態の学習済の第1学習モデルに対して不良品画像を入力した様子を概念的に示す図である。It is a figure which conceptually shows the state that the defective product image was input to the trained 1st learning model of 1st Embodiment. 第1実施形態の欠陥検出部におけるデータクレンジング処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the data cleansing process in the defect detection part of 1st Embodiment. 第1実施形態のデータクレンジング処理の各段階で得られる画像の例を示した図である。It is a figure which showed the example of the image obtained at each stage of the data cleansing process of 1st Embodiment. 第1実施形態のデータクレンジング処理の各段階で得られる画像の例を示した図である。It is a figure which showed the example of the image obtained at each stage of the data cleansing process of 1st Embodiment. 第1実施形態のデータクレンジング処理における良品および不良品の対象物についての差分画像を示した図の例である。It is an example of the figure which showed the difference image about the object of a good product and a defective product in the data cleansing process of 1st Embodiment. 第1実施形態のデータクレンジング処理におけるスコアの統計データを示す図である。It is a figure which shows the statistical data of the score in the data cleansing process of 1st Embodiment. 第1実施形態の第2学習処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the 2nd learning process of 1st Embodiment. 第1実施形態の欠陥検出処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the defect detection process of 1st Embodiment. 第2実施形態の情報処理装置が備える機能的な構成を示す図である。It is a figure which shows the functional structure which the information processing apparatus of 2nd Embodiment has.

以下、添付の図面を参照しながら、本発明の実施形態について説明する。なお、この実施形態に記載されている構成要素はあくまでも例示であり、本発明の範囲をそれらのみに限定する趣旨のものではない。図面においては、理解容易のため、必要に応じて各部の寸法や数が誇張または簡略化して図示されている場合がある。 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 inspection device 10 of the first embodiment. The inspection device 10 detects defects in the object 90 by analyzing the image of the object 90. The object 90 is specifically a tablet, but is not limited to a tablet. The inspection device 10 includes a camera 110 and an information processing device 120. The camera 110 is electrically connected to the information processing device 120. The camera 110 includes an image sensor. The camera 110 outputs an image signal obtained by imaging the object 90 using the image sensor to the information processing device 120. The object 90 imaged by the camera 110 may be stopped at a predetermined position, or may be moved in a predetermined direction by a transport mechanism such as a belt conveyor.

図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 information processing device 120 of the first embodiment. The information processing device 120 has a configuration as a computer. Specifically, the information processing device 120 includes a processor 121, a RAM 123, a storage unit 125, an input unit 127, a display unit 129, an apparatus I / F 131, and a communication I / F 133. The processor 121, the RAM 123, the storage unit 125, the input unit 127, the display unit 129, the device I / F 131, and the communication I / F 133 are electrically connected to each other via the bus 135.

プロセッサ121は、具体的には、CPUまたはGPUを含む。RAM123は、情報の読み出しおよび書き込みが可能な記憶媒体であって、具体的には、SDRAMである。記憶部125は、情報の読み出しおよび書き込みが可能な記録媒体であって、具体的には、HDD(ハードディスクドライブ)またはSSD(ソリッドステートドライブ)を含む。なお、記憶部125は、可搬性を有する光ディスク、磁気ディスクまたは半導体メモリ等を含んでもよい。記憶部125は、プログラムPを記憶している。プロセッサ121は、RAM123を作業領域として、プログラムPを実行することにより、各種の機能を実現する。なお、プログラムPは、ネットワークを介して、情報処理装置120に提供または配布されるようにしてもよい。 Specifically, the processor 121 includes a CPU or a GPU. The RAM 123 is a storage medium capable of reading and writing information, and specifically, an SDRAM. The storage unit 125 is a recording medium capable of reading and writing information, and specifically includes an HDD (hard disk drive) or an SSD (solid state drive). The storage unit 125 may include a portable optical disk, magnetic disk, semiconductor memory, or the like. The storage unit 125 stores the program P. The processor 121 realizes various functions by executing the program P with the RAM 123 as a work area. The program P may be provided or distributed to the information processing apparatus 120 via the network.

入力部127は、ユーザの操作入力を受け付ける入力デバイスであり、具体的には、マウスまたはキーボードなどである。表示部129は、各種情報を表す画像を表示する表示デバイスであり、具体的には、液晶ディスプレイである。 The input unit 127 is an input device that accepts user's operation input, and specifically, a mouse, a keyboard, or the like. The display unit 129 is a display device that displays images representing various types of information, and is specifically a liquid crystal display.

機器I/F131は、カメラ110を情報処理装置120に電気的に接続するためのインターフェースである。通信I/F133は、情報処理装置120をインターネットなどのネットワークと接続するためのインターフェースである。カメラ110は、通信I/F133を介して情報処理装置120と接続されてもよい。すなわち、検査装置10は、カメラ110を備えていることは必須ではなく、情報処理装置120のみを備えていてもよい。 The device I / F 131 is an interface for electrically connecting the camera 110 to the information processing device 120. The communication I / F 133 is an interface for connecting the information processing device 120 to a network such as the Internet. The camera 110 may be connected to the information processing device 120 via the communication I / F 133. That is, the inspection device 10 is not essential to include the camera 110, and may include only the information processing device 120.

図3は、第1実施形態の情報処理装置120が備える機能的な構成を示す図である。図4は、情報処理装置120が備える機能的な構成の一部をより詳細に示す図である。 FIG. 3 is a diagram showing a functional configuration included in the information processing device 120 of the first embodiment. FIG. 4 is a diagram showing a part of the functional configuration included in the information processing apparatus 120 in more detail.

図3に示すように、情報処理装置120は、第1学習部20と、学習用データ処理部30と、第2学習部40と、欠陥検出部50とを有する。 As shown in FIG. 3, the information processing apparatus 120 includes a first learning unit 20, a learning data processing unit 30, a second learning unit 40, and a defect detection unit 50.

第1学習部20、学習用データ処理部30および第2学習部40は、検査装置を構成する欠陥検出部50を構築するための構成である。欠陥検出部50の後述する第2学習モデルM2を精度よく学習させるためには、多数の対象物の良品の画像(以下「良品画像」という)が必要となる。しかしながら、多数の対象物の画像を含む学習用のデータセットを準備する際に、不良品の画像(以下「不良品画像」という)が混入する恐れがある。そこで、この情報処理装置120は、不良品画像が混入している可能性がある学習用のデータセットを用いて、学習用のデータセットに含まれる複数の学習用画像から不適切な不良品画像を除去する学習用データ処理部30を有する。 The first learning unit 20, the learning data processing unit 30, and the second learning unit 40 are configured to construct a defect detection unit 50 that constitutes an inspection device. In order to accurately learn the second learning model M2, which will be described later, of the defect detection unit 50, a large number of non-defective images of objects (hereinafter referred to as “non-defective images”) are required. However, when preparing a data set for learning including images of a large number of objects, a defective image (hereinafter referred to as "defective image") may be mixed. Therefore, the information processing device 120 uses a learning data set in which defective image images may be mixed, and uses an inappropriate defective product image from a plurality of learning images included in the learning data set. It has a learning data processing unit 30 for removing the above.

本実施形態では、検査装置の一部である欠陥検出部50と、欠陥検出部50を構築するための第1学習部20、学習用データ処理部30および第2学習部40が同じ情報処理装置120内に含まれているが、本発明はこれに限られない。第1学習部20、学習用データ処理部30および第2学習部40は、検査装置10に備えられていることは必須ではなく、別のコンピュータに備えられていてもよい。 In the present embodiment, the defect detection unit 50, which is a part of the inspection device, the first learning unit 20, the learning data processing unit 30, and the second learning unit 40 for constructing the defect detection unit 50 are the same information processing device. Although included in 120, the present invention is not limited to this. The first learning unit 20, the learning data processing unit 30, and the second learning unit 40 are not necessarily provided in the inspection device 10, and may be provided in another computer.

第1学習部20は、学習用データ処理部30の後述する第1学習モデルM1の学習を行う。具体的には、第1学習部20は、第1学習モデルM1に対して、教師なし学習を行う。 The first learning unit 20 learns the first learning model M1 described later in the learning data processing unit 30. Specifically, the first learning unit 20 performs unsupervised learning on the first learning model M1.

学習用データ処理部30は、学習用のデータセットに含まれる複数の学習用画像から不適切な画像を除去する学習用データ処理装置の一例である。学習用データ処理部30は、第2学習部40が欠陥検出部50の後述する第2学習モデルM2の学習を行う際に用いられる学習用のデータセットD30に対して処理を行う。 The learning data processing unit 30 is an example of a learning data processing device that removes inappropriate images from a plurality of learning images included in a learning data set. The learning data processing unit 30 processes the learning data set D30 used when the second learning unit 40 learns the second learning model M2 described later in the defect detection unit 50.

学習用データ処理部30は、第1学習モデルM1、第1学習済データD1、第1画像再構成部31、異常度算出部32およびデータクレンジング部33を有する。第1学習モデルM1および第1学習済データD1は、記憶部125に保存されている。第1画像再構成部31、異常度算出部32およびデータクレンジング部33は、プロセッサ121がプログラムPに従って動作することにより実現される機能である。 The learning data processing unit 30 includes a first learning model M1, a first learned data D1, a first image reconstruction unit 31, an abnormality degree calculation unit 32, and a data cleansing unit 33. The first learning model M1 and the first learned data D1 are stored in the storage unit 125. The first image reconstruction unit 31, the abnormality degree calculation unit 32, and the data cleansing unit 33 are functions realized by operating the processor 121 according to the program P.

第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 first learning unit 20 learning the first learning model M1. The first learning unit 20 generates the first learned data D1 by machine learning and stores it in the storage unit 125.

具体的には、第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 objects 90 with the camera 110. At this time, it is preferable that the plurality of sample images D20 are all non-defective images. However, from the viewpoint of realistic preparation, a plurality of sample images D20 used by the first learning unit 20 for learning the first learning model M1 and a data set D30 to be subjected to data cleansing processing by the learning data processing unit 30. The same image is used as the plurality of learning images included in. That is, the first trained data D1 is trained data obtained by inputting a plurality of training images included in the data set D30 as sample images D20 and training them.

第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 image reconstruction unit 31 outputs a reconstruction image of the input image. Specifically, the first image reconstruction unit 31 inputs a data set D30 including a plurality of learning images into the trained first learning model L1, and a plurality of learning images included in the data set D30. The process of generating the first reconstructed image D31 including each of the reconstructed images of the above is executed. The first image reconstruction unit 31 delivers the first reconstruction image D31 output from the trained first learning model L1 to the abnormality degree calculation unit 32.

異常度算出部32は、データセットD30に含まれる学習用画像のそれぞれについて異常度を示すスコアを算出する。図4に示すように、異常度算出部32は、第1差分画像生成部321と、スコア算出部322とを有する。 The abnormality degree calculation unit 32 calculates a score indicating the abnormality degree for each of the learning images included in the data set D30. As shown in FIG. 4, the abnormality degree calculation unit 32 includes a first difference image generation unit 321 and a score calculation unit 322.

第1差分画像生成部321は、第1画像再構成部31へ入力されたデータセットD30に含まれる複数の学習用画像のそれぞれと、第1画像再構成部31から出力された第1再構成画像D31のそれぞれとについて、差分を取り、差分画像D321を生成する。 The first difference image generation unit 321 includes each of the plurality of learning images included in the data set D30 input to the first image reconstruction unit 31 and the first reconstruction output from the first image reconstruction unit 31. Differences are taken from each of the images D31 to generate a difference image D321.

スコア算出部322は、差分画像D321に基づいて、データセットD30に含まれる学習用画像のそれぞれについて、異常度を示すスコアを算出する。スコアは、例えば、差分画像D321の全ての画素についての輝度の合計値である。そして、スコア算出部322は、データセットD30の学習用画像毎のスコアを全て含むスコアデータD32をデータクレンジング部33へと引き渡す。 The score calculation unit 322 calculates a score indicating the degree of abnormality for each of the learning images included in the data set D30 based on the difference image D321. The score is, for example, the total brightness of all the pixels of the difference image D321. Then, the score calculation unit 322 delivers the score data D32 including all the scores for each learning image of the data set D30 to the data cleansing unit 33.

データクレンジング部33は、異常度算出部32の算出したスコアに基づいて、データセットD30から不適切な学習用画像を除去する。データクレンジング部33は、閾値算出部331と、不良品データ除去部332とを有する。 The data cleansing unit 33 removes an inappropriate learning image from the data set D30 based on the score calculated by the abnormality degree calculation unit 32. The data cleansing unit 33 has a threshold value calculation unit 331 and a defective product data removal unit 332.

閾値算出部331は、スコアデータD32に含まれる全スコアに基づいて、良品の範囲を示す閾値D33を算出する。本実施形態では、閾値算出部331は、スコアデータD32に含まれるスコアを統計的に処理し、その結果に基づいて閾値D33を算出する。不良品データ除去部332は、閾値D33に基づいて、データセットD30から、良品の範囲に含まれない学習用画像を除去した処理済データセットD40を生成する。 The threshold value calculation unit 331 calculates the threshold value D33 indicating the range of non-defective products based on all the scores included in the score data D32. In the present embodiment, the threshold value calculation unit 331 statistically processes the score included in the score data D32, and calculates the threshold value D33 based on the result. The defective product data removing unit 332 generates a processed data set D40 from which the learning image not included in the range of the non-defective product is removed from the data set D30 based on the threshold value D33.

第2学習部40は、図3に示すように、欠陥検出部50の後述する第2学習モデルM2の学習を行う。具体的には、学習用データ処理部30によって不適切な学習用画像が除去された処理済データセットD40を用いて、欠陥検出部50の第2学習モデルM2の学習を行う。 As shown in FIG. 3, the second learning unit 40 learns the second learning model M2, which will be described later, of the defect detection unit 50. Specifically, the second learning model M2 of the defect detection unit 50 is trained using the processed data set D40 from which the inappropriate learning image has been removed by the learning data processing unit 30.

欠陥検出部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 defect detection unit 50 detects defects in the object 90 based on the object image obtained by photographing the object 90 with the camera 110. The defect detection unit 50 includes a second learning model M2, a second learned data D2, a second image reconstruction unit 51, a second difference image generation unit 52, and a defect detection processing unit 53. The second learning model M2 and the second learned data D2 are stored in the storage unit 125. The second image reconstruction unit 51, the second difference image generation unit 52, and the defect detection processing unit 53 are functions realized by operating the processor 121 according to the program P.

第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 second learning unit 40 learning the second learning model M2. The second learning unit 40 generates the second learned data D2 by machine learning and stores it in the storage unit 125.

具体的には、第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 data processing unit 30. Therefore, the trained second learning model L2 outputs an image close to a non-defective product as a reconstructed image regardless of whether the input image is a non-defective product image or the input image is a defective product image.

第2画像再構成部51は、入力された画像の再構成画像を出力する。具体的には、第2画像再構成部51には、欠陥検査を行うべき対象物90をカメラ110で撮像することによって得られた対象物画像D50が入力される。そして、第2画像再構成部51は、対象物画像D50を学習済第2学習モデルL2へと入力し、学習済第2学習モデルL2によって再構成された第2再構成画像D51を第2差分画像生成部52へと引き渡す。 The second image reconstruction unit 51 outputs a reconstruction image of the input image. Specifically, the object image D50 obtained by capturing the object 90 to be inspected for defects with the camera 110 is input to the second image reconstruction unit 51. Then, the second image reconstruction unit 51 inputs the object image D50 into the trained second learning model L2, and the second difference between the second reconstructed image D51 reconstructed by the trained second learning model L2. It is handed over to the image generation unit 52.

第2差分画像生成部52は、第2画像再構成部51へ入力された対象物画像D50と、第2画像再構成部51から出力された第2再構成画像D51について、差分を取り、第2差分画像D52を生成する。 The second difference image generation unit 52 takes a difference between the object image D50 input to the second image reconstruction unit 51 and the second reconstruction image D51 output from the second image reconstruction unit 51, and obtains a second difference. 2 The difference image D52 is generated.

欠陥検出処理部53は、第2差分画像D52に基づいて欠陥の有無を検出し、欠陥の有無を検査結果D60として出力する。 The defect detection processing unit 53 detects the presence or absence of defects based on the second difference image D52, and outputs the presence or absence of defects as the inspection result D60.

プロセッサ121は、欠陥検出処理部53によって出力される検査結果D60を、表示部129に表示してもよい。 The processor 121 may display the inspection result D60 output by the defect detection processing unit 53 on the display unit 129.

<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 first learning unit 20 will be described with reference to FIG. FIG. 5 is a flowchart showing the flow of the first learning process S10 of the present embodiment. In the first learning process S10, the first learning model M1 is used to generate the first learned data D1 which is a parameter or the like for outputting the reconstructed image of the input image.

図5に示すように、情報処理装置120は、まず、複数の標本画像D20を準備する準備工程を行う(ステップS11)。具体的には、プロセッサ121は、複数の対象物90をカメラ110で撮像することによって、複数の標本画像D20を取得する。そして、プロセッサ121は、取得した複数の標本画像D20を記憶部125に記憶させる。 As shown in FIG. 5, the information processing apparatus 120 first performs a preparatory step of preparing a plurality of sample images D20 (step S11). Specifically, the processor 121 acquires a plurality of sample images D20 by capturing a plurality of objects 90 with the camera 110. Then, the processor 121 stores the acquired plurality of sample images D20 in the storage unit 125.

この複数の標本画像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 objects 90 to be prepared are non-defective products, but in rare cases, defective products may be mixed. Therefore, there is a possibility that defective products are mixed in a very small part of the plurality of sample images D20.

準備工程S11が完了すると、第1学習部20は、準備工程S11で取得した複数の標本画像D20の一部(例えば100枚分の画像)を小データセットとして、第1学習モデルM1に入力して第1学習済データD1を生成する、第1学習工程を実行する(ステップS12)。なお、「学習済データを生成する」の用語は、既に生成された学習済データを更新することを含む。 When the preparation step S11 is completed, the first learning unit 20 inputs a part (for example, 100 images) of the plurality of sample images D20 acquired in the preparation step S11 into the first learning model M1 as a small data set. The first learning step of generating the first learned data D1 is executed (step S12). The term "generate trained data" includes updating the trained data that has already been generated.

具体的には、第1学習工程S12では、第1学習部20は、小データセットを学習済第1学習モデルL1(第1回の第1学習工程S12では第1学習モデルM1)に入力し、再構成画像を生成する。そして、入力した画像と再構成画像とがどの程度近似しているかの評価指標を算出する。評価指標には、例えば、入力された標本画像と出力された再構成画像との差分(誤差)の2乗和が用いられる。その後、算出した評価指標に基づいて、バックプロパゲーションにより、第1学習モデルM1を構成するニューラルネットの重み付けのパラメータ等を含む第1学習済データD1を更新する。 Specifically, in the first learning process S12, the first learning unit 20 inputs a small data set into the trained first learning model L1 (the first learning model M1 in the first first learning process S12). , Generate a reconstructed image. Then, an evaluation index of how close the input image and the reconstructed image are is calculated. For the evaluation index, for example, the sum of squares of the difference (error) between the input sample image and the output reconstructed image is used. Then, based on the calculated evaluation index, the first trained data D1 including the weighting parameters of the neural network constituting the first learning model M1 is updated by backpropagation.

続いて、第1学習部20は、第1学習モデルM1の学習が終了したか否かを判断する(ステップS13)。具体的には、直前の第1学習工程S12で算出された評価指標が、所定の範囲内に収束したか否かを判断する。すなわち、直前の第1学習工程S12で生成された第1学習済データD1を適用した第1学習モデルM1が、標本画像に近似した再構成画像を所望の精度で生成しているか否かを判断する。具体的には、例えば、第1学習工程S12で算出された評価指標が所定の閾値よりも小さい場合、第1学習モデルM1の学習が終了したと判断する。なお、ステップS13において、全ての標本画像D20についての学習が所定の回数終了した場合にも、学習が終了したと判断してもよい。 Subsequently, the first learning unit 20 determines whether or not the learning of the first learning model M1 is completed (step S13). Specifically, it is determined whether or not the evaluation index calculated in the first learning step S12 immediately before has converged within a predetermined range. That is, it is determined whether or not the first learning model M1 to which the first learned data D1 generated in the immediately preceding first learning step S12 is applied generates a reconstructed image approximated to the sample image with desired accuracy. do. Specifically, for example, when the evaluation index calculated in the first learning step S12 is smaller than the predetermined threshold value, it is determined that the learning of the first learning model M1 is completed. In step S13, even when the learning of all the sample images D20 is completed a predetermined number of times, it may be determined that the learning is completed.

ステップ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 processor 121 returns to the first learning step S12 and learns about the next small data set.

ステップ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 processor 121 stores the first learned data D1 generated by the first learning unit 20 in the storage unit 125. Is executed (step S14).

図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-free object 90 is imaged is input to the trained first learning model L1, the reconstructed image G21 output from the trained first learning model L1 is compared. High reproducibility. That is, the reconstructed image G21 has a small difference from the input non-defective image G11. On the other hand, as shown in FIG. 7, when the defective image G12 obtained by imaging the object 90 having the defective portion 91 is input to the trained first learning model L1, it is output from the trained first learning model L1. The reconstructed image G22 does not sufficiently reproduce the defective portion 91 of the defective product. That is, the reconstructed image G22 has a large difference from the input defective image G12. The defective portion 91 is, for example, dirt, foreign matter, chips, etc. attached to the object 90.

<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 data processing unit 30 will be described with reference to FIG. FIG. 8 is a flowchart showing the flow of the data cleansing process S20 of the present embodiment. The data cleansing process S20 is a data process for removing an inappropriate image from a plurality of learning images included in the learning data set D30 by using the trained first learning model L1.

図8に示すように、情報処理装置120は、まず、処理前のデータセットD30を準備する準備工程を行う(ステップS21)。具体的には、本実施形態において、処理前のデータセットD30に含まれる複数の学習用画像は第1学習処理S10で用いられた複数の標本画像D20と同じものであるため、プロセッサ121は、記憶部125から複数の標本画像D20を処理前のデータセットD30として読み出す。 As shown in FIG. 8, the information processing apparatus 120 first performs a preparatory step of preparing the data set D30 before processing (step S21). Specifically, in the present embodiment, since the plurality of learning images included in the data set D30 before processing are the same as the plurality of sample images D20 used in the first learning processing S10, the processor 121 A plurality of sample images D20 are read from the storage unit 125 as the data set D30 before processing.

次に、第1画像再構成部31は、準備工程S21によって得られたデータセットD30の各学習用画像から学習済第1学習モデルL1を用いて第1再構成画像D31を生成する、第1画像再構成工程を行う(ステップS22)。具体的には、第1画像再構成部31は、データセットD30に含まれる学習用画像を学習済第1学習モデルL1に入力し、その出力である第1再構成画像D31を取得する。そして、プロセッサ121は、取得した第1再構成画像D31を記憶部125に記憶させる。 Next, the first image reconstruction unit 31 generates the first reconstruction image D31 using the trained first learning model L1 from each learning image of the data set D30 obtained in the preparation step S21. An image reconstruction step is performed (step S22). Specifically, the first image reconstruction unit 31 inputs the learning image included in the data set D30 into the trained first learning model L1 and acquires the output of the first reconstruction image D31. Then, the processor 121 stores the acquired first reconstructed image D31 in the storage unit 125.

続いて、第1差分画像生成部321は、記憶部125に記憶されたデータセットD30の学習用画像と、第1画像再構成工程S22で当該学習用画像から生成された第1再構成画像D31とから第1差分画像D321を生成する第1差分画像生成工程を行う(ステップS23)。具体的には、学習用画像の各画素の輝度と、第1再構成画像D31の各画素の輝度との差分をとることにより、第1差分画像D321を生成する。そして、プロセッサ121は、取得した第1差分画像D321を記憶部125に記憶させる。 Subsequently, the first difference image generation unit 321 includes the learning image of the data set D30 stored in the storage unit 125 and the first reconstruction image D31 generated from the learning image in the first image reconstruction step S22. The first difference image generation step of generating the first difference image D321 is performed from the above (step S23). Specifically, the first difference image D321 is generated by taking the difference between the brightness of each pixel of the learning image and the brightness of each pixel of the first reconstructed image D31. Then, the processor 121 stores the acquired first difference image D321 in the storage unit 125.

ここで、図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 object 90 is a non-defective product, whereas the learning image G32 in FIG. 10 is a defective product when the object 90 has a defective portion 91. It is an image of. FIG. 11 is an enlarged view of the first difference images G51 and G52 shown in FIGS. 9 and 10.

対象物90が良品である場合、図9に示すように、第1画像再構成工程S22で入力される学習用画像G31と、第1画像再構成工程S22で生成される第1再構成画像G41とが、近似した画像となる。すなわち、この場合、第1再構成画像G41の各画素の輝度は、学習用画像G31の各画素の輝度と近似する。このため、図9に示すように、第1差分画像G51は、近似した画像の輝度が相殺され、各画素の輝度が小さい画像となる。 When the object 90 is a non-defective product, as shown in FIG. 9, the learning image G31 input in the first image reconstruction step S22 and the first reconstruction image G41 generated in the first image reconstruction step S22. Is an approximate image. That is, in this case, the brightness of each pixel of the first reconstructed image G41 is close to the brightness of each pixel of the learning image G31. Therefore, as shown in FIG. 9, the first difference image G51 is an image in which the brightness of the approximated image is canceled out and the brightness of each pixel is small.

一方、対象物90が不良品である場合、図10に示すように、第1画像再構成工程S22で入力される学習用画像G32には、欠陥部分91が現れている。このような場合、前述の通り、欠陥部分91を含む学習用画像G32から生成された第1再構成画像G42は、学習用画像G32から欠陥部分91が除かれたような画像となる。 On the other hand, when the object 90 is a defective product, as shown in FIG. 10, the defective portion 91 appears in the learning image G32 input in the first image reconstruction step S22. In such a case, as described above, the first reconstructed image G42 generated from the learning image G32 including the defective portion 91 becomes an image in which the defective portion 91 is removed from the learning image G32.

したがって、第1差分画像G52のうち、対象物90の正常な部分については、学習用画像G32と近似した画像の輝度が相殺され、各画素の輝度が小さい。一方、第1差分画像G42のうち、欠陥部分91については、学習用画像G32と第1再構成画像G42の輝度の差が大きいため、当該部分の輝度は、正常な部分に比べて大きくなる。したがって、図10に示すように、第1差分画像G52において欠陥部分91は白っぽく表示されている。このように、第1差分画像G52を得ることにより、欠陥部分91を特異的に抽出することができる。 Therefore, in the normal portion of the object 90 in the first difference image G52, the brightness of the image approximated to the learning image G32 is canceled out, and the brightness of each pixel is small. On the other hand, in the defect portion 91 of the first difference image G42, since the difference in brightness between the learning image G32 and the first reconstructed image G42 is large, the brightness of the portion is larger than that of the normal portion. Therefore, as shown in FIG. 10, the defective portion 91 is displayed whitish in the first difference image G52. By obtaining the first difference image G52 in this way, the defective portion 91 can be specifically extracted.

その後、データセットD30に含まれる学習用画像のそれぞれについて、スコア算出部322が異常度を示すスコアを算出するスコア算出工程を行う(ステップS24)。本実施形態において、スコアは、差分画像D321のすべての画素についての輝度の合計値である。そして、スコア算出部322は、データセットD30の学習用画像毎のスコアをすべて含むスコアデータD32をデータクレンジング部33の閾値算出部331へと引き渡す。 After that, for each of the learning images included in the data set D30, the score calculation unit 322 performs a score calculation step of calculating a score indicating the degree of abnormality (step S24). In the present embodiment, the score is the total brightness of all the pixels of the difference image D321. Then, the score calculation unit 322 delivers the score data D32 including all the scores for each learning image of the data set D30 to the threshold value calculation unit 331 of the data cleansing unit 33.

閾値算出部331は、スコアデータD32に含まれる全スコアに基づいて、良品の範囲を示す閾値D33を算出する閾値算出工程を行う(ステップS25)。本実施形態の閾値算出部331は、スコアデータD32に含まれる全スコアを統計処理し、その処理結果に基づいて閾値D33を算出する。 The threshold value calculation unit 331 performs a threshold value calculation step of calculating a threshold value D33 indicating a range of non-defective products based on all the scores included in the score data D32 (step S25). The threshold value calculation unit 331 of the present embodiment statistically processes all the scores included in the score data D32, and calculates the threshold value D33 based on the processing result.

図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 defective portion 91 of the object 90 is increased. Therefore, the score in the difference image D321 of the non-defective product has a substantially normal distribution, and the score in the difference image D321 of the defective product takes a larger value than the score of the non-defective product. Therefore, in the frequency distribution of all the scores included in the score data D32, as shown in FIG. 12, a frequency distribution having a longer right tail (the one with the larger score) of the normal distribution can be obtained.

このようなスコアデータD32に対して、閾値算出部331は、閾値算出工程S25において、スコアの平均値Sや標準偏差σ等の値を求める統計処理を行う。そして、閾値算出部331は、良品の範囲を示す閾値D33を算出する。閾値D33には、良品の下限値を示す第1閾値Th1と、良品のスコア上限値を示す第2閾値Th2とを含む。 For such score data D32, the threshold value calculation unit 331 performs statistical processing for obtaining values such as the average value S of the scores and the standard deviation σ in the threshold value calculation step S25. Then, the threshold value calculation unit 331 calculates the threshold value D33 indicating the range of non-defective products. The threshold value D33 includes a first threshold value Th1 indicating a lower limit value of a non-defective product and a second threshold value Th2 indicating an upper limit value of a score of a non-defective product.

本実施形態では、第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 value calculation unit 331 of the present embodiment calculates the threshold value D33 by performing statistical processing, but the present invention is not limited to this. The threshold value calculation unit 331 may select the difference images D321 for the number of predetermined numbers in descending order of the score, and set the threshold value D33 so that these difference images D321 are excluded. Further, the threshold value calculation unit 331 may not provide the first threshold value Th1 which is the lower limit value of the score of the non-defective product, and may calculate the second threshold value Th2 which is the upper limit value of the score of the non-defective product as a constant multiple of the average value S of the score. The calculation method of the threshold value D33 of the threshold value calculation unit 331 is not limited to these, and may be appropriately selected according to conditions such as the type and purpose of the object 90.

最後に、不良品データ除去部332は、閾値D33に基づいて、データセットD30から、良品の範囲に含まれない学習用画像を除去する不良品データ除去工程を行う(ステップS26)。具体的には、不良品データ除去部332は、第1閾値Th1よりも小さいスコアを有する差分画像D321に対応する学習用画像と、第2閾値Th2よりも大きいスコアを有する差分画像D321に対応する学習用画像とを、データセットD30から除去し、処理済データセットD40を生成する。そして、プロセッサ121は、生成された処理済データセットD40を記憶部125に記憶させる。 Finally, the defective product data removing unit 332 performs a defective product data removing step of removing the learning image not included in the range of the non-defective product from the data set D30 based on the threshold value D33 (step S26). Specifically, the defective product data removing unit 332 corresponds to the learning image corresponding to the difference image D321 having a score smaller than the first threshold Th1 and the difference image D321 having a score larger than the second threshold Th2. The training image is removed from the data set D30 to generate the processed data set D40. Then, the processor 121 stores the generated processed data set D40 in the storage unit 125.

このデータクレンジング処理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 second learning unit 40 will be described with reference to FIG. FIG. 13 is a flowchart showing the flow of the second learning process S30 of the present embodiment. In the second learning process S30, the second learning model M2 is used to generate the second learned data D2 which is a parameter or the like for outputting the reconstructed image of the input image.

図13に示すように、情報処理装置120は、まず、処理済データセットD40を準備する準備工程を行う(ステップS31)。具体的には、プロセッサ121は、記憶部125に記憶された処理済データセットD40を読み出す。 As shown in FIG. 13, the information processing apparatus 120 first performs a preparatory step of preparing the processed data set D40 (step S31). Specifically, the processor 121 reads out the processed data set D40 stored in the storage unit 125.

準備工程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 second learning unit 40 uses a part of a plurality of learning images (for example, 100 images) included in the processed data set D40 acquired in the preparation step S31 as a small data set. The second learning step of inputting to the second learning model M2 to generate the second trained data D2 is executed (step S32). The second learning step S32 of the present embodiment is performed in the same manner as the first learning step S12 of the first learning process S10.

続いて、第2学習部40は、第2学習モデルM2の学習が終了したか否かを判断する(ステップS33)。本実施形態のステップS33は、第1学習処理S10のステップS13と同様に行われる。 Subsequently, the second learning unit 40 determines whether or not the learning of the second learning model M2 is completed (step S33). Step S33 of this embodiment is performed in the same manner as step S13 of the first learning process S10.

ステップ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 processor 121 returns to the second learning step S32 and learns about the next small data set.

ステップ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 processor 121 stores the second learned data D2 generated by the second learning unit 40 in the storage unit 125. Is executed (step S34).

このように、第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 defect detection unit 50 will be described with reference to FIG. In this defect detection process S40, defects in the object 90 are detected based on the object image D50 obtained by imaging the object 90. FIG. 14 is a flowchart showing the flow of the defect detection process in the defect detection unit 50 of the present embodiment.

図14に示すように、情報処理装置120は、まず、検査対象となる対象物90を撮影して、対象物画像D50を取得する撮像工程を行う(ステップS41)。具体的には、プロセッサ121は、カメラ110を用いて、検査対象である対象物を撮像することによって、対象物画像D50を取得する。そして、プロセッサ121は、取得した対象物画像D50を記憶部125に記憶させる。 As shown in FIG. 14, the information processing apparatus 120 first takes an image of the object 90 to be inspected and performs an imaging step of acquiring the object image D50 (step S41). Specifically, the processor 121 acquires the object image D50 by photographing the object to be inspected by using the camera 110. Then, the processor 121 stores the acquired object image D50 in the storage unit 125.

次に、第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 image reconstruction unit 51 generates a second reconstruction image D51 from the object image D50 obtained in the imaging step S41 using the trained second learning model L2, a second image reconstruction step. Is executed (step S42). Specifically, the second image reconstruction unit 51 inputs the object image D50 into the second learning model M2 to which the second trained data D2 is applied, and acquires the output of the second reconstruction image D51. do. Then, the processor 121 stores the acquired second reconstructed image D51 in the storage unit 125.

続いて、第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 image generation unit 52 executes a second difference image generation step of generating the second difference image D52 from the object image D50 and the second reconstructed image D51 stored in the storage unit 125 (. Step S43). Specifically, the second difference image generation unit 52 obtains the second difference image D52 by taking the difference between the brightness of each pixel of the object image D50 and the brightness of each pixel of the second reconstructed image D51. Generate. Then, the processor 121 stores the generated second difference image D52 in the storage unit 125.

最後に、欠陥検出処理部53は、第2差分画像D52に基づいて、対象物90に欠陥が有るか否かを判断する、欠陥検出工程を実行する(ステップS44)。上述のように、第2差分画像D52において、対象物90の欠陥部分91は輝度が大きい領域となる。この特徴を用いて、欠陥検出処理部53は、対象物90に欠陥が有るか否かを判断する。具体的な判断方法は、適宜、選択し得る。そして、欠陥検出処理部53は、欠陥検出の有無を検査結果D60として出力する。 Finally, the defect detection processing unit 53 executes a defect detection step of determining whether or not the object 90 has a defect based on the second difference image D52 (step S44). As described above, in the second difference image D52, the defective portion 91 of the object 90 is a region having high brightness. Using this feature, the defect detection processing unit 53 determines whether or not the object 90 has a defect. The specific judgment method can be appropriately selected. Then, the defect detection processing unit 53 outputs the presence or absence of defect detection as the inspection result D60.

<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 information processing apparatus 120A of the second embodiment. The information processing device 120A shown in FIG. 15 has a first learning unit 20A and a learning data processing unit 30A having a configuration different from that of the first embodiment, and a second learning unit 40 and a defect having the same configuration as the first embodiment. It has a detection unit 50. In FIG. 15, the same reference numerals are given to the same configurations as those in the first embodiment.

第1学習部20Aは、学習用データ処理部30Aの後述する第1学習モデルM1Aの学習を行う。具体的には、第1学習部20Aは、第1学習モデルM1Aに対して、教師なし学習を行う。 The first learning unit 20A learns the first learning model M1A, which will be described later, of the learning data processing unit 30A. Specifically, the first learning unit 20A performs unsupervised learning on the first learning model M1A.

学習用データ処理部30Aは、学習用のデータセットに含まれる複数の学習用画像から不適切な画像を除去する学習用データ処理装置の一例である。学習用データ処理部30Aは、第1学習モデルM1A、第1学習済データD1A、異常度算出部32Aおよびデータクレンジング部33Aを有する。 The learning data processing unit 30A is an example of a learning data processing device that removes an inappropriate image from a plurality of learning images included in a learning data set. The learning data processing unit 30A includes a first learning model M1A, a first learned data D1A, an abnormality degree calculation unit 32A, and a data cleansing unit 33A.

第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 first learning unit 20A learning the first learning model M1A. The first learning unit 20A generates the first learned data D1A by machine learning.

具体的には、第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 degree calculation unit 32A inputs each of the learning images included in the data set D30 into the trained first learning model L1A, and acquires a score for each learning image. Then, the abnormality degree calculation unit 32A delivers the score data D32A including all the scores for each learning image of the data set D30 to the data cleansing unit 33A.

データクレンジング部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 degree calculation unit 32A. That is, the data cleansing unit 33A outputs the processed data set D40A obtained by removing the learning image determined in advance by the trained first learning model L1A as an outlier from the data set D30.

<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 Inspection device 20, 20A 1st learning unit 31 1st image reconstruction unit 32, 32A Abnormality calculation unit 33, 33A Data cleansing unit 40 2nd learning unit 50 Defect detection unit 90 Object 321 1st difference image generation unit 322 Score calculation unit 331 Threshold calculation unit 332 Defective product data removal unit D1, D1A 1st trained data D2 2nd trained data D20 Sample image D30 data set D31 1st reconstruction image D32, D32A Score data D321 1st difference image D33 Threshold D40, D40A Processed data set L1, L1A Trained first learning model L2 Trained second learning model M1, M1A First learning model M2 Second learning model P program

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差分画像生成部と、
前記第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.
請求項2に記載の学習用データ処理装置であって、
画像を入力および出力とする第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.
請求項3に記載の学習用データ処理装置であって、
前記第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.
請求項3または請求項4に記載の学習用データ処理装置であって、
前記第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学習済データを適用した前記第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.
請求項8に記載の学習用データ処理方法であって、
前記工程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.
請求項10に記載のプログラムであって、
前記工程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.
JP2020076673A 2020-04-23 2020-04-23 Learning data processing device, learning device, learning data processing method, and program Active JP7414629B2 (en)

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)

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

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

Patent Citations (3)

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

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

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