JP2024008670A - Machine learning apparatus - Google Patents

Machine learning apparatus Download PDF

Info

Publication number
JP2024008670A
JP2024008670A JP2022110721A JP2022110721A JP2024008670A JP 2024008670 A JP2024008670 A JP 2024008670A JP 2022110721 A JP2022110721 A JP 2022110721A JP 2022110721 A JP2022110721 A JP 2022110721A JP 2024008670 A JP2024008670 A JP 2024008670A
Authority
JP
Japan
Prior art keywords
image data
defective
factor
unit
machine learning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2022110721A
Other languages
Japanese (ja)
Inventor
希一 熊野
Kiichi Kumano
聖司 小島
Seiji Kojima
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.)
JTEKT Corp
Original Assignee
JTEKT 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 JTEKT Corp filed Critical JTEKT Corp
Priority to JP2022110721A priority Critical patent/JP2024008670A/en
Publication of JP2024008670A publication Critical patent/JP2024008670A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a machine learning apparatus capable of saving labor for constructing a learned model.
SOLUTION: A machine learning apparatus 1 comprises an arithmetic processing apparatus 2 and a storage apparatus 3. The storage apparatus 3 comprises: an image data storage unit 20 for storing training image data P1, P2 and test image data P5, P6; a model storage unit 21 for storing a learned model M; and a defective factor training image data storage unit 22 for storing defective factor training image data P3 in which the defective factor training image data P2 labeled as defective is linked with defective factor information including a position of a defective factor 30 as an annotation. The arithmetic processing apparatus 2 comprises: a model generation unit 11; a quality determination unit 12 for determining whether each of the test image data P5, P6 is a non-defective product or a defective product; and an analysis and teaching unit 13 for analyzing an erroneous determination factor based on the defective factor information and teaches a solution according to the erroneous determination factor if a true defective part of the defective product is erroneously determined.
SELECTED DRAWING: Figure 1
COPYRIGHT: (C)2024,JPO&INPIT

Description

本発明は、機械学習装置に関する。 The present invention relates to a machine learning device.

従来、特許文献1(特開2021-174417号公報)に記載されているように、学習用の訓練画像データを機械学習させることによって生成された学習済みモデルにより、検査対象の画像データが良品または不良品であるかを推定して評価する検査システムが知られている。 Conventionally, as described in Patent Document 1 (Japanese Unexamined Patent Application Publication No. 2021-174417), a trained model generated by machine learning training image data is used to determine whether image data to be inspected is a good product or a non-defective product. Inspection systems that estimate and evaluate whether a product is defective are known.

特開2021-174417号公報JP 2021-174417 Publication

学習済みモデルの精度を評価するために、評価用のテスト画像データを用い、テスト画像データが良品または不良品であるかを推定する。このとき、学習済みモデルの判定精度が十分でない場合には、不良品が良品であると誤判定される場合がある。学習済みモデルの判定精度を高めるためには、誤判定された原因を分析し、訓練画像データの追加、再収集等の適切な対策を実施することが求められる。 In order to evaluate the accuracy of the trained model, test image data for evaluation is used to estimate whether the test image data is a good product or a defective product. At this time, if the determination accuracy of the trained model is not sufficient, a defective product may be erroneously determined to be a non-defective product. In order to improve the judgment accuracy of trained models, it is necessary to analyze the causes of erroneous judgments and take appropriate measures such as adding training image data and re-collecting data.

しかし、従来技術によれば、テスト画像データが良品であるか、または不良品であるかが出力されるのみであった。このため、不良品が良品と誤判定された原因を分析することが困難な場合があった。さらに、原因が判明しても、具体的にどのような対策を講じれば判定精度を高めることができるかを検討する必要があるため、学習済みモデルを構築するための労力が増大するという問題があった。 However, according to the prior art, only whether the test image data is a non-defective product or a defective product is output. For this reason, it is sometimes difficult to analyze the cause of a defective product being erroneously determined as a non-defective product. Furthermore, even if the cause is identified, it is still necessary to consider what specific measures can be taken to improve the judgment accuracy, which increases the amount of effort required to build a trained model. there were.

本発明は、かかる課題に鑑みてなされたものであり、学習済みモデルを構築するための労力を省力化できる機械学習装置を提供しようとするものである。 The present invention has been made in view of such problems, and aims to provide a machine learning device that can save labor for constructing a trained model.

本発明の一態様は、
演算処理装置および記憶装置を備えた機械学習装置であって、
前記記憶装置は、
学習用の訓練画像データおよび評価用のテスト画像データを格納する画像データ格納部と、
前記訓練画像データおよび前記テスト画像データを用いて機械学習を行うことにより生成された学習済みモデルを格納するモデル格納部と、
前記訓練画像データのうち不良品とラベルされた不良品訓練画像データに、不良要因の位置を含む不良要因情報をアノテーションとして紐づけられた不良要因訓練画像データを格納する不良要因訓練画像データ格納部と、
を備え、
前記演算処理装置は、
前記訓練画像データおよび前記テスト画像データを用いて前記機械学習を行うことにより前記学習済みモデルを生成するモデル生成部と、
前記学習済みモデルを用いて、良品または不良品とラベルされた前記テスト画像データが、良品または不良品であるかを判定する良否判定部と、
前記良否判定部の判定結果に基づいて、不良品における真不良部位を誤判定した場合に、前記不良要因情報に基づいて誤判定要因を分析し、前記誤判定要因に応じた解決策を教示する分析教示部と、
を備える、機械学習装置にある。
One aspect of the present invention is
A machine learning device comprising an arithmetic processing unit and a storage device,
The storage device is
an image data storage unit that stores training image data for learning and test image data for evaluation;
a model storage unit that stores a learned model generated by performing machine learning using the training image data and the test image data;
A defective factor training image data storage unit that stores defective factor training image data in which defective product training image data labeled as defective among the training image data is linked with defective factor information including the location of the defective factor as an annotation. and,
Equipped with
The arithmetic processing device is
a model generation unit that generates the learned model by performing the machine learning using the training image data and the test image data;
a quality determination unit that uses the trained model to determine whether the test image data labeled as a non-defective product or a defective product is a non-defective product or a defective product;
When a true defective part of a defective product is erroneously determined based on the determination result of the quality determining section, the erroneous determination factor is analyzed based on the defect factor information, and a solution is taught in accordance with the erroneous determination factor. analysis teaching department;
There is a machine learning device equipped with.

本発明の一態様によれば、訓練画像データにどのような対策を施せば、誤判定されたテスト画像データが正しく判定されるようにするかについて知ることができる。これにより、誤判定されたテスト画像データについて、誤判定の原因を推定し、推定された原因から対策を考案するための労力を削減することができる。この結果、全体として、学習済みモデルを構築するための労力を削減することができる。 According to one aspect of the present invention, it is possible to know what countermeasures should be applied to training image data so that test image data that has been incorrectly determined will be correctly determined. This makes it possible to reduce the effort required to estimate the cause of the erroneous determination and to devise countermeasures based on the estimated cause for the erroneously determined test image data. As a result, the overall effort required to construct a trained model can be reduced.

以上のごとく、上記態様によれば、機械学習装置において、学習済みモデルを構築するための労力を省力化できる。 As described above, according to the above aspect, it is possible to save labor for constructing a learned model in a machine learning device.

実施形態1の機械学習装置の構成を示す図である。1 is a diagram showing the configuration of a machine learning device according to a first embodiment; FIG. 実施形態1の機械学習装置の全体的な動作を示すフローチャートである。3 is a flowchart showing the overall operation of the machine learning device according to the first embodiment. 図2におけるS1~S3の動作を説明するための図である。3 is a diagram for explaining the operations of S1 to S3 in FIG. 2. FIG. 図2におけるS4~S5の動作を説明するための図である。FIG. 3 is a diagram for explaining the operations of S4 to S5 in FIG. 2. FIG. 真不良部位が誤判定された場合の説明をするための図である。FIG. 6 is a diagram for explaining a case where a truly defective part is erroneously determined. 解決策1について、教示される内容を説明するための図である。FIG. 3 is a diagram for explaining what is taught regarding solution 1; 解決策1が選択されたときに実行される水増し処理について説明するための図である。FIG. 6 is a diagram for explaining padding processing that is executed when solution 1 is selected. 解決策2について、教示される内容を説明するための図である。FIG. 7 is a diagram for explaining what is taught regarding solution 2. 解決策2が選択されたときに実行される画面分割処理について説明するための図である。FIG. 7 is a diagram for explaining screen splitting processing that is executed when solution 2 is selected. 図9におけるモデルαを例にして、画面分割処理について説明するための図である。10 is a diagram for explaining screen division processing using model α in FIG. 9 as an example. FIG. 解決策3について、教示される内容を説明するための図である。FIG. 7 is a diagram for explaining the content taught regarding Solution 3. 解決策3が選択されたときに実行されるマスキング処理について説明するための図である。FIG. 7 is a diagram for explaining masking processing that is executed when solution 3 is selected. 実施形態2の機械学習装置において、解決策4について、教示される内容について説明するための図である。FIG. 7 is a diagram for explaining what is taught regarding Solution 4 in the machine learning device of Embodiment 2; 実施形態3の機械学習装置の全体的な動作を示すフローチャートである。12 is a flowchart showing the overall operation of the machine learning device according to the third embodiment.

(実施形態1)
1.機械学習装置の概略
本発明に係る機械学習装置は、工作物の良否を検査する検査装置に適用される。検査装置としては、例えば、自動車に用いられるダイキャスト部品等を検査するための検査装置に適用できる。検査装置は、検査対象を撮像した検査画像データの良否判定を行う。例えば、外観検査を行う検査対象において、外観異常の判定を行うことができる。また、例えば、工作物の表面に生成したキズの有無を判定したり、工作物の形状誤差の程度を判定したりすることができる。
(Embodiment 1)
1. Outline of Machine Learning Device The machine learning device according to the present invention is applied to an inspection device that inspects the quality of a workpiece. As an inspection device, it can be applied to, for example, an inspection device for inspecting die-cast parts used in automobiles. The inspection device determines the quality of inspection image data obtained by capturing an image of the inspection object. For example, it is possible to determine whether there is an abnormality in the appearance of an object to be inspected. Furthermore, for example, it is possible to determine the presence or absence of scratches generated on the surface of the workpiece, or to determine the degree of shape error of the workpiece.

本発明の実施形態1に係る機械学習装置1の概略について図1、図3および図4を参照して説明する。図1に示すように本形態に係る機械学習装置1は、演算処理装置2と、記憶装置3と、を備える。機械学習装置1は、入力装置4と、表示装置5と、に接続されている。 An outline of a machine learning device 1 according to Embodiment 1 of the present invention will be described with reference to FIGS. 1, 3, and 4. As shown in FIG. 1, a machine learning device 1 according to the present embodiment includes an arithmetic processing device 2 and a storage device 3. The machine learning device 1 is connected to an input device 4 and a display device 5.

入力装置4は、後述する種々の画像データを、後述する画像データ取得部10に伝達するための入力インターフェースである。入力インターフェースとしては、例えば、カメラ、スキャナ等を採用することができる。また、入力インターフェースとしては、CD、DVD等の外部記憶装置に記憶された画像を読み取るための読み取り装置も例示される。 The input device 4 is an input interface for transmitting various image data, which will be described later, to an image data acquisition unit 10, which will be described later. For example, a camera, a scanner, etc. can be used as the input interface. Further, as the input interface, a reading device for reading images stored in an external storage device such as a CD or a DVD is also exemplified.

表示装置5は、後述する分析教示部13がユーザに教示する内容を表示する。表示装置5としては、例えば、モニタ、印刷装置等を採用することができる。 The display device 5 displays content taught to the user by the analysis teaching section 13, which will be described later. As the display device 5, for example, a monitor, a printing device, etc. can be adopted.

演算処理装置2は、画像データ取得部10と、モデル生成部11と、良否判定部12と、分析教示部13と、不良要因統合画像データ生成部14と、再学習用訓練画像データ生成部15と、を備える。 The arithmetic processing device 2 includes an image data acquisition unit 10 , a model generation unit 11 , a quality determination unit 12 , an analysis teaching unit 13 , a failure factor integrated image data generation unit 14 , and a relearning training image data generation unit 15 and.

画像データ取得部10は、入力装置4と接続されており、入力装置4から、学習用の訓練画像データP1,P2、評価用のテスト画像データP5,P6、および不良要因訓練画像データP3を受け取る(図3および図4参照)。 The image data acquisition unit 10 is connected to the input device 4 and receives training image data P1 and P2 for learning, test image data P5 and P6 for evaluation, and defect factor training image data P3 from the input device 4. (See Figures 3 and 4).

図3に示すように、訓練画像データP1,P2は、良品とラベルされた良品訓練画像データP1、および不良品とラベルされた不良品訓練画像データP2を含む。図4に示すように、テスト画像データP5,P6は、良品とラベルされた良品テスト画像データP5、および不良品とラベルされた不良品テスト画像データP6を含む。 As shown in FIG. 3, the training image data P1 and P2 include good product training image data P1 labeled as a non-defective product and defective product training image data P2 labeled as a defective product. As shown in FIG. 4, the test image data P5 and P6 include test image data P5 of a non-defective product labeled as a non-defective product and test image data P6 of a defective product labeled as a defective product.

図3に示すように、不良要因訓練画像データP3は、不良品訓練画像データP2および不良品テスト画像データP6に、不良要因30の位置を含む不良要因情報がアノテーションとして紐づけられたものである。不良要因訓練画像データP3は、不良品と判断された原因である真不良部位を有する。不良要因30としては、傷、凹凸、寸法不良、歪みが例示される。不良要因訓練画像データP3には、不良要因30の位置、大きさ、形等が画素レベルで紐づけられている。 As shown in FIG. 3, the defective factor training image data P3 is obtained by linking defective product training image data P2 and defective product test image data P6 with defective factor information including the position of the defective factor 30 as an annotation. . The defective factor training image data P3 has a true defective part that is the cause of the defective product. Examples of the defective factors 30 include scratches, irregularities, dimensional defects, and distortions. The position, size, shape, etc. of the defective factor 30 are linked to the defective factor training image data P3 at the pixel level.

図1に示すように、画像データ取得部10は、訓練画像データP1,P2、テスト画像データP5,P6、および不良要因訓練画像データP3を、記憶装置3に送信する。また、画像データ取得部10は、訓練画像データP1,P2およびテスト画像データP5,P6を、モデル生成部11、分析教示部13、および再学習用訓練画像データ生成部15に送信する。また、画像データ取得部10は、不良要因訓練画像データP3を、不良要因統合画像データ生成部14に送信する。 As shown in FIG. 1, the image data acquisition unit 10 transmits training image data P1, P2, test image data P5, P6, and defect factor training image data P3 to the storage device 3. Further, the image data acquisition unit 10 transmits the training image data P1, P2 and the test image data P5, P6 to the model generation unit 11, the analysis teaching unit 13, and the relearning training image data generation unit 15. Further, the image data acquisition section 10 transmits the defect factor training image data P3 to the defect factor integrated image data generation section 14.

モデル生成部11は、訓練画像データP1,P2およびテスト画像データP5,P6を用いて機械学習を行うことにより、公知の方法により学習済みモデルMを生成する(図3参照)。図1に示すように、モデル生成部11は、生成した学習済みモデルMを記憶装置3、および良否判定部12に送信する。 The model generation unit 11 generates a learned model M by a known method by performing machine learning using the training image data P1, P2 and the test image data P5, P6 (see FIG. 3). As shown in FIG. 1, the model generation unit 11 transmits the generated trained model M to the storage device 3 and the quality determination unit 12.

良否判定部12は、学習済みモデルMを用いて、良品テスト画像データP5および不良品テスト画像データP6が、良品または不良品であるかを判定する。良否判定部12は、良品テスト画像データP5および不良品テスト画像データP6についての判定結果を、分析教示部13に送信する。 The quality determining unit 12 uses the learned model M to determine whether the non-defective product test image data P5 and the defective product test image data P6 are non-defective products or defective products. The quality determining unit 12 transmits the determination results regarding the non-defective product test image data P5 and the defective product test image data P6 to the analysis teaching unit 13.

分析教示部13は、良否判定部12の判定結果に基づいて、不良品における真不良部位を誤判定した場合に、不良要因情報に基づいて誤判定要因を分析し、誤判定要因に応じた解決策を教示する。分析教示部13は、少なくとも1つの解決策を教示する。分析教示部13は、解決策を表示装置5に表示させることにより、ユーザに解決策を教示する。分析教示部13は、解決策を再学習用訓練画像データ生成部15に送信する。 When a true defective part of a defective product is erroneously determined based on the determination result of the quality determining section 12, the analysis teaching unit 13 analyzes the erroneous determination factor based on the defective factor information and solves the problem according to the erroneous determination factor. Teach them strategies. The analysis teaching unit 13 teaches at least one solution. The analysis teaching unit 13 teaches the solution to the user by displaying the solution on the display device 5. The analysis teaching unit 13 transmits the solution to the relearning training image data generation unit 15.

不良要因統合画像データ生成部14は、複数の不良要因訓練画像データP3を統合した不良要因統合画像データP4を生成する(図3参照)。不良要因統合画像データP4は、複数の不良要因訓練画像データP3が集積された1枚の画像データである。不良要因統合画像データP4には、1枚の画像データに含まれる画素ごとに、不良要因訓練画像データP3の個数に対する、不良要因訓練画像データP3の不良要因30の発生確率が記録されている。不良要因30の発生確率とは、不良要因30の位置に対応する画素の個数を、全ての画素数で割った値である。 The defective factor integrated image data generation unit 14 generates defective factor integrated image data P4 by integrating a plurality of defective factor training image data P3 (see FIG. 3). The defect factor integrated image data P4 is one piece of image data in which a plurality of defect factor training image data P3 are accumulated. In the defect factor integrated image data P4, the probability of occurrence of the defect factor 30 in the defect factor training image data P3 with respect to the number of defect factor training image data P3 is recorded for each pixel included in one sheet of image data. The probability of occurrence of the defective factor 30 is the value obtained by dividing the number of pixels corresponding to the position of the defective factor 30 by the total number of pixels.

また、不良要因統合画像データP4は、不良要因30の発生確率を、画素レベルでカウントできる。すなわち、不良要因統合画像データP4は、1枚の画像データとして、画素ごとに、不良要因30の位置が存在した不良要因訓練画像データP3の個数が記録されている。端的には、不良要因統合画像データP4には、画像を形成する画素ごとに、不良要因訓練画像データP3において不良要因30が存在したか否かの情報が記録されている。 Furthermore, the failure factor integrated image data P4 can count the probability of occurrence of the failure factor 30 at the pixel level. That is, in the defective factor integrated image data P4, the number of pieces of defective factor training image data P3 in which the position of the defective factor 30 was present is recorded for each pixel as one piece of image data. In short, the defect factor integrated image data P4 records information as to whether or not the defect factor 30 was present in the defect factor training image data P3 for each pixel forming the image.

図1に示すように、不良要因統合画像データ生成部14は、生成した不良要因統合画像データP4を、記憶装置3、分析教示部13、および再学習用訓練画像データ生成部15に送信する。 As shown in FIG. 1, the failure factor integrated image data generation unit 14 transmits the generated failure factor integrated image data P4 to the storage device 3, the analysis teaching unit 13, and the relearning training image data generation unit 15.

再学習用訓練画像データ生成部15は、水増し処理部16と、画像分割処理部17と、マスキング処理部18と、を備える。 The relearning training image data generation section 15 includes an padding processing section 16, an image division processing section 17, and a masking processing section 18.

水増し処理部16は、分析教示部13の分析結果に基づいて、誤判定された真不良部位を含む不良品訓練画像データP2の水増し処理を行い、水増し処理された画像データをモデル生成部11への入力画像データとする。真不良部位とは、不良品テスト画像データP6に含まれる不良要因30を意味する。誤判定された真不良部位とは、良否判定部12が真不良部位を含む不良品を良品と判断した場合における、真不良部位を意味する。 The inflating processing unit 16 performs inflating processing on the defective product training image data P2 including the erroneously determined true defective part based on the analysis result of the analysis teaching unit 13, and sends the inflated image data to the model generation unit 11. Let this be the input image data. The true defective part means the defect factor 30 included in the defective product test image data P6. The erroneously determined true defective portion refers to a true defective portion when the quality determining unit 12 determines that a defective product including the true defective portion is a non-defective product.

画像分割処理部17は、分析教示部13の分析結果に基づいて訓練画像データP1,P2を分割し、分割された画像データをモデル生成部11への入力画像データとする。 The image division processing section 17 divides the training image data P1 and P2 based on the analysis result of the analysis and teaching section 13, and uses the divided image data as input image data to the model generation section 11.

マスキング処理部18は、訓練画像データP1,P2に対して所定の領域をマスキング処理し、マスキング処理された画像データをモデル生成部11への入力画像データとする。 The masking processing unit 18 performs a masking process on a predetermined area of the training image data P1 and P2, and inputs the masked image data to the model generation unit 11.

記憶装置3は、画像データ格納部20と、モデル格納部21と、不良要因訓練画像データ格納部22と、正判定トリミング画像データ格納部23と、不良要因統合画像データ格納部24と、を備える。 The storage device 3 includes an image data storage section 20, a model storage section 21, a defect factor training image data storage section 22, a correct judgment trimming image data storage section 23, and a defect factor integrated image data storage section 24. .

画像データ格納部20は、画像データ取得部10から受信した、訓練画像データP1,P2およびテスト画像データP5,P6を格納する。画像データ格納部20は、訓練画像データP1,P2をモデル生成部11に送信する。また、画像データ格納部20は、テスト画像データP5,P6を、良否判定部12および分析教示部13に送信する。また、画像データ格納部20は、訓練画像データP1,P2およびテスト画像データP5,P6を、再学習用訓練画像データ生成部15に送信する。 The image data storage section 20 stores training image data P1, P2 and test image data P5, P6 received from the image data acquisition section 10. The image data storage section 20 transmits training image data P1 and P2 to the model generation section 11. Further, the image data storage unit 20 transmits the test image data P5 and P6 to the quality determining unit 12 and the analysis teaching unit 13. The image data storage section 20 also transmits the training image data P1, P2 and the test image data P5, P6 to the relearning training image data generation section 15.

モデル格納部21は、モデル生成部11から送信された学習済みモデルMを格納する。モデル格納部21は、学習済みモデルMを良否判定部12に送信する。 The model storage unit 21 stores the trained model M sent from the model generation unit 11. The model storage unit 21 transmits the learned model M to the quality determining unit 12.

不良要因訓練画像データ格納部22は、画像データ取得部10から、不良品訓練画像データP2を受信し、格納する。不良要因訓練画像データ格納部22は、不良品訓練画像データP2を、不良要因統合画像データ生成部14に送信する。 The defect factor training image data storage section 22 receives the defective product training image data P2 from the image data acquisition section 10 and stores it. The defect factor training image data storage section 22 transmits the defective product training image data P2 to the defect factor integrated image data generation section 14.

正判定トリミング画像データ格納部23は、真不良部位が正しく判定されたときの真不良部位を含む正判定トリミング画像データ(図示せず)を格納する。正判定トリミング画像データは、過去に検査装置において画像データに対して良品または不良品の判定が行われた際に、真不良部位が正しく判定されたときの画像データである。 The correct determination trimming image data storage unit 23 stores correct determination trimming image data (not shown) including a true defective part when the true defective part is correctly determined. The correct determination trimming image data is image data when a truly defective part was correctly determined when image data was determined in the past as a non-defective product or a defective product in an inspection apparatus.

正判定トリミング画像データには、過去の検査における真不良部位の位置、大きさ、および形が紐づけられて記録されている。また、正判定トリミング画像データ格納部23に格納された正判定トリミング画像データは、真不良部位が正しく判定されたものであるので、当該正判定トリミング画像データの画像サイズは、当該真不良部位を正しく判定することのできる適切な画像サイズであるといえる。 The position, size, and shape of a truly defective part in past inspections are recorded in association with the correct determination trimming image data. In addition, since the correct judgment trimming image data stored in the correct judgment trimming image data storage unit 23 is the one in which the true defective part has been correctly determined, the image size of the correct judgment trimming image data is such that the true defective part is correctly determined. This can be said to be an appropriate image size that can be determined correctly.

不良要因統合画像データ格納部24は、不良要因統合画像データ生成部14から送信された不良要因統合画像データP4を格納する。不良要因統合画像データ格納部24は、不良要因統合画像データP4を、分析教示部13、および再学習用訓練画像データ生成部15に送信する。 The defective factor integrated image data storage section 24 stores the defective factor integrated image data P4 transmitted from the defective factor integrated image data generating section 14. The failure factor integrated image data storage unit 24 transmits the failure factor integrated image data P4 to the analysis teaching unit 13 and the relearning training image data generation unit 15.

2.機械学習装置1の全体的な動作
続いて、本形態に係る機械学習装置1の全体的な動作について図2を参照して説明する。本形態の機械学習装置1の処理が開始されると、S1にて、入力装置4は訓練画像データP1,P2、テスト画像データP5,P6、および不良要因訓練画像データP3を取得する。入力装置4は、訓練画像データP1,P2、テスト画像データP5,P6、および不良要因訓練画像データP3を画像データ取得部10に送信する。画像データ取得部10は、訓練画像データP1,P2およびテスト画像データP5,P6を画像データ格納部20に送信する。画像データ格納部20は訓練画像データP1,P2およびテスト画像データP5,P6を格納する。画像データ取得部10は、訓練画像データP1,P2をモデル生成部11に送信する。また、画像データ取得部10は、不良要因訓練画像データP3を不良要因訓練画像データ格納部22に送信する。不良要因訓練画像データ格納部22は、不良要因訓練画像データP3を格納する。
2. Overall Operation of Machine Learning Device 1 Next, the overall operation of the machine learning device 1 according to this embodiment will be described with reference to FIG. 2. When the process of the machine learning device 1 of this embodiment is started, in S1, the input device 4 acquires training image data P1, P2, test image data P5, P6, and defect factor training image data P3. The input device 4 transmits training image data P1, P2, test image data P5, P6, and defect factor training image data P3 to the image data acquisition unit 10. The image data acquisition section 10 transmits training image data P1, P2 and test image data P5, P6 to the image data storage section 20. The image data storage unit 20 stores training image data P1, P2 and test image data P5, P6. The image data acquisition unit 10 transmits training image data P1 and P2 to the model generation unit 11. Further, the image data acquisition unit 10 transmits the defective factor training image data P3 to the defective factor training image data storage unit 22. The defective factor training image data storage unit 22 stores defective factor training image data P3.

S2にて、モデル生成部11は、訓練画像データP1,P2を用いて機械学習を行うことにより学習済みモデルMを生成する。モデル生成部11は、学習済みモデルMをモデル格納部21に送信する。モデル格納部21は学習済みモデルMを格納する。 In S2, the model generation unit 11 generates a learned model M by performing machine learning using the training image data P1 and P2. The model generation unit 11 transmits the learned model M to the model storage unit 21. The model storage unit 21 stores the trained model M.

S3にて、不良要因統合画像データ生成部14は、不良要因訓練画像データ格納部22から不良要因訓練画像データP3を取得し、不良要因訓練画像データP3から不良要因統合画像データP4を生成する。不良要因統合画像データ生成部14は、不良要因統合画像データP4を不良要因統合画像データ格納部24に送信する。不良要因統合画像データ格納部24は、不良要因統合画像データP4を格納する。 In S3, the defective factor integrated image data generation unit 14 acquires the defective factor training image data P3 from the defective factor training image data storage unit 22, and generates the defective factor integrated image data P4 from the defective factor training image data P3. The defect factor integrated image data generation section 14 transmits the defect factor integrated image data P4 to the defect factor integrated image data storage section 24. The defect factor integrated image data storage section 24 stores defect factor integrated image data P4.

S3にて、良否判定部12は、モデル格納部21から学習済みモデルMを取得する。 In S3, the quality determination unit 12 acquires the trained model M from the model storage unit 21.

S4にて、良否判定部12は、画像データ格納部20からテスト画像データP5,P6を取得する。 In S4, the quality determining section 12 obtains test image data P5 and P6 from the image data storage section 20.

S5にて、良否判定部12は、学習済みモデルMを用いて、良品または不良品とラベルされたテスト画像データP5,P6が、良品または不良品であるかを判定する。良否判定部12は、判定結果を分析教示部13に送信する。 In S5, the quality determining unit 12 uses the learned model M to determine whether the test image data P5 and P6 labeled as non-defective or defective are non-defective or defective. The quality determining section 12 transmits the determination result to the analysis teaching section 13.

S6にて、分析教示部13は、良否判定部12から判定結果を取得する。分析教示部13は、不良要因訓練画像データP3から不良要因訓練画像データP3を取得する。また、分析教示部13は、正判定トリミング画像データ格納部23から、正判定トリミング画像データを取得する。また、分析教示部13は、不良要因統合画像データ格納部24から不良要因統合画像データP4を取得する。 In S6, the analysis teaching unit 13 acquires the determination result from the quality determining unit 12. The analysis teaching unit 13 acquires defective factor training image data P3 from the defective factor training image data P3. The analysis teaching unit 13 also acquires correct determination trimming image data from the correct determination trimming image data storage unit 23 . Furthermore, the analysis teaching section 13 acquires defective factor integrated image data P4 from the defective factor integrated image data storage section 24.

分析教示部13は、良否判定部12の判定結果に基づいて、不良品における真不良部位を誤判定した場合に、不良要因情報に基づいて誤判定要因を分析し、誤判定要因に応じた解決策を導出する。 When a true defective part of a defective product is erroneously determined based on the determination result of the quality determining section 12, the analysis teaching unit 13 analyzes the erroneous determination factor based on the defective factor information and solves the problem according to the erroneous determination factor. derive a strategy.

分析教示部13は、導出された解決策を、表示装置5に表示させる。 The analysis teaching unit 13 causes the display device 5 to display the derived solution.

表示装置5に表示された解決策がユーザによって見られた後、ユーザによって、解決策が採用されるか否かが判断される。これにより、いずれかの解決策が、ユーザによって選択される。 After the user views the solution displayed on the display device 5, the user determines whether or not the solution is adopted. Accordingly, one of the solutions is selected by the user.

S7にて、再学習用訓練画像データ生成部15は、画像データ格納部20から訓練画像データP1,P2を取得する。次に、再学習用訓練画像データ生成部15は、選択された解決策に応じて、不良要因訓練画像データ格納部22から不良要因訓練画像データP3を取得したり、正判定トリミング画像データ格納部23から正判定トリミング画像データを取得したり、または、不良要因統合画像データ格納部24から不良要因統合画像データP4を取得したりする。 In S7, the relearning training image data generation unit 15 acquires training image data P1 and P2 from the image data storage unit 20. Next, the relearning training image data generating section 15 acquires the defective factor training image data P3 from the defective factor training image data storage section 22 or acquires the defective factor training image data P3 from the correct judgment trimming image data storage section depending on the selected solution. The correct determination trimming image data is obtained from 23, or the defective factor integrated image data P4 is obtained from the defective factor integrated image data storage section 24.

再学習用訓練画像データ生成部15は、選択された解決策に基づいて、再学習用の訓練画像データP1,P2を生成する。 The relearning training image data generation unit 15 generates relearning training image data P1 and P2 based on the selected solution.

以上により、機械学習装置1の全体的な動作が終了する。 With the above, the overall operation of the machine learning device 1 is completed.

3.機械学習装置1の具体的な動作
続いて、本形態に係る機械学習装置1の具体的な動作について説明する。まず、上記のS1~S3における動作について、図3を参照して説明する。図3に示すように、良品とラベルされた複数の良品訓練画像データP1と、不良品とラベルされた複数の不良品訓練画像データP2から、1つの学習済みモデルMが生成される。また、複数の不良要因訓練画像データP3から1つの不良要因統合画像データP4が生成される。
3. Specific Operations of Machine Learning Device 1 Next, specific operations of the machine learning device 1 according to this embodiment will be described. First, the operations in S1 to S3 above will be explained with reference to FIG. As shown in FIG. 3, one trained model M is generated from a plurality of good product training image data P1 labeled as non-defective products and a plurality of defective product training image data P2 labeled as defective products. Moreover, one defective factor integrated image data P4 is generated from the plurality of defective factor training image data P3.

次に上記のS4~S5における動作について図4~図6を参照して説明する。図4に示すように、良否判定部12は、良品とラベルされた良品テスト画像データP5と、不良品とラベルされた不良品テスト画像データP6とを取得する。良否判定部12は、生成された学習済みモデルMに基づいて、良品テスト画像データP5および不良品テスト画像データP6について、良品であるかまたは不良品であるかを判定する。 Next, the operations in S4 to S5 described above will be explained with reference to FIGS. 4 to 6. As shown in FIG. 4, the quality determination unit 12 acquires non-defective product test image data P5 labeled as a non-defective product and defective product test image data P6 labeled as a defective product. The quality determining unit 12 determines whether the non-defective product test image data P5 and the defective product test image data P6 are non-defective products or defective products based on the generated learned model M.

良否判定部12が、良品テスト画像データP5および不良品テスト画像データP6に対してなす判定は下記のとおりである。
・判定A(真陰性):良品テスト画像データP5が良品であると判定される。この判定は正しいので正判定である。良品が、良品と正しく判定されているので問題はない。
・判定B(偽陽性):良品テスト画像データP5が、偽不良部位に基づいて不良品であると判定される。この判定は誤っているので誤判定である。しかし、製造の観点から見ると、単に歩留まりが低下するだけであり、真正の不良品が市場に流通する事態を招くわけではない。したがって、本形態においては問題視しない。
・判定C(第1真陽性):不良品テスト画像データP6について、真不良部位が正しく認識されて不良品であると判定される。この判定は正しいので正判定である。不良品が、不良品と正しく判定されているので問題はない。
・判定D(第2真陽性):図5に示すように、不良品テスト画像データP6について、真不良部位ではなく偽不良部位に基づいて、不良品であると判定される。不良品を不良品であると判定しており、判定自体は正しいので正判定である。しかし、このような判定を行った学習済みモデルMを使用していると、真不良部位が看過された不良品が市場に流通する可能性が生じる。したがって、本形態では、当該判定を、真不良部位を誤判定した場合として、対策が必要な場合として取り上げる。
・判定E(偽陽性):図5に示すように、不良品テスト画像データP6について、真不良部位を認識せず、良品であると判定される。この判定は誤っているので誤判定である。また、上記の判定Dと同様に、真不良部位が看過された不良品が市場に流通する可能性が生じる。したがって、本形態では、当該判定を、真不良部位を誤判定した場合として、対策が必要な場合として取り上げる。
The determination that the quality determining unit 12 makes on the non-defective product test image data P5 and the defective product test image data P6 is as follows.
-Determination A (true negative): It is determined that the non-defective product test image data P5 is a non-defective product. Since this judgment is correct, it is a correct judgment. There is no problem because the non-defective products are correctly determined as non-defective products.
- Judgment B (false positive): The non-defective product test image data P5 is determined to be a defective product based on the false defective part. This judgment is incorrect and is therefore an erroneous judgment. However, from a manufacturing standpoint, this simply reduces yield and does not result in genuine defective products being distributed on the market. Therefore, this is not considered a problem in this embodiment.
- Judgment C (first true positive): Regarding the defective product test image data P6, the true defective part is correctly recognized and it is determined that the product is defective. Since this judgment is correct, it is a correct judgment. There is no problem because the defective product is correctly determined to be defective.
- Determination D (second true positive): As shown in FIG. 5, the defective product test image data P6 is determined to be a defective product based on the false defective region rather than the true defective region. The defective product is determined to be a defective product, and the determination itself is correct, so the determination is correct. However, if a trained model M that has made such a determination is used, there is a possibility that defective products whose true defective parts have been overlooked may be distributed on the market. Therefore, in this embodiment, this determination is treated as a case where a truly defective part is erroneously determined and a countermeasure is required.
- Judgment E (false positive): As shown in FIG. 5, the defective product test image data P6 is determined to be a non-defective product without recognizing a true defective part. This judgment is incorrect and is therefore an erroneous judgment. Further, similar to the above-described determination D, there is a possibility that a defective product with a truly defective part overlooked will be distributed in the market. Therefore, in this embodiment, this determination is treated as a case where a truly defective part is erroneously determined and a countermeasure is required.

ただし、図5に示した不良品テスト画像データP6の例は、判定Dおよび判定Eの説明の便宜のために用いたものであり、以降の説明内容を限定するものではない。 However, the example of defective product test image data P6 shown in FIG. 5 is used for convenience of explanation of determination D and determination E, and is not intended to limit the content of the subsequent explanation.

上記のように、製造現場において最も懸念されるのは、工作物Wに生じた真不良部位が認識されないことである。このため、図4に示すように、本形態では、上記の判定DおよびEがなされた不良品テスト画像データP6が、真不良部位が誤判定された場合として抽出される。ただし、判定Bのように、良品テスト画像データP5が、偽不良部位に基づいて不良品であると判定された場合が抽出される構成としてもよい。 As mentioned above, the biggest concern at the manufacturing site is that the true defective portion of the workpiece W is not recognized. Therefore, as shown in FIG. 4, in this embodiment, the defective product test image data P6 for which the above determinations D and E have been made are extracted as a case in which a true defective part has been erroneously determined. However, like determination B, a configuration may be adopted in which a case where the non-defective product test image data P5 is determined to be a defective product based on a false defective part is extracted.

良否判定部12は、抽出された不良品テスト画像データP6について、判定の根拠となる部位が着目された頻度を示すクラスアクティベーションマップP8(或いは、ヒートマップ、ローカリゼーションマップ)を作成する(図6参照)。クラスアクティベーションマップP8においては、画素ごとに、良否判定部12が着目した着目度数が記憶されている。クラスアクティベーションマップP8においては、着目度数がトーンの濃淡として表現されている。作成されたクラスアクティベーションマップP8に対して、真不良部位がラベリングされる。 The quality determination unit 12 creates a class activation map P8 (or heat map, localization map) indicating the frequency at which the parts that serve as the basis for determination are focused on the extracted defective product test image data P6 (FIG. 6). reference). In the class activation map P8, the frequency of attention focused by the quality determining unit 12 is stored for each pixel. In the class activation map P8, the frequency of interest is expressed as tone shading. True defective parts are labeled with respect to the created class activation map P8.

分析教示部13は、不良品における真不良部位を誤判定した場合に、不良要因情報に基づいて、真不良部位を誤判定した誤判定要因を分析し、誤判定要因に応じた解決策を教示する。解決策は一つでもよいし、2つ以上の複数でもよい。本形態では、3つの解決策1~3が教示される例について説明する。 When a true defective part of a defective product is erroneously determined, the analysis teaching unit 13 analyzes the erroneous determination factor that led to the erroneous determination of the true defective part based on the defect factor information, and teaches a solution according to the erroneous determination factor. do. There may be one solution, or there may be two or more solutions. In this embodiment, an example will be described in which three solutions 1 to 3 are taught.

4.解決策1
解決策1について図6~図7を参照して説明する。分析教示部13は、良否判定部12から、クラスアクティベーションマップP8を取得する。また、分析教示部13は、良否判定部12により誤判定されたテスト画像データP5,P6である誤判定テスト画像データP7における最大着目度数Nmaxと、誤判定テスト画像データP7において誤判定された真不良部位における着目度数Nと、を取得する(図6参照)。
4. Solution 1
Solution 1 will be explained with reference to FIGS. 6 and 7. The analysis teaching unit 13 acquires the class activation map P8 from the quality determining unit 12. In addition, the analysis teaching unit 13 calculates the maximum frequency of interest Nmax in the false judgment test image data P7, which is the test image data P5 and P6 incorrectly judged by the pass/fail judgment unit 12, and the true The frequency of attention N in the defective region is obtained (see FIG. 6).

着目度数Nについて詳細に説明する。分析教示部13は、誤判定テスト画像データP7と、不良要因訓練画像データP4に紐づけられた不良要因情報と、に基づいて、誤判定テスト画像データP7における真不良部位を取得する。次に、分析教示部13は、誤判定テスト画像データP7において誤判定された真不良部位における着目度数Nを取得する。 The degree of interest N will be explained in detail. The analysis teaching unit 13 acquires a true defective part in the false determination test image data P7 based on the false determination test image data P7 and the failure factor information linked to the failure cause training image data P4. Next, the analysis teaching unit 13 acquires the frequency of interest N in the true defective part that is erroneously determined in the erroneously determined test image data P7.

図6(a)には、真不良部位が誤判定された不良品テスト画像データP6から作成されたクラスアクティベーションマップP8が示されている。 FIG. 6(a) shows a class activation map P8 created from defective product test image data P6 in which a true defective part has been erroneously determined.

クラスアクティベーションマップP8には、真不良部位(N=5)とラベルされた四角形(以下、N5領域という)と、真不良部位(N=10)とラベルされた四角形(以下、N10領域という)と、偽不良部位(Nmax=50)とラベルされた多角形(以下、N50領域)が記載されている。 The class activation map P8 includes a rectangle labeled as a true defective part (N=5) (hereinafter referred to as the N5 area) and a rectangle labeled as a true defective part (N=10) (hereinafter referred to as the N10 area). and a polygon (hereinafter referred to as N50 region) labeled as a false defective region (Nmax=50).

上記したN=5、およびN=10は、上記した着目度数Nが、それぞれ5、および10であることを示す。また、Nmax=50は、上記した最大着目度数Nmaxが50であることを示す。ただし、N、およびNmaxの数字については、上記の数字に限定されない。 The above-mentioned N=5 and N=10 indicate that the above-mentioned degree of attention N is 5 and 10, respectively. Further, Nmax=50 indicates that the above-mentioned maximum degree of attention Nmax is 50. However, the numbers N and Nmax are not limited to the above numbers.

N5領域内には、不良要因30として傷が存在している。この傷は真不良部位である。しかし、本形態においては、N5領域内の傷について、良否判定部12は認識していなかった。すなわち、N5領域内の傷については、真不良部位が誤判定されている。 In the N5 region, there is a scratch as a defective factor 30. This scratch is a genuine defective part. However, in this embodiment, the quality determining unit 12 did not recognize the scratches in the N5 area. That is, the flaw in the N5 area is incorrectly determined to be a true defective part.

N10領域内には不良要因30である傷が存在している。この傷は真不良部位である。本形態においてはN10領域内の傷について、良否判定部12は認識していた。すなわち、N10領域の傷については、真不良部位が真不良部位であると正しく判定されている。 In the N10 region, there is a flaw which is a defective factor 30. This scratch is a genuine defective part. In this embodiment, the quality determining unit 12 recognized the scratches within the N10 area. That is, for the flaw in the N10 area, it is correctly determined that the true defective part is the true defective part.

N50領域内には傷が存在しない。本形態においては、良否判定部12は、N50領域に傷があると認識し、不良品であると判定していた。すなわち、N50領域の傷については、偽不良部位に基づいて不良品と判定されているので、真不良部位が誤判定されている。 There are no scratches within the N50 region. In this embodiment, the quality determining unit 12 recognized that there was a flaw in the N50 area and determined that the product was defective. That is, since the flaw in the N50 area is determined to be a defective product based on the false defective part, the true defective part is erroneously determined.

図6(b)に示すように、分析教示部13は、最大着目度数Nmax=50と、真不良部位における着目度数N=5,10との差である不足着目度数ΔNを算出する。N5領域については、ΔNは45であり、N10領域については、ΔNは40である。なお念のため、N50領域については、Nmax=50との差になるので、ΔNは0となる。 As shown in FIG. 6(b), the analysis teaching unit 13 calculates an insufficient focused frequency ΔN, which is the difference between the maximum focused frequency Nmax=50 and the focused frequencies N=5, 10 in the true defective part. For the N5 region, ΔN is 45, and for the N10 region, ΔN is 40. As a precaution, in the N50 region, ΔN is 0 because it is the difference from Nmax=50.

分析教示部13は、算出されたΔNに基づいて、訓練画像データP1,P2のうちの不良品訓練画像データP2の数量不足が、真不良部位を誤判定した誤判定要因であると分析する。詳細には、分析教示部13は、算出されたΔNに基づいて、訓練画像データP1,P2のうち、誤判定された真不良部位を含む不良品訓練画像データP2の数量不足が、真不良部位を誤判定した誤判定要因であると分析する。 Based on the calculated ΔN, the analysis and teaching unit 13 analyzes that the insufficient quantity of the defective product training image data P2 among the training image data P1 and P2 is the cause of the erroneous determination of a truly defective part. In detail, based on the calculated ΔN, the analysis and teaching unit 13 determines that, among the training image data P1 and P2, the lack of quantity of the defective product training image data P2 that includes the erroneously determined true defective part is due to the true defective part. Analyze this as the cause of the misjudgment.

図6(c)に示すように、分析教示部13は、不足着目度数ΔNに基づき得られた真不良部位における最適着目度数Nbestを算出する。本形態においては、N5領域のNbestは50であり、N10領域のNbestは50である。なお念のため、N50領域におけるNbestは50である。 As shown in FIG. 6(c), the analysis teaching unit 13 calculates the optimum focus frequency Nbest for the true defective region obtained based on the insufficient focus frequency ΔN. In this embodiment, Nbest in the N5 region is 50, and Nbest in the N10 region is 50. As a precaution, Nbest in the N50 region is 50.

分析教示部13は、不足着目度数ΔN、および、Nbestの少なくとも一つを解決策のための情報として、表示装置5に表示させ、ユーザに教示する。 The analysis teaching unit 13 displays at least one of the insufficient attention frequency ΔN and Nbest as information for a solution on the display device 5 and instructs the user.

解決策1がユーザによって選択された場合、水増し処理部16は、誤判定された真不良部位を含む訓練画像データP1,P2を水増し処理する。訓練画像データP1,P2を水増しする個数は、不足着目度数ΔNに基づいてユーザが決定した任意の個数でもよいし、Nbestとして教示された個数でもよい。 When solution 1 is selected by the user, the padding processing unit 16 pads the training image data P1 and P2 that include the erroneously determined true defective part. The number of training image data P1 and P2 to be padded may be an arbitrary number determined by the user based on the insufficient focus frequency ΔN, or may be a number taught as Nbest.

図7(a)に示すように、水増し処理部16は、不良品訓練画像データP2、および良品訓練画像データP1を画像データ格納部20から取得する。 As shown in FIG. 7A, the padding processing unit 16 acquires defective product training image data P2 and non-defective product training image data P1 from the image data storage unit 20.

図7(b)に示すように、水増し処理部16は、分析教示部13の分析結果に基づいて、不良品訓練画像データP2から、真不良部位に対応する位置に形成されている真不良部位を含む領域を切り出す。切り出される範囲は、真不良部位を含んで、真不良部位よりも広い領域である。 As shown in FIG. 7(b), based on the analysis result of the analysis and teaching unit 13, the padding processing unit 16 calculates the true defective part formed at the position corresponding to the true defective part from the defective product training image data P2. Extract the area containing. The cut out range includes the true defective part and is wider than the true defective part.

図7(b)に示すように、水増し処理部16は、切り出された領域を、良品訓練画像データP1に貼り付ける。良品訓練画像データP1のうち、切り出された領域が貼り付けられる位置は特に限定されない。例えば、切り出された領域は、不良品訓練画像データP2または不良品テスト画像データP6に真不良部位が生じていた位置またはその位置の近傍に貼り付けてもよいし、不良要因統合画像データP4において不良要因30の発生確率が比較的に高い位置に貼り付けてもよいし、クラスアクティベーションマップP8において着目度数Nが比較的に小さな位置に貼り付けてもよい。 As shown in FIG. 7(b), the padding processing unit 16 pastes the cut out area to the non-defective training image data P1. Of the non-defective training image data P1, the position where the cut out area is pasted is not particularly limited. For example, the cut out area may be pasted at or near the position where the true defective part has occurred in the defective product training image data P2 or the defective product test image data P6, or in the defective factor integrated image data P4. It may be pasted at a position where the probability of occurrence of the failure factor 30 is relatively high, or it may be pasted at a position where the frequency of interest N is relatively small in the class activation map P8.

図7(c)に示すように、水増し処理部16は、切り出された領域が貼り付けられた良品訓練画像データP1を水増し処理する。具体的には、切り出された領域の真不良部位を、任意の角度で回転させたり、任意の位置にシフトさせたり、任意の倍率で拡大または縮小させたりする。これにより、複数の、新たな不良品訓練画像データP2が作成される。ただし、水増し処理において、真不良部位を変形させたりしてもよい。 As shown in FIG. 7C, the padding processing unit 16 pads the good quality training image data P1 to which the cut out region has been pasted. Specifically, the truly defective part in the cut out area is rotated at an arbitrary angle, shifted to an arbitrary position, and enlarged or reduced at an arbitrary magnification. As a result, a plurality of new defective product training image data P2 are created. However, in the padding process, the truly defective portion may be deformed.

5.解決策2
解決策2について図8~図10を参照して説明する。図8に示すように、分析教示部13は、画像データ格納部20から、真不良部位を誤判定された誤判定テスト画像データP7を取得する。また、分析教示部13は、不良要因統合画像データ格納部24から、不良要因統合画像データP4を取得する。
5. Solution 2
Solution 2 will be explained with reference to FIGS. 8 to 10. As shown in FIG. 8, the analysis and teaching unit 13 acquires the false determination test image data P7 in which a truly defective part has been falsely determined from the image data storage unit 20. Further, the analysis teaching unit 13 acquires defect factor integrated image data P4 from the defect factor integrated image data storage unit 24.

分析教示部13は、誤判定テスト画像データP7のうち、誤判定された真不良部位の位置を取得する。分析教示部13は、不良要因統合画像データP4のうち、誤判定テスト画像データP7において誤判定された真不良部位に対応する位置を特定する。 The analysis teaching unit 13 acquires the position of the erroneously determined true defective part from the erroneously determined test image data P7. The analysis and teaching unit 13 specifies a position corresponding to a true defective part that has been erroneously determined in the erroneously determined test image data P7, in the defective factor integrated image data P4.

分析教示部13は、不良要因統合画像データP4のうち、誤判定テスト画像データP7において誤判定された真不良部位に対応する位置に生成された、不良要因群31を含む領域を切り出す。本形態では、分析教示部13は、3種類の、大きさの異なる領域を切り出している。ただし、切り出される領域の個数は、1つ、または2つでもよく、4つ以上でもよい。 The analysis and teaching unit 13 cuts out, from the defective factor integrated image data P4, an area including the defective factor group 31, which is generated at a position corresponding to the true defective part incorrectly determined in the false determination test image data P7. In this embodiment, the analysis teaching unit 13 cuts out three types of regions with different sizes. However, the number of regions to be cut out may be one, two, or four or more.

上記の不良要因群31とは、不良要因統合画像データP4において、連続または近接して配置される複数の不良要因30による、まとまりをいう。換言すると、不良要因群31は、不良品訓練画像データP2の生成に供された複数の不良要因訓練画像データP3に含まれる不良要因30が累積されたものである。 The defective factor group 31 mentioned above refers to a group of a plurality of defective factors 30 arranged consecutively or closely in the defective factor integrated image data P4. In other words, the defective factor group 31 is an accumulation of defective factors 30 included in the plurality of defective factor training image data P3 used to generate the defective product training image data P2.

分析教示部13は、不良要因統合画像データP4の全画像サイズに対する、不良要因統合画像データP4における不良要因30を含む局所画像サイズの割合を算出する。なお、上記の局所画像サイズは、不良品テスト画像データP6において誤判定された真不良部位に対応する位置を含む1つの不良要因群31の画像サイズである。 The analysis teaching unit 13 calculates the ratio of the local image size including the defect factor 30 in the defect factor integrated image data P4 to the total image size of the defect factor integrated image data P4. Note that the above-mentioned local image size is the image size of one defective factor group 31 that includes a position corresponding to a true defective part that is erroneously determined in the defective product test image data P6.

分析教示部13は、正判定トリミング画像データ格納部23から、誤判定テスト画像データP7において誤判定された真不良部位に対応する位置に不良要因30が記録された正判定トリミング画像データを取得する。分析教示部13は、当該正判定トリミング画像データから、正判定トリミング画像データの全画像サイズに対する、正判定トリミング画像データにおける真不良部位の局所画像サイズの割合を算出する。 The analysis teaching unit 13 acquires the correct judgment trimming image data in which the defect factor 30 is recorded at the position corresponding to the true defective part incorrectly judged in the incorrect judgment test image data P7 from the correct judgment trimming image data storage unit 23. . The analysis teaching unit 13 calculates, from the correct judgment trimmed image data, the ratio of the local image size of the true defective part in the correct judgment trimmed image data to the total image size of the correct judgment trimmed image data.

分析教示部13は、正判定トリミング画像データの全画像サイズに対する、正判定トリミング画像データにおける真不良部位の局所画像サイズの割合と、不良要因統合画像データP4の全画像サイズに対する、不良要因統合画像データP4における不良要因30を含む局所画像サイズの割合と、に基づいて、不良品テスト画像データP6の全画像サイズに対する、誤判定された真不良部位の局所画像サイズの割合が不適であることが、真不良部位が誤判定された誤判定要因であると分析する。 The analysis teaching unit 13 calculates the proportion of the local image size of the true defective part in the correct judgment trimmed image data to the total image size of the correct judgment trimmed image data, and the defect factor integrated image with respect to the total image size of the defective factor integrated image data P4. Based on the ratio of the local image size including the failure factor 30 in the data P4, it is determined that the ratio of the local image size of the incorrectly determined true defective part to the total image size of the defective product test image data P6 is inappropriate. , it is analyzed that the true defective part is the cause of the erroneous determination.

換言すると、分析教示部13は、正判定トリミング画像データに基づいて、不良品テスト画像データP6における全画像サイズに対する局所画像サイズの割合が不適であることが、真不良部位が誤判定された誤判定要因であると分析する。 In other words, the analysis and teaching unit 13 determines that the ratio of the local image size to the total image size in the defective product test image data P6 is inappropriate based on the correct determination trimmed image data. Analyze it as a determining factor.

分析教示部13は、正判定トリミング画像データの全画像サイズに対する、正判定トリミング画像データにおける真不良部位の局所画像サイズの割合に基づいて、良否判定部12が真不良部位を適切に認識できる全画像サイズを決定する。分析教示部13は、決定された全画像サイズに基づいて、機械学習に用いる訓練画像データP1,P2の適切全画像サイズを、表示装置5に表示させることにより、ユーザに教示する。 The analysis teaching unit 13 determines the size of the total area that allows the pass/fail judgment unit 12 to appropriately recognize the true defective part based on the ratio of the local image size of the true defective part in the correct judgment trimmed image data to the total image size of the correct judgment trimmed image data. Determine image size. Based on the determined total image size, the analysis teaching unit 13 teaches the user the appropriate total image size of the training image data P1 and P2 used for machine learning by displaying it on the display device 5.

解決策2がユーザによって選択された場合、図9に示すように、画像分割処理部17は、分析教示部13の分析結果に基づいて、1つ、または複数の訓練画像データP1,P2を分割する。図9では、不良品訓練画像データP2が画像分割処理される例を示す。なお、良品訓練画像データP1が画像分割処理されてもよい。画像分割処理部17は、分割された不良品訓練画像データP2を、適切全画像サイズに拡大または縮小させる。本形態では、分割された不良品訓練画像データP2の例として、モデルα、モデルβ、モデルγを例示した。ただし、分割される画像の領域は、上記のモデルα~γに限定されない。 When solution 2 is selected by the user, as shown in FIG. do. FIG. 9 shows an example in which the defective product training image data P2 is subjected to image division processing. Note that the non-defective training image data P1 may be subjected to image division processing. The image division processing unit 17 enlarges or reduces the divided defective product training image data P2 to an appropriate total image size. In this embodiment, model α, model β, and model γ are illustrated as examples of the divided defective product training image data P2. However, the regions of the image to be divided are not limited to the above models α to γ.

画像分割処理部17は、適切全画像サイズに拡大または縮小された画像データを、水増しする。図10に、モデルαを例にして、水増し処理について説明する。 The image division processing unit 17 pads the image data that has been enlarged or reduced to an appropriate total image size. In FIG. 10, the padding process will be explained using model α as an example.

図10に示すように、不良品訓練画像データP2から、適切全画像サイズに拡大または縮小された画像データが切り出される。画像分割処理部17は、当該画像データの真不良部位を、任意の角度で回転させたり、任意の位置にシフトさせたり、任意の形状に変形させたり、任意の倍率で拡大または縮小させたりする。これにより、複数の、新たな不良品訓練画像データP2が作成される。 As shown in FIG. 10, image data enlarged or reduced to an appropriate total image size is cut out from the defective product training image data P2. The image division processing unit 17 rotates the true defective part of the image data at an arbitrary angle, shifts it to an arbitrary position, transforms it into an arbitrary shape, and enlarges or reduces it at an arbitrary magnification. . As a result, a plurality of new defective product training image data P2 are created.

画像分割処理部17は、モデルαに基づいて水増しされた一組の画像データを、モデル生成部11に送信する。モデル生成部11は、モデルαに基づいて機械学習を行うことにより、一つの学習済みモデルMを生成する。同様にして、モデルβに基づいて1つの学習済みモデルMが生成され、モデルγに基づいて1つの学習済みモデルMが生成される。つまり、モデル生成部11は、画像分割処理部17により分割された各モデルに対応して、学習済みモデルMを生成する。 The image division processing unit 17 transmits a set of image data padded based on the model α to the model generation unit 11. The model generation unit 11 generates one learned model M by performing machine learning based on the model α. Similarly, one trained model M is generated based on model β, and one trained model M is generated based on model γ. That is, the model generation unit 11 generates a trained model M corresponding to each model divided by the image division processing unit 17.

6.解決策3
解決策3について図11~図12を参照して説明する。図11に示すように、分析教示部13は、不良要因統合画像データ格納部24から、不良要因統合画像データP4を取得する。分析教示部13は、不良要因統合画像データP4において複数の不良要因30を含む不良要因領域32を取得する。図11において、不良要因領域32は、不良要因統合画像データP4中に3つの四角形で示されている。
6. Solution 3
Solution 3 will be explained with reference to FIGS. 11 and 12. As shown in FIG. 11, the analysis and teaching section 13 acquires defect factor integrated image data P4 from the defect factor integrated image data storage section 24. The analysis teaching unit 13 acquires a failure factor area 32 including a plurality of failure factors 30 in the failure factor integrated image data P4. In FIG. 11, the defect cause area 32 is shown as three squares in the defect cause integrated image data P4.

不良要因領域32は、ユーザにより指定される。不良要因領域32の位置、大きさ、形状は、不良要因30の位置、形状、大きさに基づいて任意に設定される。本形態では、不良要因領域32は四角形で指定されたが、三角形、五角形等の多角形でもよいし、円形状、長円形状、トラック形状等でもよく、任意の形状を採用できる。不良要因領域32の個数は、1つ、2つ、または4つ以上でもよい。 The defect cause area 32 is designated by the user. The position, size, and shape of the defective cause area 32 are arbitrarily set based on the position, shape, and size of the defective cause 30. In this embodiment, the failure cause area 32 is specified as a quadrilateral, but it may be a polygon such as a triangle or a pentagon, or may be a circle, an ellipse, a track, or any other shape. The number of failure factor areas 32 may be one, two, or four or more.

分析教示部13は、良否判定部12により真不良部位が誤判定された誤判定テスト画像データP7を取得する。分析教示部13は、不良要因領域32がラベルされた不良要因統合画像データP4と、誤判定テスト画像データP7と、に基づいて、誤判定テスト画像データP7において着目すべきでない部位が含まれることが、真不良部位が誤判定された誤判定要因であると分析する。 The analysis and teaching unit 13 acquires the false determination test image data P7 in which the quality determination unit 12 has erroneously determined a truly defective part. The analysis and teaching unit 13 determines, based on the defect factor integrated image data P4 labeled with the defect factor region 32 and the false judgment test image data P7, that the false judgment test image data P7 includes a part that should not be focused on. However, it is analyzed that the true defective part is the cause of the erroneous determination.

分析教示部13は、不良要因領域32を除く領域をマスキング領域40と指定する。分析教示部13は、誤判定テスト画像データP7に対してマスキング領域40をマスキング処理した、マスキング済み画像データP9を生成する。分析教示部13は、マスキング済み画像データP9を、表示装置5に表示させることにより、ユーザに教示する。これにより、分析教示部13は、訓練画像データP1,P2に対するマスキング領域40を解決策の情報としてユーザに教示する。 The analysis and teaching unit 13 designates an area excluding the defect cause area 32 as a masking area 40 . The analysis teaching unit 13 generates masked image data P9 in which the masking region 40 is subjected to masking processing on the false determination test image data P7. The analysis teaching unit 13 teaches the user the masked image data P9 by displaying it on the display device 5. Thereby, the analysis teaching unit 13 teaches the user the masking area 40 for the training image data P1 and P2 as solution information.

解決策3がユーザによって選択された場合、図12に示すように、マスキング処理部18は、不良要因統合画像データ格納部24から、不良要因統合画像データP4を取得する。マスキング処理部18は、不良要因統合画像データP4において複数の不良要因30を含む不良要因領域32を取得する。 When solution 3 is selected by the user, as shown in FIG. 12, the masking processing section 18 acquires the defect factor integrated image data P4 from the defect factor integrated image data storage section 24. The masking processing unit 18 acquires a defective cause area 32 including a plurality of defective causes 30 in the defective factor integrated image data P4.

マスキング処理部18は、画像データ格納部20から、良品訓練画像データP1および不良品訓練画像データP2を取得する。マスキング処理部18は、良品訓練画像データP1および不良品訓練画像データP2に対して、不良要因領域32を除く領域をマスキング処理する。これにより、マスキング処理部18は、良品訓練画像データP1および不良品訓練画像データP2にマスキング処理が施された、マスキング済み画像データP9を生成する。良品訓練画像データP1から生成されたマスキング済み画像データP9、および不良品訓練画像データP2から生成されたマスキング済み画像データP9は、それぞれ、新たな訓練画像データP1,P2として、モデル生成部11への入力画像データとされる。 The masking processing unit 18 acquires the good product training image data P1 and the defective product training image data P2 from the image data storage unit 20. The masking processing unit 18 performs masking processing on the non-defective product training image data P1 and the defective product training image data P2, excluding the defective cause region 32. Thereby, the masking processing unit 18 generates masked image data P9 in which the masking process is performed on the good product training image data P1 and the defective product training image data P2. The masked image data P9 generated from the non-defective training image data P1 and the masked image data P9 generated from the defective training image data P2 are sent to the model generation unit 11 as new training image data P1 and P2, respectively. input image data.

7.本形態の作用効果
本形態によれば、分析教示部13が誤判定要因に応じた解決策を教示するので、ユーザは、誤判定テスト画像データP7が正しく判定されるようなるための解決策について知ることができる。これにより、誤判定テスト画像データP7について、誤判定の原因を推定し、推定された原因から対策を考案するための労力を削減することができる。この結果、全体として、学習済みモデルMを構築するための労力を削減することができる。
7. Effects of this embodiment According to this embodiment, the analysis teaching unit 13 teaches a solution according to the cause of the erroneous determination, so the user can learn about the solution for correctly determining the erroneous determination test image data P7. You can know. Thereby, it is possible to reduce the effort required to estimate the cause of the misjudgment regarding the misjudgment test image data P7 and devise countermeasures based on the estimated cause. As a result, the effort required to construct the trained model M can be reduced as a whole.

本形態によれば、複数の解決策が教示されるので、ユーザは、教示された複数の解決策のいずれかを選択すればよい。これにより、学習済みモデルMを構築するための労力をより削減できる。 According to this embodiment, since a plurality of solutions are taught, the user only has to select one of the plurality of solutions taught. Thereby, the effort required to construct the trained model M can be further reduced.

不良要因統合画像データP4には、1枚の画像データに、不良要因30の分布状態が視覚化されている。これにより、学習済みモデルMを改善するための解決策を案出する際に不良要因30の分布状態を考慮する場合において、効率よく解決策を案出することができる。 In the defect factor integrated image data P4, the distribution state of the defect factors 30 is visualized in one piece of image data. Thereby, when considering the distribution state of the failure factors 30 when devising a solution for improving the learned model M, the solution can be devised efficiently.

(実施形態2)
続いて、実施形態2の機械学習装置1について図13を参照して説明する。本形態においては、解決策3に代えて解決策4が教示される以外は実施形態1と略同様なので、同一の構成要素については同一符号を付し、重複する説明を省略する。
(Embodiment 2)
Next, the machine learning device 1 according to the second embodiment will be described with reference to FIG. 13. This embodiment is substantially the same as Embodiment 1 except that Solution 4 is taught instead of Solution 3, so the same components are given the same reference numerals and redundant explanations will be omitted.

解決策4について図13を参照して説明する。図13に示すように、分析教示部13は、不良要因統合画像データ格納部24から、不良要因統合画像データP4を取得する。分析教示部13は、不良要因統合画像データP4において複数の不良要因30を含む不良要因領域32を取得する。図13において、不良要因領域32は、不良要因統合画像データP4中に3つの四角形で示されている。 Solution 4 will be explained with reference to FIG. 13. As shown in FIG. 13, the analysis and teaching section 13 acquires defect factor integrated image data P4 from the defect factor integrated image data storage section 24. The analysis teaching unit 13 acquires a failure factor area 32 including a plurality of failure factors 30 in the failure factor integrated image data P4. In FIG. 13, the defect cause area 32 is shown as three squares in the defect cause integrated image data P4.

分析教示部13は、真不良部位が誤判定された誤判定テスト画像データP7と、当該誤判定テスト画像データP7に基づいて生成されたクラスアクティベーションマップP8と、を取得する。分析教示部13は、誤判定テスト画像データP7に基づくクラスアクティベーションマップP8において、上記した着目度数Nが所定度数以下である低着目度数領域41を取得する。本形態では、所定度数は10とされる。図13に記載されたクラスアクティベーションマップP8において、N=10の境界が黒い曲線で示されている。N=10の境界よりもトーンが暗い部分が、着目度数Nが10以下の低着目度数領域41である。低着目度数領域41の境界を定義する所定度数は、10に限られず、20,30等、任意の値を設定できる。 The analysis teaching unit 13 acquires the false determination test image data P7 in which a true defective part is falsely determined, and the class activation map P8 generated based on the false determination test image data P7. The analysis teaching unit 13 acquires a low frequency of interest region 41 in which the frequency of interest N described above is equal to or less than a predetermined frequency in the class activation map P8 based on the false determination test image data P7. In this embodiment, the predetermined frequency is 10. In the class activation map P8 shown in FIG. 13, the boundary of N=10 is shown by a black curve. A portion whose tone is darker than the boundary of N=10 is a low focused frequency region 41 where the focused frequency N is 10 or less. The predetermined frequency that defines the boundary of the low focused frequency region 41 is not limited to 10, but can be set to any value such as 20 or 30.

分析教示部13は、不良要因領域32および低着目度数領域41を除く領域をマスキング領域40と指定する。分析教示部13は、誤判定テスト画像データP7に対してマスキング領域40をマスキング処理した、マスキング済み画像データP9を生成する。分析教示部13は、マスキング済み画像データP9を、表示装置5に表示させることにより、ユーザに教示する。これにより、分析教示部13は、訓練画像データP1,P2に対するマスキング領域40を解決策の情報としてユーザに教示する。 The analysis and teaching unit 13 designates an area excluding the defect cause area 32 and the low frequency area 41 as a masking area 40 . The analysis teaching unit 13 generates masked image data P9 in which the masking region 40 is subjected to masking processing on the false determination test image data P7. The analysis teaching unit 13 teaches the user the masked image data P9 by displaying it on the display device 5. Thereby, the analysis teaching unit 13 teaches the user the masking area 40 for the training image data P1 and P2 as solution information.

本形態によれば、着目度数が所定度数以下である低着目度数領域41を除く領域をマスキング領域40と指定する。これにより、訓練データから、着目すべきでない部位を効果的に除くことができる。この結果、学習済みモデルMの精度を向上させることができる。 According to the present embodiment, an area excluding the low frequency area of interest 41 whose frequency of interest is less than or equal to a predetermined frequency is designated as the masking area 40 . Thereby, parts that should not be of interest can be effectively removed from the training data. As a result, the accuracy of the learned model M can be improved.

(実施形態3)
続いて、実施形態3の機械学習装置1について図14を参照して説明する。本形態に係る機械学習装置1の全体的な動作について図14を参照して説明する。S1~S5については、実施形態1と同様なので、重複する説明を省略する。
(Embodiment 3)
Next, the machine learning device 1 of Embodiment 3 will be described with reference to FIG. 14. The overall operation of the machine learning device 1 according to this embodiment will be described with reference to FIG. 14. Since S1 to S5 are the same as in the first embodiment, redundant explanation will be omitted.

S10にて、分析教示部13は、良否判定部12から判定結果を取得する。分析教示部13は、不良要因訓練画像データP3から不良要因訓練画像データP3を取得する。また、分析教示部13は、正判定トリミング画像データ格納部23から、正判定トリミング画像データを取得する。また、分析教示部13は、不良要因統合画像データ格納部24から不良要因統合画像データP4を取得する。 In S10, the analysis teaching unit 13 acquires the determination result from the quality determining unit 12. The analysis teaching unit 13 acquires defective factor training image data P3 from the defective factor training image data P3. The analysis teaching unit 13 also acquires correct determination trimming image data from the correct determination trimming image data storage unit 23 . Furthermore, the analysis teaching section 13 acquires defective factor integrated image data P4 from the defective factor integrated image data storage section 24.

分析教示部13は、良否判定部12の判定結果に基づいて、不良品における真不良部位を誤判定した場合に、不良要因情報に基づいて誤判定要因を分析し、誤判定要因に応じた解決策を導出する。 When a true defective part of a defective product is erroneously determined based on the determination result of the quality determining section 12, the analysis teaching unit 13 analyzes the erroneous determination factor based on the defective factor information and solves the problem according to the erroneous determination factor. derive a strategy.

分析教示部13は、導出された解決策を再学習用訓練画像データ生成部15に送信する。再学習用訓練画像データ生成部15は、画像データ格納部20から訓練画像データP1,P2を取得する。次に、再学習用訓練画像データ生成部15は、分析教示部13から送信された解決策に応じて、不良要因訓練画像データ格納部22から不良要因訓練画像データP3を取得し、正判定トリミング画像データ格納部23から正判定トリミング画像データを取得し、不良要因統合画像データ格納部24から不良要因統合画像データP4を取得する。 The analysis teaching unit 13 transmits the derived solution to the relearning training image data generation unit 15. The relearning training image data generation unit 15 acquires training image data P1 and P2 from the image data storage unit 20. Next, the relearning training image data generating section 15 acquires the defective factor training image data P3 from the defective factor training image data storage section 22 according to the solution sent from the analysis teaching section 13, and performs correct judgment trimming. The correct determination trimming image data is obtained from the image data storage section 23, and the defective factor integrated image data P4 is obtained from the defective factor integrated image data storage section 24.

再学習用訓練画像データ生成部15は、分析教示部13から送信された解決策に基づいて、再学習用の訓練画像データP1,P2を生成する。再学習用訓練画像データ生成部15は、生成された再学習用の訓練画像データP1,P2をモデル生成部11に送信する。 The relearning training image data generation unit 15 generates relearning training image data P1 and P2 based on the solution sent from the analysis teaching unit 13. The relearning training image data generation unit 15 transmits the generated relearning training image data P1 and P2 to the model generation unit 11.

S11にて、モデル生成部11は、取得した、再学習用の訓練画像データP1,P2を用いて機械学習を行うことにより、S2で生成された学習済みモデルMとは異なる、新学習済みモデルを生成する。モデル生成部11は、生成された新学習済みモデルを良否判定部12に送信する。 In S11, the model generation unit 11 performs machine learning using the acquired training image data P1 and P2 for relearning, thereby creating a new trained model that is different from the trained model M generated in S2. generate. The model generation unit 11 transmits the generated new trained model to the quality determination unit 12.

S12にて、良否判定部12は、モデル生成部11から新学習済みモデルを取得する。また、良否判定部12は、画像データ格納部20からテスト画像データP5,P6を取得する。 In S12, the quality determining unit 12 acquires a new learned model from the model generating unit 11. Furthermore, the quality determining section 12 acquires test image data P5 and P6 from the image data storage section 20.

良否判定部12は、新学習済みモデルを用いて、S4にて取得されたテスト画像データP5,P6が、良品または不良品であるかを判定する。良否判定部12は、新学習済みモデルの判定結果を分析教示部13に送信する。 The quality determining unit 12 uses the newly learned model to determine whether the test image data P5, P6 acquired in S4 is a non-defective product or a defective product. The quality determining unit 12 transmits the determination result of the new learned model to the analysis teaching unit 13.

S13にて、分析教示部13は、S10にて導出された解決策を、表示装置5に表示させることにより、ユーザに解決策を教示する。 In S13, the analysis teaching unit 13 teaches the solution to the user by displaying the solution derived in S10 on the display device 5.

S14にて、分析教示部13は、S10にて導出された解決策の有効度を表示装置5に表示させることにより、ユーザに教示する。 In S14, the analysis teaching unit 13 instructs the user about the effectiveness of the solution derived in S10 by displaying it on the display device 5.

解決策の有効度は、特に限定されない。解決策の有効度として、例えば、S5における学習済みモデル評価において真不良部位が誤判定された誤判定テスト画像データP7の個数と、S12における学習済みモデル評価において真不良部位が誤判定された誤判定テスト画像データP7の個数と、を比較して、誤判定テスト画像データP7の個数が少ない解決策ほど有効であるとしてもよい。 The effectiveness of the solution is not particularly limited. As the effectiveness of the solution, for example, the number of incorrectly determined test image data P7 in which a true defective part was incorrectly determined in the learned model evaluation in S5, and the number of incorrectly determined test image data P7 in which a true defective part was incorrectly determined in the learned model evaluation in S12. By comparing the number of determination test image data P7, a solution with a smaller number of erroneous determination test image data P7 may be more effective.

また、例えば、S5における学習済みモデル評価において真不良部位が誤判定された誤判定テスト画像データP7のうち、S12における学習済みモデル評価において真不良部位が正判定されたテスト画像データP5,P6の個数が多い解決策ほど有効であるとしてもよい。 For example, among the false judgment test image data P7 in which the true defective part was incorrectly judged in the trained model evaluation in S5, the test image data P5 and P6 in which the true defective part was judged to be correct in the trained model evaluation in S12. A solution with a larger number of solutions may be more effective.

以上により、機械学習装置1の全体的な動作が終了する。 With the above, the overall operation of the machine learning device 1 is completed.

上記以外の構成については、実施形態1と略同様なので、同一部材については同一符号を付し、重複する説明を省略する。 The configuration other than the above is substantially the same as in the first embodiment, so the same members are denoted by the same reference numerals and redundant explanations will be omitted.

本形態によれば、提案された複数の解決策について、どの解決策が有効であるかを、複数の解決策を検討する前に知ることができる。これにより、学習済みモデルMを構築するための労力を一層省力化できる。 According to this embodiment, it is possible to know which solution is effective among a plurality of proposed solutions before considering the plurality of solutions. Thereby, the effort required to construct the learned model M can be further reduced.

本発明は上記各実施形態に限定されるものではなく、その要旨を逸脱しない範囲において種々の実施形態に適用することが可能である。 The present invention is not limited to the above-mentioned embodiments, but can be applied to various embodiments without departing from the gist thereof.

1…機械学習装置、2…演算処理装置、3…記憶装置、11 モデル生成部、12 良否判定部、13 分析教示部、14 不良要因統合画像データ生成部、16…水増し処理部、17 画像分割処理部、20…画像データ格納部、21…モデル格納部、22…不良要因訓練画像データ格納部、23…正判定トリミング画像データ格納部、30…不良要因、31…不良要因群、32…不良要因領域、40…マスキング領域、41…低着目度数領域、N…着目度数、Nbest…最適着目度数、Nmax…最大着目度数、M…学習済みモデル、ΔN…不足着目度数、P1…良品訓練画像データ(訓練画像データ)、P2…不良品訓練画像データ(訓練画像データ)、P3…不良要因訓練画像データ、P4…不良要因統合画像データ、P5…良品テスト画像データ(テスト画像データ)、P6…不良品テスト画像データ(テスト画像データ)、P7…誤判定テスト画像データ、P8…クラスアクティベーションマップ、P9…マスキング済み画像データ DESCRIPTION OF SYMBOLS 1...Machine learning device, 2...Arithmetic processing unit, 3...Storage device, 11 Model generation section, 12 Acceptability determination section, 13 Analysis teaching section, 14 Failure factor integrated image data generation section, 16... Padded processing section, 17 Image division Processing unit, 20... Image data storage unit, 21... Model storage unit, 22... Failure factor training image data storage unit, 23... Correct judgment trimming image data storage unit, 30... Failure factor, 31... Failure factor group, 32... Failure Factor area, 40... Masking area, 41... Low focused frequency area, N... Focused frequency, Nbest... Optimal focused frequency, Nmax... Maximum focused frequency, M... Learned model, ΔN... Insufficient focused frequency, P1... Good quality training image data (training image data), P2...defective product training image data (training image data), P3...defective factor training image data, P4...defective factor integrated image data, P5...defective product test image data (test image data), P6...defective product training image data Good product test image data (test image data), P7... Erroneous judgment test image data, P8... Class activation map, P9... Masked image data

Claims (18)

演算処理装置および記憶装置を備えた機械学習装置であって、
前記記憶装置は、
学習用の訓練画像データおよび評価用のテスト画像データを格納する画像データ格納部と、
前記訓練画像データおよび前記テスト画像データを用いて機械学習を行うことにより生成された学習済みモデルを格納するモデル格納部と、
前記訓練画像データのうち不良品とラベルされた不良品訓練画像データに、不良要因の位置を含む不良要因情報をアノテーションとして紐づけられた不良要因訓練画像データを格納する不良要因訓練画像データ格納部と、
を備え、
前記演算処理装置は、
前記訓練画像データおよび前記テスト画像データを用いて前記機械学習を行うことにより前記学習済みモデルを生成するモデル生成部と、
前記学習済みモデルを用いて、良品または不良品とラベルされた前記テスト画像データが、良品または不良品であるかを判定する良否判定部と、
前記良否判定部の判定結果に基づいて、不良品における真不良部位を誤判定した場合に、前記不良要因情報に基づいて誤判定要因を分析し、前記誤判定要因に応じた解決策を教示する分析教示部と、
を備える、機械学習装置。
A machine learning device comprising an arithmetic processing unit and a storage device,
The storage device is
an image data storage unit that stores training image data for learning and test image data for evaluation;
a model storage unit that stores a learned model generated by performing machine learning using the training image data and the test image data;
A defective factor training image data storage unit that stores defective factor training image data in which defective product training image data labeled as defective among the training image data is linked with defective factor information including the location of the defective factor as an annotation. and,
Equipped with
The arithmetic processing device is
a model generation unit that generates the learned model by performing the machine learning using the training image data and the test image data;
a quality determination unit that uses the trained model to determine whether the test image data labeled as a non-defective product or a defective product is a non-defective product or a defective product;
When a true defective part of a defective product is erroneously determined based on the determination result of the quality determining section, the erroneous determination factor is analyzed based on the defect factor information, and a solution is taught in accordance with the erroneous determination factor. analysis teaching department;
A machine learning device equipped with.
前記不良品における真不良部位を誤判定した場合とは、
前記良否判定部が真不良部位を含む不良品を良品と誤判定した場合、
前記良否判定部が不良品を不良品と正判定したが真不良部位ではなく偽不良部位に基づいて不良品と正判定した場合、
のいずれかを含む、請求項1に記載の機械学習装置。
What is the case where the true defective part of the defective product is incorrectly determined?
If the quality determination unit erroneously determines a defective product containing a truly defective part as a non-defective product,
If the quality determining unit correctly determines that the defective product is a defective product, but the defective product is determined to be a defective product based on a false defective portion rather than a true defective portion,
The machine learning device according to claim 1, comprising any one of the following.
前記分析教示部は、複数の解決策を教示するとともに、前記複数の解決策の有効度を教示する、請求項1に記載の機械学習装置。 The machine learning device according to claim 1, wherein the analysis teaching unit teaches a plurality of solutions and the effectiveness of the plurality of solutions. 前記分析教示部は、前記訓練画像データのうちの不良品訓練画像データの数量不足が前記誤判定要因であると分析する、請求項1~3のいずれか1項に記載の機械学習装置。 The machine learning device according to any one of claims 1 to 3, wherein the analysis and teaching unit analyzes that the cause of the erroneous determination is an insufficient quantity of defective product training image data among the training image data. 前記分析教示部は、前記訓練画像データのうち、誤判定された前記真不良部位を含む前記不良品訓練画像データの数量不足が前記誤判定要因であると分析する、請求項4に記載の機械学習装置。 The machine according to claim 4, wherein the analysis and teaching unit analyzes that the cause of the erroneous determination is an insufficient quantity of the defective product training image data that includes the erroneously determined true defective part among the training image data. learning device. 前記良否判定部は、良品または不良品であるかを判定するとともに、画素ごとの着目度数を生成し、
前記分析教示部は、
前記良否判定部により誤判定された前記テスト画像データである誤判定テスト画像データにおける最大着目度数Nmaxを取得し、
前記誤判定テスト画像データにおいて誤判定された前記真不良部位における前記着目度数Nを取得し、
前記最大着目度数Nmaxと前記真不良部位における前記着目度数Nとの差である不足着目度数ΔNに基づいて、前記不良品訓練画像データの数量不足が前記誤判定要因であると分析し、
前記不足着目度数ΔN、および、前記不足着目度数ΔNに基づき得られた前記真不良部位における最適着目度数Nbestの少なくとも1つを前記解決策のための情報として教示する、請求項4に記載の機械学習装置。
The quality determining unit determines whether the product is a good product or a defective product, and generates a frequency of interest for each pixel,
The analysis teaching section is
Obtaining the maximum frequency of interest Nmax in the erroneously determined test image data that is the test image data that has been erroneously determined by the quality determining unit;
Obtaining the frequency of interest N in the true defective part that has been erroneously determined in the erroneously determined test image data;
Analyzing that the lack of quantity of the defective product training image data is the cause of the misjudgment, based on the insufficient focus frequency ΔN, which is the difference between the maximum focus frequency Nmax and the focus frequency N in the true defective part;
The machine according to claim 4, wherein at least one of the insufficient focus frequency ΔN and the optimal focus frequency Nbest for the true defective part obtained based on the insufficient focus frequency ΔN is taught as information for the solution. learning device.
前記分析教示部は、
前記誤判定テスト画像データおよび前記不良要因情報に基づいて前記誤判定テスト画像データにおける前記真不良部位を取得し、
前記誤判定テスト画像データにおいて誤判定された前記真不良部位における前記着目度数Nを取得する、請求項6に記載の機械学習装置。
The analysis teaching section is
obtaining the true defective part in the false determination test image data based on the false determination test image data and the defect factor information;
The machine learning device according to claim 6 , wherein the machine learning device acquires the frequency of interest N in the true defect portion that has been incorrectly determined in the incorrectly determined test image data.
前記演算処理装置は、前記分析教示部の分析結果に基づいて、誤判定された前記真不良部位を含む前記不良品訓練画像データの水増し処理を行う水増し処理部をさらに備える、請求項4に記載の機械学習装置。 5. The arithmetic processing device further includes an inflating processing unit that performs inflating processing on the defective product training image data including the erroneously determined true defective part based on the analysis result of the analysis teaching unit. machine learning device. 前記分析教示部は、前記テスト画像データの全画像サイズに対する、誤判定された前記真不良部位の局所画像サイズの割合が不適であることが前記誤判定要因であると分析する、請求項1~3のいずれか1項に記載の機械学習装置。 The analysis teaching unit analyzes that the cause of the erroneous determination is that the ratio of the local image size of the erroneously determined true defective region to the total image size of the test image data is inappropriate. 3. The machine learning device according to any one of 3. 前記記憶装置は、前記真不良部位が正しく判定されたときの前記真不良部位を含む正判定トリミング画像データを格納する正判定トリミング画像データ格納部をさらに備え、
前記分析教示部は、前記正判定トリミング画像データに基づいて、前記テスト画像データにおける全画像サイズに対する局所画像サイズの割合が不適であることが前記誤判定要因であると分析する、請求項9に記載の機械学習装置。
The storage device further includes a correct judgment trimming image data storage unit that stores correct judgment trimming image data including the true defective part when the true defective part is correctly judged,
The analysis teaching unit analyzes that the cause of the false determination is that the ratio of the local image size to the total image size in the test image data is inappropriate, based on the correct determination trimmed image data. Machine learning device described.
前記演算処理装置は、複数の前記不良要因訓練画像データを統合した不良要因統合画像データを生成する不良要因統合画像データ生成部をさらに備え、
前記分析教示部は、
前記正判定トリミング画像データの全画像サイズに対する、前記正判定トリミング画像データにおける前記真不良部位の局所画像サイズの割合と、
前記不良要因統合画像データの全画像サイズに対する、前記不良要因統合画像データにおける前記不良要因を含む局所画像サイズの割合と、に基づいて、
前記テスト画像データにおける全画像サイズに対する局所画像サイズの割合が不適であることが前記誤判定要因であると分析する、請求項10に記載の機械学習装置。
The arithmetic processing device further includes a defective factor integrated image data generation unit that generates defective factor integrated image data by integrating the plurality of defective factor training image data,
The analysis teaching section is
a ratio of the local image size of the true defective part in the correct judgment trimmed image data to the total image size of the correct judgment trimmed image data;
Based on the ratio of the local image size including the defective factor in the defective factor integrated image data to the total image size of the defective factor integrated image data,
The machine learning device according to claim 10, wherein the cause of the misjudgment is analyzed to be that the ratio of the local image size to the total image size in the test image data is inappropriate.
前記不良要因統合画像データにおいて、連続または近接して配置される複数の前記不良要因によるまとまりを不良要因群とし、
前記不良要因統合画像データは、複数の前記不良要因群を有しており、
前記不良要因統合画像データにおける前記不良要因を含む局所画像サイズは、前記テスト画像データにおいて誤判定された前記真不良部位に対応する位置を含む1つの前記不良要因群の画像サイズである、請求項11に記載の機械学習装置。
In the defective factor integrated image data, a group of a plurality of defective factors arranged consecutively or closely is defined as a defective factor group;
The defect factor integrated image data has a plurality of the defect factor groups,
The local image size including the defective factor in the defective factor integrated image data is the image size of one of the defective factor group including a position corresponding to the true defective part that is erroneously determined in the test image data. The machine learning device according to 11.
前記分析教示部は、前記機械学習に用いる前記訓練画像データの適切全画像サイズを前記解決策のための情報として教示する、請求項9に記載の機械学習装置。 The machine learning device according to claim 9, wherein the analysis teaching unit teaches an appropriate total image size of the training image data used for the machine learning as information for the solution. 前記演算処理装置は、前記分析教示部の分析結果に基づいて前記訓練画像データを分割し、分割された画像データを前記モデル生成部への入力画像データとする画像分割処理部をさらに備える、請求項9に記載の機械学習装置。 The arithmetic processing device further comprises an image division processing unit that divides the training image data based on the analysis result of the analysis teaching unit and uses the divided image data as input image data to the model generation unit. The machine learning device according to item 9. 前記分析教示部は、前記良否判定部により誤判定された前記テスト画像データである誤判定テスト画像データにおいて、着目すべきでない部位が含まれることが前記誤判定要因であると分析する、請求項1~3のいずれか1項に記載の機械学習装置。 The analysis teaching unit analyzes that the cause of the erroneous determination is that the erroneously determined test image data that is the test image data that has been erroneously determined by the quality determining unit includes a region that should not be focused on. The machine learning device according to any one of 1 to 3. 前記分析教示部は、前記訓練画像データに対するマスキング領域を前記解決策の情報として教示する、請求項15に記載の機械学習装置。 The machine learning device according to claim 15, wherein the analysis teaching unit teaches a masking area for the training image data as the solution information. 前記演算処理装置は、複数の前記不良要因訓練画像データを統合した不良要因統合画像データを生成する不良要因統合画像データ生成部をさらに備え、
前記分析教示部は、
前記不良要因統合画像データにおいて複数の不良要因を含む不良要因領域を取得し、
前記不良要因領域を除く領域を前記マスキング領域と指定し、
前記訓練画像データに対する前記マスキング領域を前記解決策の情報として教示する、請求項16に記載の機械学習装置。
The arithmetic processing device further includes a defective factor integrated image data generation unit that generates defective factor integrated image data by integrating the plurality of defective factor training image data,
The analysis teaching section is
obtaining a defect cause area including a plurality of defect factors in the defect factor integrated image data;
Designating an area excluding the defect cause area as the masking area,
The machine learning device according to claim 16, wherein the masking area for the training image data is taught as information on the solution.
前記演算処理装置は、複数の前記不良要因訓練画像データを統合した不良要因統合画像データを生成する不良要因統合画像データ生成部をさらに備え、
前記分析教示部は、
前記不良要因統合画像データにおいて複数の不良要因を含む不良要因領域を取得し、
前記良否判定部により誤判定された前記テスト画像データである誤判定テスト画像データにおける着目度数のうち所定度数以下である低着目度数領域を取得し、
前記不良要因領域および前記低着目度数領域を除く領域を前記マスキング領域と指定し、
前記訓練画像データに対する前記マスキング領域を前記解決策の情報として教示する、請求項16に記載の機械学習装置。
The arithmetic processing device further includes a defective factor integrated image data generation unit that generates defective factor integrated image data by integrating the plurality of defective factor training image data,
The analysis teaching section is
Obtaining a defect cause area including a plurality of defect factors in the defect factor integrated image data;
Obtaining a low frequency of interest region that is less than or equal to a predetermined frequency among the frequencies of interest in the erroneously determined test image data that is the test image data that has been erroneously determined by the quality determining unit;
Designating an area excluding the defect cause area and the low attention frequency area as the masking area,
The machine learning device according to claim 16, wherein the masking region for the training image data is taught as information on the solution.
JP2022110721A 2022-07-08 2022-07-08 Machine learning apparatus Pending JP2024008670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2022110721A JP2024008670A (en) 2022-07-08 2022-07-08 Machine learning apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2022110721A JP2024008670A (en) 2022-07-08 2022-07-08 Machine learning apparatus

Publications (1)

Publication Number Publication Date
JP2024008670A true JP2024008670A (en) 2024-01-19

Family

ID=89544230

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022110721A Pending JP2024008670A (en) 2022-07-08 2022-07-08 Machine learning apparatus

Country Status (1)

Country Link
JP (1) JP2024008670A (en)

Similar Documents

Publication Publication Date Title
JP6879431B2 (en) Image processing equipment, image processing method and image processing program
US11010890B2 (en) Method for the non-destructive testing of the volume of a test object and testing device configured for carrying out such a method
CN115803619A (en) Information processing device, determination method, and information processing program
US20220415020A1 (en) System and method for detection of anomalies in welded structures
US11315229B2 (en) Method for training defect detector
US20220088719A1 (en) Method, apparatus, and non-transitory computer readable medium for detecting welding defects of workpieces
EP3605453A1 (en) Convolutional neural network based inspection of blade-defects of a wind turbine
WO2021250986A1 (en) Inspection device, inspection method, and inspection program
JPWO2020071162A1 (en) Teacher data generator, inspection device and computer program
JP2013122455A (en) Method and device for optically testing object to be tested during production and/or packing of cigarette
CN116542984A (en) Hardware defect detection method, device, computer equipment and storage medium
CN113780235A (en) Icon flaw detection method and system
JP2024008670A (en) Machine learning apparatus
JP2021152489A (en) Teacher data generation device, inspection device, and program
CN113192070B (en) Weld image processing method and system based on computer vision
JP2002008029A (en) Image inspection device
KR20230036650A (en) Defect detection method and system based on image patch
JP2001099625A (en) Device and method for pattern inspection
JP2011141202A (en) Component inspection device and program
CN117495846B (en) Image detection method, device, electronic equipment and storage medium
JP2008026072A (en) Flaw inspection device and flaw inspection method
JP7510132B1 (en) Visual inspection device, machine learning model learning method, teaching image generation method and program
WO2022259772A1 (en) Inspection device, inspection method, glass-plate manufacturing method, and inspection program
JP2006135700A (en) Image inspection device, image inspection method, control program and readable storage medium
WO2022201968A1 (en) Information processing device, control program, and control method