JP7074460B2 - Image inspection equipment and methods - Google Patents

Image inspection equipment and methods Download PDF

Info

Publication number
JP7074460B2
JP7074460B2 JP2017217004A JP2017217004A JP7074460B2 JP 7074460 B2 JP7074460 B2 JP 7074460B2 JP 2017217004 A JP2017217004 A JP 2017217004A JP 2017217004 A JP2017217004 A JP 2017217004A JP 7074460 B2 JP7074460 B2 JP 7074460B2
Authority
JP
Japan
Prior art keywords
image
unit
feature amount
learning
neural network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017217004A
Other languages
Japanese (ja)
Other versions
JP2019087181A (en
Inventor
智樹 細居
友哉 中澤
貴弘 茂木
鉄也 田原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Azbil Corp
Original Assignee
Azbil 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 Azbil Corp filed Critical Azbil Corp
Priority to JP2017217004A priority Critical patent/JP7074460B2/en
Publication of JP2019087181A publication Critical patent/JP2019087181A/en
Application granted granted Critical
Publication of JP7074460B2 publication Critical patent/JP7074460B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、画像検査装置および方法に関し、特に検査対象の画像を用いる検査技術に関する。 The present invention relates to an image inspection apparatus and method, and more particularly to an inspection technique using an image to be inspected.

従来より、製品の完成品や、半完成品、加工過程にある製品や部品の検査方法として、画像を用いた画像検査と呼ばれるものがある。これは、検査対象の画像を撮像装置で取得し、取得した画像をもとに不良や欠陥の有無、種類などを判定するものである。例えば、特許文献1には、検査対象の外観の良否を判定する技術が開示されている。 Conventionally, as an inspection method for finished products, semi-finished products, products and parts in the processing process, there is a method called image inspection using images. In this method, an image to be inspected is acquired by an image pickup device, and the presence or absence of defects and defects, the type, and the like are determined based on the acquired image. For example, Patent Document 1 discloses a technique for determining the quality of the appearance of an inspection target.

製品などの検査対象の不良や欠陥の有無を検査する画像検査の手法は多種多様だが、従来の画像検査装置における一般的な動作としては、図17のフローチャートに示すような動作が一般的である。まず、画像検査装置は検査対象の画像を取得する(ステップS800)。次に、画像検査装置は、取得した画像の前処理を行い、画像を検査しやすい状態に加工する(ステップS801)。 There are a wide variety of image inspection methods for inspecting the presence or absence of defects and defects in inspection targets such as products, but the general operation of a conventional image inspection device is as shown in the flowchart of FIG. .. First, the image inspection device acquires an image to be inspected (step S800). Next, the image inspection device performs preprocessing of the acquired image and processes the image into a state in which it is easy to inspect (step S801).

続いて、画像検査装置は、前処理後の画像から、画像の特徴を定量化した特徴量を算出する(ステップS802)。なお、算出される画像の特徴量については、画像検査装置において採用される具体的な手法に応じて、その特徴量は1つの場合や複数の場合がある。そして、画像検査装置は、画像の特徴量の値に基づいて、検査対象が良品か不良品かを判定する(ステップS803)。 Subsequently, the image inspection apparatus calculates a feature amount that quantifies the feature of the image from the image after the preprocessing (step S802). Regarding the calculated feature amount of the image, there may be one case or a plurality of feature amounts depending on the specific method adopted in the image inspection apparatus. Then, the image inspection device determines whether the inspection target is a non-defective product or a defective product based on the value of the feature amount of the image (step S803).

画像の特徴を定量化した特徴量には様々なものがあるが、従来の画像検査装置においては、画像検査装置の設計者が自らの知見に基づいて設計、選択するのが一般的であった。また、検査対象が良品であるか不良品であるかの判定方法については、設計者が決めたしきい値に基づいて判定するもの、統計的検定によるもの、機械学習によるものなど、様々な手法が使われている。 There are various feature quantities that quantify the features of an image, but in conventional image inspection devices, it was common for the designer of the image inspection device to design and select based on his or her own knowledge. .. In addition, as for the method of determining whether the inspection target is a good product or a defective product, various methods such as a judgment method based on a threshold value determined by the designer, a statistical test method, and a machine learning method are used. Is used.

ところで、近年、畳み込みニューラルネットワークを用い、深層学習によって検査対象の画像の特徴量を学習して画像検査を行う手法が提案されている。そのような手法では、図17に示すような構成のニューラルネットワーク900を用いて検査を行う。この手法では、畳み込み演算を中心とした演算を行う畳み込み層901a、901b、901cと呼ばれる要素を直列に複数接続して、入力された検査対象の画像から特徴的なパターンを抽出し、画像の特徴量を計算する。そして、畳み込み層901a、901b、901cの後に続く全結合層902と呼ばれる部分が、算出された画像の特徴量に基づいて、検査対象の良否を判定する。 By the way, in recent years, a method has been proposed in which an image inspection is performed by learning the feature amount of an image to be inspected by deep learning using a convolutional neural network. In such a method, the inspection is performed using the neural network 900 having the configuration shown in FIG. In this method, a plurality of elements called convolution layers 901a, 901b, and 901c that perform operations centered on the convolution operation are connected in series, and a characteristic pattern is extracted from the input image to be inspected, and the characteristics of the image are obtained. Calculate the amount. Then, the portion called the fully connected layer 902 following the convolution layers 901a, 901b, and 901c determines the quality of the inspection target based on the calculated feature amount of the image.

例えば、特許文献2は、医療画像を対象としているが、検査対象の3次元画像から生成された2次元画像に対し、畳み込み層と全結合層とを持つニューラルネットワークを用いて検査対象を分類する技術を開示している。 For example, Patent Document 2 targets medical images, but classifies inspection targets using a neural network having a convolution layer and a fully connected layer for a two-dimensional image generated from a three-dimensional image to be inspected. The technology is disclosed.

このようなニューラルネットワークに基づく画像検査手法の特徴は、画像の特徴量が学習によって自動で獲得されることにある。前述したように、特許文献1に記載されているような従来の画像検査手法を用いた技術では、画像の特徴量は設計者が自らの知見に基づいて設計されるのが一般的だった。特徴量は画像検査の性能を大きく左右するが、検査対象によって適切な特徴量は異なる。そのため、特徴量の設計は画像処理や画像検査の専門家でないと難しいものであると考えられていた。 The feature of the image inspection method based on such a neural network is that the feature amount of the image is automatically acquired by learning. As described above, in the technique using the conventional image inspection method as described in Patent Document 1, the feature amount of the image is generally designed by the designer based on his / her own knowledge. The feature amount greatly affects the performance of image inspection, but the appropriate feature amount differs depending on the inspection target. Therefore, it was considered difficult to design features unless they were experts in image processing and image inspection.

それに対し、特許文献2に記載されているようなニューラルネットワークに基づく画像検査手法では、良品および不良品の検査対象の画像を大量に用意すれば、それらを学習することで検査により適した画像の特徴量が得られる。そのため、特徴量の設計を大幅に省力化することができた。畳み込みニューラルネットワークを用いた深層学習により特徴量が自動で獲得されることについては、例えば、非特許文献1に開示されているように、よく知られた事実である。 On the other hand, in the image inspection method based on the neural network as described in Patent Document 2, if a large number of images to be inspected for non-defective products and defective products are prepared, the images more suitable for inspection can be obtained by learning them. A feature amount can be obtained. Therefore, it was possible to save a lot of labor in the design of features. It is a well-known fact that features are automatically acquired by deep learning using a convolutional neural network, as disclosed in Non-Patent Document 1, for example.

特許文献1に記載されている手法では、画像検査を行う前に、ニューラルネットワークに良品と不良品の区別を学習させ、十分に高い正答率で検査対象の良否を判別できるようにする必要がある。この学習は「教師あり学習」と呼ばれるもので、良品と不良品とが予め区別された検査対象の画像を必要とする。一方、深層学習による画像の学習では、大量の学習用の画像が必要となる。また、学習に用いる検査対象の良品画像と不良品画像の数は同数に近い方が望ましいとされる。これは、多くの良品画像だけでなく、多くの不良品画像も必要であることを意味する。 In the method described in Patent Document 1, it is necessary to make a neural network learn the distinction between a non-defective product and a defective product before performing an image inspection so that the quality of the inspection target can be determined with a sufficiently high correct answer rate. .. This learning is called "supervised learning" and requires an image to be inspected in which good products and defective products are distinguished in advance. On the other hand, image learning by deep learning requires a large amount of images for learning. Further, it is desirable that the number of good images and defective images to be inspected used for learning is close to the same number. This means that not only many good images but also many defective images are needed.

しかし、学習用の画像として、多数の不良品画像を用意することが難しいケースは少なくない。生産現場では通常、不良品をできるだけ出さないように生産設備や工程が設計されており、不良品率が低いことは珍しくない。しかし、そのような現場から収集された検査用の画像は、良品の画像が大半を占めることになり、図18に示すようなニューラルネットワークをうまく学習できないことが多い。 However, it is often difficult to prepare a large number of defective images as learning images. At the production site, production equipment and processes are usually designed so as not to produce defective products as much as possible, and it is not uncommon for the defective product rate to be low. However, most of the inspection images collected from such sites are good images, and it is often difficult to successfully learn the neural network as shown in FIG.

その理由として、一般的に、ニューラルネットワークの教師あり学習は、ニューラルネットワークの出力が教師と異なる場合、すなわち誤った出力の場合に進行するようになっている。最初のうちは誤判定が多いが、それにより学習が進み、段々と誤判定が減り、最後は良否を正しく判定できるようになるというのが通常の学習プロセスである。 The reason is that, in general, supervised learning of a neural network proceeds when the output of the neural network is different from that of the teacher, that is, when the output is incorrect. At the beginning, there are many erroneous judgments, but as a result, learning progresses, erroneous judgments gradually decrease, and at the end, good or bad can be judged correctly, which is the normal learning process.

しかし、良品の画像しか無い場合や、不良品の画像が非常に少ない場合は、ニューラルネットワークが常に良品と出力することでも正答率が高くなる。そのため、本当に学習させたい良否の区別を学習することが難しくなる。 However, if there are only good images or if there are very few defective images, the correct answer rate will be high even if the neural network always outputs good images. Therefore, it becomes difficult to learn the distinction between good and bad that you really want to learn.

このような理由から、従来の畳み込みニューラルネットワークによる深層学習を用いた画像検査装置は、不良品が無い、または不良品が少ない場合には適用が困難な場合があった。そして、このことは新しい生産設備や装置を立ち上げた際に、不良品の画像が相当数蓄積するまでは検査を実行できないことを意味する。よって、従来の畳み込みニューラルネットワークによる深層学習を用いた画像検査装置は、画像の特徴量を自動で学習できるというメリットはあるが、それが発揮できる場面は限られることになる。 For this reason, it may be difficult to apply a conventional image inspection device using deep learning by a convolutional neural network when there are no defective products or there are few defective products. And this means that when a new production facility or equipment is started up, the inspection cannot be performed until a considerable number of defective images are accumulated. Therefore, the image inspection device using the deep learning by the conventional convolutional neural network has an advantage that the feature amount of the image can be automatically learned, but the scenes in which it can be exhibited are limited.

特開2017-174039号公報Japanese Unexamined Patent Publication No. 2017-174039 特開2016-99707号公報Japanese Unexamined Patent Publication No. 2016-999707 特開2008-310700号公報Japanese Unexamined Patent Publication No. 2008-310700

松尾 豊 著「人工知能は人間を超えるか ディープラーニングの先にあるもの」,角川EPUB選書,2015年3月発行Yutaka Matsuo, "Is Artificial Intelligence Beyond Humans? Beyond Deep Learning," Kakugawa EPUB Selection, published in March 2015 Alec Radford et al.:Unsupervised Representation Learning with Deep Convolutional Generative Adversarial Networks,ICLR 2016(arXiv:1511.06434)Alec Radford et al. : Unsupervised Representation Learning with Deep Convolutional Generic Advanced Network, ICLR 2016 (arXiv: 1511.06434) Diederik P.Kingma et al.:Auto-Encoding Variational Bayes(arXiv:1312.6114)Diederik P.M. Kingma et al. : Auto-Encoding Variational Bayes (arXiv: 1312.6114) Jost Tobias Springenberg et al.:Striving for Simplicity:The All Convolutional Net(arXiv:1412.6806)Just Tobias Springenberg et al. : Driving for Syntax: The All Convolutional Net (arXiv: 1412.6806) Liu,Fei Tony and Ting,Kai Ming and Zhou,Zhi-Hua:Isolation forest,Data Mining,2008.ICDM‘08.Eighth IEEE International Conference on,IEEE,pp.413-422(2008)Liu, Fei Tony and Ting, Kai Ming and Zhou, Zhi-Hua: Isolation forest, Data Mining, 2008. ICMP'08. Eighth IEEE International Convention on, IEEE, pp. 413-422 (2008) Watanabe,Satosi and Pakvasa,Nikhil:Subspace method of pattern recognition,Proc.1st.IJCPR,pp.25-32(1973)Watanabe, Satosi and Pakvasa, Nikhil: Subspace method of pattern recognition, Proc. 1st. IJCPR, pp. 25-32 (1973) Breunig,Markus M and Kriegel,Hans-Peter and Ng,Raymond T and Sander,Jorg:LOF:identifying density-based local outliers,ACM sigmod record,Vol.29-2,ACM,pp.93-104(2000)Breunig, Markus Mand Kriegel, Hans-Peter and Ng, Raymond T and Sander, Jorg: LOF: identityfying density-based local outliers, ACM sigmod. 29-2, ACM, pp. 93-104 (2000) Cortes,Corinna and Vapnik,Vladimir:Support-vector networks,Machine learning,Vol.20-3,Springer,pp.273-297(1995)Cortes, Corinna and Vapnik, Vladimir: Support-vector network, Machine learning, Vol. 20-3, Springer, pp. 273-297 (1995) Breiman,Leo:Random forests,Machine learning,Vol.45-1,Springer,pp.5-32(2001)Breiman, Leo: Random forests, Machine learning, Vol. 45-1, Springer, pp. 5-32 (2001) Viola,Paul and Jones,Michael:Rapid object detection using a boosted cascade of simple features,Computer Vision and Pattern Recognition,2001.CVPR 2001.Proceedings of the 2001 IEEE Computer Society Conference on,Vol.1,IEEE(2001)Viola, Paul and Joes, Michael: Rapid object detection using a boosted cachedade of simple features, Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on, Vol. 1, IEEE (2001)

従来の畳み込みニューラルネットワークによる深層学習を用いた画像検査装置では、検査対象の不良品が無い場合や少ない場合には、検査対象の画像の特徴量を自動で学習できる画像検査装置を構築することが困難であった。 In the image inspection device using deep learning by the conventional convolutional neural network, if there are no or few defective products to be inspected, it is possible to construct an image inspection device that can automatically learn the feature amount of the image to be inspected. It was difficult.

本発明は、上述した課題を解決するためになされたものであり、検査対象の不良品が無い場合や少ない場合であっても、検査対象の画像の特徴量を自動で学習することができる画像検査装置を提供する。 The present invention has been made to solve the above-mentioned problems, and an image capable of automatically learning the feature amount of an image to be inspected even when there are no or few defective products to be inspected. Provide an inspection device.

上述した課題を解決するために、本発明に係る画像検査装置は、検査対象の良否を画像によって検査する画像検査装置であって、前記検査対象を含む学習用画像に基づいてニューラルネットワークの学習を行い、前記学習用画像を復元できる特徴量を出力する学習済みのニューラルネットワークを構築する特徴量学習部と、前記特徴量学習部の学習完了後、前記学習済みのニューラルネットワークが出力した前記学習用画像の前記特徴量に基づいて、前記検査対象の良否を判定する識別器を学習により生成する識別器学習部と、前記検査対象を含む判定用画像を前記学習済みのニューラルネットワークに入力し、前記判定用画像の特徴量を出力する特徴量算出部と、前記特徴量算出部が出力した前記判定用画像の前記特徴量を、前記識別器学習部によって生成された前記識別器に入力して、前記検査対象の良否の判定を行う識別部とを備えることを特徴とする。 In order to solve the above-mentioned problems, the image inspection device according to the present invention is an image inspection device that inspects the quality of an inspection target by an image, and learns a neural network based on a learning image including the inspection target. The feature amount learning unit that constructs a trained neural network that outputs a feature amount that can restore the learning image, and the learning unit that is output by the trained neural network after the learning of the feature amount learning unit is completed. A discriminator learning unit that generates a discriminator for determining the quality of the inspection target based on the feature amount of the image by learning, and a determination image including the inspection target are input to the trained neural network, and the above is described. The feature amount calculation unit that outputs the feature amount of the determination image and the feature amount of the determination image output by the feature amount calculation unit are input to the classifier generated by the discriminator learning unit. It is characterized by including an identification unit for determining the quality of the inspection target.

また、本発明に係る画像検査装置において、前記特徴量学習部は、前記学習用画像を入力画像として記憶する第1の入力画像記憶部と、前記入力画像を入力として、前記入力画像の特徴量を出力する第1の畳み込みニューラルネットワーク演算部と、前記第1の畳み込みニューラルネットワーク演算部が出力した前記入力画像の前記特徴量を入力として、前記入力画像と同一の大きさの画像を出力する逆畳み込みニューラルネットワーク演算部と、前記逆畳み込みニューラルネットワーク演算部から出力された前記画像を出力画像として記憶する出力画像記憶部と、前記入力画像と前記出力画像との差異を算出する画像差異算出部と、前記差異が、算出された値より小さくなるように前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部それぞれのパラメータの値を更新する特徴量算出設定更新部と、前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部それぞれの前記パラメータの値を記憶する特徴量算出設定記憶部と、を備え、前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部は、前記特徴量算出設定記憶部に記憶されている前記パラメータの値を用いてそれぞれ演算を行い、前記特徴量算出設定記憶部は、更新された前記パラメータの値を記憶し、前記第1の畳み込みニューラルネットワーク演算部は、更新された前記パラメータの値を用いて、すべての前記学習用画像それぞれの前記特徴量を出力してもよい。 Further, in the image inspection device according to the present invention, the feature amount learning unit has a first input image storage unit that stores the learning image as an input image and a feature amount of the input image using the input image as an input. The first convolutional neural network calculation unit that outputs A convolutional neural network calculation unit, an output image storage unit that stores the image output from the reverse convolutional neural network calculation unit as an output image, and an image difference calculation unit that calculates the difference between the input image and the output image. , The feature amount calculation setting update unit that updates the parameter values of the first convolutional neural network calculation unit and the reverse convolutional neural network calculation unit so that the difference becomes smaller than the calculated value, and the first A feature amount calculation setting storage unit for storing the values of the parameters of each of the convolutional neural network calculation unit and the reverse convolutional neural network calculation unit is provided, and the first convolutional neural network calculation unit and the reverse convolutional neural network calculation unit are provided. Each unit performs an operation using the value of the parameter stored in the feature amount calculation setting storage unit, and the feature amount calculation setting storage unit stores the updated value of the parameter, and the first unit. The convolutional neural network calculation unit of the above may output the feature amount of each of the learning images by using the updated value of the parameter.

また、本発明に係る画像検査装置において、前記特徴量算出部は、前記判定用画像を記憶する第2の入力画像記憶部と、前記特徴量算出設定記憶部に記憶されている更新された前記パラメータの値を用いて、前記判定用画像を入力として、前記判定用画像の前記特徴量を出力する第2の畳み込みニューラルネットワーク演算部とを備えていてもよい。 Further, in the image inspection apparatus according to the present invention, the feature amount calculation unit is an updated input image storage unit that stores the determination image and an updated feature amount calculation setting storage unit. It may be provided with a second convolutional neural network calculation unit that inputs the determination image using the value of the parameter and outputs the feature amount of the determination image.

また、本発明に係る画像検査装置において、前記識別器学習部は、前記特徴量学習部が出力した前記学習用画像の前記特徴量を入力する第1の特徴量入力部と、前記学習用画像の前記特徴量を入力として、教師なし学習を行い前記識別器を生成する識別演算教師なし学習部と、を備え、前記識別演算教師なし学習部は、前記識別器を、アイソレーションフォレスト、One-Classサポートベクターマシン、部分空間法、Local Outlier Factor、統計的検定のうちのいずれかの手法で学習してもよい。 Further, in the image inspection device according to the present invention, the discriminator learning unit includes a first feature amount input unit for inputting the feature amount of the learning image output by the feature amount learning unit, and the learning image. The discriminant operation unsupervised learning unit is provided with an unsupervised learning unit that performs unsupervised learning and generates the discriminator by using the feature amount of the above as an input. You may learn by any of the following methods: Class support vector machine, subspace method, Local Outlier Factor, and statistical test.

また、本発明に係る画像検査装置において、前記識別部は、前記特徴量算出部が出力した前記判定用画像の前記特徴量を入力する第2の特徴量入力部と、前記判定用画像の前記特徴量を入力として、前記識別演算教師なし学習部によって生成された前記識別器を用いて、前記検査対象の良否の判定を行う識別演算部とを備えていてもよい。 Further, in the image inspection apparatus according to the present invention, the identification unit includes a second feature amount input unit for inputting the feature amount of the determination image output by the feature amount calculation unit, and the determination unit. The discriminator generated by the discriminating calculation unsupervised learning unit may be provided with a discriminating calculation unit that determines the quality of the inspection target by using the feature amount as an input.

また、本発明に係る画像検査装置において、前記識別器学習部は前記識別演算教師なし学習部が有する調整パラメータの値を調整する識別器調整部をさらに備え、前記識別器調整部は、不良品を示す画像と良品を示す画像とが区別されている前記検査対象の画像から算出される特徴量に基づいて前記調整パラメータの値を調整してもよい。 Further, in the image inspection apparatus according to the present invention, the discriminator learning unit further includes a discriminator adjusting unit that adjusts the value of the adjustment parameter of the discriminating calculation unsupervised learning unit, and the discriminator adjusting unit is a defective product. The value of the adjustment parameter may be adjusted based on the feature amount calculated from the image to be inspected in which the image showing the above and the image showing the non-defective product are distinguished.

また、本発明に係る画像検査装置において、前記識別器学習部は、前記特徴量学習部が出力した前記学習用画像の前記特徴量を入力する第1の特徴量入力部と、入力された前記学習用画像の前記特徴量に対応する前記学習用画像の良否を示す情報を入力する良否情報入力部と、前記学習用画像の前記特徴量および対応する前記学習用画像の前記良否を示す情報を入力として、教師あり学習により前記識別器を生成する識別演算教師あり学習部と、を備え、前記識別演算教師あり学習部は、サポートベクターマシン、ランダムフォレスト、ブースティングのうちのいずれかの手法で学習してもよい。 Further, in the image inspection apparatus according to the present invention, the discriminator learning unit includes a first feature amount input unit for inputting the feature amount of the learning image output by the feature amount learning unit, and the input. A pass / fail information input unit for inputting information indicating the quality of the learning image corresponding to the feature amount of the learning image, and information indicating the quality of the feature amount of the learning image and the corresponding learning image. As an input, the discriminant calculation supervised learning unit that generates the discriminator by supervised learning is provided, and the discriminant calculation supervised learning unit is a support vector machine, a random forest, or a boosting method. You may learn.

また、本発明に係る画像検査装置において、前記識別部は、前記特徴量算出部が出力した前記判定用画像の前記特徴量を入力する第2の特徴量入力部と、前記判定用画像の前記特徴量を入力として、前記識別演算教師あり学習部によって生成された前記識別器を用いて、前記検査対象の良否の判定を行う識別演算部とを備えていてもよい。 Further, in the image inspection apparatus according to the present invention, the identification unit includes a second feature amount input unit for inputting the feature amount of the determination image output by the feature amount calculation unit, and the determination unit. The discriminator generated by the discriminating calculation supervised learning unit may be provided with a discriminating calculation unit that determines the quality of the inspection target by using the feature amount as an input.

また、本発明に係る画像検査装置において、さらに前記学習用画像を取得する第1の画像取得部と、前記判定用画像を取得する第2の画像取得部とを有する画像取得部を備えていてもよい。 Further, the image inspection apparatus according to the present invention further includes an image acquisition unit having a first image acquisition unit for acquiring the learning image and a second image acquisition unit for acquiring the determination image. May be good.

また、本発明に係る画像検査方法は、検査対象を含む学習用画像に基づいてニューラルネットワークの学習を行い、前記学習用画像の特徴量を出力する学習済みのニューラルネットワークを構築する特徴量学習ステップと、前記学習済みのニューラルネットワークが出力した前記学習用画像の前記特徴量に基づいて、前記検査対象の良否を判定する識別器を学習により生成する識別器学習ステップと、前記検査対象を含む判定用画像を前記学習済みのニューラルネットワークに入力し、前記判定用画像の特徴量を出力する特徴量算出ステップと、前記特徴量算出ステップで出力した前記判定用画像の前記特徴量を、前記識別器学習ステップで生成された前記識別器に入力して、前記検査対象の良否の判定を行う識別ステップとを備えることを特徴とする。 Further, in the image inspection method according to the present invention, a feature amount learning step of learning a neural network based on a learning image including an inspection target and constructing a trained neural network that outputs the feature amount of the learning image. A discriminator learning step that generates a discriminator for determining the quality of the inspection target by learning based on the feature amount of the learning image output by the trained neural network, and a determination including the inspection target. The feature amount calculation step of inputting the image for use into the trained neural network and outputting the feature amount of the determination image, and the feature amount of the determination image output in the feature amount calculation step are subjected to the discriminator. It is characterized by comprising an identification step for determining the quality of the inspection target by inputting to the classifier generated in the learning step.

本発明によれば、検査対象の画像における特徴量を抽出する畳み込み層の学習と、検査対象の良否を判定する識別器の学習を別個に行うので、検査対象の不良品が無い、または少ない場合であっても、検査対象の画像の特徴量を自動で学習することができる。 According to the present invention, learning of the folding layer for extracting the feature amount in the image to be inspected and learning of the discriminator for determining the quality of the inspection target are performed separately, so that there is no or few defective products to be inspected. Even so, the feature amount of the image to be inspected can be automatically learned.

図1は、本発明に係る画像検査装置の原理を説明する図である。FIG. 1 is a diagram illustrating the principle of the image inspection apparatus according to the present invention. 図2は、本発明の第1の実施の形態に係る画像検査装置の機能ブロック図である。FIG. 2 is a functional block diagram of the image inspection apparatus according to the first embodiment of the present invention. 図3は、本発明の第1の実施の形態に係る特徴量学習部に用いられるニューラルネットワーク構造の一例を示す図である。FIG. 3 is a diagram showing an example of a neural network structure used in the feature amount learning unit according to the first embodiment of the present invention. 図4は、本発明の第1の実施の形態に係る特徴量学習部に用いられるニューラルネットワーク構造の別の例を示す図である。FIG. 4 is a diagram showing another example of the neural network structure used in the feature amount learning unit according to the first embodiment of the present invention. 図5は、本発明の第1の実施の形態に係る特徴量学習部および特徴量算出部の機能ブロック図である。FIG. 5 is a functional block diagram of a feature amount learning unit and a feature amount calculation unit according to the first embodiment of the present invention. 図6は、本発明の第1の実施の形態に係る識別器学習部および識別部の機能ブロック図である。FIG. 6 is a functional block diagram of the discriminator learning unit and the discriminating unit according to the first embodiment of the present invention. 図7は、本発明の第1の実施の形態に係る画像検査装置のハードウェア構成を示すブロック図である。FIG. 7 is a block diagram showing a hardware configuration of the image inspection device according to the first embodiment of the present invention. 図8は、本発明の第1の実施の形態に係る特徴量学習処理のフローチャートである。FIG. 8 is a flowchart of the feature amount learning process according to the first embodiment of the present invention. 図9は、本発明の第1の実施の形態に係る識別器教師なし学習処理のフローチャートである。FIG. 9 is a flowchart of the discriminator-unsupervised learning process according to the first embodiment of the present invention. 図10は、本発明の第1の実施の形態に係る特徴量算出処理のフローチャートである。FIG. 10 is a flowchart of the feature amount calculation process according to the first embodiment of the present invention. 図11は、本発明の第1の実施の形態に係る判定出力処理のフローチャートである。FIG. 11 is a flowchart of the determination output process according to the first embodiment of the present invention. 図12は、本発明の第2の実施の形態に係る画像検査装置の機能ブロック図である。FIG. 12 is a functional block diagram of the image inspection apparatus according to the second embodiment of the present invention. 図13は、本発明の第2の実施の形態に係る識別器調整部による調整パラメータの調整を説明する図である。FIG. 13 is a diagram illustrating adjustment of adjustment parameters by the classifier adjusting unit according to the second embodiment of the present invention. 図14は、本発明の第2の実施の形態に係るパラメータ調整処理のフローチャートである。FIG. 14 is a flowchart of the parameter adjustment process according to the second embodiment of the present invention. 図15は、本発明の第3の実施の形態に係る識別器学習部および識別部の機能ブロック図である。FIG. 15 is a functional block diagram of the discriminator learning unit and the discriminating unit according to the third embodiment of the present invention. 図16は、本発明の第3の実施の形態に係る識別器教師あり学習処理のフローチャートである。FIG. 16 is a flowchart of the discriminator supervised learning process according to the third embodiment of the present invention. 図17は、従来の画像検査装置の動作の概要を説明するフローチャートである。FIG. 17 is a flowchart illustrating an outline of the operation of the conventional image inspection device. 図18は、従来の画像検査装置に用いられる畳み込みニューラルネットによる深層学習モデルを示す図である。FIG. 18 is a diagram showing a deep learning model using a convolutional neural network used in a conventional image inspection device.

[発明の原理]
図1は、本発明に係る画像検査装置の原理を説明する図である。本発明に係る画像検査装置は、検査対象の画像の特徴量を学習する畳み込み層と、検査対象の良否を判定する識別器とをそれぞれ分けて別々に学習させる。畳み込み層の学習においては、自己符号化器に基づいた教師なし学習を行う。識別器においては、検査対象の不良品が無い状況、または、検査対象の不良品が少ない状況であっても識別器を生成することができる学習手法が用いられる。
[Principle of invention]
FIG. 1 is a diagram illustrating the principle of the image inspection apparatus according to the present invention. In the image inspection apparatus according to the present invention, the convolutional layer for learning the feature amount of the image to be inspected and the discriminator for determining the quality of the inspection target are separately learned. In the learning of the convolution layer, unsupervised learning based on the self-encoder is performed. In the classifier, a learning method that can generate a classifier is used even when there are no defective products to be inspected or there are few defective products to be inspected.

図1に示すように、従来技術による画像検査装置では、検査対象の画像の特徴量を抽出する畳み込み層と、検査対象の良否を判定する全結合層の組み合わせからなるニューラルネットワークを一体として学習していた。そのため、検査対象の画像における特徴量の学習には、一定数の不良品の画像が必要であった。 As shown in FIG. 1, in an image inspection device according to a conventional technique, a neural network consisting of a combination of a convolution layer for extracting features of an image to be inspected and a fully connected layer for determining the quality of the inspection target is learned as a unit. Was there. Therefore, a certain number of defective images were required to learn the feature amount in the image to be inspected.

しかし、畳み込み層と全結合層との2つの部分を一体として学習することは必ずしも必要ではないといえる。まず、検査対象の画像の特徴量を抽出する畳み込み層の学習においては、検査対象の画像が良品を示す画像であるか不良品を示す画像であるかという区別は必ずしも必要でない。また、畳み込み層を全結合層から切り離して学習することは可能である。 However, it can be said that it is not always necessary to learn the two parts of the convolution layer and the fully connected layer as one. First, in learning the convolution layer for extracting the feature amount of the image to be inspected, it is not always necessary to distinguish whether the image to be inspected is an image showing a good product or an image showing a defective product. In addition, it is possible to learn by separating the convolutional layer from the fully connected layer.

畳み込み層のみの学習ができれば、検査対象の良否を判定する全結合層を、より適した識別器に置き換えて、識別器単独での学習を行うことも可能となる。また、この識別器の学習には、検査対象の不良品画像が無い場合や、ごく少ない場合であっても行うことができる手法が用いられる。 If only the convolutional layer can be learned, it is possible to replace the fully connected layer for determining the quality of the inspection target with a more suitable classifier and perform learning by the classifier alone. Further, in the learning of this classifier, a method that can be performed even when there is no defective image to be inspected or when there are very few defective products is used.

上記のような手法を用いれば、不良品が無い場合、または不良品の数が少ない場合でも、検査対象の画像の特徴量を自動で学習する画像検査装置を実現することができる。以下、本発明に係る画像検査装置に用いられる、画像の特徴量を抽出する畳み込み層と、検査対象の良否を判定する識別器のそれぞれについてより詳しく説明する。 By using the above method, it is possible to realize an image inspection device that automatically learns the feature amount of the image to be inspected even when there are no defective products or the number of defective products is small. Hereinafter, each of the convolutional layer for extracting the feature amount of the image and the discriminator for determining the quality of the inspection target used in the image inspection apparatus according to the present invention will be described in more detail.

特徴量を抽出する畳み込み層の学習については、自己符号化器(Auto Encoder)や変分自己符号化器(Variational Auto Encoder)、敵対的生成ネットワーク(Generative Adversarial Networks)といった手法を用いれば、検査対象の不良品画像が無い、または少ない状況であっても、教師なし学習により画像の特徴量を学習できる。特に、変分自己符号化器や敵対的生成ネットワークは、学習時に用いた画像に含まれていない画像を生成する能力があることが非特許文献2、3などに記載されており、未知の良品や不良品の画像にも適応できるという効果が期待できる。 For the learning of the convolutional layer for extracting the features, the inspection target can be obtained by using a method such as a self-encoder (Auto Encoder), a variational self-encoder (Variational Auto Encoder), or a hostile generation network (Generative Adversarial Networks). Even if there is no or few defective images, the feature amount of the image can be learned by unsupervised learning. In particular, it is described in Non-Patent Documents 2 and 3 that the variable self-encoder and the hostile generation network have the ability to generate an image not included in the image used at the time of learning, and it is an unknown good product. It can be expected to have the effect of being applicable to images of defective products.

検査対象の良否を判定する識別器は、従来技術で使われている全結合層からなるニューラルネットワーク以外にも様々な手法がある。その中には、本発明で想定している検査対象の不良品が無い、または不良品の数が少ない状況でも利用可能な手法もある。具体的には、混合正規分布モデルを用いた統計的検定、アイソレーションフォレスト、Local Outlier Factor(以下、「LOF」という。)、サポートベクターマシン(以下、「SVM」という。)、ランダムフォレスト、ブースティングといった手法である。 There are various methods for determining the quality of the inspection target in addition to the neural network consisting of fully connected layers used in the prior art. Among them, there is a method that can be used even in a situation where there is no defective product to be inspected or the number of defective products assumed in the present invention is small. Specifically, a statistical test using a mixed normal distribution model, an isolation forest, a Local Outlier Factor (hereinafter referred to as "LOF"), a support vector machine (hereinafter referred to as "SVM"), a random forest, and a booth. It is a technique such as ting.

全結合層からなるニューラルネットワークは、良品および不良品の両方の画像を多く用いて学習する必要があるのに対し、上記の手法では、検査対象の良品画像だけ、または不良品画像の数がごく少ない状況でも、画像の特徴量を学習して識別器を構築できる。そのため、本発明で想定しているような、検査対象の不良品が無い、または少ない状況においても検査対象の画像検査を行うことができる。 Whereas a neural network consisting of fully connected layers needs to be learned using many images of both good and defective products, in the above method, only the good products to be inspected or the number of defective products is very small. Even in a small number of situations, it is possible to build a classifier by learning the features of the image. Therefore, the image inspection of the inspection target can be performed even in a situation where there is no or few defective products to be inspected as assumed in the present invention.

以下、本発明の好適な実施の形態について、図2から図16を参照して詳細に説明する。各図について共通する構成要素には、同一の符号が付されている。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to FIGS. 2 to 16. The components that are common to each figure are designated by the same reference numerals.

[第1の実施の形態]
図2は、本発明の第1の実施の形態に係る画像検査装置1の機能ブロック図である。第1の実施の形態では、検査対象の不良品画像が無い状況、またはあったとしても学習に用いる画像が良品と不良品とに区別されていない、すなわち、ラベル付けされていない状況を対象としている。
[First Embodiment]
FIG. 2 is a functional block diagram of the image inspection device 1 according to the first embodiment of the present invention. In the first embodiment, the situation where there is no defective image to be inspected, or even if there is, the image used for learning is not distinguished into a good product and a defective product, that is, a situation where the product is not labeled is targeted. There is.

[画像検査装置全体の機能ブロック]
画像検査装置1は、撮像部2と、画像取得部3と、学習部4と、判定部5とを備える。画像検査装置1は、その機能を大きく分けると、検査対象である製品などの画像の特徴量を学習する学習部4と、学習後に、検査対象の良否を判定する判定部5とを含む。
[Functional block of the entire image inspection device]
The image inspection device 1 includes an image pickup unit 2, an image acquisition unit 3, a learning unit 4, and a determination unit 5. The image inspection device 1 includes a learning unit 4 for learning the feature amount of an image of a product or the like to be inspected, and a determination unit 5 for determining the quality of the inspection target after learning.

撮像部2は、検査対象を含む画像を撮影する。撮像部2は、学習部4が学習を行う際に用いる、検査対象を含む学習用の画像(以下、「学習用画像」という。)、および判定部5が検査対象の良否の判定を行う際に用いる検査対象を含む判定用の画像(以下、「判定用画像」という。)を撮影する。なお、学習部4に用いられる画像の撮影条件と、判定部5に用いられる画像の撮影条件とは、できるだけ一致することが好ましい。これは、学習時と判定時とで撮影条件が大きく異なることで、正しい検査できなくなることを防止するためである。 The image pickup unit 2 captures an image including an inspection target. The image pickup unit 2 is used when the learning unit 4 performs learning, an image for learning including an inspection target (hereinafter, referred to as “learning image”), and when the determination unit 5 determines the quality of the inspection target. An image for determination (hereinafter referred to as "determination image") including the inspection target used for the above is taken. It is preferable that the image shooting conditions used for the learning unit 4 and the image shooting conditions used for the determination unit 5 match as much as possible. This is to prevent the correct inspection from being impossible due to the large difference in shooting conditions between the time of learning and the time of judgment.

画像取得部3は、撮像部2が撮影した画像を、例えば、ネットワーク通信などの電子的手段で取得する。 The image acquisition unit 3 acquires an image taken by the image pickup unit 2 by electronic means such as network communication.

学習部4は、画像保存部41、特徴量学習部42、および識別器学習部43を備える。学習部4は、撮像部2によって撮影された検査対象である製品の多数の画像を学習し、判定部5が検査対象の良否を正しく判定できるように演算内容を決定する。
画像保存部41には、学習部4によって用いられる複数の学習用画像が保存される。
The learning unit 4 includes an image storage unit 41, a feature amount learning unit 42, and a discriminator learning unit 43. The learning unit 4 learns a large number of images of the product to be inspected taken by the imaging unit 2, and determines the calculation content so that the determination unit 5 can correctly determine the quality of the inspection target.
A plurality of learning images used by the learning unit 4 are stored in the image storage unit 41.

特徴量学習部42は、学習用画像に基づいてニューラルネットワークの学習を行い、検査対象の画像の特徴量を出力する学習済みのニューラルネットワークを構築する。また、特徴量学習部42は、学習用画像を学習済みのニューラルネットに入力して、学習用画像の特徴量を出力する。 The feature amount learning unit 42 learns a neural network based on the image for learning, and constructs a trained neural network that outputs the feature amount of the image to be inspected. Further, the feature amount learning unit 42 inputs the learning image into the trained neural network and outputs the feature amount of the learning image.

特徴量学習部42は、検査対象の画像をより少ない情報の特徴量に圧縮するような演算を学習により獲得する。特徴量学習部42は、ニューラルネットワークの学習として自己符号化器に基づいた教師なし学習を行い、前述した畳み込み層による特徴量の学習を実現する。なお、特徴量学習部42の詳細は後述する。 The feature amount learning unit 42 acquires an operation for compressing the image to be inspected into a feature amount of less information by learning. The feature amount learning unit 42 performs unsupervised learning based on a self-encoder as learning of a neural network, and realizes the feature amount learning by the convolution layer described above. The details of the feature amount learning unit 42 will be described later.

識別器学習部43は、特徴量学習部42が出力した学習用画像の特徴量に基づいて、検査対象の良否を判定する識別器を学習により生成する。本実施の形態では、識別器学習部43は教師なし学習を行って識別器を学習する。学習によって生成された識別器は、後述する判定部5の識別部52で用いられる。なお、識別器学習部43および識別器の詳細は後述する。 The discriminator learning unit 43 generates a discriminator for determining the quality of the inspection target based on the feature amount of the learning image output by the feature amount learning unit 42 by learning. In the present embodiment, the discriminator learning unit 43 performs unsupervised learning to learn the discriminator. The discriminator generated by learning is used in the discriminating unit 52 of the determination unit 5 described later. The details of the classifier learning unit 43 and the classifier will be described later.

判定部5は、特徴量算出部51と、識別部52と、出力部53とを備える。判定部5は、画像取得部3から送られた判定用画像に基づいて、検査対象の良否の判定を行う。 The determination unit 5 includes a feature amount calculation unit 51, an identification unit 52, and an output unit 53. The determination unit 5 determines the quality of the inspection target based on the determination image sent from the image acquisition unit 3.

特徴量算出部51は、判定用画像を学習済みのニューラルネットワークに入力し、判定用画像の特徴量を出力する。なお、特徴量算出部51の詳細は後述する。
識別部52は、特徴量算出部51が出力した判定用画像の特徴量を、識別器学習部43によって生成された識別器に入力して、検査対象の良否の判定を行う。なお、識別部52についての詳細は後述する。
The feature amount calculation unit 51 inputs the determination image into the trained neural network and outputs the feature amount of the determination image. The details of the feature amount calculation unit 51 will be described later.
The identification unit 52 inputs the feature amount of the determination image output by the feature amount calculation unit 51 into the discriminator generated by the discriminator learning unit 43, and determines the quality of the inspection target. The details of the identification unit 52 will be described later.

出力部53は、識別部52による判定結果を、例えば、表示画面に表示したり、検査対象の製品の製造装置に送る。出力部53により出力された判定結果は、不良品の選別などに利用される。 The output unit 53 displays the determination result by the identification unit 52 on a display screen or sends the determination result to the manufacturing apparatus of the product to be inspected, for example. The determination result output by the output unit 53 is used for sorting defective products and the like.

[特徴量学習部による自己符号化器を用いた学習]
学習部4に含まれる特徴量学習部42は、検査対象の画像をより少ない情報の特徴量に圧縮するような畳み込みニューラルネット演算を、学習によって獲得することを目的とする。この特徴量は、どのような情報で良いわけではなく、画像検査において検査対象の良否を判定する際に有用な情報でなければならない。
[Learning using a self-encoder by the feature learning unit]
The feature amount learning unit 42 included in the learning unit 4 aims to acquire a convolutional neural network operation such as compressing an image to be inspected into a feature amount of less information by learning. This feature amount is not limited to any information, and must be useful information for determining the quality of the inspection target in the image inspection.

上記のような特徴量学習部42を実現するため、本実施の形態では、図3に示すような畳み込みニューラルネットワークを有する自己符号化器を利用する。そして、特徴量学習部42によって構築された畳み込みニューラルネットワークは、特徴量算出部51で判定用画像の特徴量を算出するために使われる。より詳細には、図3の破線で囲まれた部分に示す特徴量抽出器が構築され、特徴量算出部51において用いられる。 In order to realize the feature amount learning unit 42 as described above, in this embodiment, a self-encoder having a convolutional neural network as shown in FIG. 3 is used. Then, the convolutional neural network constructed by the feature amount learning unit 42 is used by the feature amount calculation unit 51 to calculate the feature amount of the determination image. More specifically, the feature amount extractor shown in the portion surrounded by the broken line in FIG. 3 is constructed and used in the feature amount calculation unit 51.

自己符号化器は、入力画像を、その入力画像の次元数と比べてより少数の次元を持つ潜在変数に変換し、そこから入力画像と同じ大きさの画像に復元する構造を持つ。自己符号化器では、図3に示すようなニューラルネットワークを学習するときに、入力画像と出力画像との差異ができるだけ小さくなるようにする。学習がうまくいき、元の画像に近い画像が出力されるような自己符号化器が生成できたとすると、それは画像が元の画像の次元数より少ない次元数の潜在変数で表現できることを意味する。 The self-encoder has a structure that converts an input image into a latent variable having a smaller number of dimensions than the number of dimensions of the input image, and restores the input image to an image of the same size as the input image. In the self-encoder, when learning a neural network as shown in FIG. 3, the difference between the input image and the output image is made as small as possible. If the learning is successful and a self-encoder that outputs an image close to the original image can be generated, it means that the image can be represented by latent variables with a smaller number of dimensions than the original image.

このような潜在変数は、画像検査において有力な特徴量となりうる。そして、本発明にとって重要なことは、この学習をする際に、検査対象の画像が良品の画像であるか不良品の画像であるかを区別する必要がないということである。これは、自己符号化器は、入力画像と出力画像とができるだけ同じになるように学習するからであり、画像が良品であるか不良品であるかを学習しているわけではないからである。このことが、本発明の利点である、検査対象の不良品が無い場合や、少ない場合でも、検査対象の画像の特徴量を自動で学習することにつながっている。 Such latent variables can be a powerful feature in imaging tests. What is important for the present invention is that it is not necessary to distinguish whether the image to be inspected is a good image or a defective image when performing this learning. This is because the self-encoder learns so that the input image and the output image are as identical as possible, and does not learn whether the image is good or bad. .. This leads to the advantage of the present invention, that is, even if there are no defective products to be inspected or even if there are few defective products, the feature amount of the image to be inspected is automatically learned.

また、図4に示すように、自己符号化器に敵対的生成ネットワークの仕組みを追加することもできる。敵対的生成ネットワークは、生成器(以下、「Generator」という。)と呼ばれる画像を生成するニューラルネットワークと、識別器(以下、「Discriminator」という。)と呼ばれる、画像が実画像であるか、Generatorが生成した画像であるかを判別するニューラルネットワークとを有する。 Also, as shown in FIG. 4, it is possible to add a mechanism of a hostile generation network to the self-encoder. The hostile generation network is a neural network that generates an image called a generator (hereinafter referred to as "Generator") and a discriminator (hereinafter referred to as "Discriminator") in which the image is a real image or a Generator. Has a neural network that determines whether the image is generated by.

図4では、Generatorとして、図3に示す畳み込みニューラルネットワークを有する自己符号化器を用いている。図4に示すように、Discriminatorは、実画像かどうかの判別をできるだけ間違えないようにしようと学習する。一方、GeneratorはDiscriminatorが実画像と誤判別するように学習する。この2つのニューラルネットワークを敵対的に競わせることで学習がうまく進み、Generatorが生成する画像の精度が上がれば、Generatorのうち特徴量抽出器となっている部分も優秀な特徴量抽出器になることが期待される。 In FIG. 4, a self-encoder having a convolutional neural network shown in FIG. 3 is used as a Generator. As shown in FIG. 4, the Discriminator learns to make as little mistake as possible whether it is a real image or not. On the other hand, the Generator learns that the Discriminator misidentifies the image as a real image. If learning progresses well by competing these two neural networks hostilely and the accuracy of the image generated by the Generator is improved, the part of the Generator that is the feature extractor will also be an excellent feature extractor. It is expected.

また、変分自己符号化器も同様な仕組みを持った技術であり、同様な形で利用できる。なお、敵対的生成ネットワークも、変分自己符号化器も、学習に用いるデータにおいて良品と不良品とを区別する必要はない。 The variational self-encoder is also a technique having a similar mechanism and can be used in the same form. Neither the hostile generation network nor the variational self-encoder needs to distinguish between good and bad products in the data used for learning.

[識別器学習部による学習と識別器の生成]
検査対象の不良品画像が無く、良品画像だけが十分な数確保できている場合、教師なし学習と呼ばれる手法により識別器を生成することができる。例えば、良品画像における特徴量の分布を、混合正規分布モデルで推定した上で統計的検定を用いれば、その分布から外れたものを不良品の画像とする識別器を生成できる。
[Learning by the discriminator learning department and generation of the discriminator]
When there is no defective image to be inspected and only a sufficient number of good images can be secured, a discriminator can be generated by a method called unsupervised learning. For example, if the distribution of the feature amount in the good product image is estimated by the mixed normal distribution model and then the statistical test is used, it is possible to generate a discriminator in which the image deviating from the distribution is regarded as the defective product image.

また、部分空間法を用いることでも、良品の画像における特徴量の分布を学習し、その分布から外れたものを不良品とする識別器を生成できる。また、1クラスSVM(One-Class SVM)のように、全ての良品の画像から十分遠い位置に疑似的な不良品のデータを生成して、識別器を生成する手段もある。 Further, by using the subspace method, it is possible to learn the distribution of the feature amount in the image of a good product and generate a discriminator in which the product deviating from the distribution is regarded as a defective product. Further, there is also a means for generating a classifier by generating pseudo defective product data at a position sufficiently far from all non-defective product images, such as 1-class SVM (One-Class SVM).

一方、検査対象の不良品画像が確保できても、学習用の画像に良否を示すラベルが付与されていない場合についても、教師なし学習により識別器を生成する手段がある。例えば、アイソレーションフォレストのように、学習用の画像を多数のグループに分類し、少数の画像で構成されるグループに属するものを不良品とする識別器がある。また、LOFのように、学習用の画像間の距離を評価し、他の学習用の画像との距離が大きいものを不良品とするような識別器がある。 On the other hand, even if a defective image to be inspected can be secured but a label indicating good or bad is not attached to the image for learning, there is a means for generating a classifier by unsupervised learning. For example, there is a classifier such as an isolation forest that classifies images for learning into a large number of groups and treats those belonging to a group composed of a small number of images as defective products. Further, there is a classifier such as a LOF that evaluates the distance between images for learning and regards an image having a large distance from other images for learning as a defective product.

[特徴量学習部および特徴量算出部の機能ブロック]
図5は、特徴量学習部42および特徴量算出部51の機能ブロック図である。前述したように、特徴量学習部42は、検査対象の画像をより少ない情報の特徴量に圧縮するような畳み込みニューラルネットワークを有する自己符号化器を、学習によって構築する。特徴量算出部51は、特徴量学習部42によって構築された学習済みの畳み込みニューラルネットワークを用いて、判定用画像の特徴量を算出する。
[Functional block of feature amount learning unit and feature amount calculation unit]
FIG. 5 is a functional block diagram of the feature amount learning unit 42 and the feature amount calculation unit 51. As described above, the feature amount learning unit 42 constructs a self-encoder having a convolutional neural network that compresses the image to be inspected into the feature amount of less information by learning. The feature amount calculation unit 51 calculates the feature amount of the determination image by using the trained convolutional neural network constructed by the feature amount learning unit 42.

図5に示すように、特徴量学習部42は、入力画像記憶部421、前処理部422、畳み込みニューラルネット演算部(以下、「畳み込みNN演算部」という。)423、特徴量記憶部424、逆畳み込みニューラルネット演算部(以下、「逆畳み込みNN演算部」という。)425、出力画像記憶部426、特徴量算出設定記憶部427、画像差異算出部428、特徴量算出設定更新部429、および特徴量出力部430を備える。 As shown in FIG. 5, the feature amount learning unit 42 includes an input image storage unit 421, a preprocessing unit 422, a convolutional neural network calculation unit (hereinafter referred to as “convolutional NN calculation unit”) 423, and a feature amount storage unit 424. Reverse convolutional neural network calculation unit (hereinafter referred to as "reverse convolutional NN calculation unit") 425, output image storage unit 426, feature amount calculation setting storage unit 427, image difference calculation unit 428, feature amount calculation setting update unit 429, and A feature amount output unit 430 is provided.

特徴量算出部51は、入力画像記憶部511、前処理部512、畳み込みNN演算部513、特徴量算出設定記憶部514、および特徴量出力部515を備える。 The feature amount calculation unit 51 includes an input image storage unit 511, a preprocessing unit 512, a convolutional NN calculation unit 513, a feature amount calculation setting storage unit 514, and a feature amount output unit 515.

まず、特徴量学習部42が備える各機能ブロックについて説明する。
入力画像記憶部421には、特徴量学習部42が実行する学習において必要となる多数の学習用画像が入力画像として記憶される。
First, each functional block included in the feature amount learning unit 42 will be described.
The input image storage unit 421 stores a large number of learning images required for learning executed by the feature amount learning unit 42 as input images.

前処理部422は、入力画像記憶部421に記憶されている学習用画像を調整する。前処理部422は省略することも可能であるが、実際には、前処理部422を設けて、画像の輝度の正規化など、画像の前処理を行うことが好ましい。なお、前処理部422による画像の前処理については、一般に知られている公知の技術を用いればよい。 The preprocessing unit 422 adjusts the learning image stored in the input image storage unit 421. Although the pre-processing unit 422 can be omitted, it is actually preferable to provide the pre-processing unit 422 to perform pre-processing of the image such as normalization of the brightness of the image. For the image preprocessing by the preprocessing unit 422, a generally known and known technique may be used.

畳み込みNN演算部423は、図3および図4で示した特徴量抽出器に対応する。畳み込みNN演算部423は、学習用画像(入力画像)を入力として、学習用画像(入力画像)の特徴量を出力する。より詳細には、畳み込みNN演算部423は、入力画像に対し、後述する特徴量算出設定記憶部427に記憶されているパラメータの値を用いて、畳み込み演算を中心とした演算を行い、入力画像の特徴量を出力する。この演算は通常、複数段で構成される。一段分(一回)の演算を行うと、入力された画像やデータのピクセル数よりも少ないデータが出力される。 The convolutional NN calculation unit 423 corresponds to the feature amount extractor shown in FIGS. 3 and 4. The convolutional NN calculation unit 423 takes a learning image (input image) as an input and outputs a feature amount of the learning image (input image). More specifically, the convolutional NN calculation unit 423 performs an operation centered on the convolutional operation on the input image using the value of the parameter stored in the feature amount calculation setting storage unit 427 described later, and inputs the input image. Outputs the feature amount of. This operation usually consists of multiple stages. When one step (one time) of calculation is performed, data that is smaller than the number of pixels of the input image or data is output.

畳み込みNN演算部423は、このような畳み込み演算を複数回繰り返すことで、元の入力画像を、そのピクセル数よりも少ないピクセル数を示す潜在変数に変換する。この潜在変数が、検査対象の画像の特徴を定量化した特徴量として求められる。 The convolutional NN calculation unit 423 converts the original input image into a latent variable indicating the number of pixels smaller than the number of pixels by repeating such a convolutional calculation a plurality of times. This latent variable is obtained as a feature quantity that quantifies the features of the image to be inspected.

また、畳み込みNN演算部423は、後述する特徴量算出設定更新部429により更新されたパラメータの値を用いて、画像保存部41に保存されている全ての学習用画像の特徴量を算出する。 Further, the convolutional NN calculation unit 423 calculates the feature amount of all the learning images stored in the image storage unit 41 by using the value of the parameter updated by the feature amount calculation setting update unit 429 described later.

なお、畳み込みNN演算部423による畳み込みニューラルネットワークの演算と設計においては、特許文献2、3などに記載されている公知の技術を用いればよい。また、公知の畳み込みニューラルネットワークの演算と設計に利用されるソフトウェアフレームワークについても複数知られており、それらを用いればよい。 In the calculation and design of the convolutional neural network by the convolutional NN calculation unit 423, known techniques described in Patent Documents 2, 3 and the like may be used. In addition, a plurality of known software frameworks used for the calculation and design of convolutional neural networks are also known, and they may be used.

なお、一般的な畳み込みニューラルネットワークで用いられるプーリング(間引き)は、ストライド付きの畳み込みに置き換えることで性能が向上することが非特許文献4に記載されている。そのため、畳み込みNN演算部423においても、ストライド付きの畳み込みを行うことが好ましい。畳み込みNN演算部423により算出された入力画像の特徴量は、後述する特徴量記憶部424に一時的に記憶される。 It is described in Non-Patent Document 4 that the performance of pooling (thinning out) used in a general convolutional neural network is improved by replacing it with a convolution with a stride. Therefore, it is preferable that the convolution NN calculation unit 423 also performs convolution with a stride. The feature amount of the input image calculated by the convolutional NN calculation unit 423 is temporarily stored in the feature amount storage unit 424 described later.

特徴量記憶部424は、畳み込みNN演算部423から出力された入力画像の特徴量を一時的に記憶する。また、特徴量記憶部424に記憶された入力画像の特徴量は、後述する逆畳み込みNN演算部425によって利用される。 The feature amount storage unit 424 temporarily stores the feature amount of the input image output from the convolutional NN calculation unit 423. Further, the feature amount of the input image stored in the feature amount storage unit 424 is used by the deconvolutional NN calculation unit 425, which will be described later.

逆畳み込みNN演算部425は、畳み込みNN演算部423が出力した入力画像の特徴量を入力として、入力画像と同一の大きさの画像を出力する。より詳細には、逆畳み込みNN演算部425は、特徴量算出設定記憶部427に記憶されているニューラルネットワークのパラメータの値を用いて、畳み込みNN演算部423による畳み込みニューラルネットワーク演算と逆の演算を行う。逆畳み込みNN演算部425は、逆畳み込みニューラルネットワーク演算を複数回行い、画像の特徴量が入力画像記憶部421に記憶されていた画像と同じサイズの画像になるまで演算を行う。 The deconvolutional NN calculation unit 425 receives the feature amount of the input image output by the convolutional NN calculation unit 423 as an input, and outputs an image having the same size as the input image. More specifically, the deconvolutional NN calculation unit 425 uses the values of the neural network parameters stored in the feature amount calculation setting storage unit 427 to perform the reverse operation of the convolutional neural network calculation by the convolutional NN calculation unit 423. conduct. The deconvolution NN calculation unit 425 performs the deconvolutional neural network calculation a plurality of times until the feature amount of the image becomes an image of the same size as the image stored in the input image storage unit 421.

なお、逆畳み込みNN演算部425を構成する逆畳み込みニューラルネットワークには、畳み込みNN演算部423を構成する畳み込みニューラルネットワークを転置したネットワーク構造を用いればよい。また、逆畳み込みNN演算部423による逆畳み込みニューラルネットワーク演算については、例えば、非特許文献2に記載されている公知の演算手法や、前述した公知のソフトウェアフレームワークを用いればよい。逆畳み込みNN演算部423による逆畳み込みニューラルネットワークの最後の段の演算結果は、後述する出力画像記憶部246に記憶される。 As the deconvolutional neural network constituting the deconvolutional NN calculation unit 425, a network structure obtained by transposing the convolutional neural network constituting the convolutional NN calculation unit 423 may be used. Further, for the deconvolutional neural network calculation by the deconvolutional NN calculation unit 423, for example, a known calculation method described in Non-Patent Document 2 or the above-mentioned known software framework may be used. The calculation result of the last stage of the deconvolutional neural network by the deconvolution NN calculation unit 423 is stored in the output image storage unit 246 described later.

出力画像記憶部426は、逆畳み込みNN演算部425から出力される演算結果を出力画像として記憶する。 The output image storage unit 426 stores the calculation result output from the deconvolution NN calculation unit 425 as an output image.

特徴量算出設定記憶部427は、畳み込みNN演算部423および逆畳み込みNN演算部425によって用いられる畳み込みニューラルネットワークおよび逆畳み込みニューラルネットワークのパラメータの値を記憶する。より詳細には、特徴量算出設定記憶部427は、初期設定されたパラメータの値や、後述する特徴量算出設定更新部429によって更新されたパラメータの値を記憶する。 The feature amount calculation setting storage unit 427 stores the parameter values of the convolutional neural network and the deconvolutional neural network used by the convolutional NN calculation unit 423 and the deconvolutional NN calculation unit 425. More specifically, the feature amount calculation setting storage unit 427 stores the initially set parameter values and the parameter values updated by the feature amount calculation setting update unit 429 described later.

画像差異算出部428は、入力画像記憶部421に記憶されている入力画像(学習用画像)と、その入力画像に対応する、出力画像記憶部426に記憶されている出力画像との差異を算出する。 The image difference calculation unit 428 calculates the difference between the input image (learning image) stored in the input image storage unit 421 and the output image stored in the output image storage unit 426 corresponding to the input image. do.

特徴量算出設定更新部429は、特徴量算出設定記憶部427が記憶している、畳み込みNN演算部423によって用いられる畳み込みニューラルネットワークおよび逆畳み込みNN演算部425によって用いられる逆畳み込みニューラルネットワークのパラメータの値を更新する。なお、ネットワークとして敵対的生成ネットワークを用いる場合には、Discriminatorの判別結果をもとに、ニューラルネットワークのパラメータの値を更新する。 The feature amount calculation setting update unit 429 is a parameter of the convolutional neural network used by the convolutional NN calculation unit 423 and the reverse convolutional neural network used by the reverse convolutional NN calculation unit 425 stored in the feature amount calculation setting storage unit 427. Update the value. When a hostile generation network is used as the network, the parameter values of the neural network are updated based on the discrimination result of the Discriminator.

なお、ニューラルネットワークにおけるパラメータの値の更新方法については、逆誤差伝搬法(バックプロパゲーション)など公知の方法を用いればよい。また、特徴量算出設定更新部429によるニューラルネットワークのパラメータの更新は、学習対象となる入力画像が1枚入力される度に行ってもよく、ある程度まとまった枚数が蓄積されてから行ってもよい。 As a method for updating the parameter value in the neural network, a known method such as a reverse error propagation method (backpropagation) may be used. Further, the parameter of the neural network may be updated by the feature amount calculation setting update unit 429 every time one input image to be learned is input, or may be performed after a certain number of input images are accumulated. ..

特徴量出力部430は、畳み込みNN演算部423から出力される畳み込みニューラルネットワーク演算による演算結果を出力する。より詳細には、特徴量出力部430は、畳み込みNN演算部423が後述する更新されたパラメータの値を用いて演算した、すべての学習用画像に対応する特徴量を出力する。 The feature amount output unit 430 outputs the calculation result by the convolutional neural network calculation output from the convolutional NN calculation unit 423. More specifically, the feature amount output unit 430 outputs the feature amount corresponding to all the learning images calculated by the convolutional NN calculation unit 423 using the updated parameter values described later.

次に、特徴量算出部51が備える各機能ブロックを説明する。特徴量算出部51は、画像取得部3によって取得された、判定用画像の特徴量を算出する。 Next, each functional block included in the feature amount calculation unit 51 will be described. The feature amount calculation unit 51 calculates the feature amount of the determination image acquired by the image acquisition unit 3.

入力画像記憶部511は、撮像部2によって撮影され、画像取得部3によって取得された判定用画像を記憶する。 The input image storage unit 511 stores a determination image taken by the image pickup unit 2 and acquired by the image acquisition unit 3.

前処理部512は、特徴量学習部42が有する前処理部422と同様の機能を有し、入力画像記憶部511に記憶されている判定用画像の前処理を必要に応じて行う。前処理部512は、判定用画像を前処理し、良否判定がしやすいように加工する。なお、特徴量学習部42が有する前処理部422と同様に、前処理部512は省略してもよいが、前処理部512を設けることで特徴量算出部51における判定精度の向上を図ることができる場合がある。 The pre-processing unit 512 has the same function as the pre-processing unit 422 of the feature amount learning unit 42, and performs pre-processing of the determination image stored in the input image storage unit 511 as necessary. The preprocessing unit 512 preprocesses the determination image and processes it so that the quality determination can be easily performed. Although the preprocessing unit 512 may be omitted as in the preprocessing unit 422 of the feature amount learning unit 42, the preprocessing unit 512 is provided to improve the determination accuracy in the feature amount calculation unit 51. May be possible.

畳み込みNN演算部513は、特徴量学習部42が有する畳み込みNN演算部423と同じ構成を有する。また、畳み込みNN演算部513は、特徴量算出設定記憶部514に保存されている畳み込みニューラルネットワークのパラメータの更新値に従って、判定用画像を入力として、判定用画像の特徴量を出力する。なお、畳み込みNN演算部513は、特徴量学習部42の学習処理が完了したときの畳み込みNN演算部423と同じ演算を行う。 The convolutional NN calculation unit 513 has the same configuration as the convolutional NN calculation unit 423 of the feature amount learning unit 42. Further, the convolutional NN calculation unit 513 outputs the feature amount of the determination image by inputting the determination image according to the updated value of the parameter of the convolutional neural network stored in the feature amount calculation setting storage unit 514. The convolutional NN calculation unit 513 performs the same calculation as the convolutional NN calculation unit 423 when the learning process of the feature amount learning unit 42 is completed.

特徴量算出設定記憶部514には、特徴量学習部42で値が更新された畳み込みNN演算部423における畳み込みニューラルネットワークのパラメータの値が記憶されている。より詳細には、特徴量算出設定記憶部427から、畳み込みニューラルネットワークのパラメータの更新値が転送される。 The feature amount calculation setting storage unit 514 stores the values of the parameters of the convolutional neural network in the convolutional NN calculation unit 423 whose values have been updated by the feature amount learning unit 42. More specifically, the updated value of the parameter of the convolutional neural network is transferred from the feature amount calculation setting storage unit 427.

特徴量出力部515は、畳み込みNN演算部513による畳み込みニューラルネット演算の結果として判定用画像の特徴量を出力する。なお、特徴量出力部515から出力される判定用画像の特徴量は、識別部52に入力される。 The feature amount output unit 515 outputs the feature amount of the determination image as a result of the convolutional neural network calculation by the convolutional NN calculation unit 513. The feature amount of the determination image output from the feature amount output unit 515 is input to the identification unit 52.

[識別器学習部および識別部の機能ブロック]
図6は、識別器学習部43および識別部52の機能ブロック図である。識別器学習部43は、特徴量入力部431、次元低減部432、および識別演算教師なし学習部433を備える。また、識別部52は、特徴量入力部521、次元低減部522、および識別演算部523を備える。前述したように、識別器学習部43によって生成される識別器は、識別部52で用いられ、検査対象の良否を判定する。
[Functional block of discriminator learning unit and discriminator unit]
FIG. 6 is a functional block diagram of the discriminator learning unit 43 and the discriminating unit 52. The discriminator learning unit 43 includes a feature amount input unit 431, a dimension reduction unit 432, and a discriminating calculation unsupervised learning unit 433. Further, the identification unit 52 includes a feature amount input unit 521, a dimension reduction unit 522, and an identification calculation unit 523. As described above, the discriminator generated by the discriminator learning unit 43 is used in the discriminator unit 52 to determine the quality of the inspection target.

まず、識別器学習部43が備える各機能ブロックを説明する。
特徴量入力部431には、特徴量学習部42の特徴量出力部430から出力される学習用画像の特徴量が入力される。より詳細には、特徴量入力部431は、特徴量学習部42の学習処理が完了した後に、画像保存部41に保存されている学習用画像について算出された特徴量を一括して受信する。
First, each functional block included in the classifier learning unit 43 will be described.
The feature amount of the learning image output from the feature amount output unit 430 of the feature amount learning unit 42 is input to the feature amount input unit 431. More specifically, the feature amount input unit 431 collectively receives the feature amount calculated for the learning image stored in the image storage unit 41 after the learning process of the feature amount learning unit 42 is completed.

次元低減部432は、特徴量入力部431に入力される、学習用画像における特徴量の情報量をできるだけ落とさないようにしつつ、画像の特徴量の次元を減らす演算を行う。次元低減部432は、例えば、主成分分析など公知の手法を用いて、画像の特徴量の次元を、より少ない次元に圧縮する。 The dimension reduction unit 432 performs an operation to reduce the dimension of the feature amount of the image while keeping the information amount of the feature amount in the learning image input to the feature amount input unit 431 as small as possible. The dimension reduction unit 432 compresses the dimension of the feature amount of the image to a smaller dimension by using a known method such as principal component analysis.

次元低減部432を設ける理由としては、以下の理由が挙げられる。通常、特徴量入力部431に入力される、学習用画像の特徴量は、1つの画像につき複数存在する。そのため、入力される画像の特徴量の数が多い場合、そのままでは識別部52で識別器を生成できない場合や、生成に必要な計算量が非常に多くなる場合がある。 The reasons for providing the dimension reduction unit 432 include the following reasons. Normally, there are a plurality of feature quantities of the learning image input to the feature quantity input unit 431 for each image. Therefore, when the number of features of the input image is large, the discriminator 52 may not be able to generate the classifier as it is, or the calculation amount required for the generation may be very large.

そこで、次元低減部432を設けることにより、数学的な空間の次元の増加にしたがい計算コストが指数関数的に増加する、いわゆる「次元の呪い」と呼ばれる問題を回避することができる。なお、特徴量学習部42の畳み込みNN演算部423が出力する画像の特徴量の次元が十分低い場合には、次元低減部432を省略してもよい。 Therefore, by providing the dimension reduction unit 432, it is possible to avoid the so-called "curse of dimensionality", in which the calculation cost increases exponentially as the dimension of the mathematical space increases. If the dimension of the feature amount of the image output by the convolutional NN calculation unit 423 of the feature amount learning unit 42 is sufficiently low, the dimension reduction unit 432 may be omitted.

識別演算教師なし学習部433は、特徴量入力部431および次元低減部432を介して入力される学習用画像の特徴量を入力として、公知の教師なし学習手法により検査対象の良否の判定を行う識別器を生成する。識別演算教師なし学習部433により生成された識別器は、判定部5の識別部52に含まれる、後述する識別演算部523で用いられる。 The discriminating calculation unsupervised learning unit 433 determines the quality of the inspection target by a known unsupervised learning method using the feature amount of the learning image input via the feature amount input unit 431 and the dimension reduction unit 432 as input. Generate a classifier. The discriminator generated by the discriminant unsupervised learning unit 433 is used in the discriminating calculation unit 523, which will be described later, included in the discriminating unit 52 of the determination unit 5.

識別演算教師なし学習部433は、公知の教師なし学習手法として、例えば、アイソレーションフォレスト、One-Class SVM、部分空間法、LOFなどの手法を用いればよい。なお、アイソレーションフォレストの例としては、非特許文献5に記載されている手法を用いればよい。部分空間法の例としては、非特許文献6に記載されている手法を用いればよい。LOFの例としては、非特許文献7に記載されている手法を用いればよい。 The discriminant operation unsupervised learning unit 433 may use, for example, a method such as an isolation forest, a One-Class SVM, a subspace method, or a LOF as a known unsupervised learning method. As an example of the isolation forest, the method described in Non-Patent Document 5 may be used. As an example of the subspace method, the method described in Non-Patent Document 6 may be used. As an example of LOF, the method described in Non-Patent Document 7 may be used.

次に、識別部52が有する各機能ブロックについて説明する。
特徴量入力部521は、識別器学習部43が有する特徴量入力部431と同様の機能および構成を有する。すなわち、特徴量入力部521には、特徴量算出部51の特徴量出力部515から出力される、判定用画像の特徴量が入力される。
Next, each functional block included in the identification unit 52 will be described.
The feature amount input unit 521 has the same function and configuration as the feature amount input unit 431 of the discriminator learning unit 43. That is, the feature amount of the determination image output from the feature amount output unit 515 of the feature amount calculation unit 51 is input to the feature amount input unit 521.

次元低減部522は、識別器学習部43が有する次元低減部432と同様の機能および構成を有する。なお、識別器学習部43の次元低減部432と、識別部52の次元低減部522とで、完全に同一の計算方法を用いる必要がある。 The dimension reduction unit 522 has the same function and configuration as the dimension reduction unit 432 of the classifier learning unit 43. It is necessary to use completely the same calculation method for the dimension reduction unit 432 of the discriminator learning unit 43 and the dimension reduction unit 522 of the discriminator unit 52.

識別演算部523は、特徴量入力部521および次元低減部522を介して入力される判定用画像の特徴量を入力として、識別器学習部43の識別演算教師なし学習部433によって生成された識別器を用いて、検査対象の良否の判定を行う。識別演算部523による判定結果は、出力部53から出力される。 The identification calculation unit 523 uses the feature amount of the determination image input via the feature amount input unit 521 and the dimension reduction unit 522 as input, and the identification is generated by the identification calculation unsupervised learning unit 433 of the classifier learning unit 43. The quality of the inspection target is judged using a device. The determination result by the identification calculation unit 523 is output from the output unit 53.

[画像検査装置のハードウェア構成]
図7は、本実施の形態に係る画像検査装置1のハードウェア構成を示すブロック図である。画像検査装置100は、バス101を介して接続される制御部102、通信制御装置105、撮像装置106、記憶装置107、および表示装置108を備えるコンピュータと、これらのハードウェア資源を制御するプログラムによって実現することができる。
[Hardware configuration of image inspection equipment]
FIG. 7 is a block diagram showing a hardware configuration of the image inspection device 1 according to the present embodiment. The image inspection device 100 includes a computer including a control unit 102, a communication control device 105, an image pickup device 106, a storage device 107, and a display device 108 connected via a bus 101, and a program for controlling these hardware resources. It can be realized.

制御部102は、CPU103と主記憶部104とを備えている。主記憶部104には、CPU103が各種制御や演算を行うためのプログラムが予め格納されている。制御部102によって、図2で示した学習部4、および判定部5などの画像検査装置1の機能が実現される。 The control unit 102 includes a CPU 103 and a main storage unit 104. The main storage unit 104 stores in advance a program for the CPU 103 to perform various controls and operations. The control unit 102 realizes the functions of the image inspection device 1 such as the learning unit 4 and the determination unit 5 shown in FIG.

通信制御装置105は、画像検査装置100と各種外部電子機器との間をネットワーク接続するための制御装置である。
撮像装置106は、光信号を画像信号に変換して、静止画像を生成することができる。より詳細には、撮像装置106は、CCD(電荷結合素子:Charge-Coupled Device)イメージセンサや、CMOSイメージセンサなどの撮像素子を有し、撮像領域から入射する光を受光面に結像して、電気信号に変換する。
The communication control device 105 is a control device for connecting a network between the image inspection device 100 and various external electronic devices.
The image pickup apparatus 106 can convert an optical signal into an image signal to generate a still image. More specifically, the image pickup device 106 has an image pickup device such as a CCD (charge-coupled device) image sensor or a CMOS image sensor, and forms an image of light incident from the image pickup region on the light receiving surface. , Convert to an electrical signal.

記憶装置107は、読み書き可能な記憶媒体と、その記憶媒体に対してプログラムやデータなどの各種情報を読み書きするための駆動装置とで構成されている。記憶装置107には、記憶媒体としてフラッシュメモリなどの半導体メモリやハードディスクを使用することができる。記憶装置107は、画像保存部107a、入力画像記憶部107b、特徴量算出設定記憶部107c、特徴量記憶部107d、出力画像記憶部107e、プログラム格納部107f、図示しないその他の格納装置で、例えば、この記憶装置107内に格納されているプログラムやデータなどをバックアップするための格納装置などを有することができる。 The storage device 107 includes a readable / writable storage medium and a drive device for reading / writing various information such as programs and data to the storage medium. A semiconductor memory such as a flash memory or a hard disk can be used as the storage medium in the storage device 107. The storage device 107 is an image storage unit 107a, an input image storage unit 107b, a feature amount calculation setting storage unit 107c, a feature amount storage unit 107d, an output image storage unit 107e, a program storage unit 107f, and other storage devices (not shown), for example. , A storage device for backing up programs, data, etc. stored in the storage device 107 can be provided.

画像保存部107aは、学習部4が有する画像保存部41として機能し、学習用画像を保存する。
入力画像記憶部107bは、特徴量学習部42の入力画像記憶部421、および特徴量算出部51の入力画像記憶部511として機能する。
The image storage unit 107a functions as the image storage unit 41 of the learning unit 4 and stores the learning image.
The input image storage unit 107b functions as an input image storage unit 421 of the feature amount learning unit 42 and an input image storage unit 511 of the feature amount calculation unit 51.

特徴量算出設定記憶部107cは、特徴量学習部42の特徴量算出設定記憶部427として機能し、ニューラルネットワークのパラメータの値を記憶する。
特徴量記憶部107dは、特徴量学習部42の特徴量記憶部424として機能し、特徴量学習部42において算出された学習用画像(入力画像)の特徴量を記憶する。
The feature amount calculation setting storage unit 107c functions as the feature amount calculation setting storage unit 427 of the feature amount learning unit 42, and stores the parameter values of the neural network.
The feature amount storage unit 107d functions as the feature amount storage unit 424 of the feature amount learning unit 42, and stores the feature amount of the learning image (input image) calculated by the feature amount learning unit 42.

出力画像記憶部107eは、特徴量学習部42の出力画像記憶部426として機能し、逆畳み込みNN演算部425の演算結果の出力画像を記憶する。
プログラム格納部107fには、本実施の形態における学習部4による学習処理や、判定部5による判定処理などの画像検査に必要な処理を実行するための各種プログラムが格納されている。
The output image storage unit 107e functions as the output image storage unit 426 of the feature amount learning unit 42, and stores the output image of the calculation result of the deconvolution NN calculation unit 425.
The program storage unit 107f stores various programs for executing processing necessary for image inspection, such as learning processing by the learning unit 4 and determination processing by the determination unit 5 in the present embodiment.

表示装置108は、画像検査装置1の出力部53として機能する。表示装置108は、液晶ディスプレイなどにより実現される。 The display device 108 functions as an output unit 53 of the image inspection device 1. The display device 108 is realized by a liquid crystal display or the like.

[画像処理装置の動作]
次に、本実施の形態に係る画像検査装置1の動作を説明する。なお、以下において、学習部4による学習処理と、判定部5による判定処理とに分けて説明する。また、学習処理においては、特徴量学習部42による特徴量学習処理と、識別器学習部43による識別器教師なし学習処理とに分けて説明する。判定処理においては、特徴量算出部51による特徴量算出処理と、識別部52による判定出力処理とに分けて説明する。
[Operation of image processing device]
Next, the operation of the image inspection device 1 according to the present embodiment will be described. In the following, the learning process by the learning unit 4 and the determination process by the determination unit 5 will be described separately. Further, the learning process will be described separately as a feature amount learning process by the feature amount learning unit 42 and a discriminator unsupervised learning process by the discriminator learning unit 43. The determination process will be described separately as a feature amount calculation process by the feature amount calculation unit 51 and a determination output process by the identification unit 52.

[特徴量学習処理]
まず、特徴量学習部42による特徴量学習処理について、図8のフローチャートを参照して説明する。まず、撮像部2によって、検査対象が含まれている学習用画像が撮影される(ステップS100)。画像取得部3は、撮影された画像を取得する。取得された学習用画像は、画像保存部41に保存される。入力画像記憶部421は、画像取得部3によって取得された学習用画像を画像保存部41から読み出して記憶する(ステップS101)。
[Feature amount learning process]
First, the feature amount learning process by the feature amount learning unit 42 will be described with reference to the flowchart of FIG. First, the image pickup unit 2 captures a learning image including the inspection target (step S100). The image acquisition unit 3 acquires the captured image. The acquired learning image is stored in the image storage unit 41. The input image storage unit 421 reads the learning image acquired by the image acquisition unit 3 from the image storage unit 41 and stores it (step S101).

次に、畳み込みNN演算部423は、入力画像記憶部421に記憶されている学習用画像を入力画像として、畳み込みニューラルネットワーク演算を複数回行い、入力画像の特徴量を出力する(ステップS102)。より詳細には、畳み込みNN演算部423は、特徴量算出設定記憶部427に記憶されているパラメータの値を用いて演算を行う。なお、畳み込みNN演算部423に入力される入力画像(学習用画像)については、予め前処理部422において輝度の正規化などの前処理を行ってもよい。 Next, the convolutional NN calculation unit 423 performs the convolutional neural network calculation a plurality of times using the learning image stored in the input image storage unit 421 as the input image, and outputs the feature amount of the input image (step S102). More specifically, the convolutional NN calculation unit 423 performs a calculation using the value of the parameter stored in the feature amount calculation setting storage unit 427. The input image (learning image) input to the convolutional NN calculation unit 423 may be preprocessed in advance by the preprocessing unit 422, such as normalizing the luminance.

畳み込みNN演算部423から出力された入力画像の特徴量は、特徴量記憶部424に記憶される(ステップS103)。次に、逆畳み込みNN演算部425は、特徴量記憶部424に記憶されている入力画像の特徴量を入力として、逆畳み込みニューラルネットワーク演算を実行する(ステップS104)。 The feature amount of the input image output from the convolutional NN calculation unit 423 is stored in the feature amount storage unit 424 (step S103). Next, the deconvolution NN calculation unit 425 executes the deconvolutional neural network calculation by using the feature amount of the input image stored in the feature amount storage unit 424 as an input (step S104).

より詳細には、逆畳み込みNN演算部425は、特徴量算出設定記憶部427に記憶されているパラメータの値を用いて、畳み込みNN演算部423による畳み込みニューラルネットワーク演算と逆の演算を複数回行う。 More specifically, the deconvolutional NN calculation unit 425 performs a plurality of operations opposite to the convolutional neural network calculation by the convolutional NN calculation unit 423 using the value of the parameter stored in the feature amount calculation setting storage unit 427. ..

また、逆畳み込みNN演算部425は、算出される特徴量が、入力画像記憶部421に記憶されていた入力画像と同じサイズの画像になるまで演算を行う。逆畳み込みNN演算部425により復元された画像は出力画像として出力画像記憶部426に記憶される。 Further, the deconvolution NN calculation unit 425 performs the calculation until the calculated feature amount becomes an image of the same size as the input image stored in the input image storage unit 421. The image restored by the deconvolution NN calculation unit 425 is stored in the output image storage unit 426 as an output image.

次に、画像差異算出部428は、入力画像記憶部421に保存されていた入力画像と、この入力画像に対応する出力画像記憶部426に記憶されている出力画像との差異を算出する(ステップS105)。 Next, the image difference calculation unit 428 calculates the difference between the input image stored in the input image storage unit 421 and the output image stored in the output image storage unit 426 corresponding to the input image (step). S105).

次に、画像差異算出部428により算出された入力画像と出力画像との差異が十分小さくなっていない場合には(ステップS106:NO)、特徴量算出設定更新部429は、特徴量算出設定記憶部427に記憶されている畳み込みニューラルネットワークのパラメータの値を更新する(ステップS107)。特徴量算出設定更新部429は、例えば、バックプロパゲーションなど公知の手法を用いて畳み込みニューラルネットワークのパラメータの値を更新すればよい。 Next, if the difference between the input image and the output image calculated by the image difference calculation unit 428 is not sufficiently small (step S106: NO), the feature amount calculation setting update unit 429 stores the feature amount calculation setting. The value of the parameter of the convolutional neural network stored in the part 427 is updated (step S107). The feature amount calculation setting update unit 429 may update the parameter values of the convolutional neural network by using a known method such as backpropagation.

更新された畳み込みニューラルネットワークのパラメータの値は、特徴量算出設定記憶部427に上書きして記憶される。その後、畳み込みNN演算部423は、更新されたパラメータの値を用いて再び畳み込みニューラルネットワーク演算を行う(ステップS102)。その後、演算結果を入力画像(学習用画像)の特徴量として記憶する(ステップS103)。そして、逆畳み込みNN演算部425は逆畳み込みニューラルネット演算を行い、画像を復元して出力画像を求め、出力画像記憶部426に記憶する(ステップS104)。 The updated parameter values of the convolutional neural network are overwritten and stored in the feature amount calculation setting storage unit 427. After that, the convolutional NN calculation unit 423 performs the convolutional neural network calculation again using the updated parameter values (step S102). After that, the calculation result is stored as a feature amount of the input image (learning image) (step S103). Then, the deconvolution NN calculation unit 425 performs a deconvolution neural net calculation, restores the image, obtains an output image, and stores it in the output image storage unit 426 (step S104).

次に、画像差異算出部428は、再び入力画像と出力画像との差異を算出し(ステップS105)、差異が十分に小さい場合には(ステップS106:YES)、畳み込みNN演算部423において直近に設定されているパラメータの値を、特徴量学習部42の特徴量算出設定記憶部427から特徴量算出部51の特徴量算出設定記憶部514へ転送する(ステップS108)。 Next, the image difference calculation unit 428 calculates the difference between the input image and the output image again (step S105), and if the difference is sufficiently small (step S106: YES), the convolutional NN calculation unit 423 most recently. The value of the set parameter is transferred from the feature amount calculation setting storage unit 427 of the feature amount learning unit 42 to the feature amount calculation setting storage unit 514 of the feature amount calculation unit 51 (step S108).

なお、特徴量学習部42は、ステップS102からステップS107までの処理を何度か繰り返し実行する。入力画像と出力画像との差が十分に小さいときの畳み込みNN演算部423は、図3および図4で説明した特徴量抽出器(学習済みの畳み込みニューラルネットワーク)として機能する。 The feature amount learning unit 42 repeatedly executes the processes from step S102 to step S107 several times. The convolutional NN calculation unit 423 when the difference between the input image and the output image is sufficiently small functions as a feature amount extractor (learned convolutional neural network) described with reference to FIGS. 3 and 4.

また、本実施の形態では、特徴量学習部42が、上述したステップS102からステップS107までの処理を、画像が1枚入力される毎に行う場合について説明したが、[0078]で説明したように、画像がある程度まとまった枚数蓄積される毎にこれらの処理を行うことも可能である。 Further, in the present embodiment, the case where the feature amount learning unit 42 performs the above-mentioned processing from step S102 to step S107 every time one image is input has been described, but as described in [0078]. In addition, it is also possible to perform these processes every time a certain number of images are accumulated.

次に、畳み込みNN演算部423は、画像保存部41に保存されている、すべての学習用画像について特徴量を算出し、特徴量出力部430へ出力する(ステップS109)。 Next, the convolutional NN calculation unit 423 calculates the feature amount for all the learning images stored in the image storage unit 41 and outputs the feature amount to the feature amount output unit 430 (step S109).

以上説明したように、特徴量学習部42は、学習用画像を入力画像として、畳み込みニューラルネットワークの学習を行ってパラメータの値を更新し、特徴量抽出器(学習済みの畳み込みニューラルネットワーク)を生成する。そして、特徴量学習部42は、学習により生成した特徴量抽出器を用いて、学習用画像の特徴量を算出する。 As described above, the feature amount learning unit 42 learns the convolutional neural network using the learning image as an input image, updates the parameter values, and generates a feature amount extractor (learned convolutional neural network). do. Then, the feature amount learning unit 42 calculates the feature amount of the learning image by using the feature amount extractor generated by the learning.

[識別器教師なし学習処理]
次に、識別器学習部43による識別器の教師なし学習処理について、図9のフローチャートを参照して説明する。まず、特徴量入力部431は、特徴量学習部42の特徴量出力部430から送信された学習用画像の特徴量を受信する(ステップS110)。
[Unsupervised learning process]
Next, the unsupervised learning process of the classifier by the classifier learning unit 43 will be described with reference to the flowchart of FIG. First, the feature amount input unit 431 receives the feature amount of the learning image transmitted from the feature amount output unit 430 of the feature amount learning unit 42 (step S110).

次に、次元低減部432は、受信した画像の特徴量の情報量を落とさないようにしつつ、次元を減らす演算を行う(ステップS111)。次元低減部432は、例えば、主成分分析など公知の手法を用いて、受信した画像をより少ない次元の特徴量に圧縮する。 Next, the dimension reduction unit 432 performs an operation to reduce the dimension while not reducing the amount of information of the feature amount of the received image (step S111). The dimension reduction unit 432 compresses the received image into features having a smaller dimension by using a known method such as principal component analysis.

次に、識別演算教師なし学習部433は、次元低減部432によって次元圧縮された学習用画像の特徴量をもとに、教師なし学習を行い(ステップS112)、識別器を生成する(ステップS113)。より詳細には、識別演算教師なし学習部433は、例えば、アイソレーションフォレスト、One-Class SVM、部分空間法、LOFなど公知の教師なし学習手法を用いて、検査対象が良品の範囲内か否かを判定する識別器を生成する。 Next, the discriminant calculation unsupervised learning unit 433 performs unsupervised learning (step S112) based on the feature amount of the learning image dimensionally compressed by the dimension reduction unit 432, and generates a discriminator (step S113). ). More specifically, the discriminant operation unsupervised learning unit 433 uses known unsupervised learning methods such as isolation forest, One-Class SVM, subspace method, and LOF to determine whether the inspection target is within the range of good products. Generate a classifier to determine if.

なお、識別演算教師なし学習部433による学習によって生成された識別器は、判定部5の識別部52が有する識別演算部523で用いられる。
以上説明したように、識別器学習部43は、学習用画像の特徴量に基づいて教師なし学習を行い、識別器を生成する。
The discriminator generated by the learning by the discriminating calculation unsupervised learning unit 433 is used in the discriminating calculation unit 523 possessed by the discriminating unit 52 of the determination unit 5.
As described above, the discriminator learning unit 43 performs unsupervised learning based on the feature amount of the learning image to generate a discriminator.

[特徴量算出処理]
次に、判定部5が有する特徴量算出部51による特徴量算出処理について、図10のフローチャートを参照して説明する。まず、画像取得部3から受信された判定用画像は、入力画像記憶部511に記憶される(ステップS114)。
[Feature amount calculation process]
Next, the feature amount calculation process by the feature amount calculation unit 51 possessed by the determination unit 5 will be described with reference to the flowchart of FIG. First, the determination image received from the image acquisition unit 3 is stored in the input image storage unit 511 (step S114).

次に、畳み込みNN演算部513は、特徴量算出設定記憶部514に記憶されている、学習済みの畳み込みニューラルネットワークのパラメータの値を読み出す(ステップS115)。その後、畳み込みNN演算部513は、読み出したパラメータの値を用い、入力画像記憶部511に記憶されている判定用画像を入力として、畳み込みニューラルネットワーク演算を行う(ステップS116)。なお、畳み込みNN演算部513は、学習部4の畳み込みNN演算部423と同じ構成を有する。 Next, the convolutional NN calculation unit 513 reads out the values of the learned convolutional neural network parameters stored in the feature amount calculation setting storage unit 514 (step S115). After that, the convolutional NN calculation unit 513 uses the value of the read parameter and inputs the determination image stored in the input image storage unit 511 to perform the convolutional neural network calculation (step S116). The convolutional NN calculation unit 513 has the same configuration as the convolutional NN calculation unit 423 of the learning unit 4.

次に、畳み込みNN演算部513による演算結果は、判定用画像の特徴量として特徴量出力部515から出力される(ステップS117)。なお、特徴量出力部515から出力される、判定用画像の特徴量は、識別部52に入力される。 Next, the calculation result by the convolutional NN calculation unit 513 is output from the feature amount output unit 515 as the feature amount of the determination image (step S117). The feature amount of the determination image output from the feature amount output unit 515 is input to the identification unit 52.

以上説明したように、特徴量算出部51は、特徴量学習部42による特徴量学習処理で得られた学習済みの畳み込みニューラルネットワークのパラメータの値を用いて、判定用画像の特徴量を算出する。 As described above, the feature amount calculation unit 51 calculates the feature amount of the determination image using the values of the parameters of the trained convolutional neural network obtained by the feature amount learning process by the feature amount learning unit 42. ..

[判定出力処理]
次に、判定部5が有する識別部52および出力部53による判定出力処理について、図11のフローチャートを参照して説明する。まず、識別部52の特徴量入力部521には、判定部5が有する特徴量算出部51の特徴量出力部515から出力される、判定用画像の特徴量が入力される(ステップS118)。
[Judgment output processing]
Next, the determination output process by the identification unit 52 and the output unit 53 of the determination unit 5 will be described with reference to the flowchart of FIG. First, the feature amount of the determination image output from the feature amount output unit 515 of the feature amount calculation unit 51 of the determination unit 5 is input to the feature amount input unit 521 of the identification unit 52 (step S118).

次に、次元低減部522は、入力された特徴量の次元圧縮を行う(ステップS119)。その後、識別演算部523は、次元低減部522から出力される次元圧縮された判定用画像における特徴量を入力として、識別器学習部43の識別演算教師なし学習部433による学習処理で生成された識別器を用いて、検査対象の良否を判定する(ステップS120)。 Next, the dimension reduction unit 522 performs dimensional compression of the input feature amount (step S119). After that, the identification calculation unit 523 is generated by a learning process by the identification calculation unsupervised learning unit 433 of the discriminator learning unit 43, using the feature amount in the dimension-compressed determination image output from the dimension reduction unit 522 as an input. Using the classifier, the quality of the inspection target is determined (step S120).

そして、識別演算部523による判定結果は、出力部53から出力される(ステップS121)。より詳細には、出力部53は、例えば、液晶ディスプレイなどの表示画面に判定結果を表示したり、検査対象の製品を製造する装置に判定結果を送信する。このように、検査対象の良否についての判定結果が出力部53から出力されることによって、不良品の選別などに利用される。 Then, the determination result by the identification calculation unit 523 is output from the output unit 53 (step S121). More specifically, the output unit 53 displays the determination result on a display screen such as a liquid crystal display, or transmits the determination result to an apparatus that manufactures the product to be inspected. In this way, the determination result regarding the quality of the inspection target is output from the output unit 53, which is used for sorting defective products and the like.

このように、識別部52は、識別器学習部43が学習処理で生成した識別器を用いて、検査対象の良否の判定を行う。そして、出力部53は、識別部52による判定結果を出力する。 In this way, the discriminator 52 determines the quality of the inspection target by using the discriminator generated by the discriminator learning unit 43 in the learning process. Then, the output unit 53 outputs the determination result by the identification unit 52.

以上説明したように、第1の実施の形態によれば、画像検査装置1は、画像の特徴量の抽出を行う畳み込み層の教師なし学習と、検査対象の良否の判定を行う識別器を生成する教師なし学習とを別個に行う。これにより、検査対象の不良品画像が無い場合、または、学習用画像において良否が区別されていない場合であっても、検査対象の画像の特徴量を自動で学習することができる画像検査装置が得られる。 As described above, according to the first embodiment, the image inspection device 1 generates unsupervised learning of the convolution layer for extracting the feature amount of the image and a classifier for determining the quality of the inspection target. Do unsupervised learning separately. As a result, an image inspection device capable of automatically learning the feature amount of the image to be inspected even when there is no defective image to be inspected or even if the quality of the image to be inspected is not distinguished. can get.

[第2の実施の形態]
次に、本発明の第2の実施の形態について説明する。なお、以下の説明では、上述した第1の実施の形態と同じ構成については同一の符号を付し、その説明を省略する。
[Second Embodiment]
Next, a second embodiment of the present invention will be described. In the following description, the same reference numerals will be given to the same configurations as those of the first embodiment described above, and the description thereof will be omitted.

第1の実施の形態では、識別器学習部43は、アイソレーションフォレスト、One-Class SVM、部分空間法、LOFなどの公知の教師なし学習手法を用いて識別器を学習し、検査対象の良否を判定する識別器を生成する場合について説明した。第2の実施の形態は、教師なし学習により識別器を生成する点では第1の実施の形態と共通する。 In the first embodiment, the discriminator learning unit 43 learns the discriminator by using a known unsupervised learning method such as isolation forest, One-Class SVM, subspace method, LOF, and the quality of the inspection target. The case of generating a classifier for determining the above is described. The second embodiment is common to the first embodiment in that a discriminator is generated by unsupervised learning.

しかし、第2の実施の形態では、画像検査装置1Aは、学習部4Aに識別器調整部44をさらに備える点で第1の実施の形態とは異なる。また、第2の実施の形態では、学習用の検査対象の不良品画像がごく少量存在し、それらが良品と区別されてラベル付けされてある状況を想定している。 However, in the second embodiment, the image inspection device 1A is different from the first embodiment in that the learning unit 4A further includes the classifier adjusting unit 44. Further, in the second embodiment, it is assumed that there are a very small amount of defective image images to be inspected for learning, and they are labeled so as to be distinguished from non-defective products.

[識別器の調整パラメータ]
第1の実施の形態で説明した上記の各種識別器は、通常、検査対象の良否の判定に関わるパラメータ(以下、「調整パラメータ」という。)を持っている。例えば、統計的検定を用いた手法では、有意水準を変えると良品と不良品との境界が変わる。第1の実施の形態で挙げた手法による識別器も、そのような調整パラメータを有する。図13の矢印に示すように、識別器の調整パラメータを調整することで良品と不良品との境界を調整することができる。なお、図13において、「白丸」は検査対象の良品画像の特徴量を示す。また、「バツ」は、検査対象の不良品画像の特徴量を示す。
[Identifier adjustment parameters]
The above-mentioned various classifiers described in the first embodiment usually have parameters (hereinafter, referred to as “adjustment parameters”) related to the determination of the quality of the inspection target. For example, in a method using a statistical test, the boundary between a non-defective product and a defective product changes when the significance level is changed. The classifier according to the method described in the first embodiment also has such an adjustment parameter. As shown by the arrow in FIG. 13, the boundary between the non-defective product and the defective product can be adjusted by adjusting the adjustment parameter of the discriminator. In FIG. 13, "white circles" indicate feature quantities of non-defective images to be inspected. Further, "X" indicates the feature amount of the defective product image to be inspected.

教師なし学習ではこのような調整パラメータの調整が重要となる。図13の右側の破線に示す、良品側に近い方に境界を設定すれば、実際には不良品だった検査対象を良品と誤判定して見逃すこと(以下、「見逃し」という。)は減るが、実際には良品だった検査対象を不良品と過剰に判定すること(以下、「過剰判定」という。)が増える。一方、図13の左側の破線に示す、不良品側に近い方に境界を設定すれば、このような過剰判定は減るが、本当の不良品を見逃すリスクは増える。 Adjustment of such adjustment parameters is important in unsupervised learning. If the boundary is set closer to the non-defective product side shown by the broken line on the right side of FIG. 13, the inspection target that was actually a defective product is mistakenly judged as a non-defective product and overlooked (hereinafter referred to as “missing”) is reduced. However, the number of cases where an inspection target that was actually a good product is excessively judged as a defective product (hereinafter referred to as "excessive judgment") increases. On the other hand, if the boundary is set closer to the defective product side shown by the broken line on the left side of FIG. 13, such an excessive determination is reduced, but the risk of missing a true defective product is increased.

識別器が有する調整パラメータを最適な値に調整することは重要であるが、その調整は困難な場合もある。しかし、不良品と確実にわかっている画像がごく少数でも存在する場合、不良品画像が全く無い場合と比較して、調整パラメータの調整が容易となる。例えば、図13に示すような特徴量の分布状況であれば、真ん中の実線で示す位置に、良品と不良品との境界を設定すれば、少なくともこれまで収集した画像データについては不良品の見逃しは無く、過剰判定も少量に抑えられることがわかる。 It is important to adjust the adjustment parameters of the discriminator to the optimum values, but the adjustment can be difficult. However, when there are even a small number of images that are definitely known to be defective, the adjustment parameters can be easily adjusted as compared with the case where there are no defective images. For example, in the case of the distribution of the feature amount as shown in FIG. 13, if the boundary between the non-defective product and the defective product is set at the position indicated by the solid line in the center, the defective product is overlooked at least for the image data collected so far. It can be seen that the over-judgment can be suppressed to a small amount.

[画像検査装置の機能ブロック]
次に、第2の実施の形態に係る画像検査装置1Aの機能ブロックについて、図12を参照して説明する。以下、第1の実施の形態と異なる構成要素である識別器学習部43および識別器調整部44を中心に説明する。
[Functional block of image inspection device]
Next, the functional block of the image inspection apparatus 1A according to the second embodiment will be described with reference to FIG. Hereinafter, the discriminator learning unit 43 and the discriminator adjusting unit 44, which are components different from the first embodiment, will be mainly described.

識別器学習部43は、学習を行って生成する識別器における良否判定の精度に関わる調整パラメータが、識別器調整部44から与えられるようになっている。識別器学習部43は、識別器調整部44から与えられた調整パラメータの値を用いて識別器を生成する。 The discriminator learning unit 43 is provided with an adjustment parameter related to the accuracy of the quality determination in the discriminator generated by learning from the discriminator adjusting unit 44. The discriminator learning unit 43 generates a discriminator using the value of the adjustment parameter given by the discriminator adjusting unit 44.

識別器調整部44は、識別器の調整パラメータを調整して、検査対象における不良品を見逃す恐れと、良品を不良品と過剰判定する恐れとのバランスを図る。例えば、識別器調整部44は、不良品の見逃しは極力避けつつ、良品を不良品と過剰判定する割合が、あるしきい値以下になるように調整してもよい。識別器調整部44によって調整された識別器の調整パラメータの値は、識別器学習部43に入力される。 The discriminator adjusting unit 44 adjusts the adjusting parameters of the discriminator to balance the risk of overlooking a defective product in the inspection target and the risk of overdetermining a non-defective product as a defective product. For example, the classifier adjusting unit 44 may adjust so that the ratio of over-determining a non-defective product as a defective product is equal to or less than a certain threshold value while avoiding overlooking defective products as much as possible. The value of the discriminator adjustment parameter adjusted by the discriminator adjusting unit 44 is input to the discriminator learning unit 43.

[パラメータ調整処理]
次に、識別器の調整パラメータを調整するパラメータ調整処理について、図14のフローチャートを参照して説明する。まず、識別器調整部44は、識別器の調整パラメータを所定の値に設定する(ステップS200)。識別器調整部44は、設定した調整パラメータの値を識別器学習部43に入力する。そして、識別演算教師なし学習部433は、設定された調整パラメータの値で識別器を調整する。
[Parameter adjustment processing]
Next, the parameter adjustment process for adjusting the adjustment parameter of the classifier will be described with reference to the flowchart of FIG. First, the discriminator adjusting unit 44 sets the discriminator adjusting parameter to a predetermined value (step S200). The discriminator adjusting unit 44 inputs the set adjustment parameter value to the discriminator learning unit 43. Then, the discriminant operation unsupervised learning unit 433 adjusts the discriminator with the value of the set adjustment parameter.

次に、特徴量学習部42(畳み込みNN演算部423)によって算出された学習用画像の特徴量が、識別器学習部43の特徴量入力部431に入力される(ステップS200)。なお、必要に応じて、次元低減部432は学習用画像の特徴量の次元圧縮を行う。 Next, the feature amount of the learning image calculated by the feature amount learning unit 42 (convolutional NN calculation unit 423) is input to the feature amount input unit 431 of the discriminator learning unit 43 (step S200). If necessary, the dimension reduction unit 432 performs dimension compression of the feature amount of the learning image.

次に、識別器学習部43の識別演算教師なし学習部433は、調整パラメータが調整された識別器に、学習用画像の特徴量を入力して、検査対象の良否の判定を行う(ステップS202)。その後、識別演算教師なし学習部433は、検査対象の良否の判定結果と、実際の良品および不良品の区別を照合し、実際には不良品だった検査対象を良品と判定した場合(見逃し)の有無と、実際には良品だった検査対象を不良品と判定した場合(過剰判定)との比率を算出する(ステップS203)。 Next, the unsupervised learning unit 433 of the discriminator learning unit 43 inputs the feature amount of the learning image into the discriminator whose adjustment parameters have been adjusted, and determines the quality of the inspection target (step S202). ). After that, the discriminant operation unsupervised learning unit 433 collates the judgment result of the quality of the inspection target with the distinction between the actual non-defective product and the defective product, and determines that the inspection target that was actually a defective product is a non-defective product (missed). The ratio between the presence or absence of the product and the case where the inspection target that was actually a non-defective product is determined to be a defective product (excessive determination) is calculated (step S203).

識別演算教師なし学習部433は、見逃しがなく(ステップS204:YES)、かつ、過剰判定比率がしきい値以下(ステップS205:YES)で受容範囲内と判定した場合には、使用している調整パラメータの値を記憶する(ステップS206)。その後、判定部5の識別部52が、調整後の調整パラメータの値で設定された識別器を用いる。 The discriminant operation unsupervised learning unit 433 is used when it is determined that there is no oversight (step S204: YES) and the excess determination ratio is equal to or less than the threshold value (step S205: YES) and is within the acceptance range. The value of the adjustment parameter is stored (step S206). After that, the identification unit 52 of the determination unit 5 uses the identification device set by the value of the adjustment parameter after adjustment.

一方、見逃しがあり(ステップS204:NO)、かつ、過剰判定比率がしきい値以下(ステップS207:YES)である場合には、識別器調整部44は、図13で説明したように、良品と判定される割合が少なくなる方向に調整パラメータの値を変更する(ステップS208)。その後、ステップS201からステップS203までの処理を再度実行し、見逃しがなく(ステップS204:YES)、過剰判定比率がしきい値以下(ステップS205:YES)となるまで調整パラメータの値の変更を繰り返す。 On the other hand, if there is an oversight (step S204: NO) and the excess determination ratio is equal to or less than the threshold value (step S207: YES), the discriminator adjusting unit 44 is a non-defective product as described with reference to FIG. The value of the adjustment parameter is changed in the direction in which the ratio of determination is reduced (step S208). After that, the processes from step S201 to step S203 are executed again, and the adjustment parameter values are repeatedly changed until the excess determination ratio becomes equal to or less than the threshold value (step S205: YES) without overlooking (step S204: YES). ..

また、見逃しがなく(ステップS204:YES)、かつ、過剰判定比率がしきい値以上(ステップS205:NO)である場合には、識別器調整部44は、図13で説明したように、良品と判定される割合が多くなる方向に調整パラメータの値を変更する(ステップS209)。その後、ステップS201からステップS203までの処理を再度実行し、見逃しがなく(ステップS204:YES)、過剰判定の比率がしきい値以下(ステップS205:YES)となるまで調整パラメータの値の変更を繰り返す。 Further, when there is no oversight (step S204: YES) and the excess determination ratio is equal to or higher than the threshold value (step S205: NO), the discriminator adjusting unit 44 is a non-defective product as described with reference to FIG. The value of the adjustment parameter is changed in the direction in which the ratio of determination is increased (step S209). After that, the processes from step S201 to step S203 are executed again, and the adjustment parameter values are changed until the overlooked ratio is equal to or less than the threshold value (step S205: YES) without overlooking (step S204: YES). repeat.

また、見逃しがあり(ステップS204:NO)、かつ、過剰判定比率がしきい値以上(ステップS207:NO)である場合には、その調整パラメータについては、どのように調整しても、見逃しがなく、かつ、過剰判定比率がしきい値以下となるような目標の値を得ることが困難であることを意味する。 Further, if there is an oversight (step S204: NO) and the excess determination ratio is equal to or higher than the threshold value (step S207: NO), the adjustment parameter can be overlooked no matter how it is adjusted. It means that it is difficult to obtain a target value such that the excess judgment ratio is equal to or less than the threshold value.

この場合において、識別器に別の調整パラメータが存在する場合には、その別の調整パラメータを利用し、再度、パラメータ調整処理を行ってもよい。なお、識別器調整部44によって別の調整パラメータが調整されても、識別器における良否判定が改善しない場合には、特徴量学習部42において、検査対象の画像における特徴量の学習をやり直すことを検討してもよい。 In this case, if another adjustment parameter exists in the discriminator, the parameter adjustment process may be performed again by using the other adjustment parameter. If the quality determination in the discriminator does not improve even if another adjustment parameter is adjusted by the discriminator adjusting unit 44, the feature quantity learning unit 42 may re-learn the feature quantity in the image to be inspected. You may consider it.

上記のように、識別器調整部44によって、調整パラメータが調整されて得られた識別器は、判定部5が有する識別部52の識別演算部523で用いられる。そして、識別演算部523は、調整パラメータの値が調整された識別器を用いて検査対象の良否の判定を行う。 As described above, the discriminator obtained by adjusting the adjustment parameters by the discriminator adjusting unit 44 is used by the discriminating calculation unit 523 of the discriminating unit 52 possessed by the determination unit 5. Then, the identification calculation unit 523 determines the quality of the inspection target by using the discriminator adjusted with the value of the adjustment parameter.

以上説明したように、第2の実施の形態によれば、識別器調整部44が、識別器における調整パラメータを調整し、検査対象における不良品を見逃す恐れと、良品を不良品と過剰判定する恐れとのバランスを図る。これにより、画像検査装置1Aの調整をより容易に行うことができる。また、画像検査装置1Aの良否判定の精度をより向上させることが可能となる。 As described above, according to the second embodiment, the discriminator adjusting unit 44 adjusts the adjustment parameters in the discriminator, and there is a risk that a defective product in the inspection target may be overlooked, and a non-defective product is excessively determined as a defective product. Balance with fear. Thereby, the adjustment of the image inspection device 1A can be performed more easily. In addition, the accuracy of the quality determination of the image inspection device 1A can be further improved.

[第3の実施の形態]
次に、本発明の第3の実施の形態について説明する。なお、以下の説明では、上述した第1および第2の実施の形態と同じ構成については同一の符号を付し、その説明を省略する。
[Third Embodiment]
Next, a third embodiment of the present invention will be described. In the following description, the same components as those of the first and second embodiments described above are designated by the same reference numerals, and the description thereof will be omitted.

第1および第2の実施の形態では、識別器の学習に、教師なし学習を用いる場合について説明した。これに対し、第3の実施の形態では、識別器学習部43Aは、識別演算教師あり学習部435を有し、教師あり学習により識別器を生成する点で第1および第2の実施の形態とは異なる。なお、第3の実施の形態は、第2の実施の形態と同様、学習用の検査対象の不良品画像がごく少量存在し、それらが良品画像とは区別されて、ラベル付けされている状況を想定している。 In the first and second embodiments, the case where unsupervised learning is used for learning the classifier has been described. On the other hand, in the third embodiment, the discriminator learning unit 43A has the discriminant operation supervised learning unit 435, and the discriminator is generated by supervised learning in the first and second embodiments. Is different. In the third embodiment, as in the second embodiment, there are a very small amount of defective images to be inspected for learning, and they are labeled so as to be distinguished from the non-defective images. Is assumed.

[教師あり学習による識別器の生成]
検査対象の画像の良否を示すラベルが付与された少数の不良品の画像と、良品の画像が確保できていれば、SVM、ランダムフォレストや、ブースティングのような教師あり学習により、少量の学習用の画像サンプルからロバストな識別器が生成できる。
[Generation of classifier by supervised learning]
If a small number of defective images with labels indicating the quality of the image to be inspected and images of good products can be secured, a small amount of learning is performed by supervised learning such as SVM, random forest, and boosting. A robust classifier can be generated from the image sample for.

例えば、SVMは、識別に関与する最小限のデータのみを用い、なるべく識別境界周辺に余白が生成されるような識別器を生成する。このため、未知のデータに対しても安定した識別結果を得ることができる。 For example, the SVM uses only the minimum amount of data involved in discrimination and generates a discriminator that creates a margin around the discriminant boundary as much as possible. Therefore, stable identification results can be obtained even for unknown data.

ランダムフォレストは多数の子識別器を組み合わせた識別器であるが、これらの子識別器として決定木を利用しているため、少数のサンプルも矮小化せず正しく識別することができる。 Random forest is a classifier that combines a large number of child classifiers, but since a decision tree is used as these child classifiers, even a small number of samples can be correctly discriminated without dwarfing.

ブースティングも多数の子識別器を組み合わせた識別器であるが、学習用の各画像に重みを付与できるという特徴も持つため、少量の不良品の画像に大きな重みを与えることにより、少量の不良品の画像に対しても安定した識別を行うことが期待できる。 Boosting is also a classifier that combines a large number of child classifiers, but it also has the feature that each image for learning can be weighted, so by giving a large weight to a small amount of defective images, a small amount of defective products can be added. It can be expected that stable identification will be performed even for the image of.

[識別器学習部および識別部の機能ブロック]
図15は、識別器学習部43Aおよび識別部52の機能ブロック図である。
識別器学習部43Aは、特徴量入力部431、次元低減部432、良否情報入力部434、および識別演算教師あり学習部435を備える。
[Functional block of discriminator learning unit and discriminator unit]
FIG. 15 is a functional block diagram of the discriminator learning unit 43A and the discriminating unit 52.
The classifier learning unit 43A includes a feature quantity input unit 431, a dimension reduction unit 432, a pass / fail information input unit 434, and a learning unit 435 with a discriminant calculation teacher.

良否情報入力部434は、特徴量入力部431に入力された学習用画像の特徴量に対応する検査対象の画像の良否を示す情報を入力する。 The quality information input unit 434 inputs information indicating the quality of the image to be inspected corresponding to the feature amount of the learning image input to the feature amount input unit 431.

識別演算教師あり学習部435は、学習用画像の特徴量と、その特徴量の元となった学習用画像が、良品を示す画像か、不良品を示す画像かの情報とを入力として、公知の教師あり学習手法により識別器を生成する。 The learning unit 435 with a discrimination calculation supervised learning unit is known by inputting information on the feature amount of the learning image and whether the learning image based on the feature amount is an image showing a good product or an image showing a defective product. Generate a classifier by the supervised learning method of.

識別演算教師あり学習部435が用いる公知の教師あり学習手法としては、例えば、非特許文献8に記載されているSVM、非特許文献9に記載されているランダムフォレスト、非特許文献10に記載されているブースティングなどがある。 As known supervised learning methods used by the discriminating calculation supervised learning unit 435, for example, SVM described in Non-Patent Document 8, Random Forest described in Non-Patent Document 9, and Non-Patent Document 10 are described. There are boosting etc.

識別演算教師あり学習部435で生成された識別器は、識別部52の識別演算部523で用いられる。そして、識別演算部523は、判定用画像の特徴量を入力として、教師あり学習で生成された識別器を用いて検査対象の良否の判定を行う。 The discriminator generated by the discriminating calculation supervised learning unit 435 is used by the discriminating calculation unit 523 of the discriminating unit 52. Then, the identification calculation unit 523 uses the discriminator generated by supervised learning as an input for the feature amount of the determination image, and determines the quality of the inspection target.

[識別器教師あり学習処理]
次に、識別器教師あり学習処理について、図16のフローチャートを参照して説明する。まず、識別器学習部43Aの特徴量入力部431は、特徴量学習部42の畳み込みNN演算部423による演算結果で得られた学習用の検査対象の画像における特徴量を、特徴量出力部430から受信する(ステップS300)。
[Learning process with discriminator supervised learning]
Next, the learning process with discriminator supervised learning will be described with reference to the flowchart of FIG. First, the feature amount input unit 431 of the discriminator learning unit 43A obtains the feature amount in the image to be inspected for learning obtained by the calculation result by the convolutional NN calculation unit 423 of the feature amount learning unit 42, and the feature amount output unit 430. Received from (step S300).

次に、次元低減部432は、特徴量入力部431が受信した学習用画像の特徴量の次元圧縮を行う(ステップS301)。その後、識別演算教師あり学習部435は、次元圧縮された学習用画像の特徴量と、良否情報入力部434を介して入力される、対応する学習用画像の良否を示す情報とを入力として、教師あり学習を行って識別器を学習する(ステップS302)。 Next, the dimension reduction unit 432 performs dimensional compression of the feature amount of the learning image received by the feature amount input unit 431 (step S301). After that, the learning unit 435 with the identification calculation supervised learning unit receives the feature amount of the dimension-compressed learning image and the information indicating the quality of the corresponding learning image input via the quality information input unit 434 as input. Supervised learning is performed to learn the classifier (step S302).

識別演算教師あり学習部435は、例えば、SVMなどの公知の教師あり学習手法を用いて識別器を学習する。そして、識別演算教師あり学習部435は、検査対象の良否を判定する識別器を生成する(ステップS303)。 The discriminant operation supervised learning unit 435 learns the discriminator by using a known supervised learning method such as SVM. Then, the learning unit 435 with a discriminating calculation supervised learning unit generates a discriminator for determining the quality of the inspection target (step S303).

生成された識別器は、判定部5が有する識別部52の識別演算部523で用いられる。識別演算部523は、教師あり学習で生成された識別器を用いて、判定用画像の特徴量を入力として、検査対象の良否の判定を行う。そして、出力部53は、判定結果を液晶ディスプレイなどの表示画面に表示する。 The generated classifier is used in the discriminating calculation unit 523 of the discriminating unit 52 possessed by the determination unit 5. The discrimination calculation unit 523 uses the classifier generated by supervised learning to input the feature amount of the judgment image and determines the quality of the inspection target. Then, the output unit 53 displays the determination result on a display screen such as a liquid crystal display.

以上説明したように、第3の実施の形態によれば、教師あり学習を行って識別器を生成するため、検査対象の不良品画像が少数しか無い場合であっても、検査対象の良否をより正しく判定できる識別器を学習して生成することができる。 As described above, according to the third embodiment, since supervised learning is performed to generate a discriminator, even if there are only a small number of defective images to be inspected, the quality of the inspection target is determined. It is possible to learn and generate a classifier that can make a more accurate judgment.

以上、本発明の画像検査装置および画像検査方法における実施の形態について説明したが、本発明は説明した実施の形態に限定されるものではなく、請求項に記載した発明の範囲において当業者が想定し得る各種の変形を行うことが可能である。 Although the embodiments of the image inspection apparatus and the image inspection method of the present invention have been described above, the present invention is not limited to the described embodiments and is assumed by those skilled in the art within the scope of the invention described in the claims. It is possible to make various possible modifications.

例えば、説明した実施の形態では、撮像部2および画像取得部3は、学習部4と判定部5とで共有している場合について説明したが、学習部4と判定部5とはそれぞれ独立して撮像部2および画像取得部3を有していてもよい。 For example, in the described embodiment, the case where the image pickup unit 2 and the image acquisition unit 3 are shared by the learning unit 4 and the determination unit 5 has been described, but the learning unit 4 and the determination unit 5 are independent of each other. It may have an image pickup unit 2 and an image acquisition unit 3.

また、説明した実施の形態では、学習部4と判定部5とは同一の計算機に実装されている場合について説明したが、学習部4と判定部5とはそれぞれ別々の計算機に実装されていてもよい。 Further, in the described embodiment, the case where the learning unit 4 and the determination unit 5 are mounted on the same computer has been described, but the learning unit 4 and the determination unit 5 are mounted on different computers. May be good.

1、1A、100…画像検査装置、2…撮像部、3…画像取得部、4…学習部、5…判定部、41…画像保存部、42…特徴量学習部、43…識別器学習部、51…特徴量算出部、52…識別部、53…出力部、101…バス、102…制御部、103…CPU、104…主記憶部、105…通信制御装置、106…撮像装置、107…記憶装置、108…表示装置。 1, 1A, 100 ... Image inspection device, 2 ... Imaging unit, 3 ... Image acquisition unit, 4 ... Learning unit, 5 ... Judgment unit, 41 ... Image storage unit, 42 ... Feature quantity learning unit, 43 ... Discriminator learning unit , 51 ... feature amount calculation unit, 52 ... identification unit, 53 ... output unit, 101 ... bus, 102 ... control unit, 103 ... CPU, 104 ... main storage unit, 105 ... communication control device, 106 ... image pickup device, 107 ... Storage device, 108 ... Display device.

Claims (7)

検査対象の良否を画像によって検査する画像検査装置であって、
前記検査対象を含む学習用画像に基づいてニューラルネットワークの教師なし学習を行い、前記学習用画像を復元できる特徴量を出力する学習済みのニューラルネットワークを構築する特徴量学習部と、
前記特徴量学習部の学習完了後、前記学習済みのニューラルネットワークが出力した前記学習用画像の前記特徴量に基づいて、前記検査対象の良否を判定する識別器を学習により生成する識別器学習部と、
前記検査対象を含む判定用画像を前記学習済みのニューラルネットワークに入力し、前記判定用画像の特徴量を出力する特徴量算出部と、
前記特徴量算出部が出力した前記判定用画像の前記特徴量を、前記識別器学習部によって生成された前記識別器に入力して、前記検査対象の良否の判定を行う識別部と
を備え
前記識別器学習部は、
前記学習用画像の前記特徴量を入力として教師なし学習を行って、前記識別器を生成する識別演算教師なし学習部を備え、
前記識別部は、
前記判定用画像の前記特徴量を入力として、前記識別演算教師なし学習部によって生成された前記識別器を用いて、前記検査対象の良否の判定を行う
ことを特徴とする画像検査装置。
It is an image inspection device that inspects the quality of the inspection target by images.
A feature amount learning unit that performs unsupervised learning of a neural network based on a learning image including the inspection target and constructs a trained neural network that outputs a feature amount that can restore the learning image.
After the learning of the feature amount learning unit is completed, the discriminator learning unit that generates a discriminator for determining the quality of the inspection target based on the feature amount of the learning image output by the trained neural network by learning. When,
A feature amount calculation unit that inputs a judgment image including the inspection target into the trained neural network and outputs a feature amount of the judgment image, and a feature amount calculation unit.
It is provided with an identification unit for inputting the feature amount of the determination image output by the feature amount calculation unit into the classifier generated by the discriminator learning unit to determine the quality of the inspection target .
The classifier learning unit
An unsupervised learning unit is provided, which performs unsupervised learning by inputting the feature amount of the learning image and generates the discriminator.
The identification unit is
Using the feature amount of the determination image as an input and the discriminator generated by the unsupervised learning unit for discrimination calculation, the quality of the inspection target is determined.
An image inspection device characterized by that.
請求項1に記載の画像検査装置において、
前記特徴量学習部は、
前記学習用画像を入力画像として記憶する第1の入力画像記憶部と、
前記入力画像を入力として、前記入力画像の特徴量を出力する第1の畳み込みニューラルネットワーク演算部と、
前記第1の畳み込みニューラルネットワーク演算部が出力した前記入力画像の前記特徴量を入力として、前記入力画像と同一の大きさの画像を出力する逆畳み込みニューラルネットワーク演算部と、
前記逆畳み込みニューラルネットワーク演算部から出力された前記画像を出力画像として記憶する出力画像記憶部と、
前記入力画像と前記出力画像との差異を算出する画像差異算出部と、
前記差異が、算出された値より小さくなるように前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部それぞれのパラメータの値を更新する特徴量算出設定更新部と、
前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部それぞれの前記パラメータの値を記憶する特徴量算出設定記憶部と、
を備え、
前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部は、前記特徴量算出設定記憶部に記憶されている前記パラメータの値を用いてそれぞれ演算を行い、
前記特徴量算出設定記憶部は、更新された前記パラメータの値を記憶し、
前記第1の畳み込みニューラルネットワーク演算部は、更新された前記パラメータの値を用いて、すべての前記学習用画像それぞれの前記特徴量を出力する
ことを特徴とする画像検査装置。
In the image inspection apparatus according to claim 1,
The feature amount learning unit is
A first input image storage unit that stores the learning image as an input image,
A first convolutional neural network calculation unit that takes the input image as an input and outputs the feature amount of the input image.
A deconvolutional neural network calculation unit that outputs an image of the same size as the input image by using the feature amount of the input image output by the first convolutional neural network calculation unit as an input.
An output image storage unit that stores the image output from the deconvolutional neural network calculation unit as an output image, and an output image storage unit.
An image difference calculation unit that calculates the difference between the input image and the output image,
A feature amount calculation setting update unit that updates the parameter values of the first convolutional neural network calculation unit and the deconvolutional neural network calculation unit so that the difference becomes smaller than the calculated value.
A feature amount calculation setting storage unit that stores the values of the parameters of each of the first convolutional neural network calculation unit and the deconvolutional neural network calculation unit, and
Equipped with
The first convolutional neural network calculation unit and the deconvolutional neural network calculation unit perform calculations using the values of the parameters stored in the feature amount calculation setting storage unit, respectively.
The feature amount calculation setting storage unit stores the updated value of the parameter, and stores the updated value.
The first convolutional neural network calculation unit is an image inspection apparatus characterized in that it outputs the feature amount of each of the learning images by using the updated value of the parameter.
請求項2に記載の画像検査装置において、
前記特徴量算出部は、
前記判定用画像を記憶する第2の入力画像記憶部と、
前記特徴量算出設定記憶部に記憶されている更新された前記パラメータの値を用いて、前記判定用画像を入力として、前記判定用画像の前記特徴量を出力する第2の畳み込みニューラルネットワーク演算部と
を備えることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 2,
The feature amount calculation unit is
A second input image storage unit that stores the determination image, and
A second convolutional neural network calculation unit that outputs the feature amount of the determination image by inputting the determination image using the updated value of the parameter stored in the feature amount calculation setting storage unit. An image inspection device characterized by being provided with.
請求項1から3のいずれか1項に記載の画像検査装置において
前記識別演算教師なし学習部は、前記識別器を、アイソレーションフォレスト、One-Classサポートベクターマシン、部分空間法、Local Outlier Factor、統計的検定のうちのいずれかの手法で学習する
ことを特徴とする画像検査装置。
In the image inspection apparatus according to any one of claims 1 to 3, the image inspection apparatus
The discriminant operation unsupervised learning unit is characterized in that the discriminator is trained by any of the following methods: isolation forest, One-Class support vector machine, subspace method, Local Outlier Factor, and statistical test. Image inspection equipment.
請求項1から4のいずれか1項に記載の画像検査装置において、
前記識別器学習部は前記識別演算教師なし学習部が有する調整パラメータの値を調整する識別器調整部をさらに備え、
前記識別器調整部は、不良品を示す画像と良品を示す画像とが区別されている前記検査対象の画像から算出される特徴量に基づいて前記調整パラメータの値を調整する
ことを特徴とする画像検査装置。
In the image inspection apparatus according to any one of claims 1 to 4 .
The discriminator learning unit further includes a discriminator adjusting unit that adjusts the value of the adjustment parameter of the discriminating operation unsupervised learning unit.
The discriminator adjusting unit is characterized in that the value of the adjustment parameter is adjusted based on the feature amount calculated from the image to be inspected in which the image showing a defective product and the image showing a non-defective product are distinguished. Image inspection equipment.
請求項1からのいずれか1項に記載の画像検査装置において、
さらに前記学習用画像を取得する第1の画像取得部と、前記判定用画像を取得する第2の画像取得部とを有する画像取得部を備えることを特徴とする画像検査装置。
In the image inspection apparatus according to any one of claims 1 to 5 .
Further, an image inspection apparatus including an image acquisition unit having a first image acquisition unit for acquiring the learning image and a second image acquisition unit for acquiring the determination image.
検査対象を含む学習用画像に基づいてニューラルネットワークの教師なし学習を行い、前記学習用画像の特徴量を出力する学習済みのニューラルネットワークを構築する特徴量学習ステップと、
前記学習済みのニューラルネットワークが出力した前記学習用画像の前記特徴量に基づいて、前記検査対象の良否を判定する識別器を学習により生成する識別器学習ステップと、
前記検査対象を含む判定用画像を前記学習済みのニューラルネットワークに入力し、前記判定用画像の特徴量を出力する特徴量算出ステップと、
前記特徴量算出ステップで出力した前記判定用画像の前記特徴量を、前記識別器学習ステップで生成された前記識別器に入力して、前記検査対象の良否の判定を行う識別ステップと
を備え
前記識別器学習ステップは、
前記学習用画像の前記特徴量を入力として教師なし学習を行って、前記識別器を生成する識別演算教師なし学習ステップを備え、
前記識別ステップは、
前記判定用画像の前記特徴量を入力として、前記識別演算教師なし学習ステップによって生成された前記識別器を用いて、前記検査対象の良否の判定を行う
ことを特徴とする画像検査方法。
A feature amount learning step of performing unsupervised learning of a neural network based on a learning image including an inspection target and constructing a trained neural network that outputs the feature amount of the learning image.
A discriminator learning step of generating a discriminator for determining the quality of the inspection target by learning based on the feature amount of the learning image output by the trained neural network.
A feature amount calculation step of inputting a judgment image including the inspection target into the trained neural network and outputting the feature amount of the judgment image.
It is provided with an identification step in which the feature amount of the determination image output in the feature amount calculation step is input to the classifier generated in the discriminator learning step to determine the quality of the inspection target .
The discriminator learning step
An unsupervised learning step is provided in which unsupervised learning is performed by using the feature amount of the learning image as an input to generate the discriminator.
The identification step is
Using the feature amount of the determination image as an input and the discriminator generated by the discriminant operation unsupervised learning step, the quality of the inspection target is determined.
An image inspection method characterized by that.
JP2017217004A 2017-11-10 2017-11-10 Image inspection equipment and methods Active JP7074460B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017217004A JP7074460B2 (en) 2017-11-10 2017-11-10 Image inspection equipment and methods

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017217004A JP7074460B2 (en) 2017-11-10 2017-11-10 Image inspection equipment and methods

Publications (2)

Publication Number Publication Date
JP2019087181A JP2019087181A (en) 2019-06-06
JP7074460B2 true JP7074460B2 (en) 2022-05-24

Family

ID=66763159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017217004A Active JP7074460B2 (en) 2017-11-10 2017-11-10 Image inspection equipment and methods

Country Status (1)

Country Link
JP (1) JP7074460B2 (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11893718B2 (en) * 2019-07-12 2024-02-06 Murata Machinery, Ltd. Image recognition method and image recognition device
WO2021039591A1 (en) * 2019-08-23 2021-03-04 コニカミノルタ株式会社 Assessment standard generation device, assessment device, assessment standard generation program, and assessment program
KR102357729B1 (en) * 2019-09-10 2022-02-03 라온피플 주식회사 Method and apparatus for performing machine learning and test on plurality of images
US20220343640A1 (en) 2019-09-17 2022-10-27 Syntegon Technology K.K. Learning process device and inspection device
JP2021082154A (en) * 2019-11-21 2021-05-27 オムロン株式会社 Model generating device, estimating device, model generating method, and model generating program
KR102386867B1 (en) * 2019-12-02 2022-04-15 현대모비스 주식회사 Apparatus and medhod for determining vehicle lamp lighting feeling
JP2021089219A (en) * 2019-12-05 2021-06-10 東洋製罐グループホールディングス株式会社 Image inspection system and image inspection method
JP7457315B2 (en) 2019-12-20 2024-03-28 株式会社トプコン Information processing device, inference model generation method, information processing method, and program
CN111192221B (en) * 2020-01-07 2024-04-16 中南大学 Aluminum electrolysis fire hole image repairing method based on deep convolution generation countermeasure network
JP6885517B1 (en) * 2020-03-17 2021-06-16 株式会社村田製作所 Diagnostic support device and model generation device
US11301724B2 (en) * 2020-04-30 2022-04-12 Robert Bosch Gmbh Semantic adversarial generation based function testing method in autonomous driving
JP6989860B2 (en) * 2020-05-02 2022-01-12 Arithmer株式会社 Image inspection equipment, image inspection methods and programs

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017097718A (en) 2015-11-26 2017-06-01 株式会社リコー Identification processing device, identification system, identification method, and program

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017097718A (en) 2015-11-26 2017-06-01 株式会社リコー Identification processing device, identification system, identification method, and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Yundong Li et al,Deformable Patterned Fabric Defect Detection With Fisher Criterion-Based Deep Learning,IEEE Transactions on Automation Science and Engineering,米国,IEEE,2017年04月,VOL14, NO.2,https://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=7398188

Also Published As

Publication number Publication date
JP2019087181A (en) 2019-06-06

Similar Documents

Publication Publication Date Title
JP7074460B2 (en) Image inspection equipment and methods
US10713769B2 (en) Active learning for defect classifier training
CN110945528B (en) Method for generating training set for inspecting semiconductor sample and system thereof
US11645744B2 (en) Inspection device and inspection method
US10049441B2 (en) Iterative defect filtering process
WO2019182922A1 (en) Semi-supervised anomaly detection in scanning electron microscope images
CN109781733A (en) Flaw detection apparatus, defect detecting method and computer readable storage medium
KR20180094121A (en) Accelerate semiconductor-related calculations using a learning-based model
CN114600154B (en) BBP-assisted defect detection procedure for SEM images
US11694327B2 (en) Cross layer common-unique analysis for nuisance filtering
US20200402221A1 (en) Inspection system, image discrimination system, discrimination system, discriminator generation system, and learning data generation device
US11686689B2 (en) Automatic optimization of an examination recipe
JP2008262331A (en) Object tracking device and object tracking method
US20160110857A1 (en) Dynamic Binning for Diversification and Defect Discovery
KR20210067606A (en) Apparatus and method for defect classification using feature generation based on machine-learning
TWI763451B (en) System, method, and non-transitory computer readable medium utilizing automatic selection of algorithmic modules for examination of a specimen
CN116485796B (en) Pest detection method, pest detection device, electronic equipment and storage medium
KR20180063869A (en) Method, apparatus and computer program stored in computer readable medium for state decision of image data
CN115620083A (en) Model training method, face image quality evaluation method, device and medium
JP7206892B2 (en) Image inspection device, learning method for image inspection, and image inspection program
JP2020067954A (en) Information processing device, information processing method, and program
CN117726627B (en) Chip surface defect detection method and equipment
US11967060B2 (en) Wafer level spatial signature grouping using transfer learning
US11361424B2 (en) Neural network-type image processing device, appearance inspection apparatus and appearance inspection method
WO2023166773A1 (en) Image analysis system, image analysis method, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200911

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210903

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210921

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20211117

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220512

R150 Certificate of patent or registration of utility model

Ref document number: 7074460

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150