JP7059883B2 - Learning device, image generator, learning method, and learning program - Google Patents

Learning device, image generator, learning method, and learning program Download PDF

Info

Publication number
JP7059883B2
JP7059883B2 JP2018190514A JP2018190514A JP7059883B2 JP 7059883 B2 JP7059883 B2 JP 7059883B2 JP 2018190514 A JP2018190514 A JP 2018190514A JP 2018190514 A JP2018190514 A JP 2018190514A JP 7059883 B2 JP7059883 B2 JP 7059883B2
Authority
JP
Japan
Prior art keywords
image
learning
generator
input
training
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2018190514A
Other languages
Japanese (ja)
Other versions
JP2020060879A (en
Inventor
瑩 王
雄希 半澤
真嗣 栗田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron Corp
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 Omron Corp filed Critical Omron Corp
Priority to JP2018190514A priority Critical patent/JP7059883B2/en
Publication of JP2020060879A publication Critical patent/JP2020060879A/en
Application granted granted Critical
Publication of JP7059883B2 publication Critical patent/JP7059883B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、学習装置、画像生成装置、学習方法、及び学習プログラムに関する。 The present invention relates to a learning device, an image generation device, a learning method, and a learning program.

従来、製造ライン等の製品を製造する場面では、製造される製品を撮影装置により撮影し、得られた画像データに基づいて製品の良否を検査する技術が利用されている。例えば、特許文献1では、学習済みの第1のニューラルネットワークに基づいて画像に写る検査対象物が正常であるか異常であるかを判定し、検査対象物が異常であると判定した場合に、学習済みの第2のニューラルネットワークに基づいて当該異常の種類を分類する検査装置が提案されている。 Conventionally, in the scene of manufacturing a product such as a production line, a technique of photographing the manufactured product with an imaging device and inspecting the quality of the product based on the obtained image data has been used. For example, in Patent Document 1, it is determined whether the inspection target imaged in the image is normal or abnormal based on the first learned neural network, and when it is determined that the inspection target is abnormal, it is determined. An inspection device that classifies the type of the anomaly based on the learned second neural network has been proposed.

特開2012-026982号公報Japanese Unexamined Patent Publication No. 2012-026892

Jianmin Bao, Dong Chen, Fang Wen, Houqiang Li, Gang Hua, "CVAE-GAN: Fine-Grained Image Generation through Asymmetric Training", 2017 IEEE International Conference on Computer Vision, 2764-2773, 2017Jianmin Bao, Dong Chen, Fang Wen, Houqiang Li, Gang Hua, "CVAE-GAN: Fine-Grained Image Generation through Asymmetric Training", 2017 IEEE International Conference on Computer Vision, 2764-2773, 2017

本件発明者らは、特許文献1のようなニューラルネットワーク等の学習モデルにより構成される識別器を利用して、画像データから製品の良否を判定する従来の技術には、次のような問題が生じ得ることを見出した。すなわち、製品の良否を判定する能力を学習モデルに習得させるための機械学習を行う場合、訓練データとしてサンプル画像を用意することになる。このサンプル画像の件数が少ないと、学習済みの学習モデル(識別器)による良否の判定の精度が不十分になってしまう。一方で、識別器による判定の精度を高めるために、十分な件数のサンプル画像を用意するにはコストがかかってしまう。 The inventors of the present invention have the following problems in the conventional technique of determining the quality of a product from image data by using a classifier composed of a learning model such as a neural network as in Patent Document 1. I found that it could happen. That is, when machine learning is performed to make the learning model acquire the ability to judge the quality of the product, a sample image is prepared as training data. If the number of sample images is small, the accuracy of the pass / fail judgment by the trained learning model (discriminator) becomes insufficient. On the other hand, it is costly to prepare a sufficient number of sample images in order to improve the accuracy of the judgment by the classifier.

そこで、本件発明者らは、生成器(生成モデル)を利用して、用意した画像から異なる複数の画像を量産し、量産した複数の画像を機械学習の訓練データとして利用することを検討した。例えば、非特許文献1には、機械学習により、用意した学習画像及びクラスから生成器(生成モデル)を構築する方法が提案されている。この生成器は、機械学習により、指定されたクラスの学習画像に対応する画像を生成するように訓練される。したがって、製品を写した画像を学習画像として利用し、製品に含まれる欠陥をクラスにより指定すれば、生成器は、指定された欠陥を含む製品の写り得る画像を生成するように訓練される。この訓練された生成器を利用すれば、指定したクラスの欠陥を含む製品の写る画像を自動的に生成することができるようになる。つまり、製品に含まれる欠陥を識別する能力を学習モデルに習得させるための機械学習に利用可能なサンプル画像を自動的に生成することができるようになる。そのため、サンプル画像を用意するコストを低減することができる。そして、自動的に生成したサンプル画像を機械学習に利用することにより、機械学習に利用するサンプル画像の件数を増やすことができ、これによって、製品の良否を判定する能力の高い学習済みの学習モデルを構築することができるようになる。 Therefore, the inventors of the present invention considered using a generator (generation model) to mass-produce a plurality of images different from the prepared images, and to use the mass-produced images as training data for machine learning. For example, Non-Patent Document 1 proposes a method of constructing a generator (generative model) from prepared learning images and classes by machine learning. This generator is trained by machine learning to generate an image corresponding to the training image of the specified class. Therefore, if the image of the product is used as a learning image and the defects contained in the product are specified by class, the generator is trained to generate a possible image of the product containing the specified defects. With this trained generator, it will be possible to automatically generate images of products containing a specified class of defects. That is, it will be possible to automatically generate sample images that can be used for machine learning to equip the learning model with the ability to identify defects contained in the product. Therefore, the cost of preparing a sample image can be reduced. Then, by using the automatically generated sample image for machine learning, the number of sample images used for machine learning can be increased, and as a result, a trained learning model with a high ability to judge the quality of the product is learned. Will be able to build.

しかしながら、本件発明者らは、この生成器を利用する場面において、次のような問題点が生じ得ることを見出した。すなわち、製品に含まれる欠陥を識別すると共に、その欠陥の範囲を検出するように学習モデルを訓練する場合、欠陥の種別を示すラベルの他に、サンプル画像内における欠陥の範囲を示す境界情報(例えば、バウンディングボックスのグラウンドトゥルース)が教師データとして用意される。従来、この欠陥の範囲は、サンプル画像内において手動で指定され、指定された範囲を示す情報が境界情報としてサンプル画像に付与されていた。そのため、サンプル画像内で欠陥の範囲を指定する工程及び境界情報に付与する工程の分だけ機械学習に利用する学習データを用意する作業に手間がかかっていた。加えて、欠陥を識別し、その欠陥の範囲を特定するための知識を有さない作業者には、境界情報をサンプル画像に付与するのは困難であった。そのため、その知識を作業者に十分に習得させるのにも手間がかかっていた。したがって、欠陥の範囲を検出する能力を学習モデルに習得させるための機械学習に利用する学習データを用意するのにはコストがかかってしまうという問題点が生じ得る。 However, the present inventors have found that the following problems may occur in the situation of using this generator. That is, when training a learning model to identify defects contained in a product and detect the extent of the defect, in addition to the label indicating the type of defect, boundary information indicating the extent of the defect in the sample image (that is, For example, the ground truth of the bounding box) is prepared as teacher data. Conventionally, the range of this defect is manually specified in the sample image, and information indicating the specified range is added to the sample image as boundary information. Therefore, it takes time and effort to prepare learning data to be used for machine learning for the process of designating the range of defects in the sample image and the process of adding to the boundary information. In addition, it has been difficult for workers who do not have the knowledge to identify defects and identify the extent of the defects to add boundary information to the sample image. Therefore, it took time and effort to make the worker fully acquire the knowledge. Therefore, there may be a problem that it is costly to prepare learning data to be used for machine learning to make a learning model acquire the ability to detect a range of defects.

なお、このような問題点は、製品の良否を判定する能力と共に欠陥の範囲を検出する能力を学習モデルに習得させる場面だけではなく、何らかの対象物の範囲を検出する能力を学習モデルに習得させるあらゆる場面で生じ得る。例えば、対象者の顔を写した顔画像に対して目等の器官の写る範囲を検出する能力を学習モデルに習得させるための機械学習を行う場面を想定する。この場面において、サンプル画像内で目の写る範囲を手動により指定し、指定した範囲を示す情報を境界情報として手動でサンプル画像に付与していたのでは、機械学習に利用する学習データを用意するのに大きなコストがかかってしまう。 In addition, such a problem is not only a situation where the learning model learns the ability to detect the range of defects as well as the ability to judge the quality of the product, but also the learning model learns the ability to detect the range of some object. It can happen in any situation. For example, assume a scene in which machine learning is performed to make a learning model acquire the ability to detect the range of an organ such as an eye in a face image of a subject's face. In this scene, if the range in which the eyes are visible in the sample image is manually specified and the information indicating the specified range is manually added to the sample image as boundary information, learning data to be used for machine learning is prepared. However, it costs a lot.

本発明は、一側面では、このような実情を鑑みてなされたものであり、その目的は、対象物の範囲を検出する能力を習得させるための機械学習に利用する学習データを用意するのにかかるコストを低減する技術を提供することである。 The present invention, on the one hand, has been made in view of such circumstances, and an object thereof is to prepare learning data used for machine learning to acquire the ability to detect a range of an object. It is to provide a technique for reducing such a cost.

本発明は、上述した課題を解決するために、以下の構成を採用する。 The present invention adopts the following configuration in order to solve the above-mentioned problems.

すなわち、本発明の一側面に係る学習装置は、外観検査の対象となる製品を写した学習画像、前記製品に含まれる欠陥の種別を示すラベル、及び前記欠陥の範囲を示す境界情報の組み合わせによりそれぞれ構成された複数の学習データセットを取得するデータ取得部と、第1の機械学習を行うことで、前記各件の学習データセットに含まれる前記ラベルの入力に対して、入力された前記ラベルに関連付けられた前記学習画像に対応する画像を生成するように訓練された生成器を構築する第1学習処理部と、第2の機械学習を行うことで、前記各件の学習データセットに含まれる前記学習画像の入力に対して、入力された前記学習画像に関連付けられた前記ラベル及び前記境界情報と一致するように、入力された前記学習画像に写る前記製品に含まれる前記欠陥の種別及び範囲を推定するように訓練された推定器を構築する第2学習処理部と、を備える。 That is, the learning device according to one aspect of the present invention is based on a combination of a learning image showing a product to be visually inspected, a label indicating the type of defect contained in the product, and boundary information indicating the range of the defect. By performing the first machine learning and the data acquisition unit that acquires a plurality of learning data sets configured respectively, the input of the label is input to the input of the label included in each of the learning data sets. A first learning processing unit that constructs a generator trained to generate an image corresponding to the training image associated with the above, and a second machine learning are included in the training data set of each of the above cases. The type of defect contained in the product and reflected in the input learning image so as to match the label and the boundary information associated with the input learning image in response to the input of the learning image. It comprises a second learning processing unit that builds an estimator trained to estimate the range.

当該構成に係る学習装置によれば、指定されたラベルに関連付けられた学習画像に対応する画像を生成するように訓練された生成器を構築すると共に、学習画像に写る欠陥の種別及び範囲を推定するように訓練された推定器を構築することができる。これらのうち、生成器を利用することで、指定した欠陥を含む製品の写り得るサンプル画像を自動的に生成することができる。加えて、推定器を利用することで、生成されたサンプル画像に含まれる欠陥の範囲を推定し、推定した欠陥の範囲を示す情報を境界情報としてサンプル画像に自動的に付与することができる。したがって、当該構成によれば、学習データを用意する際に、サンプル画像内において欠陥の範囲を手動で指定する手間を省略することができる。そのため、対象物の範囲を検出する能力を習得させるための機械学習に利用する学習データを用意するのにかかるコストを低減することができる。 According to the learning device according to the configuration, a generator trained to generate an image corresponding to the training image associated with the specified label is constructed, and the type and range of defects appearing in the training image are estimated. You can build an estimator trained to do so. Of these, by using a generator, it is possible to automatically generate a sample image of a product containing a specified defect. In addition, by using an estimator, it is possible to estimate the range of defects contained in the generated sample image and automatically add information indicating the estimated range of defects to the sample image as boundary information. Therefore, according to the configuration, when preparing the training data, it is possible to omit the trouble of manually specifying the range of defects in the sample image. Therefore, it is possible to reduce the cost of preparing the learning data used for machine learning to acquire the ability to detect the range of the object.

なお、推定器及び生成器はそれぞれ、機械学習を実施可能な学習モデルにより構成される。学習モデルには、例えば、ニューラルネットワーク等が用いられてよい。第1の機械学習及び第2の機械学習を実行する順序は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。第1の機械学習及び第2の機械学習は、同時に実行されてもよいし、別々に実行されてもよい。第1及び第2の機械学習を別々に実行する場合、第1の機械学習は、第2の機械学習よりも先に実行されてもよいし、第2の機械学習よりも後に実行されてもよい。 The estimator and the generator are each composed of a learning model capable of performing machine learning. For the learning model, for example, a neural network or the like may be used. The order in which the first machine learning and the second machine learning are executed may not be particularly limited and may be appropriately selected depending on the embodiment. The first machine learning and the second machine learning may be executed simultaneously or separately. When the first and second machine learning are executed separately, the first machine learning may be executed before the second machine learning or may be executed after the second machine learning. good.

また、製品は、外観検査の対象となり得るものであれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。製品は、例えば、電子機器、電子部品、自動車部品、薬品、食品等の製造ラインで搬送される物であってよい。電子機器は、例えば、携帯電話等である。電子部品は、例えば、基盤、チップコンデンサ、液晶、リレーの巻線等である。自動車部品は、例えば、コンロッド、シャフト、エンジンブロック、パワーウィンドウスイッチ、パネル等である。薬品は、例えば、包装済みの錠剤、未包装の錠剤等であってよい。また、欠陥は、製品の良否に関係し得るものであれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。欠陥は、例えば、傷、汚れ、クラック、打痕、バリ、色ムラ、異物混入等である。 Further, the type of the product is not particularly limited as long as it can be subject to visual inspection, and may be appropriately selected according to the embodiment. The product may be, for example, a product transported on a production line for electronic devices, electronic parts, automobile parts, chemicals, foods, and the like. The electronic device is, for example, a mobile phone or the like. Electronic components are, for example, boards, chip capacitors, liquid crystals, relay windings, and the like. Automotive parts are, for example, connecting rods, shafts, engine blocks, power window switches, panels and the like. The chemical may be, for example, a packaged tablet, an unpackaged tablet, or the like. Further, the type of the defect may be not particularly limited as long as it may be related to the quality of the product, and may be appropriately selected according to the embodiment. Defects include, for example, scratches, stains, cracks, dents, burrs, color unevenness, foreign matter contamination, and the like.

上記一側面に係る学習装置において、前記生成器の入力は、エンコーダの出力に接続されてよく、前記生成器の出力は、前記推定器の入力及び判別器の入力に接続されてもよい。そして、前記第1の機械学習を行うことは、前記判別器に入力された入力画像が、前記生成器により生成された前記画像であるか前記複数の学習データセットから得られた前記学習画像であるかを判別するように前記判別器を訓練する第1訓練ステップと、前記生成器により生成される前記画像が、前記判別器による前記判別を誤らせるようなものとなるように、前記生成器を訓練する第2訓練ステップと、前記生成器により生成される前記画像が、前記推定器により前記画像に写る製品に含まれる欠陥の種別を推定した結果が前記ラベルと一致するようなものとなるように、前記生成器を訓練する第3訓練ステップと、前記ラベル及び潜在変数を前記生成器に入力することで前記生成器により生成された前記画像が、前記学習画像を復元したものとなるように、前記エンコーダ及び前記生成器を訓練する第4訓練ステップであって、前記潜在変数は、前記ラベル及び前記学習画像を前記エンコーダに入力することで前記エンコーダから得られる出力に基づいて導出される、第4訓練ステップと、前記エンコーダから得られる出力に基づいて導出される前記潜在変数の分布が所定の事前分布に従うように前記エンコーダを訓練する第5訓練ステップと、を含んでもよい。当該構成によれば、学習済みの生成器及び推定器を適切に構築することができ、これにより、対象物の範囲を検出する能力を習得させるための機械学習に利用する学習データを用意するのにかかるコストを低減することができる。なお、第1~第5訓練ステップを実行する順序は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。 In the learning apparatus according to the above aspect, the input of the generator may be connected to the output of the encoder, and the output of the generator may be connected to the input of the estimator and the input of the discriminator. Then, performing the first machine learning means that the input image input to the discriminator is the image generated by the generator or the training image obtained from the plurality of training data sets. The generator is provided so that the first training step of training the discriminator to discriminate is present and the image generated by the generator is such that the discriminator misleads the discriminator. The second training step to be trained and the image generated by the generator so that the result of estimating the type of defect contained in the product shown in the image by the estimator matches the label. In addition, the third training step for training the generator and the image generated by the generator by inputting the label and the latent variable into the generator are restored to the training image. In the fourth training step of training the encoder and the generator, the latent variables are derived based on the output obtained from the encoder by inputting the label and the training image into the encoder. It may include a fourth training step and a fifth training step in which the encoder is trained so that the distribution of the latent variables derived from the output obtained from the encoder follows a predetermined prior distribution. According to this configuration, a trained generator and estimator can be appropriately constructed, thereby preparing learning data to be used for machine learning to acquire the ability to detect a range of an object. It is possible to reduce the cost required for. The order in which the first to fifth training steps are executed may not be particularly limited, and may be appropriately selected depending on the embodiment.

上記一側面に係る学習装置において、前記生成器の出力は、判別器の入力に接続されてよい。そして、前記第1の機械学習を行うことは、前記判別器に入力された入力画像が、前記生成器により生成された前記画像であるか前記複数の学習データセットから得られた前記学習画像であるかを判別するように、前記判別器を訓練する第1訓練ステップと、前記生成器により生成される前記画像が、前記判別器による前記判別を誤らせるようなものとなるように、前記生成器を訓練する第2訓練ステップと、を交互に行うことを含んでもよい。当該構成によれば、学習済みの生成器を適切に構築することができ、これにより、対象物の範囲を検出する能力を習得させるための機械学習に利用する学習データを用意するのにかかるコストを低減することができる。 In the learning apparatus according to the above aspect, the output of the generator may be connected to the input of the discriminator. Then, performing the first machine learning means that the input image input to the discriminator is the image generated by the generator or the learning image obtained from the plurality of training data sets. The generator so that the first training step of training the discriminator and the image generated by the generator are such that the discriminator misleads the discriminator. It may include alternating with the second training step of training. According to this configuration, a trained generator can be properly constructed, and thus the cost of preparing training data to be used for machine learning to acquire the ability to detect a range of an object. Can be reduced.

上記一側面に係る学習装置において、前記欠陥の範囲は、バウンディングボックスにより表されてよい。当該構成によれば、対象物の範囲としてバウンディングボックスを検出する能力を習得させるための機械学習に利用する学習データを用意するのにかかるコストを低減することができる。 In the learning device according to the above aspect, the range of the defect may be represented by a bounding box. According to this configuration, it is possible to reduce the cost of preparing learning data used for machine learning to acquire the ability to detect a bounding box as a range of an object.

また、本発明の一側面に係る画像生成装置は、上記いずれかの形態に係る学習装置により構築された前記生成器に、前記欠陥の種別を示す入力値を与えることで、前記欠陥を含む前記製品を写した生成画像を生成する生成部と、前記学習装置により構築された前記推定器に生成された前記生成画像を与えることで、前記生成画像に写る前記製品に含まれる前記欠陥の種別及び範囲を推定する推定部と、前記生成画像に写る前記製品に含まれる前記欠陥の種別を推定した結果が前記入力値により示される前記欠陥の種別と一致するか否かを判定する判定部と、前記欠陥の種別を推定した結果が前記入力値により示される前記欠陥の種別と一致すると前記判定部が判定した場合に、生成した前記生成画像と前記欠陥の範囲を推定した結果とを関連付けて所定の記憶領域に格納する画像保存部と、を備える。当該構成によれば、対象物の範囲を手動で指定する手間を省略した上で、対象物の範囲を検出する能力を習得させるための機械学習に利用可能な学習データを生成することができる。 Further, the image generator according to one aspect of the present invention includes the defect by giving an input value indicating the type of the defect to the generator constructed by the learning device according to any one of the above embodiments. By giving the generated image generated to the estimator constructed by the learning device and the generation unit that generates the generated image showing the product, the type of the defect contained in the product reflected in the generated image and the type of the defect and the defect. An estimation unit for estimating the range, a determination unit for determining whether or not the result of estimating the type of the defect included in the product shown in the generated image matches the type of the defect indicated by the input value, and a determination unit. When the determination unit determines that the result of estimating the type of the defect matches the type of the defect indicated by the input value, the generated image is associated with the result of estimating the range of the defect. It is provided with an image storage unit for storing in the storage area of. According to this configuration, it is possible to generate learning data that can be used for machine learning to acquire the ability to detect the range of an object without having to manually specify the range of the object.

また、上記各形態に係る学習装置及び画像生成装置は、製品の良否を判定する能力と共に欠陥の範囲を検出する能力を学習モデルに習得させる場面だけではなく、何らかの対象物の範囲を検出する能力を学習モデルに習得させるあらゆる場面に適用されてよい。例えば、上記各形態に係る学習装置及び画像生成装置は、対象者の顔を写した顔画像に対して目等の器官の写る範囲を検出する能力を学習モデルに習得させる場面に適用されてもよい。 Further, the learning device and the image generation device according to each of the above forms are not only capable of learning the learning model the ability to detect the range of defects as well as the ability to judge the quality of the product, but also the ability to detect the range of some object. May be applied to any situation that makes the learning model learn. For example, even if the learning device and the image generation device according to each of the above forms are applied to a scene in which the learning model learns the ability to detect the range of an organ such as an eye in a face image of a subject's face. good.

例えば、本発明の一側面に係る学習装置は、対象物を写した学習画像、前記対象物の種別を示すラベル、及び前記学習画像内における前記対象物の範囲を示す境界情報の組み合わせによりそれぞれ構成された複数の学習データセットを取得するデータ取得部と、第1の機械学習を行うことで、前記各件の学習データセットに含まれる前記ラベルの入力に対して、入力された前記ラベルに関連付けられた前記学習画像に対応する画像を生成するように訓練された生成器を構築する第1学習処理部と、第2の機械学習を行うことで、前記各件の学習データセットに含まれる前記学習画像の入力に対して、入力された前記学習画像に関連付けられた前記ラベル及び前記境界情報と一致するように、入力された前記学習画像に写る前記対象物の種別及び範囲を推定するように訓練された推定器を構築する第2学習処理部と、を備える。 For example, the learning device according to one aspect of the present invention is configured by a combination of a learning image showing an object, a label indicating the type of the object, and boundary information indicating the range of the object in the learning image. By performing the first machine learning with the data acquisition unit that acquires a plurality of learned data sets, the input of the label included in each of the learning data sets is associated with the input label. The first learning processing unit for constructing a generator trained to generate an image corresponding to the learned image and the second machine learning are included in each of the learning data sets. To estimate the type and range of the object appearing in the input learning image so as to match the label and the boundary information associated with the input learning image with respect to the input of the learning image. It includes a second learning processing unit that builds a trained estimator.

なお、「対象物」は、画像から検出する対象となり得るものであれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。対象物は、例えば、上記外観検査の対象となる製品、製品に含まれる欠陥、人物、人物の身体部位(例えば、顔等)、人物の器官等であってよい。また、道路交通の監視画像に本発明を利用する場合、対象物は、例えば、車、歩行者、標識等であってもよい。 The type of the "object" is not particularly limited as long as it can be an object to be detected from the image, and may be appropriately selected according to the embodiment. The object may be, for example, a product to be visually inspected, a defect contained in the product, a person, a body part of the person (for example, a face, etc.), an organ of the person, or the like. Further, when the present invention is used for a monitoring image of road traffic, the object may be, for example, a car, a pedestrian, a sign, or the like.

本発明の一側面に係る画像生成システムは、上記いずれかの形態に係る学習装置及び画像生成装置により構成されてもよい。また、本発明の一側面に係る推定システムは、上記いずれかの形態に係る学習装置、上記画像生成装置、生成された画像を利用して、画像に写る対象物の範囲を推定する推定器を構築する推定器生成装置、及び構築された推定器を利用して、画像に写る対象物の範囲を推定する推定装置により構成されてよい。更に、上記各形態に係る学習装置、画像生成装置、画像生成システム、及び推定システムそれぞれの別の形態として、本発明の一側面は、以上の各構成を実現する情報処理方法であってもよいし、プログラムであってもよいし、このようなプログラムを記憶した、コンピュータ等が読み取り可能な記憶媒体であってもよい。ここで、コンピュータ等が読み取り可能な記憶媒体とは、プログラム等の情報を、電気的、磁気的、光学的、機械的、又は、化学的作用によって蓄積する媒体である。 The image generation system according to one aspect of the present invention may be configured by the learning device and the image generation device according to any one of the above forms. Further, the estimation system according to one aspect of the present invention uses the learning device according to any one of the above forms, the image generation device, and the generated image to estimate the range of the object to be captured in the image. It may be configured by an estimator generator to be constructed and an estimator to estimate the range of an object to be captured in an image by using the constructed estimator. Further, as another form of each of the learning device, the image generation device, the image generation system, and the estimation system according to each of the above forms, one aspect of the present invention may be an information processing method that realizes each of the above configurations. However, it may be a program, or it may be a storage medium that stores such a program and can be read by a computer or the like. Here, the storage medium that can be read by a computer or the like is a medium that stores information such as a program by electrical, magnetic, optical, mechanical, or chemical action.

例えば、本発明の一側面に係る学習方法は、コンピュータが、外観検査の対象となる製品を写した学習画像、前記製品に含まれる欠陥の種別を示すラベル、及び前記欠陥の範囲を示す境界情報の組み合わせによりそれぞれ構成された複数の学習データセットを取得するステップと、第1の機械学習を行うことで、前記各件の学習データセットに含まれる前記ラベルの入力に対して、入力された前記ラベルに関連付けられた前記学習画像に対応する画像を生成するように訓練された生成器を構築するステップと、第2の機械学習を行うことで、前記各件の学習データセットに含まれる前記学習画像の入力に対して、入力された前記学習画像に関連付けられた前記ラベル及び前記境界情報と一致するように、入力された前記学習画像に写る前記製品に含まれる前記欠陥の種別及び範囲を推定するように訓練された推定器を構築するステップと、を実行する、情報処理方法である。 For example, in the learning method according to one aspect of the present invention, the computer uses a learning image showing a product to be visually inspected, a label indicating the type of defect contained in the product, and boundary information indicating the range of the defect. By performing the step of acquiring a plurality of learning data sets configured by the combination of the above and the first machine learning, the input of the label included in the learning data set of each of the above cases is input. The learning included in each of the training datasets by performing a step of building a generator trained to generate an image corresponding to the training image associated with the label and a second machine learning. For the input of the image, the type and range of the defect contained in the product reflected in the input learning image is estimated so as to match the label and the boundary information associated with the input learning image. It is an information processing method that performs, with the steps of building an estimator trained to do.

また、例えば、本発明の一側面に係る学習プログラムは、コンピュータに、外観検査の対象となる製品を写した学習画像、前記製品に含まれる欠陥の種別を示すラベル、及び前記欠陥の範囲を示す境界情報の組み合わせによりそれぞれ構成された複数の学習データセットを取得するステップと、第1の機械学習を行うことで、前記各件の学習データセットに含まれる前記ラベルの入力に対して、入力された前記ラベルに関連付けられた前記学習画像に対応する画像を生成するように訓練された生成器を構築するステップと、第2の機械学習を行うことで、前記各件の学習データセットに含まれる前記学習画像の入力に対して、入力された前記学習画像に関連付けられた前記ラベル及び前記境界情報と一致するように、入力された前記学習画像に写る前記製品に含まれる前記欠陥の種別及び範囲を推定するように訓練された推定器を構築するステップと、を実行させるための、プログラムである。 Further, for example, the learning program according to one aspect of the present invention shows on a computer a learning image showing a product to be visually inspected, a label indicating the type of defect contained in the product, and a range of the defect. By performing the step of acquiring a plurality of learning data sets configured by the combination of boundary information and the first machine learning, it is input to the input of the label included in each of the learning data sets. A step of constructing a generator trained to generate an image corresponding to the training image associated with the label and a second machine learning are included in each of the training data sets. The type and range of the defect contained in the product reflected in the input training image so as to match the label and the boundary information associated with the input training image with respect to the input of the training image. It is a program to build and execute an estimator trained to estimate.

また、例えば、本発明の一側面に係る学習方法は、コンピュータが、対象物を写した学習画像、前記対象物の種別を示すラベル、及び前記学習画像内における前記対象物の範囲を示す境界情報の組み合わせによりそれぞれ構成された複数の学習データセットを取得するステップと、第1の機械学習を行うことで、前記各件の学習データセットに含まれる前記ラベルの入力に対して、入力された前記ラベルに関連付けられた前記学習画像に対応する画像を生成するように訓練された生成器を構築するステップと、第2の機械学習を行うことで、前記各件の学習データセットに含まれる前記学習画像の入力に対して、入力された前記学習画像に関連付けられた前記ラベル及び前記境界情報と一致するように、入力された前記学習画像に写る前記対象物の種別及び範囲を推定するように訓練された推定器を構築するステップと、を実行する、情報処理方法である。 Further, for example, in the learning method according to one aspect of the present invention, the computer uses a learning image showing an object, a label indicating the type of the object, and boundary information indicating the range of the object in the learning image. By performing the step of acquiring a plurality of learning data sets configured by the combination of the above and the first machine learning, the input of the label included in the learning data set of each of the above cases is input. The learning included in each of the training datasets by performing a step of building a generator trained to generate an image corresponding to the training image associated with the label and a second machine learning. Training to estimate the type and range of the object appearing in the input learning image so that the input of the image matches the label and the boundary information associated with the input learning image. It is an information processing method that executes the steps of constructing the estimator.

また、例えば、本発明の一側面に係る学習プログラムは、コンピュータに、対象物を写した学習画像、前記対象物の種別を示すラベル、及び前記学習画像内における前記対象物の範囲を示す境界情報の組み合わせによりそれぞれ構成された複数の学習データセットを取得するステップと、第1の機械学習を行うことで、前記各件の学習データセットに含まれる前記ラベルの入力に対して、入力された前記ラベルに関連付けられた前記学習画像に対応する画像を生成するように訓練された生成器を構築するステップと、第2の機械学習を行うことで、前記各件の学習データセットに含まれる前記学習画像の入力に対して、入力された前記学習画像に関連付けられた前記ラベル及び前記境界情報と一致するように、入力された前記学習画像に写る前記対象物の種別及び範囲を推定するように訓練された推定器を構築するステップと、を実行させるための、プログラムである。 Further, for example, in the learning program according to one aspect of the present invention, a learning image showing an object, a label indicating the type of the object, and boundary information indicating the range of the object in the learning image are shown on a computer. By performing the step of acquiring a plurality of learning data sets configured by the combination of the above and the first machine learning, the input of the label included in the learning data set of each of the above cases is input. The learning included in each of the training datasets by performing a step of building a generator trained to generate an image corresponding to the training image associated with the label and a second machine learning. Training to estimate the type and range of the object appearing in the input learning image so that the input of the image matches the label and the boundary information associated with the input learning image. It is a program to execute the steps to build the estimator.

本発明によれば、対象物の範囲を検出する能力を習得させるための機械学習に利用する学習データを用意するのにかかるコストを低減することができる。 According to the present invention, it is possible to reduce the cost of preparing learning data used for machine learning to acquire the ability to detect a range of an object.

図1は、本発明が適用される場面の一例を模式的に例示する。FIG. 1 schematically illustrates an example of a situation in which the present invention is applied. 図2は、実施の形態に係る学習画像に指定された欠陥の範囲を示す境界情報の一例を模式的に例示する。FIG. 2 schematically illustrates an example of boundary information indicating the range of defects specified in the learning image according to the embodiment. 図3は、実施の形態に係る学習装置のハードウェア構成の一例を模式的に例示する。FIG. 3 schematically illustrates an example of the hardware configuration of the learning device according to the embodiment. 図4は、実施の形態に係る画像生成装置のハードウェア構成の一例を模式的に例示する。FIG. 4 schematically illustrates an example of the hardware configuration of the image generator according to the embodiment. 図5は、実施の形態に係る推定器生成装置のハードウェア構成の一例を模式的に例示する。FIG. 5 schematically illustrates an example of the hardware configuration of the estimator generator according to the embodiment. 図6は、実施の形態に係る検査装置のハードウェア構成の一例を模式的に例示する。FIG. 6 schematically illustrates an example of the hardware configuration of the inspection device according to the embodiment. 図7は、実施の形態に係る学習装置のソフトウェア構成の一例を模式的に例示する。FIG. 7 schematically illustrates an example of the software configuration of the learning device according to the embodiment. 図8Aは、実施の形態に係る学習ネットワークの機械学習の過程の一例を模式的に例示する。FIG. 8A schematically illustrates an example of the machine learning process of the learning network according to the embodiment. 図8Bは、実施の形態に係る学習ネットワークの機械学習の過程の一例を模式的に例示する。FIG. 8B schematically illustrates an example of the machine learning process of the learning network according to the embodiment. 図9は、実施の形態に係る画像生成装置のソフトウェア構成の一例を模式的に例示する。FIG. 9 schematically illustrates an example of the software configuration of the image generator according to the embodiment. 図10は、実施の形態に係る推定器生成装置のソフトウェア構成の一例を模式的に例示する。FIG. 10 schematically illustrates an example of the software configuration of the estimator generator according to the embodiment. 図11は、実施の形態に係る検査装置のソフトウェア構成の一例を模式的に例示する。FIG. 11 schematically illustrates an example of the software configuration of the inspection device according to the embodiment. 図12は、実施の形態に係る学習装置の処理手順の一例を例示する。FIG. 12 illustrates an example of the processing procedure of the learning device according to the embodiment. 図13は、実施の形態に係る画像生成装置の処理手順の一例を例示する。FIG. 13 illustrates an example of the processing procedure of the image generator according to the embodiment. 図14は、実施の形態に係る推定器生成装置の処理手順の一例を例示する。FIG. 14 illustrates an example of the processing procedure of the estimator generator according to the embodiment. 図15は、実施の形態に係る検査装置の処理手順の一例を例示する。FIG. 15 illustrates an example of the processing procedure of the inspection device according to the embodiment. 図16は、変形例に係る学習ネットワークの構成の一例を模式的に例示する。FIG. 16 schematically illustrates an example of the configuration of the learning network according to the modified example. 図17Aは、変形例に係る学習ネットワークの機械学習の過程の一例を模式的に例示する。FIG. 17A schematically illustrates an example of the machine learning process of the learning network according to the modified example. 図17Bは、変形例に係る学習ネットワークの機械学習の過程の一例を模式的に例示する。FIG. 17B schematically illustrates an example of the machine learning process of the learning network according to the modified example. 図17Cは、変形例に係る推定器の機械学習の仮定の過程を模式的に例示する。FIG. 17C schematically illustrates the process of assuming machine learning of the estimator according to the modified example. 図18は、変形例に係る第1の機械学習の処理手順の一例を例示する。FIG. 18 illustrates an example of the processing procedure of the first machine learning according to the modified example. 図19は、本発明が適用される場面の変形例を模式的に例示する。FIG. 19 schematically illustrates a modified example of the scene to which the present invention is applied. 図20は、変形例に係る検出装置のソフトウェア構成の一例を模式的に例示する。FIG. 20 schematically illustrates an example of the software configuration of the detection device according to the modified example.

以下、本発明の一側面に係る実施の形態(以下、「本実施形態」とも表記する)を、図面に基づいて説明する。ただし、以下で説明する本実施形態は、あらゆる点において本発明の例示に過ぎない。本発明の範囲を逸脱することなく種々の改良や変形を行うことができることは言うまでもない。つまり、本発明の実施にあたって、実施形態に応じた具体的構成が適宜採用されてもよい。なお、本実施形態において登場するデータを自然言語により説明しているが、より具体的には、コンピュータが認識可能な疑似言語、コマンド、パラメータ、マシン語等で指定される。 Hereinafter, an embodiment according to one aspect of the present invention (hereinafter, also referred to as “the present embodiment”) will be described with reference to the drawings. However, the embodiments described below are merely examples of the present invention in all respects. Needless to say, various improvements and modifications can be made without departing from the scope of the present invention. That is, in carrying out the present invention, a specific configuration according to the embodiment may be appropriately adopted. The data appearing in the present embodiment are described in natural language, but more specifically, they are specified in a pseudo language, a command, a parameter, a machine language, etc. that can be recognized by a computer.

§1 適用例
まず、図1を用いて、本発明が適用される場面の一例について説明する。図1は、製品Rの外観検査に本発明を適用した場面の一例を模式的に例示する。製品Rに含まれ得る欠陥は、本発明の「対象物」の一例である。ただし、本発明の適用範囲は、以下で例示する外観検査の例に限られる訳ではない。本発明は、画像に写る何らかの対象物の範囲を検出するあらゆる場面に適用可能である。
§1 Application example First, an example of a situation in which the present invention is applied will be described with reference to FIG. FIG. 1 schematically illustrates an example of a situation in which the present invention is applied to a visual inspection of a product R. The defect that may be contained in the product R is an example of the "object" of the present invention. However, the scope of application of the present invention is not limited to the examples of visual inspection illustrated below. The present invention is applicable to all situations where the range of any object in an image is detected.

図1に例示されるとおり、本実施形態に係る検査システム100は、ネットワークを介して接続される学習装置1、画像生成装置2、推定器生成装置3、及び検査装置4を備えている。これにより、検査システム100は、製品Rの良否を検査するように構成される。学習装置1、画像生成装置2、推定器生成装置3、及び検査装置4の間のネットワークの種類は、特に限定されなくてもよく、例えば、インターネット、無線通信網、移動通信網、電話網、専用網等から適宜選択されてよい。 As illustrated in FIG. 1, the inspection system 100 according to the present embodiment includes a learning device 1, an image generation device 2, an estimator generation device 3, and an inspection device 4 connected via a network. As a result, the inspection system 100 is configured to inspect the quality of the product R. The type of network between the learning device 1, the image generator 2, the estimator generator 3, and the inspection device 4 may be not particularly limited, and may be, for example, the Internet, a wireless communication network, a mobile communication network, a telephone network, and the like. It may be appropriately selected from a dedicated network or the like.

なお、図1の例では、学習装置1、画像生成装置2、推定器生成装置3、及び検査装置4はそれぞれ別個のコンピュータである。しかしながら、検査システム100の構成は、このような例に限定されなくてもよい。学習装置1、画像生成装置2、推定器生成装置3、及び検査装置4の少なくともいずれかのペアは一体のコンピュータであってもよい。また、学習装置1、画像生成装置2、推定器生成装置3、及び検査装置4はそれぞれ複数台のコンピュータにより構成されてもよい。 In the example of FIG. 1, the learning device 1, the image generation device 2, the estimator generation device 3, and the inspection device 4 are separate computers. However, the configuration of the inspection system 100 does not have to be limited to such an example. At least one pair of the learning device 1, the image generator 2, the estimator generator 3, and the inspection device 4 may be an integrated computer. Further, the learning device 1, the image generation device 2, the estimator generation device 3, and the inspection device 4 may each be composed of a plurality of computers.

本実施形態に係る学習装置1は、外観検査の対象となる製品Rを写した画像を生成するための生成器50、及び生成器50により生成された画像に対して製品Rに含まれる欠陥の種別及び範囲を推定するための推定器52を構築するように構成されたコンピュータである。具体的には、学習装置1は、外観検査の対象となる製品Rを写した学習画像61、製品Rに含まれる欠陥の種別を示すラベル63、及び欠陥の範囲を示す境界情報65の組み合わせによりそれぞれ構成された複数の学習データセット60を取得する。 The learning device 1 according to the present embodiment is a generator 50 for generating an image of the product R to be visually inspected, and a defect included in the product R with respect to the image generated by the generator 50. It is a computer configured to construct an estimator 52 for estimating a type and a range. Specifically, the learning device 1 is formed by a combination of a learning image 61 showing the product R to be visually inspected, a label 63 indicating the type of defect included in the product R, and boundary information 65 indicating the range of defects. A plurality of training data sets 60 configured for each are acquired.

続いて、学習装置1は、第1の機械学習を実行することで、各学習データセット60に含まれるラベル63の入力に対して、入力されたラベル63に関連付けられた学習画像61に対応する画像を生成するように訓練された生成器50を構築する。学習画像61に対応する画像とは、学習画像61に類似し、製品Rの写り得る画像である。生成器50は、学習画像61の分布に従った(沿う)画像を生成するように訓練される。更に、学習装置1は、第2の機械学習を実行することで、各学習データセット60に含まれる学習画像61の入力に対して、入力された学習画像61に関連付けられたラベル63及び境界情報65と一致するように、入力された学習画像61に写る製品Rに含まれる欠陥の種別及び範囲を推定するように訓練された推定器52を構築する。 Subsequently, the learning device 1 executes the first machine learning to correspond to the learning image 61 associated with the input label 63 with respect to the input of the label 63 included in each learning data set 60. Build a generator 50 trained to generate an image. The image corresponding to the learning image 61 is an image similar to the learning image 61 and in which the product R can be captured. The generator 50 is trained to generate an image that follows (follows) the distribution of the training image 61. Further, by executing the second machine learning, the learning device 1 receives the input of the learning image 61 included in each learning data set 60, and the label 63 and the boundary information associated with the input learning image 61. Construct an estimator 52 trained to estimate the type and range of defects contained in the product R in the input learning image 61 so as to match 65.

ここで、図2を用いて、欠陥の範囲を指定する方法の一例について説明する。図2は、本実施形態に係る学習画像61内に指定された欠陥の範囲を示す境界情報65の一例を模式的に例示する。図2の例では、学習画像61には、楕円形状の欠陥612を含む製品Rが写っている。学習画像61の横幅がWピクセルであり、縦幅がHピクセルであるのに対して、欠陥612の横幅はwピクセルであり、縦幅はhピクセルである。この欠陥612の範囲は、学習画像61内で欠陥612の写る領域を含むように適宜指定されてよい。 Here, an example of a method of designating a defect range will be described with reference to FIG. FIG. 2 schematically illustrates an example of boundary information 65 indicating a range of defects specified in the learning image 61 according to the present embodiment. In the example of FIG. 2, the learning image 61 shows the product R including the elliptical defect 612. The width of the training image 61 is W pixel and the height is H pixel, whereas the width of the defect 612 is w pixel and the height is h pixel. The range of the defect 612 may be appropriately specified so as to include the area in which the defect 612 appears in the learning image 61.

欠陥612の範囲の表現方法は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。本実施形態では、欠陥612の範囲は、バウンディングボックスにより表される。図2に示されるとおり、欠陥612の中心座標(cx、cy)、横幅(wピクセル)、及び縦幅(hピクセル)により、バウンディングボックスを規定することができる。つまり、欠陥612の外周を囲む矩形状の範囲(図の点線で示される範囲)が、バウンディングボックスの一例である。ただし、バウンディングボックスを規定する形式は、このような例に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。例えば、バウンディングボックスは、中心座標及び欠陥612を含むように指定された円(例えば、外接円)の半径により規定されてよい。この場合、欠陥612を含む円形状の範囲が、バウンディングボックスとなる。本実施形態に係る学習装置1によれば、学習画像61に対応する画像を生成するように訓練された生成器50を構築すると共に、このようなバウンディングボックスにより表される欠陥の範囲を学習画像61内で推定するように訓練された推定器52を構築することができる。 The method for expressing the range of the defect 612 does not have to be particularly limited, and may be appropriately selected depending on the embodiment. In this embodiment, the range of defects 612 is represented by a bounding box. As shown in FIG. 2, the bounding box can be defined by the center coordinates (cx, cy), width (w pixels), and height (h pixels) of the defect 612. That is, the rectangular range (the range shown by the dotted line in the figure) surrounding the outer circumference of the defect 612 is an example of the bounding box. However, the format that defines the bounding box does not have to be limited to such an example, and may be appropriately selected depending on the embodiment. For example, the bounding box may be defined by the center coordinates and the radius of the circle (eg, the circumscribed circle) designated to include the defect 612. In this case, the range of the circular shape including the defect 612 becomes the bounding box. According to the learning device 1 according to the present embodiment, the generator 50 trained to generate the image corresponding to the learning image 61 is constructed, and the range of defects represented by such a bounding box is defined as the learning image. An estimator 52 trained to estimate within 61 can be constructed.

図1に戻り、本実施形態に係る画像生成装置2は、学習装置1により構築された学習済みの生成器50及び推定器52を利用して、製品Rの写り得る画像を生成すると共に、生成した画像内で欠陥の範囲を推定するように構成されたコンピュータである。具体的には、画像生成装置2は、学習装置1により構築された生成器50に、欠陥の種別を示す入力値71を与えることで、欠陥を含む製品Rを写した生成画像73を生成する。生成された生成画像73は、上記学習画像61に対応する。 Returning to FIG. 1, the image generation device 2 according to the present embodiment uses the trained generator 50 and the estimator 52 constructed by the learning device 1 to generate and generate a possible image of the product R. It is a computer configured to estimate the extent of defects in the image. Specifically, the image generation device 2 gives the generator 50 constructed by the learning device 1 an input value 71 indicating the type of the defect, thereby generating a generated image 73 showing the product R including the defect. .. The generated generated image 73 corresponds to the learning image 61.

次に、画像生成装置2は、学習装置1により構築された推定器52に生成された生成画像73を与えることで、生成画像73に写る製品Rに含まれる欠陥の種別及び範囲を推定する。続いて、画像生成装置2は、生成画像73に写る製品に含まれる欠陥の種別を推定した結果が入力値71により示される欠陥の種別と一致するか否かを判定する。そして、画像生成装置2は、欠陥の種別を推定した結果が入力値71により示される欠陥の種別と一致すると判定した場合に、生成した生成画像73と欠陥の範囲を推定した結果とを関連付けて所定の記憶領域に格納する。 Next, the image generation device 2 estimates the type and range of defects included in the product R reflected in the generated image 73 by giving the generated image 73 generated to the estimator 52 constructed by the learning device 1. Subsequently, the image generation device 2 determines whether or not the result of estimating the type of defect included in the product shown in the generated image 73 matches the type of defect indicated by the input value 71. Then, when the image generation device 2 determines that the result of estimating the defect type matches the defect type indicated by the input value 71, the generated image 73 is associated with the result of estimating the defect range. Store in a predetermined storage area.

本実施形態に係る推定器生成装置3は、製品Rの良否を推定するための推定器を構築するように構成されたコンピュータである。具体的に、推定器生成装置3は、製品Rを写したサンプル画像及び正解データの組み合わせによりそれぞれ構成された複数の学習データセットを取得する。正解データは、サンプル画像に写る製品Rの良否を判定した結果(すなわち、正解)を示す。本実施形態では、正解データは、サンプル画像に写る製品Rに含まれる欠陥の範囲を示す境界情報を含む。そして、推定器生成装置3は、複数の学習データセットを利用した機械学習を実施することで、与えられた画像に写る製品Rの良否を判定すると共に、製品Rが欠陥を含む場合には、その欠陥の範囲を検出する能力を習得した学習済みの推定器を構築する。なお、推定器生成装置3は、画像生成装置2により生成された生成画像73をサンプル画像として利用し、かつ生成画像73に関連付けられた欠陥の範囲を推定した結果を示す情報を正解データとして利用することができる。 The estimator generator 3 according to the present embodiment is a computer configured to construct an estimator for estimating the quality of the product R. Specifically, the estimator generator 3 acquires a plurality of learning data sets each composed of a combination of a sample image showing the product R and correct answer data. The correct answer data shows the result (that is, the correct answer) of determining the quality of the product R shown in the sample image. In the present embodiment, the correct answer data includes boundary information indicating the range of defects included in the product R shown in the sample image. Then, the estimator generator 3 performs machine learning using a plurality of learning data sets to determine the quality of the product R appearing in the given image, and if the product R contains a defect, the estimator generator 3 determines the quality of the product R. Build a trained estimator that has acquired the ability to detect the extent of the defect. The estimator generator 3 uses the generated image 73 generated by the image generator 2 as a sample image, and uses information indicating the result of estimating the range of defects associated with the generated image 73 as correct answer data. can do.

これに対して、本実施形態に係る検査装置4は、推定器生成装置3により構築された学習済みの推定器を利用して、製品Rの良否を判定するように構成されたコンピュータである。検査装置4は、画像に写る対象物の範囲を推定する推定装置の一例である。具体的に、検査装置4は、外観検査の対象となる製品Rの写る対象画像を取得する。本実施形態では、検査装置4には、カメラCAが接続されている。検査装置4は、このカメラCAにより製品Rを撮影することで対象画像を取得する。次に、検査装置4は、取得した対象画像を学習済みの推定器に入力し、学習済みの推定器の演算処理を実行する。これにより、検査装置4は、製品Rの良否を判定した結果、及び製品Rに含まれる欠陥の範囲を検出した結果に対応する出力値を学習済みの推定器から取得する。そして、検査装置4は、学習済みの推定器から得られた出力値に基づいて製品Rの良否を判定した結果に関する情報を出力する。 On the other hand, the inspection device 4 according to the present embodiment is a computer configured to judge the quality of the product R by using the trained estimator constructed by the estimator generation device 3. The inspection device 4 is an example of an estimation device that estimates the range of an object to be captured in an image. Specifically, the inspection device 4 acquires a target image of the product R to be visually inspected. In the present embodiment, the camera CA is connected to the inspection device 4. The inspection device 4 acquires a target image by photographing the product R with this camera CA. Next, the inspection device 4 inputs the acquired target image to the trained estimator, and executes the arithmetic processing of the trained estimator. As a result, the inspection device 4 acquires an output value corresponding to the result of determining the quality of the product R and the result of detecting the range of defects included in the product R from the trained estimator. Then, the inspection device 4 outputs information regarding the result of determining the quality of the product R based on the output value obtained from the learned estimator.

以上のとおり、本実施形態に係る学習装置1によれば、欠陥の種別を指定するラベル63に関連付けられた学習画像61に対応する画像を生成するように訓練された生成器50を構築すると共に、学習画像61に写る欠陥の種別及び範囲を推定するように訓練された推定器52を構築することができる。これらのうち、生成器50を利用することで、指定した欠陥を含む製品の写り得るサンプル画像を自動的に生成することができる。加えて、推定器52を利用することで、生成されたサンプル画像に写る製品Rに含まれる欠陥の範囲を推定し、推定した欠陥の範囲を示す情報を境界情報としてサンプル画像に自動的に付与することができる。したがって、本実施形態によれば、学習データを用意する際に、サンプル画像内において欠陥の範囲を手動で指定する手間を省略することができる。そのため、欠陥の範囲を検出する能力を習得させるための機械学習に利用する学習データを用意するのにかかるコストを低減することができる。 As described above, according to the learning device 1 according to the present embodiment, the generator 50 trained to generate an image corresponding to the learning image 61 associated with the label 63 that specifies the type of defect is constructed. , An estimator 52 trained to estimate the type and extent of defects in the learning image 61 can be constructed. Of these, by using the generator 50, it is possible to automatically generate a sample image of the product including the specified defect. In addition, by using the estimator 52, the range of defects contained in the product R reflected in the generated sample image is estimated, and information indicating the estimated range of defects is automatically added to the sample image as boundary information. can do. Therefore, according to the present embodiment, when preparing the training data, it is possible to omit the trouble of manually specifying the range of defects in the sample image. Therefore, it is possible to reduce the cost of preparing the learning data used for machine learning to acquire the ability to detect the range of defects.

また、本実施形態に係る画像生成装置2では、学習装置1により構築された生成器50及び推定器52を利用することで、欠陥の範囲を手動で指定する手間を省略した上で、欠陥の範囲を検出する能力を習得させるための機械学習に利用可能な学習データを生成することができる。加えて、本実施形態では、画像生成装置2により生成された生成画像73をサンプル画像として利用し、かつ生成画像73に関連付けられた欠陥の範囲を推定した結果を示す情報を正解データとして利用することができる。これにより、推定器生成装置3において、学習データセットを収集するコストを低減することができる。更に、本実施形態では、画像生成装置2により生成された生成画像73をサンプル画像として利用し、かつ生成画像73に関連付けられた欠陥の範囲を推定した結果を示す情報を正解データとして利用することで、推定器の機械学習に利用する学習データセットの件数を増やすことができる。これにより、検査装置4において、製品Rに含まれ得る欠陥の範囲を推定する精度を高めることができる。 Further, in the image generation device 2 according to the present embodiment, by using the generator 50 and the estimator 52 constructed by the learning device 1, it is possible to save the trouble of manually specifying the range of the defect and to eliminate the trouble of manually specifying the defect. It is possible to generate learning data that can be used for machine learning to acquire the ability to detect a range. In addition, in the present embodiment, the generated image 73 generated by the image generation device 2 is used as a sample image, and the information indicating the result of estimating the range of defects associated with the generated image 73 is used as correct answer data. be able to. This makes it possible to reduce the cost of collecting the training data set in the estimator generator 3. Further, in the present embodiment, the generated image 73 generated by the image generation device 2 is used as a sample image, and the information indicating the result of estimating the range of defects associated with the generated image 73 is used as correct answer data. Therefore, the number of training data sets used for machine learning of the estimator can be increased. This makes it possible to improve the accuracy of estimating the range of defects that may be contained in the product R in the inspection device 4.

なお、外観検査の対象となる製品Rは、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。製品Rは、例えば、電子部品、自動車部品等の製造ラインで搬送される物であってよい。電子部品は、例えば、基盤、チップコンデンサ、液晶、リレーの巻線等である。自動車部品は、例えば、コンロッド、シャフト、エンジンブロック、パワーウィンドウスイッチ、パネル等である。また、良否の判定は、製品Rに欠陥があるか否かを単に判定することであってもよいし、製品Rに欠陥がある否かを判定することに加えて、その欠陥の種類を識別することを含んでもよい。欠陥は、例えば、傷、汚れ、クラック、打痕、埃、バリ、色ムラ等である。 The product R to be inspected for appearance may not be particularly limited and may be appropriately selected according to the embodiment. The product R may be, for example, a product transported on a production line such as an electronic component or an automobile component. Electronic components are, for example, boards, chip capacitors, liquid crystals, relay windings, and the like. Automotive parts are, for example, connecting rods, shafts, engine blocks, power window switches, panels and the like. Further, the quality determination may be simply determining whether or not the product R has a defect, and in addition to determining whether or not the product R has a defect, the type of the defect is identified. May include doing. The defects are, for example, scratches, stains, cracks, dents, dust, burrs, color unevenness, and the like.

§2 構成例
[ハードウェア構成]
<学習装置>
次に、図3を用いて、本実施形態に係る学習装置1のハードウェア構成の一例について説明する。図3は、本実施形態に係る学習装置1のハードウェア構成の一例を模式的に例示する。
§2 Configuration example [Hardware configuration]
<Learning device>
Next, an example of the hardware configuration of the learning device 1 according to the present embodiment will be described with reference to FIG. FIG. 3 schematically illustrates an example of the hardware configuration of the learning device 1 according to the present embodiment.

図3に示されるとおり、本実施形態に係る学習装置1は、制御部11、記憶部12、通信インタフェース13、入力装置14、出力装置15、及びドライブ16が電気的に接続されたコンピュータである。なお、図3では、通信インタフェースを「通信I/F」と記載している。 As shown in FIG. 3, the learning device 1 according to the present embodiment is a computer to which a control unit 11, a storage unit 12, a communication interface 13, an input device 14, an output device 15, and a drive 16 are electrically connected. .. In FIG. 3, the communication interface is described as "communication I / F".

制御部11は、ハードウェアプロセッサであるCPU(Central Processing Unit)、RAM(Random Access Memory)、ROM(Read Only Memory)等を含み、プログラム及び各種データに基づいて情報処理を実行するように構成される。記憶部12は、メモリの一例であり、例えば、ハードディスクドライブ、ソリッドステートドライブ等で構成される。本実施形態では、記憶部12は、学習プログラム121、複数の学習データセット60、第1学習結果データ123、第2学習結果データ125等の各種情報を記憶する。 The control unit 11 includes a CPU (Central Processing Unit), a RAM (Random Access Memory), a ROM (Read Only Memory), and the like, which are hardware processors, and is configured to execute information processing based on a program and various data. To. The storage unit 12 is an example of a memory, and is composed of, for example, a hard disk drive, a solid state drive, or the like. In the present embodiment, the storage unit 12 stores various information such as the learning program 121, a plurality of learning data sets 60, the first learning result data 123, and the second learning result data 125.

学習プログラム121は、製品Rの写り得る画像を生成するよう訓練された生成器50、及び画像に写る製品Rに含まれ得る欠陥の種別及び範囲を推定するよう訓練された推定器52を構築する後述の情報処理(図12)を学習装置1に実行させるためのプログラムである。学習プログラム121は、当該情報処理の一連の命令を含む。各学習データセット60は、外観検査の対象となる製品Rを写した学習画像61、製品Rに含まれる欠陥の種別を示すラベル63、及び欠陥の範囲を示す境界情報65の組み合わせにより構成される。各学習データセット60は、生成器50及び推定器52の機械学習に利用される。学習データセット60の件数は、実施の形態に応じて適宜決定されてよい。第1学習結果データ123は、機械学習により構築された学習済みの生成器50の設定を行うためのデータである。第2学習結果データ125は、機械学習により構築された学習済みの推定器52の設定を行うためのデータである。第1学習結果データ123及び第2学習結果データ125は、学習プログラム121の実行結果として生成される。詳細は後述する。 The learning program 121 builds a generator 50 trained to generate a viable image of product R and an estimator 52 trained to estimate the types and extents of defects that may be contained in product R appearing in the image. This is a program for causing the learning device 1 to execute information processing (FIG. 12) described later. The learning program 121 includes a series of instructions for the information processing. Each training data set 60 is composed of a combination of a training image 61 showing the product R to be visually inspected, a label 63 indicating the type of defect included in the product R, and boundary information 65 indicating the range of defects. .. Each training data set 60 is used for machine learning of the generator 50 and the estimator 52. The number of training data sets 60 may be appropriately determined according to the embodiment. The first learning result data 123 is data for setting the trained generator 50 constructed by machine learning. The second learning result data 125 is data for setting the trained estimator 52 constructed by machine learning. The first learning result data 123 and the second learning result data 125 are generated as the execution result of the learning program 121. Details will be described later.

通信インタフェース13は、例えば、有線LAN(Local Area Network)モジュール、無線LANモジュール等であり、ネットワークを介した有線又は無線通信を行うためのインタフェースである。学習装置1は、この通信インタフェース13を利用することで、ネットワークを介したデータ通信を他の情報処理装置(例えば、画像生成装置2、推定器生成装置3)と行うことができる。 The communication interface 13 is, for example, a wired LAN (Local Area Network) module, a wireless LAN module, or the like, and is an interface for performing wired or wireless communication via a network. By using this communication interface 13, the learning device 1 can perform data communication via a network with another information processing device (for example, an image generation device 2 and an estimator generation device 3).

入力装置14は、例えば、マウス、キーボード等の入力を行うための装置である。また、出力装置15は、例えば、ディスプレイ、スピーカ等の出力を行うための装置である。オペレータは、入力装置14及び出力装置15を利用することで、学習装置1を操作することができる。 The input device 14 is, for example, a device for inputting a mouse, a keyboard, or the like. Further, the output device 15 is, for example, a device for outputting a display, a speaker, or the like. The operator can operate the learning device 1 by using the input device 14 and the output device 15.

ドライブ16は、例えば、CDドライブ、DVDドライブ等であり、記憶媒体91に記憶されたプログラムを読み込むためのドライブ装置である。ドライブ16の種類は、記憶媒体91の種類に応じて適宜選択されてよい。上記学習プログラム121及び複数の学習データセット60の少なくともいずれかは、この記憶媒体91に記憶されていてもよい。 The drive 16 is, for example, a CD drive, a DVD drive, or the like, and is a drive device for reading a program stored in the storage medium 91. The type of the drive 16 may be appropriately selected according to the type of the storage medium 91. At least one of the learning program 121 and the plurality of learning data sets 60 may be stored in the storage medium 91.

記憶媒体91は、コンピュータその他装置、機械等が、記録されたプログラム等の情報を読み取り可能なように、当該プログラム等の情報を、電気的、磁気的、光学的、機械的又は化学的作用によって蓄積する媒体である。学習装置1は、この記憶媒体91から、上記学習プログラム121及び複数の学習データセット60の少なくともいずれかを取得してもよい。 The storage medium 91 transfers the information of the program or the like by electrical, magnetic, optical, mechanical or chemical action so that the computer or other device, the machine or the like can read the information of the recorded program or the like. It is a medium to accumulate. The learning device 1 may acquire at least one of the learning program 121 and the plurality of learning data sets 60 from the storage medium 91.

ここで、図3では、記憶媒体91の一例として、CD、DVD等のディスク型の記憶媒体を例示している。しかしながら、記憶媒体91の種類は、ディスク型に限定される訳ではなく、ディスク型以外であってもよい。ディスク型以外の記憶媒体として、例えば、フラッシュメモリ等の半導体メモリを挙げることができる。 Here, in FIG. 3, as an example of the storage medium 91, a disc-type storage medium such as a CD or a DVD is illustrated. However, the type of the storage medium 91 is not limited to the disc type, and may be other than the disc type. Examples of storage media other than the disk type include semiconductor memories such as flash memories.

なお、学習装置1の具体的なハードウェア構成に関して、実施形態に応じて、適宜、構成要素の省略、置換及び追加が可能である。例えば、制御部11は、複数のハードウェアプロセッサを含んでもよい。ハードウェアプロセッサは、マイクロプロセッサ、FPGA(field-programmable gate array)、DSP(digital signal processor)等で構成されてよい。記憶部12は、制御部11に含まれるRAM及びROMにより構成されてもよい。通信インタフェース13、入力装置14、出力装置15及びドライブ16の少なくともいずれかは省略されてもよい。学習装置1は、複数台のコンピュータで構成されてもよい。この場合、各コンピュータのハードウェア構成は、一致していてもよいし、一致していなくてもよい。また、学習装置1は、提供されるサービス専用に設計された情報処理装置の他、汎用のサーバ装置、PC(Personal Computer)等であってもよい。 Regarding the specific hardware configuration of the learning device 1, components can be omitted, replaced, or added as appropriate according to the embodiment. For example, the control unit 11 may include a plurality of hardware processors. The hardware processor may be composed of a microprocessor, an FPGA (field-programmable gate array), a DSP (digital signal processor), or the like. The storage unit 12 may be composed of a RAM and a ROM included in the control unit 11. At least one of the communication interface 13, the input device 14, the output device 15, and the drive 16 may be omitted. The learning device 1 may be composed of a plurality of computers. In this case, the hardware configurations of the computers may or may not match. Further, the learning device 1 may be a general-purpose server device, a PC (Personal Computer), or the like, in addition to an information processing device designed exclusively for the provided service.

<画像生成装置>
次に、図4を用いて、本実施形態に係る画像生成装置2のハードウェア構成の一例について説明する。図4は、本実施形態に係る画像生成装置2のハードウェア構成の一例を模式的に例示する。
<Image generator>
Next, an example of the hardware configuration of the image generation device 2 according to the present embodiment will be described with reference to FIG. FIG. 4 schematically illustrates an example of the hardware configuration of the image generation device 2 according to the present embodiment.

図4に示されるとおり、本実施形態に係る画像生成装置2は、制御部21、記憶部22、通信インタフェース23、入力装置24、出力装置25、及びドライブ26が電気的に接続されたコンピュータである。本実施形態に係る画像生成装置2の制御部21~ドライブ26それぞれは、上記学習装置1の制御部11~ドライブ16それぞれと同様に構成されてよい。 As shown in FIG. 4, the image generation device 2 according to the present embodiment is a computer to which a control unit 21, a storage unit 22, a communication interface 23, an input device 24, an output device 25, and a drive 26 are electrically connected. be. Each of the control unit 21 to the drive 26 of the image generation device 2 according to the present embodiment may be configured in the same manner as each of the control unit 11 to the drive 16 of the learning device 1.

すなわち、制御部21は、ハードウェアプロセッサであるCPU、RAM、ROM等を含み、プログラム及びデータに基づいて各種情報処理を実行するように構成される。記憶部22は、例えば、ハードディスクドライブ、ソリッドステートドライブ等で構成される。記憶部22は、画像生成プログラム221、第1学習結果データ123、第2学習結果データ125、1又は複数のデータセット等の各種情報を記憶する。 That is, the control unit 21 includes a CPU, RAM, ROM, etc., which are hardware processors, and is configured to execute various information processing based on programs and data. The storage unit 22 is composed of, for example, a hard disk drive, a solid state drive, or the like. The storage unit 22 stores various information such as the image generation program 221, the first learning result data 123, the second learning result data 125, or a plurality of data sets.

画像生成プログラム221は、学習済みの生成器50を利用して生成画像73を生成すると共に、学習済みの推定器52を利用して生成画像73内で欠陥の範囲を推定する後述の情報処理(図13)を画像生成装置2に実行させるためのプログラムである。画像生成プログラム221は、当該情報処理の一連の命令を含む。各データセットは、生成画像73、ラベル75、及び境界情報77の組み合わせにより構成される。ラベル75は、生成画像73を生成する際に生成器50に与えた入力値71に対応する。境界情報77は、推定器52により欠陥の範囲を推定した結果を示す。各データセットは、画像生成プログラム221の実行結果として生成される。詳細は後述する。 The image generation program 221 uses the trained generator 50 to generate the generated image 73, and also uses the trained estimator 52 to estimate the range of defects in the generated image 73, which will be described later. FIG. 13) is a program for causing the image generation device 2 to execute. The image generation program 221 includes a series of instructions for the information processing. Each data set is composed of a combination of the generated image 73, the label 75, and the boundary information 77. The label 75 corresponds to the input value 71 given to the generator 50 when the generated image 73 is generated. The boundary information 77 shows the result of estimating the range of defects by the estimator 52. Each data set is generated as a result of executing the image generation program 221. Details will be described later.

通信インタフェース23は、例えば、有線LANモジュール、無線LANモジュール等であり、ネットワークを介した有線又は無線通信を行うためのインタフェースである。画像生成装置2は、この通信インタフェース23を利用することで、ネットワークを介したデータ通信を他の情報処理装置(例えば、学習装置1、推定器生成装置3)と行うことができる。 The communication interface 23 is, for example, a wired LAN module, a wireless LAN module, or the like, and is an interface for performing wired or wireless communication via a network. By using this communication interface 23, the image generation device 2 can perform data communication via a network with another information processing device (for example, a learning device 1 and an estimator generation device 3).

入力装置24は、例えば、マウス、キーボード等の入力を行うための装置である。また、出力装置25は、例えば、ディスプレイ、スピーカ等の出力を行うための装置である。オペレータは、入力装置24及び出力装置25を利用することで、画像生成装置2を操作することができる。 The input device 24 is, for example, a device for inputting a mouse, a keyboard, or the like. Further, the output device 25 is, for example, a device for outputting a display, a speaker, or the like. The operator can operate the image generation device 2 by using the input device 24 and the output device 25.

ドライブ26は、例えば、CDドライブ、DVDドライブ等であり、記憶媒体92に記憶されたプログラムを読み込むためのドライブ装置である。上記画像生成プログラム221、第1学習結果データ123及び第2学習結果データ125のうちの少なくともいずれかは、記憶媒体92に記憶されていてもよい。また、画像生成装置2は、記憶媒体92から、上記画像生成プログラム221、第1学習結果データ123及び第2学習結果データ125のうちの少なくともいずれかを取得してもよい。 The drive 26 is, for example, a CD drive, a DVD drive, or the like, and is a drive device for reading a program stored in the storage medium 92. At least one of the image generation program 221, the first learning result data 123, and the second learning result data 125 may be stored in the storage medium 92. Further, the image generation device 2 may acquire at least one of the image generation program 221, the first learning result data 123, and the second learning result data 125 from the storage medium 92.

なお、画像生成装置2の具体的なハードウェア構成に関して、実施形態に応じて、適宜、構成要素の省略、置換及び追加が可能である。例えば、制御部21は、複数のハードウェアプロセッサを含んでもよい。ハードウェアプロセッサは、マイクロプロセッサ、FPGA、DSP等で構成されてよい。記憶部22は、制御部21に含まれるRAM及びROMにより構成されてもよい。通信インタフェース23、入力装置24、出力装置25及びドライブ26の少なくともいずれかは省略されてもよい。画像生成装置2は、複数台のコンピュータで構成されてもよい。この場合、各コンピュータのハードウェア構成は、一致していてもよいし、一致していなくてもよい。また、画像生成装置2は、提供されるサービス専用に設計された情報処理装置の他、汎用のサーバ装置、汎用のPC等であってもよい。 Regarding the specific hardware configuration of the image generation device 2, components can be omitted, replaced, or added as appropriate according to the embodiment. For example, the control unit 21 may include a plurality of hardware processors. The hardware processor may be composed of a microprocessor, FPGA, DSP and the like. The storage unit 22 may be composed of a RAM and a ROM included in the control unit 21. At least one of the communication interface 23, the input device 24, the output device 25, and the drive 26 may be omitted. The image generation device 2 may be composed of a plurality of computers. In this case, the hardware configurations of the computers may or may not match. Further, the image generation device 2 may be a general-purpose server device, a general-purpose PC, or the like, in addition to an information processing device designed exclusively for the provided service.

<推定器生成装置>
次に、図5を用いて、本実施形態に係る推定器生成装置3のハードウェア構成の一例について説明する。図5は、本実施形態に係る推定器生成装置3のハードウェア構成の一例を模式的に例示する。
<Estimator generator>
Next, an example of the hardware configuration of the estimator generator 3 according to the present embodiment will be described with reference to FIG. FIG. 5 schematically illustrates an example of the hardware configuration of the estimator generator 3 according to the present embodiment.

図5に示されるとおり、本実施形態に係る推定器生成装置3は、制御部31、記憶部32、通信インタフェース33、入力装置34、出力装置35、及びドライブ36が電気的に接続されたコンピュータである。本実施形態に係る推定器生成装置3の制御部31~ドライブ36それぞれは、上記学習装置1の制御部11~ドライブ16それぞれと同様に構成されてよい。 As shown in FIG. 5, the estimator generator 3 according to the present embodiment is a computer to which a control unit 31, a storage unit 32, a communication interface 33, an input device 34, an output device 35, and a drive 36 are electrically connected. Is. Each of the control unit 31 to the drive 36 of the estimator generation device 3 according to the present embodiment may be configured in the same manner as each of the control unit 11 to the drive 16 of the learning device 1.

すなわち、制御部31は、ハードウェアプロセッサであるCPU、RAM、ROM等を含み、プログラム及びデータに基づいて各種情報処理を実行するように構成される。記憶部32は、例えば、ハードディスクドライブ、ソリッドステートドライブ等で構成される。記憶部32は、推定器生成プログラム321、学習データセット322、第3学習結果データ325等の各種情報を記憶する。 That is, the control unit 31 includes a CPU, RAM, ROM, etc., which are hardware processors, and is configured to execute various information processing based on programs and data. The storage unit 32 is composed of, for example, a hard disk drive, a solid state drive, or the like. The storage unit 32 stores various information such as the estimator generation program 321, the learning data set 322, and the third learning result data 325.

推定器生成プログラム321は、製品Rの良否を判定するための推定器を構築する後述の情報処理(図14)を推定器生成装置3に実行させるためのプログラムである。推定器生成プログラム321は、当該情報処理の一連の命令を含む。学習データセット322は、この推定器の機械学習に利用される。第3学習結果データ325は、機械学習により構築された学習済みの推定器の設定を行うためのデータである。第3学習結果データ325は、推定器生成プログラム321の実行結果として生成される。詳細は後述する。 The estimator generation program 321 is a program for causing the estimator generation device 3 to execute information processing (FIG. 14) described later, which constructs an estimator for determining the quality of the product R. The estimator generation program 321 includes a series of instructions for the information processing. The training data set 322 is used for machine learning of this estimator. The third learning result data 325 is data for setting the trained estimator constructed by machine learning. The third learning result data 325 is generated as an execution result of the estimator generation program 321. Details will be described later.

通信インタフェース33は、例えば、有線LANモジュール、無線LANモジュール等であり、ネットワークを介した有線又は無線通信を行うためのインタフェースである。推定器生成装置3は、この通信インタフェース33を利用することで、ネットワークを介したデータ通信を他の情報処理装置(例えば、学習装置1、画像生成装置2、検査装置4)と行うことができる。 The communication interface 33 is, for example, a wired LAN module, a wireless LAN module, or the like, and is an interface for performing wired or wireless communication via a network. By using this communication interface 33, the estimator generation device 3 can perform data communication via a network with other information processing devices (for example, a learning device 1, an image generation device 2, and an inspection device 4). ..

入力装置34は、例えば、マウス、キーボード等の入力を行うための装置である。また、出力装置35は、例えば、ディスプレイ、スピーカ等の出力を行うための装置である。オペレータは、入力装置34及び出力装置35を利用することで、推定器生成装置3を操作することができる。 The input device 34 is, for example, a device for inputting a mouse, a keyboard, or the like. Further, the output device 35 is, for example, a device for outputting a display, a speaker, or the like. The operator can operate the estimator generator 3 by using the input device 34 and the output device 35.

ドライブ36は、例えば、CDドライブ、DVDドライブ等であり、記憶媒体93に記憶されたプログラムを読み込むためのドライブ装置である。上記推定器生成プログラム321及び学習データセット322のうちの少なくともいずれかは、記憶媒体93に記憶されていてもよい。また、推定器生成装置3は、記憶媒体93から、上記推定器生成プログラム321及び学習データセット322のうちの少なくともいずれかを取得してもよい。 The drive 36 is, for example, a CD drive, a DVD drive, or the like, and is a drive device for reading a program stored in the storage medium 93. At least one of the estimator generation program 321 and the learning data set 322 may be stored in the storage medium 93. Further, the estimator generation device 3 may acquire at least one of the estimator generation program 321 and the learning data set 322 from the storage medium 93.

なお、推定器生成装置3の具体的なハードウェア構成に関して、実施形態に応じて、適宜、構成要素の省略、置換及び追加が可能である。例えば、制御部31は、複数のハードウェアプロセッサを含んでもよい。ハードウェアプロセッサは、マイクロプロセッサ、FPGA、DSP等で構成されてよい。記憶部32は、制御部31に含まれるRAM及びROMにより構成されてもよい。通信インタフェース33、入力装置34、出力装置35及びドライブ36の少なくともいずれかは省略されてもよい。推定器生成装置3は、複数台のコンピュータで構成されてもよい。この場合、各コンピュータのハードウェア構成は、一致していてもよいし、一致していなくてもよい。また、推定器生成装置3は、提供されるサービス専用に設計された情報処理装置の他、汎用のサーバ装置、汎用のPC等であってもよい。 Regarding the specific hardware configuration of the estimator generator 3, components can be omitted, replaced, or added as appropriate according to the embodiment. For example, the control unit 31 may include a plurality of hardware processors. The hardware processor may be composed of a microprocessor, FPGA, DSP and the like. The storage unit 32 may be composed of a RAM and a ROM included in the control unit 31. At least one of the communication interface 33, the input device 34, the output device 35, and the drive 36 may be omitted. The estimator generator 3 may be composed of a plurality of computers. In this case, the hardware configurations of the computers may or may not match. Further, the estimator generator 3 may be a general-purpose server device, a general-purpose PC, or the like, in addition to an information processing device designed exclusively for the provided service.

<検査装置>
次に、図6を用いて、本実施形態に係る検査装置4のハードウェア構成の一例について説明する。図6は、本実施形態に係る検査装置4のハードウェア構成の一例を模式的に例示する。
<Inspection equipment>
Next, an example of the hardware configuration of the inspection device 4 according to the present embodiment will be described with reference to FIG. FIG. 6 schematically illustrates an example of the hardware configuration of the inspection device 4 according to the present embodiment.

図6に示されるとおり、本実施形態に係る検査装置4は、制御部41、記憶部42、通信インタフェース43、入力装置44、出力装置45、ドライブ46、及び外部インタフェース47が電気的に接続されたコンピュータである。なお、図6では、外部インタフェースを「外部I/F」と記載している。検査装置4の制御部41~ドライブ46はそれぞれ、上記学習装置1の制御部11~ドライブ16それぞれと同様に構成されてよい。 As shown in FIG. 6, in the inspection device 4 according to the present embodiment, the control unit 41, the storage unit 42, the communication interface 43, the input device 44, the output device 45, the drive 46, and the external interface 47 are electrically connected to each other. It is a computer. In FIG. 6, the external interface is described as "external I / F". The control units 41 to 46 of the inspection device 4 may be configured in the same manner as the control units 11 to 16 of the learning device 1, respectively.

すなわち、制御部41は、ハードウェアプロセッサであるCPU、RAM、ROM等を含み、プログラム及びデータに基づいて各種情報処理を実行するように構成される。記憶部42は、例えば、ハードディスクドライブ、ソリッドステートドライブ等で構成される。記憶部42は、検査プログラム421、第3学習結果データ325等の各種情報を記憶する。 That is, the control unit 41 includes a CPU, RAM, ROM, etc., which are hardware processors, and is configured to execute various information processing based on programs and data. The storage unit 42 is composed of, for example, a hard disk drive, a solid state drive, or the like. The storage unit 42 stores various information such as the inspection program 421 and the third learning result data 325.

検査プログラム421は、推定器生成装置3により構築された学習済みの推定器を利用して、対象画像に写る製品Rの良否を判定する後述する情報処理(図15)を検査装置4に実行させるためのプログラムである。検査プログラム421は、当該情報処理の一連の命令を含む。詳細は後述する。 The inspection program 421 uses the trained estimator constructed by the estimator generation device 3 to cause the inspection device 4 to execute information processing (FIG. 15) described later for determining the quality of the product R shown in the target image. It is a program for. The inspection program 421 includes a series of instructions for the information processing. Details will be described later.

通信インタフェース43は、例えば、有線LANモジュール、無線LANモジュール等であり、ネットワークを介した有線又は無線通信を行うためのインタフェースである。検査装置4は、この通信インタフェース43を利用することで、ネットワークを介したデータ通信を他の情報処理装置(例えば、推定器生成装置3)と行うことができる。 The communication interface 43 is, for example, a wired LAN module, a wireless LAN module, or the like, and is an interface for performing wired or wireless communication via a network. By using this communication interface 43, the inspection device 4 can perform data communication via a network with another information processing device (for example, an estimator generation device 3).

入力装置44は、例えば、マウス、キーボード等の入力を行うための装置である。また、出力装置45は、例えば、ディスプレイ、スピーカ等の出力を行うための装置である。オペレータは、入力装置44及び出力装置45を利用することで、検査装置4を操作することができる。 The input device 44 is, for example, a device for inputting a mouse, a keyboard, or the like. Further, the output device 45 is, for example, a device for outputting a display, a speaker, or the like. The operator can operate the inspection device 4 by using the input device 44 and the output device 45.

ドライブ46は、例えば、CDドライブ、DVDドライブ等であり、記憶媒体94に記憶されたプログラムを読み込むためのドライブ装置である。上記検査プログラム421及び第3学習結果データ325のうちの少なくともいずれかは、記憶媒体94に記憶されていてもよい。また、検査装置4は、記憶媒体94から、上記検査プログラム421及び第3学習結果データ325のうちの少なくともいずれかを取得してもよい。 The drive 46 is, for example, a CD drive, a DVD drive, or the like, and is a drive device for reading a program stored in the storage medium 94. At least one of the inspection program 421 and the third learning result data 325 may be stored in the storage medium 94. Further, the inspection device 4 may acquire at least one of the inspection program 421 and the third learning result data 325 from the storage medium 94.

外部インタフェース47は、例えば、USB(Universal Serial Bus)ポート、専用ポート等であり、外部装置と接続するためのインタフェースである。外部インタフェース47の種類及び数は、接続される外部装置の種類及び数に応じて適宜選択されてよい。本実施形態では、検査装置4は、外部インタフェース47を介して、カメラCAに接続される。 The external interface 47 is, for example, a USB (Universal Serial Bus) port, a dedicated port, or the like, and is an interface for connecting to an external device. The type and number of the external interfaces 47 may be appropriately selected according to the type and number of connected external devices. In this embodiment, the inspection device 4 is connected to the camera CA via the external interface 47.

カメラCAは、製品Rを写した対象画像を取得するのに利用される。カメラCAの種類及び配置場所は、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。カメラCAには、例えば、デジタルカメラ、ビデオカメラ等の公知のカメラが利用されてよい。また、カメラCAは、製品Rが搬送される製造ラインの近傍に配置されてよい。なお、カメラCAが通信インタフェースを備える場合、検査装置4は、外部インタフェース47ではなく、通信インタフェース43を介して、カメラCAに接続されてもよい。 The camera CA is used to acquire a target image of the product R. The type and location of the camera CA are not particularly limited and may be appropriately determined according to the embodiment. As the camera CA, for example, a known camera such as a digital camera or a video camera may be used. Further, the camera CA may be arranged in the vicinity of the production line on which the product R is conveyed. When the camera CA includes a communication interface, the inspection device 4 may be connected to the camera CA via the communication interface 43 instead of the external interface 47.

なお、検査装置4の具体的なハードウェア構成に関して、実施形態に応じて、適宜、構成要素の省略、置換及び追加が可能である。例えば、制御部41は、複数のハードウェアプロセッサを含んでもよい。ハードウェアプロセッサは、マイクロプロセッサ、FPGA、DSP等で構成されてよい。記憶部42は、制御部41に含まれるRAM及びROMにより構成されてもよい。通信インタフェース43、入力装置44、出力装置45、ドライブ46及び外部インタフェース47の少なくともいずれかは省略されてもよい。検査装置4は、複数台のコンピュータで構成されてもよい。この場合、各コンピュータのハードウェア構成は、一致していてもよいし、一致していなくてもよい。また、検査装置4は、提供されるサービス専用に設計された情報処理装置の他、汎用のサーバ装置、汎用のデスクトップPC、ノートPC、タブレットPC、スマートフォンを含む携帯電話等が用いられてよい。 Regarding the specific hardware configuration of the inspection device 4, the components can be omitted, replaced, or added as appropriate according to the embodiment. For example, the control unit 41 may include a plurality of hardware processors. The hardware processor may be composed of a microprocessor, FPGA, DSP and the like. The storage unit 42 may be composed of a RAM and a ROM included in the control unit 41. At least one of the communication interface 43, the input device 44, the output device 45, the drive 46, and the external interface 47 may be omitted. The inspection device 4 may be composed of a plurality of computers. In this case, the hardware configurations of the computers may or may not match. Further, as the inspection device 4, in addition to an information processing device designed exclusively for the provided service, a general-purpose server device, a general-purpose desktop PC, a notebook PC, a tablet PC, a mobile phone including a smartphone, or the like may be used.

[ソフトウェア構成]
<学習装置>
次に、図7を用いて、本実施形態に係る学習装置1のソフトウェア構成の一例について説明する。図7は、本実施形態に係る学習装置1のソフトウェア構成の一例を模式的に例示する。
[Software configuration]
<Learning device>
Next, an example of the software configuration of the learning device 1 according to the present embodiment will be described with reference to FIG. 7. FIG. 7 schematically illustrates an example of the software configuration of the learning device 1 according to the present embodiment.

学習装置1の制御部11は、記憶部12に記憶された学習プログラム121をRAMに展開する。そして、制御部11は、RAMに展開された学習プログラム121をCPUにより解釈及び実行して、各構成要素を制御する。これによって、図7に示されるとおり、本実施形態に係る学習装置1は、データ取得部111、第1学習処理部112、第2学習処理部113、及び保存処理部114をソフトウェアモジュールとして備えるコンピュータとして動作する。すなわち、本実施形態では、学習装置1の各ソフトウェアモジュールは、制御部11(CPU)により実現される。 The control unit 11 of the learning device 1 expands the learning program 121 stored in the storage unit 12 into the RAM. Then, the control unit 11 interprets and executes the learning program 121 expanded in the RAM by the CPU, and controls each component. As a result, as shown in FIG. 7, the learning device 1 according to the present embodiment is a computer including a data acquisition unit 111, a first learning processing unit 112, a second learning processing unit 113, and a storage processing unit 114 as software modules. Works as. That is, in the present embodiment, each software module of the learning device 1 is realized by the control unit 11 (CPU).

データ取得部111は、外観検査の対象となる製品Rを写した学習画像61、製品Rに含まれる欠陥の種別を示すラベル63、及び欠陥の範囲を示す境界情報65の組み合わせによりそれぞれ構成された複数の学習データセット60を取得する。第1学習処理部112は、第1の機械学習を実行することで、各学習データセット60に含まれるラベル63の入力に対して、入力されたラベル63に関連付けられた学習画像61に対応する画像を生成するように訓練された生成器50を構築する。第2学習処理部113は、第2の機械学習を実行することで、各学習データセット60に含まれる学習画像61の入力に対して、入力された学習画像61に関連付けられたラベル63及び境界情報65と一致するように、入力された学習画像61に写る製品Rに含まれる欠陥の種別及び範囲を推定するように訓練された推定器52を構築する。保存処理部114は、構築された学習済みの生成器50に関する情報、及び構築された学習済みの推定器52に関する情報を所定の記憶領域に保存する。 The data acquisition unit 111 is composed of a combination of a learning image 61 showing the product R to be visually inspected, a label 63 indicating the type of defect included in the product R, and boundary information 65 indicating the range of defects. Acquire a plurality of training data sets 60. By executing the first machine learning, the first learning processing unit 112 corresponds to the learning image 61 associated with the input label 63 with respect to the input of the label 63 included in each learning data set 60. Build a generator 50 trained to generate an image. By executing the second machine learning, the second learning processing unit 113 receives the input of the training image 61 included in each learning data set 60 with respect to the label 63 and the boundary associated with the input learning image 61. An estimator 52 trained to estimate the type and range of defects contained in the product R appearing in the input learning image 61 is constructed so as to match the information 65. The storage processing unit 114 stores information about the constructed trained generator 50 and information about the constructed trained estimator 52 in a predetermined storage area.

(学習ネットワーク)
次に、図8A及び図8Bを更に用いて、本実施形態に係る生成器50及び推定器52を含む学習ネットワーク500の構成の一例について説明する。図8A及び図8Bは、生成器50を訓練する第1の機械学習及び推定器52を訓練する第2の機械学習の過程の一例を模式的に例示する。
(Learning network)
Next, an example of the configuration of the learning network 500 including the generator 50 and the estimator 52 according to the present embodiment will be described with reference to FIGS. 8A and 8B. 8A and 8B schematically illustrate an example of a first machine learning process that trains the generator 50 and a second machine learning process that trains the estimator 52.

各図に示されるとおり、本実施形態では、エンコーダ56、生成器50、判別器54、及び推定器52により学習ネットワーク500が構成されている。第1学習処理部112及び第2学習処理部113は、この機械学習を実施する対象となる学習ネットワーク500を保持している。学習ネットワーク500では、入力側から、エンコーダ56、生成器50、並びに判別器54及び推定器52の順に配置されている。判別器54及び推定器52は出力側で並列に配置されている。エンコーダ56は、学習画像61及びラベル63の入力を受け付け、事前分布に沿う潜在変数に対応する出力値を出力するように構成される。エンコーダ56の出力は、生成器50の入力に接続されている。生成器50の出力は、推定器52の入力及び判別器54の入力に接続されている。 As shown in each figure, in the present embodiment, the learning network 500 is configured by the encoder 56, the generator 50, the discriminator 54, and the estimator 52. The first learning processing unit 112 and the second learning processing unit 113 hold a learning network 500 for carrying out this machine learning. In the learning network 500, the encoder 56, the generator 50, the discriminator 54, and the estimator 52 are arranged in this order from the input side. The discriminator 54 and the estimator 52 are arranged in parallel on the output side. The encoder 56 is configured to accept the inputs of the training image 61 and the label 63 and output the output values corresponding to the latent variables along the prior distribution. The output of the encoder 56 is connected to the input of the generator 50. The output of the generator 50 is connected to the input of the estimator 52 and the input of the discriminator 54.

本実施形態に係るエンコーダ56、生成器50、推定器52及び判別器54はそれぞれ、いわゆる深層学習に用いられる多層構造のニューラルネットワークにより構成されている。エンコーダ56は、入力層571、中間層(隠れ層)572、及び出力層573を備えている。生成器50は、入力層511、中間層(隠れ層)512、及び出力層513を備えている。推定器52は、入力層531、中間層(隠れ層)532、及び出力層533を備えている。判別器54は、入力層551、中間層(隠れ層)552、及び出力層553を備えている。ただし、エンコーダ56、生成器50、推定器52及び判別器54それぞれの構成は、このような例に限定されなくてもよく、実施の形態に応じて適宜設定されてよい。例えば、エンコーダ56、生成器50、推定器52及び判別器54はそれぞれ、2層以上の中間層を備えてもよい。エンコーダ56、生成器50、推定器52及び判別器54の構成はそれぞれ異なっていてよい。 The encoder 56, the generator 50, the estimator 52, and the discriminator 54 according to the present embodiment are each composed of a multi-layered neural network used for so-called deep learning. The encoder 56 includes an input layer 571, an intermediate layer (hidden layer) 572, and an output layer 573. The generator 50 includes an input layer 511, an intermediate layer (hidden layer) 512, and an output layer 513. The estimator 52 includes an input layer 531, an intermediate layer (hidden layer) 532, and an output layer 533. The discriminator 54 includes an input layer 551, an intermediate layer (hidden layer) 552, and an output layer 553. However, the configurations of the encoder 56, the generator 50, the estimator 52, and the discriminator 54 are not limited to such an example, and may be appropriately set according to the embodiment. For example, the encoder 56, the generator 50, the estimator 52, and the discriminator 54 may each include two or more intermediate layers. The configurations of the encoder 56, the generator 50, the estimator 52, and the discriminator 54 may be different from each other.

それぞれの各層(571~573、511~513、531~533、551~553)に含まれるニューロン(ノード)の数は、実施の形態に応じて適宜設定されてよい。隣接する層のニューロン同士は適宜結合され、各結合には重み(結合荷重)が設定されている。図8A及び図8Bの例では、各ニューロンは、隣接する層の全てのニューロンと結合されている。しかしながら、ニューロンの結合は、このような例に限定されなくてもよく、実施の形態に応じて適宜設定されてよい。各ニューロンには閾値が設定されており、基本的には、各入力と各重みとの積の和が閾値を超えているか否かによって各ニューロンの出力が決定される。 The number of neurons (nodes) contained in each layer (571 to 573, 511 to 513, 513 to 533, 551 to 553) may be appropriately set according to the embodiment. Neurons in adjacent layers are appropriately connected to each other, and a weight (bonding load) is set for each connection. In the examples of FIGS. 8A and 8B, each neuron is associated with all neurons in adjacent layers. However, the connection of neurons does not have to be limited to such an example, and may be appropriately set according to the embodiment. A threshold is set for each neuron, and basically, the output of each neuron is determined by whether or not the sum of the products of each input and each weight exceeds the threshold.

エンコーダ56の各層571~573に含まれる各ニューロン間の結合の重み及び各ニューロンの閾値は、演算処理に利用されるエンコーダ56のパラメータの一例である。生成器50の各層511~513に含まれる各ニューロン間の結合の重み及び各ニューロンの閾値は、演算処理に利用される生成器50のパラメータの一例である。推定器52の各層531~533に含まれる各ニューロン間の結合の重み及び各ニューロンの閾値は、演算処理に利用される推定器52のパラメータの一例である。判別器54の各層551~553に含まれる各ニューロン間の結合の重み及び各ニューロンの閾値は、演算処理に利用される判別器54のパラメータの一例である。 The weight of the connection between each neuron and the threshold value of each neuron included in each layer 571 to 573 of the encoder 56 are examples of the parameters of the encoder 56 used for arithmetic processing. The weight of the connection between each neuron and the threshold value of each neuron included in each layer 511 to 513 of the generator 50 are examples of the parameters of the generator 50 used for arithmetic processing. The weight of the connection between each neuron and the threshold value of each neuron included in each layer 531 to 533 of the estimator 52 are examples of the parameters of the estimator 52 used for arithmetic processing. The weight of the connection between each neuron included in each layer 551 to 553 of the discriminator 54 and the threshold value of each neuron are examples of the parameters of the discriminator 54 used for arithmetic processing.

第1学習処理部112及び第2学習処理部113は、この学習ネットワーク500の機械学習を実施する。第1学習処理部112は、これらのうち生成器50に関する第1の機械学習を実施する。一方、第2学習処理部113は、推定器52に関する第2の機械学習を実施する。 The first learning processing unit 112 and the second learning processing unit 113 carry out machine learning of the learning network 500. The first learning processing unit 112 carries out the first machine learning regarding the generator 50 among them. On the other hand, the second learning processing unit 113 carries out the second machine learning regarding the estimator 52.

本実施形態では、第1の機械学習を実施することは、次の第1~第5訓練ステップを含む。第1訓練ステップでは、第1学習処理部112は、判別器54に入力された入力画像が、生成器50により生成された画像69であるか複数の学習データセット60から得られた学習画像61であるかを判別するように判別器54を訓練する。つまり、判別器54は、与えられた入力画像が学習データ(学習画像61)由来か生成器50由来かを判別するように訓練される。第2訓練ステップでは、第1学習処理部112は、生成器50により生成される画像69が、判別器54による判別を誤らせるようなものとなるように、生成器50を訓練する。なお、図8A及び図8Bの例では、学習データ由来であることを「真」と表現し、生成器50由来であることを「偽」と表現している。ただし、各由来を表現する方法は、このような例に限定されなくてよく、実施の形態に応じて適宜選択されてよい。 In this embodiment, performing the first machine learning includes the following first to fifth training steps. In the first training step, in the first training processing unit 112, the input image input to the discriminator 54 is an image 69 generated by the generator 50 or a learning image 61 obtained from a plurality of training data sets 60. The discriminator 54 is trained to discriminate whether or not it is. That is, the discriminator 54 is trained to discriminate whether the given input image is derived from the learning data (learning image 61) or the generator 50. In the second training step, the first learning processing unit 112 trains the generator 50 so that the image 69 generated by the generator 50 misleads the discrimination by the discriminator 54. In the examples of FIGS. 8A and 8B, the fact that the data is derived from the training data is expressed as "true", and the fact that the data is derived from the generator 50 is expressed as "false". However, the method for expressing each origin is not limited to such an example, and may be appropriately selected depending on the embodiment.

第3訓練ステップでは、第1学習処理部112は、生成器50により生成される画像69が、推定器52により画像69に写る製品Rに含まれる欠陥の種別を推定した結果が対応するラベル63と一致するようなものとなるように、生成器50を訓練する。第4訓練ステップでは、第1学習処理部112は、ラベル63及び潜在変数を生成器50に入力することで生成器50により生成された画像69が、学習画像61を復元したもの(つまり、学習画像61に対応する画像)となるように、エンコーダ56及び生成器50を訓練する。潜在変数は、ラベル63及び学習画像61をエンコーダ56に入力することでエンコーダ56から得られる出力に基づいて導出される。第5訓練ステップでは、第1学習処理部112は、エンコーダ56から得られる出力に基づいて導出される潜在変数の分布が所定の事前分布に従うようにエンコーダ56を訓練する。事前分布の種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。事前分布には、例えば、ガウス分布等の公知の分布が用いられてよい。なお、第1~第5訓練ステップを実行する順序は、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。 In the third training step, the first learning processing unit 112 uses the estimator 52 to estimate the type of defect contained in the product R, which is the image 69 generated by the generator 50, and the corresponding label 63. Train the generator 50 to be consistent with. In the fourth training step, in the first learning processing unit 112, the image 69 generated by the generator 50 by inputting the label 63 and the latent variable to the generator 50 restored the training image 61 (that is, learning). The encoder 56 and the generator 50 are trained so as to be (the image corresponding to the image 61). Latent variables are derived based on the output obtained from the encoder 56 by inputting the label 63 and the training image 61 to the encoder 56. In the fifth training step, the first learning processing unit 112 trains the encoder 56 so that the distribution of the latent variables derived based on the output obtained from the encoder 56 follows a predetermined prior distribution. The type of prior distribution may not be particularly limited and may be appropriately selected depending on the embodiment. As the prior distribution, a known distribution such as a Gaussian distribution may be used. The order in which the first to fifth training steps are executed may not be particularly limited, and may be appropriately determined according to the embodiment.

具体的に、図8Aに示されるとおり、第2学習処理部113は、各学習データセット60について、学習画像61を推定器52の入力層531に入力し、推定器52の演算処理を実行する。これにより、第2学習処理部113は、学習画像61に写る製品Rに含まれる欠陥の種別及び範囲を推定した結果に対応する出力値を出力層533から取得する。第2学習処理部113は、欠陥の種別を推定した結果に対応する出力値とラベル63の値との誤差(LC)を算出する。また、第2学習処理部113は、欠陥の範囲を推定した結果に対応する出力値と境界情報65の値との誤差(LBB)を算出する。誤差(LBB)の計算には、例えば、IoU(Intersection Over Union)等の公知の指標が用いられてよい。 Specifically, as shown in FIG. 8A, the second learning processing unit 113 inputs the learning image 61 to the input layer 531 of the estimator 52 for each learning data set 60, and executes the arithmetic processing of the estimator 52. .. As a result, the second learning processing unit 113 acquires an output value corresponding to the result of estimating the type and range of the defect included in the product R shown in the learning image 61 from the output layer 533. The second learning processing unit 113 calculates an error ( LC ) between the output value corresponding to the result of estimating the defect type and the value of the label 63. Further, the second learning processing unit 113 calculates an error ( LBB ) between the output value corresponding to the result of estimating the defect range and the value of the boundary information 65. For the calculation of the error ( LBB ), for example, a known index such as IOU (Intersection Over Union) may be used.

また、第1学習処理部112は、各学習データセット60について、学習画像61及びラベル63をエンコーダ56の入力層571に入力し、エンコーダ56の演算処理を実行する。これにより、第1学習処理部112は、何らかの特徴量を導出した結果に対応する出力値(潜在変数)をエンコーダ56の出力層573から取得する。この出力値は、事前分布の任意の確率変数(例えば、平均及び共分散)に対応するように設定されてよい。第1学習処理部112は、この出力値と事前分布から導出された値との誤差(LKL)を算出する。 Further, the first learning processing unit 112 inputs the learning image 61 and the label 63 to the input layer 571 of the encoder 56 for each learning data set 60, and executes the arithmetic processing of the encoder 56. As a result, the first learning processing unit 112 acquires an output value (latent variable) corresponding to the result of deriving some feature amount from the output layer 573 of the encoder 56. This output value may be set to correspond to any random variable of prior distribution (eg, mean and covariance). The first learning processing unit 112 calculates an error (L KL ) between this output value and the value derived from the prior distribution.

次に、第1学習処理部112は、エンコーダ56から得られた出力値及び対応するラベル63を生成器50の入力層511に入力し、生成器50の演算処理を実行する。これにより、第1学習処理部112は、各学習データセット60について、学習画像61に対応する画像をラベル63から生成した結果に対応する出力(画像69)を出力層513から取得する。 Next, the first learning processing unit 112 inputs the output value obtained from the encoder 56 and the corresponding label 63 to the input layer 511 of the generator 50, and executes the arithmetic processing of the generator 50. As a result, the first learning processing unit 112 acquires the output (image 69) corresponding to the result of generating the image corresponding to the learning image 61 from the label 63 for each learning data set 60 from the output layer 513.

続いて、第1学習処理部112は、生成器50により生成された各画像69を判別器54の入力層551に入力し、判別器54の演算処理を実行する。これにより、第1学習処理部112は、入力画像が生成器50由来か学習データセット60由来(つまり、学習画像61そのもの)かを判別した結果に対応する出力値を出力層553から取得する。この場面では、生成器50により生成された各画像69が入力画像であるため、判別器54は、「偽」と判別するのが正解である。第1学習処理部112は、生成器50により生成された各画像69について、出力層553から得られる出力値とこの正解との誤差(LD)を算出する。 Subsequently, the first learning processing unit 112 inputs each image 69 generated by the generator 50 to the input layer 551 of the discriminator 54, and executes the arithmetic processing of the discriminator 54. As a result, the first learning processing unit 112 acquires an output value corresponding to the result of determining whether the input image is derived from the generator 50 or the learning data set 60 (that is, the learning image 61 itself) from the output layer 553. In this scene, since each image 69 generated by the generator 50 is an input image, the correct answer is that the discriminator 54 discriminates as "false". The first learning processing unit 112 calculates an error ( LD ) between the output value obtained from the output layer 553 and the correct answer for each image 69 generated by the generator 50.

同様に、第1学習処理部112は、各学習データセット60について、学習画像61を判別器54の入力層551に入力し、判別器54の演算処理を実行する。これにより、第1学習処理部112は、入力画像が生成器50由来か学習データセット60由来かを判別した結果に対応する出力値を出力層553から取得する。この場面では、学習画像61そのものが入力画像であるため、判別器54は、「真」と判別するのが正解である。第1学習処理部112は、各学習データセット60について、出力層553から得られる出力値とこの正解との誤差(LD)を算出する。 Similarly, the first learning processing unit 112 inputs the learning image 61 to the input layer 551 of the discriminator 54 for each learning data set 60, and executes the arithmetic processing of the discriminator 54. As a result, the first learning processing unit 112 acquires an output value corresponding to the result of determining whether the input image is derived from the generator 50 or the learning data set 60 from the output layer 553. In this scene, since the learning image 61 itself is an input image, the correct answer is that the discriminator 54 determines that it is “true”. The first learning processing unit 112 calculates an error ( LD ) between the output value obtained from the output layer 553 and the correct answer for each learning data set 60.

また、図8Bに示されるとおり、第1学習処理部112は、生成器50により生成された各画像69を判別器54に入力することで得られた出力値について、判別器54による判別を誤らせるような画像を生成するように生成器50を訓練するための誤差(LGD)を算出する。詳細には、この生成器50の訓練では、判別器54による判別の結果を誤らせることが正解である。つまり、出力層553から得られる出力値が「真」に対応することが正解である。第1学習処理部112は、各学習データセット60について、一連の処理により出力層553から得られる出力値とこの正解(つまり、「真」)との誤差(LGD)を算出する。 Further, as shown in FIG. 8B, the first learning processing unit 112 causes the discriminator 54 to make an error in discriminating the output value obtained by inputting each image 69 generated by the generator 50 into the discriminator 54. Calculate the error (L GD ) for training the generator 50 to produce such an image. Specifically, in the training of the generator 50, the correct answer is to mislead the result of the discrimination by the discriminator 54. That is, the correct answer is that the output value obtained from the output layer 553 corresponds to "true". The first learning processing unit 112 calculates an error (L GD ) between the output value obtained from the output layer 553 by a series of processing and the correct answer (that is, “true”) for each learning data set 60.

次に、第1学習処理部112は、生成器50により生成された各画像69を推定器52の入力層531に入力し、推定器52の演算処理を実行する。これにより、第1学習処理部112は、各画像69に写る製品Rに含まれる欠陥の種別を推定した結果に対応する出力値を推定器52の出力層533から取得する。第1学習処理部112は、欠陥の種別を推定した結果に対応する出力値と対応するラベル63の値との誤差(LGC)を算出する。 Next, the first learning processing unit 112 inputs each image 69 generated by the generator 50 to the input layer 531 of the estimator 52, and executes the arithmetic processing of the estimator 52. As a result, the first learning processing unit 112 acquires an output value corresponding to the result of estimating the type of the defect included in the product R shown in each image 69 from the output layer 533 of the estimator 52. The first learning processing unit 112 calculates an error ( LGC ) between the output value corresponding to the result of estimating the defect type and the value of the corresponding label 63.

次に、図8Aに示されるとおり、第1学習処理部112は、各学習データセット60について、エンコーダ56の出力から学習画像61を復元するデコーダとして機能ように生成器50を訓練するための誤差を算出する。詳細には、第1学習処理部112は、各学習データセット60について、生成器50により生成された画像69と対応する学習画像61との誤差(LG)を算出する。 Next, as shown in FIG. 8A, the first training processing unit 112 has an error for training the generator 50 to function as a decoder for restoring the training image 61 from the output of the encoder 56 for each training data set 60. Is calculated. Specifically, the first learning processing unit 112 calculates an error ( LG ) between the image 69 generated by the generator 50 and the corresponding learning image 61 for each training data set 60.

そして、図8A及び図8Bに示されるとおり、第1学習処理部112及び第2学習処理部113は、算出される各誤差(LC、LBB、LKL、LD、LGD、LGC、LG)の和が小さくなるように、学習ネットワーク500の各パラメータの値を調節する。詳細には、第2学習処理部113は、算出される各誤差(LC、LBB)の和が小さくなるように、推定器52のパラメータの値を調節する。第1学習処理部112は、算出される誤差(LD)の和が小さくなるように、判別器54のパラメータの値を調節する。第1学習処理部112は、算出される各誤差(LG、LGD、LGC)の和が小さくなるように、生成器50のパラメータの値を調節する。第1学習処理部112は、算出される誤差(LKL、LG)の和が小さくなるように、エンコーダ56のパラメータの値を調節する。 Then, as shown in FIGS. 8A and 8B, the first learning processing unit 112 and the second learning processing unit 113 are calculated for each error (LC, L BB , L KL , LD, L GD , L GC ). , LG ) are adjusted so that the value of each parameter of the learning network 500 is small. Specifically, the second learning processing unit 113 adjusts the value of the parameter of the estimator 52 so that the sum of the calculated errors (LC, LB B ) becomes small. The first learning processing unit 112 adjusts the value of the parameter of the discriminator 54 so that the sum of the calculated errors ( LD ) becomes small. The first learning processing unit 112 adjusts the value of the parameter of the generator 50 so that the sum of the calculated errors (LG, L GD , LG C ) becomes small. The first learning processing unit 112 adjusts the value of the parameter of the encoder 56 so that the sum of the calculated errors (L KL , LG ) becomes small.

第1学習処理部112及び第2学習処理部113は、算出される各誤差(LC、LBB、LKL、LD、LGD、LGC、LG)の和が閾値以下になるまで、上記一連の処理により、各パラメータの値の調節を繰り返す。これにより、第1学習処理部112は、判別器54、生成器50、及びエンコーダ56それぞれを訓練し、第2学習処理部113は、推定器52を訓練する。これらのうち、各誤差(LC、LBB)の和が小さくなるように推定器52のパラメータを調節する処理が、第2の機械学習の処理の一例である。誤差(LKL)の和が小さくなるように、エンコーダ56のパラメータの値を調節する処理が、第1の機械学習の第5訓練ステップの一例である。誤差(LD)の和が小さくなるように判別器54のパラメータの値を調節する処理が、第1訓練ステップの一例である。誤差(LGD)の和が小さくなるように生成器50のパラメータの値を調節する処理が、第2訓練ステップの一例である。誤差(LGC)の和が小さくなるように生成器50のパラメータの値を調節する処理が、第3訓練ステップの一例である。誤差(LG)の和が小さくなるように生成器50及びエンコーダ56のパラメータの値を調節する処理が、第4訓練ステップの一例である。なお、パラメータの調節を繰り返す基準は、このような閾値を用いる例に限定されなくてもよい。例えば、第1学習処理部112及び第2学習処理部113は、指定された回数分、上記一連の処理により、各パラメータの値の調節を繰り返すようにしてもよい。 In the first learning processing unit 112 and the second learning processing unit 113, until the sum of the calculated errors ( LC , L BB , L KL , L D , L GD , L GC , LG ) becomes equal to or less than the threshold value. , The adjustment of the value of each parameter is repeated by the above series of processes. As a result, the first learning processing unit 112 trains the discriminator 54, the generator 50, and the encoder 56, respectively, and the second learning processing unit 113 trains the estimator 52. Of these, the process of adjusting the parameters of the estimator 52 so that the sum of each error (LC, L BB ) becomes small is an example of the second machine learning process. The process of adjusting the value of the parameter of the encoder 56 so that the sum of the errors (L KL ) becomes small is an example of the fifth training step of the first machine learning. The process of adjusting the value of the parameter of the discriminator 54 so that the sum of the errors ( LD ) becomes small is an example of the first training step. The process of adjusting the value of the parameter of the generator 50 so that the sum of the errors (L GD ) becomes small is an example of the second training step. The process of adjusting the value of the parameter of the generator 50 so that the sum of the errors (L GC ) becomes small is an example of the third training step. The process of adjusting the parameter values of the generator 50 and the encoder 56 so that the sum of the errors ( LG ) becomes small is an example of the fourth training step. The criterion for repeating the parameter adjustment is not limited to the example using such a threshold value. For example, the first learning processing unit 112 and the second learning processing unit 113 may repeat the adjustment of the value of each parameter by the above-mentioned series of processing for a designated number of times.

この機械学習が完了した後、保存処理部114は、構築された生成器50の構成(例えば、ニューラルネットワークの層数、各層におけるニューロンの個数、ニューロン同士の結合関係、各ニューロンの伝達関数)、及び演算パラメータ(例えば、各ニューロン間の結合の重み、各ニューロンの閾値)を示す第1学習結果データ123を生成する。また、保存処理部114は、構築された推定器52の構成(例えば、ニューラルネットワークの層数、各層におけるニューロンの個数、ニューロン同士の結合関係、各ニューロンの伝達関数)及び演算パラメータ(例えば、各ニューロン間の結合の重み、各ニューロンの閾値)を示す第2学習結果データ125を生成する。そして、保存処理部114は、生成した第1学習結果データ123及び第2学習結果データ125を所定の記憶領域に保存する。 After this machine learning is completed, the conservation processing unit 114 determines the configuration of the constructed generator 50 (for example, the number of layers of the neural network, the number of neurons in each layer, the connection relationship between neurons, the transmission function of each neuron). And the first learning result data 123 showing the calculation parameters (for example, the weight of the connection between each neuron, the threshold value of each neuron) is generated. Further, the preservation processing unit 114 includes the configuration of the constructed estimator 52 (for example, the number of layers of the neural network, the number of neurons in each layer, the connection relationship between neurons, the transmission function of each neuron), and the arithmetic parameters (for example, each). The second learning result data 125 showing the weight of the connection between neurons, the threshold value of each neuron) is generated. Then, the storage processing unit 114 stores the generated first learning result data 123 and the second learning result data 125 in a predetermined storage area.

<画像生成装置>
次に、図9を用いて、本実施形態に係る画像生成装置2のソフトウェア構成の一例について説明する。図9は、本実施形態に係る画像生成装置2のソフトウェア構成の一例を模式的に例示する。
<Image generator>
Next, an example of the software configuration of the image generation device 2 according to the present embodiment will be described with reference to FIG. 9. FIG. 9 schematically illustrates an example of the software configuration of the image generation device 2 according to the present embodiment.

画像生成装置2の制御部21は、記憶部22に記憶された画像生成プログラム221をRAMに展開する。そして、制御部21は、RAMに展開された画像生成プログラム221をCPUにより解釈及び実行して、各構成要素を制御する。これによって、図9に示されるとおり、本実施形態に係る画像生成装置2は、生成部211、推定部212、判定部213、及び画像保存部214をソフトウェアモジュールとして備えるコンピュータとして動作する。すなわち、本実施形態では、画像生成装置2の各ソフトウェアモジュールも、上記学習装置1と同様に、制御部21(CPU)により実現される。 The control unit 21 of the image generation device 2 expands the image generation program 221 stored in the storage unit 22 into the RAM. Then, the control unit 21 interprets and executes the image generation program 221 expanded in the RAM by the CPU to control each component. As a result, as shown in FIG. 9, the image generation device 2 according to the present embodiment operates as a computer including a generation unit 211, an estimation unit 212, a determination unit 213, and an image storage unit 214 as software modules. That is, in the present embodiment, each software module of the image generation device 2 is also realized by the control unit 21 (CPU) in the same manner as the learning device 1.

生成部211は、第1学習結果データ123を保持することで、学習装置1により構築された学習済みの生成器50を含んでいる。生成部211は、欠陥の種別を示す入力値71を生成器50に与えることで、欠陥を含む製品Rを写した生成画像73を生成する。本実施形態では、生成部211は、第1学習結果データ123を参照して、学習済みの生成器50の設定を行う。次に、生成部211は、所定の確率分布からノイズ(潜在変数)を取得する。所定の確率分布は、例えば、ガウス分布等であってよい。そして、生成部211は、取得したノイズ及び入力値71を生成器50の入力層511に入力し、生成器50の演算処理を実行する。これにより、生成部211は、生成器50の出力層513から生成画像73を取得する。 The generation unit 211 includes a trained generator 50 constructed by the learning device 1 by holding the first learning result data 123. The generation unit 211 generates an generated image 73 showing the product R including the defect by giving an input value 71 indicating the type of the defect to the generator 50. In the present embodiment, the generation unit 211 sets the trained generator 50 with reference to the first learning result data 123. Next, the generation unit 211 acquires noise (latent variable) from a predetermined probability distribution. The predetermined probability distribution may be, for example, a Gaussian distribution or the like. Then, the generation unit 211 inputs the acquired noise and the input value 71 to the input layer 511 of the generator 50, and executes the arithmetic processing of the generator 50. As a result, the generation unit 211 acquires the generated image 73 from the output layer 513 of the generator 50.

推定部212は、第2学習結果データ125を保持することで、学習装置1により構築された学習済みの推定器52を含んでいる。推定部212は、生成された生成画像73を推定器52に与えることで、生成画像73に写る製品Rに含まれる欠陥の種別及び範囲を推定する。本実施形態では、推定部212は、第2学習結果データ125を参照して、学習済みの推定器52の設定を行う。そして、推定部212は、生成器50により生成された生成画像73を推定器52の入力層531に入力し、推定器52の演算処理を実行する。これにより、推定部212は、生成画像73に写る製品Rに含まれる欠陥の種別及び範囲を推定した結果に対応する出力値を推定器52の出力層533から取得する。 The estimation unit 212 includes a trained estimator 52 constructed by the learning device 1 by holding the second learning result data 125. The estimation unit 212 estimates the type and range of defects included in the product R shown in the generated image 73 by giving the generated generated image 73 to the estimator 52. In the present embodiment, the estimation unit 212 sets the trained estimator 52 with reference to the second learning result data 125. Then, the estimation unit 212 inputs the generated image 73 generated by the generator 50 to the input layer 531 of the estimator 52, and executes the arithmetic processing of the estimator 52. As a result, the estimation unit 212 acquires an output value corresponding to the result of estimating the type and range of the defect included in the product R shown in the generated image 73 from the output layer 533 of the estimator 52.

判定部213は、生成画像73に写る製品Rに含まれる欠陥の種別を推定した結果が入力値71により示される欠陥の種別と一致するか否かを判定する。欠陥の種別を推定した結果が入力値71により示される欠陥の種別と一致すると判定部213が判定した場合に、画像保存部214は、生成した生成画像73と欠陥の範囲を推定した結果とを関連付けて所定の記憶領域に格納する。本実施形態では、画像保存部214は、欠陥の範囲を推定した結果を示す情報を境界情報77として生成する。更に、画像保存部214は、入力値71に対応して、欠陥の種別を示す情報をラベル75として生成する。そして、画像保存部214は、生成画像73、ラベル75、及び境界情報77を組み合わせることでデータセットを生成し、生成したデータセットを所定の記憶領域に格納する。なお、これらのうち、ラベル75は省略されてもよい。 The determination unit 213 determines whether or not the result of estimating the type of defect included in the product R shown in the generated image 73 matches the type of defect indicated by the input value 71. When the determination unit 213 determines that the result of estimating the defect type matches the defect type indicated by the input value 71, the image storage unit 214 determines the generated generated image 73 and the result of estimating the range of the defect. It is associated and stored in a predetermined storage area. In the present embodiment, the image storage unit 214 generates information indicating the result of estimating the range of defects as the boundary information 77. Further, the image storage unit 214 generates information indicating the type of defect as the label 75 corresponding to the input value 71. Then, the image storage unit 214 generates a data set by combining the generated image 73, the label 75, and the boundary information 77, and stores the generated data set in a predetermined storage area. Of these, the label 75 may be omitted.

<推定器生成装置>
次に、図10を用いて、本実施形態に係る推定器生成装置3のソフトウェア構成の一例について説明する。図10は、本実施形態に係る推定器生成装置3のソフトウェア構成の一例を模式的に例示する。
<Estimator generator>
Next, an example of the software configuration of the estimator generator 3 according to the present embodiment will be described with reference to FIG. FIG. 10 schematically illustrates an example of the software configuration of the estimator generator 3 according to the present embodiment.

推定器生成装置3の制御部31は、記憶部32に記憶された推定器生成プログラム321をRAMに展開する。そして、制御部31は、RAMに展開された推定器生成プログラム321に含まれる命令をCPUにより解釈及び実行して、各構成要素を制御する。これによって、図10に示されるとおり、本実施形態に係る推定器生成装置3は、データ取得部311、学習処理部312、及び保存処理部313をソフトウェアモジュールとして備えるコンピュータとして構成される。すなわち、本実施形態では、推定器生成装置3の各ソフトウェアモジュールも、上記学習装置1と同様に、制御部31(CPU)により実現される。 The control unit 31 of the estimator generation device 3 expands the estimator generation program 321 stored in the storage unit 32 into the RAM. Then, the control unit 31 controls each component by interpreting and executing the instruction included in the estimator generation program 321 expanded in the RAM by the CPU. As a result, as shown in FIG. 10, the estimator generator 3 according to the present embodiment is configured as a computer including a data acquisition unit 311, a learning processing unit 312, and a storage processing unit 313 as software modules. That is, in the present embodiment, each software module of the estimator generation device 3 is also realized by the control unit 31 (CPU) in the same manner as the learning device 1.

データ取得部311は、製品Rを写したサンプル画像3221、製品Rに含まれ得る欠陥の種別を示すラベル3222、及び製品Rに含まれ得る欠陥の範囲を示す境界情報3223の組み合わせによりそれぞれ構成された複数の学習データセット322を取得する。サンプル画像3221は、機械学習の入力データ(訓練データ)として利用される。一方、ラベル3222及び境界情報3223は、機械学習の正解データ(教師データ)として利用される。すなわち、ラベル3222及び境界情報3223は、対応するサンプル画像3221に写る製品Rの良否を判定した結果(すなわち、正解)を示す。サンプル画像3221に写る製品Rに欠陥が含まれない場合、ラベル3222及び境界情報3223の各値は、製品Rに欠陥が含まれないことを示すように適宜設定されてよい。 The data acquisition unit 311 is composed of a combination of a sample image 3221 showing the product R, a label 3222 indicating the types of defects that can be included in the product R, and boundary information 3223 indicating the range of defects that can be included in the product R. Acquire a plurality of training data sets 322. The sample image 3221 is used as input data (training data) for machine learning. On the other hand, the label 3222 and the boundary information 3223 are used as correct answer data (teacher data) for machine learning. That is, the label 3222 and the boundary information 3223 indicate the result (that is, the correct answer) of determining the quality of the product R shown in the corresponding sample image 3221. When the product R shown in the sample image 3221 does not contain a defect, the values of the label 3222 and the boundary information 3223 may be appropriately set to indicate that the product R does not contain a defect.

ここで、上記画像生成装置2により生成されたデータセットは、学習データセット322として利用されてよい。すなわち、少なくとも一部の学習データセット322のサンプル画像3221、ラベル3222、及び境界情報3223はそれぞれ、上記生成画像73、ラベル75、及び境界情報77であってよい。また、データ取得部311は、学習データセット322を学習装置1に送信し、学習データセット322を学習データセット60として利用させて、上記機械学習の処理を学習装置1に実行させてよい。つまり、データ取得部311は、サンプル画像3221を学習画像61として利用させ、ラベル3222をラベル63として利用させ、境界情報3223を境界情報65として利用させることで、サンプル画像3221に対応する画像を生成するための生成器50、並びに生成された画像に対して製品Rに含まれる欠陥の種別及び範囲を推定するための推定器52を学習装置1に構築させてもよい。そして、データ取得部311は、構築された生成器50及び推定器52を画像生成装置2に利用させて、学習データセット322に対応する複数のデータセットを画像生成装置2に生成させてもよい。データ取得部311は、生成された複数のデータセットを学習データセット322として受信することで、機械学習に利用する学習データセット322の件数を増やすことができる。 Here, the data set generated by the image generation device 2 may be used as the training data set 322. That is, the sample image 3221, the label 3222, and the boundary information 3223 of at least a part of the training data set 322 may be the generated image 73, the label 75, and the boundary information 77, respectively. Further, the data acquisition unit 311 may transmit the learning data set 322 to the learning device 1 and use the learning data set 322 as the learning data set 60 to cause the learning device 1 to execute the machine learning process. That is, the data acquisition unit 311 uses the sample image 3221 as the learning image 61, the label 3222 as the label 63, and the boundary information 3223 as the boundary information 65 to generate an image corresponding to the sample image 3221. The learning device 1 may be constructed with a generator 50 for estimating the type and range of defects included in the product R with respect to the generated image. Then, the data acquisition unit 311 may make the image generation device 2 use the constructed generator 50 and the estimator 52 to generate a plurality of data sets corresponding to the learning data set 322 in the image generation device 2. .. The data acquisition unit 311 can increase the number of learning data sets 322 used for machine learning by receiving the generated plurality of data sets as the training data set 322.

学習処理部312は、機械学習の対象となる推定器80を保持している。学習処理部312は、取得した各学習データセット322を利用した機械学習を実施することで、与えられた画像に写る製品Rの良否を判定する能力を習得した学習済みの推定器80を構築する。換言すると、学習処理部312は、各学習データセット322について、サンプル画像3221を入力すると、ラベル3222及び境界情報3223と一致する出力値を出力するように訓練された推定器80を構築する。保存処理部313は、構築された学習済みの推定器80に関する情報を所定の記憶領域に保存する。 The learning processing unit 312 holds an estimator 80 that is a target of machine learning. The learning processing unit 312 constructs a trained estimator 80 that has acquired the ability to judge the quality of the product R reflected in a given image by performing machine learning using each acquired learning data set 322. .. In other words, the learning processing unit 312 constructs an estimator 80 for each training data set 322 that, when the sample image 3221 is input, outputs an output value that matches the label 3222 and the boundary information 3223. The storage processing unit 313 stores information about the constructed learned estimator 80 in a predetermined storage area.

なお、学習装置2及び推定器生成装置3の間の関係において、学習処理部312は、第3学習処理部と称されてよい。上記データ取得部111及び保存処理部114はそれぞれ、第1データ取得部及び第1保存処理部と称されてよい。学習データセット60は、第1学習データセットと称されてよい。これに応じて、データ取得部311及び保存処理部313はそれぞれ、第2データ取得部及び第2保存処理部と称されてよい。学習データセット322は、第2学習データセットと称されてよい。 In the relationship between the learning device 2 and the estimator generation device 3, the learning processing unit 312 may be referred to as a third learning processing unit. The data acquisition unit 111 and the storage processing unit 114 may be referred to as a first data acquisition unit and a first storage processing unit, respectively. The training data set 60 may be referred to as a first training data set. Accordingly, the data acquisition unit 311 and the storage processing unit 313 may be referred to as a second data acquisition unit and a second storage processing unit, respectively. The training data set 322 may be referred to as a second training data set.

(推定器)
次に、本実施形態に係る推定器80の構成の一例について説明する。図10に示されるとおり、本実施形態に係る推定器80は、上記生成器50等と同様に、いわゆる深層学習に用いられる多層構造のニューラルネットワークにより構成されている。具体的に、推定器80は、入力層801、中間層(隠れ層)802、及び出力層803を備えている。ただし、推定器80の構成は、このような例に限定されなくてもよく、実施の形態に応じて適宜設定されてよい。例えば、推定器80は、2層以上の中間層を備えてもよい。推定器80の構成は、上記生成器50等と異なっていてよい。
(Estimator)
Next, an example of the configuration of the estimator 80 according to the present embodiment will be described. As shown in FIG. 10, the estimator 80 according to the present embodiment is configured by a multi-layered neural network used for so-called deep learning, like the generator 50 and the like. Specifically, the estimator 80 includes an input layer 801 and an intermediate layer (hidden layer) 802, and an output layer 803. However, the configuration of the estimator 80 does not have to be limited to such an example, and may be appropriately set according to the embodiment. For example, the estimator 80 may include two or more intermediate layers. The configuration of the estimator 80 may be different from that of the generator 50 and the like.

各層801~803に含まれるニューロン(ノード)の数は、実施の形態に応じて適宜設定されてよい。隣接する層のニューロン同士は適宜結合され、各結合には重み(結合荷重)が設定されている。図10の例では、各ニューロンは、隣接する層の全てのニューロンと結合されている。しかしながら、ニューロンの結合は、このような例に限定されなくてもよく、実施の形態に応じて適宜設定されてよい。各ニューロンには閾値が設定されており、基本的には、各入力と各重みとの積の和が閾値を超えているか否かによって各ニューロンの出力が決定される。各層801~803に含まれる各ニューロン間の結合の重み及び各ニューロンの閾値は、演算処理に利用される推定器80のパラメータの一例である。 The number of neurons (nodes) included in each layer 801 to 803 may be appropriately set according to the embodiment. Neurons in adjacent layers are appropriately connected to each other, and a weight (bonding load) is set for each connection. In the example of FIG. 10, each neuron is connected to all neurons in adjacent layers. However, the connection of neurons does not have to be limited to such an example, and may be appropriately set according to the embodiment. A threshold is set for each neuron, and basically, the output of each neuron is determined by whether or not the sum of the products of each input and each weight exceeds the threshold. The weight of the connection between each neuron and the threshold value of each neuron included in each layer 801 to 803 are examples of the parameters of the estimator 80 used for arithmetic processing.

学習処理部312は、各学習データセット322について、サンプル画像3221を推定器80の入力層801に入力し、推定器80の演算処理を実行する。この演算処理の結果、学習処理部312は、サンプル画像3221に写る製品Rの良否を判定した結果、換言すると、製品Rに含まれ得る欠陥の種別及び範囲を推定した結果に対応する出力値を出力層803から取得する。 The learning processing unit 312 inputs the sample image 3221 to the input layer 801 of the estimator 80 for each learning data set 322, and executes the arithmetic processing of the estimator 80. As a result of this arithmetic processing, the learning processing unit 312 determines whether the product R shown in the sample image 3221 is good or bad, in other words, an output value corresponding to the result of estimating the type and range of defects that can be included in the product R. Obtained from the output layer 803.

続いて、学習処理部312は、取得した出力値とラベル3222及び境界情報3223の各値との誤差を算出する。そして、学習処理部312は、各学習データセット322について、算出される誤差の和が小さくなるように、推定器80のパラメータの値を調節する。例えば、学習処理部312は、出力層803から得られる出力値とラベル3222及び境界情報3223の各値との誤差の和が閾値以下になるまで、上記一連の処理による推定器80のパラメータの値の調節を繰り返す。これにより、学習処理部312は、各学習データセット322について、サンプル画像3221を入力層801に入力すると、入力したサンプル画像3221に関連付けられたラベル3222及び境界情報3223と一致する出力値を出力層803から出力するように訓練された推定器80を構築することができる。なお、パラメータの調節を繰り返す基準は、このような閾値を用いる例に限定されなくてもよい。例えば、学習処理部312は、指定された回数分、上記一連の処理により、推定器80のパラメータの値の調節を繰り返すようにしてもよい。 Subsequently, the learning processing unit 312 calculates an error between the acquired output value and each value of the label 3222 and the boundary information 3223. Then, the learning processing unit 312 adjusts the value of the parameter of the estimator 80 so that the sum of the calculated errors becomes small for each learning data set 322. For example, the learning processing unit 312 performs the parameter values of the estimator 80 by the above series of processing until the sum of the errors between the output value obtained from the output layer 803 and the values of the label 3222 and the boundary information 3223 becomes equal to or less than the threshold value. Repeat the adjustment of. As a result, when the sample image 3221 is input to the input layer 801 for each training data set 322, the learning processing unit 312 outputs an output value that matches the label 3222 and the boundary information 3223 associated with the input sample image 3221. An estimator 80 trained to output from 803 can be constructed. The criterion for repeating the parameter adjustment is not limited to the example using such a threshold value. For example, the learning processing unit 312 may repeat the adjustment of the parameter value of the estimator 80 by the above-mentioned series of processing a specified number of times.

この機械学習の処理が完了した後、保存処理部313は、構築された学習済みの推定器80の構成(例えば、ニューラルネットワークの層数、各層におけるニューロンの個数、ニューロン同士の結合関係、各ニューロンの伝達関数)、及び演算パラメータ(例えば、各ニューロン間の結合の重み、各ニューロンの閾値)を示す第3学習結果データ325を生成する。そして、保存処理部313は、生成した第3学習結果データ325を所定の記憶領域に保存する。 After the machine learning process is completed, the conservation processing unit 313 configures the constructed trained estimator 80 (for example, the number of layers of the neural network, the number of neurons in each layer, the connection relationship between neurons, and each neuron. 3rd learning result data 325 showing the transmission function) and the arithmetic parameters (for example, the weight of the connection between each neuron, the threshold value of each neuron). Then, the storage processing unit 313 stores the generated third learning result data 325 in a predetermined storage area.

<検査装置>
次に、図11を用いて、本実施形態に係る検査装置4のソフトウェア構成の一例について説明する。図11は、本実施形態に係る検査装置4のソフトウェア構成の一例を模式的に例示する。
<Inspection equipment>
Next, an example of the software configuration of the inspection device 4 according to the present embodiment will be described with reference to FIG. FIG. 11 schematically illustrates an example of the software configuration of the inspection device 4 according to the present embodiment.

検査装置4の制御部41は、記憶部42に記憶された検査プログラム421をRAMに展開する。そして、制御部41は、RAMに展開された検査プログラム421に含まれる命令をCPUにより解釈及び実行して、各構成要素を制御する。これによって、図11に示されるとおり、本実施形態に係る検査装置4は、対象データ取得部411、良否判定部412、及び出力部413をソフトウェアモジュールとして備えるコンピュータとして構成される。本実施形態では、検査装置4の各ソフトウェアモジュールも、上記学習装置1と同様に、制御部41(CPU)により実現される。 The control unit 41 of the inspection device 4 expands the inspection program 421 stored in the storage unit 42 into the RAM. Then, the control unit 41 controls each component by interpreting and executing the instruction included in the inspection program 421 expanded in the RAM by the CPU. As a result, as shown in FIG. 11, the inspection device 4 according to the present embodiment is configured as a computer including the target data acquisition unit 411, the pass / fail determination unit 412, and the output unit 413 as software modules. In the present embodiment, each software module of the inspection device 4 is also realized by the control unit 41 (CPU) in the same manner as the learning device 1.

対象データ取得部411は、外観検査の対象となる製品Rの写る対象画像422を取得する。本実施形態では、対象データ取得部411は、カメラCAにより製品Rを撮影することで、対象画像422を取得する。良否判定部412は、第3学習結果データ325を保持することで、推定器生成装置3により構築されたが学習済みの推定器80を含んでいる。良否判定部412は、学習済みの推定器80を利用して、対象画像422に写る製品Rの良否を判定する。 The target data acquisition unit 411 acquires the target image 422 of the product R that is the target of the visual inspection. In the present embodiment, the target data acquisition unit 411 acquires the target image 422 by photographing the product R with the camera CA. The pass / fail determination unit 412 includes the estimator 80 constructed by the estimator generator 3 but has been learned by holding the third learning result data 325. The quality determination unit 412 determines the quality of the product R shown in the target image 422 by using the trained estimator 80.

具体的には、良否判定部412は、第3学習結果データ325を参照して、学習済みの推定器80の設定を行う。次に、良否判定部412は、取得した対象画像422を推定器80の入力層801に入力し、推定器80の演算処理を実行する。これにより、良否判定部412は、対象画像422に写る製品Rの良否を判定した結果(詳細には、製品Rに含まれ得る欠陥の種別及び範囲を推定した結果)に対応する出力値を推定器80の出力層803から取得する。本実施形態では、この出力値を得ることが、製品Rの良否を判定することに対応する。出力部413は、製品Rの良否を判定した結果に関する情報を出力する。 Specifically, the pass / fail determination unit 412 sets the trained estimator 80 with reference to the third learning result data 325. Next, the pass / fail determination unit 412 inputs the acquired target image 422 to the input layer 801 of the estimator 80, and executes the arithmetic processing of the estimator 80. As a result, the quality determination unit 412 estimates the output value corresponding to the result of determining the quality of the product R shown in the target image 422 (specifically, the result of estimating the type and range of defects that can be included in the product R). Obtained from the output layer 803 of the device 80. In the present embodiment, obtaining this output value corresponds to determining the quality of the product R. The output unit 413 outputs information regarding the result of determining the quality of the product R.

<その他>
学習装置1、画像生成装置2、推定器生成装置3及び検査装置4の各ソフトウェアモジュールに関しては後述する動作例で詳細に説明する。なお、本実施形態では、学習装置1、画像生成装置2、推定器生成装置3及び検査装置4の各ソフトウェアモジュールがいずれも汎用のCPUによって実現される例について説明している。しかしながら、以上のソフトウェアモジュールの一部又は全部が、1又は複数の専用のプロセッサにより実現されてもよい。また、学習装置1、画像生成装置2、推定器生成装置3及び検査装置4それぞれのソフトウェア構成に関して、実施形態に応じて、適宜、ソフトウェアモジュールの省略、置換及び追加が行われてもよい。
<Others>
Each software module of the learning device 1, the image generation device 2, the estimator generation device 3, and the inspection device 4 will be described in detail in an operation example described later. In this embodiment, an example is described in which each software module of the learning device 1, the image generation device 2, the estimator generation device 3, and the inspection device 4 is realized by a general-purpose CPU. However, some or all of the above software modules may be implemented by one or more dedicated processors. Further, with respect to the software configurations of the learning device 1, the image generation device 2, the estimator generation device 3, and the inspection device 4, software modules may be omitted, replaced, or added as appropriate according to the embodiment.

§3 動作例
[学習装置]
次に、図12を用いて、本実施形態に係る学習装置1の動作例について説明する。図12は、本実施形態に係る学習装置1の処理手順の一例を示す。以下で説明する処理手順は、本発明の「学習方法」の一例である。ただし、以下で説明する処理手順は一例に過ぎず、各処理は可能な限り変更されてよい。また、以下で説明する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。
§3 Operation example [Learning device]
Next, an operation example of the learning device 1 according to the present embodiment will be described with reference to FIG. FIG. 12 shows an example of the processing procedure of the learning device 1 according to the present embodiment. The processing procedure described below is an example of the "learning method" of the present invention. However, the processing procedure described below is only an example, and each processing may be changed as much as possible. Further, with respect to the processing procedure described below, steps can be omitted, replaced, and added as appropriate according to the embodiment.

(ステップS101)
ステップS101では、制御部11は、データ取得部111として動作し、外観検査の対象となる製品Rを写した学習画像61、製品Rに含まれる欠陥の種別を示すラベル63、及び欠陥の範囲を示す境界情報65の組み合わせによりそれぞれ構成された複数の学習データセット60を取得する。
(Step S101)
In step S101, the control unit 11 operates as a data acquisition unit 111, and displays a learning image 61 showing the product R to be visually inspected, a label 63 indicating the type of defect included in the product R, and a range of defects. A plurality of training data sets 60 configured by the combination of the boundary information 65 shown are acquired.

学習データセット60を取得する方法は、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。例えば、カメラ及び欠陥のある製品Rを用意し、欠陥の部分が写るように製品Rをカメラにより撮影する。これにより、学習画像61を生成することができる。次に、学習画像61に写る製品Rに含まれる欠陥の種別を示すラベル63、及び欠陥の範囲を示す境界情報65を適宜生成する。例えば、ラベル63は、欠陥の種別の一覧から対象の学習画像61に写る欠陥を選択することで生成されてよい。また、境界情報65は、学習画像61上で欠陥の範囲を含むようにバウンディングボックスを指定することで生成されてよい。そして、生成したラベル63及び境界情報65を対応する学習画像61に関連付ける。これにより、各学習データセット60を生成することができる。 The method for acquiring the training data set 60 does not have to be particularly limited, and may be appropriately determined according to the embodiment. For example, a camera and a defective product R are prepared, and the product R is photographed by the camera so that the defective portion is captured. As a result, the learning image 61 can be generated. Next, the label 63 indicating the type of the defect included in the product R shown in the learning image 61 and the boundary information 65 indicating the range of the defect are appropriately generated. For example, the label 63 may be generated by selecting a defect to be reflected in the target learning image 61 from the list of defect types. Further, the boundary information 65 may be generated by designating a bounding box so as to include a range of defects on the learning image 61. Then, the generated label 63 and the boundary information 65 are associated with the corresponding learning image 61. This makes it possible to generate each training data set 60.

この学習データセット60の生成は、コンピュータの動作により自動的に行われてもよいし、オペレータの操作により手動的に行われてもよい。また、この学習データセット60を生成する情報処理は、学習装置1において実行されてもよいし、学習装置1以外の他のコンピュータにおいて実行されてもよい。 The generation of the training data set 60 may be automatically performed by the operation of the computer, or may be manually performed by the operation of the operator. Further, the information processing that generates the learning data set 60 may be executed in the learning device 1 or may be executed in a computer other than the learning device 1.

学習データセット60を学習装置1が生成する場合、制御部11は、自動的又はオペレータの操作により手動的に上記情報処理を実行することで、複数の学習データセット60を取得する。一方、学習データセット60を他のコンピュータが生成する場合、制御部11は、例えば、ネットワーク、記憶媒体91等を介して、他のコンピュータにより生成された複数の学習データセット60を取得する。一部の学習データセット60を学習装置1が生成し、残りの学習データセット60を他のコンピュータが生成してもよい。 When the learning device 1 generates the learning data set 60, the control unit 11 acquires a plurality of learning data sets 60 by automatically or manually executing the above information processing by the operation of the operator. On the other hand, when the learning data set 60 is generated by another computer, the control unit 11 acquires a plurality of learning data sets 60 generated by the other computer via, for example, a network, a storage medium 91, or the like. The learning device 1 may generate a part of the training data set 60, and another computer may generate the remaining training data set 60.

取得する学習データセット60の件数は、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。複数の学習データセット60を取得すると、制御部11は、次のステップS102に処理を進める。 The number of learning data sets 60 to be acquired may not be particularly limited and may be appropriately determined according to the embodiment. When the plurality of training data sets 60 are acquired, the control unit 11 proceeds to the next step S102.

(ステップS102及びS103)
ステップS102では、制御部11は、第1学習処理部112として動作し、第1の機械学習を実行することで、各学習データセット60に含まれるラベル63の入力に対して、入力されたラベル63に関連付けられた学習画像61に対応する画像を生成するように訓練された生成器50を構築する。ステップS103では、制御部11は、第2学習処理部113として動作し、第2の機械学習を実行することで、各学習データセット60に含まれる学習画像61の入力に対して、入力された学習画像61に関連付けられたラベル63及び境界情報65と一致するように、入力された学習画像61に写る製品Rに含まれる欠陥の種別及び範囲を推定するように訓練された推定器52を構築する。
(Steps S102 and S103)
In step S102, the control unit 11 operates as the first learning processing unit 112, and by executing the first machine learning, the input label with respect to the input of the label 63 included in each learning data set 60. Build a generator 50 trained to generate an image corresponding to the training image 61 associated with 63. In step S103, the control unit 11 operates as the second learning processing unit 113, and by executing the second machine learning, the control unit 11 is input to the input of the learning image 61 included in each learning data set 60. Constructs an estimator 52 trained to estimate the type and range of defects contained in the product R appearing in the input training image 61 so as to match the label 63 and boundary information 65 associated with the training image 61. do.

ステップS102及びS103を処理する順序は、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。ステップS102及びS103の処理は、同時に実行されてもよいし、別々に実行されてもよい。本実施形態では、生成器50及び推定器52は、エンコーダ56及び判別器54と共に、学習ネットワーク500を構成している。そこで、本ステップS102及びS103では、制御部11は、学習ネットワーク500の機械学習を実施することで、生成器50及び推定器52を訓練する。 The order in which steps S102 and S103 are processed may not be particularly limited and may be appropriately determined according to the embodiment. The processes of steps S102 and S103 may be executed simultaneously or separately. In the present embodiment, the generator 50 and the estimator 52 together with the encoder 56 and the discriminator 54 form a learning network 500. Therefore, in steps S102 and S103, the control unit 11 trains the generator 50 and the estimator 52 by performing machine learning of the learning network 500.

詳細には、まず、制御部11は、処理対象となる学習ネットワーク500を用意する。用意する学習ネットワーク500の構成、各ニューロン間の結合の重みの初期値、及び各ニューロンの閾値の初期値は、テンプレートにより与えられてもよいし、オペレータの入力により与えられてもよい。また、再学習を行う場合には、制御部11は、過去の機械学習を行うことで得られた学習結果データに基づいて、学習ネットワーク500を用意してもよい。 Specifically, first, the control unit 11 prepares the learning network 500 to be processed. The configuration of the learning network 500 to be prepared, the initial value of the weight of the connection between each neuron, and the initial value of the threshold value of each neuron may be given by the template or by the input of the operator. Further, in the case of re-learning, the control unit 11 may prepare the learning network 500 based on the learning result data obtained by performing the past machine learning.

次に、制御部11は、各学習データセット60の学習画像61を入力データとして利用し、対応するラベル63及び境界情報65を教師データとして利用して、推定器52の学習処理を実行する。制御部11は、各学習データセット60の学習画像61及びラベル63を入力データとして利用し、事前分布から導出された値を教師データとして利用して、エンコーダ56の学習処理を実行する。制御部11は、各学習データセット60について、エンコーダ56から得られた出力値及びラベル63を生成器50に入力し、生成器50の演算処理を実行する。これにより、制御部11は、生成器50から各画像69を取得する。制御部11は、各画像69及び各学習画像61を入力データとして利用し、各画像(61、69)の由来を教師データとして利用して、判別器54の学習処理を実行する。制御部11は、各学習データセット60について、エンコーダ56から得られた出力値及びラベル63を入力データとして利用し、判別器54に判別を誤らせることを教師データとして利用して、生成器50の学習処理を実行する。制御部11は、各学習データセット60について、エンコーダ56から得られた出力値及びラベル63を入力データとして利用し、推定器52が欠陥の種別を正しく推定することを教師データとして利用して、生成器50の学習処理を実行する。制御部11は、各学習データセット60について、学習画像61及びラベル63を入力データとして利用し、学習画像61を教師データとして利用して、エンコーダ56及び生成器50の学習処理を実行する。これらの学習処理には、確率的勾配降下法等が用いられてよい。 Next, the control unit 11 uses the learning image 61 of each learning data set 60 as input data, and uses the corresponding label 63 and the boundary information 65 as teacher data to execute the learning process of the estimator 52. The control unit 11 uses the training image 61 and the label 63 of each training data set 60 as input data, and uses the values derived from the prior distribution as teacher data to execute the learning process of the encoder 56. The control unit 11 inputs the output value and the label 63 obtained from the encoder 56 to the generator 50 for each learning data set 60, and executes the arithmetic processing of the generator 50. As a result, the control unit 11 acquires each image 69 from the generator 50. The control unit 11 uses each image 69 and each learning image 61 as input data, and uses the origin of each image (61, 69) as teacher data to execute the learning process of the discriminator 54. For each learning data set 60, the control unit 11 uses the output value and the label 63 obtained from the encoder 56 as input data, and makes the discriminator 54 make a mistake in discrimination as teacher data. Execute the learning process. The control unit 11 uses the output value and the label 63 obtained from the encoder 56 as input data for each training data set 60, and uses the fact that the estimator 52 correctly estimates the type of defect as teacher data. The learning process of the generator 50 is executed. The control unit 11 uses the training image 61 and the label 63 as input data for each training data set 60, and uses the training image 61 as teacher data to execute the learning process of the encoder 56 and the generator 50. A stochastic gradient descent method or the like may be used for these learning processes.

例えば、制御部11は、各学習データセット60に含まれる学習画像61を推定器52の入力層531に入力し、入力側から順に各層531~533に含まれる各ニューロンの発火判定を行う。これにより、制御部11は、各学習画像61に写る製品Rに含まれる欠陥の種別及び範囲を推定した結果に対応する出力値を出力層533から取得する。制御部11は、欠陥の種別を推定した結果に対応する出力値とラベル63の値との誤差(LC)を算出する。また、制御部11は、欠陥の範囲を推定した結果に対応する出力値と境界情報65の値との誤差(LBB)を算出する。 For example, the control unit 11 inputs the learning image 61 included in each learning data set 60 to the input layer 531 of the estimator 52, and determines the firing of each neuron included in each layer 531 to 533 in order from the input side. As a result, the control unit 11 acquires an output value corresponding to the result of estimating the type and range of the defect included in the product R reflected in each learning image 61 from the output layer 533. The control unit 11 calculates an error ( LC ) between the output value corresponding to the result of estimating the defect type and the value of the label 63. Further, the control unit 11 calculates an error ( LBB ) between the output value corresponding to the result of estimating the defect range and the value of the boundary information 65.

次に、制御部11は、各学習データセット60に含まれる学習画像61及びラベル63をエンコーダ56の入力層571に入力し、入力側から順に各層571~573に含まれる各ニューロンの発火判定を行う。これにより、制御部11は、何らかの特徴量を導出した結果に対応する出力値(潜在変数)をエンコーダ56の出力層573から取得する。制御部11は、この出力値と事前分布から導出された値との誤差(LKL)を算出する。事前分布には、例えば、ガウス分布等であってよい。 Next, the control unit 11 inputs the learning image 61 and the label 63 included in each learning data set 60 to the input layer 571 of the encoder 56, and determines the firing of each neuron included in each layer 571 to 573 in order from the input side. conduct. As a result, the control unit 11 acquires an output value (latent variable) corresponding to the result of deriving some feature quantity from the output layer 573 of the encoder 56. The control unit 11 calculates an error (L KL ) between this output value and the value derived from the prior distribution. The prior distribution may be, for example, a Gaussian distribution.

次に、制御部11は、エンコーダ56から得られた出力値及び対応するラベル63を生成器50の入力層511に入力し、入力側から順に各層511~513に含まれる各ニューロンの発火判定を行う。これにより、制御部11は、各学習画像61に対応する画像をラベル63から生成した結果として各画像69を出力層513から取得する。 Next, the control unit 11 inputs the output value obtained from the encoder 56 and the corresponding label 63 to the input layer 511 of the generator 50, and determines the firing of each neuron included in each layer 511 to 513 in order from the input side. conduct. As a result, the control unit 11 acquires each image 69 from the output layer 513 as a result of generating an image corresponding to each learning image 61 from the label 63.

続いて、制御部11は、生成器50により生成された各画像69を判別器54の入力層551に入力し、入力側から順に各層551~553に含まれる各ニューロンの発火判定を行う。これにより、制御部11は、入力画像が生成器50由来か学習データセット60由来(つまり、学習画像61そのもの)かを判別した結果に対応する出力値を出力層553から取得する。この場面では、生成器50により生成された各画像69が入力画像であるため、判別器54は、「偽」と判別するのが正解である。制御部11は、生成器50により生成された各画像69について、出力層553から得られる出力値とこの正解との誤差(LD)を算出する。 Subsequently, the control unit 11 inputs each image 69 generated by the generator 50 to the input layer 551 of the discriminator 54, and determines the firing of each neuron included in each layer 551 to 553 in order from the input side. As a result, the control unit 11 acquires an output value corresponding to the result of determining whether the input image is derived from the generator 50 or the learning data set 60 (that is, the learning image 61 itself) from the output layer 553. In this scene, since each image 69 generated by the generator 50 is an input image, the correct answer is that the discriminator 54 discriminates as "false". The control unit 11 calculates an error ( LD ) between the output value obtained from the output layer 553 and the correct answer for each image 69 generated by the generator 50.

また、制御部11は、各学習データセット60に含まれる学習画像61を判別器54の入力層551に入力し、入力側から順に各層551~553に含まれる各ニューロンの発火判定を行う。これにより、制御部11は、入力画像が生成器50由来か学習データセット60由来かを判別した結果に対応する出力値を出力層553から取得する。この場面では、学習画像61そのものが入力画像であるため、判別器54は、「真」と判別するのが正解である。制御部11は、各学習データセット60について、出力層553から得られる出力値とこの正解との誤差(LD)を算出する。 Further, the control unit 11 inputs the learning image 61 included in each learning data set 60 to the input layer 551 of the discriminator 54, and determines the firing of each neuron included in each layer 551 to 553 in order from the input side. As a result, the control unit 11 acquires an output value corresponding to the result of determining whether the input image is derived from the generator 50 or the learning data set 60 from the output layer 553. In this scene, since the learning image 61 itself is an input image, the correct answer is that the discriminator 54 determines that it is “true”. The control unit 11 calculates an error ( LD ) between the output value obtained from the output layer 553 and the correct answer for each learning data set 60.

次に、制御部11は、生成器50により生成された各画像69を判別器54に入力することで得られた出力値について、判別器54による判別を誤らせるような画像を生成するように生成器50を訓練するための誤差(LGD)を算出する。具体的には、生成器50により生成された各画像69を判別器54に入力したときに、判別器54から得られる出力値が「真」に対応することが正解である。制御部11は、各学習データセット60について、一連の処理により出力層553から得られる出力値とこの正解(つまり、「真」)との誤差(LGD)を算出する。 Next, the control unit 11 generates an image that causes the discriminator 54 to make a mistake in discriminating the output value obtained by inputting each image 69 generated by the generator 50 into the discriminator 54. Calculate the error (L GD ) for training the vessel 50. Specifically, when each image 69 generated by the generator 50 is input to the discriminator 54, the correct answer is that the output value obtained from the discriminator 54 corresponds to "true". The control unit 11 calculates an error (L GD ) between the output value obtained from the output layer 553 by a series of processes and this correct answer (that is, “true”) for each learning data set 60.

次に、制御部11は、生成器50により生成された各画像69を推定器52の入力層531に入力し、入力側から順に各層531~533に含まれる各ニューロンの発火判定を行う。これにより、制御部11は、各画像69に写る製品Rに含まれる欠陥の種別を推定した結果に対応する出力値を推定器52の出力層533から取得する。制御部11は、各学習データセット60について、一連の処理により欠陥の種別を推定した結果に対応する出力値と対応するラベル63の値との誤差(LGC)を算出する。 Next, the control unit 11 inputs each image 69 generated by the generator 50 to the input layer 531 of the estimator 52, and determines the firing of each neuron included in each layer 531 to 533 in order from the input side. As a result, the control unit 11 acquires an output value corresponding to the result of estimating the type of the defect included in the product R shown in each image 69 from the output layer 533 of the estimator 52. The control unit 11 calculates an error ( LGC ) between the output value corresponding to the result of estimating the defect type by a series of processes and the value of the label 63 corresponding to each learning data set 60.

次に、制御部11は、各学習データセット60について、エンコーダ56の出力から学習画像61を復元するデコーダとして機能ように生成器50を訓練するための誤差を算出する。具体的には、制御部11は、各学習データセット60について、生成器50により生成された画像69と対応する学習画像61との誤差(LG)を算出する。 Next, the control unit 11 calculates an error for training the generator 50 to function as a decoder that restores the training image 61 from the output of the encoder 56 for each training data set 60. Specifically, the control unit 11 calculates an error ( LG ) between the image 69 generated by the generator 50 and the corresponding training image 61 for each training data set 60.

そして、制御部11は、誤差逆伝播法(Back propagation)により、算出される各誤差(LC、LBB、LKL、LD、LGD、LGC、LG)を用いて、各ニューロン間の結合の重み及び各ニューロンの閾値それぞれの誤差を算出する。すなわち、制御部11は、算出される各誤差(LC、LBB)を用いて、推定器52の各ニューロン間の結合の重み及び各ニューロンの閾値それぞれの誤差を算出する。制御部11は、算出される誤差(LD)を用いて、判別器54の各ニューロン間の結合の重み及び各ニューロンの閾値それぞれの誤差を算出する。制御部11は、算出される各誤差(LG、LGD、LGC)を用いて、生成器50の各ニューロン間の結合の重み及び各ニューロンの閾値それぞれの誤差を算出する。制御部11は、算出される各誤差(LKL、LG)を用いて、エンコーダ56の各ニューロン間の結合の重み及び各ニューロンの閾値それぞれの誤差を算出する。制御部11は、算出した各誤差に基づいて、推定器52、判別器54、生成器50、及びエンコーダ56それぞれにおける各ニューロン間の結合の重み及び各ニューロンの閾値それぞれの値の更新を行う。 Then, the control unit 11 uses each error ( LC, LB B, L KL , LD , L GD , L GC , LG ) calculated by the back propagation method for each neuron. The weight of the connection between them and the error of each threshold value of each neuron are calculated. That is, the control unit 11 calculates the error of the connection weight between each neuron of the estimator 52 and the error of each threshold value of each neuron by using each calculated error (LC, LB B ). The control unit 11 calculates the error of the connection weight between each neuron of the discriminator 54 and the error of each threshold value of each neuron by using the calculated error ( LD ). The control unit 11 calculates the error of the connection weight between each neuron of the generator 50 and the error of each threshold value of each neuron by using each calculated error (LG, L GD , LG C ). The control unit 11 calculates the error of the connection weight between each neuron of the encoder 56 and the error of each threshold value of each neuron by using each calculated error (L KL , LG ). Based on each calculated error, the control unit 11 updates the weight of the connection between each neuron and the value of each threshold value of each neuron in each of the estimator 52, the discriminator 54, the generator 50, and the encoder 56.

制御部11は、算出される各誤差(LC、LBB、LKL、LD、LGD、LGC、LG)の和が閾値以下になるまで、上記一連の処理により、各パラメータの値の調節を繰り返す。各閾値は、実施の形態に応じて適宜設定されてよい。これにより、制御部11は、各学習データセット60について、学習画像61の入力に対して、対応するラベル63及び境界情報65と一致するように、入力された学習画像61に写る製品Rに含まれる欠陥の種別及び範囲を推定するように訓練された推定器52を構築することができる。制御部11は、入力された入力画像が、生成器50由来か学習データセット60由来かを適切に判別可能に訓練された判別器54を構築することができる。制御部11は、判別器54が判別を誤り、対応するラベル63と一致するように推定器52が欠陥の種別を推定し、かつ学習画像61に対応し得る画像69を生成可能に訓練された生成器50を構築することができる。制御部11は、各学習データセット60について、学習画像61及びラベル63の入力に対して、事前分布に従う出力値であって、学習画像61に対応する画像を生成器50に生成させることが可能な出力値を出力するように訓練されたエンコーダ56を構築することができる。この機械学習の処理が完了すると、制御部11は、次のステップS104に処理を進める。なお、パラメータの調節を繰り返す基準は、このような閾値を用いる例に限定されなくてもよい。例えば、制御部11は、指定された回数分、上記一連の処理により、各パラメータの値の調節を繰り返すようにしてもよい。 The control unit 11 performs the above-mentioned series of processing until the sum of the calculated errors ( LC , LB , L KL , L D , L GD , L GC , LG ) becomes equal to or less than the threshold value, and the control unit 11 determines each parameter. Repeat the adjustment of the value. Each threshold value may be appropriately set according to the embodiment. As a result, the control unit 11 includes each training data set 60 in the product R reflected in the input training image 61 so as to match the corresponding label 63 and the boundary information 65 with respect to the input of the training image 61. An estimator 52 trained to estimate the type and extent of defects can be constructed. The control unit 11 can construct a discriminator 54 trained so that it can appropriately discriminate whether the input input image is derived from the generator 50 or the learning data set 60. The control unit 11 is trained so that the discriminator 54 makes a discriminant error, the estimator 52 estimates the type of defect so as to match the corresponding label 63, and the image 69 that can correspond to the learning image 61 can be generated. The generator 50 can be constructed. The control unit 11 can cause the generator 50 to generate an image corresponding to the training image 61, which is an output value according to the prior distribution for the input of the training image 61 and the label 63 for each training data set 60. An encoder 56 trained to output a high output value can be constructed. When the machine learning process is completed, the control unit 11 proceeds to the next step S104. The criterion for repeating the parameter adjustment is not limited to the example using such a threshold value. For example, the control unit 11 may repeat the adjustment of the value of each parameter by the above-mentioned series of processes for a specified number of times.

(ステップS104)
ステップS104では、制御部11は、保存処理部114として動作し、構築された学習済みの生成器50に関する情報、及び構築された学習済みの推定器52に関する情報を所定の記憶領域に保存する。
(Step S104)
In step S104, the control unit 11 operates as a storage processing unit 114, and stores information about the constructed trained generator 50 and information about the constructed trained estimator 52 in a predetermined storage area.

本実施形態では、制御部11は、ステップS102により構築された学習済みの生成器50の構成及びパラメータを示す情報を第1学習結果データ123として生成する。また、制御部11は、ステップS103により構築された学習済みの推定器52の構成及びパラメータを示す情報を第2学習結果データ125として生成する。そして、制御部11は、生成した第1学習結果データ123及び第2学習結果データ125を所定の記憶領域に保存する。所定の記憶領域は、例えば、制御部11内のRAM、記憶部12、外部記憶装置、記憶メディア又はこれらの組み合わせであってよい。 In the present embodiment, the control unit 11 generates information indicating the configuration and parameters of the trained generator 50 constructed by step S102 as the first learning result data 123. Further, the control unit 11 generates information indicating the configuration and parameters of the trained estimator 52 constructed by step S103 as the second learning result data 125. Then, the control unit 11 stores the generated first learning result data 123 and the second learning result data 125 in a predetermined storage area. The predetermined storage area may be, for example, a RAM in the control unit 11, a storage unit 12, an external storage device, a storage medium, or a combination thereof.

記憶メディアは、例えば、CD、DVD等であってよく、制御部11は、ドライブ16を介して記憶メディアに第1学習結果データ123及び第2学習結果データ125を格納してもよい。外部記憶装置は、例えば、NAS(Network Attached Storage)等のデータサーバであってよい。この場合、制御部11は、ネットワークを介してデータサーバに第1学習結果データ123及び第2学習結果データ125を格納してもよい。また、外部記憶装置は、例えば、学習装置1に接続された外付けの記憶装置であってもよい。 The storage medium may be, for example, a CD, a DVD, or the like, and the control unit 11 may store the first learning result data 123 and the second learning result data 125 in the storage medium via the drive 16. The external storage device may be, for example, a data server such as NAS (Network Attached Storage). In this case, the control unit 11 may store the first learning result data 123 and the second learning result data 125 in the data server via the network. Further, the external storage device may be, for example, an external storage device connected to the learning device 1.

なお、エンコーダ56及び判別器54の取り扱いについては、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。例えば、制御部11は、エンコーダ56及び判別器54についても、生成器50及び推定器52と同様に、それぞれの構成及びパラメータを示す情報を学習結果データとして生成し、生成した学習結果データを所定の記憶領域に保存してもよい。或いは、制御部11は、この学習結果データの生成及び保存の処理を省略してもよい。 The handling of the encoder 56 and the discriminator 54 does not have to be particularly limited, and may be appropriately determined according to the embodiment. For example, the control unit 11 also generates information indicating the respective configurations and parameters of the encoder 56 and the discriminator 54 as learning result data, as in the generator 50 and the estimator 52, and determines the generated learning result data. It may be stored in the storage area of. Alternatively, the control unit 11 may omit the process of generating and storing the learning result data.

第1学習結果データ123及び第2学習結果データ125を保存すると、制御部11は、本動作例に係る処理を終了する。学習済みの生成器50及び推定器52を構築した後、制御部11は、生成した第1学習結果データ123及び第2学習結果データ125を任意のタイミングで画像生成装置2に転送してもよい。画像生成装置2は、学習装置1から転送を受け付けることで、第1学習結果データ123及び第2学習結果データ125を取得してもよい。画像生成装置2は、学習装置1又はデータサーバにアクセスすることで、第1学習結果データ123及び第2学習結果データ125を取得してもよい。或いは、第1学習結果データ123及び第2学習結果データ125は、画像生成装置2に予め組み込まれてもよい。 When the first learning result data 123 and the second learning result data 125 are saved, the control unit 11 ends the process according to this operation example. After constructing the trained generator 50 and the estimator 52, the control unit 11 may transfer the generated first learning result data 123 and the second learning result data 125 to the image generator 2 at an arbitrary timing. .. The image generation device 2 may acquire the first learning result data 123 and the second learning result data 125 by accepting the transfer from the learning device 1. The image generation device 2 may acquire the first learning result data 123 and the second learning result data 125 by accessing the learning device 1 or the data server. Alternatively, the first learning result data 123 and the second learning result data 125 may be incorporated in the image generation device 2 in advance.

また、制御部11は、上記ステップS101~S104の処理を定期的に繰り返すことで、第1学習結果データ123及び第2学習結果データ125の少なくともいずれかを定期的に更新してもよい。この繰り返す際に、学習データセット60の変更、修正、追加、削除等が適宜実行されてよい。そして、制御部11は、更新した第1学習結果データ123及び第2学習結果データ125の少なくともいずれかを機械学習の実行毎に画像生成装置2に転送することで、画像生成装置2の保持する第1学習結果データ123及び第2学習結果データ125の少なくともいずれかを定期的に更新してもよい。 Further, the control unit 11 may periodically update at least one of the first learning result data 123 and the second learning result data 125 by periodically repeating the processes of steps S101 to S104. When this is repeated, the training data set 60 may be changed, modified, added, deleted, or the like as appropriate. Then, the control unit 11 transfers at least one of the updated first learning result data 123 and the second learning result data 125 to the image generation device 2 every time machine learning is executed, so that the image generation device 2 holds the image generation device 2. At least one of the first learning result data 123 and the second learning result data 125 may be updated periodically.

[画像生成装置]
次に、図13を用いて、本実施形態に係る画像生成装置2の動作例について説明する。図13は、本実施形態に係る画像生成装置2の処理手順の一例を示す。ただし、以下で説明する処理手順は一例に過ぎず、各処理は可能な限り変更されてよい。また、以下で説明する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。
[Image generator]
Next, an operation example of the image generation device 2 according to the present embodiment will be described with reference to FIG. FIG. 13 shows an example of the processing procedure of the image generation device 2 according to the present embodiment. However, the processing procedure described below is only an example, and each processing may be changed as much as possible. Further, with respect to the processing procedure described below, steps can be omitted, replaced, and added as appropriate according to the embodiment.

(ステップS201)
ステップS201では、制御部21は、生成部211として動作し、学習装置1により構築された学習済みの生成器50を利用して、指定された欠陥を含む製品Rの写り得る生成画像73を生成する。
(Step S201)
In step S201, the control unit 21 operates as the generation unit 211, and uses the trained generator 50 constructed by the learning device 1 to generate a generated image 73 in which the product R including the designated defect can be captured. do.

本実施形態では、制御部21は、第1学習結果データ123を参照して、学習済みの生成器50の設定を行う。次に、制御部21は、所定の確率分布からノイズ(潜在変数)を取得する。所定の確率分布は、例えば、ガウス分布等であってよい。また、制御部21は、欠陥の種別を示す入力値71を適宜取得する。例えば、欠陥の種別の一覧を示す情報(不図示)が、画像生成プログラム221内、記憶部22、外部記憶装置、記憶メディア等に格納されていてよい。この場合、制御部21は、この欠陥の種別の一覧を示す情報を取得し、取得した情報を参照して、画像を生成する対象に指定する欠陥を一覧から選択することで、入力値71を取得してもよい。また、例えば、制御部21は、所定の数値範囲からランダムに入力値71を選択してもよい。そして、制御部21は、取得したノイズ及び入力値71を生成器50の入力層511に入力し、入力側から順に各層511~513に含まれる各ニューロンの発火判定を行う。これにより、制御部21は、生成器50の出力層513から生成画像73を取得する。生成画像73の生成が完了すると、制御部21は、次のステップS202に処理を進める。 In the present embodiment, the control unit 21 sets the trained generator 50 with reference to the first learning result data 123. Next, the control unit 21 acquires noise (latent variable) from a predetermined probability distribution. The predetermined probability distribution may be, for example, a Gaussian distribution or the like. Further, the control unit 21 appropriately acquires an input value 71 indicating the type of defect. For example, information (not shown) showing a list of defect types may be stored in the image generation program 221, a storage unit 22, an external storage device, a storage medium, or the like. In this case, the control unit 21 acquires the information indicating the list of the types of the defect, refers to the acquired information, and selects the defect to be designated as the target for generating the image from the list, thereby inputting the input value 71. You may get it. Further, for example, the control unit 21 may randomly select an input value 71 from a predetermined numerical range. Then, the control unit 21 inputs the acquired noise and the input value 71 to the input layer 511 of the generator 50, and determines the firing of each neuron included in each layer 511 to 513 in order from the input side. As a result, the control unit 21 acquires the generated image 73 from the output layer 513 of the generator 50. When the generation of the generated image 73 is completed, the control unit 21 proceeds to the next step S202.

(ステップS202)
ステップS202では、制御部21は、推定部212として動作し、学習装置1により構築された学習済みの推定器52を利用して、生成画像73に写り得る製品Rに含まれる欠陥の種別及び範囲を推定する。
(Step S202)
In step S202, the control unit 21 operates as the estimation unit 212, and by using the learned estimator 52 constructed by the learning device 1, the type and range of defects included in the product R that can be captured in the generated image 73. To estimate.

本実施形態では、制御部21は、第2学習結果データ125を参照して、学習済みの推定器52の設定を行う。そして、制御部21は、生成器50により生成された生成画像73を推定器52の入力層531に入力し、入力側から順に各層531~533に含まれる各ニューロンの発火判定を行う。これにより、制御部21は、生成画像73に写る製品Rに含まれる欠陥の種別及び範囲を推定した結果に対応する出力値を推定器52の出力層533から取得する。欠陥の種別及び範囲の推定が完了すると、制御部21は、次のステップS203に処理を進める。 In the present embodiment, the control unit 21 sets the trained estimator 52 with reference to the second learning result data 125. Then, the control unit 21 inputs the generated image 73 generated by the generator 50 to the input layer 531 of the estimator 52, and determines the firing of each neuron included in each layer 531 to 533 in order from the input side. As a result, the control unit 21 acquires an output value corresponding to the result of estimating the type and range of the defect included in the product R shown in the generated image 73 from the output layer 533 of the estimator 52. When the estimation of the defect type and range is completed, the control unit 21 proceeds to the next step S203.

(ステップS203及びS204)
ステップS203では、制御部21は、判定部213として動作し、生成画像73に写る製品Rに含まれる欠陥の種別を推定した結果が入力値71により示される欠陥の種別と一致するか否かを判定する。ステップS204では、制御部21は、ステップS203の判定結果に応じて、条件分岐を処理する。
(Steps S203 and S204)
In step S203, the control unit 21 operates as the determination unit 213, and determines whether or not the result of estimating the type of defect included in the product R shown in the generated image 73 matches the type of defect indicated by the input value 71. judge. In step S204, the control unit 21 processes the conditional branch according to the determination result of step S203.

推定器52により欠陥の種別を推定した結果が入力値71と一致していることは、指定した欠陥を含む製品Rを写した画像(生成画像73)を生成器50により生成することができたことを示す。そのため、欠陥の種別を推定した結果が入力値71により示される欠陥の種別と一致すると判定した場合、制御部21は、この生成画像73を保存するための次のステップS205に処理を進める。 The fact that the result of estimating the defect type by the estimator 52 matches the input value 71 means that the generator 50 was able to generate an image (generated image 73) of the product R including the specified defect. Show that. Therefore, when it is determined that the result of estimating the defect type matches the defect type indicated by the input value 71, the control unit 21 proceeds to the next step S205 for storing the generated image 73.

一方、推定器52により欠陥の種別を推定した結果が入力値71と一致していないことは、指定した欠陥を含む製品Rを写した画像を生成器50により生成することができなかったことを示す。そのため、欠陥の種別を推定した結果が入力値71により示される欠陥の種別と一致しないと判定した場合、制御部21は、次のステップS205の処理を省略し、本動作例に係る処理を終了する。 On the other hand, the fact that the result of estimating the defect type by the estimator 52 does not match the input value 71 means that the generator 50 could not generate an image of the product R including the specified defect. show. Therefore, when it is determined that the result of estimating the defect type does not match the defect type indicated by the input value 71, the control unit 21 omits the processing of the next step S205 and ends the processing related to this operation example. do.

この場合、制御部21は、ステップS201により生成した生成画像73を破棄してもよい。或いは、制御部21は、生成した生成画像73に対して欠陥の種別及び範囲の少なくとも一方の指定を受け付けてもよい。そして、制御部21は、指定された欠陥の種別及び範囲の少なくとも一方を示す情報を生成画像73に関連付けることでデータセットを生成し、生成したデータセットを所定の記憶領域に保存してもよい。所定の記憶領域は、例えば、制御部21内のRAM、記憶部22、外部記憶装置、記憶メディア又はこれらの組み合わせであってよい。 In this case, the control unit 21 may discard the generated image 73 generated in step S201. Alternatively, the control unit 21 may accept the designation of at least one of the defect type and range for the generated generated image 73. Then, the control unit 21 may generate a data set by associating the information indicating at least one of the designated defect types and ranges with the generated image 73, and store the generated data set in a predetermined storage area. .. The predetermined storage area may be, for example, a RAM in the control unit 21, a storage unit 22, an external storage device, a storage medium, or a combination thereof.

(ステップS205)
ステップS205では、制御部21は、画像保存部214として動作し、生成した生成画像73と欠陥の範囲を推定した結果とを関連付けて所定の記憶領域に格納する。本実施形態では、制御部21は、欠陥の範囲を推定した結果を示す情報を境界情報77として生成する。また、制御部21は、入力値71に対応して、欠陥の種別を示す情報をラベル75として生成する。そして、制御部21は、生成画像73、ラベル75、及び境界情報77を組み合わせることでデータセットを生成し、生成したデータセットを所定の記憶領域に格納する。所定の記憶領域は、例えば、制御部21内のRAM、記憶部22、外部記憶装置、記憶メディア又はこれらの組み合わせであってよい。なお、この一連の処理において、ラベル75は省略されてもよい。すなわち、制御部21は、ラベル75の生成を省略し、生成画像73及び境界情報77を組み合わせることでデータセットを生成し、生成したデータセットを所定の記憶領域に格納してもよい。
(Step S205)
In step S205, the control unit 21 operates as an image storage unit 214, and stores the generated generated image 73 and the result of estimating the range of defects in a predetermined storage area in association with each other. In the present embodiment, the control unit 21 generates information indicating the result of estimating the defect range as the boundary information 77. Further, the control unit 21 generates information indicating the type of defect as a label 75 corresponding to the input value 71. Then, the control unit 21 generates a data set by combining the generated image 73, the label 75, and the boundary information 77, and stores the generated data set in a predetermined storage area. The predetermined storage area may be, for example, a RAM in the control unit 21, a storage unit 22, an external storage device, a storage medium, or a combination thereof. In this series of processing, the label 75 may be omitted. That is, the control unit 21 may omit the generation of the label 75, generate a data set by combining the generated image 73 and the boundary information 77, and store the generated data set in a predetermined storage area.

以上により、制御部21は、本動作例に係る処理を終了する。制御部21は、上記ステップS201~S205を繰り返し実行することで、複数のデータセットを生成してもよい。生成するデータセットの数は、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。また、制御部21は、生成したデータセットを学習データセット322として利用させるために、生成したデータセットを推定器生成装置3に転送してもよい。 As a result, the control unit 21 ends the process related to this operation example. The control unit 21 may generate a plurality of data sets by repeatedly executing the steps S201 to S205. The number of data sets to be generated is not particularly limited and may be appropriately determined according to the embodiment. Further, the control unit 21 may transfer the generated data set to the estimator generation device 3 in order to use the generated data set as the learning data set 322.

[推定器生成装置]
次に、図14を用いて、本実施形態に係る推定器生成装置3の動作例について説明する。図14は、本実施形態に係る推定器生成装置3の処理手順の一例を例示するフローチャートである。ただし、以下で説明する処理手順は一例に過ぎず、各処理は可能な限り変更されてよい。また、以下で説明する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。
[Estimator generator]
Next, an operation example of the estimator generator 3 according to the present embodiment will be described with reference to FIG. FIG. 14 is a flowchart illustrating an example of the processing procedure of the estimator generator 3 according to the present embodiment. However, the processing procedure described below is only an example, and each processing may be changed as much as possible. Further, with respect to the processing procedure described below, steps can be omitted, replaced, and added as appropriate according to the embodiment.

(ステップS301)
ステップS301では、制御部31は、データ取得部311として動作し、製品Rを写したサンプル画像3221、製品Rに含まれ得る欠陥の種別を示すラベル3222、及び製品Rに含まれ得る欠陥の範囲を示す境界情報3223の組み合わせによりそれぞれ構成された複数の学習データセット322を取得する。
(Step S301)
In step S301, the control unit 31 operates as a data acquisition unit 311 and has a sample image 3221 showing the product R, a label 3222 indicating the types of defects that can be included in the product R, and a range of defects that can be included in the product R. A plurality of training data sets 322 configured by the combination of the boundary information 3223 indicating the above are acquired.

学習データセット322を取得する方法は、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。例えば、カメラ及び製品Rを用意し、欠陥のある又は欠陥のない製品Rをカメラにより撮影する。これにより、サンプル画像3221を生成することができる。次に、サンプル画像3221に写る製品Rに含まれ得る欠陥の種別を示すラベル3222、及び欠陥の範囲を示す境界情報3223を適宜生成する。ラベル3222及び境界情報3223を生成する方法は、上記ラベル63及び境界情報65を生成する方法と同様であってよい。境界情報3223は、バウンディングボックスにより欠陥の範囲を示すように適宜生成されてよい。また、サンプル画像3221に写る製品Rに欠陥が含まれない場合、ラベル3222及び境界情報3223の各値は、製品Rに欠陥が含まれないことを示すように適宜設定されてよい。そして、生成したラベル3222及び境界情報3223を対応するサンプル画像3221に関連付ける。これにより、各学習データセット322を生成することができる。 The method for acquiring the training data set 322 does not have to be particularly limited, and may be appropriately determined according to the embodiment. For example, a camera and a product R are prepared, and a defective or non-defective product R is photographed by the camera. This makes it possible to generate a sample image 3221. Next, a label 3222 indicating the type of defect that can be included in the product R shown in the sample image 3221 and boundary information 3223 indicating the range of the defect are appropriately generated. The method for generating the label 3222 and the boundary information 3223 may be the same as the method for generating the label 63 and the boundary information 65. The boundary information 3223 may be appropriately generated by the bounding box to indicate the range of defects. Further, when the product R shown in the sample image 3221 does not contain a defect, the values of the label 3222 and the boundary information 3223 may be appropriately set so as to indicate that the product R does not contain a defect. Then, the generated label 3222 and the boundary information 3223 are associated with the corresponding sample image 3221. As a result, each training data set 322 can be generated.

この学習データセット322の生成は、コンピュータの動作により自動的に行われてもよいし、オペレータの操作により手動的に行われてもよい。また、この学習データセット322を生成する情報処理は、推定器生成装置3において実行されてもよいし、推定器生成装置3以外の他のコンピュータにより行われてもよい。 The generation of the learning data set 322 may be automatically performed by the operation of the computer, or may be manually performed by the operation of the operator. Further, the information processing for generating the learning data set 322 may be executed by the estimator generator 3 or may be performed by a computer other than the estimator generator 3.

学習データセット322を推定器生成装置3が生成する場合、制御部31は、自動的又はオペレータの操作により手動的に上記情報処理を実行することで、複数の学習データセット322を取得する。一方、学習データセット322を他のコンピュータが生成する場合、制御部31は、例えば、ネットワーク、記憶媒体93等を介して、他のコンピュータにより生成された複数の学習データセット322を取得する。一部の学習データセット322を推定器生成装置3が生成し、残りの学習データセット322を他のコンピュータが生成してもよい。 When the estimator generator 3 generates the learning data set 322, the control unit 31 acquires a plurality of learning data sets 322 by automatically or manually executing the above information processing by the operation of the operator. On the other hand, when the learning data set 322 is generated by another computer, the control unit 31 acquires a plurality of learning data sets 322 generated by the other computer via, for example, a network, a storage medium 93, or the like. The estimator generator 3 may generate a part of the training data set 322, and another computer may generate the remaining training data set 322.

ここで、取得される学習データセット322の少なくとも一部は、画像生成装置2により生成されたデータセットであってよい。すなわち、少なくとも一部の学習データセット322のサンプル画像3221、ラベル3222、及び境界情報3223はそれぞれ、上記生成画像73、ラベル75、及び境界情報77であってよい。制御部31は、ネットワーク、記憶媒体93等を介して、画像生成装置2により生成されたデータセットを学習データセット322として取得してもよい。 Here, at least a part of the learning data set 322 acquired may be a data set generated by the image generation device 2. That is, the sample image 3221, the label 3222, and the boundary information 3223 of at least a part of the training data set 322 may be the generated image 73, the label 75, and the boundary information 77, respectively. The control unit 31 may acquire the data set generated by the image generation device 2 as the learning data set 322 via the network, the storage medium 93, or the like.

取得する学習データセット322の件数は、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。複数の学習データセット322を取得すると、制御部31は、次のステップS302に処理を進める。 The number of learning data sets 322 to be acquired may not be particularly limited and may be appropriately determined according to the embodiment. When the plurality of training data sets 322 are acquired, the control unit 31 proceeds to the next step S302.

(ステップS302)
ステップS302では、制御部31は、学習処理部312として動作し、複数の学習データセット322を利用して、推定器80の機械学習を実施する。この機械学習では、制御部31は、各学習データセット322について、サンプル画像3221を入力層801に入力すると、対応するラベル3222及び境界情報3223と一致する出力値を出力層803から出力するように推定器80を訓練する。これにより、制御部31は、製品Rの良否を判定する能力を習得した学習済みの推定器80を構築する。
(Step S302)
In step S302, the control unit 31 operates as the learning processing unit 312, and performs machine learning of the estimator 80 by using the plurality of learning data sets 322. In this machine learning, when the sample image 3221 is input to the input layer 801 for each learning data set 322, the control unit 31 outputs an output value matching the corresponding label 3222 and the boundary information 3223 from the output layer 803. Train the estimator 80. As a result, the control unit 31 constructs the trained estimator 80 that has acquired the ability to determine the quality of the product R.

この機械学習の処理は、基本的には、上記学習装置1による機械学習の処理と同様に実行されてよい。すなわち、制御部31は、処理対象となる推定器80を用意する。用意する推定器80の構成、各ニューロン間の結合の重みの初期値、及び各ニューロンの閾値の初期値は、テンプレートにより与えられてもよいし、オペレータの入力により与えられてもよい。また、再学習を行う場合には、制御部31は、過去の機械学習を行うことで得られた学習結果データに基づいて、推定器80を用意してもよい。 This machine learning process may be basically executed in the same manner as the machine learning process by the learning device 1. That is, the control unit 31 prepares the estimator 80 to be processed. The configuration of the estimator 80 to be prepared, the initial value of the weight of the connection between each neuron, and the initial value of the threshold value of each neuron may be given by the template or by the input of the operator. Further, in the case of re-learning, the control unit 31 may prepare the estimator 80 based on the learning result data obtained by performing the past machine learning.

次に、制御部31は、ステップS301で取得した各学習データセット322に含まれるサンプル画像3221を入力データとして利用し、対応するラベル3222及び境界情報3223を教師データとして利用して、推定器80の学習処理を実行する。この学習処理には、確率的勾配降下法等が用いられてよい。 Next, the control unit 31 uses the sample image 3221 included in each learning data set 322 acquired in step S301 as input data, and uses the corresponding label 3222 and the boundary information 3223 as teacher data to use the estimator 80. Executes the learning process of. A stochastic gradient descent method or the like may be used for this learning process.

例えば、制御部31は、各学習データセット322について、サンプル画像3221を入力層801に入力し、入力側から順に各層801~803に含まれる各ニューロンの発火判定を行う。これにより、制御部31は、サンプル画像3221に写る製品Rに含まれ得る欠陥の種別及び範囲を推定した結果に対応する出力値を出力層803から取得する。次に、制御部31は、各結果に対応する出力値とラベル3222及び境界情報3223の各値との誤差を算出する。続いて、制御部31は、誤差逆伝播法により、算出した出力値の誤差を用いて、推定器80における各ニューロン間の結合の重み及び各ニューロンの閾値それぞれの誤差を算出する。そして、制御部31は、算出した各誤差に基づいて、推定器80における各ニューロン間の結合の重み及び各ニューロンの閾値それぞれの値の更新を行う。 For example, the control unit 31 inputs the sample image 3221 to the input layer 801 for each learning data set 322, and determines the firing of each neuron included in each layer 801 to 803 in order from the input side. As a result, the control unit 31 acquires an output value corresponding to the result of estimating the type and range of defects that can be included in the product R shown in the sample image 3221 from the output layer 803. Next, the control unit 31 calculates an error between the output value corresponding to each result and each value of the label 3222 and the boundary information 3223. Subsequently, the control unit 31 calculates the error of the connection weight between each neuron and the error of each threshold value of each neuron in the estimator 80 by using the error of the calculated output value by the error back propagation method. Then, the control unit 31 updates the weight of the connection between each neuron and the value of each threshold value of each neuron in the estimator 80 based on each calculated error.

制御部31は、上記一連の処理を繰り返すことで、各学習データセット322について、サンプル画像3221を入力すると、対応するラベル3222及び境界情報3223と一致する出力値を出力するように、推定器80のパラメータの値を調節する。例えば、制御部31は、各学習データセット322について、出力層803から得られる出力値とラベル3222及び境界情報3223の各値との誤差の和が閾値以下になるまで、上記一連の処理による推定器80のパラメータの値の調節を繰り返す。閾値は、実施の形態に応じて適宜設定されてよい。これにより、制御部31は、各学習データセット322について、サンプル画像3221を入力層801に入力すると、対応するラベル3222及び境界情報3223と一致する出力値を出力層803から出力するように訓練された推定器80を構築することができる。この推定器80の機械学習の処理が完了すると、制御部31は、次のステップS303に処理を進める。なお、パラメータの調節を繰り返す基準は、このような閾値を用いる例に限定されなくてもよい。例えば、制御部31は、、指定された回数分、上記一連の処理により、推定器80のパラメータの値の調節を繰り返すようにしてもよい。 By repeating the above series of processes, the control unit 31 outputs the output value that matches the corresponding label 3222 and the boundary information 3223 when the sample image 3221 is input for each training data set 322. Adjust the value of the parameter of. For example, the control unit 31 estimates for each learning data set 322 by the above series of processes until the sum of the errors between the output value obtained from the output layer 803 and the values of the label 3222 and the boundary information 3223 becomes equal to or less than the threshold value. Repeat the adjustment of the parameter value of the vessel 80. The threshold value may be appropriately set according to the embodiment. As a result, the control unit 31 is trained to output the output value matching the corresponding label 3222 and the boundary information 3223 from the output layer 803 when the sample image 3221 is input to the input layer 801 for each training data set 322. The estimator 80 can be constructed. When the machine learning process of the estimator 80 is completed, the control unit 31 proceeds to the next step S303. The criterion for repeating the parameter adjustment is not limited to the example using such a threshold value. For example, the control unit 31 may repeat the adjustment of the parameter value of the estimator 80 by the above-mentioned series of processes for a specified number of times.

(ステップS303)
ステップS303では、制御部31は、保存処理部313として動作し、構築された学習済みの推定器80に関する情報を所定の記憶領域に保存する。本実施形態では、制御部31は、ステップS302により構築された学習済みの推定器80の構成及びパラメータを示す情報を第3学習結果データ325として生成する。そして、制御部31は、生成した第3学習結果データ325を所定の記憶領域に保存する。所定の記憶領域は、例えば、制御部31内のRAM、記憶部32、外部記憶装置(例えば、NAS等のデータサーバ)、記憶メディア又はこれらの組み合わせであってよい。これにより、制御部31は、本動作例に係る処理を終了する。
(Step S303)
In step S303, the control unit 31 operates as a storage processing unit 313 and stores information about the constructed learned estimator 80 in a predetermined storage area. In the present embodiment, the control unit 31 generates information indicating the configuration and parameters of the trained estimator 80 constructed by step S302 as the third learning result data 325. Then, the control unit 31 stores the generated third learning result data 325 in a predetermined storage area. The predetermined storage area may be, for example, a RAM in the control unit 31, a storage unit 32, an external storage device (for example, a data server such as NAS), a storage medium, or a combination thereof. As a result, the control unit 31 ends the process related to this operation example.

なお、学習済みの推定器80を構築した後、制御部31は、生成した第3学習結果データ325を任意のタイミングで検査装置4に転送してもよい。検査装置4は、推定器生成装置3から転送を受け付けることで第3学習結果データ325を取得してもよいし、推定器生成装置3又はデータサーバにアクセスすることで第3学習結果データ325を取得してもよい。第3学習結果データ325は、検査装置4に予め組み込まれてもよい。 After constructing the trained estimator 80, the control unit 31 may transfer the generated third learning result data 325 to the inspection device 4 at an arbitrary timing. The inspection device 4 may acquire the third learning result data 325 by accepting the transfer from the estimator generator 3, or may acquire the third learning result data 325 by accessing the estimator generator 3 or the data server. You may get it. The third learning result data 325 may be incorporated in the inspection device 4 in advance.

また、制御部31は、上記ステップS301~303の処理を定期的に繰り返すことで、第3学習結果データ325を定期的に更新してもよい。この繰り返す際には、学習データセット322の変更、修正、追加、削除等が適宜実行されてよい。そして、制御部31は、更新した第3学習結果データ325を機械学習の実行毎に検査装置4に転送することで、検査装置4の保持する第3学習結果データ325を定期的に更新してもよい。 Further, the control unit 31 may periodically update the third learning result data 325 by periodically repeating the processes of steps S301 to 303. When this is repeated, the training data set 322 may be changed, modified, added, deleted, or the like as appropriate. Then, the control unit 31 periodically updates the third learning result data 325 held by the inspection device 4 by transferring the updated third learning result data 325 to the inspection device 4 every time the machine learning is executed. May be good.

更に、制御部31は、評価用データセットを利用して、構築した推定器80の判定性能を評価してもよい。評価用データセットは、上記各学習データセット322と同様に構成可能である。すなわち、評価用データセットは、製品Rを写したサンプル画像、製品Rに含まれ得る欠陥の種別を示すラベル、及び製品Rに含まれ得る欠陥の範囲を示す境界情報の組み合わせにより構成されてよい。制御部31は、後述するステップS402と同様に、推定器80を利用して、評価用データセットのサンプル画像に写る製品Rの良否を判定する。制御部31は、この判定結果とラベル及び境界情報により示される正解とを照合することで、推定器80の判定性能を評価することができる。 Further, the control unit 31 may evaluate the determination performance of the constructed estimator 80 by using the evaluation data set. The evaluation data set can be configured in the same manner as each training data set 322 described above. That is, the evaluation data set may be composed of a combination of a sample image showing the product R, a label indicating the types of defects that can be contained in the product R, and boundary information indicating the range of defects that can be contained in the product R. .. Similar to step S402 described later, the control unit 31 uses the estimator 80 to determine the quality of the product R shown in the sample image of the evaluation data set. The control unit 31 can evaluate the determination performance of the estimator 80 by collating the determination result with the correct answer indicated by the label and the boundary information.

この推定器80の判定性能が所定の基準以下である(例えば、正答率が閾値以下である)場合には、制御部31は、複数の学習データセット322から選択した1又は複数の学習データセット322を学習装置1に送信してもよい。次に、制御部31は、送信した学習データセット322を学習データセット60として利用させて、生成器50及び推定器52の機械学習の処理を学習装置1に実行させてよい。これにより、サンプル画像3221に対応する画像を生成するための生成器50、並びに生成された画像に対して製品Rに含まれる欠陥の種別及び範囲を推定するための推定器52を学習装置1に構築させることができる。制御部31は、学習装置1に学習済みの生成器50及び推定器52を画像生成装置2へ転送させてもよい。そして、制御部31は、学習済みの生成器50及び推定器52を利用して、生成画像73、ラベル75、及び境界情報77の組み合わせによりそれぞれ構成された1又は複数のデータセットを生成する処理を画像生成装置2に実行させてもよい。 When the determination performance of the estimator 80 is equal to or less than a predetermined standard (for example, the correct answer rate is equal to or less than the threshold value), the control unit 31 may use one or a plurality of learning data sets selected from the plurality of learning data sets 322. 322 may be transmitted to the learning device 1. Next, the control unit 31 may use the transmitted learning data set 322 as the learning data set 60 to cause the learning device 1 to perform machine learning processing of the generator 50 and the estimator 52. As a result, the learning device 1 is provided with a generator 50 for generating an image corresponding to the sample image 3221 and an estimator 52 for estimating the type and range of defects included in the product R with respect to the generated image. Can be built. The control unit 31 may transfer the trained generator 50 and the estimator 52 to the image generator 2 by the learning device 1. Then, the control unit 31 uses the trained generator 50 and the estimator 52 to generate one or a plurality of data sets composed of a combination of the generated image 73, the label 75, and the boundary information 77, respectively. May be executed by the image generation device 2.

これに応じて、制御部31は、画像生成装置2により生成された1又は複数のデータセットを学習データセット322として取得してもよい。そして、制御部31は、取得した1又は複数の学習データセット322を元の学習データ群に追加してもよい。これにより、制御部31は、機械学習に利用する学習データセット322の件数を増やすことができる。制御部31は、この新たな学習データ群を利用して、推定器80の機械学習を再度実施してもよい。この一連の再学習の処理により、構築された学習済みの推定器80の判定性能を高めることができる。 In response to this, the control unit 31 may acquire one or a plurality of data sets generated by the image generation device 2 as a learning data set 322. Then, the control unit 31 may add the acquired one or more learning data sets 322 to the original learning data group. As a result, the control unit 31 can increase the number of learning data sets 322 used for machine learning. The control unit 31 may use this new learning data group to perform machine learning of the estimator 80 again. By this series of re-learning processes, the determination performance of the constructed trained estimator 80 can be improved.

[検査装置]
次に、図15を用いて、本実施形態に係る検査装置4の動作例について説明する。図15は、本実施形態に係る検査装置4の処理手順の一例を例示するフローチャートである。ただし、以下で説明する処理手順は一例に過ぎず、各処理は可能な限り変更されてよい。また、以下で説明する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。
[Inspection equipment]
Next, an operation example of the inspection device 4 according to the present embodiment will be described with reference to FIG. FIG. 15 is a flowchart illustrating an example of the processing procedure of the inspection device 4 according to the present embodiment. However, the processing procedure described below is only an example, and each processing may be changed as much as possible. Further, with respect to the processing procedure described below, steps can be omitted, replaced, and added as appropriate according to the embodiment.

(ステップS401)
ステップS401では、制御部41は、対象データ取得部411として動作し、外観検査の対象となる製品Rの写る対象画像422を取得する。本実施形態では、検査装置4は、外部インタフェース47を介してカメラCAに接続している。そのため、制御部41は、カメラCAから対象画像422を取得する。この対象画像422は、動画像データであってもよいし、静止画像データであってもよい。対象画像422を取得すると、制御部41は、次のステップS402に処理を進める。
(Step S401)
In step S401, the control unit 41 operates as the target data acquisition unit 411 to acquire the target image 422 of the product R to be visually inspected. In the present embodiment, the inspection device 4 is connected to the camera CA via the external interface 47. Therefore, the control unit 41 acquires the target image 422 from the camera CA. The target image 422 may be moving image data or still image data. When the target image 422 is acquired, the control unit 41 proceeds to the next step S402.

ただし、対象画像422を取得する経路は、このような例に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。例えば、検査装置4とは異なる他の情報処理装置が、カメラCAに接続されていてもよい。この場合、制御部41は、他の情報処理装置を介して対象画像422を取得してもよい。 However, the route for acquiring the target image 422 does not have to be limited to such an example, and may be appropriately selected according to the embodiment. For example, another information processing device different from the inspection device 4 may be connected to the camera CA. In this case, the control unit 41 may acquire the target image 422 via another information processing device.

(ステップS402)
ステップS402では、制御部41は、良否判定部412として動作し、学習済みの推定器80を利用して、対象画像422に写る製品Rの良否を判定する。
(Step S402)
In step S402, the control unit 41 operates as a quality determination unit 412, and uses the trained estimator 80 to determine the quality of the product R shown in the target image 422.

具体的には、制御部41は、第3学習結果データ325を参照して、学習済みの推定器80の設定を行う。次に、良否判定部412は、取得した対象画像422を推定器80の入力層801に入力し、入力側から順に各層801~803に含まれる各ニューロンの発火判定を行う。これにより、制御部41は、対象画像422に写る製品Rに含まれ得る欠陥の種別及び範囲を推定した結果に対応する出力値を推定器80の出力層803から取得する。 Specifically, the control unit 41 sets the trained estimator 80 with reference to the third learning result data 325. Next, the pass / fail determination unit 412 inputs the acquired target image 422 to the input layer 801 of the estimator 80, and determines the firing of each neuron included in each layer 801 to 803 in order from the input side. As a result, the control unit 41 acquires an output value corresponding to the result of estimating the type and range of defects that can be included in the product R shown in the target image 422 from the output layer 803 of the estimator 80.

これにより、制御部41は、推定器80から取得した出力値に基づいて、対象画像422に写る製品Rの良否を判定する。推定器80から取得した出力値が製品Rに欠陥が含まれることを示す場合、制御部41は、この出力値から、製品Rは良品ではない(すなわち、欠陥を含む)と判定することができる。この場合、制御部41は、推定器80から取得した出力値から、その欠陥の種別及び範囲を特定することができる。欠陥の範囲は、バウンディングボックスにより示される。一方、推定器80から取得した出力値が製品Rに欠陥が含まれないことを示す場合、制御部41は、この出力値から、製品Rは良品である(すなわち、欠陥を含まない)と判定することができる。 As a result, the control unit 41 determines the quality of the product R reflected in the target image 422 based on the output value acquired from the estimator 80. When the output value obtained from the estimator 80 indicates that the product R contains a defect, the control unit 41 can determine from this output value that the product R is not a good product (that is, contains a defect). .. In this case, the control unit 41 can specify the type and range of the defect from the output value acquired from the estimator 80. The extent of the defect is indicated by the bounding box. On the other hand, when the output value obtained from the estimator 80 indicates that the product R does not contain a defect, the control unit 41 determines from this output value that the product R is a good product (that is, does not contain a defect). can do.

なお、この良否の判定は、推定器80の出力形式に応じて適宜行われてもよい。例えば、推定器80は、欠陥の各種別に応じて、その欠陥の発生確率を出力するように構成されてもよい。この場合、制御部41は、推定器80の出力値と閾値とを比較することで、製品Rの良否を判定することができる。すなわち、閾値を超える(又は以上の)出力値が存在する場合に、制御部41は、製品Rは良品ではなく、その出力値に対応する種別の欠陥が製品Rに含まれていると判定することができる。他方、そうではない場合に、制御部41は、製品Rは良品であると判定することができる。 The quality of the determination may be appropriately determined according to the output format of the estimator 80. For example, the estimator 80 may be configured to output the probability of occurrence of the defect according to each type of defect. In this case, the control unit 41 can determine the quality of the product R by comparing the output value of the estimator 80 with the threshold value. That is, when there is an output value exceeding (or higher than) the threshold value, the control unit 41 determines that the product R is not a non-defective product and that the product R contains a defect of the type corresponding to the output value. be able to. On the other hand, if this is not the case, the control unit 41 can determine that the product R is a non-defective product.

また、例えば、推定器80は、欠陥の種別(欠陥を含まないことを含む)に対応するクラスを出力するように構成されてもよい。この場合、検査装置4は、推定器80から得られる出力値と欠陥の種別とを対応付けたテーブル形式等の参照情報(不図示)を記憶部42に保持していてもよい。これに応じて、制御部41は、参照情報を参照することにより、推定器80から得られた出力値に応じて、対象画像422に写る製品Rの良否を判定することができる。 Further, for example, the estimator 80 may be configured to output a class corresponding to a defect type (including not including a defect). In this case, the inspection device 4 may hold reference information (not shown) such as a table format in which the output value obtained from the estimator 80 and the type of defect are associated with each other in the storage unit 42. In response to this, the control unit 41 can determine the quality of the product R shown in the target image 422 according to the output value obtained from the estimator 80 by referring to the reference information.

以上により、制御部41は、推定器80を利用して、対象画像422に写る製品Rの良否を判定することができる。製品Rの良否の判定が完了すると、制御部41は、次のステップS403に処理を進める。 As described above, the control unit 41 can determine the quality of the product R shown in the target image 422 by using the estimator 80. When the quality determination of the product R is completed, the control unit 41 proceeds to the next step S403.

(ステップS403)
ステップS403では、制御部41は、出力部413として動作し、ステップS402により製品Rの良否を判定した結果を出力する。
(Step S403)
In step S403, the control unit 41 operates as the output unit 413 and outputs the result of determining the quality of the product R in step S402.

製品Rの良否を判定した結果の出力形式は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。例えば、制御部41は、製品Rの良否を判定した結果をそのまま出力装置45に出力してもよい。更に、ステップS402において、製品Rに欠陥があると判定した場合、制御部41は、欠陥を発見したことを知らせるための警告を本ステップS403の出力処理として行ってもよい。このとき、制御部41は、発見した欠陥の存在する範囲をバウンディングボックスにより示すことができる。 The output format as a result of determining the quality of the product R does not have to be particularly limited, and may be appropriately selected according to the embodiment. For example, the control unit 41 may output the result of determining the quality of the product R to the output device 45 as it is. Further, when it is determined in step S402 that the product R has a defect, the control unit 41 may issue a warning for notifying that the defect has been found as the output process of this step S403. At this time, the control unit 41 can indicate the range in which the found defect exists by the bounding box.

また、制御部41は、本ステップS403の出力処理として、製品Rの良否を判定した結果に応じた所定の制御処理を実行してもよい。具体例として、検査装置4は、製品の搬送を行う製造ラインに接続されていてもよい。この場合に、制御部41は、製品Rに欠陥があると判定したときに、欠陥のある製品Rを欠陥のない製品とは異なる経路で搬送する指令を製造ラインに送信する処理を本ステップ403の出力処理として行ってもよい。 Further, the control unit 41 may execute a predetermined control process according to the result of determining the quality of the product R as the output process of this step S403. As a specific example, the inspection device 4 may be connected to a production line for transporting products. In this case, when the control unit 41 determines that the product R is defective, the control unit 41 sends a command to the production line to convey the defective product R by a route different from that of the non-defective product, in this step 403. It may be performed as an output process of.

製品Rの良否を判定した結果の出力処理が完了すると、制御部41は、本動作例に係る処理を終了する。なお、制御部41は、製造ライン上を搬送される製品RがカメラCAの撮影範囲に入る度に、ステップS401~S403の一連の処理を実行してもよい。これにより、検査装置4は、製造ライン上を搬送される製品Rの外観検査を行うことができる。 When the output processing as a result of determining the quality of the product R is completed, the control unit 41 ends the processing related to this operation example. The control unit 41 may execute a series of processes of steps S401 to S403 each time the product R conveyed on the production line enters the shooting range of the camera CA. As a result, the inspection device 4 can inspect the appearance of the product R transported on the production line.

[特徴]
以上のとおり、本実施形態に係る学習装置1は、ステップS102及びS103の処理により、学習画像61に対応する画像を生成するように訓練された生成器50を構築すると共に、学習画像61に写る欠陥の種別及び範囲を推定するように訓練された推定器52を構築することができる。これらのうち、生成器50を利用することで、指定した欠陥を含む製品の写り得るサンプル画像を自動的に生成することができる。加えて、推定器52を利用することで、生成されたサンプル画像に写る製品Rに含まれる欠陥の範囲を推定し、推定した欠陥の範囲を示す情報を境界情報としてサンプル画像に自動的に付与することができる。したがって、本実施形態によれば、学習データを用意する際に、サンプル画像内において欠陥の範囲を手動で指定する手間を省略することができる。そのため、欠陥の範囲を検出する能力を習得させるための機械学習に利用する学習データを用意するのにかかるコストを低減することができる。
[feature]
As described above, the learning device 1 according to the present embodiment constructs the generator 50 trained to generate the image corresponding to the learning image 61 by the processing of steps S102 and S103, and is reflected in the learning image 61. An estimator 52 trained to estimate the type and extent of defects can be constructed. Of these, by using the generator 50, it is possible to automatically generate a sample image of the product including the specified defect. In addition, by using the estimator 52, the range of defects contained in the product R reflected in the generated sample image is estimated, and information indicating the estimated range of defects is automatically added to the sample image as boundary information. can do. Therefore, according to the present embodiment, when preparing the training data, it is possible to omit the trouble of manually specifying the range of defects in the sample image. Therefore, it is possible to reduce the cost of preparing the learning data used for machine learning to acquire the ability to detect the range of defects.

また、本実施形態に係る画像生成装置2では、ステップS201~S205の一連の処理により、学習装置1により構築された生成器50及び推定器52を利用することで、欠陥の範囲を手動で指定する手間を省略した上で、欠陥の範囲を検出する能力を習得させるための機械学習に利用可能なデータセットを生成することができる。加えて、本実施形態では、画像生成装置2により生成されたデータセットを学習データセット322として利用することができる。これにより、本実施形態に係る推定器生成装置3では、上記ステップS301において、学習データセット322を収集するコストを低減することができる。更に、本実施形態では、画像生成装置2にデータセットを生成させることで、推定器80の機械学習に利用する学習データセット322の件数を増やすことができる。これにより、本実施形態に係る検査装置4では、製品Rの良否を判定する精度を高めることができる。 Further, in the image generator 2 according to the present embodiment, the range of defects is manually specified by using the generator 50 and the estimator 52 constructed by the learning device 1 by a series of processes of steps S201 to S205. It is possible to generate a data set that can be used for machine learning to acquire the ability to detect the range of defects without the trouble of doing so. In addition, in the present embodiment, the data set generated by the image generation device 2 can be used as the learning data set 322. As a result, in the estimator generator 3 according to the present embodiment, the cost of collecting the learning data set 322 can be reduced in the step S301. Further, in the present embodiment, the number of learning data sets 322 used for machine learning of the estimator 80 can be increased by causing the image generation device 2 to generate data sets. As a result, in the inspection device 4 according to the present embodiment, the accuracy of determining the quality of the product R can be improved.

§4 変形例
以上、本発明の実施の形態を詳細に説明してきたが、前述までの説明はあらゆる点において本発明の例示に過ぎない。本発明の範囲を逸脱することなく種々の改良や変形を行うことができることは言うまでもない。例えば、以下のような変更が可能である。なお、以下では、上記実施形態と同様の構成要素に関しては同様の符号を用い、上記実施形態と同様の点については、適宜説明を省略した。以下の変形例は適宜組み合わせ可能である。
§4 Modifications Although the embodiments of the present invention have been described in detail above, the above description is merely an example of the present invention in all respects. Needless to say, various improvements and modifications can be made without departing from the scope of the present invention. For example, the following changes can be made. In the following, the same reference numerals will be used for the same components as those in the above embodiment, and the same points as in the above embodiment will be omitted as appropriate. The following modifications can be combined as appropriate.

<4.1>
上記実施形態では、生成器50、推定器52、判別器54、エンコーダ56、及び推定器80それぞれには、いわゆる多層構造の全結合ニューラルネットワークが用いられている。しかしながら、生成器50、推定器52、判別器54、エンコーダ56、及び推定器80それぞれを構成するニューラルネットワークの構造及び種類は、このような例に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。例えば、生成器50、推定器52、判別器54、エンコーダ56、及び推定器80それぞれには、畳み込みニューラルネットワークが利用されてもよい。
<4.1>
In the above embodiment, a so-called multi-layered fully connected neural network is used for each of the generator 50, the estimator 52, the discriminator 54, the encoder 56, and the estimator 80. However, the structure and type of the neural network constituting each of the generator 50, the estimator 52, the discriminator 54, the encoder 56, and the estimator 80 may not be limited to such an example, and may vary depending on the embodiment. It may be appropriately selected. For example, a convolutional neural network may be used for each of the generator 50, the estimator 52, the discriminator 54, the encoder 56, and the estimator 80.

また、上記実施形態では、生成器50、推定器52、及び推定器80を構成する学習モデルとしてニューラルネットワークが用いられている。しかしながら、生成器50、推定器52、及び推定器80それぞれを構成する学習モデルは、画像の機械学習を実施可能であれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。 Further, in the above embodiment, a neural network is used as a learning model constituting the generator 50, the estimator 52, and the estimator 80. However, the type of the learning model constituting each of the generator 50, the estimator 52, and the estimator 80 may not be particularly limited as long as machine learning of the image can be performed, depending on the embodiment. It may be appropriately selected.

<4.2>
上記実施形態では、第1学習結果データ123は、生成器50の構成を示す情報を含んでいる。第2学習結果データ125は、推定器52の構成を示す情報を含んでいる。第3学習結果データ325は、推定器80の構成を示す情報を含んでいる。しかしながら、各学習結果データ(123、125、325)の構成は、このような例に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。例えば、それぞれに利用するニューラルネットワークの構成が各装置で共通化されている場合には、各学習結果データ(123、125、325)は、ニューラルネットワークの構成を示す情報を含んでいなくてもよい。
<4.2>
In the above embodiment, the first learning result data 123 includes information indicating the configuration of the generator 50. The second learning result data 125 includes information indicating the configuration of the estimator 52. The third learning result data 325 contains information indicating the configuration of the estimator 80. However, the configuration of each learning result data (123, 125, 325) does not have to be limited to such an example, and may be appropriately determined according to the embodiment. For example, when the configuration of the neural network used for each is common to each device, each learning result data (123, 125, 325) does not include information indicating the configuration of the neural network. good.

<4.3>
上記実施形態では、境界情報(65、77、3223)は、バウンディングボックスにより欠陥の範囲を示す。しかしながら、欠陥の範囲を示す方法は、このような例に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。欠陥の範囲は、バウンディングボックス以外の形式で示されてもよい。
<4.3>
In the above embodiment, the boundary information (65, 77, 3223) indicates the range of defects by the bounding box. However, the method for indicating the range of defects does not have to be limited to such an example, and may be appropriately selected depending on the embodiment. The extent of the defect may be indicated in a format other than the bounding box.

<4.4>
上記実施形態では、推定器生成装置3は、ラベル3222及び境界情報3223を教師データとして利用することで、画像に写る製品Rに含まれ得る欠陥の種別及び範囲を推定するように訓練された推定器80を構築している。しかしながら、推定器80に習得される能力は、このような例に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。例えば、この一連の処理から、ラベル3222は省略されてよい。これにより、推定器生成装置3は、欠陥の範囲のみを推定するように訓練された推定器80を構築することができる。
<4.4>
In the above embodiment, the estimator generator 3 is trained to estimate the type and range of defects that may be contained in the product R shown in the image by using the label 3222 and the boundary information 3223 as teacher data. We are building a vessel 80. However, the ability acquired by the estimator 80 does not have to be limited to such an example, and may be appropriately determined according to the embodiment. For example, label 3222 may be omitted from this series of processes. This allows the estimator generator 3 to build an estimator 80 trained to estimate only the extent of the defect.

<4.5>
上記実施形態に係る学習ネットワーク500では、エンコーダ56の出力が生成器50の入力に接続されており、生成器50の出力が推定器52の入力及び判別器54の入力に接続されている。そして、機械学習の処理では、算出される各誤差(LC、LBB、LKL、LD、LGD、LGC、LG)の和が小さくなるように、学習ネットワーク500の各パラメータの値が調節される。しかしながら、学習ネットワーク500の構成は、このような例に限定されなくてもよく、実施の形態に応じて適宜設定されてよい。各機械学習の処理は、生成器50及び推定器52の構成に応じて適宜選択されてよい。生成器50及び推定器52はそれぞれ単独で訓練されてもよい。
<4.5>
In the learning network 500 according to the above embodiment, the output of the encoder 56 is connected to the input of the generator 50, and the output of the generator 50 is connected to the input of the estimator 52 and the input of the discriminator 54. Then, in the machine learning process, each parameter of the learning network 500 is set so that the sum of the calculated errors ( LC , L BB , L KL , L D , L GD , L GC , LG ) becomes small. The value is adjusted. However, the configuration of the learning network 500 does not have to be limited to such an example, and may be appropriately set according to the embodiment. Each machine learning process may be appropriately selected according to the configuration of the generator 50 and the estimator 52. The generator 50 and the estimator 52 may each be trained independently.

図16は、本変形例に係る学習ネットワーク500Aを保持する学習装置1のソフトウェア構成の一例を模式的に例示する。上記実施形態に係る学習ネットワーク500が学習ネットワーク500Aに置き換わる点を除き、本変形例に係る学習装置1は、上記実施形態と同様に構成されている。 FIG. 16 schematically illustrates an example of the software configuration of the learning device 1 that holds the learning network 500A according to this modification. The learning device 1 according to the present modification is configured in the same manner as the above embodiment, except that the learning network 500 according to the above embodiment is replaced with the learning network 500A.

本変形例に係る学習ネットワーク500Aは、生成器50A及び判別器54Aを含んでいる。生成器50Aの出力は、判別器54Aの入力に接続されている。一方、推定器52Aは、生成器50Aには接続されておらず、学習ネットワーク500Aから切り離されている。本変形例では、推定器52Aは、個別に訓練される。 The learning network 500A according to this modification includes a generator 50A and a discriminator 54A. The output of the generator 50A is connected to the input of the discriminator 54A. On the other hand, the estimator 52A is not connected to the generator 50A and is disconnected from the learning network 500A. In this variant, the estimator 52A is trained individually.

次に、図17A~図17Cを更に用いて、生成器50A及び推定器52Aの機械学習の過程の一例について説明する。図17A及び図17Bは、生成器50Aを含む学習ネットワーク500Aの機械学習の過程の一例を模式的に例示する。図17Cは、推定器52Aの機械学習の過程の一例を模式的に例示する。 Next, an example of the machine learning process of the generator 50A and the estimator 52A will be described with reference to FIGS. 17A to 17C. 17A and 17B schematically illustrate an example of the machine learning process of the learning network 500A including the generator 50A. FIG. 17C schematically illustrates an example of the machine learning process of the estimator 52A.

本変形例では、第1学習処理部112は、学習ネットワーク500Aの機械学習を行う。この学習ネットワーク500Aの機械学習を行うことは、判別器54Aを訓練する第1訓練ステップ及び生成器50Aを訓練する第2訓練ステップを交互に行うことを含む。本変形例に係る生成器50A及び判別器54Aそれぞれの構成は、上記実施形態に係る生成器50及び判別器54それぞれと同様であってよい。本変形例に係る第1訓練ステップ及び第2訓練ステップはそれぞれ、上記実施形態に係る第1訓練ステップ及び第2訓練ステップとほぼ同様である。すなわち、第1訓練ステップでは、第1学習処理部112は、判別器54Aに入力された入力画像が、生成器50Aにより生成された画像69であるか複数の学習データセット60から得られた学習画像61であるかを判別するように、判別器54Aを訓練する。第2訓練ステップでは、第1学習処理部112は、生成器50Aにより生成される画像69が、判別器54Aによる判別を誤らせるようなものとなるように、生成器50Aを訓練する。 In this modification, the first learning processing unit 112 performs machine learning of the learning network 500A. Performing machine learning of the learning network 500A includes alternately performing a first training step for training the discriminator 54A and a second training step for training the generator 50A. The configurations of the generator 50A and the discriminator 54A according to the present modification may be the same as those of the generator 50 and the discriminator 54 according to the above embodiment. The first training step and the second training step according to the present modification are substantially the same as the first training step and the second training step according to the above embodiment, respectively. That is, in the first training step, in the first training processing unit 112, the input image input to the discriminator 54A is the image 69 generated by the generator 50A, or the learning obtained from the plurality of training data sets 60. The discriminator 54A is trained to discriminate whether it is the image 61. In the second training step, the first learning processing unit 112 trains the generator 50A so that the image 69 generated by the generator 50A misleads the discrimination by the discriminator 54A.

具体的には、図17Aに示されるとおり、第1訓練ステップでは、第1学習処理部112は、所定の確率分布からノイズ(潜在変数)を抽出し、抽出したノイズと各ラベル63とを組み合わせて、複数の第1データセットを生成する。所定の確率分布は、例えば、ガウス分布、一様分布等であってよい。ノイズの抽出には、任意の確率分布が利用されてよい。続いて、第1学習処理部112は、各第1データセット(各ラベル63及びノイズ)を生成器50Aに入力し、生成器50Aの演算処理を実行する。これにより、第1学習処理部112は、各ラベル63から画像を生成した結果に対応する出力(画像69)を生成器50Aから取得する。第1学習処理部112は、生成された各画像69と各ラベル63とを組み合わせることで、複数の第2データセットを生成する。 Specifically, as shown in FIG. 17A, in the first training step, the first learning processing unit 112 extracts noise (latent variable) from a predetermined probability distribution, and combines the extracted noise with each label 63. To generate a plurality of first data sets. The predetermined probability distribution may be, for example, a Gaussian distribution, a uniform distribution, or the like. Any probability distribution may be used for noise extraction. Subsequently, the first learning processing unit 112 inputs each first data set (each label 63 and noise) to the generator 50A, and executes arithmetic processing of the generator 50A. As a result, the first learning processing unit 112 acquires the output (image 69) corresponding to the result of generating the image from each label 63 from the generator 50A. The first learning processing unit 112 generates a plurality of second data sets by combining the generated images 69 and the labels 63.

次に、第1学習処理部112は、各第2データセット(生成器50Aの生成した各画像69及び各ラベル63)を判別器54Aに入力し、判別器54Aの演算処理を実行する。これにより、第1学習処理部112は、入力画像が生成器50A由来か学習データセット60由来かを判別した結果に対応する出力値を判別器54Aから取得する。この場面では、生成器50Aにより生成された各画像69が入力画像であるため、判別器54Aは、「偽」と判別するのが正解である。第1学習処理部112は、各第2データセットについて、判別器54Aから得られる出力値とこの正解との誤差(LDA)を算出する。 Next, the first learning processing unit 112 inputs each second data set (each image 69 generated by the generator 50A and each label 63) to the discriminator 54A, and executes arithmetic processing of the discriminator 54A. As a result, the first learning processing unit 112 acquires an output value corresponding to the result of determining whether the input image is derived from the generator 50A or the learning data set 60 from the discriminator 54A. In this scene, since each image 69 generated by the generator 50A is an input image, the correct answer is that the discriminator 54A discriminates as "false". The first learning processing unit 112 calculates an error ( LDA ) between the output value obtained from the discriminator 54A and the correct answer for each second data set.

同様に、第1学習処理部112は、各学習データセット60に含まれる学習画像61及びラベル63を判別器54Aに入力し、判別器54Aの演算処理を実行する。これにより、第1学習処理部112は、入力画像が生成器50A由来か学習データセット60由来かを判別した結果に対応する出力値を判別器54Aから取得する。この場面では、各学習画像61が入力画像であるため、判別器54Aは、「真」と判別するのが正解である。第1学習処理部112は、各学習データセット60について、判別器54Aから得られる出力値とこの正解との誤差(LDA)を算出する。 Similarly, the first learning processing unit 112 inputs the learning image 61 and the label 63 included in each learning data set 60 to the discriminator 54A, and executes the arithmetic processing of the discriminator 54A. As a result, the first learning processing unit 112 acquires an output value corresponding to the result of determining whether the input image is derived from the generator 50A or the learning data set 60 from the discriminator 54A. In this scene, since each learning image 61 is an input image, the correct answer is that the discriminator 54A determines that it is “true”. The first learning processing unit 112 calculates an error ( LDA ) between the output value obtained from the discriminator 54A and the correct answer for each learning data set 60.

そして、第1学習処理部112は、算出される誤差(LDA)の和が小さくなるように、判別器54Aのパラメータの値を調節する。例えば、判別器54から得られる出力値と真偽の正解との誤差の和が閾値以下になるまで、第1学習処理部112は、上記一連の処理により、判別器54Aのパラメータの値の調節を繰り返す。これにより、第1訓練ステップでは、第1学習処理部112は、判別器54Aに入力された入力画像が、生成器50Aにより生成された画像69であるか複数の学習データセット60から得られた学習画像61であるかを判別するように、判別器54Aを訓練する。 Then, the first learning processing unit 112 adjusts the value of the parameter of the discriminator 54A so that the sum of the calculated errors ( LDA ) becomes small. For example, the first learning processing unit 112 adjusts the value of the parameter of the discriminator 54A by the above series of processing until the sum of the error between the output value obtained from the discriminator 54 and the correct answer of truth is equal to or less than the threshold value. repeat. As a result, in the first training step, in the first training processing unit 112, the input image input to the discriminator 54A is the image 69 generated by the generator 50A or obtained from a plurality of training data sets 60. The discriminator 54A is trained so as to discriminate whether the image is the learning image 61.

図17Bに示されるとおり、第2訓練ステップでは、第1学習処理部112は、所定の確率分布からノイズ(潜在変数)を抽出し、抽出したノイズと各ラベル63とを組み合わせて、複数のデータセットを生成する。各データセットは、上記第1データセットと同じでもよいし、異なっていてもよい。続いて、第1学習処理部112は、各データセット(各ラベル63及びノイズ)を生成器50Aに入力し、生成器50Aの演算処理を実行する。これにより、第1学習処理部112は、各ラベル63から画像を生成した結果に対応する出力(画像69)を生成器50Aから取得する。 As shown in FIG. 17B, in the second training step, the first learning processing unit 112 extracts noise (latent variable) from a predetermined probability distribution, combines the extracted noise with each label 63, and a plurality of data. Generate a set. Each data set may be the same as or different from the first data set described above. Subsequently, the first learning processing unit 112 inputs each data set (each label 63 and noise) to the generator 50A, and executes arithmetic processing of the generator 50A. As a result, the first learning processing unit 112 acquires the output (image 69) corresponding to the result of generating the image from each label 63 from the generator 50A.

次に、第1学習処理部112は、生成された各画像69及び対応する各ラベル63の組み合わせを判別器54Aに入力し、判別器54Aの演算処理を実行する。これにより、第1学習処理部112は、入力画像が生成器50A由来か学習データセット60由来かを判別した結果に対応する出力値を判別器54Aから取得する。この生成器50Aの訓練では、判別器54Aによる判別の結果が誤ることが正解である。つまり、判別器54Aから得られる出力値が「真」に対応することが正解である。第1学習処理部112は、各データセットについて、一連の処理により判別器54Aから得られる出力値とこの正解(つまり、「真」)との誤差(LGDA)を算出する。 Next, the first learning processing unit 112 inputs the combination of each generated image 69 and each corresponding label 63 to the discriminator 54A, and executes the arithmetic processing of the discriminator 54A. As a result, the first learning processing unit 112 acquires an output value corresponding to the result of determining whether the input image is derived from the generator 50A or the learning data set 60 from the discriminator 54A. In the training of the generator 50A, the correct answer is that the result of the discrimination by the discriminator 54A is incorrect. That is, the correct answer is that the output value obtained from the discriminator 54A corresponds to "true". The first learning processing unit 112 calculates an error ( LGDA ) between the output value obtained from the discriminator 54A by a series of processing and the correct answer (that is, “true”) for each data set.

そして、第1学習処理部112は、算出される誤差(LGDA)の和が小さくなるように、生成器50Aのパラメータの値を調節する。例えば、各データセットについて、判別器54Aから得られる出力値と「真」との誤差の和が閾値以下になるまで、第1学習処理部112は、上記一連の処理により、生成器50Aのパラメータの値の調節を繰り返す。これにより、第2訓練ステップでは、第1学習処理部112は、生成器50Aにより生成される画像69が、判別器54Aによる判別を誤らせるようなものとなるように、生成器50Aを訓練する。 Then, the first learning processing unit 112 adjusts the value of the parameter of the generator 50A so that the sum of the calculated errors ( LGDA ) becomes small. For example, for each data set, the first learning processing unit 112 performs the parameter of the generator 50A by the above series of processing until the sum of the error between the output value obtained from the discriminator 54A and the "true" becomes equal to or less than the threshold value. Repeat the adjustment of the value of. As a result, in the second training step, the first learning processing unit 112 trains the generator 50A so that the image 69 generated by the generator 50A misleads the discrimination by the discriminator 54A.

本変形例では、第1学習処理部112は、上記第1訓練ステップ及び第2訓練ステップを交互に繰り返すことで、各学習データセット60に含まれるラベル63の入力に対して、入力されたラベル63に関連付けられた学習画像61に対応する画像を生成するように訓練された生成器50Aを構築する。保存処理部114は、構築された生成器50Aの構成及びパラメータを示す第1学習結果データ123Aを生成し、生成した第1学習結果データ123Aを所定の記憶領域に保存する。 In this modification, the first learning processing unit 112 alternately repeats the first training step and the second training step, so that the input of the label 63 included in each learning data set 60 is represented by the input label. A generator 50A trained to generate an image corresponding to the training image 61 associated with 63 is constructed. The storage processing unit 114 generates the first learning result data 123A showing the configuration and parameters of the constructed generator 50A, and stores the generated first learning result data 123A in a predetermined storage area.

一方、図17Cに示されるとおり、本変形例に係る推定器52Aは、いわゆる畳み込みニューラルネットワークにより構成されている。具体的に、本変形例に係る推定器52Aは、1又は複数の畳み込み層524、領域提案ネットワーク(region proposal network, RPN)525、ROI(region of interest)プーリング層526、1又は複数の全結合層527、分類部528、及び回帰部529を備えている。 On the other hand, as shown in FIG. 17C, the estimator 52A according to this modification is configured by a so-called convolutional neural network. Specifically, the estimator 52A according to this modification has one or more convolutional layers 524, a region proposal network (RPN) 525, a ROI (region of interest) pooling layer 526, or one or more fully coupled. It includes a layer 527, a classification unit 528, and a regression unit 529.

畳み込み層524は、画像の畳み込み演算を行う層である。画像の畳み込みとは、画像と所定のフィルタとの相関を算出する処理に相当する。推定器52Aが複数の畳み込み層524を含む場合、最も入力側に配置された畳み込み層524に入力画像が入力され、最も出力側に配置された畳み込み層524の出力が領域提案ネットワーク525及びROIプーリング層526に接続される。 The convolution layer 524 is a layer that performs an image convolution operation. Image convolution corresponds to a process of calculating the correlation between an image and a predetermined filter. When the estimator 52A includes a plurality of convolution layers 524, the input image is input to the convolution layer 524 arranged on the input side most, and the output of the convolution layer 524 arranged on the output side is the region proposal network 525 and ROI pooling. Connected to layer 526.

領域提案ネットワーク525は、最も出力側に配置される畳み込み層524から出力される特徴マップの局所領域毎に、物体らしさを示すスコアの付与された複数のバウンディングボックスを提案するように構成される。領域提案ネットワーク525は、例えば、1又は複数の全結合層、バウンディングボックスのパラメータ(位置及びアスペクト比)を予測する回帰ネットワーク、及び物体の有無を予測する分類ネットワークにより構成される。1又は複数の全結合層は、入力側に配置される。最も出力側に配置される全結合層の出力が、回帰ネットワーク及び分類ネットワークに接続される。回帰ネットワーク及び分類ネットワークはそれぞれ、例えば、1又は複数の全結合層により構成される。 The region proposal network 525 is configured to propose a plurality of bounding boxes with scores indicating object-likeness for each local region of the feature map output from the convolution layer 524 arranged on the output side. The region proposal network 525 is composed of, for example, one or more fully connected layers, a regression network that predicts the parameters (position and aspect ratio) of the bounding box, and a classification network that predicts the presence or absence of an object. One or more fully connected layers are arranged on the input side. The output of the fully connected layer located on the output side is connected to the regression network and the classification network. The regression network and the classification network are each composed of, for example, one or more fully connected layers.

ROIプーリング層526は、畳み込み層524から出力された特徴マップにおいて、領域提案ネットワーク525の出力に基づいて提案された任意サイズの物体領域候補をプーリングすることで、一定の大きさのベクトルに変換するように構成される。ROIプーリング層526の出力は、(最も入力側に配置された)全結合層527に接続される。 The ROI pooling layer 526 converts an object region candidate of an arbitrary size proposed based on the output of the region proposal network 525 into a vector of a constant size by pooling the object region candidate of an arbitrary size in the feature map output from the convolution layer 524. It is configured as follows. The output of the ROI pooling layer 526 is connected to the fully coupled layer 527 (located closest to the input side).

全結合層527は、隣接する層の間のニューロン全てを結合した層である。推定器52Aが複数の全結合層527を含む場合、最も出力側に配置された全結合層527の出力が分類部528及び回帰部529に接続される。分類部528は、最も出力側に配置された全結合層527の出力から画像に写る製品Rに含まれる欠陥の種別を分類するように構成される。分類部528は、例えば、全結合層により構成される。回帰部529は、最も出力側に配置された全結合層527の出力から画像に写る製品Rに含まれる欠陥の範囲(例えば、バウンディングボックス)を回帰するように構成される。回帰部529は、例えば、全結合層により構成される。 Fully connected layer 527 is a layer that connects all neurons between adjacent layers. When the estimator 52A includes a plurality of fully connected layers 527, the output of the fully connected layer 527 arranged on the output side is connected to the classification unit 528 and the regression unit 529. The classification unit 528 is configured to classify the types of defects included in the product R shown in the image from the output of the fully connected layer 527 arranged on the output side. The classification unit 528 is composed of, for example, a fully connected layer. The regression unit 529 is configured to regress from the output of the fully connected layer 527 arranged on the output side to the range of defects included in the product R shown in the image (for example, a bounding box). The regression unit 529 is composed of, for example, a fully connected layer.

第2の機械学習では、第2学習処理部113は、領域提案ネットワーク525を訓練する第1訓練ステップとそれ以外の部分を訓練する第2訓練ステップとを交互に実行する。第1訓練ステップでは、第2学習処理部113は、物体の有無の分類に関する誤差とバウンディングボックスの位置及びアスペクト比に関する誤差とが小さくなるように、領域提案ネットワーク525のパラメータの値を調節する。第2訓練ステップでは、第2学習処理部113は、学習済みの領域提案ネットワーク525を利用して、上記実施形態と同様に、各誤差(LC、LBB)が小さくなるように、各パラメータの値を調節する。 In the second machine learning, the second learning processing unit 113 alternately executes the first training step for training the region proposal network 525 and the second training step for training the other parts. In the first training step, the second learning processing unit 113 adjusts the value of the parameter of the region proposal network 525 so that the error regarding the classification of the presence or absence of the object and the error regarding the position and aspect ratio of the bounding box are small. In the second training step, the second learning processing unit 113 utilizes the learned area proposal network 525 and makes each parameter small so that each error (LC, LB B ) becomes small as in the above embodiment. Adjust the value of.

本変形例では、第2学習処理部113は、上記第1訓練ステップ及び第2訓練ステップを交互に繰り返すことで、各学習データセット60に含まれる学習画像61の入力に対して、入力された学習画像61に関連付けられたラベル63及び境界情報65と一致するように、入力された学習画像61に写る製品Rに含まれる欠陥の種別及び範囲を推定するように訓練された推定器52Aを構築する。保存処理部114は、構築された推定器52Aの構成及びパラメータを示す第2学習結果データ125Aを生成し、生成した第2学習結果データ125Aを所定の記憶領域に保存する。ただし、推定器52Aの構成は、このような例に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。推定器52Aの構成は、上記推定器52と同様であってもよい。 In this modification, the second learning processing unit 113 is input to the input of the learning image 61 included in each learning data set 60 by alternately repeating the first training step and the second training step. Constructs an estimator 52A trained to estimate the type and range of defects contained in the product R appearing in the input training image 61 so as to match the label 63 and boundary information 65 associated with the training image 61. do. The storage processing unit 114 generates the second learning result data 125A showing the configuration and parameters of the constructed estimator 52A, and stores the generated second learning result data 125A in a predetermined storage area. However, the configuration of the estimator 52A does not have to be limited to such an example, and may be appropriately determined according to the embodiment. The configuration of the estimator 52A may be the same as that of the estimator 52.

(動作例)
次に、本変形例に係る学習装置1の動作例について説明する。本変形例に係る学習装置1は、各機械学習の処理過程の一部が上記実施形態と異なる点を除き、上記実施形態と同様に動作することができる。すなわち、ステップS101では、制御部11は、複数の学習データセット60を取得する。次のステップS102では、制御部11は、第1学習処理部112として動作し、生成器50Aに関する第1の機械学習を実行する。
(Operation example)
Next, an operation example of the learning device 1 according to this modification will be described. The learning device 1 according to this modification can operate in the same manner as in the above embodiment, except that a part of the processing process of each machine learning is different from the above embodiment. That is, in step S101, the control unit 11 acquires a plurality of learning data sets 60. In the next step S102, the control unit 11 operates as the first learning processing unit 112 and executes the first machine learning regarding the generator 50A.

図18を更に用いて、第1の機械学習の処理手順の一例について説明する。図18は、本変形例に係る第1の機械学習の処理手順の一例を例示する。本変形例に係る第1の機械学習を行うことは、以下のステップS601~S603を含む。ただし、以下で説明する処理手順は一例に過ぎず、各処理は可能な限り変更されてよい。また、以下で説明する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。 An example of the processing procedure of the first machine learning will be described further with reference to FIG. FIG. 18 illustrates an example of the processing procedure of the first machine learning according to this modification. Performing the first machine learning according to this modification includes the following steps S601 to S603. However, the processing procedure described below is only an example, and each processing may be changed as much as possible. Further, with respect to the processing procedure described below, steps can be omitted, replaced, and added as appropriate according to the embodiment.

ステップS601を実行する前に、制御部11は、上記実施形態と同様に、処理対象となる生成器50A及び判別器54Aを用意する。ステップS601では、制御部11は、上記のとおり、算出される誤差(LDA)の和が小さくなるように、判別器54Aのパラメータの値を調節する。これにより、制御部11は、判別器54Aに入力された入力画像が、生成器50Aにより生成された画像69であるか複数の学習データセット60から得られた学習画像61であるかを判別するように、判別器54Aを訓練する。 Before executing step S601, the control unit 11 prepares the generator 50A and the discriminator 54A to be processed, as in the above embodiment. In step S601, the control unit 11 adjusts the value of the parameter of the discriminator 54A so that the sum of the calculated errors ( LDA ) becomes small as described above. As a result, the control unit 11 determines whether the input image input to the discriminator 54A is the image 69 generated by the generator 50A or the training image 61 obtained from the plurality of training data sets 60. As such, the discriminator 54A is trained.

ステップS602では、制御部11は、上記のとおり、算出される誤差(LGDA)の和が小さくなるように、生成器50Aのパラメータの値を調節する。これにより、制御部11は、生成器50Aにより生成される画像69が、判別器54Aによる判別を誤らせるようなものとなるように、生成器50Aを訓練する。なお、各ステップS601及びS602におけるパラメータの値の調節は、上記実施形態と同様に処理されてよい。 In step S602, the control unit 11 adjusts the value of the parameter of the generator 50A so that the sum of the calculated errors ( LGDA ) becomes small as described above. As a result, the control unit 11 trains the generator 50A so that the image 69 generated by the generator 50A is such that the image 69 generated by the generator 50A is erroneously discriminated by the discriminator 54A. The adjustment of the value of the parameter in each step S601 and S602 may be processed in the same manner as in the above embodiment.

ステップS603では、制御部11は、ステップS602及びS603の訓練ステップの実行を繰り返すか否かを判定する。訓練ステップの実行を繰り返す基準は、実施の形態に応じて適宜決定されてよい。例えば、ステップS602及びS603の訓練ステップを実行する回数が予め設定されていてもよい。この場合、制御部11は、ステップS602及びS603の訓練ステップを実行した回数が設定回数に到達したか否かを判定する。ステップS602及びS603の訓練ステップを実行した回数が設定回数に到達していないと判定した場合には、制御部11は、ステップS601に処理を戻す。一方、ステップS602及びS603の訓練ステップを実行した回数が設定回数に到達したと判定した場合には、制御部11は、本変形例に係る第1の機械学習の処理を完了し、次のステップS103に処理を進める。これにより、制御部11は、各学習データセット60に含まれるラベル63の入力に対して、入力されたラベル63に関連付けられた学習画像61に対応する画像を生成するように訓練された生成器50を構築する。 In step S603, the control unit 11 determines whether or not to repeat the execution of the training steps of steps S602 and S603. Criteria for repeating the execution of the training step may be appropriately determined depending on the embodiment. For example, the number of times the training steps of steps S602 and S603 are executed may be preset. In this case, the control unit 11 determines whether or not the number of times the training steps of steps S602 and S603 have been executed has reached the set number of times. If it is determined that the number of times the training steps of steps S602 and S603 have been executed has not reached the set number of times, the control unit 11 returns the process to step S601. On the other hand, when it is determined that the number of times the training steps of steps S602 and S603 have been executed has reached the set number of times, the control unit 11 completes the first machine learning process according to this modification, and the next step. Proceed to S103. As a result, the control unit 11 is trained to generate an image corresponding to the training image 61 associated with the input label 63 for the input of the label 63 included in each training data set 60. Build 50.

ステップS103では、制御部11は、第2学習処理部113として動作し、推定器52Aに関する第2の機械学習を実行する。第2の機械学習では、制御部11は、上記のとおり、領域提案ネットワーク525を訓練する第1訓練ステップとそれ以外の部分を訓練する第2訓練ステップとを交互に実行する。第1訓練ステップでは、制御部11は、物体の有無の分類に関する誤差とバウンディングボックスの位置及びアスペクト比に関する誤差とが小さくなるように、領域提案ネットワーク525のパラメータの値を調節する。第2訓練ステップでは、制御部11は、学習済みの領域提案ネットワーク525を利用して、各誤差(LC、LBB)が小さくなるように、各パラメータの値を調節する。各ステップにおけるパラメータの値の調節は、上記実施形態と同様に処理されてよい。これにより、制御部11は、各学習データセット60について、学習画像61の入力に対して、対応するラベル63及び境界情報65と一致するように、入力された学習画像61に写る製品Rに含まれる欠陥の種別及び範囲を推定するように訓練された推定器52を構築する。 In step S103, the control unit 11 operates as the second learning processing unit 113 and executes the second machine learning regarding the estimator 52A. In the second machine learning, as described above, the control unit 11 alternately executes the first training step for training the region proposal network 525 and the second training step for training the other parts. In the first training step, the control unit 11 adjusts the values of the parameters of the region proposal network 525 so that the error regarding the classification of the presence or absence of the object and the error regarding the position and aspect ratio of the bounding box are small. In the second training step, the control unit 11 uses the learned region proposal network 525 to adjust the value of each parameter so that each error (LC, LB B ) becomes small. The adjustment of the value of the parameter in each step may be processed in the same manner as in the above embodiment. As a result, the control unit 11 includes each training data set 60 in the product R reflected in the input training image 61 so as to match the corresponding label 63 and the boundary information 65 with respect to the input of the training image 61. Build an estimator 52 trained to estimate the type and extent of defects.

次のステップS104では、制御部11は、上記実施形態と同様に、構築された学習済みの生成器50Aに関する情報、及び構築された学習済みの推定器52Aに関する情報を所定の記憶領域に保存する。以上により、本変形例では、学習装置1は、上記実施形態に係る生成器50及び推定器52と同様の機能を有する生成器50A及び推定器52Aを生成することができる。 In the next step S104, the control unit 11 stores the information about the constructed trained generator 50A and the information about the constructed trained estimator 52A in a predetermined storage area, as in the above embodiment. .. As described above, in the present modification, the learning device 1 can generate the generator 50A and the estimator 52A having the same functions as the generator 50 and the estimator 52 according to the above embodiment.

<4.6>
上記実施形態では、画像に写る製品Rの外観検査を実施する場面に本発明を適用した例を示している。しかしながら、本発明の適用範囲は、このような外観検査の例に限られる訳ではない。本発明は、与えられた画像内で何らかの対象物の写る範囲を推定するあらゆる場面に適用可能である。製品Rの写る画像から何らかの対象物の写る画像に検査システム100で取り扱う画像を変更することで、与えられた画像内で何らかの対象物の写る範囲を推定する推定システムを構成することができる。
<4.6>
In the above embodiment, an example in which the present invention is applied to a scene where an appearance inspection of a product R shown in an image is performed is shown. However, the scope of application of the present invention is not limited to such an example of visual inspection. The present invention is applicable to all situations in which the range of an object in a given image is estimated. By changing the image handled by the inspection system 100 from the image of the product R to the image of some object, it is possible to configure an estimation system that estimates the range of the object in the given image.

図19は、本変形例に係る推定システム100Bの適用場面の一例を模式的に例示する。図19に示されるとおり、本変形例に係る推定システム100Bは、ネットワークを介して接続される学習装置1B、画像生成装置2B、推定器生成装置3B、及び推定装置4Bを備えている。製品Rの写る画像から何らかの対象物の写る画像に取り扱う画像を変更する点を除き、各装置1B~4Bのハードウェア構成及びソフトウェア構成は、上記実施形態に係る各装置1~4のハードウェア構成及びソフトウェア構成と同じであってよい。また、各装置1B~4Bは、上記実施形態に係る各装置1~4と同様に動作してよい。 FIG. 19 schematically illustrates an example of an application scene of the estimation system 100B according to this modification. As shown in FIG. 19, the estimation system 100B according to the present modification includes a learning device 1B, an image generation device 2B, an estimator generation device 3B, and an estimation device 4B connected via a network. Except for changing the image handled from the image of the product R to the image of some object, the hardware configuration and software configuration of each of the devices 1B to 4B are the hardware configurations of the devices 1 to 4 according to the above embodiment. And may be the same as the software configuration. Further, the devices 1B to 4B may operate in the same manner as the devices 1 to 4 according to the above embodiment.

すなわち、本変形例に係る学習装置1Bは、対象物RBを写した学習画像61B、対象物RBの種別を示すラベル63B、及び学習画像61B内における対象物RBの範囲を示す境界情報65Bの組み合わせによりそれぞれ構成された複数の学習データセット60Bを取得する。次に、学習装置1Bは、第1の機械学習を行うことで、各学習データセット60Bに含まれるラベル63Bの入力に対して、入力されたラベル63Bに関連付けられた学習画像61Bに対応する画像を生成するように訓練された生成器50Bを構築する。また、学習装置1Bは、第2の機械学習を行うことで、各学習データセット60Bに含まれる学習画像61Bの入力に対して、入力された学習画像61Bに関連付けられたラベル63B及び境界情報65Bと一致するように、入力された学習画像61Bに写る対象物RBの種別及び範囲を推定するように訓練された推定器52Bを構築する。生成器50B及び推定器52Bの構成は、上記生成器50及び推定器52と同じであってよい。また、生成器50B及び推定器52Bの機械学習の処理は、上記生成器50及び推定器52の機械学習の処理と同様であってよい。 That is, the learning device 1B according to this modification is a combination of the learning image 61B showing the object RB, the label 63B indicating the type of the object RB, and the boundary information 65B indicating the range of the object RB in the learning image 61B. Acquire a plurality of training data sets 60B configured by the above. Next, the learning device 1B performs the first machine learning, and for the input of the label 63B included in each learning data set 60B, the image corresponding to the learning image 61B associated with the input label 63B. Build a generator 50B trained to generate. Further, by performing the second machine learning, the learning device 1B performs the label 63B and the boundary information 65B associated with the input learning image 61B with respect to the input of the learning image 61B included in each learning data set 60B. The estimator 52B trained to estimate the type and range of the object RB reflected in the input learning image 61B is constructed so as to match with. The configuration of the generator 50B and the estimator 52B may be the same as that of the generator 50 and the estimator 52. Further, the machine learning process of the generator 50B and the estimator 52B may be the same as the machine learning process of the generator 50 and the estimator 52.

これに対して、画像生成装置2Bは、学習装置1Bにより構築された生成器50Bに、対象物RBの種別を示す入力値71Bを与えることで、対象物RBを含み得る生成画像73Bを生成する。次に、画像生成装置2Bは、学習装置1Bにより構築された推定器52Bに生成された生成画像73Bを与えることで、生成画像73Bに写り得る対象物RBの種別及び範囲を推定する。続いて、画像生成装置2Bは、生成画像73Bに写る対象物RBの種別を推定した結果が入力値71Bにより示される対象物RBの種別と一致するか否かを判定する。そして、画像生成装置2Bは、対象物RBの種別を推定した結果が入力値71Bにより示される対象物RBの種別と一致すると判定した場合に、生成した生成画像73Bと対象物RBの範囲を推定した結果とを関連付けて所定の記憶領域に格納する。 On the other hand, the image generation device 2B generates a generated image 73B that can include the object RB by giving an input value 71B indicating the type of the object RB to the generator 50B constructed by the learning device 1B. .. Next, the image generation device 2B estimates the type and range of the object RB that can be captured in the generated image 73B by giving the generated image 73B to the estimator 52B constructed by the learning device 1B. Subsequently, the image generation device 2B determines whether or not the result of estimating the type of the object RB reflected in the generated image 73B matches the type of the object RB indicated by the input value 71B. Then, when the image generation device 2B determines that the result of estimating the type of the object RB matches the type of the object RB indicated by the input value 71B, the image generation device 2B estimates the range of the generated generated image 73B and the object RB. It is stored in a predetermined storage area in association with the result.

また、推定器生成装置3Bは、対象物RBを含み得るサンプル画像3221B、対象物RBの種別を示すラベル3222B、及び対象物RBの範囲を示す境界情報3223Bの組み合わせによりそれぞれ構成された複数の学習データセット322Bを取得する。次に、推定器生成装置3Bは、複数の学習データセット322Bを利用して、推定器80Bの機械学習を実施する。推定器80Bの構成は、上記推定器80と同じであってよい。また、推定器80Bの機械学習の処理は、上記推定器80の機械学習の処理と同様であってよい。これにより、推定器生成装置3Bは、サンプル画像3221Bを入力すると、対応するラベル3222B及び境界情報3223Bと一致する出力値を出力するように訓練された推定器80Bを構築することができる。そして、推定器生成装置3Bは、学習済みの推定器80Bの構成及びパラメータを示す情報を学習結果データ325Bとして生成する。なお、推定器生成装置3Bは、画像生成装置2Bにより生成されたデータセットを学習データセット322Bとして利用することができる。 Further, the estimator generator 3B has a plurality of learnings configured by a combination of a sample image 3221B including the object RB, a label 3222B indicating the type of the object RB, and boundary information 3223B indicating the range of the object RB. Acquire the data set 322B. Next, the estimator generator 3B uses the plurality of learning data sets 322B to perform machine learning of the estimator 80B. The configuration of the estimator 80B may be the same as that of the estimator 80. Further, the machine learning process of the estimator 80B may be the same as the machine learning process of the estimator 80. Thereby, the estimator generator 3B can construct the estimator 80B trained to input the sample image 3221B and output the output value corresponding to the corresponding label 3222B and the boundary information 3223B. Then, the estimator generator 3B generates information indicating the configuration and parameters of the learned estimator 80B as the learning result data 325B. The estimator generator 3B can use the data set generated by the image generator 2B as the learning data set 322B.

図20は、本変形例に係る推定装置4Bのソフトウェア構成の一例を模式的に例示する。本変形例に係る推定装置4Bは、対象物RBの写り得る対象画像422Bを取得する。本変形例では、推定装置4BにはカメラCAが接続されている。推定装置4Bは、このカメラCAにより対象物RBの存在し得る範囲を撮影することで対象画像422Bを取得する。次に、推定装置4Bの制御部は、推定部412Bとして動作し、学習結果データ325Bを参照して、学習済みの推定器80Bの設定を行う。続いて、推定装置4Bは、取得した対象画像422Bを学習済みの推定器80Bに入力し、学習済みの推定器80Bの演算処理を実行する。これにより、推定装置4Bは、対象物RBの種別及び範囲を推定した結果(すなわち、対象物RBを検出した結果)に対応する出力値を推定器80Bから取得する。そして、推定装置4Bは、推定器80Bから得られた出力値に基づいて対象物RBを検出した結果に関する情報を出力する。これにより、本変形例に係る推定システム100Bは、与えられた画像内で対象物RBの写る範囲を推定するように構成される。 FIG. 20 schematically illustrates an example of the software configuration of the estimation device 4B according to this modification. The estimation device 4B according to this modification acquires an object image 422B in which the object RB can be captured. In this modification, the camera CA is connected to the estimation device 4B. The estimation device 4B acquires the target image 422B by photographing the range in which the target object RB can exist with this camera CA. Next, the control unit of the estimation device 4B operates as the estimation unit 412B, and sets the trained estimator 80B with reference to the learning result data 325B. Subsequently, the estimation device 4B inputs the acquired target image 422B to the trained estimator 80B, and executes arithmetic processing of the trained estimator 80B. As a result, the estimation device 4B acquires an output value corresponding to the result of estimating the type and range of the object RB (that is, the result of detecting the object RB) from the estimator 80B. Then, the estimation device 4B outputs information regarding the result of detecting the object RB based on the output value obtained from the estimator 80B. As a result, the estimation system 100B according to the present modification is configured to estimate the range in which the object RB appears in the given image.

なお、対象物RBは、画像から検出する対象となり得るものであれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。対象物RBは、例えば、上記外観検査の対象となる製品、人物、人物の身体部位(例えば、顔等)等であってよい。また、道路交通の監視に本変形例を利用する場合、対象物RBは、例えば、車、歩行者、標識等であってもよい。 The type of the object RB may not be particularly limited as long as it can be a target to be detected from the image, and may be appropriately selected according to the embodiment. The object RB may be, for example, a product, a person, a body part of the person (for example, a face, etc.) to be subject to the visual inspection. Further, when the present modification is used for monitoring road traffic, the object RB may be, for example, a car, a pedestrian, a sign, or the like.

100…検査システム、
1…学習装置、
11…制御部、12…記憶部、13…通信インタフェース、
14…入力装置、15…出力装置、16…ドライブ、
111…(第1)データ取得部、112…第1学習処理部、
113…第2学習処理部、114…(第1)保存処理部、
121…学習プログラム、123…第1学習結果データ、
125…第2学習結果データ、
2…画像生成装置、
21…制御部、22…記憶部、23…通信インタフェース、
24…入力装置、25…出力装置、26…ドライブ、
211…生成部、212…推定部、213…判定部、
214…画像保存部、
221…画像生成プログラム、
50…生成器、52…推定器、54…判別器、
56…エンコーダ、
60…(第1)学習データセット、
61…学習画像、63…ラベル、65…境界情報、
71…入力値、73…生成画像、75…ラベル、
77…境界情報、
3…推定器生成装置、
31…制御部、32…記憶部、33…通信インタフェース、
34…入力装置、35…出力装置、36…ドライブ、
311…(第2)データ取得部、
312…(第3)学習処理部、
313…(第2)保存処理部、
321…推定器生成プログラム、
322…(第2)学習データセット、
3221…サンプル画像、3222…ラベル、
3223…境界情報、
325…第3学習結果データ、
4…検査装置(推定装置)、
41…制御部、42…記憶部、43…通信インタフェース、
44…入力装置、45…出力装置、46…ドライブ、
47…外部インタフェース、
411…対象データ取得部、412…良否判定部、
413…出力部、
421…検査プログラム、
80…推定器、
91・92・93・94…記憶媒体
100 ... Inspection system,
1 ... Learning device,
11 ... control unit, 12 ... storage unit, 13 ... communication interface,
14 ... input device, 15 ... output device, 16 ... drive,
111 ... (1st) data acquisition unit, 112 ... 1st learning processing unit,
113 ... 2nd learning processing unit, 114 ... (1st) storage processing unit,
121 ... learning program, 123 ... first learning result data,
125 ... Second learning result data,
2 ... Image generator,
21 ... Control unit, 22 ... Storage unit, 23 ... Communication interface,
24 ... Input device, 25 ... Output device, 26 ... Drive,
211 ... Generation unit, 212 ... Estimating unit, 213 ... Judgment unit,
214 ... Image storage unit,
221 ... Image generation program,
50 ... generator, 52 ... estimator, 54 ... discriminator,
56 ... Encoder,
60 ... (1st) training data set,
61 ... learning image, 63 ... label, 65 ... boundary information,
71 ... Input value, 73 ... Generated image, 75 ... Label,
77 ... Boundary information,
3 ... Estimator generator,
31 ... control unit, 32 ... storage unit, 33 ... communication interface,
34 ... Input device, 35 ... Output device, 36 ... Drive,
311 ... (2nd) Data acquisition unit,
312 ... (3rd) Learning Processing Department,
313 ... (2nd) Preservation processing unit,
321 ... Estimator generation program,
322 ... (2nd) training data set,
3221 ... sample image, 3222 ... label,
3223 ... Boundary information,
325 ... Third learning result data,
4 ... Inspection device (estimation device),
41 ... Control unit, 42 ... Storage unit, 43 ... Communication interface,
44 ... Input device, 45 ... Output device, 46 ... Drive,
47 ... External interface,
411 ... Target data acquisition unit, 412 ... Good / bad judgment unit,
413 ... Output section,
421 ... Inspection program,
80 ... Estimator,
91/92/93/94 ... Storage medium

Claims (6)

外観検査の対象となる製品を写した学習画像、前記製品に含まれる欠陥の種別を示すラベル、及び前記欠陥の範囲を示す境界情報の組み合わせによりそれぞれ構成された複数の学習データセットを取得するデータ取得部と、
判別器を用いた第1の機械学習であって、前記各件の学習データセットに含まれる前記学習画像の画素の情報および前記ラベルを用いた第1の機械学習を行うことで、前記各件の学習データセットに含まれる前記ラベルの入力に対して、入力された前記ラベルに関連付けられた前記学習画像に対応する画像を生成するように訓練された生成器を構築する第1学習処理部と、
第2の機械学習を行うことで、前記各件の学習データセットに含まれる前記学習画像の入力に対して、入力された前記学習画像に関連付けられた前記ラベル及び前記境界情報と一致するように、入力された前記学習画像に写る前記製品に含まれる前記欠陥の種別及び範囲を推定するように訓練された推定器を構築する第2学習処理部と、
前記第1の機械学習により構築された前記生成器に、前記欠陥の種別を示す入力値を与えることで、前記欠陥を含む前記製品を写した生成画像を生成する生成部と、
前記第2の機械学習により構築された前記推定器に生成された前記生成画像を与えることで、前記生成画像に写る前記製品に含まれる前記欠陥の種別及び範囲を推定する推定部と、
前記生成画像に写る前記製品に含まれる前記欠陥の種別を推定した結果が前記入力値により示される前記欠陥の種別と一致するか否かを判定する判定部と、
前記欠陥の種別を推定した結果が前記入力値により示される前記欠陥の種別と一致すると前記判定部が判定した場合に、生成した前記生成画像と前記欠陥の範囲を推定した結果とを関連付けて所定の記憶領域に格納する画像保存部と、
を備え、
前記生成器の出力は、前記判別器の入力に接続され、
前記第1の機械学習を行うことは、
前記判別器に入力された入力画像が、前記生成器により生成された前記画像であるか前記複数の学習データセットから得られた前記学習画像であるかを判別するように、前記判別器を訓練する第1訓練ステップと、
前記生成器により生成される前記画像が、前記判別器による前記判別を誤らせるようなものとなるように、前記生成器を訓練する第2訓練ステップと、
を交互に行うことを含む、
検査システム
Data for acquiring a plurality of training data sets each composed of a combination of a training image showing a product to be visually inspected, a label indicating the type of defect contained in the product, and boundary information indicating the range of the defect. Acquisition department and
It is the first machine learning using a discriminator, and by performing the first machine learning using the information of the pixel of the training image included in the training data set of each case and the label , each of the above cases. With a first learning processing unit that constructs a generator trained to generate an image corresponding to the training image associated with the input label in response to the input of the label included in the training data set of. ,
By performing the second machine learning, the input of the training image included in each of the training data sets is made to match the label and the boundary information associated with the input training image. A second learning processing unit that constructs an estimator trained to estimate the type and range of the defect contained in the product reflected in the input learning image.
A generator that generates a generated image of the product including the defect by giving an input value indicating the type of the defect to the generator constructed by the first machine learning.
By giving the generated image generated to the estimator constructed by the second machine learning, an estimation unit for estimating the type and range of the defect contained in the product reflected in the generated image, and an estimation unit.
A determination unit for determining whether or not the result of estimating the type of the defect contained in the product shown in the generated image matches the type of the defect indicated by the input value.
When the determination unit determines that the result of estimating the type of the defect matches the type of the defect indicated by the input value, the generated image is associated with the result of estimating the range of the defect. Image storage unit stored in the storage area of
Equipped with
The output of the generator is connected to the input of the discriminator.
Performing the first machine learning is
The discriminator is trained to discriminate whether the input image input to the discriminator is the image generated by the generator or the training image obtained from the plurality of training data sets. The first training step to do and
A second training step in which the generator is trained so that the image generated by the generator is such that the discrimination by the discriminator is erroneous.
Including alternating
Inspection system .
前記生成器の入力は、エンコーダの出力に接続され、
前記生成器の出力は、さらに前記推定器の入力に接続され、
前記第1の機械学習を行うことは、
記第1訓練ステップと、
記第2訓練ステップと、
前記生成器により生成される前記画像が、前記推定器により前記画像に写る製品に含まれる欠陥の種別を推定した結果が前記ラベルと一致するようなものとなるように、前記生成器を訓練する第3訓練ステップと、
前記ラベル及び潜在変数を前記生成器に入力することで前記生成器により生成された前記画像が、前記学習画像を復元したものとなるように、前記エンコーダ及び前記生成器を訓練する第4訓練ステップであって、前記潜在変数は、前記ラベル及び前記学習画像を前記エンコーダに入力することで前記エンコーダから得られる出力に基づいて導出される、第4訓練ステップと、
前記エンコーダから得られる出力に基づいて導出される前記潜在変数の分布が所定の事前分布に従うように前記エンコーダを訓練する第5訓練ステップと、
を含む、
請求項1に記載の検査システム
The input of the generator is connected to the output of the encoder.
The output of the generator is further connected to the input of the estimator.
Performing the first machine learning is
The first training step and
The second training step and
The generator is trained so that the image generated by the generator is such that the result of estimating the type of defect contained in the product shown in the image by the estimator matches the label. The third training step and
A fourth training step of training the encoder and the generator so that the image generated by the generator by inputting the label and the latent variable into the generator is a restored image of the learning image. The fourth training step, wherein the latent variable is derived based on the output obtained from the encoder by inputting the label and the learning image into the encoder.
A fifth training step in which the encoder is trained so that the distribution of the latent variables derived from the output obtained from the encoder follows a predetermined prior distribution.
including,
The inspection system according to claim 1.
前記欠陥の範囲は、バウンディングボックスにより表される、
請求項1または2に記載の検査システム
The extent of the defect is represented by the bounding box.
The inspection system according to claim 1 or 2 .
コンピュータが、
外観検査の対象となる製品を写した学習画像、前記製品に含まれる欠陥の種別を示すラベル、及び前記欠陥の範囲を示す境界情報の組み合わせによりそれぞれ構成された複数の学習データセットを取得するステップと、
判別器を用いた第1の機械学習であって、前記各件の学習データセットに含まれる前記学習画像の画素の情報および前記ラベルを用いた第1の機械学習を行うことで、前記各件の学習データセットに含まれる前記ラベルの入力に対して、入力された前記ラベルに関連付けられた前記学習画像に対応する画像を生成するように訓練された生成器を構築するステップと、
第2の機械学習を行うことで、前記各件の学習データセットに含まれる前記学習画像の入力に対して、入力された前記学習画像に関連付けられた前記ラベル及び前記境界情報と一致するように、入力された前記学習画像に写る前記製品に含まれる前記欠陥の種別及び範囲を推定するように訓練された推定器を構築するステップと、
前記第1の機械学習により構築された前記生成器に、前記欠陥の種別を示す入力値を与えることで、前記欠陥を含む前記製品を写した生成画像を生成する生成ステップと、
前記第2の機械学習により構築された前記推定器に生成された前記生成画像を与えることで、前記生成画像に写る前記製品に含まれる前記欠陥の種別及び範囲を推定する推定ステップと、
前記生成画像に写る前記製品に含まれる前記欠陥の種別を推定した結果が前記入力値により示される前記欠陥の種別と一致するか否かを判定する判定ステップと、
前記欠陥の種別を推定した結果が前記入力値により示される前記欠陥の種別と一致すると前記判定ステップにて判定された場合に、生成した前記生成画像と前記欠陥の範囲を推定した結果とを関連付けて所定の記憶領域に格納する画像保存ステップと、
を実行
前記生成器の出力は、前記判別器の入力に接続され、
前記第1の機械学習を行うことは、
前記判別器に入力された入力画像が、前記生成器により生成された前記画像であるか前記複数の学習データセットから得られた前記学習画像であるかを判別するように、前記判別器を訓練する第1訓練ステップと、
前記生成器により生成される前記画像が、前記判別器による前記判別を誤らせるようなものとなるように、前記生成器を訓練する第2訓練ステップと、
を交互に行うことを含む、
検査方法。
The computer
A step of acquiring a plurality of training data sets each composed of a combination of a training image showing a product to be visually inspected, a label indicating the type of defect contained in the product, and boundary information indicating the range of the defect. When,
It is the first machine learning using a discriminator, and by performing the first machine learning using the information of the pixel of the training image included in the training data set of each case and the label , each of the above cases. For the input of the label contained in the training data set of, a step of constructing a generator trained to generate an image corresponding to the training image associated with the input label.
By performing the second machine learning, the input of the training image included in each of the training data sets is made to match the label and the boundary information associated with the input training image. , Steps to build an estimator trained to estimate the type and extent of the defect contained in the product in the input learning image.
A generation step of generating a generated image showing the product including the defect by giving an input value indicating the type of the defect to the generator constructed by the first machine learning.
By giving the generated image generated to the estimator constructed by the second machine learning, an estimation step for estimating the type and range of the defect contained in the product reflected in the generated image, and an estimation step.
A determination step for determining whether or not the result of estimating the type of the defect contained in the product shown in the generated image matches the type of the defect indicated by the input value.
When it is determined in the determination step that the result of estimating the type of the defect matches the type of the defect indicated by the input value, the generated image is associated with the result of estimating the range of the defect. Image storage step to store in a predetermined storage area,
And run
The output of the generator is connected to the input of the discriminator.
Performing the first machine learning is
The discriminator is trained to discriminate whether the input image input to the discriminator is the image generated by the generator or the training image obtained from the plurality of training data sets. The first training step to do and
A second training step in which the generator is trained so that the image generated by the generator is such that the discrimination by the discriminator is erroneous.
Including alternating
Inspection method.
コンピュータに、
外観検査の対象となる製品を写した学習画像、前記製品に含まれる欠陥の種別を示すラベル、及び前記欠陥の範囲を示す境界情報の組み合わせによりそれぞれ構成された複数の学習データセットを取得するステップと、
判別器を用いた第1の機械学習であって、前記各件の学習データセットに含まれる前記学習画像の画素の情報および前記ラベルを用いた第1の機械学習を行うことで、前記各件の学習データセットに含まれる前記ラベルの入力に対して、入力された前記ラベルに関連付けられた前記学習画像に対応する画像を生成するように訓練された生成器を構築するステップと、
第2の機械学習を行うことで、前記各件の学習データセットに含まれる前記学習画像の入力に対して、入力された前記学習画像に関連付けられた前記ラベル及び前記境界情報と一致するように、入力された前記学習画像に写る前記製品に含まれる前記欠陥の種別及び範囲を推定するように訓練された推定器を構築するステップと、
前記第1の機械学習により構築された前記生成器に、前記欠陥の種別を示す入力値を与えることで、前記欠陥を含む前記製品を写した生成画像を生成する生成ステップと、
前記第2の機械学習により構築された前記推定器に生成された前記生成画像を与えることで、前記生成画像に写る前記製品に含まれる前記欠陥の種別及び範囲を推定する推定ステップと、
前記生成画像に写る前記製品に含まれる前記欠陥の種別を推定した結果が前記入力値により示される前記欠陥の種別と一致するか否かを判定する判定ステップと、
前記欠陥の種別を推定した結果が前記入力値により示される前記欠陥の種別と一致すると前記判定ステップにて判定された場合に、生成した前記生成画像と前記欠陥の範囲を推定した結果とを関連付けて所定の記憶領域に格納する画像保存ステップと、
を実行させ、
前記生成器の出力は、前記判別器の入力に接続され、
前記第1の機械学習を行うことは、
前記判別器に入力された入力画像が、前記生成器により生成された前記画像であるか前記複数の学習データセットから得られた前記学習画像であるかを判別するように、前記判別器を訓練する第1訓練ステップと、
前記生成器により生成される前記画像が、前記判別器による前記判別を誤らせるようなものとなるように、前記生成器を訓練する第2訓練ステップと、
を交互に行うことを含む、
検査プログラム。
On the computer
A step of acquiring a plurality of training data sets each composed of a combination of a training image showing a product to be visually inspected, a label indicating the type of defect contained in the product, and boundary information indicating the range of the defect. When,
It is the first machine learning using a discriminator, and by performing the first machine learning using the information of the pixel of the training image included in the training data set of each case and the label , each of the above cases. For the input of the label contained in the training data set of, a step of constructing a generator trained to generate an image corresponding to the training image associated with the input label.
By performing the second machine learning, the input of the training image included in each of the training data sets is made to match the label and the boundary information associated with the input training image. , Steps to build an estimator trained to estimate the type and extent of the defect contained in the product in the input learning image.
A generation step of generating a generated image showing the product including the defect by giving an input value indicating the type of the defect to the generator constructed by the first machine learning.
By giving the generated image generated to the estimator constructed by the second machine learning, an estimation step for estimating the type and range of the defect contained in the product reflected in the generated image, and an estimation step.
A determination step for determining whether or not the result of estimating the type of the defect contained in the product shown in the generated image matches the type of the defect indicated by the input value.
When it is determined in the determination step that the result of estimating the type of the defect matches the type of the defect indicated by the input value, the generated image is associated with the result of estimating the range of the defect. Image storage step to store in a predetermined storage area,
To execute ,
The output of the generator is connected to the input of the discriminator.
Performing the first machine learning is
The discriminator is trained to discriminate whether the input image input to the discriminator is the image generated by the generator or the training image obtained from the plurality of training data sets. The first training step to do and
A second training step in which the generator is trained so that the image generated by the generator is such that the discrimination by the discriminator is erroneous.
Including alternating
Inspection program.
対象物を写した学習画像、前記対象物の種別を示すラベル、及び前記学習画像内における前記対象物の範囲を示す境界情報の組み合わせによりそれぞれ構成された複数の学習データセットを取得するデータ取得部と、
判別器を用いた第1の機械学習であって、前記各件の学習データセットに含まれる前記学習画像の画素の情報および前記ラベルを用いた第1の機械学習を行うことで、前記各件の学習データセットに含まれる前記ラベルの入力に対して、入力された前記ラベルに関連付けられた前記学習画像に対応する画像を生成するように訓練された生成器を構築する第1学習処理部と、
第2の機械学習を行うことで、前記各件の学習データセットに含まれる前記学習画像の入力に対して、入力された前記学習画像に関連付けられた前記ラベル及び前記境界情報と一致するように、入力された前記学習画像に写る前記対象物の種別及び範囲を推定するように訓練された推定器を構築する第2学習処理部と、
前記第1の機械学習により構築された前記生成器に、前記欠陥の種別を示す入力値を与えることで、前記欠陥を含む前記製品を写した生成画像を生成する生成部と、
前記第2の機械学習により構築された前記推定器に生成された前記生成画像を与えることで、前記生成画像に写る前記製品に含まれる前記欠陥の種別及び範囲を推定する推定部と、
前記生成画像に写る前記製品に含まれる前記欠陥の種別を推定した結果が前記入力値により示される前記欠陥の種別と一致するか否かを判定する判定部と、
前記欠陥の種別を推定した結果が前記入力値により示される前記欠陥の種別と一致すると前記判定部が判定した場合に、生成した前記生成画像と前記欠陥の範囲を推定した結果とを関連付けて所定の記憶領域に格納する画像保存部と、
を備え、
前記生成器の出力は、前記判別器の入力に接続され、
前記第1の機械学習を行うことは、
前記判別器に入力された入力画像が、前記生成器により生成された前記画像であるか前記複数の学習データセットから得られた前記学習画像であるかを判別するように、前記判別器を訓練する第1訓練ステップと、
前記生成器により生成される前記画像が、前記判別器による前記判別を誤らせるようなものとなるように、前記生成器を訓練する第2訓練ステップと、
を交互に行うことを含む、
検査システム
A data acquisition unit that acquires a plurality of learning data sets each composed of a combination of a learning image showing an object, a label indicating the type of the object, and boundary information indicating the range of the object in the learning image. When,
It is the first machine learning using a discriminator, and by performing the first machine learning using the information of the pixel of the training image included in the training data set of each case and the label , each of the above cases. With a first learning processing unit that constructs a generator trained to generate an image corresponding to the training image associated with the input label in response to the input of the label included in the training data set of. ,
By performing the second machine learning, the input of the training image included in each of the training data sets is made to match the label and the boundary information associated with the input training image. , A second learning processing unit that constructs an estimator trained to estimate the type and range of the object reflected in the input learning image.
A generator that generates a generated image of the product including the defect by giving an input value indicating the type of the defect to the generator constructed by the first machine learning.
By giving the generated image generated to the estimator constructed by the second machine learning, an estimation unit for estimating the type and range of the defect contained in the product reflected in the generated image, and an estimation unit.
A determination unit for determining whether or not the result of estimating the type of the defect contained in the product shown in the generated image matches the type of the defect indicated by the input value.
When the determination unit determines that the result of estimating the type of the defect matches the type of the defect indicated by the input value, the generated image is associated with the result of estimating the range of the defect. Image storage unit stored in the storage area of
Equipped with
The output of the generator is connected to the input of the discriminator.
Performing the first machine learning is
The discriminator is trained to discriminate whether the input image input to the discriminator is the image generated by the generator or the training image obtained from the plurality of training data sets. The first training step to do and
A second training step in which the generator is trained so that the image generated by the generator is such that the discrimination by the discriminator is erroneous.
Including alternating
Inspection system .
JP2018190514A 2018-10-05 2018-10-05 Learning device, image generator, learning method, and learning program Active JP7059883B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018190514A JP7059883B2 (en) 2018-10-05 2018-10-05 Learning device, image generator, learning method, and learning program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018190514A JP7059883B2 (en) 2018-10-05 2018-10-05 Learning device, image generator, learning method, and learning program

Publications (2)

Publication Number Publication Date
JP2020060879A JP2020060879A (en) 2020-04-16
JP7059883B2 true JP7059883B2 (en) 2022-04-26

Family

ID=70219891

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018190514A Active JP7059883B2 (en) 2018-10-05 2018-10-05 Learning device, image generator, learning method, and learning program

Country Status (1)

Country Link
JP (1) JP7059883B2 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021210413A1 (en) * 2020-04-17 2021-10-21 株式会社Roxy Discrimination target classification method, program employed in same, and discriminating device
JP7419178B2 (en) * 2020-07-01 2024-01-22 株式会社東芝 Learning devices, methods and programs
JP7396497B2 (en) 2020-07-27 2023-12-12 日本電気株式会社 Learning system, object detection system, learning method, and computer program
CN112489218B (en) * 2020-11-30 2024-03-19 江苏科技大学 Single-view three-dimensional reconstruction system and method based on semi-supervised learning
JP7393321B2 (en) * 2020-12-14 2023-12-06 株式会社神戸製鋼所 Machine learning device and method, and film adhesion evaluation device and method
CN115447853A (en) * 2022-09-28 2022-12-09 厦门烟草工业有限责任公司 Defective cigarette packet recognition device and recognition method, rejection device and cigarette processing system

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006337152A (en) 2005-06-01 2006-12-14 Sharp Corp Method and apparatus for forming teaching image, method and apparatus for forming image processing algorithm, image inspecting method, image inspecting device, program and recording medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006337152A (en) 2005-06-01 2006-12-14 Sharp Corp Method and apparatus for forming teaching image, method and apparatus for forming image processing algorithm, image inspecting method, image inspecting device, program and recording medium

Also Published As

Publication number Publication date
JP2020060879A (en) 2020-04-16

Similar Documents

Publication Publication Date Title
JP7059883B2 (en) Learning device, image generator, learning method, and learning program
US11715190B2 (en) Inspection system, image discrimination system, discrimination system, discriminator generation system, and learning data generation device
US9235902B2 (en) Image-based crack quantification
KR20190063839A (en) Method and System for Machine Vision based Quality Inspection using Deep Learning in Manufacturing Process
JP6844563B2 (en) Inspection equipment, image identification equipment, identification equipment, inspection method, and inspection program
CN111222395A (en) Target detection method and device and electronic equipment
Liu et al. A night pavement crack detection method based on image‐to‐image translation
CN111758117B (en) Inspection system, recognition system, and learning data generation device
Garfo et al. Defect detection on 3d print products and in concrete structures using image processing and convolution neural network
JP7435303B2 (en) Inspection device, unit selection device, inspection method, and inspection program
CN115830004A (en) Surface defect detection method, device, computer equipment and storage medium
JP7164028B2 (en) LEARNING SYSTEM, DATA GENERATION DEVICE, DATA GENERATION METHOD, AND DATA GENERATION PROGRAM
JP7056259B2 (en) Inspection system, identification system, and classifier evaluation device
CN113706496B (en) Aircraft structure crack detection method based on deep learning model
JP7059889B2 (en) Learning device, image generator, learning method, and learning program
US20220405586A1 (en) Model generation apparatus, estimation apparatus, model generation method, and computer-readable storage medium storing a model generation program
US20230260259A1 (en) Method and device for training a neural network
JP7070308B2 (en) Estimator generator, inspection device, estimator generator method, and estimator generator
JP7321452B2 (en) Program, information processing device, information processing method, and method for generating learned model
KR102538012B1 (en) Method and apparatus for updating 3D model of object in virtual space
US20230005120A1 (en) Computer and Visual Inspection Method
CN117474915B (en) Abnormality detection method, electronic equipment and storage medium
CN114529792A (en) Target detection method and training method of image detection model
JP2022023320A (en) Appearance inspection device, appearance inspection method and program used in the same
CN114626452A (en) Model training method, model detection method, robot, and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20201214

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20211125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20211130

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220124

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220328

R150 Certificate of patent or registration of utility model

Ref document number: 7059883

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150