JP2019087181A - Device and method for image inspection - Google Patents

Device and method for image inspection Download PDF

Info

Publication number
JP2019087181A
JP2019087181A JP2017217004A JP2017217004A JP2019087181A JP 2019087181 A JP2019087181 A JP 2019087181A JP 2017217004 A JP2017217004 A JP 2017217004A JP 2017217004 A JP2017217004 A JP 2017217004A JP 2019087181 A JP2019087181 A JP 2019087181A
Authority
JP
Japan
Prior art keywords
image
unit
learning
feature amount
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.)
Granted
Application number
JP2017217004A
Other languages
Japanese (ja)
Other versions
JP7074460B2 (en
Inventor
智樹 細居
Tomoki Hosoi
智樹 細居
友哉 中澤
Tomoya Nakazawa
友哉 中澤
貴弘 茂木
Takahiro Mogi
貴弘 茂木
鉄也 田原
Tetsuya Tawara
鉄也 田原
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

Abstract

To provide an image inspection device that can automatically learn the feature amount of an image of an inspection target even if there are no defective items or less items in the inspection targets.SOLUTION: An image inspection device 1 includes: a feature amount learning unit 42 for learning a neural network based on a learning image including an inspection target and constructing the learned neural network, which outputs the feature amount of the learning image; a discriminator learning unit 43 for generating, by learning, a discriminator for determining whether the inspection target is defective, on the basis of the feature amount of the learning image output from the learned neural network; a feature amount calculation unit 51 for inputting a determination image including the inspection target into the learned neural network and outputting the feature amount of the determination image; and an identification unit 52 for determining whether the inspection target is defective by inputting the feature amount of the determination image output from the feature amount calculation unit 51 into the discriminator generated by the discriminator learning unit 43.SELECTED DRAWING: Figure 2

Description

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

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

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

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

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

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

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

このようなニューラルネットワークに基づく画像検査手法の特徴は、画像の特徴量が学習によって自動で獲得されることにある。前述したように、特許文献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 based on the knowledge of the designer. Although the feature amount greatly affects the performance of the image inspection, the appropriate feature amount differs depending on the inspection target. Therefore, it has been considered that the design of feature quantities is difficult unless it is an expert in image processing and image inspection.

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

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

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

その理由として、一般的に、ニューラルネットワークの教師あり学習は、ニューラルネットワークの出力が教師と異なる場合、すなわち誤った出力の場合に進行するようになっている。最初のうちは誤判定が多いが、それにより学習が進み、段々と誤判定が減り、最後は良否を正しく判定できるようになるというのが通常の学習プロセスである。   The reason is that, in general, supervised learning of a neural network proceeds in the case where the output of the neural network is different from the teacher, ie, in the case of an incorrect output. Although there are many false positives at the beginning, it is the normal learning process that learning advances and the false negatives decrease gradually and the final judgment becomes correct.

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

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

特開2017−174039号公報JP, 2017-174039, A 特開2016−99707号公報JP, 2016-99707, A 特開2008−310700号公報JP 2008-310700 A

松尾 豊 著「人工知能は人間を超えるか ディープラーニングの先にあるもの」,角川EPUB選書,2015年3月発行Yu Matsuo "Artificial Intelligence Beyond Humans? Things Beyond Deep Learning", Kadokawa EPUB Selected Book, 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 Generative Adversalial Networks, ICLR 2016 (arXiv: 1511.06434) Diederik P.Kingma et al.:Auto−Encoding Variational Bayes(arXiv:1312.6114)Diederik P. 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)Jost Tobias Springenberg et al. : Striving for Simplicity: 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. ICDM ‘08. Eighth IEEE International Conference 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 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) 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 networks, 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 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)

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

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

上述した課題を解決するために、本発明に係る画像検査装置は、検査対象の良否を画像によって検査する画像検査装置であって、前記検査対象を含む学習用画像に基づいてニューラルネットワークの学習を行い、前記学習用画像を復元できる特徴量を出力する学習済みのニューラルネットワークを構築する特徴量学習部と、前記特徴量学習部の学習完了後、前記学習済みのニューラルネットワークが出力した前記学習用画像の前記特徴量に基づいて、前記検査対象の良否を判定する識別器を学習により生成する識別器学習部と、前記検査対象を含む判定用画像を前記学習済みのニューラルネットワークに入力し、前記判定用画像の特徴量を出力する特徴量算出部と、前記特徴量算出部が出力した前記判定用画像の前記特徴量を、前記識別器学習部によって生成された前記識別器に入力して、前記検査対象の良否の判定を行う識別部とを備えることを特徴とする。   In order to solve the problems described above, an image inspection apparatus according to the present invention is an image inspection apparatus which inspects the quality of an inspection object by an image, and learning of a neural network based on a learning image including the inspection object. And a feature amount learning unit for constructing a learned neural network that outputs a feature amount capable of restoring the learning image, and the learning output from the learned neural network after the learning of the feature amount learning unit is completed. A classifier learning unit that generates a classifier that determines whether the inspection object is good or bad based on the feature amount of the image by learning, a determination image including the inspection object is input to the learned neural network, and A feature amount calculation unit for outputting a feature amount of the determination image, and the feature amount of the determination image output from the feature amount calculation unit Enter the discriminator generated by section, characterized in that it comprises an identification unit for judging quality of said object.

また、本発明に係る画像検査装置において、前記特徴量学習部は、前記学習用画像を入力画像として記憶する第1の入力画像記憶部と、前記入力画像を入力として、前記入力画像の特徴量を出力する第1の畳み込みニューラルネットワーク演算部と、前記第1の畳み込みニューラルネットワーク演算部が出力した前記入力画像の前記特徴量を入力として、前記入力画像と同一の大きさの画像を出力する逆畳み込みニューラルネットワーク演算部と、前記逆畳み込みニューラルネットワーク演算部から出力された前記画像を出力画像として記憶する出力画像記憶部と、前記入力画像と前記出力画像との差異を算出する画像差異算出部と、前記差異が、算出された値より小さくなるように前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部それぞれのパラメータの値を更新する特徴量算出設定更新部と、前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部それぞれの前記パラメータの値を記憶する特徴量算出設定記憶部と、を備え、前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部は、前記特徴量算出設定記憶部に記憶されている前記パラメータの値を用いてそれぞれ演算を行い、前記特徴量算出設定記憶部は、更新された前記パラメータの値を記憶し、前記第1の畳み込みニューラルネットワーク演算部は、更新された前記パラメータの値を用いて、すべての前記学習用画像それぞれの前記特徴量を出力してもよい。   Further, in the image inspection apparatus according to the present invention, the feature amount learning unit is a first input image storage unit that stores the learning image as an input image, and the feature amount of the input image using the input image as an input. A first convolutional neural network computing unit for outputting the first and second feature quantities of the input image output from the first convolutional neural network computing unit as an input and outputting an image of the same size as the input image A convolutional neural network operation unit; an output image storage unit which stores the image output from the deconvolution neural network operation unit as an output image; and an image difference calculation unit which calculates a difference between the input image and the output image The first convolutional neural network operation unit such that the difference is smaller than a calculated value A feature amount calculation setting updating unit for updating the value of each parameter of the deconvoluted neural network operation unit, and a feature for storing the value of the parameter of each of the first convolutional neural network operation unit and the deconvoluted neural network operation unit An amount calculation setting storage unit, and the first convolutional neural network calculation unit and the deconvolution neural network calculation unit respectively calculate using the value of the parameter stored in the feature quantity calculation setting storage unit And the feature amount calculation setting storage unit stores the updated value of the parameter, and the first convolutional neural network operation unit uses the updated value of the parameter for all the learning The feature amount of each image may be output.

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

また、本発明に係る画像検査装置において、前記識別器学習部は、前記特徴量学習部が出力した前記学習用画像の前記特徴量を入力する第1の特徴量入力部と、前記学習用画像の前記特徴量を入力として、教師なし学習を行い前記識別器を生成する識別演算教師なし学習部と、を備え、前記識別演算教師なし学習部は、前記識別器を、アイソレーションフォレスト、One−Classサポートベクターマシン、部分空間法、Local Outlier Factor、統計的検定のうちのいずれかの手法で学習してもよい。   In the image inspection apparatus according to the present invention, the classifier learning unit may be a first feature input unit for inputting the feature of the learning image output by the feature learning unit, and the learning image. And an unsupervised learning unit that performs unsupervised learning and generates the discriminator, the unsupervised learning unit performing the unsupervised learning by using the discriminator as an isolation forest, One- It may be learned by any of 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 is a second feature amount input unit for inputting the feature amount of the determination image output by the feature amount calculation unit; The image processing apparatus may further include a discrimination operation unit that determines the quality of the inspection object using the classifier generated by the discrimination operation unsupervised learning unit with the feature amount as an input.

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

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

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

また、本発明に係る画像検査装置において、さらに前記学習用画像を取得する第1の画像取得部と、前記判定用画像を取得する第2の画像取得部とを有する画像取得部を備えていてもよい。   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. It is also good.

また、本発明に係る画像検査方法は、検査対象を含む学習用画像に基づいてニューラルネットワークの学習を行い、前記学習用画像の特徴量を出力する学習済みのニューラルネットワークを構築する特徴量学習ステップと、前記学習済みのニューラルネットワークが出力した前記学習用画像の前記特徴量に基づいて、前記検査対象の良否を判定する識別器を学習により生成する識別器学習ステップと、前記検査対象を含む判定用画像を前記学習済みのニューラルネットワークに入力し、前記判定用画像の特徴量を出力する特徴量算出ステップと、前記特徴量算出ステップで出力した前記判定用画像の前記特徴量を、前記識別器学習ステップで生成された前記識別器に入力して、前記検査対象の良否の判定を行う識別ステップとを備えることを特徴とする。   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 learned neural network that outputs the feature amount of the learning image. And a discriminator learning step of generating a discriminator for judging whether the inspection object is good or bad based on the feature amount of the image for learning output from the learned neural network, and determining the inspection object. For the feature amount calculating step of inputting the learning image to the learned neural network and outputting the feature amount of the determination image, and the feature amount of the determination image output in the feature amount calculating step, the discriminator Providing an identification step of determining whether the inspection object is good or bad by inputting to the identifier generated in the learning step; And butterflies.

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

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

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

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

しかし、畳み込み層と全結合層との2つの部分を一体として学習することは必ずしも必要ではないといえる。まず、検査対象の画像の特徴量を抽出する畳み込み層の学習においては、検査対象の画像が良品を示す画像であるか不良品を示す画像であるかという区別は必ずしも必要でない。また、畳み込み層を全結合層から切り離して学習することは可能である。   However, it can be said that it is not always necessary to learn two parts of the convolutional layer and the total joint layer as one. First, in learning of the convolutional 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 indicating a non-defective item or an image indicating a non-defective item. It is also possible to learn the convolutional layer separately from all the coupled layers.

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

上記のような手法を用いれば、不良品が無い場合、または不良品の数が少ない場合でも、検査対象の画像の特徴量を自動で学習する画像検査装置を実現することができる。以下、本発明に係る画像検査装置に用いられる、画像の特徴量を抽出する畳み込み層と、検査対象の良否を判定する識別器のそれぞれについてより詳しく説明する。   By using the method as described above, it is possible to realize an image inspection apparatus that automatically learns the feature amount of the image to be inspected even when there is no defective product or when the number of defective products is small. Hereinafter, each of the convolution layer used to extract the feature amount of the image and the classifier that determines 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などに記載されており、未知の良品や不良品の画像にも適応できるという効果が期待できる。   With regard to the learning of the convolutional layer for extracting the feature value, the inspection object can be checked by using a method such as an auto encoder, an variational auto encoder, or a generative adaptive networks. Even if there are no or few defective images of the above, it is possible to learn the feature amount of the image by unsupervised learning. In particular, it is described in Non-Patent Documents 2 and 3 etc. that the variational self-coder and the hostile generation network have the ability to generate an image not included in the image used at the time of learning. The effect of being able to adapt to the image of a defective product can be expected.

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

全結合層からなるニューラルネットワークは、良品および不良品の両方の画像を多く用いて学習する必要があるのに対し、上記の手法では、検査対象の良品画像だけ、または不良品画像の数がごく少ない状況でも、画像の特徴量を学習して識別器を構築できる。そのため、本発明で想定しているような、検査対象の不良品が無い、または少ない状況においても検査対象の画像検査を行うことができる。   The neural network consisting of all connection layers needs to learn by using many images of both good and bad products, whereas with the above method, only the number of good images to be inspected or the number of bad images is extremely small. Even in a small number of situations, a classifier can be constructed by learning feature quantities of an image. Therefore, it is possible to perform the image inspection of the inspection target even in a situation where there are 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 common to the respective drawings are denoted by the same reference numerals.

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

[画像検査装置全体の機能ブロック]
画像検査装置1は、撮像部2と、画像取得部3と、学習部4と、判定部5とを備える。画像検査装置1は、その機能を大きく分けると、検査対象である製品などの画像の特徴量を学習する学習部4と、学習後に、検査対象の良否を判定する判定部5とを含む。
[Function block of the whole image inspection device]
The image inspection apparatus 1 includes an imaging unit 2, an image acquisition unit 3, a learning unit 4, and a determination unit 5. Image inspection apparatus 1 includes a learning unit 4 that learns feature amounts of an image of a product to be inspected and the like, and a determination unit 5 that determines the quality of the inspection object after learning, when the function is roughly divided.

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

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

学習部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 classifier learning unit 43. The learning unit 4 learns a large number of images of the product to be inspected which is photographed by the imaging unit 2 and determines the operation content so that the determination unit 5 can correctly determine the quality of the inspection object.
The image storage unit 41 stores a plurality of learning images used by the learning unit 4.

特徴量学習部42は、学習用画像に基づいてニューラルネットワークの学習を行い、検査対象の画像の特徴量を出力する学習済みのニューラルネットワークを構築する。また、特徴量学習部42は、学習用画像を学習済みのニューラルネットに入力して、学習用画像の特徴量を出力する。   The feature amount learning unit 42 learns a neural network based on the image for learning, and constructs a learned 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 learned neural network, and outputs the feature amount of the learning image.

特徴量学習部42は、検査対象の画像をより少ない情報の特徴量に圧縮するような演算を学習により獲得する。特徴量学習部42は、ニューラルネットワークの学習として自己符号化器に基づいた教師なし学習を行い、前述した畳み込み層による特徴量の学習を実現する。なお、特徴量学習部42の詳細は後述する。   The feature amount learning unit 42 obtains, by learning, an operation that compresses an image to be inspected into a feature amount of less information. The feature amount learning unit 42 performs unsupervised learning based on a self-coder as learning of a neural network, and realizes the learning of the feature amount 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 classifier learning unit 43 generates, by learning, a classifier that determines the quality of the inspection target based on the feature amount of the learning image output from the feature amount learning unit 42. In the present embodiment, the classifier learning unit 43 performs unsupervised learning to learn a classifier. The classifier generated by learning is used by the classification 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 object 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 to the learned 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 from the feature amount calculation unit 51 to the classifier generated by the classifier 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, for example, or sends the result to a manufacturing apparatus of a product to be inspected. The determination result output by the output unit 53 is used for sorting out defective products.

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

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

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

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

また、図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-coder. The hostile generation network is a neural network that generates an image called a generator (hereinafter referred to as "Generator") and a classifier called a discriminator (hereinafter referred to as "Discriminator"). And a neural network that determines whether the image is a generated image.

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

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

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

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

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

[特徴量学習部および特徴量算出部の機能ブロック]
図5は、特徴量学習部42および特徴量算出部51の機能ブロック図である。前述したように、特徴量学習部42は、検査対象の画像をより少ない情報の特徴量に圧縮するような畳み込みニューラルネットワークを有する自己符号化器を、学習によって構築する。特徴量算出部51は、特徴量学習部42によって構築された学習済みの畳み込みニューラルネットワークを用いて、判定用画像の特徴量を算出する。
[Function block of feature amount learning unit and feature amount calculating unit]
FIG. 5 is a functional block diagram of the feature amount learning unit 42 and the feature amount calculating unit 51. As described above, the feature quantity learning unit 42 constructs a self-coder having a convolutional neural network by learning so as to compress an image to be examined into feature quantities of less information. The feature quantity calculation unit 51 calculates the feature quantity of the determination image using the trained convolutional neural network constructed by the feature quantity 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 pre-processing unit 422, a convolutional neural network operation unit (hereinafter referred to as "convolution NN operation unit") 423, a feature amount storage unit 424, Deconvoluted neural network operation unit (hereinafter referred to as "deconvoluted NN operation unit") 425, output image storage unit 426, feature value calculation setting storage unit 427, image difference calculation unit 428, feature value 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 operation unit 513, a feature amount calculation setting storage unit 514, and a feature amount output unit 515.

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

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

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

畳み込みNN演算部423は、このような畳み込み演算を複数回繰り返すことで、元の入力画像を、そのピクセル数よりも少ないピクセル数を示す潜在変数に変換する。この潜在変数が、検査対象の画像の特徴を定量化した特徴量として求められる。   The convolutional NN operation 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 convolution operation a plurality of times. This latent variable is obtained as a feature that quantifies features of the image to be examined.

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

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

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

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

逆畳み込みNN演算部425は、畳み込みNN演算部423が出力した入力画像の特徴量を入力として、入力画像と同一の大きさの画像を出力する。より詳細には、逆畳み込みNN演算部425は、特徴量算出設定記憶部427に記憶されているニューラルネットワークのパラメータの値を用いて、畳み込みNN演算部423による畳み込みニューラルネットワーク演算と逆の演算を行う。逆畳み込みNN演算部425は、逆畳み込みニューラルネットワーク演算を複数回行い、画像の特徴量が入力画像記憶部421に記憶されていた画像と同じサイズの画像になるまで演算を行う。   The deconvoluted NN operation unit 425 receives the feature amount of the input image output from the convolutional NN operation unit 423 and outputs an image having the same size as the input image. More specifically, the deconvoluted NN operation unit 425 uses the values of the neural network parameters stored in the feature amount calculation setting storage unit 427 to perform the inverse operation of the convolutional neural network operation by the convolution NN operation unit 423. Do. The deconvoluted NN operation unit 425 performs the deconvolution neural network operation a plurality of times, and performs the operation 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に記憶される。   The deconvoluted neural network constituting the deconvoluted NN operation unit 425 may use a network structure in which the convolutional neural network constituting the convolutional NN operation unit 423 is transposed. In addition, for the deconvoluted neural network operation by the deconvoluted NN operation unit 423, for example, a known operation method described in Non-Patent Document 2 or a known software framework described above may be used. The operation result of the last stage of the deconvoluted neural network by the deconvoluted NN operation unit 423 is stored in an output image storage unit 246 described later.

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

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

画像差異算出部428は、入力画像記憶部421に記憶されている入力画像(学習用画像)と、その入力画像に対応する、出力画像記憶部426に記憶されている出力画像との差異を算出する。   The image difference calculation unit 428 calculates the difference between the input image (the 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 quantity calculation setting update unit 429 is a parameter of the parameters of the convolutional neural network used by the convolutional NN operation unit 423 and the deconvoluted neural network used by the deconvoluted NN operation unit 425 stored in the feature amount calculation setting storage unit 427. Update the value When using a hostile generation network as the network, the values of the parameters of the neural network are updated based on the determination result of the Discriminator.

なお、ニューラルネットワークにおけるパラメータの値の更新方法については、逆誤差伝搬法(バックプロパゲーション)など公知の方法を用いればよい。また、特徴量算出設定更新部429によるニューラルネットワークのパラメータの更新は、学習対象となる入力画像が1枚入力される度に行ってもよく、ある程度まとまった枚数が蓄積されてから行ってもよい。   As a method of updating parameter values in the neural network, a known method such as back propagation may be used. Also, updating of the parameters of the neural network by the feature value calculation setting updating unit 429 may be performed each time one input image to be learned is input, or may be performed after the number of sheets collected to some extent is 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 quantity output unit 430 outputs feature quantities corresponding to all the learning images calculated by the convolutional NN calculation unit 423 using the values of the updated parameters 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 the determination image captured by the imaging unit 2 and acquired by the image acquisition unit 3.

前処理部512は、特徴量学習部42が有する前処理部422と同様の機能を有し、入力画像記憶部511に記憶されている判定用画像の前処理を必要に応じて行う。前処理部512は、判定用画像を前処理し、良否判定がしやすいように加工する。なお、特徴量学習部42が有する前処理部422と同様に、前処理部512は省略してもよいが、前処理部512を設けることで特徴量算出部51における判定精度の向上を図ることができる場合がある。   The preprocessing unit 512 has the same function as the preprocessing unit 422 included in the feature amount learning unit 42, and performs preprocessing of the determination image stored in the input image storage unit 511 as necessary. The pre-processing unit 512 pre-processes 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, provision of the preprocessing unit 512 improves the determination accuracy of the feature amount calculation unit 51. There are times when you can.

畳み込みNN演算部513は、特徴量学習部42が有する畳み込みNN演算部423と同じ構成を有する。また、畳み込みNN演算部513は、特徴量算出設定記憶部514に保存されている畳み込みニューラルネットワークのパラメータの更新値に従って、判定用画像を入力として、判定用画像の特徴量を出力する。なお、畳み込みNN演算部513は、特徴量学習部42の学習処理が完了したときの畳み込みNN演算部423と同じ演算を行う。   The convolutional NN operation unit 513 has the same configuration as the convolutional NN operation unit 423 which the feature amount learning unit 42 has. Further, the convolutional NN operation unit 513 receives 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, and outputs the feature amount of the determination image. The convolutional NN operation unit 513 performs the same operation as the convolutional NN operation 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 values of parameters of the convolutional neural network in the convolutional NN operation 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 value 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 operation by the convolutional NN operation 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で用いられ、検査対象の良否を判定する。
[Function block of classifier learning unit and classifier]
FIG. 6 is a functional block diagram of the classifier learning unit 43 and the discrimination unit 52. The classifier learning unit 43 includes a feature amount input unit 431, a dimension reduction unit 432, and a classification operation unsupervised learning unit 433. The identification unit 52 further includes a feature amount input unit 521, a dimension reduction unit 522, and an identification operation unit 523. As described above, the classifier generated by the classifier learning unit 43 is used by the classification unit 52 to determine whether the inspection target is good or bad.

まず、識別器学習部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 amounts 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 reducing unit 432 performs an operation to reduce the dimension of the feature amount of the image while preventing the information amount of the feature amount in the learning image input to the feature amount input unit 431 as much as possible. The dimension reduction unit 432 compresses the dimensions of the feature amount of the image into fewer dimensions using, for example, a known method such as principal component analysis.

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

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

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

識別演算教師なし学習部433は、公知の教師なし学習手法として、例えば、アイソレーションフォレスト、One−Class SVM、部分空間法、LOFなどの手法を用いればよい。なお、アイソレーションフォレストの例としては、非特許文献5に記載されている手法を用いればよい。部分空間法の例としては、非特許文献6に記載されている手法を用いればよい。LOFの例としては、非特許文献7に記載されている手法を用いればよい。   The discrimination calculation unsupervised learning unit 433 may use, for example, a method such as isolation forest, One-Class SVM, subspace method, LOF, or the like as a known unsupervised learning method. Note that 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 of 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 that the classifier learning unit 43 has. 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 that the classifier learning unit 43 has. Note that it is necessary to use completely the same calculation method in the dimension reduction unit 432 of the classifier learning unit 43 and the dimension reduction unit 522 of the identification unit 52.

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

[画像検査装置のハードウェア構成]
図7は、本実施の形態に係る画像検査装置1のハードウェア構成を示すブロック図である。画像検査装置100は、バス101を介して接続される制御部102、通信制御装置105、撮像装置106、記憶装置107、および表示装置108を備えるコンピュータと、これらのハードウェア資源を制御するプログラムによって実現することができる。
[Hardware configuration of the image inspection apparatus]
FIG. 7 is a block diagram showing the hardware configuration of the image inspection apparatus 1 according to the present embodiment. Image inspection apparatus 100 includes a computer including control unit 102, communication control device 105, imaging device 106, storage device 107, and display device 108 connected via 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. In the main storage unit 104, programs for the CPU 103 to perform various controls and calculations are stored in advance. The control unit 102 implements the functions of the image inspection apparatus 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 making a network connection between the image inspection apparatus 100 and various external electronic devices.
The imaging device 106 may convert the light signal to an image signal to generate a still image. More specifically, the imaging device 106 includes an imaging element such as a CCD (Charge-Coupled Device) image sensor or a CMOS image sensor, and forms an image of light incident from an imaging area on a light receiving surface. , Convert to electrical signals.

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

画像保存部107aは、学習部4が有する画像保存部41として機能し、学習用画像を保存する。
入力画像記憶部107bは、特徴量学習部42の入力画像記憶部421、および特徴量算出部51の入力画像記憶部511として機能する。
The image storage unit 107 a functions as the image storage unit 41 included in the learning unit 4 and stores the learning image.
The input image storage unit 107 b 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 value of the neural network parameter.
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 amounts 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 an output image storage unit 426 of the feature amount learning unit 42, and stores an output image of the calculation result of the deconvoluted NN calculation unit 425.
The program storage unit 107f stores various programs for executing processes necessary for image inspection, such as learning processing by the learning unit 4 in the present embodiment and determination processing by the determination unit 5.

表示装置108は、画像検査装置1の出力部53として機能する。表示装置108は、液晶ディスプレイなどにより実現される。   The display device 108 functions as the output unit 53 of the image inspection apparatus 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 apparatus]
Next, the operation of the image inspection apparatus 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 separately described. In the learning process, the feature quantity learning process by the feature quantity learning unit 42 and the classifier unsupervised learning process by the classifier learning unit 43 will be separately described. In the determination process, the feature quantity calculation process by the feature quantity calculation unit 51 and the determination output process by the identification unit 52 will be separately described.

[特徴量学習処理]
まず、特徴量学習部42による特徴量学習処理について、図8のフローチャートを参照して説明する。まず、撮像部2によって、検査対象が含まれている学習用画像が撮影される(ステップS100)。画像取得部3は、撮影された画像を取得する。取得された学習用画像は、画像保存部41に保存される。入力画像記憶部421は、画像取得部3によって取得された学習用画像を画像保存部41から読み出して記憶する(ステップS101)。
[Feature amount learning process]
First, feature amount learning processing by the feature amount learning unit 42 will be described with reference to the flowchart in FIG. First, a learning image including an examination target is captured by the imaging unit 2 (step S100). The image acquisition unit 3 acquires a captured image. The acquired learning image is stored in the image storage unit 41. The input image storage unit 421 reads out 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, with the learning image stored in the input image storage unit 421 as an input image, the convolutional NN calculation unit 423 performs convolutional neural network calculation a plurality of times, and outputs the feature amount of the input image (step S102). More specifically, the convolutional NN operation unit 423 performs an operation using the values of the parameters stored in the feature value calculation setting storage unit 427. Note that the preprocessing unit 422 may perform preprocessing such as normalization of luminance in advance for an input image (learning image) input to the convolutional NN operation unit 423.

畳み込みNN演算部423から出力された入力画像の特徴量は、特徴量記憶部424に記憶される(ステップS103)。次に、逆畳み込みNN演算部425は、特徴量記憶部424に記憶されている入力画像の特徴量を入力として、逆畳み込みニューラルネットワーク演算を実行する(ステップS104)。   The feature amount of the input image output from the convolutional NN operation unit 423 is stored in the feature amount storage unit 424 (step S103). Next, the deconvoluted NN operation unit 425 executes deconvolution neural network operation with 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 deconvoluted NN operation unit 425 performs the inverse operation to the convolutional neural network operation by the convolutional NN operation unit 423 multiple times using the values of the parameters stored in the feature value calculation setting storage unit 427. .

また、逆畳み込みNN演算部425は、算出される特徴量が、入力画像記憶部421に記憶されていた入力画像と同じサイズの画像になるまで演算を行う。逆畳み込みNN演算部425により復元された画像は出力画像として出力画像記憶部426に記憶される。   In addition, the deconvoluted NN operation unit 425 performs the operation 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 deconvoluted 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, when the difference between the input image and the output image calculated by the image difference calculating unit 428 is not sufficiently small (step S106: NO), the feature amount calculation setting updating unit 429 stores the feature amount calculation setting storage. The values of the parameters of the convolutional neural network stored in the unit 427 are updated (step S107). The feature value calculation setting update unit 429 may update the values of the parameters of the convolutional neural network using, for example, a known method such as back propagation.

更新された畳み込みニューラルネットワークのパラメータの値は、特徴量算出設定記憶部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 value calculation setting storage unit 427. Thereafter, the convolutional NN operation unit 423 performs the convolutional neural network operation again using the updated parameter value (step S102). Thereafter, the calculation result is stored as the feature amount of the input image (learning image) (step S103). Then, the deconvoluted NN operation unit 425 performs deconvoluted neural network operation, restores the image to obtain 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 again the difference between the input image and the output image (step S105), and if the difference is sufficiently small (step S106: YES), the convolution NN calculation unit 423 immediately 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 processing from step S102 to step S107 several times. The convolutional NN operation unit 423 when the difference between the input image and the output image is sufficiently small functions as the feature quantity extractor (learned convolutional neural network) described in FIGS. 3 and 4.

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

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

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

[識別器教師なし学習処理]
次に、識別器学習部43による識別器の教師なし学習処理について、図9のフローチャートを参照して説明する。まず、特徴量入力部431は、特徴量学習部42の特徴量出力部430から送信された学習用画像の特徴量を受信する(ステップS110)。
[Classifier unsupervised learning process]
Next, unsupervised learning processing of the classifier by the classifier learning unit 43 will be described with reference to the flowchart in 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 reducing unit 432 performs an operation to reduce the dimension while preventing the information amount of the feature amount of the received image from being reduced (step S111). The dimension reduction unit 432 compresses the received image into feature quantities with fewer dimensions using, for example, a known method such as principal component analysis.

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

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

[特徴量算出処理]
次に、判定部5が有する特徴量算出部51による特徴量算出処理について、図10のフローチャートを参照して説明する。まず、画像取得部3から受信された判定用画像は、入力画像記憶部511に記憶される(ステップS114)。
[Feature amount calculation processing]
Next, feature amount calculation processing by the feature amount calculation unit 51 included in the determination unit 5 will be described with reference to the flowchart in 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 operation unit 513 reads the values of the parameters of the learned convolutional neural network stored in the feature amount calculation setting storage unit 514 (step S115). Thereafter, the convolutional NN operation unit 513 performs convolutional neural network operation using the read parameter value and the determination image stored in the input image storage unit 511 as an input (step S116). The convolutional NN operation unit 513 has the same configuration as the convolutional NN operation 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 quantity calculation unit 51 calculates the feature quantity of the determination image using the values of the parameters of the learned convolutional neural network obtained by the feature quantity learning processing by the feature quantity learning unit 42. .

[判定出力処理]
次に、判定部5が有する識別部52および出力部53による判定出力処理について、図11のフローチャートを参照して説明する。まず、識別部52の特徴量入力部521には、判定部5が有する特徴量算出部51の特徴量出力部515から出力される、判定用画像の特徴量が入力される(ステップS118)。
Judgment output processing
Next, determination output processing by the identification unit 52 and the output unit 53 that the determination unit 5 has will be described with reference to the flowchart in 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 dimension compression of the input feature amount (step S119). After that, the discrimination operation unit 523 is generated by learning processing by the discrimination operation unsupervised learning unit 433 of the discriminator learning unit 43 with the feature amount in the dimension-compressed image for judgment output from the dimension reduction unit 522 as an input. It is determined whether the inspection object is good or bad using a classifier (step S120).

そして、識別演算部523による判定結果は、出力部53から出力される(ステップS121)。より詳細には、出力部53は、例えば、液晶ディスプレイなどの表示画面に判定結果を表示したり、検査対象の製品を製造する装置に判定結果を送信する。このように、検査対象の良否についての判定結果が出力部53から出力されることによって、不良品の選別などに利用される。   Then, the determination result by the identification operation 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, for example, or transmits the determination result to an apparatus that manufactures a product to be inspected. As described above, when the determination result on the quality of the inspection object is output from the output unit 53, it is used for sorting out defective products.

このように、識別部52は、識別器学習部43が学習処理で生成した識別器を用いて、検査対象の良否の判定を行う。そして、出力部53は、識別部52による判定結果を出力する。   As described above, the identification unit 52 determines the quality of the inspection target using the classifier generated by the classifier 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 apparatus 1 generates the unsupervised learning of the convolutional layer that extracts the feature amount of the image and the classifier that determines the quality of the inspection target. And unsupervised learning separately. Thus, the image inspection apparatus can automatically learn the feature amount of the image to be inspected even if there is no defective product image to be inspected or if the quality is not distinguished in the learning image. can get.

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

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

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

[識別器の調整パラメータ]
第1の実施の形態で説明した上記の各種識別器は、通常、検査対象の良否の判定に関わるパラメータ(以下、「調整パラメータ」という。)を持っている。例えば、統計的検定を用いた手法では、有意水準を変えると良品と不良品との境界が変わる。第1の実施の形態で挙げた手法による識別器も、そのような調整パラメータを有する。図13の矢印に示すように、識別器の調整パラメータを調整することで良品と不良品との境界を調整することができる。なお、図13において、「白丸」は検査対象の良品画像の特徴量を示す。また、「バツ」は、検査対象の不良品画像の特徴量を示す。
Discriminator adjustment parameters
The above-described 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 object. For example, in the method using a statistical test, changing the significance level changes the boundary between good and bad products. The classifier according to the method described in the first embodiment also has such adjustment parameters. As shown by the arrows in FIG. 13, the boundary between the non-defective product and the non-defective product can be adjusted by adjusting the adjustment parameter of the identifier. In FIG. 13, “white circle” indicates the feature amount of the non-defective item image to be inspected. Also, “cross” indicates the feature amount of the defective image to be inspected.

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

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

[画像検査装置の機能ブロック]
次に、第2の実施の形態に係る画像検査装置1Aの機能ブロックについて、図12を参照して説明する。以下、第1の実施の形態と異なる構成要素である識別器学習部43および識別器調整部44を中心に説明する。
[Function block of image inspection device]
Next, functional blocks 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 adjustment unit 44 which are components different from those of the first embodiment will be mainly described.

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

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

[パラメータ調整処理]
次に、識別器の調整パラメータを調整するパラメータ調整処理について、図14のフローチャートを参照して説明する。まず、識別器調整部44は、識別器の調整パラメータを所定の値に設定する(ステップS200)。識別器調整部44は、設定した調整パラメータの値を識別器学習部43に入力する。そして、識別演算教師なし学習部433は、設定された調整パラメータの値で識別器を調整する。
[Parameter adjustment process]
Next, parameter adjustment processing for adjusting the adjustment parameter of the classifier will be described with reference to the flowchart of FIG. First, the discriminator adjustment unit 44 sets the adjustment parameter of the discriminator to a predetermined value (step S200). The classifier adjustment unit 44 inputs the set adjustment parameter value to the classifier learning unit 43. Then, the classification operation unsupervised learning unit 433 adjusts the classifier 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 (convoluted NN operation unit 423) is input to the feature amount input unit 431 of the classifier learning unit 43 (step S200). Note that, as necessary, the dimension reducing unit 432 performs dimension compression of the feature amount of the learning image.

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

識別演算教師なし学習部433は、見逃しがなく(ステップS204:YES)、かつ、過剰判定比率がしきい値以下(ステップS205:YES)で受容範囲内と判定した場合には、使用している調整パラメータの値を記憶する(ステップS206)。その後、判定部5の識別部52が、調整後の調整パラメータの値で設定された識別器を用いる。   The discrimination calculation unsupervised learning unit 433 is used when there is no missing (step S204: YES) and when the excess determination ratio is equal to or less than the threshold (step S205: YES) and it is determined that it is within the acceptance range. The value of the adjustment parameter is stored (step S206). Thereafter, the identification unit 52 of the determination unit 5 uses the identifier 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, in the case where there is missed (step S204: NO) and the excess determination ratio is less than or equal to the threshold (step S207: YES), the discriminator adjustment unit 44 is good as described in FIG. The value of the adjustment parameter is changed in the direction in which the ratio determined to be smaller decreases (step S208). Thereafter, the processing from step S201 to step S203 is executed again, and the change of the adjustment parameter is repeated until there is no missing (step S204: YES) and the excess determination ratio becomes equal to or less than the threshold (step S205: YES). .

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

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

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

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

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

[第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 in 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 of the classifier has been described. On the other hand, in the third embodiment, the classifier learning unit 43A includes the classification operation supervised learning unit 435, and generates the classifier by supervised learning in the first and second embodiments. It is different from In the third embodiment, as in the second embodiment, a very small amount of defective images to be inspected for learning exist, and they are labeled and distinguished from non-defective images. Is assumed.

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

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

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

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

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

良否情報入力部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 identification operation supervised learning section 435 is known by using as input the feature amount of the learning image and the information indicating whether the learning image that is the source of the feature amount is an image indicating a non-defective item or an image indicating a non-defective item The classifier is generated by the supervised learning method of

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

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

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

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

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

生成された識別器は、判定部5が有する識別部52の識別演算部523で用いられる。識別演算部523は、教師あり学習で生成された識別器を用いて、判定用画像の特徴量を入力として、検査対象の良否の判定を行う。そして、出力部53は、判定結果を液晶ディスプレイなどの表示画面に表示する。   The generated discriminator is used by the discrimination calculation unit 523 of the discrimination unit 52 of the determination unit 5. The discrimination operation unit 523 determines the quality of the inspection object using the feature amount of the determination image as an input, using the classifier generated by supervised learning. 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 classifier, even if there are only a few defective images to be inspected, the quality of the inspection object can be determined It is possible to learn and generate classifiers that can be determined more correctly.

以上、本発明の画像検査装置および画像検査方法における実施の形態について説明したが、本発明は説明した実施の形態に限定されるものではなく、請求項に記載した発明の範囲において当業者が想定し得る各種の変形を行うことが可能である。   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 those skilled in the art can assume 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 embodiment described above, the case where the imaging 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 The imaging unit 2 and the image acquisition unit 3 may be provided.

また、説明した実施の形態では、学習部4と判定部5とは同一の計算機に実装されている場合について説明したが、学習部4と判定部5とはそれぞれ別々の計算機に実装されていてもよい。   In the embodiment described above, the learning unit 4 and the determination unit 5 are implemented on the same computer, but the learning unit 4 and the determination unit 5 are implemented on separate computers. It is also 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 ... determination unit, 41 ... image storage unit, 42 ... feature amount learning unit, 43 ... classifier 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: imaging device, 107: 107 Storage device, 108 ... display device.

Claims (10)

検査対象の良否を画像によって検査する画像検査装置であって、
前記検査対象を含む学習用画像に基づいてニューラルネットワークの学習を行い、前記学習用画像を復元できる特徴量を出力する学習済みのニューラルネットワークを構築する特徴量学習部と、
前記特徴量学習部の学習完了後、前記学習済みのニューラルネットワークが出力した前記学習用画像の前記特徴量に基づいて、前記検査対象の良否を判定する識別器を学習により生成する識別器学習部と、
前記検査対象を含む判定用画像を前記学習済みのニューラルネットワークに入力し、前記判定用画像の特徴量を出力する特徴量算出部と、
前記特徴量算出部が出力した前記判定用画像の前記特徴量を、前記識別器学習部によって生成された前記識別器に入力して、前記検査対象の良否の判定を行う識別部と
を備えることを特徴とする画像検査装置。
An image inspection apparatus for inspecting the quality of an inspection object by an image,
A feature amount learning unit that constructs a learned neural network that performs learning of a neural network based on a learning image including the inspection target and outputs a feature that can restore the learning image;
A discriminator learning unit that generates a discriminator that determines the quality of the inspection object by learning based on the feature amount of the learning image output by the learned neural network after the learning of the feature amount learning unit is completed. When,
A feature amount calculation unit which inputs a determination image including the inspection target to the learned neural network and outputs a feature amount of the determination image;
An identification unit that inputs the feature amount of the determination image output from the feature amount calculation unit into the identifier generated by the identifier learning unit and determines whether the inspection object is good or bad Image inspection device characterized by
請求項1に記載の画像検査装置において、
前記特徴量学習部は、
前記学習用画像を入力画像として記憶する第1の入力画像記憶部と、
前記入力画像を入力として、前記入力画像の特徴量を出力する第1の畳み込みニューラルネットワーク演算部と、
前記第1の畳み込みニューラルネットワーク演算部が出力した前記入力画像の前記特徴量を入力として、前記入力画像と同一の大きさの画像を出力する逆畳み込みニューラルネットワーク演算部と、
前記逆畳み込みニューラルネットワーク演算部から出力された前記画像を出力画像として記憶する出力画像記憶部と、
前記入力画像と前記出力画像との差異を算出する画像差異算出部と、
前記差異が、算出された値より小さくなるように前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部それぞれのパラメータの値を更新する特徴量算出設定更新部と、
前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部それぞれの前記パラメータの値を記憶する特徴量算出設定記憶部と、
を備え、
前記第1の畳み込みニューラルネットワーク演算部および前記逆畳み込みニューラルネットワーク演算部は、前記特徴量算出設定記憶部に記憶されている前記パラメータの値を用いてそれぞれ演算を行い、
前記特徴量算出設定記憶部は、更新された前記パラメータの値を記憶し、
前記第1の畳み込みニューラルネットワーク演算部は、更新された前記パラメータの値を用いて、すべての前記学習用画像それぞれの前記特徴量を出力する
ことを特徴とする画像検査装置。
In the image inspection apparatus according to claim 1,
The feature quantity learning unit
A first input image storage unit that stores the learning image as an input image;
A first convolutional neural network operation unit that receives the input image and outputs a feature of the input image;
A deconvoluted neural network operation unit that receives an input of the feature amount of the input image output by the first convolutional neural network operation unit, and outputs an image having the same size as the input image;
An output image storage unit which stores the image output from the deconvoluted neural network operation unit as an output image;
An image difference calculation unit that calculates a difference between the input image and the output image;
A feature amount calculation setting update unit that updates the values of the parameters of the first convolutional neural network computing unit and the deconvoluted neural network computing unit such that the difference is smaller than the calculated value;
A feature value calculation setting storage unit for storing values of the parameters of the first convolutional neural network operation unit and the deconvoluted neural network operation unit;
Equipped with
The first convolutional neural network operation unit and the deconvoluted neural network operation unit respectively perform operations using the values of the parameters stored in the feature value calculation setting storage unit,
The feature amount calculation setting storage unit stores the updated value of the parameter,
The image inspection apparatus, wherein the first convolutional neural network operation unit outputs the feature quantities of each of all the learning images using the updated values of the parameters.
請求項2に記載の画像検査装置において、
前記特徴量算出部は、
前記判定用画像を記憶する第2の入力画像記憶部と、
前記特徴量算出設定記憶部に記憶されている更新された前記パラメータの値を用いて、前記判定用画像を入力として、前記判定用画像の前記特徴量を出力する第2の畳み込みニューラルネットワーク演算部と
を備えることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 2,
The feature quantity calculation unit
A second input image storage unit storing the determination image;
A second convolutional neural network computing unit that outputs the feature amount of the determination image using the updated determination parameter stored in the feature amount calculation setting storage unit as an input of the determination image And an image inspection apparatus characterized by comprising.
請求項1から3のいずれか1項に記載の画像検査装置において、
前記識別器学習部は、
前記特徴量学習部が出力した前記学習用画像の前記特徴量を入力する第1の特徴量入力部と、
前記学習用画像の前記特徴量を入力として、教師なし学習を行い前記識別器を生成する識別演算教師なし学習部と、
を備え、
前記識別演算教師なし学習部は、前記識別器を、アイソレーションフォレスト、One−Classサポートベクターマシン、部分空間法、Local Outlier Factor、統計的検定のうちのいずれかの手法で学習する
ことを特徴とする画像検査装置。
The image inspection apparatus according to any one of claims 1 to 3.
The classifier learning unit
A first feature amount input unit that inputs the feature amount of the learning image output from the feature amount learning unit;
A discrimination operation unsupervised learning unit that performs unsupervised learning by using the feature amount of the learning image as input and generates the classifier;
Equipped with
The discrimination operation unsupervised learning unit learns the classifier by any one of an isolation forest, a One-Class support vector machine, a subspace method, a local outlier factor, and a statistical test. Image inspection device.
請求項4に記載の画像検査装置において、
前記識別部は、
前記特徴量算出部が出力した前記判定用画像の前記特徴量を入力する第2の特徴量入力部と、
前記判定用画像の前記特徴量を入力として、前記識別演算教師なし学習部によって生成された前記識別器を用いて、前記検査対象の良否の判定を行う識別演算部と
を備えることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 4,
The identification unit
A second feature amount input unit that inputs the feature amount of the determination image output by the feature amount calculation unit;
And a discrimination operation unit for judging whether the inspection object is good or bad using the discriminator generated by the discrimination operation unsupervised learning unit with the feature amount of the judgment image as an input. Image inspection device.
請求項4または請求項5に記載の画像検査装置において、
前記識別器学習部は前記識別演算教師なし学習部が有する調整パラメータの値を調整する識別器調整部をさらに備え、
前記識別器調整部は、不良品を示す画像と良品を示す画像とが区別されている前記検査対象の画像から算出される特徴量に基づいて前記調整パラメータの値を調整する
ことを特徴とする画像検査装置。
In the image inspection apparatus according to claim 4 or 5,
The discriminator learning unit further includes a discriminator adjustment unit configured to adjust the value of the adjustment parameter of the discriminant calculation unsupervised learning unit,
The discriminator adjustment unit adjusts the value of the adjustment parameter based on a feature value calculated from the image of the inspection target in which an image indicating a defective product and an image indicating a non-defective product are distinguished. Image inspection device.
請求項1から3のいずれか1項に記載の画像検査装置において、
前記識別器学習部は、
前記特徴量学習部が出力した前記学習用画像の前記特徴量を入力する第1の特徴量入力部と、
入力された前記学習用画像の前記特徴量に対応する前記学習用画像の良否を示す情報を入力する良否情報入力部と、
前記学習用画像の前記特徴量および対応する前記学習用画像の前記良否を示す情報を入力として、教師あり学習により前記識別器を生成する識別演算教師あり学習部と、
を備え、
前記識別演算教師あり学習部は、サポートベクターマシン、ランダムフォレスト、ブースティングのうちのいずれかの手法で学習する
ことを特徴とする画像検査装置。
The image inspection apparatus according to any one of claims 1 to 3.
The classifier learning unit
A first feature amount input unit that inputs the feature amount of the learning image output from the feature amount learning unit;
A quality information input unit that inputs information indicating the quality of the learning image corresponding to the feature amount of the input learning image;
A discrimination operation supervised learning unit that generates the discriminator by supervised learning with the feature amount of the learning image and the information indicating the quality of the corresponding learning image as an input;
Equipped with
The image processing apparatus characterized in that the identification arithmetic supervised learning unit learns by any one of a support vector machine, a random forest, and a boosting method.
請求項7に記載の画像検査装置において、
前記識別部は、
前記特徴量算出部が出力した前記判定用画像の前記特徴量を入力する第2の特徴量入力部と、
前記判定用画像の前記特徴量を入力として、前記識別演算教師あり学習部によって生成された前記識別器を用いて、前記検査対象の良否の判定を行う識別演算部と
を備えることを特徴とする画像検査装置。
In the image inspection apparatus according to claim 7,
The identification unit
A second feature amount input unit that inputs the feature amount of the determination image output by the feature amount calculation unit;
And a discrimination operation unit for judging whether the inspection object is good or bad using the discriminator generated by the discrimination operation supervised learning unit with the feature amount of the discrimination image as an input. Image inspection device.
請求項1から8のいずれか1項に記載の画像検査装置において、
さらに前記学習用画像を取得する第1の画像取得部と、前記判定用画像を取得する第2の画像取得部とを有する画像取得部を備えることを特徴とする画像検査装置。
The image inspection apparatus according to any one of claims 1 to 8.
An image inspection apparatus, further comprising: 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 constructing a learned neural network which performs learning of a neural network based on a learning image including an inspection object and outputs a feature amount of the learning image;
A discriminator learning step of generating a discriminator for judging whether the inspection object is good or bad based on the learning based on the feature amount of the image for learning output from the learned neural network;
A feature amount calculating step of inputting a determination image including the inspection target to the learned neural network and outputting a feature amount of the determination image;
An identification step of determining the quality of the inspection object by inputting the feature amount of the determination image output in the feature amount calculation step to the identifier generated in the identifier learning step. Image inspection method characterized by
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 true JP2019087181A (en) 2019-06-06
JP7074460B2 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)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111192221A (en) * 2020-01-07 2020-05-22 中南大学 Aluminum electrolysis fire hole image repairing method based on deep convolution generation countermeasure network
WO2021009986A1 (en) * 2019-07-12 2021-01-21 村田機械株式会社 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
WO2021049721A1 (en) * 2019-09-10 2021-03-18 라온피플 주식회사 Method and device for performing machine learning and testing on plurality of images
WO2021054376A1 (en) 2019-09-17 2021-03-25 シンテゴンテクノロジー株式会社 Learning process device and inspection device
WO2021100482A1 (en) * 2019-11-21 2021-05-27 オムロン株式会社 Model generation device, estimation device, model generation method, and model generation program
JP2021089219A (en) * 2019-12-05 2021-06-10 東洋製罐グループホールディングス株式会社 Image inspection system and image inspection method
KR20210068777A (en) * 2019-12-02 2021-06-10 현대모비스 주식회사 Apparatus and medhod for determining vehicle lamp lighting feeling
JP6885517B1 (en) * 2020-03-17 2021-06-16 株式会社村田製作所 Diagnostic support device and model generation device
JP2021174556A (en) * 2020-04-30 2021-11-01 ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツングRobert Bosch Gmbh Semantic hostile generation based on function test method in automatic driving
JP2021176070A (en) * 2020-05-02 2021-11-04 Arithmer Inc Image inspection apparatus, image inspection method, and program
JP7457315B2 (en) 2019-12-20 2024-03-28 株式会社トプコン Information processing device, inference model generation method, information processing method, and program
US11966219B2 (en) * 2022-03-30 2024-04-23 Honda Motor Co., Ltd. Pseudo defective product data generation method

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, vol. 14, no. 2, JPN6021036002, April 2017 (2017-04-01), US, XP011644955, ISSN: 0004596864, DOI: 10.1109/TASE.2016.2520955 *

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021009986A1 (en) * 2019-07-12 2021-01-21 村田機械株式会社 Image recognition method and image recognition device
JPWO2021009986A1 (en) * 2019-07-12 2021-01-21
WO2021039591A1 (en) * 2019-08-23 2021-03-04 コニカミノルタ株式会社 Assessment standard generation device, assessment device, assessment standard generation program, and assessment program
JPWO2021039591A1 (en) * 2019-08-23 2021-03-04
JP7416071B2 (en) 2019-08-23 2024-01-17 コニカミノルタ株式会社 Judgment device and judgment program
KR102357729B1 (en) * 2019-09-10 2022-02-03 라온피플 주식회사 Method and apparatus for performing machine learning and test on plurality of images
WO2021049721A1 (en) * 2019-09-10 2021-03-18 라온피플 주식회사 Method and device for performing machine learning and testing on plurality of images
KR20210030576A (en) * 2019-09-10 2021-03-18 라온피플 주식회사 Method and apparatus for performing machine learning and test on plurality of images
WO2021054376A1 (en) 2019-09-17 2021-03-25 シンテゴンテクノロジー株式会社 Learning process device and inspection device
WO2021100482A1 (en) * 2019-11-21 2021-05-27 オムロン株式会社 Model generation device, estimation device, model generation method, and model generation program
KR20210068777A (en) * 2019-12-02 2021-06-10 현대모비스 주식회사 Apparatus and medhod for determining vehicle lamp lighting feeling
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
CN111192221A (en) * 2020-01-07 2020-05-22 中南大学 Aluminum electrolysis fire hole image repairing method based on deep convolution generation countermeasure network
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
WO2021186592A1 (en) * 2020-03-17 2021-09-23 株式会社村田製作所 Diagnosis assistance device and model generation device
JP2021174556A (en) * 2020-04-30 2021-11-01 ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツングRobert Bosch Gmbh Semantic hostile generation based on function test method in automatic driving
JP7359802B2 (en) 2020-04-30 2023-10-11 ローベルト ボツシユ ゲゼルシヤフト ミツト ベシユレンクテル ハフツング Semantic adversarial generation based on functional testing methods in autonomous driving
JP2021176070A (en) * 2020-05-02 2021-11-04 Arithmer Inc Image inspection apparatus, image inspection method, and program
WO2021225097A1 (en) * 2020-05-02 2021-11-11 Arithmer株式会社 Image inspection device, image inspection method, and program
US11966219B2 (en) * 2022-03-30 2024-04-23 Honda Motor Co., Ltd. Pseudo defective product data generation method

Also Published As

Publication number Publication date
JP7074460B2 (en) 2022-05-24

Similar Documents

Publication Publication Date Title
JP7074460B2 (en) Image inspection equipment and methods
US10964004B2 (en) Automated optical inspection method using deep learning and apparatus, computer program for performing the method, computer-readable storage medium storing the computer program, and deep learning system thereof
KR101836096B1 (en) Method, apparatus and computer program stored in computer readable medium for state decision of image data
Adriman et al. Performance evaluation of binary classification of diabetic retinopathy through deep learning techniques using texture feature
CN109781733A (en) Flaw detection apparatus, defect detecting method and computer readable storage medium
KR20180094121A (en) Accelerate semiconductor-related calculations using a learning-based model
US11694327B2 (en) Cross layer common-unique analysis for nuisance filtering
US10929978B2 (en) Image processing apparatus, training apparatus, image processing method, training method, and storage medium
US11450012B2 (en) BBP assisted defect detection flow for SEM images
US11170475B2 (en) Image noise reduction using stacked denoising auto-encoder
JP2017224156A (en) Information processing device, information processing method and program
KR20180109658A (en) Apparatus and method for image processing
CN113095370A (en) Image recognition method and device, electronic equipment and storage medium
CN116740728B (en) Dynamic acquisition method and system for wafer code reader
Pramunendar et al. A Robust Image Enhancement Techniques for Underwater Fish Classification in Marine Environment.
KR20210067606A (en) Apparatus and method for defect classification using feature generation based on machine-learning
CN112507981B (en) Model generation method, iris image quality evaluation method and electronic equipment
CN106682604B (en) Blurred image detection method based on deep learning
KR20180063869A (en) Method, apparatus and computer program stored in computer readable medium for state decision of image data
CN116543433A (en) Mask wearing detection method and device based on improved YOLOv7 model
CN116579409A (en) Intelligent camera model pruning acceleration method and acceleration system based on re-parameterization
CN115131503A (en) Health monitoring method and system for iris three-dimensional recognition
CN115620083A (en) Model training method, face image quality evaluation method, device and medium
EP4075343A1 (en) Device and method for realizing data synchronization in neural network inference
Draganova et al. Model of Software System for automatic corn kernels Fusarium (spp.) disease diagnostics

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