JP7118365B2 - Image inspection device - Google Patents
Image inspection device Download PDFInfo
- Publication number
- JP7118365B2 JP7118365B2 JP2019053274A JP2019053274A JP7118365B2 JP 7118365 B2 JP7118365 B2 JP 7118365B2 JP 2019053274 A JP2019053274 A JP 2019053274A JP 2019053274 A JP2019053274 A JP 2019053274A JP 7118365 B2 JP7118365 B2 JP 7118365B2
- Authority
- JP
- Japan
- Prior art keywords
- neural network
- image
- state
- neurons
- neuron
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000007689 inspection Methods 0.000 title claims description 40
- 238000013528 artificial neural network Methods 0.000 claims description 236
- 210000002569 neuron Anatomy 0.000 claims description 111
- 238000000034 method Methods 0.000 claims description 11
- 230000007547 defect Effects 0.000 description 28
- 230000010365 information processing Effects 0.000 description 20
- 230000002159 abnormal effect Effects 0.000 description 12
- 238000004364 calculation method Methods 0.000 description 10
- 238000005286 illumination Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000003384 imaging method Methods 0.000 description 8
- 238000013527 convolutional neural network Methods 0.000 description 7
- 238000013138 pruning Methods 0.000 description 4
- 239000004065 semiconductor Substances 0.000 description 2
- 238000004821 distillation Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000000463 material Substances 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
Images
Landscapes
- Length Measuring Devices By Optical Means (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
- Image Analysis (AREA)
Description
本発明は、画像検査装置に関する。 The present invention relates to an image inspection apparatus.
従来、部品や完成品等の対象物の画像を撮影して、画像処理によって対象物の検査を行う画像検査装置が用いられている。画像検査装置は、画像に基づいて対象物が正常であるか異常であるかを識別する識別器を含むことがある。 2. Description of the Related Art Conventionally, an image inspection apparatus has been used that takes an image of an object such as a part or a finished product and inspects the object by image processing. Imaging inspection equipment may include a classifier that identifies whether an object is normal or abnormal based on the image.
例えば、下記特許文献1には、互いに異種であるM種類の畳み込みニューラルネットワーク分類器を備え、第一レベルの畳み込みニューラルネットワーク分類器は、対象物の分類に用いられ、第二レベルの畳み込みニューラルネットワーク分類器は、第一レベルの畳み込みニューラルネットワーク分類器にとって分類しにくい対象物の分類に用いられる、畳み込みニューラルネットワーク分類器システムが記載されている。
For example, the following
また、下記特許文献2には、大分類ニューラルネットワーク及び細分類ニューラルネットワークを用いて、撮像文字について大分類の処理を行い、撮像文字の特定が不可能である旨の特定がなされた場合には、次に可能性が高いグループから撮像文字の特定を行う処理を行い、順次これを繰返しながら撮像文字を特定するニューラルネットワークによる認識方法が記載されている。 In addition, in Patent Document 2 below, using a large classification neural network and a fine classification neural network, the imaged character is subjected to large classification processing, and if it is specified that the imaged character cannot be specified, Then, a recognition method using a neural network is described in which a process of specifying imaged characters is performed from the next most likely group, and the imaged characters are specified while repeating this process.
先行技術のように、画像に基づいて対象物を識別する識別器をニューラルネットワークによって構成することがある。しかしながら、ニューラルネットワークを用いた識別器は、比較的演算負荷が大きくなることある。 As in the prior art, a classifier that identifies an object based on an image may be configured by a neural network. However, a discriminator using a neural network may have a relatively large computational load.
ここで、対象物の画像の中には、明らかに異常であると分かる画像や、明らかに正常であると分かる画像が含まれることがあるが、ニューラルネットワークを用いた識別器は、どのような画像であっても一律に高負荷の処理を行うことがあり、判定に要する時間が長くなることがある。 Here, the images of the object may include images that are clearly abnormal and images that are clearly normal. Even for images, high-load processing may be uniformly performed, and the time required for determination may be long.
そこで、本発明は、判定に要する時間の期待値を短くすることができる、ニューラルネットワークを用いた画像検査装置を提供する。 Accordingly, the present invention provides an image inspection apparatus using a neural network that can shorten the expected value of the time required for determination.
本開示の一態様に係る画像検査装置は、対象物の画像を撮影する撮影部と、それぞれ複数のニューロンを含む第1ニューラルネットワーク及び第2ニューラルネットワークを用いて、画像に基づいて対象物の状態を判定する判定部と、を備え、第1ニューラルネットワークは、第2ニューラルネットワークと比較して、演算負荷が軽く、偽陰性率が同等以下であり、偽陽性率が大きく、判定部は、第1ニューラルネットワークを用いて対象物の状態を判定した結果が所定の条件を満たす場合、第1ニューラルネットワークを用いて対象物の状態を判定し、第1ニューラルネットワークを用いて対象物の状態を判定した結果が所定の条件を満たさない場合、第2ニューラルネットワークを用いて対象物の状態を判定する。 An image inspection apparatus according to an aspect of the present disclosure uses an imaging unit that captures an image of an object, and a first neural network and a second neural network each including a plurality of neurons to determine the state of the object based on the image. and a determination unit that determines the first neural network, compared to the second neural network, the calculation load is light, the false negative rate is equal to or lower than the same, and the false positive rate is large. When the result of determining the state of the object using the first neural network satisfies a predetermined condition, the state of the object is determined using the first neural network, and the state of the object is determined using the first neural network. If the result does not satisfy a predetermined condition, a second neural network is used to determine the state of the object.
この態様によれば、第2ニューラルネットワークより演算負荷が軽い第1ニューラルネットワークによる判定結果が所定の条件を満たす場合に、第2ニューラルネットワークによる判定を省略することで、判定に要する時間の期待値を短くすることができる。 According to this aspect, by omitting the determination by the second neural network when the determination result by the first neural network whose computational load is lighter than that of the second neural network satisfies the predetermined condition, the expected value of the time required for the determination. can be shortened.
上記態様において、複数の学習用画像を用いた学習処理によって第2ニューラルネットワークを生成し、第2ニューラルネットワークの規模を縮小する処理によって第1ニューラルネットワークを生成する生成部をさらに備えてもよい。 The above aspect may further include a generating unit that generates the second neural network by learning processing using a plurality of learning images and generates the first neural network by reducing the scale of the second neural network.
この態様によれば、第2ニューラルネットワークより規模の小さい第1ニューラルネットワークを効率良く生成することができる。 According to this aspect, it is possible to efficiently generate the first neural network smaller in scale than the second neural network.
上記態様において、生成部は、第2ニューラルネットワークの隠れ層に含まれる複数のニューロンのうち、入力層側の1又は複数のニューロンを固定し、出力層側の1又は複数のニューロンのパラメータをゼロとして、複数の学習用画像を用いた学習処理を行うことで、第1ニューラルネットワークを生成してもよい。 In the above aspect, the generation unit fixes one or more neurons on the input layer side among the plurality of neurons included in the hidden layer of the second neural network, and sets the parameters of the one or more neurons on the output layer side to zero. , the first neural network may be generated by performing learning processing using a plurality of learning images.
この態様によれば、第2ニューラルネットワークの隠れ層のニューロンを枝刈りして、再学習することで第1ニューラルネットワークを生成することができ、第2ニューラルネットワークより演算負荷が軽い第1ニューラルネットワークを効率的に生成することができる。 According to this aspect, the first neural network can be generated by pruning the hidden layer neurons of the second neural network and re-learning, and the first neural network has a lighter computational load than the second neural network. can be generated efficiently.
上記態様において、生成部は、第2ニューラルネットワークに対する第1ニューラルネットワークの規模の割合が所定値以下となるように、第1ニューラルネットワークを生成してもよい。 In the above aspect, the generating unit may generate the first neural network such that a scale ratio of the first neural network to the second neural network is equal to or less than a predetermined value.
この態様によれば、第1ニューラルネットワークにより専有されるメモリ領域を、第2ニューラルネットワークにより専有されるメモリ領域と比較して所定割合以下となるようにすることができる。 According to this aspect, it is possible to make the memory area occupied by the first neural network less than or equal to the predetermined ratio of the memory area occupied by the second neural network.
上記態様において、生成部は、第2ニューラルネットワークの規模を複数の異なる処理により縮小することで複数の候補ニューラルネットワークを生成し、複数の候補ニューラルネットワーク及び第2ニューラルネットワークによって画像に基づき対象物の状態を判定する計算時間を測定し、計算時間に基づいて、複数の候補ニューラルネットワークから、第1ニューラルネットワークを選択してもよい。 In the above aspect, the generation unit generates a plurality of candidate neural networks by reducing the scale of the second neural network through a plurality of different processes, and determines the object based on the image by the plurality of candidate neural networks and the second neural network. A computation time to determine the state may be measured and a first neural network may be selected from the plurality of candidate neural networks based on the computation time.
この態様によれば、第1ニューラルネットワーク及び第2ニューラルネットワークによる判定に要する時間の期待値が最も短くなるように、第1ニューラルネットワークを選択することができる。 According to this aspect, the first neural network can be selected so that the expected value of the time required for determination by the first neural network and the second neural network is the shortest.
上記態様において、判定部は、第1ニューラルネットワークの隠れ層に含まれる複数のニューロンのうち所定のニューロンの値を一時記憶し、第1ニューラルネットワークを用いて対象物の状態を判定した結果が所定の条件を満たさない場合、一時記憶した所定のニューロンの値を用いて、第2ニューラルネットワークにより対象物の状態を判定してもよい。 In the above aspect, the determination unit temporarily stores the value of a predetermined neuron among a plurality of neurons included in the hidden layer of the first neural network, and determines the state of the object using the first neural network. is not satisfied, the state of the object may be determined by the second neural network using the temporarily stored predetermined neuron values.
この態様によれば、第1ニューラルネットワークによって算出した値を第2ニューラルネットワークで共用することで、第2ニューラルネットワークによる判定に要する時間を短くすることができる。 According to this aspect, by sharing the value calculated by the first neural network with the second neural network, the time required for determination by the second neural network can be shortened.
上記態様において、生成部は、第1ニューラルネットワークの隠れ層に含まれる複数のニューロンに対する所定のニューロンの割合が所定値以上となるように、第1ニューラルネットワークを生成してもよい。 In the above aspect, the generation unit may generate the first neural network such that a ratio of predetermined neurons to a plurality of neurons included in the hidden layer of the first neural network is equal to or greater than a predetermined value.
この態様によれば、第1ニューラルネットワークによって算出した値を共用する第2ニューラルネットワークのニューロンの割合を所定値以上とすることで、第2ニューラルネットワークによる判定に要する時間を所定時間以上短くすることができる。 According to this aspect, by setting the ratio of neurons of the second neural network that share the value calculated by the first neural network to a predetermined value or more, the time required for determination by the second neural network can be shortened by a predetermined time or more. can be done.
本発明によれば、判定に要する時間の期待値を短くすることができる、ニューラルネットワークを用いた画像検査装置を提供することができる。 According to the present invention, it is possible to provide an image inspection apparatus using a neural network that can shorten the expected value of the time required for determination.
添付図面を参照して、本発明の実施形態について説明する。なお、各図において、同一の符号を付したものは、同一又は同様の構成を有する。 Embodiments of the present invention will be described with reference to the accompanying drawings. It should be noted that, in each figure, the same reference numerals have the same or similar configurations.
図1は、本発明の実施形態に係る画像検査装置100の概要を示す図である。画像検査装置100は、情報処理装置10、照明部20及び撮影部30を備える。画像検査装置100は、照明部20によって対象物1に光Lを照射して、対象物1による反射光Rを撮影部30によって撮影し、情報処理装置10によって、対象物1の画像に基づいて、対象物1の状態を判定する。
FIG. 1 is a diagram showing an overview of an
情報処理装置10は、撮影部30により撮影された画像をニューラルネットワークにより処理して、対象物1の状態を判定する。情報処理装置10は、汎用のコンピュータで構成されてよい。
The
照明部20は、対象物1に光を照射する。照明部20は、1又は複数のライトを含んで構成されてよく、照明方向及び照明強度等の照明条件が予め設定されていてよい。
The
撮影部30は、対象物1の画像を撮影する。撮影部30は、照明部20により照明された対象物1の画像を撮影し、画像を情報処理装置10に伝送する。撮影部30は、汎用のデジタルカメラで構成されてよく、撮影条件が予め設定されていてよい。
The photographing
なお、図1に示す構成は一例であり、画像検査装置100は、情報処理装置10、照明部20及び撮影部30以外の構成を備えていてもよいし、情報処理装置10、照明部20及び撮影部30の一部が一体となった構成を備えていてもよい。
Note that the configuration shown in FIG. 1 is an example, and the
図2は、本実施形態に係る情報処理装置10の機能ブロックを示す図である。情報処理装置10は、取得部11、記憶部12、判定部13、生成部14及び表示部10fを備える。
FIG. 2 is a diagram showing functional blocks of the
取得部11は、撮影部30により撮影された対象物1の画像を取得する。なお、取得部11は、外部機器に記憶された対象物1の画像を取得してもよい。
The
記憶部12は、第1ニューラルネットワーク12a、第2ニューラルネットワーク12b及び学習用画像12cを記憶する。第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bは、それぞれ1又は複数のニューロンを含む入力層、隠れ層及び出力層を少なくとも含む。第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bは、例えばCNN(Convolutional Neural Network)で構成されてよいが、他のモデルであってもよい。第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bは、対象物1の画像に基づいて、対象物1が正常であるか異常であるかを示す数値を出力したり、対象物1の種類を示す数値を出力したりしてよい。学習用画像12cは、第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bの学習処理に用いられる対象物1の画像であり、対象物1の状態を示すラベルデータが関連付けられていてよい。第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bは、例えば、学習用画像12cを用いた誤差逆伝播法による教師あり学習によって生成されてよい。
The
ここで、第1ニューラルネットワーク12aは、第2ニューラルネットワーク12bと比較して、演算負荷が軽く、偽陰性率が同等以下であり、偽陽性率が大きい。例えば、画像検査装置100によって対象物1に欠陥が有るか無いかを検査する場合、欠陥が有る場合を陽性とし、欠陥が無い場合を陰性として、実際には欠陥が有るにも関わらず欠陥が無いと判定してしまう割合が偽陰性率となり、実際には欠陥が無いにも関わらず欠陥が有ると判定してしまう割合が偽陽性率となる。すなわち、第1ニューラルネットワーク12aは、第2ニューラルネットワーク12bと比較して、演算負荷が軽いかわりに、欠陥を過検出してしまうことがあるが、欠陥を見逃す割合は第2ニューラルネットワーク12bと同等以下である。なお、第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bによって、欠陥が有る、欠陥が無い又はどちらとも判定できないという3値出力を行ってもよい。その場合、実際には欠陥が有るにも関わらず欠陥が無いと判定してしまう割合が偽陰性率となり、実際には欠陥が無いにも関わらず欠陥が有る又はどちらとも判定できないと出力してしまう割合が偽陽性率となる。
Here, compared with the second
判定部13は、それぞれ複数のニューロンを含む第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bを用いて、対象物1の画像に基づいて対象物1の状態を判定する。ここで、判定部13は、第1ニューラルネットワーク12aを用いて対象物1の状態を判定した結果が所定の条件を満たす場合、第1ニューラルネットワーク12aを用いて対象物1の状態を判定する。そして、判定部13は、第1ニューラルネットワーク12aを用いて対象物1の状態を判定した結果が所定の条件を満たさない場合、第2ニューラルネットワーク12bを用いて対象物1の状態を判定する。
The
第1ニューラルネットワーク12aによって、対象物1に欠陥が有る又は欠陥が無いという2値出力を行う場合、所定の条件は、判定の信頼度が所定値以上であることであってよい。また、第1ニューラルネットワーク12aによって、対象物1に欠陥が有る、欠陥が無い又はどちらとも判定できないという3値出力を行う場合、所定の条件は、どちらとも判定できないと出力されることであってよい。
When the first
このように、第2ニューラルネットワーク12bより演算負荷が軽い第1ニューラルネットワーク12aによる判定結果が所定の条件を満たす場合に、第2ニューラルネットワーク12bによる判定を省略することで、判定に要する時間の期待値を短くすることができる。
In this way, when the judgment result by the first
生成部14は、複数の学習用画像12cを用いた学習処理によって第2ニューラルネットワーク12bを生成し、第2ニューラルネットワーク12bの規模を縮小する処理によって第1ニューラルネットワーク12aを生成する。ここで、第2ニューラルネットワーク12bの規模を縮小する処理は、例えば、枝刈り(pruning)、蒸留(distillation)又はパラメータの量子化(quantization)によって行われてよい。このようにして、第2ニューラルネットワーク12bより規模の小さい第1ニューラルネットワーク12aを効率良く生成することができる。
The generating
より具体的には、生成部14は、第2ニューラルネットワーク12bの隠れ層に含まれる複数のニューロンのうち、入力層側の1又は複数のニューロンを固定し、出力層側の1又は複数のニューロンのパラメータをゼロとして、複数の学習用画像12cを用いた学習処理を行うことで、第1ニューラルネットワーク12aを生成してよい。これにより、第2ニューラルネットワーク12bの隠れ層のニューロンを枝刈りして、再学習することで第1ニューラルネットワーク12aを生成することができ、第2ニューラルネットワーク12bより演算負荷が軽い第1ニューラルネットワーク12aを効率的に生成することができる。
More specifically, of the plurality of neurons included in the hidden layer of the second
また、生成部14は、第2ニューラルネットワーク12bに対する第1ニューラルネットワーク12aの規模の割合が所定値以下となるように、第1ニューラルネットワーク12aを生成してよい。これにより、第1ニューラルネットワーク12aにより専有されるメモリ領域を、第2ニューラルネットワーク12bにより専有されるメモリ領域と比較して所定割合以下となるようにすることができる。
In addition, the
さらに、生成部14は、第2ニューラルネットワーク12bの規模を複数の異なる処理により縮小することで複数の候補ニューラルネットワークを生成し、複数の候補ニューラルネットワーク及び第2ニューラルネットワーク12bによって画像に基づき対象物1の状態を判定する計算時間を測定し、測定された計算時間に基づいて、複数の候補ニューラルネットワークから、第1ニューラルネットワーク12aを選択してよい。複数の候補ニューラルネットワークの例は、後に図7を用いて説明する。このようにして、第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bによる判定に要する時間の期待値が最も短くなるように、第1ニューラルネットワーク12aを選択することができる。
Furthermore, the
表示部10fは、判定部13の判定結果を対象物1の画像とともに表示したり、生成部14により生成された第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bの模式図を表示したりする。
The
判定部13は、第1ニューラルネットワーク12aの隠れ層に含まれる複数のニューロンのうち所定のニューロンの値を一時記憶し、第1ニューラルネットワーク12aを用いて対象物1の状態を判定した結果が所定の条件を満たさない場合、一時記憶した所定のニューロンの値を用いて、第2ニューラルネットワーク12bにより対象物1の状態を判定してよい。このように、第1ニューラルネットワーク12aによって算出した値を第2ニューラルネットワーク12bで共用することで、第2ニューラルネットワーク12bによる判定に要する時間を短くすることができる。
The
また、生成部14は、第1ニューラルネットワーク12aの隠れ層に含まれる複数のニューロンに対する所定のニューロン(第2ニューラルネットワーク12bと共用するニューロン)の割合が所定値以上となるように、第1ニューラルネットワーク12aを生成してよい。このように、第1ニューラルネットワーク12aによって算出した値を共用する第2ニューラルネットワーク12bのニューロンの割合を所定値以上とすることで、第2ニューラルネットワーク12bによる判定に要する時間を所定時間以上短くすることができる。
In addition, the
図3は、本実施形態に係る情報処理装置10の物理的構成を示す図である。情報処理装置10は、演算部に相当するCPU(Central Processing Unit)10aと、記憶部に相当するRAM(Random Access Memory)10bと、記憶部に相当するROM(Read only Memory)10cと、通信部10dと、入力部10eと、表示部10fと、を有する。これらの各構成は、バスを介して相互にデータ送受信可能に接続される。なお、本例では情報処理装置10が一台のコンピュータで構成される場合について説明するが、情報処理装置10は、複数のコンピュータが組み合わされて実現されてもよい。また、図3で示す構成は一例であり、情報処理装置10はこれら以外の構成を有してもよいし、これらの構成のうち一部を有さなくてもよい。
FIG. 3 is a diagram showing the physical configuration of the
CPU10aは、RAM10b又はROM10cに記憶されたプログラムの実行に関する制御やデータの演算、加工を行う制御部である。CPU10aは、対象物の画像に基づいて、第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bを用いて対象物1の状態を判定するプログラム(画像検査プログラム)を実行する演算部である。CPU10aは、入力部10eや通信部10dから種々のデータを受け取り、データの演算結果を表示部10fに表示したり、RAM10bやROM10cに格納したりする。
The
RAM10bは、記憶部のうちデータの書き換えが可能なものであり、例えば半導体記憶素子で構成されてよい。RAM10bは、CPU10aが実行する画像検査プログラム、学習用画像12cといったデータを記憶してよい。なお、これらは例示であって、RAM10bには、これら以外のデータが記憶されていてもよいし、これらの一部が記憶されていなくてもよい。
The
ROM10cは、記憶部のうちデータの読み出しが可能なものであり、例えば半導体記憶素子で構成されてよい。ROM10cは、例えば画像検査プログラムや、書き換えが行われないデータを記憶してよい。
The
通信部10dは、情報処理装置10を他の機器に接続するインターフェースである。通信部10dは、インターネット等の通信ネットワークに接続されてよい。
The
入力部10eは、ユーザからデータの入力を受け付けるものであり、例えば、キーボード及びタッチパネルを含んでよい。
The
表示部10fは、CPU10aによる演算結果を視覚的に表示するものであり、例えば、LCD(Liquid Crystal Display)により構成されてよい。表示部10fは、撮影部30により撮影された対象物1の画像を表示したり、学習用画像12cを表示したり、判定結果を表示したりしてよい。
The
画像検査プログラムは、RAM10bやROM10c等のコンピュータによって読み取り可能な記憶媒体に記憶されて提供されてもよいし、通信部10dにより接続される通信ネットワークを介して提供されてもよい。情報処理装置10では、CPU10aが画像検査プログラムを実行することにより、図2を用いて説明した様々な動作が実現される。なお、これらの物理的な構成は例示であって、必ずしも独立した構成でなくてもよい。例えば、情報処理装置10は、CPU10aとRAM10bやROM10cが一体化したLSI(Large-Scale Integration)を備えていてもよい。
The image inspection program may be stored in a computer-readable storage medium such as the
図4は、本実施形態に係る画像検査装置100により撮影される画像IMGの一例を示す図である。画像IMGは、対象物1を撮影した画像である。画像IMGには、第1線欠陥D1及び第2線欠陥D2が写されている。第1線欠陥D1は、対象物1に生じた傷であり、第2線欠陥D2は、対象物1の背景に生じている傷である。対象物1は、第1線欠陥D1を含むため異常であるが、第2線欠陥D2は対象物1の良否に関係しない。
FIG. 4 is a diagram showing an example of an image IMG captured by the
図5は、本実施形態に係る画像検査装置100により用いられる第2ニューラルネットワーク12bの一例を示す図である。同図では、第2ニューラルネットワーク12bの入力層INと、隠れ層HDNと、出力層のニューロンOUT1,OUT2,OUT3とを模式的に示している。隠れ層HDNは、複数のニューロンを含む。
FIG. 5 is a diagram showing an example of the second
本例の第2ニューラルネットワーク12bは、隠れ層HDNの前段に含まれる複数のニューロンによって画像に含まれるエッジを識別し、中段に含まれる複数のニューロンによって画像に含まれる角を識別したり、白線や黒線を識別したりし、後段に含まれる複数のニューロンによって対象物1の特定の形状を識別する。なお、これらの識別内容は、説明のため簡略化している。
The second
具体的には、第1ニューロンN1は、画像に直角なエッジが含まれる場合に活性化するニューロンであり、第2ニューロンN2は、画像に水平な白線が含まれる場合に活性化するニューロンである。また、第2ニューロンN2は、画像に直角なエッジが含まれる場合に活性化するニューロンであり、第4ニューロンN4は、画像に右下がりの白線が含まれる場合に活性化するニューロンであり、第5ニューロンN5は、画像に右下がりの黒線が含まれる場合に活性化するニューロンである。 Specifically, the first neuron N1 is a neuron that activates when the image contains a right-angled edge, and the second neuron N2 is a neuron that activates when the image contains a horizontal white line. . The second neuron N2 is a neuron that is activated when the image includes a right-angled edge, the fourth neuron N4 is a neuron that is activated when the image includes a downward-sloping white line, and the 5 neuron N5 is a neuron that is activated when the image includes a black line that descends to the right.
さらに、第6ニューロンN6は、画像に白色の線欠陥が含まれる場合に活性化するニューロンであり、第7ニューロンN7は、画像に黒色の線欠陥が含まれる場合に活性化するニューロンである。 Furthermore, the sixth neuron N6 is a neuron activated when the image contains a white line defect, and the seventh neuron N7 is a neuron activated when the image contains a black line defect.
また、第8ニューロンN8は、画像に対象物1の右下の角が含まれる場合に活性化するニューロンであり、第9ニューロンN9は、画像に対象物1の左上の角が含まれる場合に活性化するニューロンであり、第10ニューロンN10は、画像に対象物1に空いた穴が含まれる場合に活性化するニューロンであり、第11ニューロンN11は、画像に対象物1全体が含まれる場合に活性化するニューロンである。
The eighth neuron N8 is a neuron that is activated when the image includes the lower right corner of the
第12ニューロンN12、第13ニューロンN13及び第14ニューロンN14は、第6ニューロンN6、第7ニューロンN7及び第11ニューロンN11の出力を重み付けて足し合わせて、所定の非線形関数によって出力値を算出し、出力層に出力する。 The 12th neuron N12, the 13th neuron N13, and the 14th neuron N14 weight and add the outputs of the 6th neuron N6, the 7th neuron N7, and the 11th neuron N11, and calculate the output value by a predetermined nonlinear function, Output to the output layer.
出力層の第1ニューロンOUT1は、対象物1が異常である場合(対象物1に欠陥が有る場合)に活性化し、出力層の第2ニューロンOUT2は、対象物1が異常であるか正常であるか判定できない場合(対象物1に欠陥が有るか無いか判定できない場合)に活性化し、出力層の第3ニューロンOUT3は、対象物1が正常である場合(対象物1に欠陥が無い場合)に活性化する。
The first neuron OUT1 of the output layer is activated when the
図6は、本実施形態に係る画像検査装置100により用いられる第1ニューラルネットワーク12aの一例を示す図である。本例の第1ニューラルネットワーク12aは、第2ニューラルネットワーク12bの隠れ層HDNに含まれる複数のニューロンを枝刈りすることで生成されている。
FIG. 6 is a diagram showing an example of the first
第1ニューラルネットワーク12aは、第2ニューラルネットワーク12bと比較して、第1ニューロンN1、第2ニューロンN2、第3ニューロンN3、第4ニューロンN4、第6ニューロンN6、第8ニューロンN8、第9ニューロンN9、第10ニューロンN10、第11ニューロンN11、第12ニューロンN12及び第14ニューロンN14が枝刈りされて、規模が小さくなっている。
Compared to the second
生成部14は、第2ニューラルネットワーク12bの隠れ層HDNに含まれる複数のニューロンのうち、入力層側の1又は複数のニューロンを固定し、出力層側の1又は複数のニューロン(本例では第1ニューロンN1、第2ニューロンN2、第3ニューロンN3、第4ニューロンN4、第6ニューロンN6、第8ニューロンN8、第9ニューロンN9、第10ニューロンN10、第11ニューロンN11、第12ニューロンN12及び第14ニューロンN14)の重みパラメータ及びバイアスパラメータをゼロとして、複数の学習用画像12cを用いた学習処理を行うことで、第1ニューラルネットワーク12aを生成してよい。
The
また、判定部13は、第1ニューラルネットワーク12aの隠れ層HDNに含まれる複数のニューロンのうち所定のニューロンSの値を一時記憶し、第1ニューラルネットワーク12aを用いて対象物1の状態を判定した結果が所定の条件を満たさない場合、一時記憶した所定のニューロンSの値を用いて、第2ニューラルネットワーク12bにより対象物1の状態を判定してよい。第1ニューラルネットワーク12aの所定のニューロンSによって算出した値を第2ニューラルネットワーク12bで共用することで、第2ニューラルネットワーク12bによる判定に要する時間を短くすることができる。
Further, the
図7は、本実施形態に係る画像検査装置100により生成される複数の候補ニューラルネットワークの一例を示す図である。生成部14は、第2ニューラルネットワーク12bに対する規模の割合が所定値以下となるように候補ニューラルネットワークを生成したり、第2ニューラルネットワーク12bと共用するニューロン割合が所定値以上となるように候補ニューラルネットワークを生成したりする。生成部14は、候補ニューラルネットワークの偽陽性率が第2ニューラルネットワーク12bより大きくなることを許容しつつ、候補ニューラルネットワークの偽陰性率が第2ニューラルネットワーク12bと同等以下となるように、候補ニューラルネットワークを生成してよい。
FIG. 7 is a diagram showing an example of a plurality of candidate neural networks generated by the
本例の場合、第1候補ニューラルネットワークは、第2ニューラルネットワーク12bに対する規模の割合が40%であり、第2ニューラルネットワーク12bと共用するニューロンの割合が10%であり、対象物1が正常であるか異常であるかどちらとも判定できない割合が4%である。また、第2候補ニューラルネットワークは、第2ニューラルネットワーク12bに対する規模の割合が40%であり、第2ニューラルネットワーク12bと共用するニューロンの割合が20%であり、対象物1が正常であるか異常であるかどちらとも判定できない割合が6%である。また、第3候補ニューラルネットワークは、第2ニューラルネットワーク12bに対する規模の割合が20%であり、第2ニューラルネットワーク12bと共用するニューロンの割合が5%であり、対象物1が正常であるか異常であるかどちらとも判定できない割合が8%である。第4候補ニューラルネットワークは、第2ニューラルネットワーク12bに対する規模の割合が30%であり、第2ニューラルネットワーク12bと共用するニューロンの割合が15%であり、対象物1が正常であるか異常であるかどちらとも判定できない割合が7%である。
In this example, the first candidate neural network has a scale ratio of 40% with respect to the second
例えば、対象物1が正常であるか異常であるかどちらとも判定できない割合を低く抑えたい場合、第1候補ニューラルネットワークを第1ニューラルネットワーク12aとして選択してよい。また、第2ニューラルネットワーク12bと共用するニューロンの割合を高めたい場合、第2候補ニューラルネットワークを第1ニューラルネットワーク12aとして選択してよい。一方、ネットワークの規模をできるだけ小さくしたい場合、第3候補ニューラルネットワークを第1ニューラルネットワーク12aとして選択してよい。また、全ての項目をバランス良く備えたネットワークを生成したい場合、第4候補ニューラルネットワークを第1ニューラルネットワーク12aとして選択してよい。
For example, if it is desired to reduce the rate of failure to determine whether the
また、生成部14は、複数の候補ニューラルネットワーク及び第2ニューラルネットワーク12bによって画像に基づき対象物1の状態を判定する計算時間に基づいて、複数の候補ニューラルネットワークから、第1ニューラルネットワーク12aを選択してよい。
Further, the
図8は、本実施形態に係る画像検査装置100により実行される第1ニューラルネットワーク選択処理のフローチャートである。はじめに、画像検査装置100は、学習用画像12cを用いた学習処理によって、第2ニューラルネットワーク12bを生成する(S10)。
FIG. 8 is a flowchart of the first neural network selection process executed by the
その後、画像検査装置100は、第2ニューラルネットワーク12bに対してN通りの規模縮小を実行し(S11)、学習用画像12cを用いた学習処理によって、第1ニューラルネットワークの第1候補~第N候補を生成する(S12)。ここで、Nは2以上の自然数である。
After that, the
そして、画像検査装置100は、第1ニューラルネットワークの第1候補~第N候補の計算時間と、第2ニューラルネットワーク12bの計算時間を測定し(S13)、計算時間に基づいて、第1候補~第N候補の中から第1ニューラルネットワーク12aを選択する(S14)。以上により、第1ニューラルネットワーク選択処理が終了する。
Then, the
図9は、本実施形態に係る画像検査装置100により実行される状態判定処理のフローチャートである。はじめに、画像検査装置100は、対象物1の画像を撮影する(S20)。
FIG. 9 is a flowchart of state determination processing executed by the
その後、画像検査装置100は、画像を第1ニューラルネットワーク12aに入力し、出力層の活性状態を算出する(S21)。そして、OK(対象物1が正常)又はNG(対象物1が以上)に対応する出力層のニューロンの値が最大であるか判定する(S22)。すなわち、対象物1が正常とも異常とも判定できないグレー状態に対応する出力層のニューロンの値が最大でないか判定する。
After that, the
OK又はNGに対応するニューロンの値が最大である場合(S22:YES)、画像検査装置100は、第1ニューラルネットワーク12aの出力に基づき、対象物1の状態を判定する(S23)。
If the neuron value corresponding to OK or NG is the maximum (S22: YES), the
一方、OK又はNGに対応するニューロンの値が最大でない場合(S22:NO)、すなわちグレーに対応するニューロンの値が最大である場合、画像検査装置100は、画像を第2ニューラルネットワーク12bに入力し、出力層の活性状態を算出して(S24)、第2ニューラルネットワーク12bの出力に基づき、対象物1の状態を判定する(S25)。以上により、判定処理が終了する。
On the other hand, if the neuron value corresponding to OK or NG is not the maximum (S22: NO), that is, if the neuron value corresponding to gray is maximum, the
このように、本実施形態に係る画像検査装置100によれば、第2ニューラルネットワーク12bより演算負荷が軽い第1ニューラルネットワーク12aによる判定結果が所定の条件を満たす場合に、第2ニューラルネットワーク12bによる判定を省略することで、判定に要する時間の期待値を短くすることができる。
As described above, according to the
以上説明した実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。実施形態が備える各要素並びにその配置、材料、条件、形状及びサイズ等は、例示したものに限定されるわけではなく適宜変更することができる。また、異なる実施形態で示した構成同士を部分的に置換し又は組み合わせることが可能である。 The embodiments described above are for facilitating understanding of the present invention, and are not intended to limit and interpret the present invention. Each element included in the embodiment and its arrangement, materials, conditions, shape, size, etc. are not limited to those illustrated and can be changed as appropriate. Also, it is possible to partially replace or combine the configurations shown in different embodiments.
本実施形態における態様は、以下のような開示を含む。 Aspects in this embodiment include the following disclosures.
[付記1]
対象物(1)の画像を撮影する撮影部(30)と、
それぞれ複数のニューロンを含む第1ニューラルネットワーク(12a)及び第2ニューラルネットワーク(12b)を用いて、前記画像に基づいて前記対象物(1)の状態を判定する判定部(13)と、を備え、
前記第1ニューラルネットワーク(12a)は、前記第2ニューラルネットワーク(12b)と比較して、演算負荷が軽く、偽陰性率が同等以下であり、偽陽性率が大きく、
前記判定部(13)は、
前記第1ニューラルネットワーク(12a)を用いて前記対象物(1)の状態を判定した結果が所定の条件を満たす場合、前記第1ニューラルネットワーク(12a)を用いて前記対象物(1)の状態を判定し、
前記第1ニューラルネットワーク(12a)を用いて前記対象物(1)の状態を判定した結果が前記所定の条件を満たさない場合、前記第2ニューラルネットワーク(12b)を用いて前記対象物(1)の状態を判定する、
画像検査装置(100)。
[Appendix 1]
a photographing unit (30) for photographing an image of an object (1);
a determination unit (13) that determines the state of the object (1) based on the image using a first neural network (12a) and a second neural network (12b) each including a plurality of neurons; ,
Compared to the second neural network (12b), the first neural network (12a) has a light computational load, an equal or lower false negative rate, and a large false positive rate,
The determination unit (13)
When the result of determining the state of the object (1) using the first neural network (12a) satisfies a predetermined condition, the first neural network (12a) is used to determine the state of the object (1). to determine
If the result of determining the state of the object (1) using the first neural network (12a) does not satisfy the predetermined condition, the object (1) using the second neural network (12b) determine the state of
An image inspection device (100).
10…情報処理装置、10a…CPU、10b…RAM、10c…ROM、10d…通信部、10e…入力部、10f…表示部、11…取得部、12…記憶部、12a…第1ニューラルネットワーク、12b…第2ニューラルネットワーク、12c…学習用画像、13…判定部、14…生成部、20…照明部、30…撮影部、100…画像検査装置
DESCRIPTION OF
Claims (5)
それぞれ複数のニューロンを含む第1ニューラルネットワーク及び第2ニューラルネットワークを用いて、前記画像に基づいて前記対象物の状態を判定する判定部と、
複数の学習用画像を用いた学習処理によって前記第2ニューラルネットワークを生成し、前記第2ニューラルネットワークの規模を縮小する処理によって前記第1ニューラルネットワークを生成する生成部と、
を備え、
前記第1ニューラルネットワークは、前記第2ニューラルネットワークと比較して、演算負荷が軽く、偽陰性率が同等以下であり、偽陽性率が大きく、
前記判定部は、
前記第1ニューラルネットワークを用いて前記対象物の状態を判定した結果が所定の条件を満たす場合、前記第1ニューラルネットワークを用いて前記対象物の状態を判定し、
前記第1ニューラルネットワークを用いて前記対象物の状態を判定した結果が前記所定の条件を満たさない場合、前記第2ニューラルネットワークを用いて前記対象物の状態を判定し、
前記生成部は、前記第2ニューラルネットワークの規模を複数の異なる処理により縮小することで複数の候補ニューラルネットワークを生成し、複数の候補ニューラルネットワーク及び前記第2ニューラルネットワークによって前記画像に基づき前記対象物の状態を判定する計算時間を測定し、前記計算時間に基づいて、前記複数の候補ニューラルネットワークから、前記第1ニューラルネットワークを選択する、
画像検査装置。 a photographing unit for photographing an image of an object;
a determination unit that determines the state of the object based on the image using a first neural network and a second neural network each including a plurality of neurons;
a generation unit that generates the second neural network by learning processing using a plurality of learning images and generates the first neural network by processing for reducing the scale of the second neural network;
with
Compared to the second neural network, the first neural network has a light computational load, an equal or lower false negative rate, and a large false positive rate,
The determination unit is
If the result of determining the state of the object using the first neural network satisfies a predetermined condition, determining the state of the object using the first neural network;
if the result of determining the state of the object using the first neural network does not satisfy the predetermined condition, determining the state of the object using the second neural network;
The generation unit generates a plurality of candidate neural networks by reducing the scale of the second neural network by a plurality of different processes, and the target object based on the image by the plurality of candidate neural networks and the second neural network. measuring the computation time to determine the state of, and selecting the first neural network from the plurality of candidate neural networks based on the computation time;
Image inspection equipment.
請求項1に記載の画像検査装置。 The generator fixes one or more neurons on the input layer side among a plurality of neurons included in the hidden layer of the second neural network, and sets the parameters of one or more neurons on the output layer side to zero, generating the first neural network by performing a learning process using the plurality of learning images;
The image inspection apparatus according to claim 1 .
請求項1又は2に記載の画像検査装置。 The generation unit generates the first neural network such that the ratio of the scale of the first neural network to the second neural network is equal to or less than a predetermined value.
The image inspection apparatus according to claim 1 or 2 .
請求項1から3のいずれか一項に記載の画像検査装置。 The determination unit temporarily stores values of predetermined neurons among a plurality of neurons included in a hidden layer of the first neural network, and determines the state of the object using the first neural network. If a predetermined condition is not satisfied, the second neural network determines the state of the object using the temporarily stored predetermined neuron value.
The image inspection apparatus according to any one of claims 1 to 3 .
請求項4に記載の画像検査装置。 The generation unit generates the first neural network such that a ratio of the predetermined neuron to the plurality of neurons included in the hidden layer of the first neural network is equal to or greater than a predetermined value.
The image inspection apparatus according to claim 4 .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2019053274A JP7118365B2 (en) | 2019-03-20 | 2019-03-20 | Image inspection device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2019053274A JP7118365B2 (en) | 2019-03-20 | 2019-03-20 | Image inspection device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2020154798A JP2020154798A (en) | 2020-09-24 |
| JP7118365B2 true JP7118365B2 (en) | 2022-08-16 |
Family
ID=72559239
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2019053274A Active JP7118365B2 (en) | 2019-03-20 | 2019-03-20 | Image inspection device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7118365B2 (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7470062B2 (en) | 2021-01-13 | 2024-04-17 | 株式会社日立製作所 | Information processing device and learning recognition system |
| JP7699018B2 (en) | 2021-09-10 | 2025-06-26 | 富士フイルム株式会社 | Information processing device, learning data generating device, and diagnostic support system |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2019028960A (en) | 2017-08-04 | 2019-02-21 | オムロン株式会社 | Image processing system |
-
2019
- 2019-03-20 JP JP2019053274A patent/JP7118365B2/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2019028960A (en) | 2017-08-04 | 2019-02-21 | オムロン株式会社 | Image processing system |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2020154798A (en) | 2020-09-24 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7657036B2 (en) | Product classification system and method of classifying products | |
| US10997711B2 (en) | Appearance inspection device | |
| JP6924413B2 (en) | Data generator, data generation method and data generation program | |
| KR20230124713A (en) | Fault detection methods, devices and systems | |
| US11562479B2 (en) | Inspection apparatus, inspection method, and non-volatile storage medium | |
| JP7289658B2 (en) | Classification device, classification method, classification program, and inspection device | |
| KR20220038907A (en) | Data prediction method based on generative adversarial network and apparatus implementing the same method | |
| US11657270B2 (en) | Self-assessing deep representational units | |
| JP7118365B2 (en) | Image inspection device | |
| JP2017054331A (en) | Image classification method, classifier configuration method, and image classification apparatus | |
| CN117173154A (en) | Online image detection system and method for glass bottle | |
| JP7549736B2 (en) | Visual inspection method and visual inspection system | |
| JP2021143884A (en) | Inspection device, inspection method, program, learning device, learning method, and trained dataset | |
| JP7118364B2 (en) | Image inspection equipment | |
| JP7070334B2 (en) | Image classification device, image inspection device, and image classification method | |
| CN118552480A (en) | Industrial scene weak edge defect detection method and device based on MASK R-CNN | |
| JP7725391B2 (en) | Appearance analysis system, appearance analysis method, and program | |
| US12482242B1 (en) | Data centric mislabel detection | |
| JP7681423B2 (en) | Inspection device, inspection method, inspection program, machine learning device, machine learning method, machine learning program, and method for manufacturing structure | |
| JP2021128130A (en) | Image inspection device | |
| CN118676014A (en) | Wafer inspection method, system, electronic device, storage medium and computer program product | |
| TWI902802B (en) | Method and system for training inspection equipment for automatic defect classification and storage medium thereof | |
| Subha et al. | A Novel Deep Learning Approach to Detect Manufacturing Defects over Textile Fabric Materials | |
| Villegas-Jaramillo et al. | Convolutional Neural Networks and Deep Learning Techniques for Glass Surface Defect Inspection | |
| Hadagali et al. | Deep Learning Approach for PCB Defect Localization and Classification |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201214 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20211223 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20220105 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20220302 |
|
| 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: 20220704 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20220717 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7118365 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |