[go: up one dir, main page]

JP7118365B2 - Image inspection device - Google Patents

Image inspection device Download PDF

Info

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
Application number
JP2019053274A
Other languages
Japanese (ja)
Other versions
JP2020154798A (en
Inventor
豊 加藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Omron Corp
Original Assignee
Omron 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 Omron Corp filed Critical Omron Corp
Priority to JP2019053274A priority Critical patent/JP7118365B2/en
Publication of JP2020154798A publication Critical patent/JP2020154798A/en
Application granted granted Critical
Publication of JP7118365B2 publication Critical patent/JP7118365B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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 patent document 1 includes M types of convolutional neural network classifiers that are different from each other, the first level convolutional neural network classifier is used for object classification, and the second level convolutional neural network classifier is used to classify objects. A convolutional neural network classifier system is described that is used to classify objects that are difficult to classify for a first level convolutional neural network classifier.

また、下記特許文献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.

特開2014-49118号公報JP 2014-49118 A 特開平7-306916号公報JP-A-7-306916

先行技術のように、画像に基づいて対象物を識別する識別器をニューラルネットワークによって構成することがある。しかしながら、ニューラルネットワークを用いた識別器は、比較的演算負荷が大きくなることある。 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.

本発明の実施形態に係る画像検査装置の概要を示す図である。1 is a diagram showing an overview of an image inspection apparatus according to an embodiment of the present invention; FIG. 本実施形態に係る情報処理装置の機能ブロックを示す図である。It is a figure which shows the functional block of the information processing apparatus which concerns on this embodiment. 本実施形態に係る情報処理装置の物理的構成を示す図である。It is a figure which shows the physical structure of the information processing apparatus which concerns on this embodiment. 本実施形態に係る画像検査装置により撮影される画像の一例を示す図である。It is a figure which shows an example of the image image|photographed by the image inspection apparatus which concerns on this embodiment. 本実施形態に係る画像検査装置により用いられる第2ニューラルネットワークの一例を示す図である。It is a figure which shows an example of the 2nd neural network used by the image inspection apparatus which concerns on this embodiment. 本実施形態に係る画像検査装置により用いられる第1ニューラルネットワークの一例を示す図である。It is a figure which shows an example of the 1st neural network used by the image inspection apparatus which concerns on this embodiment. 本実施形態に係る画像検査装置により生成される複数の候補ニューラルネットワークの一例を示す図である。It is a figure which shows an example of several candidate neural networks produced|generated by the image inspection apparatus which concerns on this embodiment. 本実施形態に係る画像検査装置により実行される第1ニューラルネットワーク選択処理のフローチャートである。4 is a flowchart of first neural network selection processing executed by the image inspection apparatus according to the present embodiment; 本実施形態に係る画像検査装置により実行される状態判定処理のフローチャートである。4 is a flowchart of state determination processing executed by the image inspection apparatus according to the present embodiment;

添付図面を参照して、本発明の実施形態について説明する。なお、各図において、同一の符号を付したものは、同一又は同様の構成を有する。 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 image inspection apparatus 100 according to an embodiment of the invention. The image inspection apparatus 100 includes an information processing device 10 , an illumination section 20 and an imaging section 30 . The image inspection apparatus 100 irradiates the object 1 with light L using the illumination unit 20, captures the reflected light R from the object 1 with the imaging unit 30, and uses the information processing unit 10 to perform an image based on the image of the object 1. , determine the state of the object 1 .

情報処理装置10は、撮影部30により撮影された画像をニューラルネットワークにより処理して、対象物1の状態を判定する。情報処理装置10は、汎用のコンピュータで構成されてよい。 The information processing device 10 processes the image captured by the imaging unit 30 using a neural network to determine the state of the object 1 . The information processing device 10 may be configured by a general-purpose computer.

照明部20は、対象物1に光を照射する。照明部20は、1又は複数のライトを含んで構成されてよく、照明方向及び照明強度等の照明条件が予め設定されていてよい。 The illumination unit 20 irradiates the object 1 with light. The illumination unit 20 may include one or more lights, and illumination conditions such as illumination direction and illumination intensity may be set in advance.

撮影部30は、対象物1の画像を撮影する。撮影部30は、照明部20により照明された対象物1の画像を撮影し、画像を情報処理装置10に伝送する。撮影部30は、汎用のデジタルカメラで構成されてよく、撮影条件が予め設定されていてよい。 The photographing unit 30 photographs an image of the object 1 . The imaging unit 30 captures an image of the object 1 illuminated by the illumination unit 20 and transmits the image to the information processing device 10 . The photographing unit 30 may be composed of a general-purpose digital camera, and photographing conditions may be set in advance.

なお、図1に示す構成は一例であり、画像検査装置100は、情報処理装置10、照明部20及び撮影部30以外の構成を備えていてもよいし、情報処理装置10、照明部20及び撮影部30の一部が一体となった構成を備えていてもよい。 Note that the configuration shown in FIG. 1 is an example, and the image inspection apparatus 100 may include configurations other than the information processing device 10, the illumination unit 20, and the photographing unit 30. The information processing device 10, the illumination unit 20, and A part of the photographing unit 30 may be integrated.

図2は、本実施形態に係る情報処理装置10の機能ブロックを示す図である。情報処理装置10は、取得部11、記憶部12、判定部13、生成部14及び表示部10fを備える。 FIG. 2 is a diagram showing functional blocks of the information processing apparatus 10 according to this embodiment. The information processing apparatus 10 includes an acquisition unit 11, a storage unit 12, a determination unit 13, a generation unit 14, and a display unit 10f.

取得部11は、撮影部30により撮影された対象物1の画像を取得する。なお、取得部11は、外部機器に記憶された対象物1の画像を取得してもよい。 The acquisition unit 11 acquires an image of the object 1 photographed by the photographing unit 30 . Note that the acquisition unit 11 may acquire an image of the target object 1 stored in an external device.

記憶部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 storage unit 12 stores a first neural network 12a, a second neural network 12b, and a learning image 12c. The first neural network 12a and the second neural network 12b each include at least an input layer, a hidden layer and an output layer each including one or more neurons. The first neural network 12a and the second neural network 12b may be configured by, for example, a CNN (Convolutional Neural Network), but may be other models. Based on the image of the object 1, the first neural network 12a and the second neural network 12b output a numerical value indicating whether the object 1 is normal or abnormal, or output a numerical value indicating the type of the object 1. can be output. The learning image 12c is an image of the object 1 used for learning processing of the first neural network 12a and the second neural network 12b, and may be associated with label data indicating the state of the object 1. The first neural network 12a and the second neural network 12b may be generated, for example, by supervised learning by error backpropagation using the learning image 12c.

ここで、第1ニューラルネットワーク12aは、第2ニューラルネットワーク12bと比較して、演算負荷が軽く、偽陰性率が同等以下であり、偽陽性率が大きい。例えば、画像検査装置100によって対象物1に欠陥が有るか無いかを検査する場合、欠陥が有る場合を陽性とし、欠陥が無い場合を陰性として、実際には欠陥が有るにも関わらず欠陥が無いと判定してしまう割合が偽陰性率となり、実際には欠陥が無いにも関わらず欠陥が有ると判定してしまう割合が偽陽性率となる。すなわち、第1ニューラルネットワーク12aは、第2ニューラルネットワーク12bと比較して、演算負荷が軽いかわりに、欠陥を過検出してしまうことがあるが、欠陥を見逃す割合は第2ニューラルネットワーク12bと同等以下である。なお、第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bによって、欠陥が有る、欠陥が無い又はどちらとも判定できないという3値出力を行ってもよい。その場合、実際には欠陥が有るにも関わらず欠陥が無いと判定してしまう割合が偽陰性率となり、実際には欠陥が無いにも関わらず欠陥が有る又はどちらとも判定できないと出力してしまう割合が偽陽性率となる。 Here, compared with the second neural network 12b, the first neural network 12a has a light calculation load, a false negative rate equal to or lower than that of the second neural network 12b, and a large false positive rate. For example, when inspecting whether or not the object 1 has a defect by the image inspection apparatus 100, the case where there is a defect is regarded as positive, and the case where there is no defect is regarded as negative. The rate at which it is determined that there is no defect is the false negative rate, and the rate at which it is determined that there is a defect even though there is actually no defect is the false positive rate. That is, although the first neural network 12a may overdetect defects in comparison with the second neural network 12b, although the computational load is lighter, the rate of overlooking defects is the same as that of the second neural network 12b. It is below. It should be noted that the first neural network 12a and the second neural network 12b may perform ternary output indicating that there is a defect, that there is no defect, or that neither can be determined. In that case, the rate of judging that there is no defect even though there is actually a defect is the false negative rate. The false-positive rate is the rate of false positives.

判定部13は、それぞれ複数のニューロンを含む第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bを用いて、対象物1の画像に基づいて対象物1の状態を判定する。ここで、判定部13は、第1ニューラルネットワーク12aを用いて対象物1の状態を判定した結果が所定の条件を満たす場合、第1ニューラルネットワーク12aを用いて対象物1の状態を判定する。そして、判定部13は、第1ニューラルネットワーク12aを用いて対象物1の状態を判定した結果が所定の条件を満たさない場合、第2ニューラルネットワーク12bを用いて対象物1の状態を判定する。 The determination unit 13 determines the state of the object 1 based on the image of the object 1 using a first neural network 12a and a second neural network 12b each including a plurality of neurons. Here, the determination unit 13 determines the state of the object 1 using the first neural network 12a when the result of determining the state of the object 1 using the first neural network 12a satisfies a predetermined condition. If the result of determining the state of the object 1 using the first neural network 12a does not satisfy a predetermined condition, the determination unit 13 determines the state of the object 1 using the second neural network 12b.

第1ニューラルネットワーク12aによって、対象物1に欠陥が有る又は欠陥が無いという2値出力を行う場合、所定の条件は、判定の信頼度が所定値以上であることであってよい。また、第1ニューラルネットワーク12aによって、対象物1に欠陥が有る、欠陥が無い又はどちらとも判定できないという3値出力を行う場合、所定の条件は、どちらとも判定できないと出力されることであってよい。 When the first neural network 12a outputs a binary value indicating that the object 1 has a defect or does not have a defect, the predetermined condition may be that the reliability of the determination is equal to or higher than a predetermined value. Further, when the first neural network 12a outputs three values indicating that the object 1 has a defect, does not have a defect, or cannot be determined, the predetermined condition is to output that neither can be determined. good.

このように、第2ニューラルネットワーク12bより演算負荷が軽い第1ニューラルネットワーク12aによる判定結果が所定の条件を満たす場合に、第2ニューラルネットワーク12bによる判定を省略することで、判定に要する時間の期待値を短くすることができる。 In this way, when the judgment result by the first neural network 12a whose computational load is lighter than that of the second neural network 12b satisfies a predetermined condition, the judgment by the second neural network 12b is omitted so that the time required for judgment can be expected. You can shorten the value.

生成部14は、複数の学習用画像12cを用いた学習処理によって第2ニューラルネットワーク12bを生成し、第2ニューラルネットワーク12bの規模を縮小する処理によって第1ニューラルネットワーク12aを生成する。ここで、第2ニューラルネットワーク12bの規模を縮小する処理は、例えば、枝刈り(pruning)、蒸留(distillation)又はパラメータの量子化(quantization)によって行われてよい。このようにして、第2ニューラルネットワーク12bより規模の小さい第1ニューラルネットワーク12aを効率良く生成することができる。 The generating unit 14 generates the second neural network 12b by learning processing using the plurality of learning images 12c, and generates the first neural network 12a by reducing the scale of the second neural network 12b. Here, the process of reducing the scale of the second neural network 12b may be performed by, for example, pruning, distillation or quantization of parameters. In this way, the first neural network 12a smaller in scale than the second neural network 12b can be efficiently generated.

より具体的には、生成部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 neural network 12b, the generation unit 14 fixes one or more neurons on the input layer side, and fixes one or more neurons on the output layer side. may be set to zero, and learning processing using a plurality of learning images 12c may be performed to generate the first neural network 12a. As a result, the first neural network 12a can be generated by pruning the hidden layer neurons of the second neural network 12b and re-learning, and the first neural network has a lighter computation load than the second neural network 12b 12a can be produced efficiently.

また、生成部14は、第2ニューラルネットワーク12bに対する第1ニューラルネットワーク12aの規模の割合が所定値以下となるように、第1ニューラルネットワーク12aを生成してよい。これにより、第1ニューラルネットワーク12aにより専有されるメモリ領域を、第2ニューラルネットワーク12bにより専有されるメモリ領域と比較して所定割合以下となるようにすることができる。 In addition, the generation unit 14 may generate the first neural network 12a such that the ratio of the scale of the first neural network 12a to the second neural network 12b is equal to or less than a predetermined value. As a result, the memory area occupied by the first neural network 12a can be reduced to a predetermined ratio or less compared to the memory area occupied by the second neural network 12b.

さらに、生成部14は、第2ニューラルネットワーク12bの規模を複数の異なる処理により縮小することで複数の候補ニューラルネットワークを生成し、複数の候補ニューラルネットワーク及び第2ニューラルネットワーク12bによって画像に基づき対象物1の状態を判定する計算時間を測定し、測定された計算時間に基づいて、複数の候補ニューラルネットワークから、第1ニューラルネットワーク12aを選択してよい。複数の候補ニューラルネットワークの例は、後に図7を用いて説明する。このようにして、第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bによる判定に要する時間の期待値が最も短くなるように、第1ニューラルネットワーク12aを選択することができる。 Furthermore, the generation unit 14 generates a plurality of candidate neural networks by reducing the scale of the second neural network 12b by a plurality of different processes, and the plurality of candidate neural networks and the second neural network 12b based on the image. A computation time to determine one state may be measured and a first neural network 12a may be selected from the plurality of candidate neural networks based on the measured computation time. An example of multiple candidate neural networks will be described later with reference to FIG. In this manner, the first neural network 12a can be selected so that the expected value of the time required for determination by the first neural network 12a and the second neural network 12b is the shortest.

表示部10fは、判定部13の判定結果を対象物1の画像とともに表示したり、生成部14により生成された第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bの模式図を表示したりする。 The display unit 10f displays the determination result of the determination unit 13 together with the image of the object 1, and displays schematic diagrams of the first neural network 12a and the second neural network 12b generated by the generation unit 14. FIG.

判定部13は、第1ニューラルネットワーク12aの隠れ層に含まれる複数のニューロンのうち所定のニューロンの値を一時記憶し、第1ニューラルネットワーク12aを用いて対象物1の状態を判定した結果が所定の条件を満たさない場合、一時記憶した所定のニューロンの値を用いて、第2ニューラルネットワーク12bにより対象物1の状態を判定してよい。このように、第1ニューラルネットワーク12aによって算出した値を第2ニューラルネットワーク12bで共用することで、第2ニューラルネットワーク12bによる判定に要する時間を短くすることができる。 The determination unit 13 temporarily stores the values of predetermined neurons among a plurality of neurons included in the hidden layer of the first neural network 12a, and determines the state of the object 1 using the first neural network 12a. is not satisfied, the state of the object 1 may be determined by the second neural network 12b using the temporarily stored predetermined neuron values. By sharing the value calculated by the first neural network 12a with the second neural network 12b in this way, the time required for the determination by the second neural network 12b can be shortened.

また、生成部14は、第1ニューラルネットワーク12aの隠れ層に含まれる複数のニューロンに対する所定のニューロン(第2ニューラルネットワーク12bと共用するニューロン)の割合が所定値以上となるように、第1ニューラルネットワーク12aを生成してよい。このように、第1ニューラルネットワーク12aによって算出した値を共用する第2ニューラルネットワーク12bのニューロンの割合を所定値以上とすることで、第2ニューラルネットワーク12bによる判定に要する時間を所定時間以上短くすることができる。 In addition, the generation unit 14 generates the first neural network 12a so that the ratio of a predetermined neuron (a neuron shared with the second neural network 12b) to a plurality of neurons included in the hidden layer of the first neural network 12a is equal to or greater than a predetermined value. A network 12a may be created. In this way, by setting the ratio of neurons of the second neural network 12b that share the values calculated by the first neural network 12a to a predetermined value or more, the time required for determination by the second neural network 12b is shortened by a predetermined time or more. be able to.

図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 information processing device 10 according to this embodiment. The information processing apparatus 10 includes a CPU (Central Processing Unit) 10a equivalent to a calculation unit, a RAM (Random Access Memory) 10b equivalent to a storage unit, a ROM (Read only memory) 10c equivalent to a storage unit, and a communication unit. 10d, an input unit 10e, and a display unit 10f. These components are connected to each other via a bus so that data can be sent and received. In this example, a case where the information processing apparatus 10 is composed of one computer will be described, but the information processing apparatus 10 may be realized by combining a plurality of computers. Also, the configuration shown in FIG. 3 is an example, and the information processing apparatus 10 may have configurations other than these, or may not have some of these configurations.

CPU10aは、RAM10b又はROM10cに記憶されたプログラムの実行に関する制御やデータの演算、加工を行う制御部である。CPU10aは、対象物の画像に基づいて、第1ニューラルネットワーク12a及び第2ニューラルネットワーク12bを用いて対象物1の状態を判定するプログラム(画像検査プログラム)を実行する演算部である。CPU10aは、入力部10eや通信部10dから種々のデータを受け取り、データの演算結果を表示部10fに表示したり、RAM10bやROM10cに格納したりする。 The CPU 10a is a control unit that controls the execution of programs stored in the RAM 10b or ROM 10c and performs data calculation and processing. The CPU 10a is an arithmetic unit that executes a program (image inspection program) for determining the state of the object 1 using the first neural network 12a and the second neural network 12b based on the image of the object. The CPU 10a receives various data from the input section 10e and the communication section 10d, displays the calculation results of the data on the display section 10f, and stores them in the RAM 10b and the ROM 10c.

RAM10bは、記憶部のうちデータの書き換えが可能なものであり、例えば半導体記憶素子で構成されてよい。RAM10bは、CPU10aが実行する画像検査プログラム、学習用画像12cといったデータを記憶してよい。なお、これらは例示であって、RAM10bには、これら以外のデータが記憶されていてもよいし、これらの一部が記憶されていなくてもよい。 The RAM 10b is a rewritable part of the storage unit, and may be composed of, for example, a semiconductor memory element. The RAM 10b may store data such as the image inspection program executed by the CPU 10a and the learning image 12c. Note that these are examples, and the RAM 10b may store data other than these, or may not store some of them.

ROM10cは、記憶部のうちデータの読み出しが可能なものであり、例えば半導体記憶素子で構成されてよい。ROM10cは、例えば画像検査プログラムや、書き換えが行われないデータを記憶してよい。 The ROM 10c is one of the storage units from which data can be read, and may be composed of, for example, a semiconductor memory element. The ROM 10c may store, for example, an image inspection program and data that is not rewritten.

通信部10dは、情報処理装置10を他の機器に接続するインターフェースである。通信部10dは、インターネット等の通信ネットワークに接続されてよい。 The communication unit 10d is an interface that connects the information processing device 10 to other devices. The communication unit 10d may be connected to a communication network such as the Internet.

入力部10eは、ユーザからデータの入力を受け付けるものであり、例えば、キーボード及びタッチパネルを含んでよい。 The input unit 10e receives data input from the user, and may include, for example, a keyboard and a touch panel.

表示部10fは、CPU10aによる演算結果を視覚的に表示するものであり、例えば、LCD(Liquid Crystal Display)により構成されてよい。表示部10fは、撮影部30により撮影された対象物1の画像を表示したり、学習用画像12cを表示したり、判定結果を表示したりしてよい。 The display unit 10f visually displays the calculation result by the CPU 10a, and may be configured by, for example, an LCD (Liquid Crystal Display). The display unit 10f may display an image of the object 1 captured by the imaging unit 30, a learning image 12c, or a determination result.

画像検査プログラムは、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 RAM 10b and the ROM 10c and provided, or may be provided via a communication network connected by the communication unit 10d. In the information processing apparatus 10, the CPU 10a executes the image inspection program to realize various operations described with reference to FIG. It should be noted that these physical configurations are examples, and do not necessarily have to be independent configurations. For example, the information processing apparatus 10 may include an LSI (Large-Scale Integration) in which the CPU 10a, the RAM 10b, and the ROM 10c are integrated.

図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 image inspection apparatus 100 according to this embodiment. The image IMG is a captured image of the object 1 . The image IMG includes the first line defect D1 and the second line defect D2. The first line defect D<b>1 is a flaw on the object 1 , and the second line defect D<b>2 is a flaw on the background of the object 1 . The object 1 is abnormal because it includes the first line defect D1, but the second line defect D2 is irrelevant to whether the object 1 is good or bad.

図5は、本実施形態に係る画像検査装置100により用いられる第2ニューラルネットワーク12bの一例を示す図である。同図では、第2ニューラルネットワーク12bの入力層INと、隠れ層HDNと、出力層のニューロンOUT1,OUT2,OUT3とを模式的に示している。隠れ層HDNは、複数のニューロンを含む。 FIG. 5 is a diagram showing an example of the second neural network 12b used by the image inspection apparatus 100 according to this embodiment. The figure schematically shows the input layer IN of the second neural network 12b, the hidden layer HDN, and the neurons OUT1, OUT2, and OUT3 of the output layer. The hidden layer HDN contains multiple neurons.

本例の第2ニューラルネットワーク12bは、隠れ層HDNの前段に含まれる複数のニューロンによって画像に含まれるエッジを識別し、中段に含まれる複数のニューロンによって画像に含まれる角を識別したり、白線や黒線を識別したりし、後段に含まれる複数のニューロンによって対象物1の特定の形状を識別する。なお、これらの識別内容は、説明のため簡略化している。 The second neural network 12b of this example identifies edges included in the image by a plurality of neurons included in the front stage of the hidden layer HDN, and identifies corners included in the image by a plurality of neurons included in the middle stage, and identifies a white line. and black lines, and a specific shape of the object 1 is identified by a plurality of neurons included in the latter stage. These identification contents are simplified for explanation.

具体的には、第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 object 1, and the ninth neuron N9 is activated when the image includes the upper left corner of the object 1. The 10th neuron N10 is a neuron that is activated when the image contains a hole in the object 1, and the 11th neuron N11 is a neuron that is activated when the image contains the entire object 1. It is a neuron that activates to

第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 object 1 is abnormal (if the object 1 has a defect), and the second neuron OUT2 of the output layer is activated when the object 1 is abnormal or normal. When it cannot be determined whether there is a defect (when it is not possible to determine whether the object 1 has a defect or not), the third neuron OUT3 in the output layer is activated when the object 1 is normal (when the object 1 has no defect). ).

図6は、本実施形態に係る画像検査装置100により用いられる第1ニューラルネットワーク12aの一例を示す図である。本例の第1ニューラルネットワーク12aは、第2ニューラルネットワーク12bの隠れ層HDNに含まれる複数のニューロンを枝刈りすることで生成されている。 FIG. 6 is a diagram showing an example of the first neural network 12a used by the image inspection apparatus 100 according to this embodiment. The first neural network 12a of this example is generated by pruning a plurality of neurons included in the hidden layer HDN of the second neural network 12b.

第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 neural network 12b, the first neural network 12a has a first neuron N1, a second neuron N2, a third neuron N3, a fourth neuron N4, a sixth neuron N6, an eighth neuron N8, and a ninth neuron. N9, 10th neuron N10, 11th neuron N11, 12th neuron N12 and 14th neuron N14 are pruned to reduce their scale.

生成部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 generation unit 14 fixes one or more neurons on the input layer side among the plurality of neurons included in the hidden layer HDN of the second neural network 12b, and fixes one or more neurons on the output layer side (in this example, 1st neuron N1, 2nd neuron N2, 3rd neuron N3, 4th neuron N4, 6th neuron N6, 8th neuron N8, 9th neuron N9, 10th neuron N10, 11th neuron N11, 12th neuron N12 and The first neural network 12a may be generated by performing learning processing using a plurality of learning images 12c with the weight parameter and bias parameter of the 14 neurons N14) set to zero.

また、判定部13は、第1ニューラルネットワーク12aの隠れ層HDNに含まれる複数のニューロンのうち所定のニューロンSの値を一時記憶し、第1ニューラルネットワーク12aを用いて対象物1の状態を判定した結果が所定の条件を満たさない場合、一時記憶した所定のニューロンSの値を用いて、第2ニューラルネットワーク12bにより対象物1の状態を判定してよい。第1ニューラルネットワーク12aの所定のニューロンSによって算出した値を第2ニューラルネットワーク12bで共用することで、第2ニューラルネットワーク12bによる判定に要する時間を短くすることができる。 Further, the determination unit 13 temporarily stores the value of a predetermined neuron S among a plurality of neurons included in the hidden layer HDN of the first neural network 12a, and determines the state of the object 1 using the first neural network 12a. If the result does not satisfy the predetermined condition, the state of the object 1 may be determined by the second neural network 12b using the temporarily stored predetermined neuron S value. By sharing the value calculated by the predetermined neuron S of the first neural network 12a with the second neural network 12b, the time required for determination by the second neural network 12b can be shortened.

図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 image inspection apparatus 100 according to this embodiment. The generation unit 14 generates candidate neural networks such that the ratio of scale to the second neural network 12b is equal to or less than a predetermined value, or generates candidate neural networks such that the ratio of neurons shared with the second neural network 12b is equal to or greater than a predetermined value. generate a network. The generation unit 14 allows the false positive rate of the candidate neural network to be greater than that of the second neural network 12b, while generating the candidate neural network so that the false negative rate of the candidate neural network is equal to or lower than that of the second neural network 12b. You may generate a network.

本例の場合、第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 neural network 12b, a ratio of neurons shared with the second neural network 12b of 10%, and the object 1 is normal. 4% of the cases cannot be judged whether it is abnormal or not. In addition, the second candidate neural network has a scale ratio of 40% with respect to the second neural network 12b, a ratio of neurons shared with the second neural network 12b is 20%, and the object 1 is normal or abnormal. 6% are unable to determine whether or not In addition, the third candidate neural network has a scale ratio of 20% with respect to the second neural network 12b, a ratio of neurons shared with the second neural network 12b is 5%, and the object 1 is normal or abnormal. 8% are unable to determine whether or not The fourth candidate neural network has a scale ratio of 30% to the second neural network 12b, a neuron ratio of 15% shared with the second neural network 12b, and the object 1 is normal or abnormal. 7% are unable to determine either

例えば、対象物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 object 1 is normal or abnormal, the first candidate neural network may be selected as the first neural network 12a. Also, if it is desired to increase the ratio of neurons shared with the second neural network 12b, the second candidate neural network may be selected as the first neural network 12a. On the other hand, if it is desired to keep the scale of the network as small as possible, the third candidate neural network may be selected as the first neural network 12a. Also, if it is desired to generate a network having all items in a well-balanced manner, the fourth candidate neural network may be selected as the first neural network 12a.

また、生成部14は、複数の候補ニューラルネットワーク及び第2ニューラルネットワーク12bによって画像に基づき対象物1の状態を判定する計算時間に基づいて、複数の候補ニューラルネットワークから、第1ニューラルネットワーク12aを選択してよい。 Further, the generation unit 14 selects the first neural network 12a from the plurality of candidate neural networks based on the calculation time for determining the state of the object 1 based on the image by the plurality of candidate neural networks and the second neural network 12b. You can

図8は、本実施形態に係る画像検査装置100により実行される第1ニューラルネットワーク選択処理のフローチャートである。はじめに、画像検査装置100は、学習用画像12cを用いた学習処理によって、第2ニューラルネットワーク12bを生成する(S10)。 FIG. 8 is a flowchart of the first neural network selection process executed by the image inspection apparatus 100 according to this embodiment. First, the image inspection apparatus 100 generates the second neural network 12b by learning processing using the learning image 12c (S10).

その後、画像検査装置100は、第2ニューラルネットワーク12bに対してN通りの規模縮小を実行し(S11)、学習用画像12cを用いた学習処理によって、第1ニューラルネットワークの第1候補~第N候補を生成する(S12)。ここで、Nは2以上の自然数である。 After that, the image inspection apparatus 100 performs N scale reductions on the second neural network 12b (S11), and by learning processing using the learning image 12c, the first candidate to the Nth candidate of the first neural network. A candidate is generated (S12). Here, N is a natural number of 2 or more.

そして、画像検査装置100は、第1ニューラルネットワークの第1候補~第N候補の計算時間と、第2ニューラルネットワーク12bの計算時間を測定し(S13)、計算時間に基づいて、第1候補~第N候補の中から第1ニューラルネットワーク12aを選択する(S14)。以上により、第1ニューラルネットワーク選択処理が終了する。 Then, the image inspection apparatus 100 measures the calculation time of the first to N-th candidates of the first neural network and the calculation time of the second neural network 12b (S13), and based on the calculation time, the first candidate to The first neural network 12a is selected from among the Nth candidates (S14). The above completes the first neural network selection process.

図9は、本実施形態に係る画像検査装置100により実行される状態判定処理のフローチャートである。はじめに、画像検査装置100は、対象物1の画像を撮影する(S20)。 FIG. 9 is a flowchart of state determination processing executed by the image inspection apparatus 100 according to this embodiment. First, the image inspection apparatus 100 takes an image of the object 1 (S20).

その後、画像検査装置100は、画像を第1ニューラルネットワーク12aに入力し、出力層の活性状態を算出する(S21)。そして、OK(対象物1が正常)又はNG(対象物1が以上)に対応する出力層のニューロンの値が最大であるか判定する(S22)。すなわち、対象物1が正常とも異常とも判定できないグレー状態に対応する出力層のニューロンの値が最大でないか判定する。 After that, the image inspection apparatus 100 inputs the image to the first neural network 12a and calculates the active state of the output layer (S21). Then, it is determined whether the value of the neuron in the output layer corresponding to OK (object 1 is normal) or NG (object 1 is above) is maximum (S22). That is, it is determined whether the value of the neuron in the output layer corresponding to the gray state in which the object 1 cannot be determined to be normal or abnormal is the maximum.

OK又はNGに対応するニューロンの値が最大である場合(S22:YES)、画像検査装置100は、第1ニューラルネットワーク12aの出力に基づき、対象物1の状態を判定する(S23)。 If the neuron value corresponding to OK or NG is the maximum (S22: YES), the image inspection apparatus 100 determines the state of the object 1 based on the output of the first neural network 12a (S23).

一方、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 image inspection apparatus 100 inputs the image to the second neural network 12b. Then, the active state of the output layer is calculated (S24), and the state of the object 1 is determined based on the output of the second neural network 12b (S25). With the above, the determination processing ends.

このように、本実施形態に係る画像検査装置100によれば、第2ニューラルネットワーク12bより演算負荷が軽い第1ニューラルネットワーク12aによる判定結果が所定の条件を満たす場合に、第2ニューラルネットワーク12bによる判定を省略することで、判定に要する時間の期待値を短くすることができる。 As described above, according to the image inspection apparatus 100 according to the present embodiment, when the determination result by the first neural network 12a whose computational load is lighter than that of the second neural network 12b satisfies a predetermined condition, the second neural network 12b is used. By omitting the determination, the expected value of the time required for the determination can be shortened.

以上説明した実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。実施形態が備える各要素並びにその配置、材料、条件、形状及びサイズ等は、例示したものに限定されるわけではなく適宜変更することができる。また、異なる実施形態で示した構成同士を部分的に置換し又は組み合わせることが可能である。 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 SYMBOLS 10... Information processing apparatus 10a...CPU, 10b...RAM, 10c...ROM, 10d...Communication part, 10e...Input part, 10f...Display part, 11... Acquisition part, 12... Storage part, 12a...First neural network, 12b... Second neural network 12c... Learning image 13... Judging unit 14... Generating unit 20... Illuminating unit 30... Imaging unit 100... Image inspection device

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.
前記生成部は、前記第2ニューラルネットワークの隠れ層に含まれる複数のニューロンのうち、入力層側の1又は複数のニューロンを固定し、出力層側の1又は複数のニューロンのパラメータをゼロとして、前記複数の学習用画像を用いた学習処理を行うことで、前記第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 .
前記生成部は、前記第2ニューラルネットワークに対する前記第1ニューラルネットワークの規模の割合が所定値以下となるように、前記第1ニューラルネットワークを生成する、
請求項又はに記載の画像検査装置。
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ニューラルネットワークの隠れ層に含まれる複数のニューロンのうち所定のニューロンの値を一時記憶し、前記第1ニューラルネットワークを用いて前記対象物の状態を判定した結果が前記所定の条件を満たさない場合、一時記憶した前記所定のニューロンの値を用いて、前記第2ニューラルネットワークにより前記対象物の状態を判定する、
請求項からのいずれか一項に記載の画像検査装置。
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 .
前記生成部は、前記第1ニューラルネットワークの隠れ層に含まれる前記複数のニューロンに対する前記所定のニューロンの割合が所定値以上となるように、前記第1ニューラルネットワークを生成する、
請求項に記載の画像検査装置。
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 .
JP2019053274A 2019-03-20 2019-03-20 Image inspection device Active JP7118365B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019028960A (en) 2017-08-04 2019-02-21 オムロン株式会社 Image processing system

Patent Citations (1)

* Cited by examiner, † Cited by third party
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