[go: up one dir, main page]

JP7070308B2 - Estimator generator, inspection device, estimator generator method, and estimator generator - Google Patents

Estimator generator, inspection device, estimator generator method, and estimator generator Download PDF

Info

Publication number
JP7070308B2
JP7070308B2 JP2018190513A JP2018190513A JP7070308B2 JP 7070308 B2 JP7070308 B2 JP 7070308B2 JP 2018190513 A JP2018190513 A JP 2018190513A JP 2018190513 A JP2018190513 A JP 2018190513A JP 7070308 B2 JP7070308 B2 JP 7070308B2
Authority
JP
Japan
Prior art keywords
features
estimator
image
learning
product
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
JP2018190513A
Other languages
Japanese (ja)
Other versions
JP2020060398A (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 JP2018190513A priority Critical patent/JP7070308B2/en
Publication of JP2020060398A publication Critical patent/JP2020060398A/en
Application granted granted Critical
Publication of JP7070308B2 publication Critical patent/JP7070308B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Description

本発明は、推定器生成装置、検査装置、推定器生成方法、及び推定器生成プログラムに関する。 The present invention relates to an estimator generation device, an inspection device, an estimator generation method, and an estimator generation 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 learned first 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 特開2016-110290号公報Japanese Unexamined Patent Publication No. 2016-11290

本件発明者らは、特許文献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 an estimator composed of a learning model such as a neural network as in Patent Document 1. I found that it could happen. That is, the larger the size of the learning image, the more complicated the configuration of the estimator for determining the quality of the product. Therefore, the calculation cost of the estimator becomes large, a memory shortage occurs during the calculation process of machine learning, the calculation process takes a long time, and the calculation process is not completed within a predetermined time. There may be a problem that problems such as the above occur.

そこで、本件発明者らは、学習画像から特徴を抽出し、抽出した特徴に基づいて製品の良否を判定する推定器を構築することを検討した。例えば、特許文献2には、物体を撮像して得られた画像データの特徴量を算出し、算出した特徴量に基づいて、物体の外観上の欠陥を検出する検査システムが提案されている。学習画像から抽出される特徴は、抽出処理により情報を部分的に削減したものになるため、その情報量は、通常、学習画像そのものよりも小さい(すなわち、低次元である)。そのため、この特徴を利用する推定器の構成は、学習画像そのものを利用する推定器よりも簡単にすることができ、これによって、推定器の計算コストを低減することができる。したがって、この方法によれば、推定器の学習時間を短くしたり、推定器の機械学習に利用するハードウェア資源を節約したりすることができる。 Therefore, the inventors of the present invention examined to construct an estimator that extracts features from the learning image and judges the quality of the product based on the extracted features. For example, Patent Document 2 proposes an inspection system that calculates a feature amount of image data obtained by imaging an object and detects defects in the appearance of the object based on the calculated feature amount. Since the features extracted from the training image are partially reduced in information by the extraction process, the amount of information is usually smaller (that is, lower dimensional) than the training image itself. Therefore, the configuration of the estimator using this feature can be simpler than that of the estimator using the learning image itself, and thereby the calculation cost of the estimator can be reduced. Therefore, according to this method, it is possible to shorten the learning time of the estimator and save the hardware resources used for the machine learning of the estimator.

しかしながら、本件発明者らは、この方法には、次のような問題点があることを見出した。すなわち、推定器による判定の精度は、学習データの件数に依存する。そのため、学習画像の件数が少ないと、得られる特徴の件数も少なくなってしまい、学習済みの学習モデル(推定器)による欠陥推定の精度が不十分になってしまう。特に、学習画像から抽出される特徴は、学習画像に含まれる情報を抽出処理により部分的に削減したものである。つまり、推定器がこの特徴から得られる情報量は、学習画像そのものから得られる情報量よりも少ない。そのため、この方法により構築された推定器の欠陥推定の精度は、学習画像を利用して構築された推定器よりも悪くなる傾向にある。よって、学習データの件数が少ないことにより、学習済みの学習モデル(推定器)による欠陥推定の精度が極めて悪くなってしまう可能性がある。 However, the present inventors have found that this method has the following problems. That is, the accuracy of the determination by the estimator depends on the number of training data. Therefore, if the number of training images is small, the number of features that can be obtained is also small, and the accuracy of defect estimation by the trained learning model (estimator) becomes insufficient. In particular, the feature extracted from the training image is that the information contained in the training image is partially reduced by the extraction process. That is, the amount of information that the estimator can obtain from this feature is less than the amount of information that the estimator can obtain from the training image itself. Therefore, the accuracy of defect estimation of the estimator constructed by this method tends to be worse than that of the estimator constructed by using the learning image. Therefore, when the number of training data is small, the accuracy of defect estimation by the trained learning model (estimator) may become extremely poor.

なお、このような問題点は、製品の良否を判定するための推定器を機械学習により構築する場面だけではなく、画像に写る対象物の何らかの属性を推定するための推定器を構築するあらゆる場面で生じ得る。例えば、対象者の顔の器官を検出するための推定器を構築する場合に、学習データとして利用される顔画像(学習画像)の件数が少ないと、顔画像から得られる特徴の件数も少なくなってしまい、推定器による器官の推定の精度が不十分になってしまう可能性がある。 It should be noted that such a problem is not only in the case of constructing an estimator for judging the quality of a product by machine learning, but also in any situation in which an estimator for estimating some attribute of an object reflected in an image is constructed. Can occur in. For example, when constructing an estimator for detecting the facial organs of a subject, if the number of facial images (learning images) used as learning data is small, the number of features obtained from the facial images is also small. Therefore, the accuracy of organ estimation by the estimator may be insufficient.

本発明は、一側面では、このような実情を鑑みてなされたものであり、その目的は、推定器の計算コストを低減しつつ、学習画像の件数が比較的に少なくても、画像に写る対象物の属性を高精度に推定可能な推定器を構築する技術を提供することである。 The present invention has been made in view of such a situation on one aspect, and the purpose of the present invention is to reduce the calculation cost of the estimator and to capture the image even if the number of learning images is relatively small. It is to provide a technique for constructing an estimator capable of estimating the attributes of an object with high accuracy.

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

すなわち、本発明の一側面に係る推定器生成装置は、外観検査の対象となる製品を写した学習画像、及び前記製品に含まれる欠陥の種別を示すラベルの組み合わせによりそれぞれ構成された複数の学習データセットを取得するデータ取得部と、前記各学習データセットに含まれる前記学習画像から1又は複数の第1特徴を抽出する抽出部と、抽出された前記1又は複数の第1特徴に拡大処理を適用することで、前記1又は複数の第1特徴とは異なる1又は複数の第2特徴を生成する拡大処理部と、機械学習を行うことで、前記1又は複数の第1特徴及び前記1又は複数の第2特徴の少なくともいずれかから、対応するラベルと一致するように、前記学習画像に写る前記製品に含まれる前記欠陥の種別を推定するように訓練された推定器を構築する学習処理部と、を備える。 That is, the estimator generator according to one aspect of the present invention is composed of a combination of a learning image showing a product to be visually inspected and a label indicating the type of defect contained in the product. A data acquisition unit for acquiring a data set, an extraction unit for extracting one or a plurality of first features from the training image included in each learning data set, and an expansion process for the extracted one or a plurality of first features. By applying the above-mentioned one or a plurality of first features and the above-mentioned one or a plurality of first features and the above-mentioned 1 by performing machine learning with an enlargement processing unit that generates one or a plurality of second features different from the above-mentioned one or a plurality of first features. Or a learning process that builds an estimator trained to estimate the type of defect contained in the product in the training image so as to match the corresponding label from at least one of the plurality of second features. It is equipped with a department.

当該構成では、推定器は、学習画像から直接的に製品の良否を推定するように訓練されるのではなく、学習画像より抽出された特徴から製品の良否を推定するように訓練される。一般的に、抽出される特徴の次元は学習画像そのものよりも低いため、抽出される特徴の有する情報量は、学習画像よりも少なくなる。そのため、学習画像から直接的に製品の良否を推定するように訓練されるケースと比較して、抽出された特徴から製品の良否を推定するように訓練されるケースでは、入力データの情報量を抑えることができるため、推定器の構成を単純化することができる。加えて、当該構成では、学習画像より抽出された第1特徴に拡大処理を適用することで、第1特徴とは異なる第2特徴を生成する。これにより、特徴のバリエーションを豊富にすることができる。すなわち、機械学習に利用する訓練データの件数を増やすことができる。そのため、学習画像の件数が少なくても、欠陥推定の一定の精度を担保するのに十分な件数の学習データを用意することができる。したがって、当該構成によれば、推定器の計算コストを低減しつつ、学習画像の件数が比較的に少なくても、画像に写る対象物の属性を高精度に推定可能な推定器を構築することができる。 In this configuration, the estimator is not trained to estimate the quality of the product directly from the training image, but to estimate the quality of the product from the features extracted from the training image. In general, the dimension of the extracted feature is lower than that of the training image itself, so that the amount of information contained in the extracted feature is smaller than that of the training image. Therefore, in the case of training to estimate the quality of the product from the extracted features, the amount of information of the input data is compared with the case of training to estimate the quality of the product directly from the training image. Since it can be suppressed, the configuration of the estimator can be simplified. In addition, in this configuration, by applying the enlargement processing to the first feature extracted from the learning image, a second feature different from the first feature is generated. This makes it possible to increase the variety of features. That is, the number of training data used for machine learning can be increased. Therefore, even if the number of training images is small, it is possible to prepare a sufficient number of training data to ensure a certain accuracy of defect estimation. Therefore, according to the configuration, it is possible to construct an estimator capable of estimating the attributes of the object reflected in the image with high accuracy even if the number of learning images is relatively small, while reducing the calculation cost of the estimator. Can be done.

なお、特徴は、画像から導出可能な何らかの情報であれば、その種類及びデータ形式は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。特徴の抽出には、例えば、一般的な画像処理(例えば、エッジ抽出)、SIFT(Scale-Invariant Feature Transform)、学習済みの学習モデル(例えば、畳み込みニューラルネットワーク)等が用いられてよい。例えば、畳み込みニューラルネットワークを利用して、第1特徴として特徴マップを学習画像から導出してもよい。拡大処理(data augmentation)は、1又は複数の特徴から異なる特徴を導出する処理である。拡大処理には、例えば、複数の特徴を合成する処理、幾何的な変換等により特徴を変換する処理等が用いられてよい。特徴が画像として導出される場合、特徴を変換する処理には、所定のノイズ(ホワイトノイズ、ランダムノイズ等)を特徴画像に合成する処理、特徴画像に含まれる画素を変換する処理等が用いられてよい。画素の変換には、色変換、濃度変換等が含まれてよく、これらの変換には、所定の変換関数が用いられてよい。 The type and data format of the feature may not be particularly limited as long as it is some information that can be derived from the image, and may be appropriately selected according to the embodiment. For feature extraction, for example, general image processing (for example, edge extraction), SIFT (Scale-Invariant Feature Transform), trained learning model (for example, convolutional neural network) and the like may be used. For example, a feature map may be derived from the training image as the first feature by using a convolutional neural network. The augmentation process (data augmentation) is a process of deriving different features from one or more features. For the enlargement process, for example, a process of synthesizing a plurality of features, a process of converting features by geometric conversion, or the like may be used. When a feature is derived as an image, the process of converting the feature includes a process of synthesizing predetermined noise (white noise, random noise, etc.) into the feature image, a process of converting pixels included in the feature image, and the like. It's okay. Pixel conversion may include color conversion, density conversion, and the like, and a predetermined conversion function may be used for these conversions.

また、製品は、外観検査の対象となり得るものであれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。製品は、例えば、電子機器、電子部品、自動車部品、薬品、食品等の製造ラインで搬送される物であってよい。電子機器は、例えば、携帯電話等である。電子部品は、例えば、基盤、チップコンデンサ、液晶、リレーの巻線等である。自動車部品は、例えば、コンロッド、シャフト、エンジンブロック、パワーウィンドウスイッチ、パネル等である。薬品は、例えば、包装済みの錠剤、未包装の錠剤等であってよい。また、欠陥は、製品の良否に関係し得るものであれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。欠陥は、例えば、傷、汚れ、クラック、打痕、バリ、色ムラ、異物混入等である。 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特徴はそれぞれ、前記学習画像よりもサイズの小さい特徴画像として抽出されてよい。当該構成によれば、拡大処理に適した形式で特徴を得ることができるため、機械学習に利用する訓練データ(特徴)の件数を増やすことができる。これにより、画像に写る対象物を高精度に推定可能な推定器を構築することができる。なお、特徴画像は、例えば、畳み込みニューラルネットワークにより導出される特徴マップである。 In the estimator generator according to the one aspect, the one or a plurality of first features may be extracted as feature images smaller in size than the learning image, respectively. According to this configuration, features can be obtained in a format suitable for enlargement processing, so that the number of training data (features) used for machine learning can be increased. This makes it possible to construct an estimator capable of estimating an object reflected in an image with high accuracy. The feature image is, for example, a feature map derived by a convolutional neural network.

上記一側面に係る推定器生成装置において、前記複数の第1特徴それぞれには重みが設定されていてよく、前記拡大処理を適用することは、設定された前記重みを前記複数の第1特徴それぞれにかけること、及び重み付けされた前記複数の第1特徴を合成すること、を含んでもよい。当該構成によれば、機械学習に利用する特徴のバリエーションを適切に豊富化することができ、これによって、画像に写る対象物を高精度に推定可能な推定器を構築することができる。 In the estimator generation device according to the one aspect, weights may be set for each of the plurality of first features, and applying the enlargement processing means that the set weights are applied to each of the plurality of first features. It may include subjecting to and synthesizing the plurality of weighted first features. According to this configuration, it is possible to appropriately enrich the variation of the features used for machine learning, and thereby it is possible to construct an estimator capable of estimating the object to be reflected in the image with high accuracy.

上記一側面に係る推定器生成装置において、前記拡大処理を適用することは、前記1又は複数の第1特徴に対して幾何学的な変換を適用すること、を含んでもよい。当該構成によれば、機械学習に利用する特徴のバリエーションを適切に豊富化することができ、これによって、画像に写る対象物を高精度に推定可能な推定器を構築することができる。 In the estimator generator according to one aspect, applying the enlargement process may include applying a geometric transformation to the one or more first features. According to this configuration, it is possible to appropriately enrich the variation of the features used for machine learning, and thereby it is possible to construct an estimator capable of estimating the object to be reflected in the image with high accuracy.

上記一側面に係る推定器生成装置において、前記幾何学的な変換は、平行移動、回転移動、反転、又はこれら組み合わせであってよい。当該構成によれば、機械学習に利用する特徴のバリエーションを適切に豊富化することができ、これによって、画像に写る対象物を高精度に推定可能な推定器を構築することができる。 In the estimator generator according to one aspect, the geometric transformation may be translation, rotational movement, inversion, or a combination thereof. According to this configuration, it is possible to appropriately enrich the variation of the features used for machine learning, and thereby it is possible to construct an estimator capable of estimating the object to be reflected in the image with high accuracy.

また、本発明の一側面に係る検査装置は、外観検査の対象となる製品を写した対象画像を取得する画像取得部と、取得した前記対象画像から特徴を抽出する抽出部と、上記いずれかの形態に係る推定器生成装置により構築された前記推定器を利用し、抽出した前記特徴に基づいて、前記対象画像に写る前記製品に欠陥が含まれるか否かを検査する検査部と、前記検査の結果に関する情報を出力する出力部と、を備える。当該構成によれば、製品の外観検査を高精度に実施することができる。 Further, the inspection device according to one aspect of the present invention includes an image acquisition unit that acquires a target image of a product to be visually inspected, an extraction unit that extracts features from the acquired target image, and any of the above. An inspection unit that inspects whether or not the product shown in the target image contains a defect based on the extracted features by using the estimator constructed by the estimator generator according to the embodiment of the above. It is provided with an output unit that outputs information about the inspection result. According to this configuration, the appearance inspection of the product can be performed with high accuracy.

また、上記各形態に係る推定器生成装置及び検査装置は、画像から製品の良否を判定するための推定器を機械学習により構築する場面だけではなく、画像に写る対象物の何らかの属性を推定するための推定器を構築するあらゆる場面に適用されてよい。例えば、上記各形態に係る推定器生成装置及び検査装置は、対象者の顔を写した顔画像から器官を検出するための推定器を構築する場面に適用されてもよい。また、上記各形態に係る推定器生成装置は、学習画像から第1特徴を抽出する構成を省略し、第1特徴を直接的に取得するように構成されてもよい。 Further, the estimator generation device and the inspection device according to each of the above forms estimate not only the scene of constructing an estimator for judging the quality of a product from an image by machine learning, but also some attribute of an object reflected in the image. It may be applied in any situation to build an estimator for. For example, the estimator generation device and the inspection device according to each of the above forms may be applied to a scene of constructing an estimator for detecting an organ from a face image of a subject's face. Further, the estimator generator according to each of the above embodiments may be configured to omit the configuration of extracting the first feature from the learning image and directly acquire the first feature.

例えば、本発明の一側面に係る推定器生成装置は、対象物を写した学習画像、及び前記対象物の属性を示すラベルの組み合わせによりそれぞれ構成された複数の学習データセットを取得するデータ取得部と、前記各学習データセットに含まれる前記学習画像から1又は複数の第1特徴抽出する抽出部と、抽出された前記1又は複数の第1特徴に拡大処理を適用することで、前記1又は複数の第1特徴とは異なる1又は複数の第2特徴を生成する拡大処理部と、機械学習を行うことで、前記1又は複数の第1特徴及び前記1又は複数の第2特徴の少なくともいずれかから、対応するラベルと一致するように、前記学習画像に写る前記対象物の属性を推定するように訓練された推定器を構築する学習処理部と、を備える。 For example, the estimator generator according to one aspect of the present invention is a data acquisition unit that acquires a plurality of learning data sets each composed of a combination of a learning image showing an object and a label indicating the attribute of the object. By applying the enlargement processing to the extraction unit that extracts one or a plurality of first features from the learning image included in each learning data set and the extracted one or a plurality of first features, the one or a plurality of the first features are extracted. At least one of the one or more first features and the one or more second features by performing machine learning with an enlargement processing unit that generates one or more second features different from the plurality of first features. From this, it is provided with a learning processing unit that constructs an estimator trained to estimate the attributes of the object reflected in the learning image so as to match the corresponding label.

また、例えば、本発明の一側面に係る推定器生成装置は、対象物を写した学習画像から抽出された1又は複数の第1特徴、及び前記対象物の属性を示すラベルの組み合わせによりそれぞれ構成された複数の学習データセットを取得するデータ取得部と、前記各学習データセットに含まれる前記1又は複数の第1特徴に拡大処理を適用することで、前記1又は複数の第1特徴とは異なる1又は複数の第2特徴を生成する拡大処理部と、機械学習を行うことで、前記1又は複数の第1特徴及び前記1又は複数の第2特徴の少なくともいずれかから、対応するラベルと一致するように、前記学習画像に写る前記対象物の属性を推定するように訓練された推定器を構築する学習処理部と、を備える。 Further, for example, the estimator generator according to one aspect of the present invention is configured by a combination of one or a plurality of first features extracted from a learning image of an object and a label indicating the attribute of the object. By applying the expansion process to the one or more first features included in each of the learning data sets and the data acquisition unit for acquiring the plurality of learning data sets, the one or more first features are An enlargement processing unit that generates one or a plurality of different second features, and a corresponding label from at least one of the one or more first features and the one or more second features by performing machine learning. A learning processing unit that constructs an estimator trained to estimate the attributes of the object reflected in the learning image so as to match is provided.

また、例えば、本発明の一側面に係る推定装置は、対象物を写した対象画像を取得する画像取得部と、取得した前記対象画像から特徴を抽出する抽出部と、上記いずれかの形態に係る推定器生成装置により構築された前記推定器を利用し、抽出した前記特徴に基づいて、前記対象画像に写る前記対象物の状態を推定する推定部と、前記推定の結果に関する情報を出力する出力部と、を備える。 Further, for example, the estimation device according to one aspect of the present invention has an image acquisition unit for acquiring an object image in which an object is captured, an extraction unit for extracting features from the acquired target image, and any of the above forms. Using the estimator constructed by the estimator generator, the estimator for estimating the state of the object reflected in the target image and information on the estimation result are output based on the extracted features. It has an output unit.

なお、「対象物」は、何らかの属性を推定する対象となり得るものであれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。対象物は、例えば、上記外観検査の対象となる製品、人物、人物の身体部位(例えば、顔等)等であってよい。また、推定する対象となる対象物の「属性」は、対象物の何らかの性質に関するものであればよく、推定器により推定可能な対象物のあらゆる種類の属性を含んでもよい。対象物が人物の顔である場合、判定の対象となる属性は、例えば、表情の種別、顔のパーツ(器官を含む)の位置(特定の器官同士の相対位置関係を含む)、顔のパーツの形状、顔のパーツの色、顔のパーツの状態(開度、角度等)、その顔を所有する個人の属性等であってよい。また、対象物が人物の身体である場合、判定の対象となる属性は、例えば、身体のポーズ等であってよい。対象物が作業対象のワークである場合、判定の対象となる属性は、例えば、ワークの位置、姿勢等であってよい。 The type of the "object" is not particularly limited as long as it can be an object for which some attribute is estimated, and may be appropriately selected according to the embodiment. The object 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, the "attribute" of the object to be estimated may be any property related to any property of the object, and may include all kinds of attributes of the object that can be estimated by the estimator. When the object is a person's face, the attributes to be judged are, for example, the type of facial expression, the position of facial parts (including organs) (including the relative positional relationship between specific organs), and facial parts. It may be the shape of the face, the color of the facial part, the state of the facial part (opening, angle, etc.), the attribute of the individual who owns the face, and the like. When the object is the body of a person, the attribute to be determined may be, for example, a pose of the body. When the object is a work to be worked on, the attributes to be determined may be, for example, the position and posture of the work.

本発明の一側面に係る検査システムは、上記いずれかの形態に係る推定器生成装置及び検査装置により構成されてもよい。また、本発明の一側面に係る推定システムは、上記いずれかの形態に係る推定器生成装置及び推定装置により構成されてもよい。更に、上記各形態に係る推定器生成装置、検査装置、検査システム及び推定システムそれぞれの別の形態として、本発明の一側面は、以上の各構成を実現する情報処理方法であってもよいし、プログラムであってもよいし、このようなプログラムを記憶した、コンピュータ等が読み取り可能な記憶媒体であってもよい。ここで、コンピュータ等が読み取り可能な記憶媒体とは、プログラム等の情報を、電気的、磁気的、光学的、機械的、又は、化学的作用によって蓄積する媒体である。 The inspection system according to one aspect of the present invention may be composed of an estimator generator and an inspection apparatus according to any one of the above embodiments. Further, the estimation system according to one aspect of the present invention may be composed of an estimator generator and an estimation device according to any one of the above embodiments. Further, as another form of the estimator generator, the inspection device, the inspection system, and the estimation system according to each of the above embodiments, one aspect of the present invention may be an information processing method that realizes each of the above configurations. , A program, or 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又は複数の第1特徴を抽出するステップと、抽出された前記1又は複数の第1特徴に拡大処理を適用することで、前記1又は複数の第1特徴とは異なる1又は複数の第2特徴を生成するステップと、機械学習を行うことで、前記1又は複数の第1特徴及び前記1又は複数の第2特徴の少なくともいずれかから、対応するラベルと一致するように、前記学習画像に写る前記製品に含まれる前記欠陥の種別を推定するように訓練された推定器を構築するステップと、を実行する、情報処理方法である。 For example, in the estimator generation method according to one aspect of the present invention, a computer is configured by a combination of a learning image showing a product to be visually inspected and a label indicating the type of defect contained in the product. A step of acquiring a plurality of training data sets, a step of extracting one or a plurality of first features from the training images included in each training data set, and an expansion process to the extracted one or a plurality of first features. By applying, the step of generating one or more second features different from the one or more first features, and by performing machine learning, the one or more first features and the one or more From at least one of the second features of the above, a step of constructing an estimator trained to estimate the type of defect contained in the product in the training image so as to match the corresponding label. It is an information processing method to be executed.

また、例えば、本発明の一側面に係る推定器生成プログラムは、コンピュータに、外観検査の対象となる製品を写した学習画像、及び前記製品に含まれる欠陥の種別を示すラベルの組み合わせによりそれぞれ構成された複数の学習データセットを取得するステップと、前記各学習データセットに含まれる前記学習画像から1又は複数の第1特徴を抽出するステップと、抽出された前記1又は複数の第1特徴に拡大処理を適用することで、前記1又は複数の第1特徴とは異なる1又は複数の第2特徴を生成するステップと、機械学習を行うことで、前記1又は複数の第1特徴及び前記1又は複数の第2特徴の少なくともいずれかから、対応するラベルと一致するように、前記学習画像に写る前記製品に含まれる前記欠陥の種別を推定するように訓練された推定器を構築するステップと、を実行させるための、プログラムである。 Further, for example, the estimator generation program according to one aspect of the present invention is configured by a combination of a learning image showing a product to be visually inspected and a label indicating the type of a defect contained in the product on a computer. The step of acquiring the plurality of learning data sets, the step of extracting one or a plurality of first features from the learning images included in each learning data set, and the extracted one or a plurality of first features. By applying the enlargement processing, a step of generating one or a plurality of second features different from the one or a plurality of first features, and by performing machine learning, the one or a plurality of first features and the above 1 Or with the step of constructing an estimator trained to estimate the type of defect contained in the product in the training image so as to match the corresponding label from at least one of the plurality of second features. , Is a program for executing.

本発明によれば、推定器の計算コストを低減しつつ、学習画像の件数が比較的に少なくても、画像に写る対象物の属性を高精度に推定可能な推定器を構築することができる。 According to the present invention, it is possible to construct an estimator capable of estimating the attributes of an object appearing in an image with high accuracy even if the number of learning images is relatively small, while reducing the calculation cost of the estimator. ..

図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 the hardware configuration of the estimator generator according to the embodiment. 図3は、実施の形態に係る検査装置のハードウェア構成の一例を模式的に例示する。FIG. 3 schematically illustrates an example of the hardware configuration of the inspection device according to the embodiment. 図4は、実施の形態に係る推定器生成装置のソフトウェア構成の一例を模式的に例示する。FIG. 4 schematically illustrates an example of the software configuration of the estimator generator according to the embodiment. 図5は、実施の形態に係る検査装置のソフトウェア構成の一例を模式的に例示する。FIG. 5 schematically illustrates an example of the software configuration of the inspection device according to the embodiment. 図6は、実施の形態に係る推定器生成装置の処理手順の一例を例示する。FIG. 6 illustrates an example of the processing procedure of the estimator generator according to the embodiment. 図7は、実施の形態に係る特徴抽出処理の一例を模式的に例示する。FIG. 7 schematically illustrates an example of the feature extraction process according to the embodiment. 図8Aは、本実施形態に係る拡大処理の一例(重み付け合成)を模式的に例示する。FIG. 8A schematically illustrates an example (weighted synthesis) of the enlargement processing according to the present embodiment. 図8Bは、サイズ(スケール)の異なる第1特徴を扱う場面の一例を模式的に例示する。FIG. 8B schematically illustrates an example of a scene dealing with a first feature having a different size (scale). 図9は、本実施形態に係る拡大処理の一例(幾何変換)を模式的に例示する。FIG. 9 schematically illustrates an example (geometric transformation) of the enlargement processing according to the present embodiment. 図10は、実施の形態に係る検査装置の処理手順の一例を例示する。FIG. 10 illustrates an example of the processing procedure of the inspection device according to the embodiment. 図11は、変形例に係る推定器生成装置のソフトウェア構成の一例を模式的に例示する。FIG. 11 schematically illustrates an example of the software configuration of the estimator generator according to the modified example. 図12は、本発明が適用される場面の他の例を模式的に例示する。FIG. 12 schematically illustrates another example of a situation in which the present invention is applied. 図13は、変形例に係る推定装置のソフトウェア構成の一例を模式的に例示する。FIG. 13 schematically illustrates an example of the software configuration of the estimation 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は、本実施形態に係る検査システム100の適用場面の一例を模式的に例示する。図1の例では、製造ラインで製造される製品Rの外観検査を実施する場面に本発明が適用されている。外観検査の対象となる製品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 an application scene of the inspection system 100 according to the present embodiment. In the example of FIG. 1, the present invention is applied to a scene where a visual inspection of a product R manufactured on a production line is performed. The product R subject to the visual inspection is an example of the "object" of the present invention, and the presence or absence of a defect and the type of the defect of the product R are an example of the "attribute of the object" of the present invention. However, the object of application of the present invention does not have to be limited to such an example, and can be applied to any situation in which some attribute of an object is estimated from an image.

図1に示されるとおり、本実施形態に係る検査システム100は、ネットワークを介して互いに接続される推定器生成装置1及び検査装置2を備えており、製品Rの欠陥の有無及び欠陥の種別を推定するための推定器を生成し、生成した推定器により製品Rの外観検査を実施するように構成される。推定器生成装置1及び検査装置2の間のネットワークの種類は、例えば、インターネット、無線通信網、移動通信網、電話網、専用網等から適宜選択されてよい。 As shown in FIG. 1, the inspection system 100 according to the present embodiment includes an estimator generator 1 and an inspection device 2 connected to each other via a network, and determines the presence or absence of defects and the types of defects in the product R. An estimator for estimation is generated, and the generated estimator is configured to perform a visual inspection of the product R. The type of network between the estimator generator 1 and the inspection device 2 may be appropriately selected from, for example, the Internet, a wireless communication network, a mobile communication network, a telephone network, a dedicated network, and the like.

本実施形態に係る推定器生成装置1は、機械学習を実施することにより、製品Rの欠陥の有無及び欠陥の種別を画像から推定するための推定器50を構築するように構成されたコンピュータである。具体的には、推定器生成装置1は、外観検査の対象となる製品Rを写した学習画像61、及び製品Rに含まれる欠陥の種別を示すラベル63の組み合わせによりそれぞれ構成された複数の学習データセット60を取得する。次に、推定器生成装置1は、各学習データセット60に含まれる学習画像61から1又は複数の第1特徴71を抽出し、抽出された1又は複数の第1特徴71に拡大処理を適用することで、1又は複数の第1特徴71とは異なる1又は複数の第2特徴73を生成する。 The estimator generator 1 according to the present embodiment is a computer configured to construct an estimator 50 for estimating the presence / absence of a defect and the type of defect of the product R from an image by performing machine learning. be. Specifically, the estimator generator 1 has a plurality of learnings configured by a combination of a learning image 61 showing the product R to be visually inspected and a label 63 indicating the type of defect included in the product R. Acquire the data set 60. Next, the estimator generator 1 extracts one or a plurality of first features 71 from the training image 61 included in each training data set 60, and applies an enlargement process to the extracted one or a plurality of first features 71. By doing so, one or more second features 73 different from one or more first features 71 are generated.

そして、推定器生成装置1は、機械学習を行うことで、1又は複数の第1特徴71及び1又は複数の第2特徴73の少なくともいずれかから、対応するラベル63と一致するように、学習画像61に写る製品Rに含まれる欠陥の種別を推定するように訓練された推定器50を構築する。すなわち、推定器生成装置1は、1又は複数の第1特徴71及び1又は複数の第2特徴73を訓練データ(入力データ)として利用し、対応するラベル63を正解データ(教師データ)として利用して、推定器50の機械学習を実施する。これにより、推定器生成装置1は、各学習データセット60について、学習画像61から導出された1又は複数の第1特徴71及び1又は複数の第2特徴73の少なくともいずれかを入力すると、当該学習画像61に関連付けられたラベル63により示される欠陥の種別に対応する出力値を出力するように訓練された推定器50を構築する。 Then, the estimator generator 1 learns from at least one of one or a plurality of first features 71 and one or a plurality of second features 73 so as to match the corresponding label 63 by performing machine learning. An estimator 50 trained to estimate the type of defect contained in the product R shown in image 61 is constructed. That is, the estimator generator 1 uses one or more first features 71 and one or more second features 73 as training data (input data), and uses the corresponding label 63 as correct answer data (teacher data). Then, machine learning of the estimator 50 is carried out. As a result, the estimator generator 1 inputs at least one of one or a plurality of first features 71 and one or a plurality of second features 73 derived from the training image 61 for each training data set 60. An estimator 50 trained to output an output value corresponding to the type of defect indicated by the label 63 associated with the training image 61 is constructed.

これに対して、本実施形態に係る検査装置2は、推定器生成装置1により構築された学習済みの推定器50を利用して、製品Rの外観検査を実施するように構成されたコンピュータである。検査装置2は、画像に写る対象物の何らかの属性を推定するための推定装置の一例である。具体的には、検査装置2は、外観検査の対象となる製品Rを写した対象画像81を取得する。本実施形態では、検査装置2には、カメラCAが接続されている。そのため、検査装置2は、このカメラCAにより製品Rを撮影することで対象画像81を取得する。 On the other hand, the inspection device 2 according to the present embodiment is a computer configured to perform a visual inspection of the product R by using the trained estimator 50 constructed by the estimator generation device 1. be. The inspection device 2 is an example of an estimation device for estimating some attribute of an object shown in an image. Specifically, the inspection device 2 acquires a target image 81 showing the product R to be visually inspected. In the present embodiment, the camera CA is connected to the inspection device 2. Therefore, the inspection device 2 acquires the target image 81 by photographing the product R with this camera CA.

次に、検査装置2は、取得した対象画像81から1又は複数の特徴83を抽出する。続いて、検査装置2は、推定器生成装置1により構築された学習済みの推定器50を利用して、抽出した1又は複数の特徴83に基づいて、対象画像81に写る製品Rに欠陥が含まれるか否かを検査する。すなわち、検査装置2は、抽出した1又は複数の特徴83を学習済みの推定器50に入力し、学習済みの推定器50の演算処理を実行する。これにより、検査装置2は、製品Rに欠陥が含まれるか否かを検査(推定)した結果に対応する出力値を学習済みの推定器50から取得する。そして、検査装置2は、検査の結果に関する情報を出力する。 Next, the inspection device 2 extracts one or a plurality of features 83 from the acquired target image 81. Subsequently, the inspection device 2 utilizes the trained estimator 50 constructed by the estimator generation device 1, and the product R shown in the target image 81 is defective based on the extracted one or a plurality of features 83. Check if it is included. That is, the inspection device 2 inputs the extracted one or a plurality of features 83 into the trained estimator 50, and executes the arithmetic processing of the trained estimator 50. As a result, the inspection device 2 acquires an output value corresponding to the result of inspecting (estimating) whether or not the product R contains a defect from the trained estimator 50. Then, the inspection device 2 outputs information regarding the inspection result.

以上のとおり、本実施形態では、推定器50は、学習画像61から直接的に製品Rの良否を推定するように訓練されるのではなく、学習画像61から導出された第1特徴71及び第2特徴73の少なくともいずれかから製品Rの良否を推定するように訓練される。第1特徴71及び第2特徴73は、学習画像61そのものよりも次元が低くなるように導出されるため、第1特徴71及び第2特徴73の有する情報量は学習画像61の情報量よりも少なくなる。そのため、学習画像61から直接的に製品Rの良否を推定するように訓練されるケースと比較して、本実施形態では、推定器50に対する入力データの情報量を抑えることができるため、推定器50の構成を単純化することができる。 As described above, in the present embodiment, the estimator 50 is not trained to directly estimate the quality of the product R from the learning image 61, but the first feature 71 and the first feature 71 derived from the learning image 61. 2 Trained to estimate the quality of product R from at least one of feature 73. Since the first feature 71 and the second feature 73 are derived so as to have a lower dimension than the learning image 61 itself, the amount of information possessed by the first feature 71 and the second feature 73 is larger than the amount of information of the learning image 61. Less. Therefore, as compared with the case where the training image 61 is trained to directly estimate the quality of the product R, in the present embodiment, the amount of information of the input data for the estimator 50 can be suppressed, so that the estimator can be suppressed. The configuration of 50 can be simplified.

加えて、本実施形態では、学習画像61より抽出された第1特徴71に拡大処理を適用することで、第1特徴71とは異なる第2特徴73が生成される。これにより、製品Rの良否を導出するための特徴のバリエーションを豊富にすることができる。すなわち、機械学習に利用する訓練データの件数を増やすことができる。そのため、学習画像61の件数が少なくても、欠陥推定の一定の精度を担保するのに十分な件数の学習データを用意することができる。したがって、本実施形態に係る推定器生成装置1によれば、推定器50の計算コストを低減しつつ、学習画像61の件数が比較的に少なくても、画像に写る製品Rの良否を高精度に推定可能な推定器50を構築することができる。また、本実施形態に係る検査装置2によれば、この推定器50を利用することで、製品Rの外観検査を高精度かつ高速に実施することができる。 In addition, in the present embodiment, by applying the enlargement processing to the first feature 71 extracted from the learning image 61, the second feature 73 different from the first feature 71 is generated. As a result, it is possible to increase the variation of features for deriving the quality of the product R. That is, the number of training data used for machine learning can be increased. Therefore, even if the number of training images 61 is small, it is possible to prepare a sufficient number of training data to ensure a certain accuracy of defect estimation. Therefore, according to the estimator generator 1 according to the present embodiment, while reducing the calculation cost of the estimator 50, even if the number of learning images 61 is relatively small, the quality of the product R reflected in the image is highly accurate. It is possible to construct an estimator 50 that can be estimated. Further, according to the inspection device 2 according to the present embodiment, the appearance inspection of the product R can be performed with high accuracy and high speed by using the estimator 50.

なお、図1の例では、推定器生成装置1及び検査装置2は別個のコンピュータである。しかしながら、検査システム100の構成は、このような例に限定されなくてもよい。推定器生成装置1及び検査装置2は一体のコンピュータで構成されてもよい。また、推定器生成装置1及び検査装置2はそれぞれ複数台のコンピュータにより構成されてもよい。更に、推定器生成装置1及び検査装置2はネットワークに接続されていなくてもよい。この場合、推定器生成装置1及び検査装置2の間のデータのやりとりは、不揮発メモリ等の記憶媒体を介して行われてもよい。 In the example of FIG. 1, the estimator generator 1 and the inspection device 2 are separate computers. However, the configuration of the inspection system 100 does not have to be limited to such an example. The estimator generator 1 and the inspection device 2 may be configured by an integrated computer. Further, the estimator generation device 1 and the inspection device 2 may each be composed of a plurality of computers. Further, the estimator generator 1 and the inspection device 2 do not have to be connected to the network. In this case, the exchange of data between the estimator generation device 1 and the inspection device 2 may be performed via a storage medium such as a non-volatile memory.

また、各特徴(71、73)は、画像から導出可能な何らかの情報であれば、その種類及びデータ形式は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。第1特徴71の抽出には、例えば、一般的な画像処理(例えば、エッジ抽出)、SIFT、学習済みの学習モデル(例えば、畳み込みニューラルネットワーク)等が用いられてよい。拡大処理は、1又は複数の第1特徴71から異なる第2特徴73を導出する処理である。拡大処理には、例えば、複数の第1特徴71を合成する処理、幾何的な変換等により第1特徴71を変換する処理等が用いられてよい。 The type and data format of each feature (71, 73) is not particularly limited as long as it is some information that can be derived from an image, and may be appropriately selected depending on the embodiment. For the extraction of the first feature 71, for example, general image processing (for example, edge extraction), SIFT, a trained learning model (for example, a convolutional neural network) or the like may be used. The enlargement process is a process of deriving a second feature 73 different from one or a plurality of first features 71. For the enlargement process, for example, a process of synthesizing a plurality of first features 71, a process of converting the first feature 71 by geometric conversion, or the like may be used.

また、製品Rは、外観検査の対象となり得るものであれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。製品Rは、例えば、電子機器、電子部品、自動車部品、薬品、食品等の製造ラインで搬送される物であってよい。電子機器は、例えば、携帯電話等である。電子部品は、例えば、基盤、チップコンデンサ、液晶、リレーの巻線等である。自動車部品は、例えば、コンロッド、シャフト、エンジンブロック、パワーウィンドウスイッチ、パネル等である。薬品は、例えば、包装済みの錠剤、未包装の錠剤等であってよい。また、欠陥は、製品Rの良否に関係し得るものであれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。欠陥は、例えば、傷、汚れ、クラック、打痕、バリ、色ムラ、異物混入等である。ラベル63により示される欠陥の種別には、製品Rに欠陥がないことも含まれてよい。 Further, the type of the product R may not be particularly limited as long as it can be a target of visual inspection, and may be appropriately selected according to the embodiment. The product R 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 not be particularly limited as long as it may be related to the quality of the product R, 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. The type of defect indicated by label 63 may also include the absence of defects in product R.

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

図2に示されるとおり、本実施形態に係る推定器生成装置1は、制御部11、記憶部12、通信インタフェース13、入力装置14、出力装置15、及びドライブ16が電気的に接続されたコンピュータである。なお、図2では、通信インタフェースを「通信I/F」と記載している。 As shown in FIG. 2, the estimator generator 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. Is. In FIG. 2, 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、学習結果データ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 estimator generation program 121, the plurality of learning data sets 60, and the learning result data 125.

推定器生成プログラム121は、推定器生成装置1に、後述する機械学習の情報処理(図6)を実行させ、学習済みの推定器50を構築させるためのプログラムである。推定器生成プログラム121は、この情報処理の一連の命令を含む。各学習データセット60は、上記学習画像61及びラベル63により構成され、推定器50の機械学習に利用される。学習結果データ125は、機械学習により構築された学習済みの推定器50の設定を行うためのデータである。学習結果データ125は、推定器生成プログラム121の実行結果として生成される。詳細は後述する。 The estimator generation program 121 is a program for causing the estimator generation device 1 to execute machine learning information processing (FIG. 6), which will be described later, to construct a learned estimator 50. The estimator generation program 121 includes a series of instructions for this information processing. Each training data set 60 is composed of the training image 61 and the label 63, and is used for machine learning of the estimator 50. The learning result data 125 is data for setting the trained estimator 50 constructed by machine learning. The learning result data 125 is generated as an execution result of the estimator generation program 121. Details will be described later.

通信インタフェース13は、例えば、有線LAN(Local Area Network)モジュール、無線LANモジュール等であり、ネットワークを介した有線又は無線通信を行うためのインタフェースである。推定器生成装置1は、この通信インタフェース13を利用することで、ネットワークを介したデータ通信を他の情報処理装置(例えば、検査装置2)と行うことができる。 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 estimator generation device 1 can perform data communication via a network with another information processing device (for example, an inspection device 2).

入力装置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 estimator generator 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 estimator generation program 121 and the plurality of training 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 estimator generation device 1 may acquire at least one of the estimator generation program 121 and the plurality of training data sets 60 from the storage medium 91.

ここで、図2では、記憶媒体91の一例として、CD、DVD等のディスク型の記憶媒体を例示している。しかしながら、記憶媒体91の種類は、ディスク型に限定される訳ではなく、ディスク型以外であってもよい。ディスク型以外の記憶媒体として、例えば、フラッシュメモリ等の半導体メモリを挙げることができる。 Here, in FIG. 2, 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 estimator generator 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 estimator generator 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 estimator generator 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.

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

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

すなわち、制御部21は、ハードウェアプロセッサであるCPU、RAM、ROM等を含み、プログラム及びデータに基づいて各種情報処理を実行するように構成される。記憶部22は、例えば、ハードディスクドライブ、ソリッドステートドライブ等で構成される。記憶部22は、検査プログラム221、学習結果データ125等の各種情報を記憶する。 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 inspection program 221 and the learning result data 125.

検査プログラム221は、学習済みの推定器50を利用して、対象画像81に写る製品Rの外観検査を実施する後述の情報処理(図10)を検査装置2に実行させるためのプログラムである。検査プログラム221は、この情報処理の一連の命令を含む。詳細は後述する。 The inspection program 221 is a program for causing the inspection device 2 to execute information processing (FIG. 10), which will be described later, for performing a visual inspection of the product R shown in the target image 81 by using the trained estimator 50. The inspection program 221 includes a series of instructions for this information processing. Details will be described later.

通信インタフェース23は、例えば、有線LANモジュール、無線LANモジュール等であり、ネットワークを介した有線又は無線通信を行うためのインタフェースである。検査装置2は、この通信インタフェース23を利用することで、ネットワークを介したデータ通信を他の情報処理装置(例えば、推定器生成装置1)と行うことができる。 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 inspection device 2 can perform data communication via a network with another information processing device (for example, an estimator generation device 1).

入力装置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 inspection device 2 by using the input device 24 and the output device 25.

ドライブ26は、例えば、CDドライブ、DVDドライブ等であり、記憶媒体92に記憶されたプログラムを読み込むためのドライブ装置である。上記検査プログラム221及び学習結果データ125のうちの少なくともいずれかは、記憶媒体92に記憶されていてもよい。また、検査装置2は、記憶媒体92から、上記検査プログラム221及び学習結果データ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 inspection program 221 and the learning result data 125 may be stored in the storage medium 92. Further, the inspection device 2 may acquire at least one of the inspection program 221 and the learning result data 125 from the storage medium 92.

外部インタフェース27は、例えば、USB(Universal Serial Bus)ポート、専用ポート等であり、外部装置と接続するためのインタフェースである。外部インタフェース27の種類及び数は、接続される外部装置の種類及び数に応じて適宜選択されてよい。本実施形態では、検査装置2は、外部インタフェース27を介して、カメラCAに接続される。 The external interface 27 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 27 may be appropriately selected according to the type and number of connected external devices. In the present embodiment, the inspection device 2 is connected to the camera CA via the external interface 27.

カメラCAは、製品Rを写した対象画像81を取得するのに利用される。カメラCAの種類及び配置場所は、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。カメラCAには、例えば、デジタルカメラ、ビデオカメラ等の公知のカメラが利用されてよい。また、カメラCAは、製品Rが搬送される製造ラインの近傍に配置されてよい。なお、カメラCAが通信インタフェースを備える場合、検査装置4は、外部インタフェース27ではなく、通信インタフェース23を介して、カメラCAに接続されてもよい。 The camera CA is used to acquire the target image 81 in which the product R is captured. 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 23 instead of the external interface 27.

なお、検査装置2の具体的なハードウェア構成に関して、上記推定器生成装置1と同様に、実施の形態に応じて、適宜、構成要素の省略、置換及び追加が可能である。例えば、制御部21は、複数のハードウェアプロセッサを含んでもよい。ハードウェアプロセッサは、マイクロプロセッサ、FPGA、DSP等で構成されてよい。記憶部22は、制御部21に含まれるRAM及びROMにより構成されてもよい。通信インタフェース23、入力装置24、出力装置25、ドライブ26及び外部インタフェース27の少なくともいずれかは省略されてもよい。検査装置2は、複数台のコンピュータで構成されてもよい。この場合、各コンピュータのハードウェア構成は、一致していてもよいし、一致していなくてもよい。また、検査装置2は、提供されるサービス専用に設計された情報処理装置の他、汎用のサーバ装置、汎用のデスクトップPC、ノートPC、タブレットPC、スマートフォンを含む携帯電話等が用いられてよい。 Regarding the specific hardware configuration of the inspection device 2, the components can be omitted, replaced, or added as appropriate according to the embodiment, as in the case of the estimator generation device 1. 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, the drive 26, and the external interface 27 may be omitted. The inspection 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, as the inspection device 2, 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.

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

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

データ取得部111は、外観検査の対象となる製品Rを写した学習画像61、及び製品Rに含まれる欠陥の種別を示すラベル63の組み合わせによりそれぞれ構成された複数の学習データセット60を取得する。抽出部112は、各学習データセット60に含まれる学習画像61から1又は複数の第1特徴71を抽出する。拡大処理部113は、抽出された1又は複数の第1特徴71に拡大処理を適用することで、1又は複数の第1特徴71とは異なる1又は複数の第2特徴73を生成する。 The data acquisition unit 111 acquires a plurality of learning data sets 60 each composed of a combination of a learning image 61 showing the product R to be visually inspected and a label 63 indicating the type of defect included in the product R. .. The extraction unit 112 extracts one or a plurality of first features 71 from the training image 61 included in each training data set 60. The enlargement processing unit 113 applies the enlargement processing to the extracted one or a plurality of first features 71 to generate one or a plurality of second features 73 different from the one or a plurality of first features 71.

学習処理部114は、機械学習を実施する対象となる推定器50を保持する。学習処理部114は、機械学習を行うことで、1又は複数の第1特徴71及び1又は複数の第2特徴73の少なくともいずれかから、対応するラベル63と一致するように、学習画像61に写る製品Rに含まれる欠陥の種別を推定するように訓練された推定器50を構築する。保存処理部115は、構築された学習済みの推定器50に関する情報を学習結果データ125として記憶部12に保存する。 The learning processing unit 114 holds an estimator 50 for performing machine learning. The learning processing unit 114 performs machine learning on the training image 61 so as to match the corresponding label 63 from at least one of the one or a plurality of first features 71 and the one or a plurality of second features 73. An estimator 50 trained to estimate the type of defect contained in the imaged product R is constructed. The storage processing unit 115 stores information about the constructed learned estimator 50 in the storage unit 12 as learning result data 125.

なお、「推定」することは、例えば、グループ分け(分類、識別)により離散値(クラス)を導出すること、及び回帰により連続値を導出することのいずれかであってよい。ラベル63のデータ形式は、製品Rに含まれ得る欠陥の種別を示す形態(すなわち、推定器50の出力形式)に応じて適宜選択されてよい。クラス等の離散値で欠陥の種別を表現する場合、ラベル63は、離散値の数値データにより構成されてよい。あるいは、対応する種別の欠陥の存在する確率等の連続値で欠陥の種別を表現する場合、ラベル63は、連続値の数値データにより構成されてよい。 In addition, "estimation" may be either, for example, deriving a discrete value (class) by grouping (classification, identification) or deriving a continuous value by regression. The data format of the label 63 may be appropriately selected according to the form indicating the type of defect that may be included in the product R (that is, the output format of the estimator 50). When the type of defect is expressed by a discrete value such as a class, the label 63 may be composed of numerical data of the discrete value. Alternatively, when the type of defect is expressed by a continuous value such as the probability that a defect of the corresponding type exists, the label 63 may be composed of numerical data of the continuous value.

(推定器)
次に、推定器50の構成の一例について説明する。図4に示されるとおり、本実施形態に係る推定器50は、ニューラルネットワークにより構成されている。具体的には、推定器50は、いわゆる深層学習に用いられる多層構造のニューラルネットワークにより構成されており、入力層501、中間層(隠れ層)503、及び出力層505を備えている。
(Estimator)
Next, an example of the configuration of the estimator 50 will be described. As shown in FIG. 4, the estimator 50 according to the present embodiment is configured by a neural network. Specifically, the estimator 50 is composed of a multi-layered neural network used for so-called deep learning, and includes an input layer 501, an intermediate layer (hidden layer) 503, and an output layer 505.

なお、図4の例では、推定器50を構成するニューラルネットワークは、1層の中間層503を備えており、入力層501の出力が中間層503に入力され、中間層503の出力が出力層505に入力されている。ただし、推定器50の構成は、このような例に限定されなくてもよい。中間層503の数は、1層に限られなくてもよい。推定器50は、2層以上の中間層503を備えてもよい。 In the example of FIG. 4, the neural network constituting the estimator 50 includes one intermediate layer 503, the output of the input layer 501 is input to the intermediate layer 503, and the output of the intermediate layer 503 is the output layer. It is input to 505. However, the configuration of the estimator 50 does not have to be limited to such an example. The number of intermediate layers 503 does not have to be limited to one. The estimator 50 may include two or more intermediate layers 503.

各層(501、503、505)は、1又は複数のニューロンを備えている。各層(501、503、505)に含まれるニューロンの数は、実施の形態に応じて適宜設定されてよい。隣接する層のニューロン同士は適宜結合され、各結合には重み(結合荷重)が設定されている。図4の例では、各ニューロンは、隣接する層の全てのニューロンと結合されている。しかしながら、ニューロンの結合は、このような例に限定されなくてもよく、実施の形態に応じて適宜設定されてよい。 Each layer (501, 503, 505) comprises one or more neurons. The number of neurons contained in each layer (501, 503, 505) 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. 4, 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.

各ニューロンには閾値が設定されており、基本的には、各入力と各重みとの積の和が閾値を超えているか否かによって各ニューロンの出力が決定される。つまり、これらの各ニューロン間の結合の重み及び各ニューロンの閾値は、演算処理に利用される推定器50のパラメータの一例である。学習処理部114は、1又は複数の第1特徴71及び1又は複数の第2特徴73の少なくともいずれかを入力層501に入力し、これらのパラメータを利用して、推定器50の演算処理を実行する。 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. That is, the weight of the connection between each of these neurons and the threshold value of each neuron are examples of the parameters of the estimator 50 used for arithmetic processing. The learning processing unit 114 inputs at least one of one or a plurality of first features 71 and one or a plurality of second features 73 to the input layer 501, and uses these parameters to perform arithmetic processing of the estimator 50. Run.

この演算処理の結果、学習処理部114は、学習画像61に写る製品Rの良否(すなわち、欠陥の種別)を推定した結果に対応する出力値を出力層505から取得する。続いて、学習処理部114は、取得した出力値とラベル63の値との誤差を算出する。そして、学習処理部114は、算出される誤差の和が小さくなるように、推定器50のパラメータの値を調節する。出力層505から得られる出力値とラベル63の値との誤差の和が閾値以下になるまで、学習処理部114は、推定器50のパラメータの値の調節を繰り返す。これにより、学習処理部114は、各学習データセット60について、学習画像61から導出された1又は複数の第1特徴71及び1又は複数の第2特徴73の少なくともいずれかを入力すると、当該学習画像61に関連付けられたラベル63により示される欠陥の種別に対応する出力値を出力するように訓練された推定器50を構築する。 As a result of this arithmetic processing, the learning processing unit 114 acquires an output value corresponding to the result of estimating the quality (that is, the type of defect) of the product R shown in the learning image 61 from the output layer 505. Subsequently, the learning processing unit 114 calculates an error between the acquired output value and the value of the label 63. Then, the learning processing unit 114 adjusts the value of the parameter of the estimator 50 so that the sum of the calculated errors becomes small. The learning processing unit 114 repeats adjusting the value of the parameter of the estimator 50 until the sum of the errors between the output value obtained from the output layer 505 and the value of the label 63 becomes equal to or less than the threshold value. As a result, when the learning processing unit 114 inputs at least one of one or a plurality of first features 71 and one or a plurality of second features 73 derived from the learning image 61 for each learning data set 60, the learning is performed. Construct an estimator 50 trained to output an output value corresponding to the type of defect indicated by the label 63 associated with the image 61.

この機械学習の処理が完了した後、保存処理部115は、構築された学習済みの推定器50の構成(例えば、ニューラルネットワークの層数、各層におけるニューロンの個数、ニューロン同士の結合関係、各ニューロンの伝達関数)、及び演算パラメータ(例えば、各ニューロン間の結合の重み、各ニューロンの閾値)を示す情報を学習結果データ125として生成する。そして、保存処理部115は、生成した学習結果データ125を記憶部12に保存する。 After the processing of this machine learning is completed, the preservation processing unit 115 determines the configuration of the constructed trained estimator 50 (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. Information indicating the transmission function) and the arithmetic parameters (for example, the weight of the connection between each neuron, the threshold value of each neuron) is generated as the learning result data 125. Then, the storage processing unit 115 stores the generated learning result data 125 in the storage unit 12.

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

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

画像取得部211は、外観検査の対象となる製品Rを写した対象画像81を取得する。例えば、画像取得部211は、カメラCAにより製品Rを撮影することで対象画像81を取得する。抽出部212は、取得した対象画像81から1又は複数の特徴83を抽出する。検査部213は、学習結果データ125を保持することで、推定器生成装置1により構築された学習済みの推定器50を含んでいる。具体的には、検査部213は、学習結果データ125を参照して、学習済みの推定器50の設定を行う。そして、検査部213は、抽出した1又は複数の特徴83を学習済みの推定器50に入力し、学習済みの推定器50の演算処理を実行することで、製品Rに欠陥が含まれるか否かを検査(すなわち、製品Rの良否を判定)した結果に対応する出力値を学習済みの推定器50から取得する。これにより、検査部213は、学習済みの推定器50を利用して、抽出した1又は複数の特徴83に基づいて、対象画像81に写る製品Rに欠陥が含まれるか否かを検査する。出力部214は、検査の結果に関する情報を出力する。 The image acquisition unit 211 acquires the target image 81 that captures the product R that is the target of the visual inspection. For example, the image acquisition unit 211 acquires the target image 81 by photographing the product R with the camera CA. The extraction unit 212 extracts one or a plurality of features 83 from the acquired target image 81. The inspection unit 213 includes the trained estimator 50 constructed by the estimator generator 1 by holding the learning result data 125. Specifically, the inspection unit 213 sets the trained estimator 50 with reference to the learning result data 125. Then, the inspection unit 213 inputs the extracted one or a plurality of features 83 into the trained estimator 50, and executes the arithmetic processing of the trained estimator 50 to determine whether or not the product R contains a defect. The output value corresponding to the result of the inspection (that is, the quality of the product R is determined) is acquired from the trained estimator 50. As a result, the inspection unit 213 inspects whether or not the product R shown in the target image 81 contains a defect based on the extracted one or a plurality of features 83 by using the trained estimator 50. The output unit 214 outputs information regarding the result of the inspection.

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

§3 動作例
[推定器生成装置]
次に、図6を用いて、本実施形態に係る推定器生成装置1の動作例について説明する。図6は、本実施形態に係る推定器生成装置1の処理手順の一例を示す。以下で説明する処理手順は、本発明の「推定器生成方法」の一例である。ただし、以下で説明する処理手順は一例に過ぎず、各処理は可能な限り変更されてよい。また、以下で説明する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。
§3 Operation example [Estimator generator]
Next, an operation example of the estimator generator 1 according to the present embodiment will be described with reference to FIG. FIG. 6 shows an example of the processing procedure of the estimator generator 1 according to the present embodiment. The processing procedure described below is an example of the "estimator generation 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として動作し、学習画像61及びラベル63の組み合わせによりそれぞれ構成された複数の学習データセット60を取得する。
(Step S101)
In step S101, the control unit 11 operates as a data acquisition unit 111, and acquires a plurality of learning data sets 60 each composed of a combination of the learning image 61 and the label 63.

複数の学習データセット60を取得する方法は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。例えば、カメラ及び製品Rを用意し、欠陥のある又は欠陥のない製品Rをカメラにより撮影する。これにより、学習画像61を生成することができる。そして、学習画像61に写る製品Rに含まれる欠陥の種別(欠陥が無いことも含む)を示すラベル63を適宜生成し、生成したラベル63を対応する学習画像61に関連付ける。これにより、各学習データセット60を生成することができる。 The method for acquiring the plurality of training data sets 60 does not have to be particularly limited, and may be appropriately selected depending on 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. As a result, the learning image 61 can be generated. Then, a label 63 indicating the type of defect (including no defect) included in the product R reflected in the learning image 61 is appropriately generated, and the generated label 63 is 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 for generating the learning data set 60 may be executed in the estimator generator 1 or may be executed in a computer other than the estimator generator 1.

各学習データセット60を推定器生成装置1が生成する場合、制御部11は、自動的又はオペレータの操作により手動的に上記情報処理を実行することで、複数の学習データセット60を取得する。一方、各学習データセット60を他のコンピュータが生成する場合、制御部11は、例えば、ネットワーク、記憶媒体91等を介して、他のコンピュータにより生成された複数の学習データセット60を取得する。 When the estimator generator 1 generates each learning data set 60, the control unit 11 acquires a plurality of learning data sets 60 by automatically or manually executing the information processing by the operation of the operator. On the other hand, when each 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.

なお、ラベル63のデータ形式は、上記のとおり、推定器50の出力形式に応じて適宜選択されてよい。例えば、ラベル63は、製品Rの良否を2値で示すように設定されてよい。また、例えば、ラベル63は、製品Rが良品である(すなわち、欠陥が無い)確率又は製品Rに欠陥が存在する確率を連続値で示すように設定されてもよい。また、例えば、ラベル63は、欠陥のある箇所等を示すように設定されてもよい。 As described above, the data format of the label 63 may be appropriately selected according to the output format of the estimator 50. For example, the label 63 may be set so as to indicate the quality of the product R by a binary value. Further, for example, the label 63 may be set so as to indicate the probability that the product R is a non-defective product (that is, there is no defect) or the probability that the product R has a defect as a continuous value. Further, for example, the label 63 may be set to indicate a defective portion or the like.

取得する学習データセット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)
ステップS102では、制御部11は、抽出部112として動作し、各学習データセット60に含まれる学習画像61から1又は複数の第1特徴71を抽出する。
(Step S102)
In step S102, the control unit 11 operates as the extraction unit 112, and extracts one or a plurality of first features 71 from the learning image 61 included in each learning data set 60.

図7は、本実施形態に係る特徴抽出処理の一例を模式的に例示する。本実施形態では、制御部11は、特徴抽出処理として畳み込み処理を各学習画像61に適用することで、各学習画像61から第1特徴71を抽出する。これにより、1又は複数の第1特徴71は、学習画像61よりもサイズの小さい特徴画像として抽出される。 FIG. 7 schematically illustrates an example of the feature extraction process according to the present embodiment. In the present embodiment, the control unit 11 extracts the first feature 71 from each learning image 61 by applying the convolution process to each learning image 61 as the feature extraction process. As a result, the one or more first features 71 are extracted as feature images having a size smaller than that of the learning image 61.

畳み込み処理は、画像と所定のフィルタとの相関を算出する演算処理に相当する。制御部11は、例えば、学習画像61の一部の領域に畳み込み処理を適用することで、学習画像61よりもサイズの小さい特徴画像を学習画像61から抽出してもよい。或いは、制御部11は、例えば、学習画像61に畳み込み処理を適用した後、得られた画像にプーリング処理を更に適用することにより、学習画像61よりもサイズの小さい特徴画像を学習画像61から抽出してもよい。プーリング処理は、画像内に表れる特徴の微小な位置変化に対する応答の不変性を得るために、対象領域内の複数の画素を1つの画素に集約する演算処理に相当する。この畳み込み処理及びプーリング処理は、一般的な画像処理により実行されてもよいし、学習済みの学習モデル(例えば、畳み込み層及びプーリング層を備える畳み込みニューラルネットワーク)を利用して実行されてもよい。また、畳み込み処理及びプーリング処理それぞれを適用する回数は、実施の形態に応じて適宜選択されてよい。 The convolution process corresponds to an arithmetic process for calculating the correlation between an image and a predetermined filter. For example, the control unit 11 may extract a feature image smaller in size than the learning image 61 from the learning image 61 by applying a convolution process to a part of the learning image 61. Alternatively, the control unit 11 extracts, for example, a feature image smaller in size than the learning image 61 from the learning image 61 by applying a convolution process to the learning image 61 and then further applying a pooling process to the obtained image. You may. The pooling process corresponds to an arithmetic process of aggregating a plurality of pixels in a target area into one pixel in order to obtain invariance of the response to a minute position change of a feature appearing in an image. The convolution processing and the pooling process may be executed by general image processing, or may be executed by using a learned learning model (for example, a convolutional neural network including a convolutional layer and a pooling layer). Further, the number of times each of the convolution treatment and the pooling treatment is applied may be appropriately selected according to the embodiment.

特徴画像の縦幅(h)及び横幅(w)はそれぞれ、学習画像61の縦幅(H)及び横幅(W)それぞれよりも小さくなるように適宜決定される。学習画像61の一部の領域に畳み込み処理を適用する場合、抽出される特徴画像のサイズは、畳み込み処理を適用する範囲に応じて決定される。また、プーリング処理を適用する場合、抽出される特徴画像のサイズは、プーリング処理のウィンドウサイズ及び適用回数に応じて決定される。制御部11は、畳み込み処理及びプーリング処理のこれらのパラメータを適宜決定することで、抽出される特徴画像のサイズを決定してよい。各特徴画像は、「特徴マップ」と称されてもよい。各第1特徴71に対応する特徴画像には、欠陥に関する像が含まれ得る。 The vertical width (h) and the horizontal width (w) of the feature image are appropriately determined so as to be smaller than the vertical width (H) and the horizontal width (W) of the learning image 61, respectively. When the convolution process is applied to a part of the area of the training image 61, the size of the extracted feature image is determined according to the range to which the convolution process is applied. When the pooling process is applied, the size of the extracted feature image is determined according to the window size of the pooling process and the number of times the pooling process is applied. The control unit 11 may determine the size of the feature image to be extracted by appropriately determining these parameters of the convolution process and the pooling process. Each feature image may be referred to as a "feature map". The feature image corresponding to each first feature 71 may include an image relating to the defect.

抽出する第1特徴71の数は、実施の形態に応じて適宜設定されてよい。制御部11は、各パラメータを変更しながら、上記いずれかの処理を学習画像61に適用することで、複数の異なる第1特徴71を学習画像61から抽出することができる。複数の第1特徴71を学習画像61から抽出する場合、各第1特徴71に対応する特徴画像のサイズは、互いに一致していてもよいし、互いに異なっていてもよい。1又は複数の第1特徴71を抽出すると、制御部11は、次のステップS103に処理を進める。 The number of the first features 71 to be extracted may be appropriately set according to the embodiment. The control unit 11 can extract a plurality of different first features 71 from the learning image 61 by applying any of the above processes to the learning image 61 while changing each parameter. When a plurality of first features 71 are extracted from the learning image 61, the sizes of the feature images corresponding to each first feature 71 may be the same as each other or may be different from each other. After extracting one or a plurality of first features 71, the control unit 11 proceeds to the next step S103.

ただし、第1特徴71の種類及び第1特徴71を抽出する方法は、このような例に限定されなくてもよい。第1特徴71は、学習画像61から導出可能な何らかの情報(特に、推定対象(本実施形態では、欠陥)に関連し得る情報)であれば、その種類及びデータ形式は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。また、第1特徴71を抽出する方法は、第1特徴71の種類及びデータ形式に応じて、実施の形態に応じて適宜選択されてよい。第1特徴71の抽出には、例えば、一般的な画像処理(例えば、エッジ抽出)、SIFT、学習済みの学習モデル(例えば、畳み込みニューラルネットワーク)等が用いられてよい。 However, the type of the first feature 71 and the method for extracting the first feature 71 may not be limited to such an example. The type and data format of the first feature 71 is not particularly limited as long as it is some information that can be derived from the learning image 61 (particularly, information that can be related to an estimation target (defect in this embodiment)). It may be appropriately selected depending on the embodiment. Further, the method for extracting the first feature 71 may be appropriately selected according to the embodiment according to the type and data format of the first feature 71. For the extraction of the first feature 71, for example, general image processing (for example, edge extraction), SIFT, a trained learning model (for example, a convolutional neural network) or the like may be used.

(ステップS103)
ステップS103では、制御部11は、拡大処理部113として動作し、抽出された1又は複数の第1特徴71に拡大処理を適用することで、1又は複数の第1特徴71とは異なる1又は複数の第2特徴73を生成する。
(Step S103)
In step S103, the control unit 11 operates as the enlargement processing unit 113, and by applying the enlargement processing to the extracted one or a plurality of first features 71, one or a plurality of ones different from the one or a plurality of first features 71. Generate a plurality of second features 73.

拡大処理は、1又は複数の特徴(第1特徴71)から異なる特徴(第2特徴73)を導出するための情報処理である。この拡大処理には、例えば、複数の特徴を合成する処理、幾何的な変換等により特徴を変換する処理等が用いられてよい。また、本実施形態では、第1特徴71は特徴画像として抽出される。そのため、特徴を変換する処理には、所定のノイズ(ホワイトノイズ、ランダムノイズ等)を特徴画像に合成する処理、特徴画像に含まれる画素を変換する処理等が用いられてよい。画素の変換には、色変換、濃度変換等が含まれてよく、これらの変換には、所定の変換関数が用いられてよい。本実施形態では、制御部11は、以下の2つの方法の少なくともいずれかを採用することにより、1又は複数の第1特徴71から第2特徴73を導出する。 The enlargement processing is information processing for deriving different features (second feature 73) from one or more features (first feature 71). For this enlargement processing, for example, a process of synthesizing a plurality of features, a process of converting features by geometric conversion, or the like may be used. Further, in the present embodiment, the first feature 71 is extracted as a feature image. Therefore, as the process of converting the feature, a process of synthesizing predetermined noise (white noise, random noise, etc.) into the feature image, a process of converting pixels included in the feature image, and the like may be used. Pixel conversion may include color conversion, density conversion, and the like, and a predetermined conversion function may be used for these conversions. In the present embodiment, the control unit 11 derives the second feature 73 from one or a plurality of first features 71 by adopting at least one of the following two methods.

(1)第1の方法
まず、図8Aを用いて、第1の方法について説明する。図8Aは、第1の方法(重み付け合成)による拡大処理の一例を模式的に例示する。第1の方法では、各第1特徴71には重みが設定されている。各第1特徴71に対する重みを設定する方法は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。各第1特徴71に対する重みは、ランダムに決定されてもよいし、オペレータの入力により決定されてよい。制御部11は、設定された重みを各第1特徴71にかけることで、各第1特徴71の重み付けを行う。そして、制御部11は、重み付けされた各第1特徴71を合成することで、各第1特徴71とは異なる第2特徴73を生成する。
(1) First Method First, the first method will be described with reference to FIG. 8A. FIG. 8A schematically illustrates an example of the enlargement processing by the first method (weighted synthesis). In the first method, weights are set for each first feature 71. The method for setting the weight for each first feature 71 does not have to be particularly limited, and may be appropriately selected depending on the embodiment. The weight for each first feature 71 may be randomly determined or may be determined by operator input. The control unit 11 weights each first feature 71 by applying the set weight to each first feature 71. Then, the control unit 11 generates a second feature 73 different from each first feature 71 by synthesizing each weighted first feature 71.

図8Aの具体例では、複数の第1特徴71のうち3つの第1特徴711~713(特徴画像)を合成する場面が模式的に示されている。この具体例では、制御部11は、各第1特徴711~713(特徴画像)の各画素に各重みW1~W3を乗算する。そして、制御部11は、この乗算により得られた各画像を足し合わせることで、重み付けされた各第1特徴711~713(特徴画像)を合成する。これにより、制御部11は、各第1特徴711~713から新たな第2特徴73(特徴画像)を生成することができる。 In the specific example of FIG. 8A, a scene in which three first features 711 to 713 (feature images) out of the plurality of first features 71 are synthesized is schematically shown. In this specific example, the control unit 11 multiplies each pixel of each first feature 711 to 713 (feature image) by each weight W1 to W3. Then, the control unit 11 synthesizes the weighted first features 711 to 713 (feature images) by adding the images obtained by this multiplication. As a result, the control unit 11 can generate a new second feature 73 (feature image) from each of the first features 711 to 713.

ただし、合成する第1特徴71の数は、3つに限定されなくてもよく、2つであってもよいし、4つ以上であってもよい。制御部11は、ステップS102で抽出した複数の第1特徴71から第2特徴73の生成に利用する複数の第1特徴71を適宜選択してよい。また、第1の方法により生成する第2特徴73の数は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。制御部11は、各第1特徴71に適用する重みを変更すること、及び合成する第1特徴71を変更することの少なくともいずれかにより、複数の異なる第2特徴73を生成することができる。合成する第1特徴71は、ランダムに選択されてもよいし、オペレータの指定により選択されてもよい。 However, the number of the first feature 71 to be synthesized is not limited to three, and may be two or four or more. The control unit 11 may appropriately select a plurality of first features 71 to be used for generating the second features 73 from the plurality of first features 71 extracted in step S102. Further, the number of the second features 73 generated by the first method is not particularly limited and may be appropriately selected according to the embodiment. The control unit 11 can generate a plurality of different second features 73 by at least one of changing the weight applied to each first feature 71 and changing the first feature 71 to be combined. The first feature 71 to be synthesized may be randomly selected or may be selected by the operator's designation.

なお、図8Bに示されるとおり、合成する各第1特徴71に対応する特徴画像のサイズが異なる場合には、制御部11は、各特徴画像のサイズを一致させるための前処理を実行する。図8Bは、サイズの異なる複数の第1特徴71を取り扱う場面の一例を模式的に例示する。図8Bの具体例では、3つの第1特徴711~713(特徴画像)それぞれのサイズが異なる場面が模式的に示されている。この具体例では、制御部11は、各第1特徴711~713(特徴画像)をフィルタリングすることで、各第1特徴711~713(特徴画像)のサイズを互いに一致するように調節する。画像のサイズを調節するフィルタリングには、例えば、最近傍フィルタリング(nearest neighbor filtering)等の公知の画像処理のフィルタリングが用いられてよい。なお、画像のサイズを調整する変換処理は、このようなフィルタリングを用いた例に限られなくてもよい。画像のサイズを調整する変換処理には、例えば、バイリニア補間法(bilinear interpolation)、トリリニア補間法(trilinear interpolation)等の線形補間法、Guided Backpropagation等のネットワークによる方法が採用されてもよい。 As shown in FIG. 8B, when the sizes of the feature images corresponding to the first feature 71 to be combined are different, the control unit 11 executes preprocessing for matching the sizes of the feature images. FIG. 8B schematically illustrates an example of a situation in which a plurality of first features 71 having different sizes are handled. In the specific example of FIG. 8B, scenes in which the sizes of the three first features 711 to 713 (feature images) are different are schematically shown. In this specific example, the control unit 11 adjusts the sizes of the first features 711 to 713 (feature images) so as to match each other by filtering the first features 711 to 713 (feature images). For the filtering for adjusting the size of the image, for example, filtering of known image processing such as nearest neighbor filtering may be used. The conversion process for adjusting the size of the image is not limited to the example using such filtering. For the conversion process for adjusting the size of the image, for example, a linear interpolation method such as bilinear interpolation or trilinear interpolation, or a network method such as Guided Backpropagation may be adopted.

フィルタリング後の各第1特徴711~713(特徴画像)のサイズは、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。フィルタリング後の各第1特徴711~713(特徴画像)のサイズは、フィルタリング前の第1特徴711~713(特徴画像)のうちのいずれかと一致していてもよいし、フィルタリング前の第1特徴711~713(特徴画像)のいずれとも異なっていてもよい。このように、合成する各第1特徴71のサイズが異なる場合には、制御部11は、前処理として、各第1特徴71のサイズを一致させるように調節する処理を実行する。そして、制御部11は、サイズの調整された各第1特徴71に上記重み付け合成の処理を適用することで、各第1特徴71から第2特徴73を生成することができる。

The size of each of the first features 711 to 713 (feature images) after filtering may not be particularly limited and may be appropriately determined according to the embodiment. The size of each first feature 711 to 713 (feature image) after filtering may match any one of the first features 711 to 713 (feature image) before filtering, or the first feature before filtering may be the same. It may be different from any of 711 to 713 (feature image). As described above, when the sizes of the first features 71 to be combined are different, the control unit 11 executes a process of adjusting the sizes of the first features 71 as preprocessing. Then, the control unit 11 can generate the second feature 73 from each first feature 71 by applying the weighting synthesis process to each size-adjusted first feature 71.

(2)第2の方法
次に、図9を用いて、第2の方法について説明する。図9は、第2の方法(幾何変換)による拡大処理の一例を模式的に例示する。図9に示されるとおり、第2の方法では、制御部11は、1又は複数の第1特徴71に対して幾何学的な変換を適用することで、1又は複数の第1特徴71とは異なる第2特徴73を生成する。幾何学的な変換は、特に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。例えば、幾何学的な変換は、平行移動、回転移動、反転、又はこれら組み合わせであってよい。
(2) Second method Next, the second method will be described with reference to FIG. 9. FIG. 9 schematically illustrates an example of enlargement processing by the second method (geometric transformation). As shown in FIG. 9, in the second method, the control unit 11 applies a geometric transformation to one or more first features 71 to form one or more first features 71. Generate a different second feature 73. The geometric transformation is not particularly limited and may be appropriately determined according to the embodiment. For example, the geometric transformation may be translation, rotational movement, inversion, or a combination thereof.

第2の方法により生成する第2特徴73の数は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。制御部11は、1つの第1特徴71に対して幾何学的な変換を適用することで、1つの第2特徴73を生成することができる。制御部11は、幾何学的な変換を適用する第1特徴71を変更すること、及び幾何学的な変換のパラメータを変更することの少なくともいずれかにより、複数の異なる第2特徴73を生成することができる。幾何学的な変換を適用する第1特徴71は、ランダムに選択されてもよいし、オペレータの指定により選択されてもよい。また、幾何学的な変換のパラメータは、例えば、平行移動の量、回転移動の量、反転の有無等を規定する。幾何学的な変換の各パラメータの値は、ランダムに決定されてもよいし、オペレータの入力により決定されてもよい。 The number of the second features 73 generated by the second method may not be particularly limited and may be appropriately selected depending on the embodiment. The control unit 11 can generate one second feature 73 by applying a geometric transformation to one first feature 71. The control unit 11 generates a plurality of different second features 73 by at least one of changing the first feature 71 to which the geometric transformation is applied and changing the parameters of the geometric transformation. be able to. The first feature 71 to which the geometric transformation is applied may be randomly selected or may be selected as specified by the operator. Further, the parameters of the geometric transformation define, for example, the amount of parallel movement, the amount of rotational movement, the presence or absence of inversion, and the like. The value of each parameter of the geometric transformation may be randomly determined or may be determined by operator input.

以上のとおり、本実施形態では、制御部11は、上記第1の方法及び第2の方法の少なくともいずれかを採用することにより、1又は複数の第1特徴71とは異なる1又は複数の第2特徴73を当該1又は複数の第1特徴71から生成する。1又は複数の第2特徴73を生成すると、制御部11は、次のステップS104に処理を進める。 As described above, in the present embodiment, the control unit 11 adopts at least one of the first method and the second method, so that the control unit 11 has one or a plurality of first features different from the one or a plurality of first features 71. Two features 73 are generated from the one or a plurality of first features 71. When one or a plurality of second features 73 are generated, the control unit 11 proceeds to the next step S104.

(ステップS104)
ステップS104では、制御部11は、学習処理部114として動作し、機械学習を行うことで、1又は複数の第1特徴71及び1又は複数の第2特徴73の少なくともいずれかから、対応するラベル63と一致するように、学習画像61に写る製品Rに含まれる欠陥の種別を推定するように訓練された推定器50を構築する。
(Step S104)
In step S104, the control unit 11 operates as the learning processing unit 114, and by performing machine learning, the corresponding label from at least one of one or a plurality of first features 71 and one or a plurality of second features 73. The estimator 50 trained to estimate the type of defect contained in the product R shown in the training image 61 is constructed so as to match 63.

まず、制御部11は、機械学習の処理対象となる推定器50を用意する。用意する推定器50の構成、各ニューロン間の結合の重みの初期値、及び各ニューロンの閾値の初期値は、テンプレートにより与えられてもよいし、オペレータの入力により与えられてもよい。また、再学習を行う場合には、制御部11は、過去の機械学習を行うことで得られた学習結果データに基づいて、推定器50を用意してもよい。 First, the control unit 11 prepares an estimator 50 to be processed by machine learning. The configuration of the estimator 50 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 estimator 50 based on the learning result data obtained by performing the past machine learning.

次に、制御部11は、各学習データセット60について、学習画像61から導出した1又は複数の第1特徴71及び1又は複数の第2特徴73の少なくともいずれかを入力データ(訓練データ)として利用し、対応するラベル63を正解データ(教師データ)として利用して、推定器50の学習処理を実行する。入力データとして選択する特徴の数、換言すると、推定器50に入力する特徴の数は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。複数の特徴を推定器50に入力する場合、当該複数の特徴は、第1特徴71のみで構成されてもよいし、第2特徴73のみで構成されてもよいし、第1特徴71及び第2特徴73の両方で構成されてもよい。推定器50に入力する特徴の数は、学習画像61に写る製品Rに含まれる欠陥の種別を推定するのに利用する特徴の数に相当する。 Next, the control unit 11 uses at least one of one or a plurality of first features 71 and one or a plurality of second features 73 derived from the training image 61 as input data (training data) for each training data set 60. It is used, and the corresponding label 63 is used as correct answer data (teacher data) to execute the learning process of the estimator 50. The number of features to be selected as input data, in other words, the number of features to be input to the estimator 50 may not be particularly limited and may be appropriately selected according to the embodiment. When a plurality of features are input to the estimator 50, the plurality of features may be composed of only the first feature 71, may be composed of only the second feature 73, or may be composed of the first feature 71 and the first feature. It may be composed of both of the two features 73. The number of features input to the estimator 50 corresponds to the number of features used to estimate the type of defect included in the product R shown in the learning image 61.

つまり、学習画像61から導出された1又は複数の第1特徴71及び1又は複数の第2特徴73から選択された1又は複数の特徴、並びに対応するラベル63により、推定器50の機械学習に利用するためのデータセットが構成される。これにより、本実施形態では、1件の学習データセット60から、推定器50の機械学習にそれぞれ利用可能な複数のデータセットを導出することができる。例えば、上記ステップS102では、制御部11は、学習画像61から4件の第1特徴71を抽出したと想定する。また、上記ステップS103では、制御部11は、4件の第1特徴71から6件の第2特徴73を生成したと想定する。更に、推定器50は、1件の特徴の入力を受け付けるように構成されていると想定する。この場合、制御部11は、1件の学習データセット60から10件のデータセットを導出することができる。制御部11は、各学習データセット60から導出されるこのようなデータセットを利用して、推定器50の学習処理を実行する。この確率的勾配降下法等が用いられてよい。 That is, the machine learning of the estimator 50 is performed by one or a plurality of features selected from one or a plurality of first features 71 and one or a plurality of second features 73 derived from the training image 61, and the corresponding label 63. A dataset is configured for use. Thereby, in the present embodiment, a plurality of data sets that can be used for machine learning of the estimator 50 can be derived from one learning data set 60. For example, in step S102, it is assumed that the control unit 11 has extracted four first features 71 from the learning image 61. Further, in step S103, it is assumed that the control unit 11 has generated 4 first features 71 to 6 second features 73. Further, it is assumed that the estimator 50 is configured to accept the input of one feature. In this case, the control unit 11 can derive 10 data sets from one learning data set 60. The control unit 11 executes the learning process of the estimator 50 by using such a data set derived from each learning data set 60. This stochastic gradient descent method or the like may be used.

例えば、第1のステップでは、制御部11は、各データセットについて、選択された1又は複数の特徴を入力層501に入力し、入力側から順に各層(501、503、505)に含まれる各ニューロンの発火判定を行う。これにより、制御部11は、選択された1又は複数の特徴から欠陥の種別を推定した結果に対応する出力値を出力層505から取得する。第2のステップでは、制御部11は、取得した出力値とラベル63の値との誤差を算出する。第3のステップでは、制御部11は、誤差逆伝播法により、算出した出力値の誤差を用いて、各層(501、503、505)に含まれる各ニューロン間の結合の重み及び各ニューロンの閾値それぞれの誤差を算出する。第4のステップでは、制御部11は、算出した各誤差により、各ニューロン間の結合の重み及び各ニューロンの閾値それぞれの値の更新を行う。 For example, in the first step, the control unit 11 inputs the selected one or a plurality of features to the input layer 501 for each data set, and is included in each layer (501, 503, 505) in order from the input side. Judge the firing of neurons. As a result, the control unit 11 acquires an output value corresponding to the result of estimating the defect type from the selected one or a plurality of features from the output layer 505. In the second step, the control unit 11 calculates an error between the acquired output value and the value of the label 63. In the third step, the control unit 11 uses the error of the output value calculated by the error back propagation method to weight the connection between each neuron included in each layer (501, 503, 505) and the threshold value of each neuron. Calculate each error. In the fourth step, the control unit 11 updates the weight of the connection between each neuron and the value of each threshold value of each neuron according to each calculated error.

制御部11は、上記第1~第4のステップを繰り返すことで、各データセットについて、選択された1又は複数の特徴を入力すると、対応するラベル63と一致する出力値を出力するように、推定器50のパラメータの値を調節する。換言すると、制御部11は、各データセットについて、出力層505から得られる出力値とラベル63の値との誤差の和が閾値以下になるまで、上記第1~第4のステップによる推定器50のパラメータの値の調節を繰り返す。閾値は、実施の形態に応じて適宜設定されてよい。これにより、制御部11は、1又は複数の第1特徴71及び1又は複数の第2特徴73の少なくともいずれかから、対応するラベル63と一致するように、学習画像61に写る製品Rに含まれる欠陥の種別を推定するように訓練された推定器50を構築することができる。この推定器50の機械学習が完了すると、制御部11は、次のステップS105に処理を進める。 By repeating the first to fourth steps, the control unit 11 inputs one or a plurality of selected features for each data set, and outputs an output value that matches the corresponding label 63. Adjust the value of the parameter of the estimator 50. In other words, the control unit 11 determines the estimator 50 according to the first to fourth steps until the sum of the errors between the output value obtained from the output layer 505 and the value of the label 63 becomes equal to or less than the threshold value for each data set. Repeat the adjustment of the value of the parameter of. The threshold value may be appropriately set according to the embodiment. As a result, the control unit 11 is included in the product R shown in the training image 61 so as to match the corresponding label 63 from at least one of the one or a plurality of first features 71 and the one or a plurality of second features 73. An estimator 50 trained to estimate the type of defect can be constructed. When the machine learning of the estimator 50 is completed, the control unit 11 proceeds to the next step S105.

(ステップS105)
ステップS105では、制御部11は、保存処理部115として動作し、構築された学習済みの推定器50に関する情報を学習結果データ125として記憶部12に保存する。本実施形態では、制御部11は、ステップS104の機械学習により構築された推定器50の構成及びパラメータを示す情報を学習結果データ125として生成する。そして、制御部11は、生成した学習結果データ125を記憶部12に保存する。これにより、制御部11は、本動作例に係る処理を終了する。
(Step S105)
In step S105, the control unit 11 operates as a storage processing unit 115, and stores information about the constructed learned estimator 50 in the storage unit 12 as learning result data 125. In the present embodiment, the control unit 11 generates information indicating the configuration and parameters of the estimator 50 constructed by machine learning in step S104 as learning result data 125. Then, the control unit 11 stores the generated learning result data 125 in the storage unit 12. As a result, the control unit 11 ends the process related to this operation example.

なお、学習結果データ125の保存先は、記憶部12に限られなくてもよい。制御部11は、例えば、NAS(Network Attached Storage)等のデータサーバに学習結果データ125を格納してもよい。 The storage destination of the learning result data 125 does not have to be limited to the storage unit 12. The control unit 11 may store the learning result data 125 in a data server such as NAS (Network Attached Storage), for example.

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

更に、制御部11は、上記ステップS101~S105の処理を定期的に繰り返すことで、学習結果データ125を定期的に更新してもよい。この繰り返す際には、学習データセット60の変更、修正、追加、削除等が適宜実行されてよい。そして、制御部11は、更新した学習結果データ125を学習処理の実行毎に検査装置2に転送することで、検査装置2の保持する学習結果データ125を定期的に更新してもよい。 Further, the control unit 11 may periodically update the learning result data 125 by periodically repeating the processes of steps S101 to S105. 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 may periodically update the learning result data 125 held by the inspection device 2 by transferring the updated learning result data 125 to the inspection device 2 every time the learning process is executed.

[検査装置]
次に、図10を用いて、本実施形態に係る検査装置2の動作例について説明する。図10は、本実施形態に係る検査装置2の処理手順の一例を例示するフローチャートである。ただし、以下で説明する処理手順は一例に過ぎず、各処理は可能な限り変更されてよい。また、以下で説明する処理手順について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。
[Inspection equipment]
Next, an operation example of the inspection device 2 according to the present embodiment will be described with reference to FIG. FIG. 10 is a flowchart illustrating an example of the processing procedure of the inspection 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として動作し、外観検査の対象となる製品Rを写した対象画像81を取得する。本実施形態では、検査装置2は、外部インタフェース27を介してカメラCAに接続している。そのため、制御部21は、カメラCAから対象画像81を取得する。この対象画像81は、動画像データであってもよいし、静止画像データであってもよい。対象画像81を取得すると、制御部21は、次のステップS202に処理を進める。
(Step S201)
In step S201, the control unit 21 operates as the image acquisition unit 211 to acquire the target image 81 showing the product R to be the target of the visual inspection. In the present embodiment, the inspection device 2 is connected to the camera CA via the external interface 27. Therefore, the control unit 21 acquires the target image 81 from the camera CA. The target image 81 may be moving image data or still image data. When the target image 81 is acquired, the control unit 21 proceeds to the next step S202.

ただし、対象画像81を取得する経路は、このような例に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。例えば、検査装置2とは異なる他の情報処理装置が、カメラCAに接続されていてもよい。この場合、制御部21は、他の情報処理装置を介して対象画像81を取得してもよい。 However, the route for acquiring the target image 81 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 2 may be connected to the camera CA. In this case, the control unit 21 may acquire the target image 81 via another information processing device.

(ステップS202)
ステップS202では、制御部21は、抽出部212として動作し、取得した対象画像81から1又は複数の特徴83を抽出する。
(Step S202)
In step S202, the control unit 21 operates as the extraction unit 212 and extracts one or a plurality of features 83 from the acquired target image 81.

本ステップS202は、上記ステップS102と同様に処理される。本実施形態では、制御部21は、対象画像81に畳み込み処理を適用することで、対象画像81から1又は複数の特徴83を抽出する。また、抽出する特徴83の数は、上記ステップS104で入力データとして選択された特徴の数、すなわち、推定器50が入力を受け付ける特徴の数と一致するように決定される。1又は複数の特徴83を抽出すると、制御部21は、次のステップS203に処理を進める。 This step S202 is processed in the same manner as in step S102. In the present embodiment, the control unit 21 extracts one or a plurality of features 83 from the target image 81 by applying the convolution process to the target image 81. Further, the number of features 83 to be extracted is determined so as to match the number of features selected as input data in step S104, that is, the number of features that the estimator 50 accepts input. After extracting one or a plurality of features 83, the control unit 21 proceeds to the next step S203.

(ステップS203)
ステップS203では、制御部21は、検査部213として動作し、学習済みの推定器50を利用して、抽出した1又は複数の特徴83に基づいて、対象画像81に写る製品Rに欠陥が含まれるか否かを検査する。
(Step S203)
In step S203, the control unit 21 operates as the inspection unit 213, and the product R shown in the target image 81 contains a defect based on the extracted one or a plurality of features 83 using the trained estimator 50. Check if it is possible.

本実施形態では、制御部21は、学習結果データ125を参照して、学習済みの推定器50の設定を行う。次に、制御部21は、抽出した1又は複数の特徴83を推定器50の入力層501に入力し、入力側から順に各層(501、503、505)に含まれる各ニューロンの発火判定を行う。これにより、制御部21は、対象画像81に写る製品Rに欠陥が含まれるか否か(すなわち、製品Rの良否)を推定した結果に対応する出力値を推定器50の出力層505から取得する。制御部21は、推定器50の出力層505から取得した出力値に基づいて、対象画像81に写る製品Rに欠陥が含まれるか否かを検査する。 In the present embodiment, the control unit 21 sets the trained estimator 50 with reference to the learning result data 125. Next, the control unit 21 inputs the extracted one or a plurality of features 83 to the input layer 501 of the estimator 50, and determines the firing of each neuron included in each layer (501, 503, 505) in order from the input side. .. As a result, the control unit 21 acquires an output value corresponding to the result of estimating whether or not the product R shown in the target image 81 contains a defect (that is, whether the product R is good or bad) from the output layer 505 of the estimator 50. do. The control unit 21 inspects whether or not the product R shown in the target image 81 contains a defect based on the output value acquired from the output layer 505 of the estimator 50.

なお、製品Rの良否の検査は、推定器50の出力形式に応じて適宜行われてよい。例えば、推定器50から得られる出力値が製品Rの良否を2値で示す場合、制御部21は、推定器50から得られる出力値に応じて、製品Rの良否を特定することができる。また、例えば、推定器50から得られる出力値が、製品Rが良品である確率又は製品Rに欠陥がある確率を連続値で示す場合、制御部21は、推定器50から得られる出力値と閾値とを比較することで、製品Rの良否を判定することができる。また、例えば、推定器50から得られる出力値が欠陥のある箇所を示す場合、制御部21は、推定器50から得られる出力値に基づいて、対象画像81に写る製品Rの良否を判定することができると共に、欠陥が存在する場合にはその欠陥の箇所を特定することができる。 The quality of the product R may be inspected as appropriate according to the output format of the estimator 50. For example, when the output value obtained from the estimator 50 indicates the quality of the product R by two values, the control unit 21 can specify the quality of the product R according to the output value obtained from the estimator 50. Further, for example, when the output value obtained from the estimator 50 indicates the probability that the product R is a non-defective product or the probability that the product R has a defect as a continuous value, the control unit 21 has the output value obtained from the estimator 50. By comparing with the threshold value, the quality of the product R can be determined. Further, for example, when the output value obtained from the estimator 50 indicates a defective portion, the control unit 21 determines the quality of the product R shown in the target image 81 based on the output value obtained from the estimator 50. At the same time, if a defect exists, the location of the defect can be identified.

また、例えば、推定器50から得られる出力値が、製品Rの良否又は欠陥の種別のインデックスを示す場合、検査装置2は、推定器50から得られる出力値と製品Rの良否又は欠陥の種別とを対応付けたテーブル形式等の参照情報(不図示)を記憶部22に保持していてもよい。この場合、制御部21は、この参照情報を参照することにより、推定器50から得られた出力値に応じて、製品Rの良否を判定することができる。 Further, for example, when the output value obtained from the estimator 50 indicates the index of the quality or defect type of the product R, the inspection device 2 determines the output value obtained from the estimator 50 and the quality or defect type of the product R. Reference information (not shown) such as a table format associated with may be stored in the storage unit 22. In this case, the control unit 21 can determine the quality of the product R according to the output value obtained from the estimator 50 by referring to this reference information.

以上により、制御部21は、学習済みの推定器50を利用して、抽出した1又は複数の特徴83に基づいて、対象画像81に写る製品Rに欠陥が含まれるか否かを検査することができる。製品Rの外観検査が完了すると、制御部21は、次のステップS204に処理を進める。 As described above, the control unit 21 uses the trained estimator 50 to inspect whether or not the product R shown in the target image 81 contains a defect based on the extracted one or a plurality of features 83. Can be done. When the visual inspection of the product R is completed, the control unit 21 proceeds to the next step S204.

(ステップS204)
ステップS204では、制御部21は、出力部214として動作し、ステップS203により製品Rの良否を検査した結果に関する情報を出力する。
(Step S204)
In step S204, the control unit 21 operates as the output unit 214, and outputs information regarding the result of inspecting the quality of the product R in step S203.

製品Rの良否を検査した結果の出力形式は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。例えば、制御部21は、製品Rの良否を検査した結果をそのまま出力装置25に出力してもよい。また、ステップS203において、製品Rに欠陥があると判定した場合、制御部21は、欠陥を発見したことを知らせるための警告を本ステップS204の出力処理として行ってもよい。また、制御部21は、本ステップS204の出力処理として、製品Rの良否を検査した結果に応じた所定の制御処理を実行してもよい。具体例として、製品の搬送を行う製造ラインに検査装置2が接続されている場合、製品Rに欠陥があると判定したときに、制御部21は、欠陥のある製品Rを欠陥のない製品とは異なる経路で搬送する指令を製造ラインに送信する処理を本ステップS204の出力処理として行ってもよい。 The output format as a result of inspecting the quality of the product R does not have to be particularly limited, and may be appropriately selected depending on the embodiment. For example, the control unit 21 may output the result of inspecting the quality of the product R to the output device 25 as it is. Further, when it is determined in step S203 that the product R has a defect, the control unit 21 may issue a warning for notifying that the defect has been found as the output process of this step S204. Further, the control unit 21 may execute a predetermined control process according to the result of inspecting the quality of the product R as the output process of this step S204. As a specific example, when the inspection device 2 is connected to the production line for transporting the product, when the control unit 21 determines that the product R has a defect, the control unit 21 regards the defective product R as a defect-free product. May perform the process of transmitting the command to be conveyed by different routes to the production line as the output process of this step S204.

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

[特徴]
以上のとおり、本実施形態では、推定器50は、学習画像61から直接的に製品Rの良否を推定するのではなく、ステップS102及びS103により学習画像61から導出された第1特徴71及び第2特徴73の少なくともいずれかから製品Rの良否を推定するように訓練される。上記ステップS102及びS103において、第1特徴71及び第2特徴73は、学習画像61そのものよりも次元が低くなるように導出されるため、第1特徴71及び第2特徴73の有する情報量は学習画像61の情報量よりも少なくなる。そのため、学習画像61から直接的に製品Rの良否を推定するように訓練されるケースと比較して、本実施形態では、推定器50に対する入力データの情報量を抑えることができるため、推定器50の構成を単純化することができる。例えば、推定器50を構成する各層(501、503、505)に含まれるニューロンの数を低減することができる。
[feature]
As described above, in the present embodiment, the estimator 50 does not directly estimate the quality of the product R from the training image 61, but the first feature 71 and the first feature 71 and the first feature derived from the training image 61 in steps S102 and S103. 2 Trained to estimate the quality of product R from at least one of feature 73. In steps S102 and S103, the first feature 71 and the second feature 73 are derived so as to have a lower dimension than the training image 61 itself, so that the amount of information possessed by the first feature 71 and the second feature 73 is learned. It is less than the amount of information in the image 61. Therefore, as compared with the case where the training image 61 is trained to directly estimate the quality of the product R, in the present embodiment, the amount of information of the input data for the estimator 50 can be suppressed, so that the estimator can be suppressed. The configuration of 50 can be simplified. For example, the number of neurons contained in each layer (501, 503, 505) constituting the estimator 50 can be reduced.

加えて、本実施形態では、ステップS103により、学習画像61より抽出された第1特徴71に拡大処理を適用することで、第1特徴71とは異なる第2特徴73が生成される。これにより、製品Rの良否を導出するための特徴のバリエーションを豊富にすることができる。すなわち、ステップS104における機械学習に利用する訓練データの件数を増やすことができる。そのため、ステップS101で取得される学習データセット60(学習画像61)の件数が少なくても、欠陥推定の一定の精度を担保するのに十分な件数の学習データを用意することができる。したがって、本実施形態に係る推定器生成装置1によれば、推定器50の計算コストを低減しつつ、学習画像61の件数が比較的に少なくても、画像に写る製品Rの良否を高精度に推定可能な推定器50を構築することができる。また、本実施形態に係る検査装置2は、この推定器50を利用することで、ステップS201~204による製品Rの外観検査を高精度かつ高速に実施することができる。 In addition, in the present embodiment, by applying the enlargement processing to the first feature 71 extracted from the learning image 61 in step S103, the second feature 73 different from the first feature 71 is generated. As a result, it is possible to increase the variation of features for deriving the quality of the product R. That is, the number of training data used for machine learning in step S104 can be increased. Therefore, even if the number of learning data sets 60 (learning image 61) acquired in step S101 is small, it is possible to prepare a sufficient number of learning data to ensure a certain accuracy of defect estimation. Therefore, according to the estimator generator 1 according to the present embodiment, while reducing the calculation cost of the estimator 50, even if the number of learning images 61 is relatively small, the quality of the product R reflected in the image is highly accurate. It is possible to construct an estimator 50 that can be estimated. Further, the inspection device 2 according to the present embodiment can perform the appearance inspection of the product R in steps S201 to 204 with high accuracy and high speed by using the estimator 50.

§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にはいわゆる多層構造の全結合ニューラルネットワークが用いられている。しかしながら、推定器50を構成するニューラルネットワークの構造及び種類は、このような例に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。例えば、推定器50には、畳み込み層及びプーリング層を備える畳み込みニューラルネットワークが利用されてよい。
<4.1>
In the above embodiment, the estimator 50 uses a so-called multi-layered fully connected neural network. However, the structure and type of the neural network constituting the estimator 50 are not limited to such an example, and may be appropriately selected depending on the embodiment. For example, the estimator 50 may utilize a convolutional neural network including a convolutional layer and a pooling layer.

また、上記実施形態では、推定器50を構成する学習モデルとしてニューラルネットワークが用いられている。しかしながら、推定器50を構成する学習モデルは、各特徴(71、73)から製品Rの良否を推定するための機械学習を実施可能であれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。 Further, in the above embodiment, a neural network is used as a learning model constituting the estimator 50. However, the type of the learning model constituting the estimator 50 may not be particularly limited as long as machine learning for estimating the quality of the product R can be performed from each feature (71, 73). It may be appropriately selected according to the embodiment.

<4.2>
上記実施形態では、学習結果データ125は、推定器50の構成を示す情報を含んでいる。しかしながら、学習結果データ125の構成は、このような例に限定されなくてもよく、実施の形態に応じて適宜決定されてよい。例えば、利用するニューラルネットワークの構成が各装置で共通化されている場合、学習結果データ125は、ニューラルネットワークの構成を示す情報を含んでいなくてもよい。
<4.2>
In the above embodiment, the learning result data 125 includes information indicating the configuration of the estimator 50. However, the configuration of the learning result data 125 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 to be used is common to each device, the learning result data 125 does not have to include information indicating the configuration of the neural network.

<4.3>
上記実施形態に係る各情報処理(図6及び図10)について、実施の形態に応じて、適宜、ステップの省略、置換、及び追加が可能である。例えば、上記実施形態に係る推定器生成装置1は、各学習データセット60の学習画像61から抽出された1又は複数の第1特徴71を直接的に取得してもよい。この場合、推定器生成装置1のソフトウェア構成において、抽出部112は省略されてよい。加えて、上記情報処理において、ステップS102の処理は省略されてよい。
<4.3>
For each information processing (FIGS. 6 and 10) according to the above embodiment, steps can be omitted, replaced, and added as appropriate according to the embodiment. For example, the estimator generator 1 according to the above embodiment may directly acquire one or a plurality of first features 71 extracted from the training image 61 of each training data set 60. In this case, the extraction unit 112 may be omitted in the software configuration of the estimator generator 1. In addition, in the above information processing, the process of step S102 may be omitted.

図11は、本変形例に係る推定器生成装置1Aのソフトウェア構成の一例を模式的に例示する。抽出部112が省略される点を除き、本変形例に係る推定器生成装置1Aのハードウェア構成及びソフトウェア構成は、上記実施形態に係る推定器生成装置1と同じであってよい。本変形例に係る推定器生成装置1Aは、1又は複数の第1特徴71を直接的に取得する点及び上記ステップS102を省略する点を除き、上記実施形態に係る推定器生成装置1と同様に動作してもよい。 FIG. 11 schematically illustrates an example of the software configuration of the estimator generator 1A according to this modification. The hardware configuration and software configuration of the estimator generator 1A according to the present modification may be the same as the estimator generator 1 according to the above embodiment, except that the extraction unit 112 is omitted. The estimator generator 1A according to the present modification is the same as the estimator generator 1 according to the embodiment, except that one or a plurality of first features 71 are directly acquired and the step S102 is omitted. May work with.

すなわち、ステップS101では、推定器生成装置1Aの制御部は、データ取得部111として動作し、製品Rを写した学習画像から抽出された1又は複数の第1特徴71及びラベル63の組み合わせによりそれぞれ構成された複数の学習データセット60Aを取得する。ステップS103では、制御部は、拡大処理部113として動作し、各学習データセット60Aに含まれる1又は複数の第1特徴71に拡大処理を適用することで、1又は複数の第1特徴71とは異なる1又は複数の第2特徴73を生成する。ステップS104では、制御部は、学習処理部114として動作し、機械学習を行うことで、1又は複数の第1特徴71及び1又は複数の第2特徴73の少なくともいずれかから、対応するラベル63と一致するように、学習画像に写る製品Rに含まれる欠陥の種別を推定するように訓練された推定器50を構築する。ステップS105では、制御部は、保存処理部115として動作し、構築された学習済みの推定器50に関する情報を学習結果データ125として保存する。これにより、本変形例に係る推定器生成装置1Aは、上記実施形態と同様に、製品Rの外観検査に利用可能な学習済みの推定器50を生成することができる。 That is, in step S101, the control unit of the estimator generator 1A operates as the data acquisition unit 111, and the combination of one or a plurality of first features 71 and the label 63 extracted from the learning image of the product R, respectively. Acquire a plurality of configured training data sets 60A. In step S103, the control unit operates as the expansion processing unit 113, and by applying the expansion processing to one or a plurality of first features 71 included in each learning data set 60A, the control unit becomes one or a plurality of first features 71. Produces one or more different second features 73. In step S104, the control unit operates as the learning processing unit 114 and performs machine learning to perform machine learning from at least one of the one or a plurality of first features 71 and one or a plurality of second features 73, and the corresponding label 63. The estimator 50 trained to estimate the type of defect contained in the product R shown in the training image is constructed so as to be consistent with. In step S105, the control unit operates as the storage processing unit 115, and stores the information about the constructed trained estimator 50 as the learning result data 125. As a result, the estimator generator 1A according to the present modification can generate a trained estimator 50 that can be used for visual inspection of the product R, as in the above embodiment.

<4.4>
上記実施形態では、画像に写る製品Rの外観検査を実施する場面に本発明を適用した例を示している。しかしながら、本発明の適用範囲は、このような外観検査の例に限られる訳ではない。本発明は、画像に写る対象物の何らかの属性を推定するあらゆる場面に適用可能である。製品Rの写る画像から対象物の写る画像に検査システム100で取り扱う画像を変更することで、対象物の写る画像から何らかの属性を推定する推定システムを適宜構成することができる。
<4.4>
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 some attribute of an object in an image is estimated. By changing the image handled by the inspection system 100 from the image of the product R to the image of the object, an estimation system for estimating some attribute from the image of the object can be appropriately configured.

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

すなわち、本変形例に係る推定器生成装置1Bは、対象物RBを写した学習画像61B、及び対象物RBの属性を示すラベル63Bの組み合わせによりそれぞれ構成された複数の学習データセット60Bを取得する。次に、推定器生成装置1Bは、各学習データセット60Bに含まれる学習画像61Bから1又は複数の第1特徴71Bを抽出する。推定器生成装置1Bは、抽出された1又は複数の第1特徴71Bに拡大処理を適用することで、1又は複数の第1特徴71Bとは異なる1又は複数の第2特徴73Bを生成する。そして、推定器生成装置1Bは、機械学習を行うことで、1又は複数の第1特徴71B及び1又は複数の第2特徴73Bの少なくともいずれかから、対応するラベル63Bと一致するように、学習画像61Bに写る対象物RBの属性を推定するように訓練された推定器50Bを構築する。なお、推定器50Bの構成は、上記実施形態に係る推定器50と同じであってよい。 That is, the estimator generator 1B according to this modification acquires a plurality of learning data sets 60B each composed of a combination of a learning image 61B showing the object RB and a label 63B indicating the attributes of the object RB. .. Next, the estimator generator 1B extracts one or a plurality of first features 71B from the training image 61B included in each training data set 60B. The estimator generator 1B generates one or more second features 73B different from the one or more first features 71B by applying the enlargement processing to the extracted one or more first features 71B. Then, the estimator generator 1B learns from at least one of one or a plurality of first features 71B and one or a plurality of second features 73B so as to match the corresponding label 63B by performing machine learning. Construct an estimator 50B trained to estimate the attributes of the object RB shown in image 61B. The configuration of the estimator 50B may be the same as that of the estimator 50 according to the above embodiment.

また、推定器生成装置1Bは、上記<4.3>と同様に、1又は複数の第1特徴71Bを直接的に取得してもよい。すなわち、推定器生成装置1Bは、対象物RBを写した学習画像61Bから抽出された1又は複数の第1特徴71B、及び対象物RBの属性を示すラベル63Bの組み合わせによりそれぞれ構成された複数の学習データセットを取得してもよい。次に、推定器生成装置1Bは、各学習データセットに含まれる1又は複数の第1特徴71Bに拡大処理を適用することで、1又は複数の第1特徴71Bとは異なる1又は複数の第2特徴73Bを生成してもよい。そして、推定器生成装置1Bは、機械学習を行うことで、1又は複数の第1特徴71B及び1又は複数の第2特徴73Bの少なくともいずれかから、対応するラベル63Bと一致するように、学習画像61Bに写る対象物RBの属性を推定するように訓練された推定器50Bを構築してもよい。 Further, the estimator generator 1B may directly acquire one or a plurality of first features 71B as in the above <4.3>. That is, the estimator generator 1B is composed of a combination of one or a plurality of first features 71B extracted from the learning image 61B showing the object RB, and a label 63B indicating the attribute of the object RB, respectively. You may get a training data set. Next, the estimator generator 1B applies the enlargement processing to the one or a plurality of first features 71B included in each training data set, so that the one or a plurality of first features different from the one or a plurality of first features 71B are used. Two features 73B may be generated. Then, the estimator generator 1B learns from at least one of one or a plurality of first features 71B and one or a plurality of second features 73B so as to match the corresponding label 63B by performing machine learning. An estimator 50B trained to estimate the attributes of the object RB shown in image 61B may be constructed.

図13は、本変形例に係る推定装置2Bのソフトウェア構成の一例を模式的に例示する。推定器生成装置1Bは、構築された学習済みの推定器50Bに関する情報を学習結果データ125Bとして保存する。本変形例に係る推定装置2Bは、当該学習結果データ125Bを適宜取得する。ステップS201では、推定装置2Bの制御部は、画像取得部211として動作し、対象物RBを写した対象画像81Bを取得する。ステップS202では、制御部は、抽出部212として動作し、対象画像81Bから1又は複数の特徴83Bを抽出する。 FIG. 13 schematically illustrates an example of the software configuration of the estimation device 2B according to this modification. The estimator generator 1B stores the information about the constructed estimator 50B as the learning result data 125B. The estimation device 2B according to this modification appropriately acquires the learning result data 125B. In step S201, the control unit of the estimation device 2B operates as the image acquisition unit 211 to acquire the target image 81B in which the object RB is copied. In step S202, the control unit operates as the extraction unit 212 and extracts one or a plurality of features 83B from the target image 81B.

ステップS203では、推定装置2Bの制御部は、推定部213Bとして動作し、学習済みの推定器50Bを利用して、抽出した1又は複数の特徴83Bに基づいて、対象画像81Bに写る対象物RBの属性を推定する。具体的に、制御部は、学習結果データ125Bを参照して、学習済みの推定器50Bの設定を行う。続いて、制御部は、抽出した1又は複数の特徴83Bを学習済みの推定器50Bに入力し、学習済みの推定器50Bの演算処理を実行する。この演算処理の結果、推定装置2Bの制御部は、対象物RBの属性を推定した結果に対応する出力値を学習済みの推定器50Bから取得する。ステップS204では、推定装置2Bの制御部は、対象物RBの属性を推定した結果に関する情報を出力する。これにより、本変形例に係る推定システム100Bは、対象物RBを写した画像から何らかの属性を推定するように構成される。 In step S203, the control unit of the estimation device 2B operates as the estimation unit 213B, and the object RB reflected in the target image 81B is based on the extracted one or a plurality of features 83B using the trained estimator 50B. Estimate the attributes of. Specifically, the control unit sets the trained estimator 50B with reference to the learning result data 125B. Subsequently, the control unit inputs the extracted one or a plurality of features 83B to the trained estimator 50B, and executes the arithmetic processing of the trained estimator 50B. As a result of this arithmetic processing, the control unit of the estimation device 2B acquires an output value corresponding to the result of estimating the attribute of the object RB from the trained estimator 50B. In step S204, the control unit of the estimation device 2B outputs information regarding the result of estimating the attribute of the object RB. As a result, the estimation system 100B according to the present modification is configured to estimate some attributes from the image of the object RB.

なお、対象物RBは、何らかの属性を推定する対象となり得るものであれば、その種類は、特に限定されなくてもよく、実施の形態に応じて適宜選択されてよい。対象物RBは、例えば、上記外観検査の対象となる製品、人物、人物の身体部位(例えば、顔等)等であってよい。また、推定する対象となる対象物の「属性」は、対象物の何らかの性質に関するものであればよく、推定器により推定可能な対象物のあらゆる種類の属性を含んでもよい。対象物が人物の顔である場合、判定の対象となる属性は、例えば、表情の種別、顔のパーツ(器官を含む)の位置(特定の器官同士の相対位置関係を含む)、顔のパーツの形状、顔のパーツの色、顔のパーツの状態(開度、角度等)、その顔を所有する個人の属性等であってよい。また、対象物が人物の身体である場合、判定の対象となる属性は、例えば、身体のポーズ等であってよい。対象物が作業対象のワークである場合、判定の対象となる属性は、例えば、ワークの位置、姿勢等であってよい。 The type of the object RB may not be particularly limited as long as it can be a target for estimating some attribute, 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, the "attribute" of the object to be estimated may be any property related to any property of the object, and may include all kinds of attributes of the object that can be estimated by the estimator. When the object is a person's face, the attributes to be judged are, for example, the type of facial expression, the position of facial parts (including organs) (including the relative positional relationship between specific organs), and facial parts. It may be the shape of the face, the color of the facial part, the state of the facial part (opening, angle, etc.), the attribute of the individual who owns the face, and the like. When the object is the body of a person, the attribute to be determined may be, for example, a pose of the body. When the object is a work to be worked on, the attributes to be determined may be, for example, the position and posture of the work.

100…検査システム、
1…推定器生成装置、
11…制御部、12…記憶部、13…通信インタフェース、
14…入力装置、15…出力装置、16…ドライブ、
111…データ取得部、112…抽出部、
113…拡大処理部、114…学習処理部、
115…保存処理部、
121…推定器生成プログラム、125…学習結果データ、
2…検査装置、
21…制御部、22…記憶部、23…通信インタフェース、
24…入力装置、25…出力装置、26…ドライブ、
27…外部インタフェース、
211…画像取得部、212…抽出部、
213…検査部、214…出力部、
221…検査プログラム、
50…推定器、
501…入力層、503…中間(隠れ)層、505…出力層、
60…学習データセット、
61…学習画像、63…ラベル、
71…第1特徴、73…第2特徴、
81…対象画像、83…特徴、
91・92…記憶媒体
100 ... Inspection system,
1 ... Estimator generator,
11 ... control unit, 12 ... storage unit, 13 ... communication interface,
14 ... input device, 15 ... output device, 16 ... drive,
111 ... Data acquisition unit, 112 ... Extraction unit,
113 ... Enlargement processing unit, 114 ... Learning processing unit,
115 ... Preservation processing unit,
121 ... Estimator generation program, 125 ... Learning result data,
2 ... Inspection equipment,
21 ... Control unit, 22 ... Storage unit, 23 ... Communication interface,
24 ... Input device, 25 ... Output device, 26 ... Drive,
27 ... External interface,
211 ... Image acquisition unit, 212 ... Extraction unit,
213 ... Inspection unit, 214 ... Output unit,
221 ... Inspection program,
50 ... Estimator,
501 ... Input layer, 503 ... Intermediate (hidden) layer, 505 ... Output layer,
60 ... Learning dataset,
61 ... learning image, 63 ... label,
71 ... 1st feature, 73 ... 2nd feature,
81 ... Target image, 83 ... Features,
91/92 ... Storage medium

Claims (8)

外観検査の対象となる製品を写した学習画像、及び前記製品に含まれる欠陥の種別を示すラベルの組み合わせによりそれぞれ構成された複数の学習データセットを取得するデータ取得部と、
前記各学習データセットに含まれる前記学習画像から1又は複数の第1特徴を抽出する抽出部と、
抽出された前記1又は複数の第1特徴に拡大処理を適用することで、前記1又は複数の第1特徴とは異なる1又は複数の第2特徴を生成する拡大処理部と、
機械学習を行うことで、前記1又は複数の第1特徴及び前記1又は複数の第2特徴の少なくともいずれかから、対応するラベルと一致するように、前記学習画像に写る前記製品に含まれる前記欠陥の種別を推定するように訓練された推定器を構築する学習処理部と、
を備え、
前記1又は複数の第1特徴はそれぞれ、前記学習画像よりもサイズの小さい特徴画像として抽出され、
前記複数の第1特徴それぞれには重みが設定されており、
前記拡大処理を適用することは、前記複数の第1特徴のサイズを一致させること、設定された前記重みを、サイズを一致させた前記複数の第1特徴それぞれにかけること、及び重み付けされた前記複数の第1特徴を合成すること、を含む、
推定器生成装置。
A data acquisition unit that acquires a plurality of learning data sets composed of a combination of a learning image showing a product to be visually inspected and a label indicating the type of defect contained in the product, and a data acquisition unit.
An extraction unit that extracts one or a plurality of first features from the training image included in each training data set.
An enlargement processing unit that generates one or more second features different from the one or more first features by applying the enlargement processing to the extracted one or more first features.
By performing machine learning, the product included in the product to be reflected in the training image so as to match the corresponding label from at least one of the one or more first features and the one or more second features. A learning processor that builds an estimator trained to estimate the type of defect,
Equipped with
Each of the one or a plurality of first features is extracted as a feature image having a size smaller than that of the learning image.
Weights are set for each of the plurality of first features.
Applying the enlargement process means matching the sizes of the plurality of first features, applying the set weights to each of the plurality of size-matched first features, and weighting the first feature. Including synthesizing multiple first features,
Estimator generator.
前記拡大処理を適用することは、前記1又は複数の第1特徴に対して幾何学的な変換を適用すること、を含む、
請求項1に記載の推定器生成装置。
Applying the enlargement process includes applying a geometric transformation to the one or more first features.
The estimator generator according to claim 1.
前記幾何学的な変換は、平行移動、回転移動、反転、又はこれら組み合わせである、
請求項2に記載の推定器生成装置。
The geometric transformation is translation, rotational movement, inversion, or a combination thereof.
The estimator generator according to claim 2.
外観検査の対象となる製品を写した対象画像を取得する画像取得部と、
取得した前記対象画像から特徴を抽出する抽出部と、
請求項1から3のいずれか1項に記載の推定器生成装置と、
前記推定器生成装置により構築された前記推定器を利用し、抽出した前記特徴に基づいて、前記対象画像に写る前記製品に欠陥が含まれるか否かを検査する検査部と、
前記検査の結果に関する情報を出力する出力部と、
を備える、
検査システム
An image acquisition unit that acquires a target image of a product that is subject to visual inspection,
An extraction unit that extracts features from the acquired target image,
The estimator generator according to any one of claims 1 to 3, and the estimator generator.
Using the estimator constructed by the estimator generator, an inspection unit that inspects whether or not the product shown in the target image contains defects based on the extracted features, and an inspection unit.
An output unit that outputs information about the results of the inspection, and
To prepare
Inspection system .
コンピュータが、
外観検査の対象となる製品を写した学習画像、及び前記製品に含まれる欠陥の種別を示すラベルの組み合わせによりそれぞれ構成された複数の学習データセットを取得するステップと、
前記各学習データセットに含まれる前記学習画像から1又は複数の第1特徴を抽出するステップと、
抽出された前記1又は複数の第1特徴に拡大処理を適用することで、前記1又は複数の第1特徴とは異なる1又は複数の第2特徴を生成するステップと、
機械学習を行うことで、前記1又は複数の第1特徴及び前記1又は複数の第2特徴の少なくともいずれかから、対応するラベルと一致するように、前記学習画像に写る前記製品に含まれる前記欠陥の種別を推定するように訓練された推定器を構築するステップと、
を実行し、
前記1又は複数の第1特徴はそれぞれ、前記学習画像よりもサイズの小さい特徴画像として抽出され、
前記複数の第1特徴それぞれには重みが設定されており、
前記拡大処理を適用することは、前記複数の第1特徴のサイズを一致させること、設定された前記重みを、サイズを一致させた前記複数の第1特徴それぞれにかけること、及び重み付けされた前記複数の第1特徴を合成すること、を含む、
推定器生成方法。
The computer
A step of acquiring a plurality of training data sets composed of a combination of a training image showing a product to be visually inspected and a label indicating the type of defect contained in the product, and a step of acquiring a plurality of training data sets.
A step of extracting one or more first features from the training image included in each training data set, and
A step of generating one or more second features different from the one or more first features by applying the expansion process to the extracted one or more first features.
By performing machine learning, the product included in the product to be reflected in the training image so as to match the corresponding label from at least one of the one or more first features and the one or more second features. Steps to build an estimator trained to estimate the type of defect,
And run
Each of the one or a plurality of first features is extracted as a feature image having a size smaller than that of the learning image.
Weights are set for each of the plurality of first features.
Applying the enlargement process means matching the sizes of the plurality of first features, applying the set weights to each of the plurality of size-matched first features, and weighting the first feature. Including synthesizing multiple first features,
Estimator generation method.
コンピュータに、
外観検査の対象となる製品を写した学習画像、及び前記製品に含まれる欠陥の種別を示すラベルの組み合わせによりそれぞれ構成された複数の学習データセットを取得するステップと、
前記各学習データセットに含まれる前記学習画像から1又は複数の第1特徴を抽出するステップと、
抽出された前記1又は複数の第1特徴に拡大処理を適用することで、前記1又は複数の第1特徴とは異なる1又は複数の第2特徴を生成するステップと、
機械学習を行うことで、前記1又は複数の第1特徴及び前記1又は複数の第2特徴の少なくともいずれかから、対応するラベルと一致するように、前記学習画像に写る前記製品に含まれる前記欠陥の種別を推定するように訓練された推定器を構築するステップと、
を実行させ、
前記1又は複数の第1特徴はそれぞれ、前記学習画像よりもサイズの小さい特徴画像として抽出され、
前記複数の第1特徴それぞれには重みが設定されており、
前記拡大処理を適用することは、前記複数の第1特徴のサイズを一致させること、設定された前記重みを、サイズを一致させた前記複数の第1特徴それぞれにかけること、及び重み付けされた前記複数の第1特徴を合成すること、を含む、
推定器生成プログラム。
On the computer
A step of acquiring a plurality of training data sets composed of a combination of a training image showing a product to be visually inspected and a label indicating the type of defect contained in the product, and a step of acquiring a plurality of training data sets.
A step of extracting one or more first features from the training image included in each training data set, and
A step of generating one or more second features different from the one or more first features by applying the expansion process to the extracted one or more first features.
By performing machine learning, the product included in the product to be reflected in the training image so as to match the corresponding label from at least one of the one or more first features and the one or more second features. Steps to build an estimator trained to estimate the type of defect,
To execute,
Each of the one or a plurality of first features is extracted as a feature image having a size smaller than that of the learning image.
Weights are set for each of the plurality of first features.
Applying the enlargement process means matching the sizes of the plurality of first features, applying the set weights to each of the plurality of size-matched first features, and weighting the first feature. Including synthesizing multiple first features,
Estimator generator.
対象物を写した学習画像、及び前記対象物の属性を示すラベルの組み合わせによりそれぞれ構成された複数の学習データセットを取得するデータ取得部と、
前記各学習データセットに含まれる前記学習画像から1又は複数の第1特徴を抽出する抽出部と、
抽出された前記1又は複数の第1特徴に拡大処理を適用することで、前記1又は複数の第1特徴とは異なる1又は複数の第2特徴を生成する拡大処理部と、
機械学習を行うことで、前記1又は複数の第1特徴及び前記1又は複数の第2特徴の少なくともいずれかから、対応するラベルと一致するように、前記学習画像に写る前記対象物の属性を推定するように訓練された推定器を構築する学習処理部と、
を備え、
前記1又は複数の第1特徴はそれぞれ、前記学習画像よりもサイズの小さい特徴画像として抽出され、
前記複数の第1特徴それぞれには重みが設定されており、
前記拡大処理を適用することは、前記複数の第1特徴のサイズを一致させること、設定された前記重みを、サイズを一致させた前記複数の第1特徴それぞれにかけること、及び重み付けされた前記複数の第1特徴を合成すること、を含む、
推定器生成装置。
A data acquisition unit that acquires a plurality of learning data sets each composed of a combination of a learning image showing an object and a label indicating the attribute of the object, and a data acquisition unit.
An extraction unit that extracts one or a plurality of first features from the training image included in each training data set.
An enlargement processing unit that generates one or more second features different from the one or more first features by applying the enlargement processing to the extracted one or more first features.
By performing machine learning, the attributes of the object appearing in the training image can be determined from at least one of the one or more first features and the one or more second features so as to match the corresponding label. A learning processor that builds an estimator trained to estimate,
Equipped with
Each of the one or a plurality of first features is extracted as a feature image having a size smaller than that of the learning image.
Weights are set for each of the plurality of first features.
Applying the enlargement process means matching the sizes of the plurality of first features, applying the set weights to each of the plurality of size-matched first features, and weighting the first feature. Including synthesizing multiple first features,
Estimator generator.
対象物を写した学習画像から抽出された1又は複数の第1特徴、及び前記対象物の属性を示すラベルの組み合わせによりそれぞれ構成された複数の学習データセットを取得するデータ取得部と、
前記各学習データセットに含まれる前記1又は複数の第1特徴に拡大処理を適用することで、前記1又は複数の第1特徴とは異なる1又は複数の第2特徴を生成する拡大処理部と、
機械学習を行うことで、前記1又は複数の第1特徴及び前記1又は複数の第2特徴の少なくともいずれかから、対応するラベルと一致するように、前記学習画像に写る前記対象物の属性を推定するように訓練された推定器を構築する学習処理部と、
を備え、
前記1又は複数の第1特徴はそれぞれ、前記学習画像よりもサイズの小さい特徴画像として抽出され、
前記複数の第1特徴それぞれには重みが設定されており、
前記拡大処理を適用することは、前記複数の第1特徴のサイズを一致させること、設定された前記重みを、サイズを一致させた前記複数の第1特徴それぞれにかけること、及び重み付けされた前記複数の第1特徴を合成すること、を含む、
推定器生成装置。
A data acquisition unit that acquires a plurality of learning data sets each composed of a combination of one or a plurality of first features extracted from a learning image of an object and labels indicating the attributes of the object, and a data acquisition unit.
An expansion processing unit that generates one or a plurality of second features different from the one or a plurality of first features by applying the enlargement processing to the one or a plurality of first features included in each learning data set. ,
By performing machine learning, the attributes of the object appearing in the training image can be determined from at least one of the one or more first features and the one or more second features so as to match the corresponding label. A learning processor that builds an estimator trained to estimate,
Equipped with
Each of the one or a plurality of first features is extracted as a feature image having a size smaller than that of the learning image.
Weights are set for each of the plurality of first features.
Applying the enlargement process means matching the sizes of the plurality of first features, applying the set weights to each of the plurality of size-matched first features, and weighting the first feature. Including synthesizing multiple first features,
Estimator generator.
JP2018190513A 2018-10-05 2018-10-05 Estimator generator, inspection device, estimator generator method, and estimator generator Active JP7070308B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018190513A JP7070308B2 (en) 2018-10-05 2018-10-05 Estimator generator, inspection device, estimator generator method, and estimator generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018190513A JP7070308B2 (en) 2018-10-05 2018-10-05 Estimator generator, inspection device, estimator generator method, and estimator generator

Publications (2)

Publication Number Publication Date
JP2020060398A JP2020060398A (en) 2020-04-16
JP7070308B2 true JP7070308B2 (en) 2022-05-18

Family

ID=70219553

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018190513A Active JP7070308B2 (en) 2018-10-05 2018-10-05 Estimator generator, inspection device, estimator generator method, and estimator generator

Country Status (1)

Country Link
JP (1) JP7070308B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7581811B2 (en) 2020-12-04 2024-11-13 東洋製罐グループホールディングス株式会社 Image processing system and image processing program
KR102524151B1 (en) * 2020-12-14 2023-04-21 주식회사 아이디알인비전 Labeling learning method of artificial intelligence machine for smart products inspection

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008130865A (en) 2006-11-22 2008-06-05 Fuji Mach Mfg Co Ltd Component suction posture discrimination method and component suction posture discrimination system
US20160163035A1 (en) 2014-12-03 2016-06-09 Kla-Tencor Corporation Automatic Defect Classification Without Sampling and Feature Selection
JP2016109495A (en) 2014-12-03 2016-06-20 タカノ株式会社 Classifier generation device, appearance inspection device, classifier generation method, and program
JP2016168046A (en) 2015-03-09 2016-09-23 学校法人法政大学 Plant disease diagnosis system, plant disease diagnosis method, and program
JP2018005640A (en) 2016-07-04 2018-01-11 タカノ株式会社 Classifying unit generation device, image inspection device, and program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008130865A (en) 2006-11-22 2008-06-05 Fuji Mach Mfg Co Ltd Component suction posture discrimination method and component suction posture discrimination system
US20160163035A1 (en) 2014-12-03 2016-06-09 Kla-Tencor Corporation Automatic Defect Classification Without Sampling and Feature Selection
JP2016109495A (en) 2014-12-03 2016-06-20 タカノ株式会社 Classifier generation device, appearance inspection device, classifier generation method, and program
JP2016168046A (en) 2015-03-09 2016-09-23 学校法人法政大学 Plant disease diagnosis system, plant disease diagnosis method, and program
JP2018005640A (en) 2016-07-04 2018-01-11 タカノ株式会社 Classifying unit generation device, image inspection device, and program

Also Published As

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

Similar Documents

Publication Publication Date Title
US11715190B2 (en) Inspection system, image discrimination system, discrimination system, discriminator generation system, and learning data generation device
CN108416266B (en) A Fast Video Behavior Recognition Method Using Optical Flow to Extract Moving Objects
CN110619618A (en) Surface defect detection method and device and electronic equipment
JP7435303B2 (en) Inspection device, unit selection device, inspection method, and inspection program
JP6844563B2 (en) Inspection equipment, image identification equipment, identification equipment, inspection method, and inspection program
US11348349B2 (en) Training data increment method, electronic apparatus and computer-readable medium
CN111758117B (en) Inspection system, identification system and learning data generation device
JP2020060879A (en) Learning device, image generator, method for learning, and learning program
TWI818367B (en) Method, electronic device, and non-transitory computer-readable storage medium for enhancing image resolution for sequences of 2-d images of additively manufactured products
Gupta et al. Deep learning model for defect analysis in industry using casting images
JP7070308B2 (en) Estimator generator, inspection device, estimator generator method, and estimator generator
JP7059889B2 (en) Learning device, image generator, learning method, and learning program
US11361424B2 (en) Neural network-type image processing device, appearance inspection apparatus and appearance inspection method
CN119131009B (en) Unsupervised defect detection method, system and medium based on multimodal intercalibration
Sol A Sim-to-Real Deformation Classification Pipeline using Data Augmentation and Domain Adaptation
CN114066809B (en) A method and device for detecting soft edge defects of packaging boxes
JP2024141773A (en) Pre-learning device, pre-learning method, and computer program
CN119205712A (en) A method, device, equipment and medium for risk assessment of hydropower station dam
JP2023104488A (en) Machine learning device, machine learning method, machine learning program, inspection device, inspection method, and inspection program
JP2024102439A (en) Learning support device, method for supporting learning, and learning support program
CN118052788A (en) Electric tower detection method and device
JP2021179902A (en) Image inspection device, image inspection method, and learned model creation device
CN116894837A (en) Appearance defect detection method and system
CN116402783A (en) Multi-scale information fusion-based insulator image detection method

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

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210921

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211014

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220308

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220317

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220418

R150 Certificate of patent or registration of utility model

Ref document number: 7070308

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150