JP2020187654A - Image inspection device - Google Patents

Image inspection device Download PDF

Info

Publication number
JP2020187654A
JP2020187654A JP2019093171A JP2019093171A JP2020187654A JP 2020187654 A JP2020187654 A JP 2020187654A JP 2019093171 A JP2019093171 A JP 2019093171A JP 2019093171 A JP2019093171 A JP 2019093171A JP 2020187654 A JP2020187654 A JP 2020187654A
Authority
JP
Japan
Prior art keywords
inspection
image
defective product
deep learning
normal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2019093171A
Other languages
Japanese (ja)
Other versions
JP7248496B2 (en
Inventor
真達 下平
Masatatsu Shimodaira
真達 下平
典正 眞弓
Norimasa Mayumi
典正 眞弓
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.)
Keyence Corp
Original Assignee
Keyence 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 Keyence Corp filed Critical Keyence Corp
Priority to JP2019093171A priority Critical patent/JP7248496B2/en
Publication of JP2020187654A publication Critical patent/JP2020187654A/en
Application granted granted Critical
Publication of JP7248496B2 publication Critical patent/JP7248496B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To allow a user to easily determine a type of inspection with a higher correct answer rate when both normal inspection and deep learning processing-based inspection are made applicable.SOLUTION: An image inspection device provided herein is configured to: apply normal inspection processing and deep learning processing to both newly acquired good product images given with a good product attribute and defective product images given with a defective product attribute; and display correct answer rates for the normal inspection processing and for the deep learning processing in a comparable manner.SELECTED DRAWING: Figure 4

Description

本発明は、検査対象物を撮像した画像に基づいて検査対象物の良否判定を行う画像検査装置に関する。 The present invention relates to an image inspection apparatus that determines the quality of an inspection object based on an image of the inspection object.

例えば特許文献1に開示されているように、検査対象物を撮像した画像を用いた一般的な検査処理では、画像内の検査対象物の様々な特徴量(色、エッジ、位置等)に基づいて検査対象物の良否の判定を行う(以下、通常検査という)。通常検査では、画像検査装置の設定時に使用者がどのような特徴量に基づいて検査を行うか選択し、選択された特徴量に対して良否判定の基準となる閾値を設定し、運用時に新たに入力された検査画像から設定時に選択された特徴量を抽出し、抽出された特徴量を閾値と比較することにより検査対象物の良否判定を行う。色やエッジなどの特徴量がはっきりしている画像に対しては良否判定が容易であるが、例えば色ムラが多い検査対象物や、金属部品のように周囲の環境によってエッジの出方が変わりやすい検査対象物などでは、特徴量が撮像条件などによって変化しやすく、人間の目による検査では良否判定が容易であっても、画像検査装置では判定が難しく、ひいては、判定結果が安定しないことがある。 For example, as disclosed in Patent Document 1, in a general inspection process using an image of an inspection object, it is based on various feature quantities (color, edge, position, etc.) of the inspection object in the image. The quality of the inspection target is judged (hereinafter referred to as normal inspection). In normal inspection, the user selects the feature amount to be inspected when setting the image inspection device, sets a threshold value as a reference for quality judgment for the selected feature amount, and newly operates it. The feature amount selected at the time of setting is extracted from the inspection image input to, and the quality of the inspection object is judged by comparing the extracted feature amount with the threshold value. It is easy to judge the quality of an image with clear features such as color and edges, but the appearance of edges changes depending on the surrounding environment, such as inspection objects with many color irregularities and metal parts. For easy inspection objects, the feature amount is likely to change depending on the imaging conditions, etc., and even if it is easy to judge whether it is good or bad by inspection with the human eye, it is difficult to judge by an image inspection device, and eventually the judgment result is not stable. is there.

このような難しい検査に対応が可能な検査処理技術として、良品が撮像された良品画像と不良品が撮像された不良品画像の特徴をそれぞれニューラルネットワークなどの公知の機械学習器に学習させ、新たに入力された検査対象物の画像が良品であるか、不良品であるかを機械学習器によって識別する技術が知られている(例えば特許文献2参照)。 As an inspection processing technology that can handle such difficult inspections, a new machine learning device such as a neural network is used to learn the characteristics of a good product image in which a good product is imaged and a defective product image in which a defective product is imaged. There is known a technique for identifying whether an image of an inspection object input to is a non-defective product or a defective product by a machine learning device (see, for example, Patent Document 2).

特開2013−120550号公報Japanese Unexamined Patent Publication No. 2013-12050 特開2018−5640号公報JP-A-2018-5640

ところで、ニューラルネットワークの層を多層にし、識別能力を大きく向上させたもので学習させることは一般にディープラーニング(深層学習)と呼ばれている。ディープラーニングでは、事前に複数の良品属性が付与された画像と、不良品属性が付与された画像を多層のニューラルネットワークに入力し、良品画像と不良品画像とを識別できるように、ネットワーク内の複数のパラメータを調整していき、学習を完了させる。このディープラーニングは多方面で用いられている。 By the way, learning with a neural network having multiple layers and greatly improving the discriminating ability is generally called deep learning. In deep learning, an image to which multiple good product attributes are given in advance and an image to which bad product attributes are given are input to a multi-layer neural network so that the good product image and the defective product image can be distinguished from each other in the network. Adjust multiple parameters to complete the learning. This deep learning is used in many fields.

しかし、深層学習処理は、学習に用いていない未知のデータが入力された場合の挙動が不安定であるという問題がある。すなわち、深層学習処理を検査対象物の検査処理に適用し、検査対象物が良品であるか、不良品であるかの2クラス判別を学習させた場合に、例えば学習データに存在していなかったような想定外の不良状態のものが入力されると、良品と間違えて判定してしまうおそれがあり、このことは工場などにおける検査工程では未然に防止する必要がある。また、深層学習処理は、通常検査に比べると判定に要する処理時間が長くなり、このことも工場などにおける検査工程では改善すべき課題となる。 However, the deep learning process has a problem that the behavior is unstable when unknown data not used for learning is input. That is, when the deep learning process is applied to the inspection process of the inspection object and the two-class discrimination of whether the inspection object is a non-defective product or a defective product is trained, for example, it does not exist in the training data. If such an unexpectedly defective product is input, it may be mistaken for a non-defective product, and this must be prevented in the inspection process at a factory or the like. Further, the deep learning process requires a longer processing time for determination than the normal inspection, which is also a problem to be improved in the inspection process in factories and the like.

このように、深層学習処理は、通常検査での対応が難しい検査対象物の検査が可能になるという利点があるものの、未知のデータへの挙動が不安定であったり、処理時間が長くなるという問題があった。一方、特徴量がはっきりしていれば通常検査でも十分に安定的な検査が可能であり、そのような場合にはあえて深層学習処理を利用するメリットは殆どない。ところが、使用者にとって、どちらの検査より適しているのか分かりにくいという問題があった。 In this way, deep learning processing has the advantage of enabling inspection of inspection objects that are difficult to handle in normal inspection, but the behavior of unknown data is unstable and the processing time is long. There was a problem. On the other hand, if the feature quantity is clear, a sufficiently stable inspection can be performed even by a normal inspection, and in such a case, there is almost no merit to use the deep learning process. However, there is a problem that it is difficult for the user to know which test is more suitable.

本発明は、かかる点に鑑みてなされたものであり、その目的とするところは、通常検査と、深層学習処理による検査を適用可能にする場合に、正答率が高い検査を使用者が容易に判別できるようにすることにある。 The present invention has been made in view of the above points, and an object of the present invention is to allow a user to easily perform a test having a high correct answer rate when making a normal test and a test by deep learning processing applicable. It is to be able to distinguish.

上記目的を達成するために、第1の発明は、検査対象物を撮像して取得された検査対象画像に基づいて検査対象物の良否判定を行う画像検査装置において、検査に用いる特徴量の設定と、当該特徴量と比較される良否判定の基準となる閾値の設定とを使用者から受け付けることにより、通常検査処理の設定を行う通常検査設定手段と、良品属性が付与された複数の良品画像及び/又は不良品属性が付与された複数の不良品画像を、ニューラルネットワークの入力層に入力して当該ニューラルネットワークに学習させ、新たに入力された検査対象画像を良品画像と不良品画像に分類する深層学習処理の設定を行う深層学習設定手段と、新たに取得された良品画像と不良品画像の両方に対し、前記通常検査処理と前記深層学習処理とを適用する検査実行部と、前記検査実行部で実行された前記通常検査処理による正答率と前記深層学習処理による正答率とを表示する表示手段と、前記通常検査処理と、前記深層学習処理のいずれか、又はこれらの処理を組み合わせた検査処理を選択可能な検査選択手段とを備えていることを特徴とする。 In order to achieve the above object, the first invention is to set a feature amount to be used for inspection in an image inspection apparatus that determines the quality of an inspection object based on an image of the inspection object acquired by imaging the inspection object. And the normal inspection setting means for setting the normal inspection process by accepting from the user the setting of the threshold value which is the standard of the quality judgment to be compared with the feature amount, and a plurality of good product images to which the good product attribute is given. And / or a plurality of defective product images to which the defective product attribute is given are input to the input layer of the neural network and trained by the neural network, and the newly input inspection target image is classified into a non-defective product image and a defective product image. A deep learning setting means for setting the deep learning process to be performed, an inspection execution unit that applies the normal inspection process and the deep learning process to both the newly acquired good product image and the defective product image, and the inspection. A display means for displaying the correct answer rate by the normal inspection process and the correct answer rate by the deep learning process executed by the execution unit, the normal inspection process, any one of the deep learning processes, or a combination of these processes. It is characterized by having an inspection selection means capable of selecting an inspection process.

この構成によれば、通常検査設定手段により、検査に用いる特徴量の設定と閾値の設定とが行え、また、深層学習設定手段により、ニューラルネットワークに良品画像や不良品画像を学習させて良品画像と不良品画像の分類が行えるようになる。つまり、通常検査処理と深層学習処理とを行うことが可能になる。ニューラルネットワークの入力層には、学習用画像として、良品画像のみを入力してもよいし、不良品画像のみを入力してもよい。また、ニューラルネットワークの層の数を3層以上とすることで、いわゆるディープラーニングによって識別能力が大きく向上する。 According to this configuration, the feature amount and the threshold value used for the inspection can be set by the normal inspection setting means, and the good product image and the defective product image are learned by the neural network by the deep learning setting means. And you will be able to classify defective images. That is, it becomes possible to perform a normal inspection process and a deep learning process. Only the non-defective image may be input to the input layer of the neural network as the learning image, or only the defective image may be input. Further, by setting the number of layers of the neural network to three or more, the discrimination ability is greatly improved by so-called deep learning.

通常検査処理及び深層学習処理の設定後、新たに取得された良品画像と不良品画像に通常検査処理を適用した場合の正答率と、新たに取得された良品画像と不良品画像に深層学習処理を適用した場合の正答率とが表示手段に表示される。正答率は、例えば判定の確かさ(確度)と言うことができる。 After setting the normal inspection process and the deep learning process, the correct answer rate when the normal inspection process is applied to the newly acquired non-defective image and the defective image, and the deep learning process for the newly acquired non-defective image and the defective image. The percentage of correct answers when is applied is displayed on the display means. The correct answer rate can be said to be, for example, the certainty (accuracy) of the judgment.

表示手段には、通常検査処理を適用した場合の正答率と、深層学習処理を適用した場合の正答率とが表示されているので、使用者は、通常検査処理と深層学習処理のいずれの処理が検査対象物の検査に適しているのか、表示手段の表示内容に基づいて容易に判別可能になる。また、通常検査処理と深層学習処理を組み合わせた処理が検査対象物の検査に適しているのか否かも容易に判別可能になる。通常検査処理を適用した場合の正答率と、深層学習処理を適用した場合の正答率とを比較可能な形態で表示してもよく、比較可能な形態としては、例えばグラフによる表示形態や数値による表示形態を挙げることができる。 Since the correct answer rate when the normal inspection process is applied and the correct answer rate when the deep learning process is applied are displayed on the display means, the user can use either the normal inspection process or the deep learning process. Is suitable for inspection of the inspection object, it becomes possible to easily determine based on the display content of the display means. In addition, it becomes possible to easily determine whether or not a process that combines a normal inspection process and a deep learning process is suitable for inspection of an inspection object. The correct answer rate when the normal inspection process is applied and the correct answer rate when the deep learning process is applied may be displayed in a comparable form, and the comparable form is, for example, a graph display form or a numerical value. The display form can be mentioned.

正答率の比較結果に基づいて、通常検査処理と深層学習処理のいずれか一方、又はこれらの処理を組み合わせた検査処理の選択が行える。例えば、通常検査処理だけで十分に安定的な検査が可能である場合には、通常検査処理を選択することで、深層学習処理に特有の不安定な挙動が排除されるとともに、処理時間が短縮される。一方、通常検査処理だけでは対応が困難な検査対象物の場合は、深層学習処理を選択することで検査精度が向上する。通常検査処理、深層学習処理、これらの処理を組み合わせた検査処理の選択は、使用者が行ってもよいし、画像検査装置が自動で行ってもよい。 Based on the comparison result of the correct answer rate, either one of the normal inspection process and the deep learning process, or an inspection process combining these processes can be selected. For example, when a sufficiently stable inspection is possible only by the normal inspection process, selecting the normal inspection process eliminates the unstable behavior peculiar to the deep learning process and shortens the processing time. Will be done. On the other hand, in the case of an inspection object that is difficult to handle only by the normal inspection process, the inspection accuracy is improved by selecting the deep learning process. The user may select the normal inspection process, the deep learning process, and the inspection process that combines these processes, or the image inspection device may automatically perform the selection.

第2の発明は、前記表示手段は、前記通常検査処理による正答率と、前記深層学習処理による正答率とを同一グラフ上に同時に表示するように構成されていることを特徴とする。 The second invention is characterized in that the display means is configured to simultaneously display the correct answer rate by the normal inspection process and the correct answer rate by the deep learning process on the same graph.

この構成によれば、通常検査処理による正答率と、深層学習処理による正答率との比較が容易に行えるようになる。 According to this configuration, it becomes possible to easily compare the correct answer rate by the normal inspection process and the correct answer rate by the deep learning process.

第3の発明は、前記通常検査処理では、正規化相関を用いて良否判定を行い、前記表示手段は、前記通常検査処理による正答率を相関値と関連付けて表示するように構成されていることを特徴とする。 In the third invention, in the normal inspection process, a pass / fail judgment is made using a normalized correlation, and the display means is configured to display the correct answer rate by the normal inspection process in association with the correlation value. It is characterized by.

この構成によれば、通常検査処理において例えばパターンサーチのような正規化相関を用いて良否判定を行う場合、相関値を求めることができる。相関値が高いほど通常検査処理での正答率が高いので、通常検査処理による正答率を相関値と関連付けて表示することで、検査処理を選択する上で的確な判断が可能になる。 According to this configuration, when a pass / fail judgment is performed using a normalized correlation such as a pattern search in a normal inspection process, a correlation value can be obtained. The higher the correlation value, the higher the correct answer rate in the normal inspection process. Therefore, by displaying the correct answer rate in the normal inspection process in association with the correlation value, it is possible to make an accurate judgment in selecting the inspection process.

第4の発明は、前記通常検査処理で求めた相関値が所定相関値以下である場合には、当該通常検査処理において不良品であると判定するように構成されていることを特徴とする。 The fourth invention is characterized in that when the correlation value obtained in the normal inspection process is equal to or less than a predetermined correlation value, it is determined that the product is defective in the normal inspection process.

この構成によれば、通常検査処理で求めた相関値が所定相関値以下で低い場合には、想定外のものが混入していたり、想定外の方向に向いていて、明らかに不良品である可能性が高く、このような場合に通常検査処理で不良品と判定される。これにより、深層学習処理で未知のデータに対して示す不安定な挙動を防ぐことができる。 According to this configuration, when the correlation value obtained by the normal inspection process is lower than the predetermined correlation value, it is clearly a defective product because an unexpected substance is mixed in or the product is oriented in an unexpected direction. There is a high possibility, and in such a case, it is judged as a defective product by the normal inspection process. As a result, it is possible to prevent the unstable behavior shown for unknown data in the deep learning process.

第5の発明は、前記検査選択手段は、前記通常検査処理で求めた相関値が所定相関値よりも高い場合には、前記深層学習処理を選択するように構成されていることを特徴とする。 A fifth aspect of the invention is characterized in that the inspection selection means is configured to select the deep learning process when the correlation value obtained in the normal inspection process is higher than a predetermined correlation value. ..

すなわち、例えば通常検査処理で求めた相関値が中程度の付近にある場合には、通常検査処理では良品と不良品の区別がつきにくいと考えられる。この原因は様々であるが、例えば形状の歪みや、照明むら等の外乱に起因するものが挙げられる。この場合に、通常検査処理よりも分離能力の高い深層学習処理と組み合わせることで、良品と不良品の区別が可能になる。 That is, for example, when the correlation value obtained in the normal inspection process is near the middle level, it is considered difficult to distinguish between a non-defective product and a defective product in the normal inspection process. There are various causes for this, and examples thereof include those caused by disturbances such as shape distortion and uneven lighting. In this case, by combining with a deep learning process having a higher separation ability than the normal inspection process, it is possible to distinguish between a non-defective product and a defective product.

第6の発明は、前記通常検査処理では、予め登録された登録画像と新たに取得された検査対象画像との差分をブロブ検出する差分検査で良否判定を行い、前記表示手段は、前記通常検査処理による正答率を差分のブロブ面積と関連付けて表示するように構成されていることを特徴とする。 In the sixth invention, in the normal inspection process, a pass / fail judgment is made by a difference inspection that detects a difference between a pre-registered registered image and a newly acquired inspection target image, and the display means is the normal inspection. It is characterized in that the correct answer rate by processing is displayed in association with the blob area of the difference.

この構成によれば、通常検査処理でブロブ検出を用いて良否判定を行う場合、差分のブロブ面積を求めることができる。差分のブロブ面積が小さいほど通常検査処理での正答率が高いので、通常検査処理による正答率を差分のブロブ面積と関連付けて表示することで、検査処理を選択する上で的確な判断が可能になる。 According to this configuration, when a pass / fail judgment is performed using blob detection in the normal inspection process, the blob area of the difference can be obtained. The smaller the blob area of the difference, the higher the correct answer rate in the normal inspection process. Therefore, by displaying the correct answer rate in the normal inspection process in association with the blob area of the difference, it is possible to make an accurate judgment when selecting the inspection process. Become.

第7の発明は、前記通常検査処理で求めた差分のブロブ面積が所定面積値以上である場合には、当該通常検査処理において不良品であると判定するように構成されていることを特徴とする。 The seventh invention is characterized in that when the blob area of the difference obtained in the normal inspection process is equal to or larger than a predetermined area value, it is determined to be a defective product in the normal inspection process. To do.

この構成によれば、通常検査処理で求めた差分のブロブ面積が所定面積値以上で大きい場合には、想定外のものが混入していたり、想定外の方向に向いていて、明らかに不良品である可能性が高く、このような場合に通常検査処理で不良品と判定される。これにより、深層学習処理で未知のデータに対して示す不安定な挙動を防ぐことができる。 According to this configuration, when the blob area of the difference obtained by the normal inspection process is larger than the predetermined area value, an unexpected substance is mixed or the product is oriented in an unexpected direction, and the product is clearly defective. In such a case, it is determined to be a defective product by the normal inspection process. As a result, it is possible to prevent the unstable behavior shown for unknown data in the deep learning process.

第8の発明は、前記検査選択手段は、前記通常検査処理で求めた差分のブロブ面積が所定面積値よりも小さい場合には、前記深層学習処理を選択するように構成されていることを特徴とする。 An eighth invention is characterized in that the inspection selection means is configured to select the deep learning process when the blob area of the difference obtained in the normal inspection process is smaller than the predetermined area value. And.

すなわち、例えば通常検査処理で求めた差分のブロブ面積が中程度の付近にある場合には、通常検査処理では良品と不良品の区別がつきにくいと考えられる。この原因は様々であるが、例えば形状の歪みや、照明むら等の外乱に起因するものが挙げられる。この場合に、通常検査処理よりも分離能力の高い深層学習処理と組み合わせることで、良品と不良品の区別が可能になる。 That is, for example, when the blob area of the difference obtained in the normal inspection process is near the middle level, it is considered that it is difficult to distinguish between a non-defective product and a defective product in the normal inspection process. There are various causes for this, and examples thereof include those caused by disturbances such as shape distortion and uneven lighting. In this case, by combining with a deep learning process having a higher separation ability than the normal inspection process, it is possible to distinguish between a non-defective product and a defective product.

第9の発明は、前記通常検査設定手段は、前記特徴量と比較され、良品判定を確定させる閾値、又は不良品判定を確定させる閾値の設定とを使用者から受け付けることが可能に構成され、前記通常検査処理において、前記特徴量と前記良品判定を確定させる閾値、又は前記不良品判定を確定させる閾値とに基づいて、良品判定又は不良品判定が可能な特徴量を有する検査対象画像に対しては良品判定又は不良品判定を確定させ、良品判定又は不良品判定が確定できない特徴量を有する検査対象画像に対して前記深層学習処理を適用するように構成されていることを特徴とする。 The ninth invention is configured such that the normal inspection setting means can be compared with the feature amount and can accept from the user a threshold for determining a non-defective product or a threshold for determining a defective product. In the normal inspection process, for an inspection target image having a feature amount capable of determining a non-defective product or a defective product based on the feature amount and the threshold for determining the non-defective product determination or the threshold for determining the defective product determination. It is characterized in that the deep learning process is applied to an inspection target image having a feature amount in which the non-defective product determination or the defective product determination is confirmed and the non-defective product determination or the defective product determination cannot be determined.

すなわち、実際の検査対象物の検査現場では、一般的に検査対象物の大半(例えば99%以上)が良品であることが多い。本発明では、明らかに良品と判定できる検査対象物又は明らかに不良品と判定できる検査対象物を、処理速度の速い通常検査処理によって検査することで、スループットが大きく向上する。残りの僅かな検査対象物だけを深層学習処理によって検査するので、処理速度の低下を抑制しながら、検査精度を高めることが可能になる。 That is, in the actual inspection site of the inspection object, in general, most of the inspection objects (for example, 99% or more) are often non-defective products. In the present invention, the throughput is greatly improved by inspecting an inspection object that can be clearly determined to be a non-defective product or an inspection object that can be clearly determined to be a defective product by a normal inspection process having a high processing speed. Since only the remaining few inspection objects are inspected by the deep learning process, it is possible to improve the inspection accuracy while suppressing the decrease in the processing speed.

第10の発明は、前記通常検査処理において、前記特徴量と前記閾値とに基づいて、良品判定が可能な特徴量を有する検査対象画像に対しては良品判定を確定させるとともに、不良品判定が可能な特徴量を有する検査対象画像に対しては不良品判定を確定させ、良品判定が確定できない特徴量を有する検査対象画像と、不良品判定が確定できない特徴量を有する検査対象画像とに対してのみ前記深層学習処理を適用するように構成されていることを特徴とする。 According to the tenth invention, in the normal inspection process, a non-defective product determination is determined for an inspection target image having a feature amount capable of determining a non-defective product based on the feature amount and the threshold value, and a defective product determination is performed. For the inspection target image having a possible feature amount, the defective product judgment is confirmed, and for the inspection target image having the feature amount that the non-defective product judgment cannot be determined and the inspection target image having the feature amount that the defective product determination cannot be determined. It is characterized in that it is configured to apply the deep learning process only to the user.

この構成によれば、明らかに良品と判定できる検査対象物と、明らかに不良品と判定できる検査対象物の両方を処理速度の速い通常検査処理によって検査することができる。 According to this configuration, both an inspection object that can be clearly determined to be a non-defective product and an inspection object that can be clearly determined to be a defective product can be inspected by a normal inspection process having a high processing speed.

本発明によれば、新たに取得された良品属性が付与された良品画像と不良品属性が付与された不良品画像の両方に対し、通常検査処理と深層学習処理とを適用し、通常検査処理による正答率と深層学習処理による正答率とを比較可能な形態で表示することができるので、正答率が高い検査を使用者が容易に判別することができる。 According to the present invention, the normal inspection process and the deep learning process are applied to both the newly acquired non-defective product image to which the non-defective product attribute is given and the defective product image to which the defective product attribute is given, and the normal inspection process is applied. Since the correct answer rate by the above and the correct answer rate by the deep learning process can be displayed in a comparable form, the user can easily determine the test having a high correct answer rate.

本発明の実施形態に係る画像検査装置の構成を示す模式図である。It is a schematic diagram which shows the structure of the image inspection apparatus which concerns on embodiment of this invention. 画像検査装置のハードウエア構成を示す図である。It is a figure which shows the hardware structure of the image inspection apparatus. 画像検査装置のブロック図である。It is a block diagram of an image inspection apparatus. パターンサーチと深層学習処理を組み合わせた場合に表示するユーザーインターフェースを示す図である。It is a figure which shows the user interface which displays when the pattern search and the deep learning process are combined. 差分検査と深層学習処理を組み合わせた場合に表示するユーザーインターフェースを示す図である。It is a figure which shows the user interface which displays when the difference inspection and the deep learning process are combined. 学習検査と深層学習処理を組み合わせた場合に表示するユーザーインターフェースを示す図である。It is a figure which shows the user interface which displays when the learning inspection and the deep learning process are combined. 傷検出と深層学習処理を組み合わせた場合に表示するユーザーインターフェースを示す図である。It is a figure which shows the user interface which displays when the scratch detection and the deep learning process are combined. 通常検査処理で不良品判定を行い、残りを深層学習処理で良否判定する場合の手順を示すフローチャートである。It is a flowchart which shows the procedure when the defective product judgment is performed by a normal inspection process, and the quality is judged by a deep learning process for the rest. 深層学習処理のみの累積ヒストグラムと、通常検査処理と深層学習処理を組み合わせた場合の累積ヒストグラムを示す図である。It is a figure which shows the cumulative histogram of only the deep learning process, and the cumulative histogram when the normal inspection process and the deep learning process are combined. 通常検査処理で良品判定を行い、残りを深層学習処理で良否判定する場合の手順を示すフローチャートである。It is a flowchart which shows the procedure when the non-defective product is judged by a normal inspection process, and the rest is judged by a deep learning process. 通常検査処理で良品判定及び不良品判定を確定させ、残りを深層学習処理で良否判定する場合の手順を示すフローチャートである。It is a flowchart which shows the procedure in the case of confirming a good product judgment and a defective product judgment by a normal inspection process, and judging the quality of the rest by a deep learning process. 良品画像と不良品画像とが第1の分布例である場合を示す図6相当図である。FIG. 6 is a diagram corresponding to FIG. 6 showing a case where a non-defective product image and a defective product image are the first distribution examples. 良品画像と不良品画像とが第2の分布例である場合を示す図6相当図である。FIG. 6 is a diagram corresponding to FIG. 6 showing a case where a non-defective product image and a defective product image are the second distribution example. 良品画像と不良品画像とが第1の分布例である場合を示す図7相当図である。FIG. 7 is a diagram corresponding to FIG. 7 showing a case where a non-defective product image and a defective product image are the first distribution examples. 良品画像と不良品画像とが第2の分布例である場合を示す図7相当図である。It is a figure corresponding to FIG. 7 which shows the case where a good product image and a defective product image are the second distribution example. 累積ヒストグラムを表示する場合のユーザーインターフェースを示す図である。It is a figure which shows the user interface when displaying the cumulative histogram. 通常検査処理と深層学習処理の両方で良品画像と不良品画像との分離ができない場合の分布例を示す図16相当図である。FIG. 16 is a diagram corresponding to FIG. 16 showing an example of distribution when a good product image and a defective product image cannot be separated by both the normal inspection process and the deep learning process. 通常検査用閾値表示線を表示した場合の図16相当図である。It is a figure corresponding to FIG. 16 when the threshold value display line for normal inspection is displayed. 累積ヒストグラムの不良品のみの分布、良品のみの分布及び不良品と良品とが混在する分布を示す図である。It is a figure which shows the distribution of only defective products, the distribution of only non-defective products, and the distribution of a mixture of defective products and non-defective products in the cumulative histogram. 数値表示する場合の例を示す図16相当図である。FIG. 16 is a diagram corresponding to FIG. 16 showing an example in the case of displaying numerical values. 通常検査処理と深層学習処理の両方で良品画像と不良品画像との分離ができない場合の分布例を示す図20相当図である。FIG. 20 is a diagram corresponding to FIG. 20 showing an example of distribution when a good product image and a defective product image cannot be separated by both the normal inspection process and the deep learning process. 通常検査用閾値表示線を表示した場合の図20相当図である。It is a figure corresponding to FIG. 20 when the threshold value display line for normal inspection is displayed.

以下、本発明の実施形態を図面に基づいて詳細に説明する。尚、以下の好ましい実施形態の説明は、本質的に例示に過ぎず、本発明、その適用物或いはその用途を制限することを意図するものではない。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. It should be noted that the following description of the preferred embodiment is essentially merely an example and is not intended to limit the present invention, its application or its use.

図1は、本発明の実施形態に係る画像検査装置1の構成を示す模式図である。画像検査装置1は、例えば各種部品や製品等の検査対象物を撮像して取得された検査対象画像に基づいて検査対象物の良否判定を行うための装置であり、工場等の生産現場等で使用することができる。検査対象物は、それ全体が検査対象であってもよいし、検査対象物の一部のみが検査対象であってもよい。また、1つの検査対象物に複数の検査対象が含まれていてもよい。また、検査対象画像には、複数の検査対象物が含まれていてもよい。検査対象物はワークと呼ぶこともできる。 FIG. 1 is a schematic view showing a configuration of an image inspection device 1 according to an embodiment of the present invention. The image inspection device 1 is a device for determining the quality of an inspection object based on an image of the inspection object acquired by imaging an inspection object such as various parts or products, and is used at a production site such as a factory. Can be used. The entire inspection target may be the inspection target, or only a part of the inspection target may be the inspection target. Further, one inspection object may include a plurality of inspection objects. Further, the inspection target image may include a plurality of inspection target objects. The object to be inspected can also be called a work.

画像検査装置1は、装置本体となる制御ユニット2と、撮像ユニット3と、表示装置(表示部)4と、パーソナルコンピュータ5とを備えている。パーソナルコンピュータ5は、必須なものではなく、省略することもできる。表示装置4の代わりにパーソナルコンピュータ5を使用して各種情報や画像を表示させることもできる。図1では、画像検査装置1の構成例の一例として、制御ユニット2、撮像ユニット3、表示装置4及びパーソナルコンピュータ5を別々のものとして記載しているが、これらのうち、任意の複数を組み合わせて一体化することもできる。例えば、制御ユニット2と撮像ユニット3を一体化することや、制御ユニット2と表示装置4を一体化することもできる。また、制御ユニット2を複数のユニットに分割して一部を撮像ユニット3や表示装置4に組み込むことや、撮像ユニット3を複数のユニットに分割して一部を他のユニットに組み込むこともできる。 The image inspection device 1 includes a control unit 2 which is a main body of the device, an image pickup unit 3, a display device (display unit) 4, and a personal computer 5. The personal computer 5 is not essential and may be omitted. A personal computer 5 can be used instead of the display device 4 to display various information and images. In FIG. 1, as an example of the configuration of the image inspection device 1, the control unit 2, the imaging unit 3, the display device 4, and the personal computer 5 are described as separate devices, but any plurality of these may be combined. Can also be integrated. For example, the control unit 2 and the imaging unit 3 can be integrated, or the control unit 2 and the display device 4 can be integrated. Further, the control unit 2 can be divided into a plurality of units and a part thereof can be incorporated into the image pickup unit 3 or the display device 4, or the image pickup unit 3 can be divided into a plurality of units and a part thereof can be incorporated into another unit. ..

(撮像ユニット3の構成)
図2に示すように、撮像ユニット3は、カメラモジュール(撮像部)14と、照明モジュール(照明部)15とを備えており、検査対象画像の取得を実行するユニットである。カメラモジュール14は、撮像光学系を駆動するAF用モータ141と、撮像基板142とを備えている。AF用モータ141は、撮像光学系のレンズを駆動することにより、自動でピント調整を実行する部分であり、従来から周知のコントラストオートフォーカス等の手法によってピント調整を行うことができる。カメラモジュール14による撮像視野範囲(撮像領域)は、検査対象物を含むように設定されている。撮像基板142は、撮像光学系から入射した光を受光する受光素子としてCMOSセンサ143と、FPGA144と、DSP145とを備えている。CMOSセンサ143は、カラー画像を取得することができるように構成された撮像センサである。CMOSセンサ143の代わりに、例えばCCDセンサ等の受光素子を用いることもできる。FPGA144及びDSP145は、撮像ユニット3の内部において画像処理を実行するためのものであり、CMOSセンサ143から出力された信号はFPGA144及びDSP145にも入力されるようになっている。
(Configuration of Imaging Unit 3)
As shown in FIG. 2, the image pickup unit 3 includes a camera module (imaging unit) 14 and an illumination module (illumination unit) 15, and is a unit that executes acquisition of an image to be inspected. The camera module 14 includes an AF motor 141 for driving an imaging optical system and an imaging substrate 142. The AF motor 141 is a portion that automatically performs focus adjustment by driving the lens of the imaging optical system, and can perform focus adjustment by a method such as contrast autofocus, which has been well known in the past. The imaging field of view (imaging area) of the camera module 14 is set to include an inspection object. The image pickup substrate 142 includes a CMOS sensor 143, an FPGA 144, and a DSP 145 as light receiving elements that receive light incident from the image pickup optical system. The CMOS sensor 143 is an imaging sensor configured to be able to acquire a color image. Instead of the CMOS sensor 143, a light receiving element such as a CCD sensor can also be used. The FPGA 144 and the DSP 145 are for executing image processing inside the image pickup unit 3, and the signal output from the CMOS sensor 143 is also input to the FPGA 144 and the DSP 145.

照明モジュール15は、検査対象物を含む撮像領域を照明する発光体としてのLED(発光ダイオード)151と、LED151を制御するLEDドライバ152とを備えている。LED151による発光タイミング、発光時間、発光量は、LEDドライバ152によって任意に設定することができる。LED151は、撮像ユニット3に一体に設けてもよいし、撮像ユニット3とは別体として外部照明ユニットとして設けてもよい。図示しないが、照明モジュール15には、LED151から照射された光を反射するリフレクターや、LED151から照射された光が通過するレンズ等が設けられている。LED151から照射された光が検査対象物と、検査対象物の周辺領域に照射されるように、LED151の照射範囲が設定されている。発光ダイオード以外の発光体を使用することもできる。 The lighting module 15 includes an LED (light emitting diode) 151 as a light emitting body that illuminates an imaging region including an inspection object, and an LED driver 152 that controls the LED 151. The light emission timing, light emission time, and light emission amount of the LED 151 can be arbitrarily set by the LED driver 152. The LED 151 may be provided integrally with the image pickup unit 3, or may be provided as an external lighting unit separately from the image pickup unit 3. Although not shown, the lighting module 15 is provided with a reflector that reflects the light emitted from the LED 151, a lens through which the light emitted from the LED 151 passes, and the like. The irradiation range of the LED 151 is set so that the light emitted from the LED 151 irradiates the inspection target and the peripheral area of the inspection target. A light emitter other than the light emitting diode can also be used.

(制御ユニット2の構成)
制御ユニット2は、メイン基板13と、コネクタ基板16と、通信基盤17と、電源基板18とを備えている。メイン基板13には、FPGA131と、DSP132と、メモリ133とが搭載されている。FPGA131とDSP132は制御部13Aを構成するものであり、これらが一体化された主制御部を設けることもできる。
(Configuration of control unit 2)
The control unit 2 includes a main board 13, a connector board 16, a communication board 17, and a power supply board 18. The FPGA 131, the DSP 132, and the memory 133 are mounted on the main board 13. The FPGA 131 and DSP 132 constitute a control unit 13A, and a main control unit in which these are integrated can be provided.

メイン基板13の制御部13Aは、接続されている各基板及びモジュールの動作を制御する。例えば、制御部13Aは、照明モジュール15のLEDドライバ152に対してLED151の点灯/消灯を制御する照明制御信号を出力する。LEDドライバ152は、制御部13Aからの照明制御信号に応じて、LED151の点灯/消灯の切替及び点灯時間の調整を行うとともに、LED151の光量等を調整する。 The control unit 13A of the main board 13 controls the operation of each connected board and module. For example, the control unit 13A outputs a lighting control signal for controlling the lighting / extinguishing of the LED 151 to the LED driver 152 of the lighting module 15. The LED driver 152 switches the lighting / extinguishing of the LED 151 and adjusts the lighting time according to the lighting control signal from the control unit 13A, and also adjusts the amount of light of the LED 151 and the like.

また、制御部13Aは、カメラモジュール14の撮像基板142に、CMOSセンサ143を制御する撮像制御信号を出力する。CMOSセンサ143は、制御部13Aからの撮像制御信号に応じて、撮像を開始するとともに、露光時間を任意の時間に調整して撮像を行う。すなわち、撮像ユニット3は、制御部13Aから出力される撮像制御信号に応じてCMOSセンサ143の視野範囲内を撮像し、視野範囲内に検査対象物があれば、検査対象物を撮像することになるが、検査対象物以外の物が視野範囲内にあれば、それも撮像することができる。例えば、画像検査装置1の設定時には、使用者により良品としての属性を付与された良品画像と、不良品としての属性を付与された不良品画像とを撮像することができる。画像検査装置1の運用時には、検査対象物を撮像することができる。また、CMOSセンサ143は、ライブ画像、即ち現在の撮像された画像を短いフレームレートで随時出力することができるように構成されている。 Further, the control unit 13A outputs an image pickup control signal for controlling the CMOS sensor 143 to the image pickup board 142 of the camera module 14. The CMOS sensor 143 starts imaging in response to the imaging control signal from the control unit 13A, and adjusts the exposure time to an arbitrary time to perform imaging. That is, the image pickup unit 3 takes an image within the visual field range of the CMOS sensor 143 in response to the image pickup control signal output from the control unit 13A, and if there is an inspection object within the visual field range, the image pickup unit 3 takes an image of the inspection object. However, if an object other than the inspection object is within the field of view, it can also be imaged. For example, at the time of setting the image inspection device 1, it is possible to take an image of a non-defective product to which an attribute as a non-defective product is given by the user and an image of a defective product to which the attribute as a defective product is given. When the image inspection device 1 is in operation, the inspection object can be imaged. Further, the CMOS sensor 143 is configured so that a live image, that is, a currently captured image can be output at a short frame rate at any time.

CMOSセンサ143による撮像が終わると、撮像ユニット3から出力された画像信号は、メイン基板13のFPGA131に入力され、FPGA131及びDSP132によって処理されるとともに、メモリ133に記憶されるようになっている。メイン基板13の制御部13Aによる具体的な処理内容の詳細については後述する。 When the imaging by the CMOS sensor 143 is completed, the image signal output from the imaging unit 3 is input to the FPGA 131 of the main board 13, processed by the FPGA 131 and the DSP 132, and stored in the memory 133. The details of the specific processing contents by the control unit 13A of the main board 13 will be described later.

コネクタ基板16は、電源インターフェース161に設けてある電源コネクタ(図示せず)を介して外部から電力の供給を受ける部分である。電源基板18は、コネクタ基板16で受けた電力を各基板及びモジュール等に分配する部分であり、具体的には、照明モジュール15、カメラモジュール14、メイン基板13、及び通信基板17に電力を分配する。電源基板18は、AF用モータドライバ181を備えている。AF用モータドライバ181は、カメラモジュール14のAF用モータ141に駆動電力を供給し、オートフォーカスを実現している。AF用モータドライバ181は、メイン基板13の制御部13AからのAF制御信号に応じて、AF用モータ141に供給する電力を調整する。 The connector board 16 is a portion that receives power from the outside via a power connector (not shown) provided in the power interface 161. The power supply board 18 is a portion that distributes the electric power received by the connector board 16 to each board, a module, and the like. Specifically, the electric power is distributed to the lighting module 15, the camera module 14, the main board 13, and the communication board 17. To do. The power supply board 18 includes an AF motor driver 181. The AF motor driver 181 supplies drive power to the AF motor 141 of the camera module 14 to realize autofocus. The AF motor driver 181 adjusts the power supplied to the AF motor 141 in response to the AF control signal from the control unit 13A of the main board 13.

通信基板17は、メイン基板13の制御部13Aから出力された検査対象物の良否判定信号、画像データ、ユーザーインターフェース等を表示装置4やパーソナルコンピュータ5、外部制御機器(図示せず)等に出力する。表示装置4やパーソナルコンピュータ5は、例えば液晶パネル等からなる表示パネルを有しており、画像データやユーザーインターフェース等は表示パネルに表示される。 The communication board 17 outputs the quality determination signal, image data, user interface, etc. of the inspection object output from the control unit 13A of the main board 13 to the display device 4, the personal computer 5, an external control device (not shown), or the like. To do. The display device 4 and the personal computer 5 have a display panel including, for example, a liquid crystal panel, and image data, a user interface, and the like are displayed on the display panel.

また、通信基板17は、表示装置4が有するタッチパネル41やパーソナルコンピュータ5のキーボード51等から入力された使用者の各種操作を受け付けることができるように構成されている。表示装置4のタッチパネル41は、例えば感圧センサを搭載した従来から周知のタッチ式操作パネルであり、使用者によるタッチ操作を検出して通信基板17へ出力する。パーソナルコンピュータ5は、操作デバイスとしてキーボード51及びマウス52を備えている。パーソナルコンピュータ5は、操作デバイスとしてタッチパネル(図示せず)を備えていてもよい。パーソナルコンピュータ5は、これら操作デバイスから入力された使用者の各種操作を受け付けることができるように構成されている。通信は、有線であってもよいし、無線であってもよく、いずれの通信形態も、従来から周知の通信モジュールによって実現することができる。 Further, the communication board 17 is configured to be able to receive various operations of the user input from the touch panel 41 of the display device 4, the keyboard 51 of the personal computer 5, and the like. The touch panel 41 of the display device 4 is, for example, a conventionally known touch-type operation panel equipped with a pressure-sensitive sensor, and detects a touch operation by the user and outputs the touch operation to the communication board 17. The personal computer 5 includes a keyboard 51 and a mouse 52 as operation devices. The personal computer 5 may include a touch panel (not shown) as an operation device. The personal computer 5 is configured to be able to receive various operations of the user input from these operation devices. The communication may be wired or wireless, and any communication form can be realized by a conventionally known communication module.

制御ユニット2には、例えばハードディスクドライブ等の記憶装置19が設けられている。記憶装置19には、後述する各制御及び処理を上記ハードウエアによって実行可能にするためのプログラムファイル80や設定ファイル等(ソフトウエア)が記憶されている。プログラムファイル80や設定ファイルは、例えば光ディスク等の記憶媒体90に格納しておき、この記憶媒体90に格納されたプログラムファイル80や設定ファイルを制御ユニット2にインストールすることができる。また、記憶装置19には、上記画像データや良否判定結果等を記憶させておくこともできる。 The control unit 2 is provided with a storage device 19 such as a hard disk drive. The storage device 19 stores a program file 80, a setting file, and the like (software) for enabling each control and process described later to be executed by the hardware. The program file 80 and the setting file can be stored in a storage medium 90 such as an optical disk, and the program file 80 and the setting file stored in the storage medium 90 can be installed in the control unit 2. Further, the storage device 19 can store the image data, the quality determination result, and the like.

(画像検査装置1の具体的な構成)
図3は、画像検査装置1のブロック図であり、プログラムファイル80や設定ファイルがインストールされた制御ユニット2により、図3に示す各部が構成される。すなわち、画像検査装置1は、画像入力部21と、通常検査設定部(通常検査設定手段の一例)22と、深層学習設定部(深層学習設定手段の一例)23と、検査実行部(検査実行手段の一例)24と、表示制御部25と、閾値調整部(閾値調整手段の一例)26と、検査選択部(検査選択手段の一例)27とを備えている。表示制御部25と表示装置4とによって表示手段が構成されている。これら各部21〜27や手段は、ハードウエアのみで構成されていてもよいし、ハードウエアとソフトウエアとの組み合わせによって構成されていてもよい。例えば、閾値調整部26には、キーボード51やマウス52を含むこともできる。
(Specific configuration of image inspection device 1)
FIG. 3 is a block diagram of the image inspection device 1, and each part shown in FIG. 3 is configured by the control unit 2 in which the program file 80 and the setting file are installed. That is, the image inspection device 1 includes an image input unit 21, a normal inspection setting unit (an example of a normal inspection setting means) 22, a deep learning setting unit (an example of a deep learning setting means) 23, and an inspection execution unit (an inspection execution unit). An example of means) 24, a display control unit 25, a threshold value adjusting unit (an example of a threshold value adjusting means) 26, and an inspection selection unit (an example of an inspection selection means) 27 are provided. A display means is composed of a display control unit 25 and a display device 4. Each of these parts 21 to 27 and means may be composed of only hardware, or may be composed of a combination of hardware and software. For example, the threshold value adjusting unit 26 may include a keyboard 51 and a mouse 52.

また、図3に示す各部21〜27は、概念的に独立したように示しているが、任意の2つ以上の部分が統合された形態であってもよく、図示した形態に限られるものではない。また、各部21〜27や手段は、それぞれが独立したハードウエアで構成されたものであってもよいし、1つのハードウエアまたはソフトウエアによって複数の機能が実現されるように構成されたものであってもよい。また、図3に示す各部21〜27や手段の機能や作用は、メイン基板13の制御部13Aによる制御で実現することもできる。 Further, although the parts 21 to 27 shown in FIG. 3 are shown as conceptually independent, they may be in a form in which any two or more parts are integrated, and are not limited to the illustrated form. Absent. Further, each of the parts 21 to 27 and the means may be configured by independent hardware, or may be configured so that a plurality of functions are realized by one hardware or software. There may be. Further, the functions and operations of the respective units 21 to 27 and the means shown in FIG. 3 can be realized by the control by the control unit 13A of the main board 13.

画像検査装置1は、少なくとも2種類の検査、即ち、通常検査処理による検査対象物の検査と、深層学習処理による検査対象物の検査とを行うことが可能に構成されている。通常検査処理とは、検査対象物を撮像した画像を用いた一般的な検査処理のことであり、画像内の検査対象物の様々な特徴量(色、エッジ、位置等)に基づいて検査対象物の良否の判定を行う処理である。通常検査処理には、例えば、パターンサーチ、差分検査、学習検査、傷検出等が含まれるが、これら以外の検査処理が含まれていてもよい。 The image inspection apparatus 1 is configured to be capable of performing at least two types of inspections, that is, inspection of an inspection object by a normal inspection process and inspection of an inspection object by a deep learning process. The normal inspection process is a general inspection process using an image of an image to be inspected, and is an inspection target based on various feature quantities (color, edge, position, etc.) of the object to be inspected in the image. This is a process for determining the quality of an object. The normal inspection process includes, for example, pattern search, difference inspection, learning inspection, scratch detection, and the like, but inspection processes other than these may be included.

一方、深層学習処理は、事前に複数の良品属性が付与された画像と、不良品属性が付与された画像とのうち、少なくとも一方を多層のニューラルネットワークに入力し、良品画像と不良品画像とを識別できるように、ネットワーク内の複数のパラメータを調整して得られた学習済みのニューラルネットワークを用いる検査処理のことである。ここで用いるニューラルネットワークは3層以上であり、いわゆるディープラーニングが可能なニューラルネットワークである。 On the other hand, in the deep learning process, at least one of the image to which a plurality of good product attributes are given in advance and the image to which the bad product attribute is given is input to the multi-layer neural network, and the good product image and the defective product image are obtained. It is an inspection process using a trained neural network obtained by adjusting a plurality of parameters in the network so that the image can be identified. The neural network used here has three or more layers, and is a neural network capable of so-called deep learning.

詳細は後述するが、通常検査処理と深層学習処理とのうち、一方の検査処理のみで安定的な検査が行える場合には、一方の検査処理のみ行うことができる。また、通常検査処理と深層学習処理の両方を併用することで、例えば通常検査処理では判定が難しい検査を深層学習処理で高精度に判定できる。また、学習に用いていない未知のデータが入力された場合に起こり得る深層学習処理に特有の不安定な挙動を、通常検査処理のみの検査処理によって回避することができるようになる。 Details will be described later, but if a stable inspection can be performed by only one of the normal inspection process and the deep learning process, only one of the inspection processes can be performed. Further, by using both the normal inspection process and the deep learning process together, for example, an inspection that is difficult to determine by the normal inspection process can be determined with high accuracy by the deep learning process. In addition, unstable behavior peculiar to deep learning processing that may occur when unknown data not used for learning is input can be avoided by inspection processing only for normal inspection processing.

また、画像検査装置1は、撮像設定等の各種パラメータ設定、マスター画像の登録、通常検査処理の設定、深層学習処理の設定等を行う設定モードと、実際の現場において検査対象物を撮像した検査対象画像に基づいて検査対象物の良否判定を行う運転モード(Runモード)とに切り替えられるようになっている。設定モードでは、使用者が所望の製品検査で良品と不良品とを分けることができるようにするための事前の作業を行うことが可能になっており、この作業には、ニューラルネットワークの学習作業が含まれている。設定モードと運転モードとの切替は、図示しないユーザーインターフェース上で行うことができる他、設定モードの完了と同時に運転モードに自動で移行するように構成することもできる。運転モードから設定モードへの移行も任意に行えるようになっている。また、運転モードにおいて、ニューラルネットワークの再学習を行うこともできる。 In addition, the image inspection device 1 has a setting mode for setting various parameters such as imaging settings, registering a master image, setting a normal inspection process, setting a deep learning process, and the like, and an inspection in which an inspection object is imaged at an actual site. It is possible to switch to an operation mode (Run mode) in which the quality of the inspection target is determined based on the target image. In the setting mode, it is possible to perform pre-work to enable the user to distinguish between non-defective products and defective products in the desired product inspection, and this work is a neural network learning work. It is included. Switching between the setting mode and the operation mode can be performed on a user interface (not shown), and the operation mode can be automatically switched to the operation mode as soon as the setting mode is completed. The transition from the operation mode to the setting mode can also be performed arbitrarily. It is also possible to relearn the neural network in the operation mode.

(画像入力部21の構成)
図3に示す画像入力部21は、設定モード時に、良品属性が付与された複数の良品画像及び/又は不良品属性が付与された複数の不良品画像を深層学習設定部23に入力する部分であるとともに、登録画像を通常検査設定部22に入力する部分である。また、画像入力部21は、運転モード時に、新たに取得された検査対象画像を検査実行部24に入力する部分でもある。
(Structure of image input unit 21)
The image input unit 21 shown in FIG. 3 is a portion for inputting a plurality of non-defective product images to which the non-defective product attribute is given and / or a plurality of defective product images to which the defective product attribute is assigned to the deep learning setting unit 23 in the setting mode. At the same time, it is a part for inputting a registered image to the normal inspection setting unit 22. Further, the image input unit 21 is also a part for inputting the newly acquired inspection target image to the inspection execution unit 24 in the operation mode.

具体的には、設定モード時に、使用者が検査対象物を撮像ユニット3のCMOSセンサ143の視野範囲に置くと、制御部13Aは、CMOSセンサ143で撮像されたライブ画像を画像入力用ユーザーインターフェース(図示せず)の一部に組み込み、このライブ画像が組み込まれた画像入力用ユーザーインターフェースを表示装置4に表示させる。検査対象物が画像入力用ユーザーインターフェースに表示されている状態で使用者が画像の取り込み操作を行うと、その時点で画像入力用ユーザーインターフェースに表示されている画像、即ち使用者が取り込みたい画像が静止画として取り込まれる。取り込まれた画像は、メモリ133や記憶装置19に記憶される。使用者による画像の取り込み操作は、例えば画像入力用ユーザーインターフェースに組み込まれたボタン操作、キーボード51やマウス52の操作等を挙げることができる。 Specifically, when the user places the inspection object in the field of view of the CMOS sensor 143 of the image pickup unit 3 in the setting mode, the control unit 13A displays the live image captured by the CMOS sensor 143 as an image input user interface. It is incorporated in a part (not shown), and the image input user interface in which the live image is incorporated is displayed on the display device 4. When the user performs an image capture operation while the inspection object is displayed on the image input user interface, the image displayed on the image input user interface at that time, that is, the image that the user wants to capture is displayed. Captured as a still image. The captured image is stored in the memory 133 or the storage device 19. Examples of the image capture operation by the user include a button operation incorporated in the image input user interface, an operation of the keyboard 51 and the mouse 52, and the like.

使用者は、画像を取り込む際に、良品属性と不良品属性との一方を付与することができる。例えば、画像入力用ユーザーインターフェースに「良品取り込みボタン」及び「不良品取り込みボタン」を設けておき、画像入力用ユーザーインターフェースに表示されている画像の取り込み時に、「良品取り込みボタン」の操作がなされた場合には、その時点で取り込まれた画像は、良品属性が付与された良品画像として取り込むことができ、一方、「不良品取り込みボタン」の操作がなされた場合には、その時点で取り込まれた画像は、不良品属性が付与された良品画像として取り込むことができる。これを繰り返すことで、複数の良品画像及び複数の不良品画像を取り込むことができる。複数の良品画像を入力する場合、異なる良品を撮像した画像であってもよいし、1つの良品の角度や位置を変えて複数回撮像した画像であってもよい。また、画像検査装置1の内部で例えば画像の明るさを変更する等して、複数の良品画像及び複数の不良品画像を生成してもよい。良品画像及び不良品画像は、それぞれ、例えば100枚程度用意しておく。例えば、傷を検出する場合には、傷が入った不良品画像を用意することになるが、これは使用者が作成してもよいし、画像検査装置1が自動で作成するようにしてもよい。 When capturing an image, the user can give one of a non-defective product attribute and a defective product attribute. For example, a "non-defective product import button" and a "defective product import button" are provided in the image input user interface, and the "non-defective product import button" is operated when the image displayed on the image input user interface is imported. In that case, the image captured at that time can be captured as a non-defective image with the non-defective attribute, while if the "defective product capture button" is operated, it is captured at that time. The image can be imported as a non-defective product image to which the defective product attribute is added. By repeating this, a plurality of non-defective product images and a plurality of defective product images can be captured. When a plurality of non-defective product images are input, it may be an image obtained by capturing different non-defective products, or may be an image captured a plurality of times by changing the angle or position of one non-defective product. Further, a plurality of non-defective product images and a plurality of defective product images may be generated inside the image inspection device 1, for example, by changing the brightness of the image. For example, about 100 images of non-defective products and images of defective products are prepared. For example, when detecting a scratch, a defective image with a scratch is prepared, but this may be created by the user or may be automatically created by the image inspection device 1. Good.

深層学習用の画像として、良品画像のみ、または不良品画像のみを取り込むこともできる。また、良品属性及び不良品属性を画像に付与する方法は、上述した方法に限られるものではなく、例えば画像の取り込み後に付与する方法であってもよい。また、良品属性及び不良品属性を付与した後に、属性の修正を受け付けることが可能に構成することもできる。 As an image for deep learning, only a good product image or only a defective product image can be captured. Further, the method of imparting the non-defective product attribute and the defective product attribute to the image is not limited to the above-mentioned method, and may be, for example, a method of imparting the image after capturing the image. It is also possible to configure it so that it is possible to accept modification of the attribute after assigning the non-defective product attribute and the defective product attribute.

使用者は、通常検査処理で使用する登録画像をマスター画像として取り込むことができる。登録画像は、例えば新たに取得された検査対象画像との差分をブロブ(塊)検出することによって良否判定を行う差分検査を行う際に使用することができる。また、登録画像は、正規化相関を用いて良否判定を行う際等に使用することができる。例えば、画像入力用ユーザーインターフェースに「登録画像取り込みボタン」を設けておき、画像入力用ユーザーインターフェースに表示されている画像の取り込み時に、「登録画像取り込みボタン」の操作がなされた場合には、その時点で取り込まれた画像を登録画像とすることができる。画像の取り込み後に、取り込んだ画像を登録画像として設定することもできる。 The user can import the registered image used in the normal inspection process as the master image. The registered image can be used, for example, when performing a difference inspection for determining quality by detecting a blob (lump) of a difference from a newly acquired image to be inspected. In addition, the registered image can be used when making a pass / fail judgment using the normalized correlation. For example, if a "registered image capture button" is provided in the image input user interface and the "registered image capture button" is operated when the image displayed on the image input user interface is captured, the operation is performed. The image captured at that time can be used as a registered image. After importing the image, the imported image can be set as a registered image.

運転モード時には、検査対象物がCMOSセンサ143の視野範囲に入った状態で、制御部13Aは、CMOSセンサ143によって検査対象物を撮像して検査対象画像を取り込む。検査対象画像の取り込みを行うトリガーとなる信号は、従来から周知であり、例えば画像検査装置1の外部から入力される信号であってもよいし、画像検査装置1の内部で生成される信号であってもよい。 In the operation mode, the control unit 13A takes an image of the inspection object by the CMOS sensor 143 and captures the inspection target image while the inspection object is in the field of view of the CMOS sensor 143. The signal that triggers the capture of the image to be inspected is well known from the past, and may be, for example, a signal input from the outside of the image inspection device 1 or a signal generated inside the image inspection device 1. There may be.

(通常検査設定部22の構成)
通常検査設定部22は、通常検査に用いる特徴量の設定と、当該特徴量と比較される良否判定の基準となる通常検査用閾値の設定とを使用者から受け付けることにより、通常検査処理の設定を行う部分である。通常検査に用いる特徴量とは、例えば検査対象物の色、検査対象物のエッジ、検査対象物の位置等を挙げることができる。検査対象物のエッジ情報には、エッジの位置、形状、長さ等が含まれる。検査対象物の位置は、検査対象物自体の位置の他、検査対象物の一部の位置も含まれる。通常検査に用いる特徴量は、1つであってもよいし、2つ以上であってもよい。
(Structure of normal inspection setting unit 22)
The normal inspection setting unit 22 sets the normal inspection process by accepting from the user the setting of the feature amount used for the normal inspection and the setting of the threshold value for the normal inspection which is a standard for quality judgment to be compared with the feature amount. Is the part to do. Examples of the feature amount used in the normal inspection include the color of the inspection target, the edge of the inspection target, the position of the inspection target, and the like. The edge information of the inspection object includes the position, shape, length, etc. of the edge. The position of the inspection object includes not only the position of the inspection object itself but also the position of a part of the inspection object. The feature amount used for the usual inspection may be one or two or more.

通常検査に用いる特徴量の設定を行う際には、制御部13Aが生成する特徴量設定用ユーザーインターフェース(図示せず)を表示装置4に表示させ、その特徴量設定用ユーザーインターフェースで使用者の操作を受け付ける。特徴量設定用ユーザーインターフェースには、上述した特徴量の入力や選択等を行う特徴量設定部が設けられており、使用者が特徴量設定部に対してキーボード51やマウス52によって入力操作を行うと、その入力操作が制御部13Aで受け付けられ、検査に用いる特徴量の設定が完了する。設定された特徴量は、メモリ133や記憶装置19に記憶される。 When setting the feature amount used for the normal inspection, the feature amount setting user interface (not shown) generated by the control unit 13A is displayed on the display device 4, and the user interface is used to display the feature amount setting user interface. Accept operations. The feature amount setting user interface is provided with a feature amount setting unit for inputting and selecting the above-mentioned feature amount, and the user performs an input operation on the feature amount setting unit with the keyboard 51 or the mouse 52. Then, the input operation is accepted by the control unit 13A, and the setting of the feature amount used for the inspection is completed. The set feature amount is stored in the memory 133 or the storage device 19.

また、上述のようにして設定された特徴量は、良否判定の基準となる通常検査用閾値と比較され、その結果、検査対象画像が良品であるか不良品であるかを、後述する検査実行部24が判定することになる。このとき用いられる良否判定の基準となる通常検査用閾値の設定を行う際には、制御部13Aが生成する閾値設定用ユーザーインターフェース(図示せず)を表示装置4に表示させ、その閾値設定用ユーザーインターフェースで使用者の操作を受け付ける。閾値設定用ユーザーインターフェースには、上述した通常検査用閾値の入力を行うための閾値入力部が設けられている。使用者が閾値入力部に対してキーボード51やマウス52によって閾値の入力操作を行うと、その入力操作が制御部13Aで受け付けられ、閾値の入力及び設定が完了する。設定された通常検査用閾値は、メモリ133や記憶装置19に記憶される。通常検査用閾値は、画像検査装置1が自動的に設定した後、使用者が調整することで最終的な入力が完了するようにしてもよい。通常検査用閾値は、通常検査処理で用いられる閾値であり、深層学習処理の検査では用いられない。 In addition, the feature amount set as described above is compared with the threshold value for normal inspection, which is a criterion for determining the quality, and as a result, it is determined whether the image to be inspected is a good product or a defective product, which will be described later. The unit 24 will determine. When setting the normal inspection threshold value used at this time as a reference for pass / fail judgment, the threshold value setting user interface (not shown) generated by the control unit 13A is displayed on the display device 4, and the threshold value setting is performed. Accept user operations on the user interface. The threshold value setting user interface is provided with a threshold value input unit for inputting the above-mentioned normal inspection threshold value. When the user performs a threshold value input operation on the threshold value input unit with the keyboard 51 or the mouse 52, the input operation is accepted by the control unit 13A, and the threshold value input and setting are completed. The set normal inspection threshold value is stored in the memory 133 or the storage device 19. The threshold value for normal inspection may be set automatically by the image inspection apparatus 1 and then adjusted by the user to complete the final input. The threshold value for normal inspection is a threshold value used in the normal inspection process and is not used in the inspection of the deep learning process.

通常検査用閾値を使用者から受け付ける際、良品判定を確定させる良品確定用閾値と、不良品判定を確定させる不良品確定用閾値とを受け付けるように構成することもできる。良品確定用閾値は、この閾値を基準として、例えば閾値以上であれば良品、または閾値以下であれば良品といった良品の判定を行う閾値であり、良品を確定できる程度に確度の高い閾値に設定することができる。一方、不良品確定用閾値は、この閾値を基準として、例えば閾値以上であれば不良品、または閾値以下であれば不良品といった不良品の判定を行う閾値であり、不良品を確定できる程度に確度の高い閾値に設定することができる。良品確定用閾値と不良品確定用閾値とは、どちらか一方のみ受け付けるようにしてもよいし、両方を受け付けるようにしてもよい。良品確定用閾値と不良品確定用閾値とが入力された場合には、識別可能な状態でメモリ133や記憶装置19に記憶される。 When accepting the normal inspection threshold value from the user, it can be configured to accept the non-defective product confirmation threshold value for confirming the non-defective product determination and the defective product confirmation threshold value for confirming the defective product determination. The non-defective product determination threshold is a threshold value for determining a non-defective product such as a non-defective product if it is above the threshold value or a non-defective product if it is below the threshold value, and is set to a threshold value with high accuracy so that the non-defective product can be determined. be able to. On the other hand, the threshold value for determining defective products is a threshold value for determining defective products such as defective products if it is above the threshold value or defective products if it is below the threshold value, and to the extent that defective products can be determined. It can be set to a highly accurate threshold. Only one of the non-defective product confirmation threshold value and the defective product confirmation threshold value may be accepted, or both may be accepted. When the non-defective product determination threshold value and the defective product determination threshold value are input, they are stored in the memory 133 or the storage device 19 in an identifiable state.

(深層学習設定部23の構成)
深層学習設定部23は、良品属性が付与された複数の良品画像及び/又は不良品属性が付与された複数の不良品画像を、ニューラルネットワークの入力層に入力して当該ニューラルネットワークに学習させ、新たに取得された検査対象画像を良品画像と不良品画像に分類する深層学習処理の設定を行う部分である。ニューラルネットワークは、制御部13A上に構築することができ、少なくとも、入力層、中間層及び出力層を有している。
(Structure of deep learning setting unit 23)
The deep learning setting unit 23 inputs a plurality of non-defective product images to which the non-defective product attribute is given and / or a plurality of defective product images to which the defective product attribute is given to the input layer of the neural network and causes the neural network to learn. This is the part that sets the deep learning process that classifies the newly acquired image to be inspected into a non-defective image and a defective image. The neural network can be constructed on the control unit 13A and has at least an input layer, an intermediate layer and an output layer.

良品画像や不良品画像は、画像入力部21によって取得されているので、深層学習設定部23は、画像入力部21で取得された良品画像や不良品画像をニューラルネットワークの入力層に入力する。ニューラルネットワークの入力層には、良品画像のみを入力してもよいし、不良品画像のみを入力してもよいし、良品画像及び不良品画像の両方を入力してもよい。これは画像の取得状況に応じて自動的に変更してもよいし、使用者が選択できるようにしてもよい。 Since the non-defective product image and the defective product image are acquired by the image input unit 21, the deep learning setting unit 23 inputs the non-defective product image and the defective product image acquired by the image input unit 21 to the input layer of the neural network. Only the non-defective product image may be input to the input layer of the neural network, only the defective product image may be input, or both the non-defective product image and the defective product image may be input. This may be automatically changed according to the image acquisition status, or may be selectable by the user.

深層学習設定部23は、正解情報(入力した画像が良品であるか、不良品であるか)もニューラルネットワークに提供し、複数の良品画像及び/又は複数の不良品画像と、正解情報とを利用してニューラルネットワークに学習させる。これにより、ニューラルネットワークの複数の初期パラメータが変更されて正答率の高いパラメータになる。このニューラルネットワークの学習は、良品画像や不良品画像が入力された時点で自動的に行わせることもできる。ニューラルネットワークに学習させることで、良品画像と不良品画像との識別が可能な識別器が生成され、新たに取得された検査対象画像を識別器によって良品画像と不良品画像に分類することができるようになる。この識別器は、図3に示す識別器生成部23aによって生成することができる。 The deep learning setting unit 23 also provides correct answer information (whether the input image is a good product or a defective product) to the neural network, and obtains a plurality of good product images and / or a plurality of defective product images and correct answer information. Let the neural network learn by using it. As a result, a plurality of initial parameters of the neural network are changed to become parameters with a high correct answer rate. The learning of this neural network can also be automatically performed when a good product image or a defective product image is input. By training the neural network, a classifier capable of distinguishing between a non-defective image and a defective image is generated, and the newly acquired image to be inspected can be classified into a non-defective image and a defective image by the classifier. Will be. This classifier can be generated by the classifier generation unit 23a shown in FIG.

ニューラルネットワークは、CNN(Convolutional Neural Network)をベースにした識別型ネットワークであってもよいし、オートエンコーダーに代表される復元型ニューラルネットワークであってもよい。識別型ネットワークの場合、出力値を正規化した値(一般的にはソフトマックス関数と呼ばれる正規化関数が用いられる)を良否判定の基準となる閾値(深層学習処理用閾値)とすることができる。深層学習処理用閾値は、良品判定の基準となる良品判定用閾値と、不良品判定の基準となる不良品判定用閾値とを含むことができ、いずれの閾値も正規化した値を用いることができる。深層学習処理用閾値と、上記通常検査用閾値とは独立している。 The neural network may be an identification type network based on a CNN (Convolutional Neural Network), or may be a restoration type neural network typified by an autoencoder. In the case of an identification type network, a value obtained by normalizing the output value (generally, a normalization function called a softmax function is used) can be used as a threshold value (threshold value for deep learning processing) as a criterion for quality judgment. .. The threshold value for deep learning processing can include a threshold value for determining a non-defective product which is a standard for determining a non-defective product and a threshold value for determining a defective product which is a standard for determining a defective product, and a normalized value can be used for each threshold value. it can. The threshold value for deep learning processing and the threshold value for normal inspection are independent of each other.

復元型ニューラルネットワーク、特にオートエンコーダーの場合、例としては、設定モード時に良品画像データを入力し、入力データをそのまま復元して出力するように事前に学習させておくことができる。運用モード時には、新たに取得された検査対象画像を学習済みのニューラルネットワークに入力して復元画像を得る。ニューラルネットワークに入力した画像と、復元画像との差を取り、差分が一定以上あった場合に不良品、一定未満の場合に良品と判定するように構成できる。ニューラルネットワークに入力した画像と復元画像との階調値の差分を総和して判定する方法や、差分が一定以上あるピクセル数を総和して判定する方法などがあり、いずれの方法を用いてもよい。このように、深層学習処理用閾値は、画像のピクセル数(画素数)や面積を用いて決めてもよい。 In the case of a restoration type neural network, particularly an autoencoder, as an example, it is possible to input non-defective image data in the setting mode and train in advance to restore and output the input data as it is. In the operation mode, the newly acquired image to be inspected is input to the trained neural network to obtain a restored image. The difference between the image input to the neural network and the restored image can be taken, and if the difference is more than a certain value, it is judged as a defective product, and if it is less than a certain value, it is judged as a good product. There are a method of summing up the difference between the gradation values of the image input to the neural network and the restored image, and a method of summing up the number of pixels with a certain difference or more, and any method can be used. Good. As described above, the threshold value for deep learning processing may be determined by using the number of pixels (number of pixels) or the area of the image.

(検査実行部24の構成)
検査実行部24は、新たに取得された良品属性が付与された良品画像と不良品属性が付与された不良品画像の両方に対し、通常検査処理と深層学習処理とを適用するように構成されている。新たに取得された良品属性が付与された良品画像と、新たに取得された不良品属性が付与された不良品画像とは、通常検査設定部22による通常検査処理の設定及び深層学習設定部23による深層学習処理の設定が終わった後に、取得された画像である。尚、検査実行部24は、設定モード時における検査と、運転モード時における検査の両方を行うことが可能に構成されている。
(Structure of inspection execution unit 24)
The inspection execution unit 24 is configured to apply the normal inspection process and the deep learning process to both the newly acquired non-defective product image with the non-defective product attribute and the defective product image with the defective product attribute. ing. The newly acquired non-defective product image to which the non-defective product attribute is added and the newly acquired defective product image to which the defective product attribute is assigned are the setting of the normal inspection process by the normal inspection setting unit 22 and the deep learning setting unit 23. It is an image acquired after the setting of the deep learning process by is completed. The inspection execution unit 24 is configured to be capable of performing both an inspection in the setting mode and an inspection in the operation mode.

検査実行部24は、新たに取得された良品画像に対して通常検査処理を適用することで、当該良品画像に対して通常検査処理を行った場合の正答率を算出し、また、新たに取得された不良品画像に対して通常検査処理を適用することで、当該不良品画像に対して通常検査処理を行った場合の正答率を算出する。さらに、検査実行部24は、新たに取得された良品画像に対して深層学習処理を適用することで、当該良品画像に対して深層学習処理を行った場合の正答率を算出し、また、新たに取得された不良品画像に対して深層学習処理を適用することで、当該不良品画像に対して深層学習処理を行った場合の正答率を算出する。 The inspection execution unit 24 applies the normal inspection process to the newly acquired non-defective product image to calculate the correct answer rate when the normal inspection process is performed on the non-defective product image, and newly acquires the correct answer rate. By applying the normal inspection process to the defective product image, the correct answer rate when the normal inspection process is performed on the defective product image is calculated. Further, the inspection execution unit 24 applies the deep learning process to the newly acquired good product image to calculate the correct answer rate when the deep learning process is performed on the good product image, and also newly By applying the deep learning process to the defective product image acquired in, the correct answer rate when the deep learning process is performed on the defective product image is calculated.

正答率とは、例えば良品かどうかの確かさ(確度)である。深層学習処理の場合、出力値を正規化した値に基づいて、良品画像に近いのか、不良品画像に近いのかを判定し、良品に近いほど良品度合いが高い、また、不良品に近いほど良品度合いが低いと判定することができる。これに基づいて、深層学習処理を行った場合の正答率を算出することができ、例えば図4の横軸に示すように、良品度合の高低で表示することができる。 The correct answer rate is, for example, the certainty (accuracy) of whether or not the product is good. In the case of deep learning processing, based on the normalized output value, it is determined whether the image is close to a good product image or a defective product image. The closer to a good product, the higher the degree of good product, and the closer to a defective product, the better the product. It can be determined that the degree is low. Based on this, it is possible to calculate the correct answer rate when deep learning processing is performed, and for example, as shown on the horizontal axis of FIG. 4, it is possible to display the degree of good quality.

一方、通常検査処理の場合は、検査手法によって正答率の算出方法が異なる。検査手法は、上述したように、パターンサーチ、差分検査、学習検査、傷検出等がある。パターンサーチの場合、検査を行いたい部分(パターン)を設定モード時に登録しておき、この登録されているパターンと、その後に新たに取得された検査対象画像に含まれるパターンとを正規化相関を用いて判定し、得られた相関値に基づいて良否判定を行う。この相関値が一定以上高い場合には、良品と判定する一方、相関値が低い場合には不良品と判定する。よって、図4の縦軸に示すように、相関値の高低によって正答率を表示することができ、正答率を相関値と関連付けて表示できる。パターンサーチの場合、相関値が閾値となり得る。尚、深層学習処理を行った場合の良品度合を縦軸で示し、パターンサーチの相関値を横軸で示してもよい。以下の例も同様である。 On the other hand, in the case of the normal inspection process, the method of calculating the correct answer rate differs depending on the inspection method. As described above, the inspection methods include pattern search, difference inspection, learning inspection, scratch detection, and the like. In the case of pattern search, the part (pattern) to be inspected is registered in the setting mode, and the registered pattern and the pattern included in the newly acquired image to be inspected are normalized and correlated. Judgment is made using the above, and good / bad judgment is made based on the obtained correlation value. If this correlation value is higher than a certain level, it is determined to be a non-defective product, while if the correlation value is low, it is determined to be a defective product. Therefore, as shown on the vertical axis of FIG. 4, the correct answer rate can be displayed according to the level of the correlation value, and the correct answer rate can be displayed in association with the correlation value. In the case of pattern search, the correlation value can be a threshold. The degree of good quality when deep learning processing is performed may be indicated by the vertical axis, and the correlation value of the pattern search may be indicated by the horizontal axis. The same applies to the following examples.

差分検査の場合、設定モード時に予め画像を登録しておき、この登録画像と、その後に新たに取得された検査対象画像との差分をブロブ検出することで良否判定を行う。差分のブロブ面積が一定以上小さい場合には、良品と判定する一方、差分のブロブ面積が大きい場合には不良品と判定する。よって、図5の縦軸に示すように、差分のブロブ面積の大小によって正答率を表示することができ、正答率を差分のブロブ面積と関連付けて表示できる。差分検査の場合、差分のブロブ面積が閾値となり得る。 In the case of the difference inspection, an image is registered in advance in the setting mode, and a pass / fail judgment is made by detecting the difference between the registered image and the newly acquired inspection target image thereafter. If the difference blob area is smaller than a certain level, it is judged as a non-defective product, while if the difference blob area is large, it is judged as a defective product. Therefore, as shown on the vertical axis of FIG. 5, the correct answer rate can be displayed according to the magnitude of the difference blob area, and the correct answer rate can be displayed in association with the difference blob area. In the case of difference inspection, the blob area of the difference can be the threshold.

学習検査は、例えば特許第5767963号公報に記載されている方法で、複数の良品画像を学習させることで自動的に良品の範囲を定義し、「良品ではない」ものを検出する方法である。統計に基づいた画素のバラつき範囲から逸脱する階調値の総和(欠陥量)や、ピクセル数等の面積(欠陥部の面積)に基づいて、欠陥を検出する方法である。 The learning test is, for example, a method described in Japanese Patent No. 5767963, which automatically defines a range of non-defective products by learning a plurality of non-defective product images and detects “non-defective products”. This is a method of detecting defects based on the sum of gradation values (defect amount) deviating from the pixel variation range based on statistics and the area such as the number of pixels (area of the defect portion).

学習検査の場合、欠陥量や欠陥部の面積が一定以上小さい場合には、良品と判定する一方、欠陥量や欠陥部の面積が大きい場合には不良品と判定する。よって、図6の縦軸に示すように、欠陥量や欠陥部の面積の大小によって正答率を表示することができる。学習検査の場合、欠陥量や欠陥部の面積が閾値となり得る。 In the case of learning inspection, if the amount of defects or the area of the defective part is smaller than a certain level, it is judged as a non-defective product, while if the amount of defects or the area of the defective part is large, it is judged as a defective product. Therefore, as shown on the vertical axis of FIG. 6, the correct answer rate can be displayed according to the amount of defects and the size of the area of the defective portion. In the case of a learning test, the amount of defects and the area of the defective portion can be threshold values.

傷検出は、特許第4544578号に記載されている方法で、例えば、画像内において検査領域を決め、この検査領域に含まれる画素に関してN×Nのセグメントを設定し、該セグメントを所定方向にシフトさせながら各セグメントに含まれる各画素の濃度の平均濃度を算出し、一のセグメントの平均濃度と、これに隣接する他のセグメントの平均濃度との間の差分値を欠陥レベルとして算出する手法を採用することができる。これにより、検査対象物の傷検出を行うことができる。 Scratch detection is a method described in Japanese Patent No. 4544578, for example, an inspection area is determined in an image, an N × N segment is set with respect to pixels included in this inspection area, and the segment is shifted in a predetermined direction. A method of calculating the average density of each pixel contained in each segment and calculating the difference between the average density of one segment and the average density of other segments adjacent to it as the defect level. Can be adopted. As a result, it is possible to detect scratches on the inspection object.

傷検出の場合、欠陥レベルや欠陥部の面積が一定以上小さい場合には、良品と判定する一方、欠陥レベルや欠陥部の面積が大きい場合には不良品と判定する。よって、図7の縦軸に示すように、欠陥量や欠陥部の面積の大小によって正答率を表示することができる。傷検出の場合、欠陥レベルや欠陥部の面積が閾値となり得る。 In the case of scratch detection, if the defect level or the area of the defective portion is smaller than a certain level, it is determined to be a non-defective product, while if the defect level or the area of the defective portion is large, it is determined to be a defective product. Therefore, as shown on the vertical axis of FIG. 7, the correct answer rate can be displayed according to the amount of defects and the size of the area of the defective portion. In the case of scratch detection, the defect level or the area of the defect portion can be a threshold value.

(表示制御部25の構成)
表示制御部25は、検査実行部24で算出された各正答率を読み込むことにより、検査実行部24で実行された通常検査処理による正答率と、検査実行部24で実行された深層学習処理による正答率とを取得する正答率取得部25aを備えている。表示制御部25は、検査実行部24で実行された通常検査処理による正答率と、検査実行部24で実行された深層学習処理による正答率とを比較可能な形態で表示装置4に表示させることができるように構成されている。
(Configuration of display control unit 25)
By reading each correct answer rate calculated by the inspection execution unit 24, the display control unit 25 determines the correct answer rate by the normal inspection process executed by the inspection execution unit 24 and the deep learning process executed by the inspection execution unit 24. The correct answer rate acquisition unit 25a for acquiring the correct answer rate is provided. The display control unit 25 causes the display device 4 to display the correct answer rate by the normal inspection process executed by the inspection execution unit 24 and the correct answer rate by the deep learning process executed by the inspection execution unit 24 in a comparable form. Is configured to allow

具体的には、表示制御部25は、図4に示すようにパターンサーチと深層学習処理を組み合わせた場合に表示する第1ユーザーインターフェース60を生成する。第1ユーザーインターフェース60には、グラフ表示領域60aが設けられている。グラフ表示領域60aに表示されるグラフの縦軸は、通常検査処理としてのパターンサーチによって求めた相関値の高低を示しており、上に行くほど相関値が高くなる、即ち良品度合が高くなるように設定されている。つまり、通常検査処理による正答率をパターンサーチの相関値と関連付けて表示することができる。 Specifically, the display control unit 25 generates a first user interface 60 to be displayed when the pattern search and the deep learning process are combined as shown in FIG. The first user interface 60 is provided with a graph display area 60a. The vertical axis of the graph displayed in the graph display area 60a indicates the level of the correlation value obtained by the pattern search as the normal inspection process, and the higher the value, the higher the correlation value, that is, the higher the degree of non-defectiveness. Is set to. That is, the correct answer rate by the normal inspection process can be displayed in association with the correlation value of the pattern search.

グラフ表示領域60aに表示されるグラフの横軸は、深層学習処理によって求めた良品度合の高低を示しており、右に行くほど良品度合が高くなる、即ち良品度合が高くなるように設定されている。グラフ中、「○」は良品画像を示しており、「×」は不良品画像を示している。このように同一グラフ上に、通常検査処理による正答率と、深層学習処理による正答率とを同時に表示することで、両者を簡単に比較することができる形態になる。尚、通常検査処理による正答率と、深層学習処理による正答率との表示形態は、図4に示すグラフに限られるものではなく、例えば数値によって両者を比較することができる表示形態であってもよいし、他の表示形態であってもよい。 The horizontal axis of the graph displayed in the graph display area 60a indicates the high and low degree of good quality obtained by deep learning processing, and the degree of good quality is set to be higher toward the right, that is, the degree of good quality is higher. There is. In the graph, "○" indicates a non-defective product image, and "x" indicates a defective product image. In this way, by simultaneously displaying the correct answer rate by the normal inspection process and the correct answer rate by the deep learning process on the same graph, the two can be easily compared. The display form of the correct answer rate by the normal inspection process and the correct answer rate by the deep learning process is not limited to the graph shown in FIG. 4, and may be a display form in which both can be compared by numerical values, for example. It may be in another display form.

また、差分検査の場合、表示制御部25は、図5に示すように差分検査と深層学習処理を組み合わせた場合に表示する第2ユーザーインターフェース61を生成する。第2ユーザーインターフェース61には、第1ユーザーインターフェース60と同様なグラフ表示領域61aが設けられている。グラフ表示領域61aに表示されるグラフの縦軸は、通常検査処理としての差分検査によって求めた差分のブロブ面積の大小を示しており、上に行くほど差分のブロブ面積が小さくなる、即ち良品度合が高くなるように設定されている。つまり、通常検査処理による正答率を差分のブロブ面積と関連付けて表示することができる。グラフ表示領域61aに表示されるグラフの横軸は、第1ユーザーインターフェース60のものと同じである。 Further, in the case of the difference inspection, the display control unit 25 generates a second user interface 61 to be displayed when the difference inspection and the deep learning process are combined as shown in FIG. The second user interface 61 is provided with a graph display area 61a similar to that of the first user interface 60. The vertical axis of the graph displayed in the graph display area 61a indicates the magnitude of the difference blob area obtained by the difference inspection as a normal inspection process, and the difference blob area becomes smaller as it goes up, that is, the degree of good quality. Is set to be high. That is, the correct answer rate by the normal inspection process can be displayed in association with the blob area of the difference. The horizontal axis of the graph displayed in the graph display area 61a is the same as that of the first user interface 60.

また、学習検査の場合、表示制御部25は、図6に示すように学習検査と深層学習処理を組み合わせた場合に表示する第3ユーザーインターフェース62を生成する。第3ユーザーインターフェース62には、第1ユーザーインターフェース60と同様なグラフ表示領域62aが設けられている。グラフ表示領域62aに表示されるグラフの縦軸は、通常検査処理としての学習検査によって求めた欠陥量の大小を示しており、上に行くほど欠陥量が小さくなる、即ち良品度合が高くなるように設定されている。グラフ表示領域62aに表示されるグラフの横軸は、第1ユーザーインターフェース60のものと同じである。 Further, in the case of the learning test, the display control unit 25 generates a third user interface 62 to be displayed when the learning test and the deep learning process are combined as shown in FIG. The third user interface 62 is provided with a graph display area 62a similar to that of the first user interface 60. The vertical axis of the graph displayed in the graph display area 62a indicates the magnitude of the defect amount obtained by the learning inspection as the normal inspection process, and the defect amount becomes smaller as it goes up, that is, the degree of good quality increases. Is set to. The horizontal axis of the graph displayed in the graph display area 62a is the same as that of the first user interface 60.

また、傷検出の場合、表示制御部25は、図7に示すように傷検出と深層学習処理を組み合わせた場合に表示する第4ユーザーインターフェース63を生成する。第4ユーザーインターフェース63には、第1ユーザーインターフェース60と同様なグラフ表示領域63aが設けられている。グラフ表示領域63aに表示されるグラフの縦軸は、通常検査処理としての傷検出によって求めた欠陥レベルの大小を示しており、上に行くほど欠陥レベルが小さくなる、即ち良品度合が高くなるように設定されている。グラフ表示領域63aに表示されるグラフの横軸は、第1ユーザーインターフェース60のものと同じである。 Further, in the case of scratch detection, the display control unit 25 generates a fourth user interface 63 to be displayed when the scratch detection and the deep learning process are combined as shown in FIG. 7. The fourth user interface 63 is provided with a graph display area 63a similar to that of the first user interface 60. The vertical axis of the graph displayed in the graph display area 63a indicates the magnitude of the defect level obtained by scratch detection as a normal inspection process, and the defect level becomes smaller as it goes up, that is, the degree of good quality increases. Is set to. The horizontal axis of the graph displayed in the graph display area 63a is the same as that of the first user interface 60.

(閾値調整部26の構成)
図4に示す第1ユーザーインターフェース60には、横軸と平行に延びる通常検査用閾値表示線60bが表示されており、通常検査処理の判定結果は、通常検査処理における閾値とともに表示される。通常検査用閾値表示線60bは、通常検査用閾値を示す線である。通常検査用閾値表示線60bの代わりに、または通常検査用閾値表示線60bと共に、通常検査用閾値を示すことが可能な表示形態を採用してもよく、例えば背景色の塗り分けや、閾値を数値で表示する形態等を用いることもできる。
(Structure of threshold value adjusting unit 26)
A threshold display line 60b for normal inspection extending parallel to the horizontal axis is displayed on the first user interface 60 shown in FIG. 4, and the determination result of the normal inspection process is displayed together with the threshold value in the normal inspection process. The normal inspection threshold display line 60b is a line indicating a normal inspection threshold. Instead of the normal inspection threshold value display line 60b, or together with the normal inspection threshold value display line 60b, a display form capable of showing the normal inspection threshold value may be adopted, for example, the background color may be painted separately or the threshold value may be set. A form or the like displayed by a numerical value can also be used.

使用者は、通常検査用閾値表示線60bをキーボード51やマウス52等によって上下方向(通常検査用閾値の増減方向)に移動させることができる。通常検査用閾値表示線60bの位置に応じて通常検査用閾値となる相関値が増減し、通常検査用閾値表示線60bを上に移動させると相関値が増加する一方、通常検査用閾値表示線60bを下に移動させると相関値が減少する。閾値調整部26は、使用者による通常検査用閾値表示線60bの移動状態を検出することで、通常検査用閾値を変更する。通常検査用閾値の調整方法は上述した方法に限られるものではなく、例えば数値を入力することによって調整可能にしてもよい。 The user can move the normal inspection threshold value display line 60b in the vertical direction (in the direction of increasing / decreasing the normal inspection threshold value) by using the keyboard 51, the mouse 52, or the like. The correlation value that becomes the normal inspection threshold increases or decreases according to the position of the normal inspection threshold display line 60b, and the correlation value increases when the normal inspection threshold display line 60b is moved upward, while the normal inspection threshold display line increases. Moving 60b down reduces the correlation value. The threshold value adjusting unit 26 changes the normal inspection threshold value by detecting the moving state of the normal inspection threshold value display line 60b by the user. The method for adjusting the threshold value for normal inspection is not limited to the above-mentioned method, and may be adjusted by inputting a numerical value, for example.

図5に示す第2ユーザーインターフェース61には、第1ユーザーインターフェース60と同様な通常検査用閾値表示線61bが表示されている。使用者は、通常検査用閾値表示線61bを上下方向に移動させることにより、通常検査用閾値となる差分のブロブ面積値が増減し、通常検査用閾値表示線60bを上に移動させると差分のブロブ面積値が減少する一方、通常検査用閾値表示線60bを下に移動させると差分のブロブ面積値が増加する。 In the second user interface 61 shown in FIG. 5, a threshold display line 61b for normal inspection similar to that of the first user interface 60 is displayed. When the user moves the normal inspection threshold display line 61b in the vertical direction, the blob area value of the difference that becomes the normal inspection threshold increases or decreases, and when the normal inspection threshold display line 60b is moved upward, the difference becomes While the blob area value decreases, moving the normal inspection threshold display line 60b downward increases the difference blob area value.

図6に示す第3ユーザーインターフェース62には、第1ユーザーインターフェース60と同様な通常検査用閾値表示線62bが表示されている。使用者は、通常検査用閾値表示線62bを上下方向に移動させることにより、通常検査用閾値となる欠陥量が増減し、通常検査用閾値表示線60bを上に移動させると欠陥量が減少する一方、通常検査用閾値表示線60bを下に移動させると欠陥量が増加する。 In the third user interface 62 shown in FIG. 6, a threshold display line 62b for normal inspection similar to that of the first user interface 60 is displayed. By moving the normal inspection threshold display line 62b in the vertical direction, the user increases or decreases the amount of defects that become the normal inspection threshold, and moves the normal inspection threshold display line 60b upward to decrease the amount of defects. On the other hand, when the threshold display line 60b for normal inspection is moved downward, the amount of defects increases.

図7に示す第4ユーザーインターフェース63には、第1ユーザーインターフェース60と同様な通常検査用閾値表示線63bが表示されている。使用者は、通常検査用閾値表示線63bを上下方向に移動させることにより、通常検査用閾値となる欠陥レベルが増減し、通常検査用閾値表示線60bを上に移動させると欠陥レベルが小さくなる一方、通常検査用閾値表示線60bを下に移動させると欠陥レベルが大きくなる。 In the fourth user interface 63 shown in FIG. 7, a threshold display line 63b for normal inspection similar to that of the first user interface 60 is displayed. By moving the normal inspection threshold display line 63b in the vertical direction, the user increases or decreases the defect level that becomes the normal inspection threshold, and moves the normal inspection threshold display line 60b upward to decrease the defect level. On the other hand, if the threshold display line 60b for normal inspection is moved downward, the defect level becomes large.

(通常検査処理と深層学習処理との組み合わせ)
この実施形態では、図3に示す検査実行部24が、通常検査処理と深層学習処理とを組み合わせて検査を行うことができるように構成されている。以下に、通常検査処理で不良品判定を行い、残りを深層学習処理で良否判定する場合と、通常検査処理で良品判定を行い、残りを深層学習処理で良否判定する場合と、通常検査処理で良品判定及び不良品判定を確定させ、残りを深層学習処理で良否判定する場合との3つの場合の手順について説明する。
1.通常検査処理で不良品判定を行い、残りを深層学習処理で良否判定する場合
図8は、通常検査処理で不良品判定を行い、残りを深層学習処理で良否判定する場合の手順を示すフローチャートである。図4に示すパターンサーチと深層学習処理を組み合わせた場合と、図5に示す差分検査と深層学習処理を組み合わせた場合に適用することができる処理手順である。
(Combination of normal inspection processing and deep learning processing)
In this embodiment, the inspection execution unit 24 shown in FIG. 3 is configured to be able to perform an inspection by combining a normal inspection process and a deep learning process. Below, there are cases where defective products are judged by the normal inspection process and the rest is judged as good or bad by the deep learning process, cases where good products are judged by the normal inspection process and the rest are judged by the deep learning process, and cases where the normal inspection process is used. The procedure of three cases of confirming the non-defective product determination and the defective product determination and determining the quality of the rest by the deep learning process will be described.
1. 1. When a defective product is judged by the normal inspection process and the rest is judged as good or bad by the deep learning process. FIG. 8 is a flowchart showing a procedure when a defective product is judged by the normal inspection process and the rest is judged as good or bad by the deep learning process. is there. This is a processing procedure that can be applied when the pattern search and the deep learning process shown in FIG. 4 are combined and when the difference inspection and the deep learning process shown in FIG. 5 are combined.

図8に示すフローチャートの開始後、ステップSA1では検査対象物の撮像を行う。これは、制御部13AがCMOSセンサ143を制御することによって行うことができ、具体的には図3に示す画像入力部21が行う。 After the start of the flowchart shown in FIG. 8, in step SA1, an image of the inspection target is taken. This can be done by the control unit 13A controlling the CMOS sensor 143, specifically, the image input unit 21 shown in FIG.

ステップSA2では、検査実行部24がステップSA1で取得された検査対象画像に対して通常検査処理による検査を行う。ステップSA3では、ステップSA2で行った通常検査処理による検査の結果、明らかに不良品画像であるか否かを判定する。これは、通常検査用閾値に基づいて判定することができ、例えば図4に示すパターンサーチの場合、通常検査用閾値(通常検査用閾値表示線60bで示す)に相当する相関値と、ステップSA2で求めた相関値とを比較し、ステップSA2で求めた相関値が通常検査用閾値以下であれば、明らかに不良品画像であると判定する。図5に示す差分検査の場合も同様にブロブ面積の大小によって判定することができる。 In step SA2, the inspection execution unit 24 inspects the inspection target image acquired in step SA1 by the normal inspection process. In step SA3, as a result of the inspection by the normal inspection process performed in step SA2, it is determined whether or not the image is clearly defective. This can be determined based on the threshold value for normal inspection. For example, in the case of the pattern search shown in FIG. 4, the correlation value corresponding to the threshold value for normal inspection (indicated by the threshold display line 60b for normal inspection) and step SA2 When the correlation value obtained in step SA2 is equal to or less than the normal inspection threshold value, it is clearly determined that the image is defective. Similarly, in the case of the difference inspection shown in FIG. 5, it can be determined by the size of the blob area.

ステップSA3で用いられる通常検査用閾値は不良品判定を確定させる閾値である。従って、ステップSA3では、不良品判定が可能な特徴量を有する検査対象画像に対して不良品判定を確定させる一方、不良品判定を確定させることができない検査対象画像に対しては不良品判定を確定させることなく、次のステップに進むようにする。 The normal inspection threshold value used in step SA3 is a threshold value for determining the defective product determination. Therefore, in step SA3, the defective product determination is determined for the inspection target image having a feature amount capable of determining the defective product, while the defective product determination is performed for the inspection target image for which the defective product determination cannot be determined. Try to proceed to the next step without confirming.

ステップSA3でYESと判定された場合にはステップSA7に進む。ステップSA3でYESと判定されたということは、不良品判定が確定している。従って、明らかに不良品画像であるということであり、この場合はステップSA7において最終的に不良品画像とする。つまり、明らかに不良品画像であると判定することができる画像に対しては、深層学習処理を行うことなく、判定結果を確定させることができるので、高い処理速度が維持される。 If YES is determined in step SA3, the process proceeds to step SA7. If YES is determined in step SA3, the defective product determination is confirmed. Therefore, it is clearly a defective product image, and in this case, the defective product image is finally obtained in step SA7. That is, for an image that can be clearly determined to be a defective image, the determination result can be determined without performing deep learning processing, so that a high processing speed is maintained.

一方、ステップSA3でNOと判定された場合にはステップSA4に進む。ステップSA3でNOと判定されたということは、不良品判定を確定できないということであり、不良品画像であるか、良品画像であるか、明確でない。この場合に、ステップSA4において通常検査処理よりも識別能力の高い深層学習処理による検査を実行する。尚、深層学習処理が実行される画像には、明らかに不良品画像であると判定される画像が含まれていないので、深層学習処理に特有の想定外の欠陥が混入されたような未知のデータが入力された場合の挙動の不安定さが無くなり、判定精度を高めることができる。 On the other hand, if NO is determined in step SA3, the process proceeds to step SA4. If NO is determined in step SA3, it means that the defective product determination cannot be confirmed, and it is not clear whether the image is a defective product or a non-defective product. In this case, in step SA4, an inspection by a deep learning process having a higher discriminating ability than the normal inspection process is executed. Since the image on which the deep learning process is executed does not include an image that is clearly determined to be a defective image, it is unknown that an unexpected defect peculiar to the deep learning process is mixed. The instability of the behavior when data is input is eliminated, and the determination accuracy can be improved.

その後、ステップSA5では、深層学習処理により得られた良品度合が深層学習処理用閾値を超えるか否かを判定する。ステップSA5でNOと判定された場合には、識別能力の高い深層学習処理によって不良品画像であると判定されたということであり、ステップSA7に進んで不良品画像であるという判定を確定させる。一方、ステップSA5でNOと判定された場合は良品画像であるので、ステップSA6において良品画像であるという判定を確定させる。 After that, in step SA5, it is determined whether or not the degree of good quality obtained by the deep learning process exceeds the threshold value for the deep learning process. If NO is determined in step SA5, it means that the image is determined to be a defective product by the deep learning process having high discriminating ability, and the process proceeds to step SA7 to confirm the determination that the image is defective. On the other hand, if NO is determined in step SA5, it is a good product image, so the determination that it is a good product image is confirmed in step SA6.

このような手順を経ることで、図9に示すような効果が得られる。図9の上側に示す図は、深層学習処理のみで良否判定した場合の出力値のヒストグラムである。深層学習処理のみで良否判定すると、不良品画像と不良品画像とが混在している領域Aが存在する。つまり、深層学習処理では、上述した不安定な挙動により、明らかに不良品画像であると判定される画像を良品画像であると判定してしまい、不良品画像と不良品画像とを分離することができない。一方、図8に示すフローチャートの手順を経ることで、明らかに不良品画像であると判定される画像が深層学習処理されないので、図9の下側に示す図のように、不良品画像と不良品画像とを分離することができるようになる。 By going through such a procedure, the effect shown in FIG. 9 can be obtained. The figure shown on the upper side of FIG. 9 is a histogram of the output values when the quality is judged only by the deep learning process. When the quality is determined only by the deep learning process, there is a region A in which the defective image and the defective image are mixed. That is, in the deep learning process, due to the unstable behavior described above, the image that is clearly determined to be a defective image is determined to be a non-defective image, and the defective image and the defective image are separated. I can't. On the other hand, by going through the procedure of the flowchart shown in FIG. 8, the image that is clearly determined to be a defective image is not subjected to deep learning processing, so that it is not a defective image as shown in the lower part of FIG. It becomes possible to separate it from a non-defective image.

すなわち、図8に示すフローチャートのように、検査対象画像を通常検査処理した結果に応じて、通常検査処理のみで検査を終了させるか、通常検査処理と深層学習処理とを組み合わせた検査処理を行うかを選択することができる。これは、図3に示す検査選択部27によって実行される。例えば、パターンサーチの場合、通常検査処理で求めた相関値がステップSA3で用いる閾値(所定相関値)以下である場合には、当該通常検査処理において不良品であると判定することができるので、検査選択部27は通常検査処理のみで検査を終了させる。一方、通常検査処理で求めた相関値が上記所定相関値よりも高い場合には、検査選択部27は深層学習処理を選択する。 That is, as shown in the flowchart of FIG. 8, depending on the result of the normal inspection process of the image to be inspected, the inspection is completed only by the normal inspection process, or the inspection process is performed by combining the normal inspection process and the deep learning process. Can be selected. This is performed by the inspection selection unit 27 shown in FIG. For example, in the case of pattern search, if the correlation value obtained in the normal inspection process is equal to or less than the threshold value (predetermined correlation value) used in step SA3, it can be determined that the product is defective in the normal inspection process. The inspection selection unit 27 ends the inspection only by the normal inspection process. On the other hand, when the correlation value obtained by the normal inspection process is higher than the predetermined correlation value, the inspection selection unit 27 selects the deep learning process.

また、差分検査の場合、図8に示すフローチャートの手順と同じであり、通常検査処理で求めた差分のブロブ面積が所定面積値以上である場合には、当該通常検査処理において不良品であると判定することができるので、検査選択部27は通常検査処理のみで検査を終了させる。一方、通常検査処理で求めた差分のブロブ面積が所定面積値よりも小さい場合には、検査選択部27は深層学習処理を選択する。 Further, in the case of the difference inspection, the procedure is the same as that of the flowchart shown in FIG. 8, and when the blob area of the difference obtained in the normal inspection process is equal to or larger than the predetermined area value, it is considered as a defective product in the normal inspection process. Since the determination can be made, the inspection selection unit 27 ends the inspection only by the normal inspection process. On the other hand, when the blob area of the difference obtained by the normal inspection process is smaller than the predetermined area value, the inspection selection unit 27 selects the deep learning process.

2.通常検査処理で良品判定を行い、残りを深層学習処理で良否判定する場合
図10は、通常検査処理で良品判定を行い、残りを深層学習処理で良否判定する場合の手順を示すフローチャートである。図6に示す学習検査と深層学習処理を組み合わせた場合と、図7に示す傷検出と深層学習処理を組み合わせた場合に適用することができる処理手順である。
2. 2. When the non-defective product is judged by the normal inspection process and the rest is judged by the deep learning process. FIG. 10 is a flowchart showing a procedure when the non-defective product is judged by the normal inspection process and the rest is judged by the deep learning process. This is a processing procedure that can be applied when the learning test shown in FIG. 6 and the deep learning process are combined, and when the scratch detection and the deep learning process shown in FIG. 7 are combined.

図10に示すフローチャートの開始後、ステップSB1、SB2は、図8に示すフローチャートのステップSA1、SA2と同じである。ステップSB3では、ステップSB2で行った通常検査処理による検査の結果、明らかに良品画像であるか否かを判定する。これは、通常検査用閾値に基づいて判定することができ、例えば図6に示す学習検査の場合、通常検査用閾値(通常検査用閾値表示線62bで示す)に相当する欠陥量と、ステップSB2で求めた欠陥量とを比較し、ステップSB2で求めた欠陥量が通常検査用閾値以下であれば、明らかに良品画像であると判定する。図7に示す傷検出の場合も同様に判定することができる。 After the start of the flowchart shown in FIG. 10, steps SB1 and SB2 are the same as steps SA1 and SA2 of the flowchart shown in FIG. In step SB3, as a result of the inspection by the normal inspection process performed in step SB2, it is determined whether or not the image is clearly a good product. This can be determined based on the threshold value for normal inspection. For example, in the case of the learning test shown in FIG. 6, the defect amount corresponding to the threshold value for normal inspection (indicated by the threshold display line 62b for normal inspection) and step SB2 When the defect amount obtained in step SB2 is equal to or less than the normal inspection threshold value, it is clearly determined that the image is a good product. In the case of scratch detection shown in FIG. 7, the same determination can be made.

ステップSB3で用いられる通常検査用閾値は良品判定を確定させる閾値である。従って、ステップSB3では、良品判定が可能な特徴量を有する検査対象画像に対して良品判定を確定させる一方、良品判定を確定させることができない検査対象画像に対しては良品判定を確定させることなく、次のステップに進むようにする。 The normal inspection threshold value used in step SB3 is a threshold value for confirming the non-defective product determination. Therefore, in step SB3, the non-defective product determination is determined for the inspection target image having a feature amount capable of determining the non-defective product, but the non-defective product determination is not determined for the inspection target image for which the non-defective product determination cannot be determined. , Go to the next step.

ステップSB3でYESと判定された場合にはステップSB7に進む。ステップSB3でYESと判定されたということは、良品が確定している。従って、明らかに良品画像であるということであり、この場合はステップSB7において最終的に良品画像とする。つまり、変動量の少ない明らかに良品画像であると判定することができる画像に対しては、深層学習処理を行うことなく、判定結果を確定させることができるので、高い処理速度が維持される。 If YES is determined in step SB3, the process proceeds to step SB7. The fact that YES is determined in step SB3 confirms that the product is non-defective. Therefore, it is clearly a good product image, and in this case, the good product image is finally obtained in step SB7. That is, for an image that can be determined to be a clearly non-defective image with a small amount of fluctuation, the determination result can be determined without performing deep learning processing, so that a high processing speed is maintained.

一方、ステップSB3でNOと判定された場合にはステップSB4に進む。ステップSB3でNOと判定されたということは、良品判定を確定できないということであり、不良品画像であるか、良品画像であるか、明確でない。この場合に、ステップSB4において通常検査処理よりも識別能力の高い深層学習処理による検査を実行する。尚、深層学習処理が実行される画像には、明らかに良品画像であると判定される画像が含まれていないので、スループットを高い状態で維持できる。 On the other hand, if NO is determined in step SB3, the process proceeds to step SB4. If NO is determined in step SB3, it means that the non-defective product determination cannot be confirmed, and it is not clear whether the image is a defective product or a non-defective product image. In this case, in step SB4, an inspection by a deep learning process having a higher discriminating ability than the normal inspection process is executed. Since the image to which the deep learning process is executed does not include an image that is clearly determined to be a good product image, the throughput can be maintained in a high state.

その後、ステップSB5では、深層学習処理により得られた良品度合が深層学習処理用閾値を超えるか否かを判定する。ステップSB5でYESと判定された場合には、識別能力の高い深層学習処理によって良品画像であると判定されたということであり、ステップSB7に進んで良品画像であるという判定を確定させる。一方、ステップSB5でNOと判定された場合は不良品画像であるので、ステップSB6において不良品画像であるという判定を確定させる。 After that, in step SB5, it is determined whether or not the degree of good quality obtained by the deep learning process exceeds the threshold value for the deep learning process. If YES is determined in step SB5, it means that the image is determined to be a good product by the deep learning process having high discriminating ability, and the process proceeds to step SB7 to confirm the determination that the image is a good product. On the other hand, if NO is determined in step SB5, it is a defective product image, so the determination that it is a defective product image is confirmed in step SB6.

一般的にワークの大半が良品(例えば99%以上など)であることを踏まえると、このように、明らかに良品であるものを高速処理が可能な既存処理で先に判断し、判断が難しいものに限定して深層学習処理を適用することで、識別能力の高い深層学習処理を用いながら、全体のスループットを高速な状態に維持することができる。
3.通常検査処理で良品判定及び不良品判定を確定させ、残りを深層学習処理で良否判定する場合
図11は、通常検査処理で良品判定及び不良品判定を確定させ、残りを深層学習処理で良否判定する場合の手順を示すフローチャートである。この手順は、良品画像と不良品画像とが図12及び図14に示す第1の分布例のような分布、図13及び図15に示す第2の分布例のような分布になっている場合に適用することができる。
Considering that most of the work is generally non-defective (for example, 99% or more), it is difficult to judge what is clearly non-defective by the existing processing that can process at high speed first. By applying the deep learning process only to, it is possible to maintain the overall throughput at a high speed while using the deep learning process having high discriminating ability.
3. 3. When the non-defective product judgment and the defective product judgment are confirmed by the normal inspection process and the rest is judged as good or bad by the deep learning process. It is a flowchart which shows the procedure in the case of doing. In this procedure, when the non-defective product image and the defective product image have a distribution as in the first distribution example shown in FIGS. 12 and 14, and a distribution as in the second distribution example shown in FIGS. 13 and 15. Can be applied to.

図11に示すフローチャートの開始後、ステップSC1、SC2は、図8に示すフローチャートのステップSA1、SA2と同じである。また、図11に示すフローチャートのステップSC3は、図8に示すフローチャートのステップSA3と同じであり、また、図11に示すフローチャートのステップSC8は、図8に示すフローチャートのステップSA7と同じである。 After the start of the flowchart shown in FIG. 11, steps SC1 and SC2 are the same as steps SA1 and SA2 of the flowchart shown in FIG. Further, step SC3 of the flowchart shown in FIG. 11 is the same as step SA3 of the flowchart shown in FIG. 8, and step SC8 of the flowchart shown in FIG. 11 is the same as step SA7 of the flowchart shown in FIG.

ステップSC3では、例えば図12に示す学習検査の場合、通常検査用閾値(通常検査用閾値表示線62cで示す)に相当する欠陥量と、ステップSC2で求めた欠陥量とを比較し、ステップSC2で求めた欠陥量が通常検査用閾値よりも大きく、かつ、その差が一定以上に大きければ、明らかに不良品画像であると判定する。図13に示す分布状態の場合も同様に判定することができ、また、図14、図15に示す傷検出の場合も同様に判定することができる。 In step SC3, for example, in the case of the learning inspection shown in FIG. 12, the defect amount corresponding to the normal inspection threshold value (indicated by the normal inspection threshold value display line 62c) is compared with the defect amount obtained in step SC2, and step SC2 If the amount of defects obtained in 1 is larger than the threshold value for normal inspection and the difference is larger than a certain level, it is clearly determined that the image is defective. The same determination can be made in the case of the distribution state shown in FIG. 13, and the same determination can be made in the case of the scratch detection shown in FIGS. 14 and 15.

ステップSC3で用いられる通常検査用閾値は不良品判定を確定させる閾値である。従って、ステップSC3では、不良品判定が可能な特徴量を有する検査対象画像に対して不良品判定を確定させる一方、不良品判定を確定させることができない検査対象画像に対しては不良品判定を確定させることなく、次のステップに進むようにする。 The normal inspection threshold value used in step SC3 is a threshold value for determining the defective product determination. Therefore, in step SC3, the defective product determination is determined for the inspection target image having a feature amount capable of determining the defective product, while the defective product determination is performed for the inspection target image for which the defective product determination cannot be determined. Try to proceed to the next step without confirming.

ステップSC3でNOと判定された場合には、良品画像か、明らかに不良品画像であると判定できない画像であり、この場合には、ステップSC4に進む。ステップSC4では、ステップSC2で行った通常検査処理による検査の結果、明らかに良品画像であるか否かを判定する。 If NO is determined in step SC3, it is a non-defective image or an image that cannot be clearly determined to be a defective image. In this case, the process proceeds to step SC4. In step SC4, as a result of the inspection by the normal inspection process performed in step SC2, it is determined whether or not the image is clearly a good product.

ステップSC4では、例えば学習検査の場合、通常検査用閾値(図12に示す通常検査用閾値表示線62b)に相当する欠陥量と、ステップSC2で求めた欠陥量とを比較し、ステップSC2で求めた欠陥量が通常検査用閾値よりも大きく、かつ、その差が一定以上に大きければ、明らかに良品画像であると判定する。図13に示す分布状態の場合も同様に判定することができ、また、図14、図15に示す傷検出の場合も同様に判定することができる。 In step SC4, for example, in the case of a learning inspection, the defect amount corresponding to the normal inspection threshold value (normal inspection threshold value display line 62b shown in FIG. 12) is compared with the defect amount obtained in step SC2, and is obtained in step SC2. If the amount of defects is larger than the normal inspection threshold value and the difference is larger than a certain level, it is clearly determined that the image is a good product. The same determination can be made in the case of the distribution state shown in FIG. 13, and the same determination can be made in the case of the scratch detection shown in FIGS. 14 and 15.

ステップSC4で用いられる通常検査用閾値は良品判定を確定させる閾値である。従って、ステップSC4では、良品判定が可能な特徴量を有する検査対象画像に対して良品判定を確定させる一方、良品判定を確定させることができない検査対象画像に対しては良品判定を確定させることなく、次のステップに進むようにする。 The normal inspection threshold value used in step SC4 is a threshold value for confirming the non-defective product determination. Therefore, in step SC4, the non-defective product determination is determined for the inspection target image having a feature amount capable of determining the non-defective product, but the non-defective product determination is not determined for the inspection target image for which the non-defective product determination cannot be determined. , Go to the next step.

ステップSC4でYESと判定された場合にはステップSC7に進む。ステップSC4でYESと判定されたということは、明らかに良品画像であるということであり、この場合はステップSC7において良品画像であるという判定を確定させる。つまり、変動量の少ない明らかに良品画像であると判定することができる画像に対しては、深層学習処理を行うことなく、判定結果を確定させることができるので、高い処理速度が維持される。 If YES is determined in step SC4, the process proceeds to step SC7. If YES is determined in step SC4, it means that the image is clearly a good product, and in this case, the determination that the image is a good product is confirmed in step SC7. That is, for an image that can be determined to be a clearly non-defective image with a small amount of fluctuation, the determination result can be determined without performing deep learning processing, so that a high processing speed is maintained.

一方、ステップSC4でNOと判定された場合にはステップSC5に進む。ステップSC4でNOと判定されたということは、明らかに良品画像であると判定できない画像、または明らかに不良品画像であると判定できない画像であり、この場合に、ステップSC5において通常検査処理よりも識別能力の高い深層学習処理による検査を実行する。 On the other hand, if NO is determined in step SC4, the process proceeds to step SC5. The fact that NO is determined in step SC4 is an image that cannot be clearly determined to be a non-defective image or an image that cannot be clearly determined to be a defective image. In this case, in step SC5, it is more than the normal inspection process. Perform an inspection by deep learning processing with high discriminating ability.

その後、ステップSC6では、深層学習処理により得られた良品度合が深層学習処理用閾値を超えるか否かを判定する。ステップSC6でYESと判定された場合には、識別能力の高い深層学習処理によって良品画像であると判定されたということであり、ステップSC7に進んで良品画像であるという判定を確定させる。一方、ステップSC6でNOと判定された場合は不良品画像であるので、ステップSC8において不良品画像であるという判定を確定させる。このような手順を経ることで、明らかに良品であるものを高速処理が可能な既存処理で先に判断し、判断が難しいものに限定して深層学習処理を適用することで、識別能力の高い深層学習処理を用いながら、全体のスループットを高速な状態に維持することができる。また、図9に示すような効果も同時に得られる。 After that, in step SC6, it is determined whether or not the degree of good quality obtained by the deep learning process exceeds the threshold value for the deep learning process. If YES is determined in step SC6, it means that the image is determined to be a good product by the deep learning process having high discriminating ability, and the process proceeds to step SC7 to confirm the determination that the image is a good product. On the other hand, if NO is determined in step SC6, it is a defective image, so the determination that it is a defective image is confirmed in step SC8. By going through such a procedure, it is possible to judge what is clearly good by the existing processing that can be processed at high speed first, and apply deep learning processing only to those that are difficult to judge, so that the discrimination ability is high. While using deep learning processing, the overall throughput can be maintained at a high speed. In addition, the effects shown in FIG. 9 can be obtained at the same time.

(検査選択部27の構成)
検査選択部27は、上述したフローチャートに示すように、ある閾値に基づいた判定によって通常検査処理のみ、通常検査処理と深層学習処理の併用とを自動的に選択するように構成されているが、これに限られるものではなく、例えば、使用者により、通常検査処理のみ、深層学習処理のみ、通常検査処理と深層学習処理の併用のうち、任意の処理を選択可能にすることもできる。例えば、検査処理選択用ユーザーインターフェースを表示装置4に表示させて、使用者による任意の検査処理の選択操作を受け付け可能に構成することもできる。
(Structure of inspection selection unit 27)
As shown in the flowchart described above, the inspection selection unit 27 is configured to automatically select only the normal inspection process or the combined use of the normal inspection process and the deep learning process by a determination based on a certain threshold value. The present invention is not limited to this, and for example, the user can select any process from the normal inspection process only, the deep learning process only, and the combination of the normal inspection process and the deep learning process. For example, it is also possible to display the inspection process selection user interface on the display device 4 so that the user can accept an arbitrary inspection process selection operation.

検査処理を選択する際、図4〜図7に示すユーザーインターフェース60〜63を表示装置4に表示させておくことで、通常検査処理の正答率と深層学習処理の正答率とを比較しながら、分類を行う上で有効な検査処理を選択することができる。 When selecting the inspection process, by displaying the user interfaces 60 to 63 shown in FIGS. 4 to 7 on the display device 4, the correct answer rate of the normal inspection process and the correct answer rate of the deep learning process are compared. It is possible to select an inspection process that is effective for classification.

(ユーザーインターフェースの例)
ユーザーインターフェースは上述したものに限られるものではなく、他のユーザーインターフェースであってもよい。図16に示すユーザーインターフェース70には、第1ユーザーインターフェース60のグラフ表示領域60aと同様なグラフ表示領域70aと、深層学習処理での出力値の累積ヒストグラムを表示する第1ヒストグラム表示領域70bと、通常検査処理での出力値の累積ヒストグラムを表示する第2ヒストグラム表示領域70cとが設けられている。第1ヒストグラム表示領域70b及び第2ヒストグラム表示領域70cを設けることで、どちらの処理によれば良品画像と不良品画像を分離できるかを比較することができ、より分離度合が良好な方を選択することができる。
(Example of user interface)
The user interface is not limited to the one described above, and may be another user interface. The user interface 70 shown in FIG. 16 includes a graph display area 70a similar to the graph display area 60a of the first user interface 60, and a first histogram display area 70b for displaying a cumulative histogram of output values in deep learning processing. A second histogram display area 70c for displaying a cumulative histogram of output values in the normal inspection process is provided. By providing the first histogram display area 70b and the second histogram display area 70c, it is possible to compare which process can separate the good product image and the defective product image, and select the one with the better degree of separation. can do.

また、第1ヒストグラム表示領域70bの近傍には第1分離状態表示領域70dが設けられ、第2ヒストグラム表示領域70cの近傍には第2分離状態表示領域70eが設けられている。第1分離状態表示領域70dには、第1ヒストグラム表示領域70bに表示されている累積ヒストグラムの良品画像と不良品画像の分離状態、即ち、良品画像と不良品画像とが分離できるか否かが表示される。同様に、第2分離状態表示領域70eには、第2ヒストグラム表示領域70cに表示されている累積ヒストグラムの良品画像と不良品画像の分離状態が表示される。図16に示す例では、通常検査処理では良品画像と不良品画像とを分離できないが、深層学習処理では良品画像と不良品画像とを分離できることが分かる。 Further, a first separated state display area 70d is provided in the vicinity of the first histogram display area 70b, and a second separated state display area 70e is provided in the vicinity of the second histogram display area 70c. In the first separated state display area 70d, the separated state of the good product image and the defective product image of the cumulative histogram displayed in the first histogram display area 70b, that is, whether or not the good product image and the defective product image can be separated. Is displayed. Similarly, in the second separated state display area 70e, the separated state of the good product image and the defective product image of the cumulative histogram displayed in the second histogram display area 70c is displayed. In the example shown in FIG. 16, it can be seen that the non-defective product image and the defective product image cannot be separated by the normal inspection process, but the non-defective product image and the defective product image can be separated by the deep learning process.

また、通常検査処理で明らかに不良品であるものを不良品と確定し、残りを深層学習処理で検査する場合、通常検査処理で明らかに不良品と確定するための閾値に応じて、深層学習処理での出力値の累積ヒストグラムを更新することで、良品画像と不良品画像とを分離する閾値を調整することができる。 In addition, when a product that is clearly defective in the normal inspection process is determined to be defective and the rest is inspected by the deep learning process, deep learning is performed according to the threshold value for determining the product as clearly defective in the normal inspection process. By updating the cumulative histogram of the output values in the processing, it is possible to adjust the threshold value for separating the non-defective product image and the defective product image.

例えば、図17に示す分布例では、第1ヒストグラム表示領域70b及び第2ヒストグラム表示領域70cに表示されている累積ヒストグラムを見ると、通常検査処理及び深層学習処理の両方で良品画像と不良品画像とを分離できないことが分かる。 For example, in the distribution example shown in FIG. 17, when looking at the cumulative histograms displayed in the first histogram display area 70b and the second histogram display area 70c, a good product image and a defective product image are seen in both the normal inspection process and the deep learning process. It turns out that and cannot be separated.

このような場合、図18に示すように、通常検査処理の閾値を表示する通常検査用閾値表示線70fをユーザーインターフェース70に表示させておき、この通常検査用閾値表示線70fをキーボード51やマウス52等によって上下方向に移動させることにより、通常検査処理及び深層学習処理の両方で良品画像と不良品画像とを分離可能にすることができる。通常検査用閾値表示線70fを上下方向に移動させると、図18に斜線で示す範囲、即ち、深層学習処理で検査する範囲を変更することができる。深層学習処理で検査する範囲を変更することで、第2ヒストグラム表示領域70cに表示されている累積ヒストグラムが更新される。使用者は、第2ヒストグラム表示領域70cに表示されている累積ヒストグラムを見ながら通常検査用閾値を調整し、良品画像と不良品画像とを分離可能な閾値に設定することができる。 In such a case, as shown in FIG. 18, the normal inspection threshold display line 70f for displaying the threshold value of the normal inspection process is displayed on the user interface 70, and the normal inspection threshold display line 70f is displayed on the keyboard 51 or the mouse. By moving the image in the vertical direction by 52 or the like, the non-defective product image and the defective product image can be separated by both the normal inspection process and the deep learning process. By moving the threshold display line 70f for normal inspection in the vertical direction, the range shown by the diagonal line in FIG. 18, that is, the range to be inspected by the deep learning process can be changed. By changing the range to be inspected by the deep learning process, the cumulative histogram displayed in the second histogram display area 70c is updated. The user can adjust the normal inspection threshold value while looking at the cumulative histogram displayed in the second histogram display area 70c, and set the non-defective product image and the defective product image to a separable threshold value.

また、図19に示すような累積ヒストグラムになっていた場合、不良品のみの分布の範囲Bに属する画像の数を「不良品数」とし、良品のみの分布の範囲Cに属する画像の数を「良品数」とし、不良品と良品とが混在する分布の範囲Dに属する画像の数を「不明数」とすることができる。これら範囲B〜Dの数値を表示装置4に表示することで、範囲B〜Dの数値を比較することができ、これにより、分離度合が良好なものを選択することができる。 When the cumulative histogram is as shown in FIG. 19, the number of images belonging to the range B of the distribution of only defective products is defined as the "number of defective products", and the number of images belonging to the range C of the distribution of only non-defective products is defined as "the number of defective products". The number of non-defective products can be defined as the number of images belonging to the range D of the distribution in which defective products and non-defective products coexist. By displaying the numerical values in the ranges B to D on the display device 4, the numerical values in the ranges B to D can be compared, and thereby, the one having a good degree of separation can be selected.

例えば、図20に示す例では、ユーザーインターフェース70に、第1数値表示領域70gと、第2数値表示領域70hとが設けられている。第1数値表示領域70gには、深層学習処理での出力値に基づいて算出された不良品数、良品数及び不明数が表示される。第2数値表示領域70hには、通常検査処理での出力値に基づいて算出された不良品数、良品数及び不明数が表示される。この図に示すように、第1数値表示領域70g及び第2数値表示領域70hに表示された数値を見ることによっても、通常検査処理及び深層学習処理で良品画像と不良品画像とを分離できるか否かを把握できる。 For example, in the example shown in FIG. 20, the user interface 70 is provided with a first numerical value display area 70g and a second numerical value display area 70h. In the first numerical display area 70g, the number of defective products, the number of non-defective products, and the number of unknown products calculated based on the output value in the deep learning process are displayed. In the second numerical value display area 70h, the number of defective products, the number of non-defective products, and the number of unknown products calculated based on the output value in the normal inspection process are displayed. As shown in this figure, can the good product image and the defective product image be separated by the normal inspection process and the deep learning process by looking at the numerical values displayed in the first numerical value display area 70g and the second numerical value display area 70h? You can know whether or not.

また、通常検査処理で明らかに不良品であるものを不良品と確定し、残りのものを深層学習処理で検査する場合、通常検査処理で明らかに不良品と確定するための閾値に応じて、「分離度合の数値表示」を更新することで、良品画像と不良品画像とを分離する閾値を調整することができる。 In addition, when a product that is clearly defective in the normal inspection process is determined to be defective and the remaining products are inspected by deep learning processing, depending on the threshold value for determining that the product is clearly defective in the normal inspection process, By updating the "numerical display of the degree of separation", the threshold value for separating the non-defective product image and the defective product image can be adjusted.

例えば、図21に示す分布例では、通常検査処理及び深層学習処理の両方で良品画像と不良品画像とを分離できない状態である。 For example, in the distribution example shown in FIG. 21, the non-defective product image and the defective product image cannot be separated by both the normal inspection process and the deep learning process.

このような場合、図22に示すように、通常検査処理の閾値を表示する通常検査用閾値表示線70fをユーザーインターフェース70に表示させておき、この通常検査用閾値表示線70fをキーボード51やマウス52等によって上下方向に移動させることにより、通常検査処理及び深層学習処理の両方で良品画像と不良品画像とを分離可能にすることができる。通常検査用閾値表示線70fを上下方向に移動させると、図22に左下がりの斜線で示す範囲、即ち、深層学習処理で検査する範囲に対する深層学習処理での分離度合の数値表示が更新されるとともに、同図に右下がりの斜線で示す範囲、即ち、通常検査処理で検査する範囲に対する通常検査処理での分離度合の数値表示が更新される。使用者は、第1数値表示領域70g及び第2数値表示領域70hに表示されている数値を見ながら通常検査用閾値を調整し、良品画像と不良品画像とを分離可能な閾値に設定することができる。 In such a case, as shown in FIG. 22, the normal inspection threshold display line 70f for displaying the threshold value of the normal inspection process is displayed on the user interface 70, and the normal inspection threshold display line 70f is displayed on the keyboard 51 or the mouse. By moving the image in the vertical direction by 52 or the like, the non-defective product image and the defective product image can be separated by both the normal inspection process and the deep learning process. When the threshold display line 70f for normal inspection is moved in the vertical direction, the numerical display of the degree of separation in the deep learning process with respect to the range shown by the diagonal line downward to the left in FIG. 22, that is, the range to be inspected in the deep learning process is updated. At the same time, the numerical display of the degree of separation in the normal inspection process with respect to the range shown by the diagonal line downward to the right in the figure, that is, the range inspected in the normal inspection process is updated. The user adjusts the normal inspection threshold value while observing the numerical values displayed in the first numerical value display area 70g and the second numerical value display area 70h, and sets the non-defective product image and the defective product image to separable threshold values. Can be done.

(実施形態の作用効果)
以上説明したように、この実施形態に係る画像検査装置1によれば、設定モード時に通常検査処理及び深層学習処理を設定し、その後、新たに取得された良品画像と不良品画像に通常検査処理を適用した場合の正答率と、新たに取得された良品画像と不良品画像に深層学習処理を適用した場合の正答率とを算出して表示装置4に表示することができる。表示装置4には、通常検査処理を適用した場合の正答率と、深層学習処理を適用した場合の正答率とが比較可能な形態で表示されているので、使用者は、通常検査処理と、深層学習処理のいずれの処理が検査対象物の検査に適しているのか、表示装置4の表示内容に基づいて容易に判別可能になる。また、通常検査処理と深層学習処理を組み合わせた処理が検査対象物の検査に適しているのか否かも容易に判別可能になる。
(Action and effect of the embodiment)
As described above, according to the image inspection apparatus 1 according to this embodiment, the normal inspection process and the deep learning process are set in the setting mode, and then the normal inspection process is performed on the newly acquired non-defective image and the defective image. The correct answer rate when the above is applied and the correct answer rate when the deep learning process is applied to the newly acquired non-defective product image and defective product image can be calculated and displayed on the display device 4. Since the correct answer rate when the normal inspection process is applied and the correct answer rate when the deep learning process is applied are displayed on the display device 4 in a form that can be compared, the user can use the normal inspection process and the normal test process. Which of the deep learning processes is suitable for the inspection of the inspection object can be easily determined based on the display content of the display device 4. In addition, it becomes possible to easily determine whether or not a process that combines a normal inspection process and a deep learning process is suitable for inspection of an inspection object.

正答率の比較結果に基づいて、通常検査処理と深層学習処理のいずれか一方、又はこれらの処理を組み合わせた検査処理の選択を行うことができる。例えば、通常検査処理だけで十分に安定的な検査が可能である場合には、通常検査処理を選択することで、深層学習処理に特有の不安定な挙動が排除されるとともに、処理時間が短縮される。一方、通常検査処理だけでは対応が困難な検査対象物の場合は、深層学習処理を選択することで検査精度が向上する。 Based on the comparison result of the correct answer rate, it is possible to select either one of the normal inspection process and the deep learning process, or an inspection process combining these processes. For example, when a sufficiently stable inspection is possible only by the normal inspection process, selecting the normal inspection process eliminates the unstable behavior peculiar to the deep learning process and shortens the processing time. Will be done. On the other hand, in the case of an inspection object that is difficult to handle only by the normal inspection process, the inspection accuracy is improved by selecting the deep learning process.

また、使用者は、表示装置4に表示された通常検査処理の判定結果を見ながら通常検査用閾値を調整することができるので、良品と不良品との分離を適切に行うことができる。また、良品と不良品との分離度合を累積ヒストグラムや数値によって確認することができるので、良品と不良品との分離状態を容易に把握することができる。 Further, since the user can adjust the threshold value for normal inspection while observing the determination result of the normal inspection process displayed on the display device 4, the non-defective product and the defective product can be appropriately separated. Further, since the degree of separation between the non-defective product and the defective product can be confirmed by the cumulative histogram or the numerical value, the separated state between the non-defective product and the defective product can be easily grasped.

また、設定モードの後、新たに取得された検査対象画像に対し通常検査処理を適用したときに、検査対象画像内の特徴量と良品判定を確定させる閾値とに基づいて良品判定が可能な特徴量を有する検査対象画像に対しては良品判定を確定させることができる。また、検査対象画像内の特徴量と不良品判定を確定させる閾値とに基づいて不良品判定が可能な特徴量を有する検査対象画像に対しては不良品判定を確定させることができる。 In addition, after the setting mode, when the normal inspection process is applied to the newly acquired inspection target image, the feature amount in the inspection target image and the threshold value for determining the non-defective product judgment can be used to determine the non-defective product. It is possible to confirm the non-defective product judgment for the inspection target image having a quantity. Further, it is possible to determine the defective product determination for the inspection target image having the feature amount capable of determining the defective product based on the feature amount in the inspection target image and the threshold value for determining the defective product determination.

したがって、明らかに良品と判定できる検査対象物又は明らかに不良品と判定できる検査対象物を、処理速度の速い通常検査処理によって検査することで、スループットが大きく向上する。残りの僅かな検査対象物だけを深層学習処理によって検査するので、処理速度の低下を抑制しながら、検査精度を高めることが可能になる。 Therefore, by inspecting an inspection object that can be clearly determined to be a non-defective product or an inspection object that can be clearly determined to be a defective product by a normal inspection process having a high processing speed, the throughput is greatly improved. Since only the remaining few inspection objects are inspected by the deep learning process, it is possible to improve the inspection accuracy while suppressing the decrease in the processing speed.

上述の実施形態はあらゆる点で単なる例示に過ぎず、限定的に解釈してはならない。さらに、特許請求の範囲の均等範囲に属する変形や変更は、全て本発明の範囲内のものである。 The above embodiments are merely exemplary in all respects and should not be construed in a limited way. Furthermore, all modifications and modifications that fall within the equivalent scope of the claims are within the scope of the present invention.

以上説明したように、本発明に係る画像検査装置は、検査対象物を撮像して取得された検査対象画像に基づいて検査対象物の良否判定を行う場合に利用することができる。 As described above, the image inspection apparatus according to the present invention can be used when determining the quality of an inspection object based on the image of the inspection object acquired by imaging the inspection object.

1 画像検査装置
2 制御ユニット
4 表示装置
13A 制御部
14 カメラモジュール
15 照明モジュール
21 画像入力部
22 通常検査設定部
23 深層学習設定部
24 検査実行部
25 表示制御部
26 閾値調整部
27 検査選択部
1 Image inspection device 2 Control unit 4 Display device 13A Control unit 14 Camera module 15 Lighting module 21 Image input unit 22 Normal inspection setting unit 23 Deep learning setting unit 24 Inspection execution unit 25 Display control unit 26 Threshold adjustment unit 27 Inspection selection unit

Claims (10)

検査対象物を撮像して取得された検査対象画像に基づいて検査対象物の良否判定を行う画像検査装置において、
検査に用いる特徴量の設定と、当該特徴量と比較される良否判定の基準となる閾値の設定とを使用者から受け付けることにより、通常検査処理の設定を行う通常検査設定手段と、
良品属性が付与された複数の良品画像及び/又は不良品属性が付与された複数の不良品画像を、ニューラルネットワークの入力層に入力して当該ニューラルネットワークに学習させ、新たに入力された検査対象画像を良品画像と不良品画像に分類する深層学習処理の設定を行う深層学習設定手段と、
新たに取得された良品画像と不良品画像の両方に対し、前記通常検査処理と前記深層学習処理とを適用する検査実行部と、
前記検査実行部で実行された前記通常検査処理による正答率と前記深層学習処理による正答率とを表示する表示手段と、
前記通常検査処理と、前記深層学習処理のいずれか、又はこれらの処理を組み合わせた検査処理を選択可能な検査選択手段とを備えていることを特徴とする画像検査装置。
In an image inspection device that determines the quality of an inspection object based on the image of the inspection object acquired by imaging the inspection object.
A normal inspection setting means for setting a normal inspection process by accepting from a user the setting of a feature amount used for inspection and the setting of a threshold value as a reference for quality judgment to be compared with the feature amount.
A plurality of non-defective product images with non-defective product attributes and / or a plurality of defective product images with defective product attributes are input to the input layer of the neural network and trained by the neural network, and the newly input inspection target is input. Deep learning setting means for setting deep learning processing to classify images into non-defective products and defective products,
An inspection execution unit that applies the normal inspection process and the deep learning process to both the newly acquired non-defective image and the defective image.
A display means for displaying the correct answer rate by the normal inspection process and the correct answer rate by the deep learning process executed by the inspection execution unit.
An image inspection apparatus comprising the inspection selection means capable of selecting any of the normal inspection processing and the deep learning processing, or an inspection processing combining these processes.
請求項1に記載の画像検査装置において、
前記表示手段は、前記通常検査処理による正答率と、前記深層学習処理による正答率とを同一グラフ上に同時に表示するように構成されていることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 1,
The display means is an image inspection apparatus characterized in that the correct answer rate by the normal inspection process and the correct answer rate by the deep learning process are simultaneously displayed on the same graph.
請求項1または2に記載の画像検査装置において、
前記通常検査処理では、正規化相関を用いて良否判定を行い、
前記表示手段は、前記通常検査処理による正答率を相関値と関連付けて表示するように構成されていることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 1 or 2.
In the normal inspection process, a pass / fail judgment is made using a normalized correlation.
The display means is an image inspection apparatus characterized in that the correct answer rate by the normal inspection process is displayed in association with a correlation value.
請求項3に記載の画像検査装置において、
前記通常検査処理で求めた相関値が所定相関値以下である場合には、当該通常検査処理において不良品であると判定するように構成されていることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 3,
An image inspection apparatus characterized in that when the correlation value obtained in the normal inspection process is equal to or less than a predetermined correlation value, it is determined to be a defective product in the normal inspection process.
請求項4に記載の画像検査装置において、
前記検査選択手段は、前記通常検査処理で求めた相関値が所定相関値よりも高い場合には、前記深層学習処理を選択するように構成されていることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 4,
The image inspection apparatus is characterized in that the inspection selection means is configured to select the deep learning process when the correlation value obtained in the normal inspection process is higher than a predetermined correlation value.
請求項1または2に記載の画像検査装置において、
前記通常検査処理では、予め登録された登録画像と新たに取得された検査対象画像との差分をブロブ検出する差分検査で良否判定を行い、
前記表示手段は、前記通常検査処理による正答率を差分のブロブ面積と関連付けて表示するように構成されていることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 1 or 2.
In the normal inspection process, pass / fail judgment is performed by a difference inspection that detects the difference between the pre-registered registered image and the newly acquired inspection target image by blob detection.
The display means is an image inspection apparatus characterized in that the correct answer rate by the normal inspection process is displayed in association with the blob area of the difference.
請求項6に記載の画像検査装置において、
前記通常検査処理で求めた差分のブロブ面積が所定面積値以上である場合には、当該通常検査処理において不良品であると判定するように構成されていることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 6,
An image inspection apparatus characterized in that when the blob area of the difference obtained in the normal inspection process is equal to or larger than a predetermined area value, it is determined to be a defective product in the normal inspection process.
請求項7に記載の画像検査装置において、
前記検査選択手段は、前記通常検査処理で求めた差分のブロブ面積が所定面積値よりも小さい場合には、前記深層学習処理を選択するように構成されていることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 7,
The image inspection apparatus is characterized in that the inspection selection means is configured to select the deep learning process when the blob area of the difference obtained in the normal inspection process is smaller than a predetermined area value.
請求項1から8のいずれか1つに記載の画像検査装置において、
前記通常検査設定手段は、前記特徴量と比較され、良品判定を確定させる閾値、又は不良品判定を確定させる閾値の設定とを使用者から受け付けることが可能に構成され、
前記通常検査処理において、前記特徴量と前記良品判定を確定させる閾値、又は前記不良品判定を確定させる閾値とに基づいて、良品判定又は不良品判定が可能な特徴量を有する検査対象画像に対しては良品判定又は不良品判定を確定させ、良品判定又は不良品判定が確定できない特徴量を有する検査対象画像に対して前記深層学習処理を適用するように構成されていることを特徴とする画像検査装置。
In the image inspection apparatus according to any one of claims 1 to 8.
The normal inspection setting means is configured to be able to receive from the user a threshold value for determining a non-defective product determination or a threshold value for determining a defective product determination by being compared with the feature amount.
In the normal inspection process, for an inspection target image having a feature amount capable of determining a non-defective product or a defective product based on the feature amount and the threshold for determining the non-defective product determination or the threshold for determining the defective product determination. The image is characterized in that the deep learning process is applied to an inspection target image having a feature amount in which the non-defective product determination or the defective product determination is confirmed and the non-defective product determination or the defective product determination cannot be determined. Inspection equipment.
請求項9に記載の画像検査装置において、
前記通常検査処理において、前記特徴量と前記閾値とに基づいて、良品判定が可能な特徴量を有する検査対象画像に対しては良品判定を確定させるとともに、不良品判定が可能な特徴量を有する検査対象画像に対しては不良品判定を確定させ、良品判定が確定できない特徴量を有する検査対象画像と、不良品判定が確定できない特徴量を有する検査対象画像とに対してのみ前記深層学習処理を適用するように構成されていることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 9,
In the normal inspection process, for an inspection target image having a feature amount capable of determining a non-defective product based on the feature amount and the threshold value, the non-defective product determination is confirmed and the feature amount capable of determining a defective product is provided. For the inspection target image, the defective product determination is confirmed, and the deep learning process is performed only for the inspection target image having a feature amount for which the non-defective product determination cannot be determined and the inspection target image having a feature amount for which the defective product determination cannot be determined. An image inspection device characterized in that it is configured to apply.
JP2019093171A 2019-05-16 2019-05-16 Image inspection device Active JP7248496B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019093171A JP7248496B2 (en) 2019-05-16 2019-05-16 Image inspection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019093171A JP7248496B2 (en) 2019-05-16 2019-05-16 Image inspection device

Publications (2)

Publication Number Publication Date
JP2020187654A true JP2020187654A (en) 2020-11-19
JP7248496B2 JP7248496B2 (en) 2023-03-29

Family

ID=73221873

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019093171A Active JP7248496B2 (en) 2019-05-16 2019-05-16 Image inspection device

Country Status (1)

Country Link
JP (1) JP7248496B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015026287A (en) * 2013-07-26 2015-02-05 新電元工業株式会社 Solder inspection device, solder inspection method and electronic component
JP2018190140A (en) * 2017-05-01 2018-11-29 オムロン株式会社 Learning apparatus, learning method, and learning program
WO2019026104A1 (en) * 2017-07-31 2019-02-07 富士通株式会社 Information processing device, information processing program, and information processing method
JP2019061578A (en) * 2017-09-27 2019-04-18 富士フイルム株式会社 Learning support device, operation method for learning support device, learning support program, learning support system, and terminal device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015026287A (en) * 2013-07-26 2015-02-05 新電元工業株式会社 Solder inspection device, solder inspection method and electronic component
JP2018190140A (en) * 2017-05-01 2018-11-29 オムロン株式会社 Learning apparatus, learning method, and learning program
WO2019026104A1 (en) * 2017-07-31 2019-02-07 富士通株式会社 Information processing device, information processing program, and information processing method
JP2019061578A (en) * 2017-09-27 2019-04-18 富士フイルム株式会社 Learning support device, operation method for learning support device, learning support program, learning support system, and terminal device

Also Published As

Publication number Publication date
JP7248496B2 (en) 2023-03-29

Similar Documents

Publication Publication Date Title
JP2020187657A (en) Image inspection device
JP7349816B2 (en) Image inspection device
US10489900B2 (en) Inspection apparatus, inspection method, and program
US7409081B2 (en) Apparatus and computer-readable medium for assisting image classification
US7912276B2 (en) Method and apparatus for detecting pattern defects
JP4933771B2 (en) System and method for automatically recovering video tools in an imaging system
US20120229618A1 (en) Defect inspection device and defect inspection method
JP4747955B2 (en) Inspection control device, inspection control method, inspection system, control program, and recording medium
EP1580691A2 (en) Automatic adjustment of acquisition of inspection image
JP7393313B2 (en) Defect classification device, defect classification method and program
JP2010071826A (en) Teacher data preparation method, and image sorting method and image sorter
JP2020187655A (en) Image inspection device
JP2020016471A (en) Image inspection device
JP6049052B2 (en) Wafer visual inspection apparatus and sensitivity threshold setting method in wafer visual inspection apparatus
JP5960433B2 (en) Image processing apparatus and image processing method
JP7248496B2 (en) Image inspection device
JP2007033126A (en) Substrate inspection device, parameter adjusting method thereof and parameter adjusting device
WO2022019110A1 (en) Program, information processing device, information processing method, and model generation method
JP5921190B2 (en) Image processing apparatus and image processing method
JP5934516B2 (en) Inspection area display device and inspection area display method
JP7080123B2 (en) Image inspection equipment
WO2023188803A1 (en) Automatic defect classification device
WO2023162940A1 (en) Inspection device, inspection method, and inspection program
JP2023077056A (en) Appearance inspection device and appearance inspection method
CN115223037A (en) Image inspection apparatus and image inspection method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20220309

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230221

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230316

R150 Certificate of patent or registration of utility model

Ref document number: 7248496

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150