JPWO2020031422A1 - Object detection method, object detection device and computer program - Google Patents

Object detection method, object detection device and computer program Download PDF

Info

Publication number
JPWO2020031422A1
JPWO2020031422A1 JP2020536308A JP2020536308A JPWO2020031422A1 JP WO2020031422 A1 JPWO2020031422 A1 JP WO2020031422A1 JP 2020536308 A JP2020536308 A JP 2020536308A JP 2020536308 A JP2020536308 A JP 2020536308A JP WO2020031422 A1 JPWO2020031422 A1 JP WO2020031422A1
Authority
JP
Japan
Prior art keywords
type
pixel
captured image
detection
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2020536308A
Other languages
Japanese (ja)
Other versions
JP7245451B2 (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.)
Sumitomo Electric Industries Ltd
Original Assignee
Sumitomo Electric Industries Ltd
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 Sumitomo Electric Industries Ltd filed Critical Sumitomo Electric Industries Ltd
Publication of JPWO2020031422A1 publication Critical patent/JPWO2020031422A1/en
Application granted granted Critical
Publication of JP7245451B2 publication Critical patent/JP7245451B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)

Abstract

撮像画像に含まれるオブジェクトを検出するオブジェクト検出方法であって、撮像画像に含まれるオブジェクトの種類を検出し、撮像画像に含まれるオブジェクトを画素単位で検出し、オブジェクトの種類、及び画素単位で検出されたオブジェクトの画素に基づいて、オブジェクトの大きさ及び種類を画素単位で決定する。This is an object detection method that detects objects included in a captured image. It detects the type of object included in the captured image, detects the object contained in the captured image in pixel units, and detects the object type and pixel unit. The size and type of the object are determined on a pixel-by-pixel basis based on the pixels of the object.

Description

本開示はオブジェクト検出方法、オブジェクト検出装置及びコンピュータプログラムに関する。
本出願は、2018年8月6日出願の日本出願第2018−147979号に基づく優先権を主張し、前記日本出願に記載された全ての記載内容を援用するものである。
The present disclosure relates to object detection methods, object detection devices and computer programs.
This application claims priority based on Japanese Application No. 2018-147979 filed on August 6, 2018, and incorporates all the contents described in the Japanese application.

工業的に生産される部品を撮像し、撮像して得られる良品及び不良品の撮像画像を教師データとしてニューラルネットワークを深層機械学習させることにより、学習済みニューラルネットワークを用いた部品の良否判定を行うことができる。 By imaging industrially produced parts and deep machine learning the neural network using the captured images of good and defective products obtained by imaging as teacher data, the quality of the parts is judged using the trained neural network. be able to.

一方、Tensorflow(登録商標)を用いた画像認識技術を利用することにより、撮像画像に含まれるオブジェクトの位置及び範囲、当該オブジェクトの種類を検出する技術がある。例えば、撮像画像に含まれる人物、動物、車両等の画像部分を検出することができる。
また、非特許文献1は、オートエンコーダを用いて、データの特徴量を自己学習する技術を開示している。
On the other hand, there is a technique for detecting the position and range of an object included in a captured image and the type of the object by using an image recognition technique using Tensorflow (registered trademark). For example, it is possible to detect an image portion of a person, an animal, a vehicle, or the like included in a captured image.
Further, Non-Patent Document 1 discloses a technique for self-learning a feature amount of data by using an autoencoder.

G. E. Hinton and R. Salakhutdinov, “Reducing the Dimensionality of Data with Neural Networks”, Science, vol. 313, p. 504-507G. E. Hinton and R. Salakhutdinov, “Reducing the Dimensionality of Data with Neural Networks”, Science, vol. 313, p. 504-507

本開示のオブジェクト検出方法は、撮像画像に含まれるオブジェクトを検出するオブジェクト検出方法であって、前記撮像画像に含まれる前記オブジェクトの種類を検出する第1の方式にて前記オブジェクトを検出し、前記撮像画像に含まれる前記オブジェクトを画素単位で検出する第2の方式にて前記オブジェクトを検出し、前記第1の方式にて検出された前記オブジェクトの種類、及び前記第2の方式にて検出された前記オブジェクトに基づいて、前記オブジェクトの大きさ及び種類を画素単位で決定し、前記オブジェクトに関して所定の判定を行うための閾値を、該オブジェクトの種類に基づいて選択し、画素単位で決定された前記オブジェクトと、前記種類に基づいて選択された閾値とに基づいて前記所定の判定を行う。 The object detection method of the present disclosure is an object detection method for detecting an object included in a captured image, wherein the object is detected by a first method for detecting the type of the object included in the captured image, and the above-mentioned object detection method is performed. The object is detected by the second method of detecting the object included in the captured image on a pixel-by-pixel basis, the type of the object detected by the first method, and the detection by the second method. Based on the object, the size and type of the object are determined in pixel units, and a threshold value for making a predetermined determination regarding the object is selected based on the type of the object and determined in pixel units. The predetermined determination is made based on the object and the threshold selected based on the type.

本開示のオブジェクト検出装置は、撮像画像に含まれるオブジェクトを検出するオブジェクト検出装置であって、前記撮像画像に含まれる前記オブジェクトの種類を検出する第1検出部と、前記撮像画像に含まれる前記オブジェクトを画素単位で検出する第2検出部と、前記第1検出部にて検出された前記オブジェクトの種類、及び前記第2検出部にて画素単位で検出された前記オブジェクトに基づいて、前記オブジェクトの大きさ及び種類を画素単位で決定する決定部と、前記オブジェクトに関して所定の判定を行うための閾値を、該オブジェクトの種類に基づいて選択する選択部と、画素単位で決定された前記オブジェクトと、前記種類に基づいて選択された閾値とに基づいて前記所定の判定を行う判定部とを備える。 The object detection device of the present disclosure is an object detection device that detects an object included in the captured image, and includes a first detection unit that detects the type of the object included in the captured image and the said object included in the captured image. The object is based on a second detection unit that detects an object on a pixel-by-pixel basis, the type of the object detected by the first detection unit, and the object detected on a pixel-by-pixel basis by the second detection unit. A determination unit that determines the size and type of the object on a pixel-by-pixel basis, a selection unit that selects a threshold value for making a predetermined determination on the object based on the type of the object, and the object determined on a pixel-by-pixel basis. A determination unit that makes the predetermined determination based on the threshold value selected based on the type.

本開示のコンピュータプログラムは、コンピュータに撮像画像に含まれるオブジェクトを検出させるためのコンピュータプログラムであって、前記コンピュータに、前記撮像画像に含まれる前記オブジェクトの種類を検出する第1の方式にて前記オブジェクトを検出し、前記撮像画像に含まれる前記オブジェクトを画素単位で検出する第2の方式にて前記オブジェクトを検出し、前記第1の方式にて検出された前記オブジェクトの種類、及び前記第2の方式にて検出された前記オブジェクトに基づいて、前記オブジェクトの大きさ及び種類を画素単位で決定し、前記オブジェクトに関して所定の判定を行うための閾値を、該オブジェクトの種類に基づいて選択し、画素単位で決定された前記オブジェクトと、前記種類に基づいて選択された閾値とに基づいて前記所定の判定を行う処理を実行させる。 The computer program of the present disclosure is a computer program for causing a computer to detect an object included in a captured image, and is described by the first method of detecting the type of the object included in the captured image by the computer. The type of the object detected by the second method of detecting the object and detecting the object included in the captured image on a pixel-by-pixel basis, and the second method. Based on the object detected by the method of, the size and type of the object are determined in pixel units, and a threshold value for making a predetermined determination regarding the object is selected based on the type of the object. The process of performing the predetermined determination is executed based on the object determined in pixel units and the threshold value selected based on the type.

本開示のコンピュータプログラムは、コンピュータに撮像画像に含まれるオブジェクトを検出して得られる情報を表示させるためのコンピュータプログラムであって、前記コンピュータに、前記撮像画像に含まれる前記オブジェクトの種類を検出する第1の方式にて前記オブジェクトを検出して得られた情報と、前記撮像画像に含まれる前記オブジェクトを画素単位で検出する第2の方式にて前記オブジェクトを検出して得られた情報とに基づく情報を表示させる処理を実行させる。 The computer program of the present disclosure is a computer program for displaying information obtained by detecting an object included in a captured image on a computer, and causes the computer to detect the type of the object included in the captured image. The information obtained by detecting the object by the first method and the information obtained by detecting the object by the second method of detecting the object included in the captured image in pixel units. Execute the process to display the based information.

なお、本願は、オブジェクト検出装置の一部又は全部を実現する半導体集積回路として実現したり、オブジェクト検出装置を含むその他のシステムとして実現したりすることができる。 The present application can be realized as a semiconductor integrated circuit that realizes a part or all of the object detection device, or can be realized as another system including the object detection device.

図1は実施形態1に係る異変検知装置のハードウェア構成を示すブロック図である。FIG. 1 is a block diagram showing a hardware configuration of the incident detection device according to the first embodiment. 図2は実施形態1に係る異変検知装置の構成例を示す機能ブロック図である。FIG. 2 is a functional block diagram showing a configuration example of the incident detection device according to the first embodiment. 図3はオブジェクト検出に係る処理手順を示すフローチャートである。FIG. 3 is a flowchart showing a processing procedure related to object detection. 図4はマッピング処理を示すフローチャートである。FIG. 4 is a flowchart showing the mapping process. 図5Aは第1検出部によるオブジェクト検出方法を示す説明図である。FIG. 5A is an explanatory diagram showing an object detection method by the first detection unit. 図5Bは第1検出部によるオブジェクト検出方法を示す説明図である。FIG. 5B is an explanatory diagram showing an object detection method by the first detection unit. 図6は第2検出部によるオブジェクト検出方法を示す説明図である。FIG. 6 is an explanatory diagram showing an object detection method by the second detection unit. 図7は画素単位でオブジェクトの位置及び種類を決定する方法を示す説明図である。FIG. 7 is an explanatory diagram showing a method of determining the position and type of an object on a pixel-by-pixel basis. 図8はオブジェクトの寸法測定に係る処理手順を示すフローチャートである。FIG. 8 is a flowchart showing a processing procedure related to the dimension measurement of the object. 図9はオブジェクトの寸法測定方法を示す説明図である。FIG. 9 is an explanatory view showing a method of measuring the dimensions of an object. 図10はオブジェクトの良否判定処理手順を示すフローチャートである。FIG. 10 is a flowchart showing a procedure for determining the quality of an object. 図11はオブジェクトの良否判定方法を示す説明図である。FIG. 11 is an explanatory diagram showing a method of determining the quality of an object. 図12Aは重なり合っているオブジェクトの検出及び寸法測定方法を示す説明図である。FIG. 12A is an explanatory diagram showing a method of detecting and measuring the dimensions of overlapping objects. 図12Bは重なり合っているオブジェクトの検出及び寸法測定方法を示す説明図である。FIG. 12B is an explanatory diagram showing a method of detecting and measuring the dimensions of overlapping objects. 図12Cは重なり合っているオブジェクトの検出及び寸法測定方法を示す説明図である。FIG. 12C is an explanatory diagram showing a method of detecting and measuring the dimensions of overlapping objects. 図12Dは重なり合っているオブジェクトの検出及び寸法測定方法を示す説明図である。FIG. 12D is an explanatory diagram showing a method of detecting and measuring the dimensions of overlapping objects. 図13は実施形態2に係る異変検知システムの構成例を示すブロック図である。FIG. 13 is a block diagram showing a configuration example of the incident detection system according to the second embodiment. 図14は実施形態2に係る追加学習に係る処理手順を示すフローチャートである。FIG. 14 is a flowchart showing a processing procedure related to the additional learning according to the second embodiment. 図15は学習用データの生成に係る処理手順を示すフローチャートである。FIG. 15 is a flowchart showing a processing procedure related to the generation of learning data. 図16は学習用データの生成方法を示す説明図である。FIG. 16 is an explanatory diagram showing a method of generating learning data. 図17Aは学習用データの生成方法を示す説明図である。FIG. 17A is an explanatory diagram showing a method of generating learning data. 図17Bは学習用データの生成方法を示す説明図である。FIG. 17B is an explanatory diagram showing a method of generating learning data.

[本開示が解決しようとする課題]
ところで、Tensorflow(登録商標)を用いた画像認識技術によれば、オブジェクトを囲むバウンディングボックスによって、当該オブジェクトの位置及び範囲をおおよそ特定することができるが、画素単位でオブジェクトの位置及び種類を検出することができないという問題がある。
[Issues to be solved by this disclosure]
By the way, according to the image recognition technology using Tensorflow (registered trademark), the position and range of the object can be roughly specified by the bounding box surrounding the object, but the position and type of the object are detected on a pixel-by-pixel basis. There is a problem that it cannot be done.

例えば、オブジェクトの種類を特定できても当該オブジェクトの寸法を正確に検出できない。部品に付着した髪のような線状の異物がオブジェクトとして検出されたとしても、当該異物の画像を囲むバウンディングボックスには、背景画像も多分に含まれ、バウンディングボックスの大きさから異物の大きさを特定することはできない。異物の大きさが特定できないと、許容される異変なのか否かを判断することができない。 For example, even if the type of an object can be specified, the dimensions of the object cannot be detected accurately. Even if a linear foreign object such as hair attached to a part is detected as an object, the bounding box surrounding the image of the foreign object probably includes a background image, and the size of the foreign object is determined by the size of the bounding box. Cannot be specified. If the size of the foreign matter cannot be specified, it cannot be determined whether or not it is an acceptable abnormality.

本開示の目的は、撮像画像に含まれるオブジェクトの大きさ及び種類を画素単位で検出することができるオブジェクト検出方法、オブジェクト検出装置及びコンピュータプログラムを提供することにある。 An object of the present disclosure is to provide an object detection method, an object detection device, and a computer program capable of detecting the size and type of an object included in a captured image on a pixel-by-pixel basis.

[本開示の効果]
本開示によれば、撮像画像に含まれるオブジェクトの大きさ及び種類を画素単位で検出することができるオブジェクト検出方法、オブジェクト検出装置及びコンピュータプログラムを提供することが可能となる。
[Effect of the present disclosure]
According to the present disclosure, it is possible to provide an object detection method, an object detection device, and a computer program capable of detecting the size and type of an object included in a captured image on a pixel-by-pixel basis.

[本開示の実施形態の説明]
最初に本開示の実施態様を列記して説明する。また、以下に記載する実施形態の少なくとも一部を任意に組み合わせてもよい。
[Explanation of Embodiments of the present disclosure]
First, embodiments of the present disclosure will be listed and described. In addition, at least a part of the embodiments described below may be arbitrarily combined.

(1)本開示のオブジェクト検出方法は、撮像画像に含まれるオブジェクトを検出するオブジェクト検出方法であって、前記撮像画像に含まれる前記オブジェクトの位置及び範囲をバウンディングボックスにて特定すると共に、該バウンディングボックスによって囲まれる前記オブジェクトの種類を検出する第1の方式にて前記オブジェクトを検出し、前記撮像画像に含まれる前記オブジェクトの位置を画素単位で検出する第2の方式にて前記オブジェクトを検出し、前記第1の方式にて検出された前記オブジェクトの位置及び範囲、該オブジェクトの種類、並びに前記第2の方式にて検出された前記オブジェクトの画素の位置に基づいて、前記オブジェクトの位置及び種類を画素単位で決定する。 (1) The object detection method of the present disclosure is an object detection method for detecting an object included in a captured image, in which the position and range of the object included in the captured image are specified by a bounding box and the bounding is performed. The object is detected by the first method of detecting the type of the object surrounded by the box, and the object is detected by the second method of detecting the position of the object included in the captured image in pixel units. , The position and range of the object detected by the first method, the type of the object, and the position and type of the object based on the position of the pixel of the object detected by the second method. Is determined on a pixel-by-pixel basis.

本開示にあっては、2つの方式でオブジェクトを検出する。第1の方式は、オブジェクトの位置及び範囲をおおよそ特定することができるが、オブジェクトの種類を検出することができる検出方法である。第2の方式は、オブジェクトの位置を画素単位で正確に検出することができるが、オブジェクトの種類を特定することができない検出方法である。
本開示のオブジェクト検出方法は、上記第1の方式で特定及び検出されたオブジェクトの位置及び範囲、並びに当該オブジェクトの種類のデータと、第2の方式により画素単位で検出されたオブジェクトの画素位置のデータとに基づいて、オブジェクトの位置及び種類を画素単位で決定する。
従って、撮像画像に含まれるオブジェクトの位置及び範囲を画素単位で検出することが可能である。
なお、第1の方式によるオブジェクトの検出処理と、第2の方式によるオブジェクトの検出処理とを実行する順序は限定されるものでは無く、逆順で実行しても良いし、同時並行的に実行しても良い。
In the present disclosure, objects are detected by two methods. The first method is a detection method in which the position and range of an object can be roughly specified, but the type of the object can be detected. The second method is a detection method in which the position of an object can be accurately detected on a pixel-by-pixel basis, but the type of the object cannot be specified.
The object detection method of the present disclosure includes the position and range of the object specified and detected by the first method, the data of the type of the object, and the pixel position of the object detected in pixel units by the second method. Based on the data, the position and type of the object are determined on a pixel-by-pixel basis.
Therefore, it is possible to detect the position and range of the object included in the captured image on a pixel-by-pixel basis.
The order in which the object detection process by the first method and the object detection process by the second method are executed is not limited, and may be executed in the reverse order or executed in parallel. You may.

(2)前記オブジェクトに関して所定の判定を行うための閾値を、該オブジェクトの種類に基づいて選択し、画素単位で決定された前記オブジェクトの位置及び種類と、該種類に基づいて選択された閾値とに基づいて前記所定の判定を行う構成が好ましい。 (2) A threshold value for making a predetermined determination regarding the object is selected based on the type of the object, the position and type of the object determined in pixel units, and the threshold value selected based on the type. It is preferable to make the predetermined determination based on the above.

本開示にあっては、オブジェクトの種類によって異なる閾値を選択し、画素単位で検出されたオブジェクトの位置及び種類と、当該種類に対応する閾値とに基づいて、所定の判定を行うことができる。
例えば、撮像画像は、製造される部品等の検査対象物、オブジェクトは、部品に付着した埃、髪、へこみ、傷等の異変であり、かかるオブジェクトの種類毎に異なる閾値を用いて、検査対象物の良、不良を判定することができる。
In the present disclosure, different threshold values can be selected depending on the type of object, and a predetermined determination can be made based on the position and type of the object detected in pixel units and the threshold value corresponding to the type.
For example, the captured image is an inspection target such as a manufactured part, and the object is an abnormality such as dust, hair, dents, scratches, etc. attached to the part. It is possible to judge whether an object is good or bad.

(3)前記オブジェクトの一の種類の画素の総数と、該種類に基づいて選択された閾値とを比較することによって、前記所定の判定を行う構成が好ましい。 (3) It is preferable to make the predetermined determination by comparing the total number of pixels of one type of the object with the threshold value selected based on the type.

本開示にあっては、一の種類のオブジェクトを構成する画素の総数と、当該一の種類に対応する閾値とを比較することによって、所定の判定を行う。
例えば、上記の検査対象物の例においては、画素の総数は部品に付着した埃、髪、へこみ、傷等の寸法に相当し、オブジェクトの種類毎に異なる閾値を用いて検査対象物の良、不良を判定することができる。
In the present disclosure, a predetermined determination is made by comparing the total number of pixels constituting one type of object with the threshold value corresponding to the one type.
For example, in the above example of the inspection object, the total number of pixels corresponds to the dimensions of dust, hair, dents, scratches, etc. attached to the part, and the inspection object is good, using different threshold values for each object type. Defects can be determined.

(4)前記第2の方式による前記オブジェクトの検出は、前記撮像画像のデータが入力された場合、入力された該データの特徴が抽出された特徴抽出画像のデータを出力する学習済みオートエンコーダを用いて行う構成が好ましい。 (4) The detection of the object by the second method is performed by a trained autoencoder that outputs the data of the feature extraction image from which the features of the input data are extracted when the data of the captured image is input. The configuration performed by using is preferable.

本開示にあっては、学習済みオートエンコーダを用いることによって、画素単位でオブジェクトの位置を正確に検出することができる。 In the present disclosure, by using the trained autoencoder, the position of the object can be accurately detected on a pixel-by-pixel basis.

(5)前記第1の方式による前記オブジェクトの検出は、前記撮像画像のデータが入力された場合、該撮像画像に含まれる前記オブジェクトの位置及び範囲並びに該オブジェクトの種類を出力する学習済みの画像認識ニューラルネットワークを用いて行う構成が好ましい。 (5) In the detection of the object by the first method, when the data of the captured image is input, the trained image that outputs the position and range of the object included in the captured image and the type of the object. A configuration using a recognition neural network is preferable.

本開示にあっては、学習済みの画像認識ニューラルネットワークを用いることによって、様々な特徴を有するオブジェクトを認識し、オブジェクトの位置及び範囲並びに当該オブジェクトの種類を検出することができる。 In the present disclosure, by using a trained image recognition neural network, it is possible to recognize an object having various characteristics, detect the position and range of the object, and detect the type of the object.

(6)前記第1の方式による検出結果と、前記第2の方式による検出結果が整合しない場合、前記第1の方式と異なる第3の方式にて前記撮像画像に含まれる前記オブジェクトの種類を検出し、前記画像認識ニューラルネットワークに前記撮像画像のデータが入力された場合、前記第3の方式にて検出された前記オブジェクトの位置及び範囲並びに該オブジェクトの種類が出力されるように、前記撮像画像及び前記第3の方式に係る検出結果を用いて、前記画像認識ニューラルネットワークを追加学習させる構成が好ましい。 (6) When the detection result by the first method and the detection result by the second method do not match, the type of the object included in the captured image is determined by a third method different from the first method. When the data of the captured image is input to the image recognition neural network after detection, the imaging is performed so that the position and range of the object detected by the third method and the type of the object are output. It is preferable that the image recognition neural network is additionally trained by using the image and the detection result according to the third method.

本開示にあっては、態様(1)で説明した第1の方式によるオブジェクトの検出結果と、上記第2の方式によるオブジェクトの検出結果とが整合しない場合、特に、オブジェクトの種類の検出に失敗した場合、第3の方式でオブジェクトの種類を検出する。そして、第3方式による検出結果を用いて画像認識ニューラルネットワークを追加学習させることによって、第1の方式によるオブジェクトの検出精度を自動的に向上させることができる。 In the present disclosure, if the object detection result by the first method described in the second method and the object detection result by the second method do not match, the detection of the object type fails, in particular. If so, the type of object is detected by the third method. Then, by additionally learning the image recognition neural network using the detection result by the third method, the detection accuracy of the object by the first method can be automatically improved.

(7)前記第3の方式は、前記オブジェクトの輪郭線の形状パターンに基づいて前記オブジェクトの種類を検出する構成が好ましい。 (7) The third method preferably has a configuration in which the type of the object is detected based on the shape pattern of the contour line of the object.

本開示にあっては、画像認識ニューラルネットワークで検出できなかったオブジェクトの種類を、当該オブジェクトの輪郭線の形状パターンに基づいて検出し、上記画像認識ニューラルネットワークを追加学習させることができる。 In the present disclosure, an object type that could not be detected by the image recognition neural network can be detected based on the shape pattern of the contour line of the object, and the image recognition neural network can be additionally learned.

(8)前記第3の方式にて前記オブジェクトの種類を検出できなった場合、該オブジェクトの種類をユーザから受け付け、前記画像認識ニューラルネットワークに前記撮像画像のデータが入力された場合、前記オブジェクトの位置及び範囲並びに該オブジェクトの種類が出力されるように、前記撮像画像及び受け付けた前記オブジェクトの種類を用いて、前記画像認識ニューラルネットワークを追加学習させる構成が好ましい。 (8) When the type of the object cannot be detected by the third method, the type of the object is accepted from the user, and when the data of the captured image is input to the image recognition neural network, the object of the object It is preferable that the image recognition neural network is additionally learned by using the captured image and the received type of the object so that the position and range and the type of the object are output.

本開示にあっては、第3の方式でもオブジェクトの種類を認識できなった場合、ユーザからオブジェクトの種類を受け付け、受け付けた内容を用いて画像認識ニューラルネットワークを追加学習させることができる。つまり上記態様(6)及び(7)により、可能な限り自動的に画像認識ニューラルネットワークを追加学習させると共に、第3の方式でも認識できない未知のオブジェクトに関してはユーザの人手を借りて画像認識ニューラルネットワークの追加学習を行う。
従って、未知のオブジェクトが発生し得る環境においても、各種オブジェクトを認識できるよう、半自動的に画像認識ニューラルネットワークを追加学習させ、種々のオブジェクトの位置及び種類を画素単位で検出可能となる。
In the present disclosure, when the type of the object cannot be recognized even by the third method, the type of the object can be received from the user, and the image recognition neural network can be additionally learned by using the received contents. That is, according to the above aspects (6) and (7), the image recognition neural network is automatically additionally learned as much as possible, and the image recognition neural network is helped by the user for unknown objects that cannot be recognized even by the third method. Perform additional learning.
Therefore, even in an environment where unknown objects can occur, the image recognition neural network is semi-automatically additionally learned so that various objects can be recognized, and the positions and types of various objects can be detected on a pixel-by-pixel basis.

(9)前記画像認識ニューラルネットワークを用いた前記オブジェクトの検出と、該画像認識ニューラルネットワークの追加学習とを並行的に実行する構成が好ましい。 (9) A configuration in which the detection of the object using the image recognition neural network and the additional learning of the image recognition neural network are executed in parallel is preferable.

本開示にあっては、画像認識ニューラルネットワークを用いたオブジェクトの検出と、画像認識ニューラルネットワークの追加学習を並行的に実行することができる。従って、画像認識ニューラルネットワークの学習処理中も、オブジェクトの検出処理を継続することができる。 In the present disclosure, object detection using an image recognition neural network and additional learning of the image recognition neural network can be executed in parallel. Therefore, the object detection process can be continued even during the learning process of the image recognition neural network.

(10)前記撮像画像は検査対象物を撮像して得た画像であり、検出対象の前記オブジェクトは該検査対象物における異変部位である構成が好ましい。 (10) The captured image is an image obtained by imaging an inspection target object, and the object to be detected is preferably a change site in the inspection target object.

本開示にあっては、検査対象物の異変部位及び種類を、画素単位で検出することができる。 In the present disclosure, the abnormal portion and type of the inspection object can be detected on a pixel-by-pixel basis.

(11)本開示のオブジェクト検出装置は、撮像画像に含まれるオブジェクトを検出するオブジェクト検出装置であって、前記撮像画像に含まれる前記オブジェクトの位置及び範囲をバウンディングボックスにて特定すると共に、該バウンディングボックスによって囲まれる前記オブジェクトの種類を検出する第1検出部と、前記撮像画像に含まれる前記オブジェクトの位置を画素単位で検出する第2検出部と、前記第1検出部にて検出された前記オブジェクトの位置及び範囲、該オブジェクトの種類、並びに前記第2検出部にて画素単位で検出された前記オブジェクトの画素の位置に基づいて、前記オブジェクトの位置及び種類を画素単位で決定する決定部とを備える。 (11) The object detection device of the present disclosure is an object detection device that detects an object included in a captured image, and specifies the position and range of the object included in the captured image with a bounding box, and the bounding. A first detection unit that detects the type of the object surrounded by a box, a second detection unit that detects the position of the object included in the captured image on a pixel-by-pixel basis, and the first detection unit that detects the object. A determination unit that determines the position and type of the object on a pixel-by-pixel basis based on the position and range of the object, the type of the object, and the position of the pixel of the object detected by the second detection unit on a pixel-by-pixel basis. To be equipped with.

本開示にあっては、態様(1)と同様にして、撮像画像に含まれるオブジェクトの位置及び種類を画素単位で検出することができる。 In the present disclosure, the position and type of the object included in the captured image can be detected on a pixel-by-pixel basis in the same manner as in the aspect (1).

(12)本開示のコンピュータプログラムは、コンピュータに撮像画像に含まれるオブジェクトを検出させるためのコンピュータプログラムであって、前記コンピュータに、前記撮像画像に含まれる前記オブジェクトの位置及び範囲をバウンディングボックスにて特定すると共に、該バウンディングボックスによって囲まれる前記オブジェクトの種類を検出する第1の方式にて前記オブジェクトを検出し、前記撮像画像に含まれる前記オブジェクトの位置を画素単位で検出する第2の方式にて前記オブジェクトを検出し、前記第1の方式にて検出された前記オブジェクトの位置及び範囲、該オブジェクトの種類、並びに前記第2の方式にて検出された前記オブジェクトの画素の位置に基づいて、前記オブジェクトの位置及び種類を画素単位で決定する処理を実行させる。 (12) The computer program of the present disclosure is a computer program for causing a computer to detect an object included in a captured image, and causes the computer to set a position and a range of the object included in the captured image in a bounding box. A second method of detecting the object by the first method of detecting the type of the object surrounded by the bounding box and detecting the position of the object included in the captured image on a pixel-by-pixel basis. Based on the position and range of the object detected by the first method, the type of the object, and the position of the pixel of the object detected by the second method. A process of determining the position and type of the object on a pixel-by-pixel basis is executed.

本開示にあっては、コンピュータを態様(11)に係るオブジェクト検出装置として機能させることができる。 In the present disclosure, the computer can function as the object detection device according to the aspect (11).

(13)本開示のコンピュータプログラムは、コンピュータに撮像画像に含まれるオブジェクトを検出して得られる情報を表示させるためのコンピュータプログラムであって、前記コンピュータに、前記撮像画像に含まれる前記オブジェクトの位置及び範囲をバウンディングボックスにて特定すると共に、該バウンディングボックスによって囲まれる前記オブジェクトの種類を検出する第1の方式にて前記オブジェクトを検出して得られた情報と、前記撮像画像に含まれる前記オブジェクトの位置を画素単位で検出する第2の方式にて前記オブジェクトを検出して得られた情報とに基づく情報を表示させる処理を実行させる。 (13) The computer program of the present disclosure is a computer program for causing a computer to detect an object included in a captured image and display information obtained by detecting an object included in the captured image, and causes the computer to display the position of the object included in the captured image. And the range is specified by the bounding box, and the information obtained by detecting the object by the first method of detecting the type of the object surrounded by the bounding box, and the object included in the captured image. A process of displaying information based on the information obtained by detecting the object by the second method of detecting the position of the object on a pixel-by-pixel basis is executed.

本開示にあっては、第1の方式にてオブジェクトを検出して得られる情報と、第2の方式にてオブジェクトを検出して得られる情報とに基づく情報、例えば画素単位で検出されたオブジェクトの位置及び種類に関する情報を表示させることができる。 In the present disclosure, information based on information obtained by detecting an object by the first method and information obtained by detecting an object by the second method, for example, an object detected in pixel units. Information about the position and type of the object can be displayed.

[本開示の実施形態の詳細]
本開示の実施形態に係るオブジェクト検出方法、異変検知装置及びコンピュータプログラムの具体例を、以下に図面を参照しつつ説明する。なお、本開示はこれらの例示に限定されるものではなく、請求の範囲によって示され、請求の範囲と均等の意味及び範囲内でのすべての変更が含まれることが意図される。
[Details of Embodiments of the present disclosure]
Specific examples of the object detection method, the incident detection device, and the computer program according to the embodiment of the present disclosure will be described below with reference to the drawings. It should be noted that the present disclosure is not limited to these examples, but is indicated by the scope of claims and is intended to include all modifications within the meaning and scope equivalent to the scope of claims.

(実施形態1)
<異変検知装置のハードウェア構成>
図1は、実施形態1に係る異変検知装置1のハードウェア構成を示すブロック図である。異変検知装置1(オブジェクト検出装置)は、例えば一又は複数のCPU(Central Processing Unit)、マルチコアCPU、GPU(Graphics Processing Unit)、TPU(Tensor Processing Unit)等の演算部11を有するコンピュータである。演算部11には、一時記憶部12、画像入力部13、出力部14、入力部15、記憶部16及びデータ蓄積部17がバスラインを介して接続されている。本実施形態1に係る異変検知装置1は、製造される検査対象物を撮像して得られる撮像画像5(図5A参照)の画像データを取得し、撮像画像5に含まれる検出対象であるオブジェクト6、例えば検査対象物に付着した埃、髪、検査対象物のへこみ等の異変部位を検知するものである。検査対象物は、例えば、ワイヤハーネスを構成するコネクタである。
(Embodiment 1)
<Hardware configuration of incident detection device>
FIG. 1 is a block diagram showing a hardware configuration of the incident detection device 1 according to the first embodiment. The incident detection device 1 (object detection device) is a computer having, for example, one or a plurality of CPUs (Central Processing Units), a multi-core CPU, a GPU (Graphics Processing Unit), a TPU (Tensor Processing Unit), and other arithmetic units 11. A temporary storage unit 12, an image input unit 13, an output unit 14, an input unit 15, a storage unit 16, and a data storage unit 17 are connected to the calculation unit 11 via a bus line. The incident detection device 1 according to the first embodiment acquires the image data of the captured image 5 (see FIG. 5A) obtained by imaging the manufactured inspection object, and the object to be detected included in the captured image 5. 6. For example, it detects abnormal parts such as dust, hair, and dents on the inspection object attached to the inspection object. The object to be inspected is, for example, a connector constituting a wire harness.

演算部11は、記憶部16に記憶されている後述のコンピュータプログラム16aを実行することにより、各構成部の動作を制御する。演算部11は、検査対象物を撮像して得た撮像画像5に含まれるオブジェクト6の位置及び種類を画素単位で検出して検査対象物の異変を検知する処理を実行する。処理内容の詳細は後述する。 The calculation unit 11 controls the operation of each component unit by executing the computer program 16a stored in the storage unit 16 which will be described later. The calculation unit 11 executes a process of detecting a change in the inspection target by detecting the position and type of the object 6 included in the captured image 5 obtained by imaging the inspection target in pixel units. The details of the processing contents will be described later.

一時記憶部12は、DRAM(Dynamic RAM)、SRAM(Static RAM)等のメモリであり、演算部11の演算処理を実行する際に記憶部16から読み出されたコンピュータプログラム16a、又は演算処理によって生ずる各種データを一時記憶する。 The temporary storage unit 12 is a memory such as a DRAM (Dynamic RAM) or a SRAM (Static RAM), and is read by a computer program 16a read from the storage unit 16 when executing the arithmetic processing of the arithmetic unit 11, or by the arithmetic processing. Temporarily store various generated data.

記憶部16は、ハードディスク、EEPROM(Electrically Erasable Programmable ROM)、フラッシュメモリ等の不揮発性メモリである。記憶部16は、演算部11が各構成部の動作を制御することにより、撮像画像5に含まれるオブジェクト6の位置及び種類を画素単位で検出して検査対象物の異変を検知する処理を実行するためのコンピュータプログラム16aを記憶している。また、記憶部16は、各種オブジェクト6を形状認識し、撮像画像5に含まれるオブジェクト6の種類を検出するための特徴量等の情報、検出されたオブジェクト6、つまり異変が許容されるものか否かを判定するための閾値を記憶している。閾値はオブジェクト6の種類毎に異なり、記憶部16は、複数のオブジェクト6の種類に対応付けて、異なる閾値を記憶している。
なお記憶部16は、図示しない読出装置によって記録媒体から読み出されたコンピュータプログラム16aを記憶する態様であっても良い。記録媒体はCD(Compact Disc)−ROM、DVD(Digital Versatile Disc)−ROM、BD(Blu-ray(登録商標) Disc)等の光ディスク、フレキシブルディスク、ハードディスク等の磁気ディスク、磁気光ディスク、半導体メモリ等である。また、図示しない通信網に接続されている図示しない外部コンピュータから本実施形態1に係るコンピュータプログラム16aをダウンロードし、記憶部16に記憶させても良い。
The storage unit 16 is a non-volatile memory such as a hard disk, EEPROM (Electrically Erasable Programmable ROM), and a flash memory. The storage unit 16 executes a process in which the calculation unit 11 controls the operation of each component unit to detect the position and type of the object 6 included in the captured image 5 on a pixel-by-pixel basis and detect an abnormality in the inspection target object. The computer program 16a for the operation is stored. Further, the storage unit 16 recognizes the shape of various objects 6, and information such as a feature amount for detecting the type of the object 6 included in the captured image 5, and the detected object 6, that is, whether an abnormality is allowed. The threshold value for determining whether or not it is stored is stored. The threshold value is different for each type of the object 6, and the storage unit 16 stores different threshold values in association with the types of the plurality of objects 6.
The storage unit 16 may be in a mode of storing the computer program 16a read from the recording medium by a reading device (not shown). Recording media include optical disks such as CD (Compact Disc) -ROM, DVD (Digital Versatile Disc) -ROM, BD (Blu-ray (registered trademark) Disc), flexible disks, magnetic disks such as hard disks, magnetic optical disks, semiconductor memories, etc. Is. Further, the computer program 16a according to the first embodiment may be downloaded from an external computer (not shown) connected to a communication network (not shown) and stored in the storage unit 16.

画像入力部13は撮像部1aが接続されるインタフェースである。撮像部1aは、レンズにて結像した像を電気信号に変換するCCD、CMOS等の撮像素子と、撮像素子にて変換された電気信号をデジタルの画像データにAD変換し、AD変換された画像データを出力する。撮像部1aから出力された画像データは画像入力部13を介して異変検知装置1に入力される。撮像部1aと、異変検知装置1とは、専用ケーブルで接続される構成であっても良いし、LAN(Local Area Network)等のネットワークを介して接続される構成であっても良い。なお、画像データは、縦横に配列される各画素を所定階調の輝度値で示したデジタルのデータである。本実施形態では、モノクロの画像データであるものとして説明する。 The image input unit 13 is an interface to which the image pickup unit 1a is connected. The image pickup unit 1a AD-converts an image pickup element such as a CCD or CMOS that converts an image imaged by a lens into an electric signal, and an electric signal converted by the image pickup element into digital image data, and performs AD conversion. Output image data. The image data output from the image capturing unit 1a is input to the incident detection device 1 via the image input unit 13. The image pickup unit 1a and the incident detection device 1 may be connected by a dedicated cable or may be connected via a network such as a LAN (Local Area Network). The image data is digital data in which each pixel arranged vertically and horizontally is represented by a luminance value of a predetermined gradation. In the present embodiment, it will be described as being monochrome image data.

出力部14は表示部1bが接続されるインタフェースである。表示部1bは液晶パネル、有機ELディスプレイ、電子ペーパ、プラズマディスプレイ等である。表示部1bは、演算部11から与えられた画像データに応じた各種情報を表示する。例えば、異変検知結果の内容、不具合のある検査対象物の画像等を表示する。なお、表示部1bは、異変検知結果を出力する外部出力装置の一例であり、ブザー、スピーカ、発光素子、その他の報知装置であっても良い。工場の作業者は、表示部1bに表示された画像にて、異変検知の結果、検査対象物の状態等を認識することができる。 The output unit 14 is an interface to which the display unit 1b is connected. The display unit 1b is a liquid crystal panel, an organic EL display, electronic paper, a plasma display, or the like. The display unit 1b displays various information according to the image data given by the calculation unit 11. For example, the content of the abnormality detection result, the image of the inspection object having a defect, and the like are displayed. The display unit 1b is an example of an external output device that outputs an abnormality detection result, and may be a buzzer, a speaker, a light emitting element, or another notification device. The factory worker can recognize the state of the inspection object and the like as a result of the abnormality detection from the image displayed on the display unit 1b.

入力部15には、キーボード、マウス、タッチセンサ等の操作部1cが接続される。操作部1cの操作状態を示した信号は入力部15を介して異変検知装置1に入力される。演算部11は、入力部15を介して操作部1cの操作状態を認識することができる。 An operation unit 1c such as a keyboard, a mouse, and a touch sensor is connected to the input unit 15. A signal indicating the operating state of the operating unit 1c is input to the incident detection device 1 via the input unit 15. The calculation unit 11 can recognize the operation state of the operation unit 1c via the input unit 15.

データ蓄積部17は、記憶部16と同様、ハードディスク、EEPROM、フラッシュメモリ等の不揮発性メモリである。データ蓄積部17は、検査対象物の画像データ、異変検知結果等のデータを記憶する。 Like the storage unit 16, the data storage unit 17 is a non-volatile memory such as a hard disk, EEPROM, or a flash memory. The data storage unit 17 stores data such as image data of the inspection object and an abnormality detection result.

<異変検知装置の機能部>
図2は、実施形態1に係る異変検知装置1の構成例を示す機能ブロック図である。異変検知装置1は、機能部としての第1検出部2、第2検出部3、良否判定部4を有する。異変検知装置1の各機能部は、演算部11、一時記憶部12等のハードウェアによって実現される。
<Functional part of the incident detection device>
FIG. 2 is a functional block diagram showing a configuration example of the incident detection device 1 according to the first embodiment. The incident detection device 1 has a first detection unit 2, a second detection unit 3, and a quality determination unit 4 as functional units. Each functional unit of the incident detection device 1 is realized by hardware such as a calculation unit 11 and a temporary storage unit 12.

第1検出部2は撮像画像5に含まれるオブジェクト6を画像認識し、当該オブジェクト6の位置及び範囲、並びに種類を検出する。具体的には、第1検出部2は、撮像画像5のデータが入力された場合、当該撮像画像5に含まれる一又は複数のオブジェクト6の位置及び範囲並びに当該オブジェクト6の種類を出力する学習済み画像認識ニューラルネットワーク21を備える。オブジェクト6の位置は、当該オブジェクト6を囲むバウンディングボックス7の位置及び大きさで特定される(図5B参照)。バウンディングボックス7は例えば矩形状であり、概ねオブジェクト6が内接するような幅及び高さを有する。画像認識ニューラルネットワーク21は、例えば公知のTensorflow(登録商標)を用いて構成することができる。また、画像認識ニューラルネットワーク21は、その他の公知の畳み込みニューラルネットワーク(CNN:Convolutional neural network)を用いて構成することができる。
画像認識ニューラルネットワーク21は、撮像画像5に含まれるオブジェクト6の種類が出力されるように、オブジェクト6の画像データと、当該オブジェクト6の種類を示す情報とを教師データとして機械学習させる。
The first detection unit 2 image-recognizes the object 6 included in the captured image 5 and detects the position, range, and type of the object 6. Specifically, when the data of the captured image 5 is input, the first detection unit 2 learns to output the position and range of one or more objects 6 included in the captured image 5 and the type of the object 6. The completed image recognition neural network 21 is provided. The position of the object 6 is specified by the position and size of the bounding box 7 surrounding the object 6 (see FIG. 5B). The bounding box 7 has, for example, a rectangular shape, and has a width and a height so that the object 6 is inscribed. The image recognition neural network 21 can be configured using, for example, a known Tensorflow®. Further, the image recognition neural network 21 can be configured by using another known convolutional neural network (CNN).
The image recognition neural network 21 machine-learns the image data of the object 6 and the information indicating the type of the object 6 as teacher data so that the type of the object 6 included in the captured image 5 is output.

第2検出部3はオートエンコーダ31及び差分データ生成部32を備える。オートエンコーダ31は、撮像部1aから出力された画像データが入力され、撮像画像5に含まれる検査対象物の特徴を抽出した特徴抽出画像5aの画像データを出力する機能部である(図6参照)。具体的には、オートエンコーダ31は、画像データが入力された場合、正常な検査対象物の特徴を表した特徴抽出画像5aの画像データを出力する。撮像画像5には、ゴミ、傷、影、検査対象物自体の異変部位等の画像が含まれることがある。特徴抽出画像5aはこれらの画像を除去し、異変が無い正常な検査対象物を撮像した場合に得られるような理想的な検査対象物を再現した撮像画像5である。オートエンコードはニューラルネットワークによって実現される。当該ニューラルネットワークは、画像データを次元圧縮する中間層を含み、同一画素数の画像データを入出力する。 The second detection unit 3 includes an autoencoder 31 and a difference data generation unit 32. The autoencoder 31 is a functional unit in which the image data output from the image capturing unit 1a is input and the image data of the feature extraction image 5a extracted from the features of the inspection object included in the captured image 5 is output (see FIG. 6). ). Specifically, when the image data is input, the autoencoder 31 outputs the image data of the feature extraction image 5a showing the features of the normal inspection object. The captured image 5 may include images of dust, scratches, shadows, abnormal parts of the inspection object itself, and the like. The feature extraction image 5a is an image capture image 5 that reproduces an ideal inspection object that can be obtained when these images are removed and a normal inspection object without any abnormality is imaged. Auto-encoding is realized by a neural network. The neural network includes an intermediate layer that dimensionally compresses image data, and inputs and outputs image data having the same number of pixels.

オートエンコーダ31は、入力層31aと、出力層31bと、コンボリューション層(CONV層)31cと、デコンボリューション層(DECONV層)31dとを有する。入力層31aは画像データに係る各画素値のデータが入力される層である。コンボリューション層31cは、画像データを次元圧縮する層である。例えば、コンボリューション層31cは、畳み込み積分を行うことにより、次元圧縮を行う。次元圧縮により、検査対象物の特徴量が抽出される。デコンボリューション層31dは、コンボリューション層31cで次元圧縮されたデータを元の次元に復元する層である。デコンボリューション層31dは、逆畳み込み処理を行い、元の次元に復元する。当該復元によって、検査対象物の本来の特徴、即ち正常な検査対象物の特徴を表した画像データが復元される。なお、コンボリューション層31c及びデコンボリューション層31dが2層である例を示したが、1層又は3層以上であっても良い。出力層31bは、コンボリューション層31c及びデコンボリューション層31dにて検査対象物の特徴が抽出された特徴抽出画像5aに係る各画素値のデータを出力する層である。
オートエンコーダ31は、入力された画像データと、出力された画像データとが同じになるように、オートエンコーダ31のニューラルネットワークを機械学習させる。つまり、入力された撮像画像5と、出力される特徴抽出画像5aとが同じになるように、ニューラルネットワークを機械学習させる。かかる機械学習は、正常な検査対象物を撮像して得られる画像データを用いて行う。
The autoencoder 31 has an input layer 31a, an output layer 31b, a convolution layer (CONV layer) 31c, and a deconvolution layer (DECONV layer) 31d. The input layer 31a is a layer into which data of each pixel value related to image data is input. The convolution layer 31c is a layer that dimensionally compresses image data. For example, the convolution layer 31c performs dimensional compression by performing convolution integration. The feature quantity of the inspection object is extracted by the dimensional compression. The deconvolution layer 31d is a layer that restores the dimension-compressed data in the convolution layer 31c to the original dimension. The deconvolution layer 31d undergoes a deconvolution process to restore the original dimension. By the restoration, the original characteristics of the inspection object, that is, the image data representing the characteristics of the normal inspection object are restored. Although the example in which the convolution layer 31c and the deconvolution layer 31d are two layers is shown, one layer or three or more layers may be used. The output layer 31b is a layer that outputs data of each pixel value related to the feature extraction image 5a from which the features of the inspection object are extracted by the convolution layer 31c and the deconvolution layer 31d.
The autoencoder 31 machine-learns the neural network of the autoencoder 31 so that the input image data and the output image data are the same. That is, the neural network is machine-learned so that the input captured image 5 and the output feature extraction image 5a are the same. Such machine learning is performed using image data obtained by imaging a normal inspection object.

差分データ生成部32は、撮像部1aから取得した画像データと、オートエンコーダ31から出力された画像データとの差分を演算する。具体的には、差分データ生成部32は、各画像データの同一箇所の画素の画素値の差分を、画素毎に演算する。そして、差分データ生成部32は、画素値の差分と、所定の閾値とを比較することによって二値化する。二値化処理によって、画素単位で検出されたオブジェクト6の画像を含む画像が得られる。以下、画素単位で検出されたオブジェクト6を含む画像を差分画像5b(図6参照)と呼ぶ。 The difference data generation unit 32 calculates the difference between the image data acquired from the imaging unit 1a and the image data output from the autoencoder 31. Specifically, the difference data generation unit 32 calculates the difference between the pixel values of the pixels at the same location in each image data for each pixel. Then, the difference data generation unit 32 binarizes the difference between the pixel values and a predetermined threshold value. By the binarization process, an image including the image of the object 6 detected in pixel units is obtained. Hereinafter, the image including the object 6 detected in pixel units is referred to as a difference image 5b (see FIG. 6).

良否判定部4は、オブジェクト検出処理部41、寸法測定処理部42及び良否判定処理部43を備える。
オブジェクト検出処理部41は、撮像画像5に含まれる一又は複数のオブジェクト6の位置及び種類を画素単位で検出する機能部である。
寸法測定処理部42は、画素単位で検出された各オブジェクト6の寸法を測定する機能部である。
良否判定処理部43は、オブジェクト6の寸法と、当該オブジェクト6の種類に応じた閾値とを比較することによって、異変が許容可能なものか否か、つまり異変の良否を判定する処理を実行する機能部である。
The quality determination unit 4 includes an object detection processing unit 41, a dimension measurement processing unit 42, and a quality determination processing unit 43.
The object detection processing unit 41 is a functional unit that detects the position and type of one or more objects 6 included in the captured image 5 on a pixel-by-pixel basis.
The dimension measurement processing unit 42 is a functional unit that measures the dimensions of each object 6 detected in pixel units.
The quality determination processing unit 43 executes a process of determining whether or not the change is acceptable, that is, whether or not the change is good or bad, by comparing the dimensions of the object 6 with the threshold value according to the type of the object 6. It is a functional part.

<異変部位検知処理>
図3は、オブジェクト検出に係る処理手順を示すフローチャートである。演算部11は、撮像部1aから出力された画像データを取得する(ステップS11)。次いで、演算部11は、後述のマッピング処理を実行することにより、当該撮像画像5に含まれるオブジェクト6の位置及び種類を画素単位で検出する(ステップS12)。次いで、演算部11は、検出されたオブジェクト6の寸法を測定して(ステップS13)、オブジェクト6の良否を判定する(ステップS14)。
<Abnormal part detection processing>
FIG. 3 is a flowchart showing a processing procedure related to object detection. The calculation unit 11 acquires the image data output from the image pickup unit 1a (step S11). Next, the calculation unit 11 detects the position and type of the object 6 included in the captured image 5 in pixel units by executing the mapping process described later (step S12). Next, the calculation unit 11 measures the dimensions of the detected object 6 (step S13) and determines the quality of the object 6 (step S14).

次いで、演算部11は、ステップS14の判定結果に基づいて、検査対象物の良否を判定する(ステップS15)。つまり、演算部11は、許容される異変があるか否かを判定する。良であると判定した場合(ステップS15:YES)、演算部11は処理を終える。不良であると判定した場合(ステップS15:NO)、演算部11は、検査対象物の異変に対処するための所定処理を実行し(ステップS16)、処理を終える。例えば、演算部11は、検査対象物に異常がある旨を報知する処理を実行する。また、演算部11は、良否判定結果を示した画像(図11右図参照)を表示部1bに表示させる処理を実行する。当該良否判定結果を示した画像の情報は、第1検出部2による検出処理にて得られた情報と、第2検出部3による検出処理にて得られる情報とに基づく情報の一例である。 Next, the calculation unit 11 determines the quality of the inspection object based on the determination result in step S14 (step S15). That is, the calculation unit 11 determines whether or not there is an allowable change. If it is determined to be good (step S15: YES), the calculation unit 11 ends the process. If it is determined to be defective (step S15: NO), the calculation unit 11 executes a predetermined process for dealing with an abnormality of the inspection target object (step S16), and ends the process. For example, the calculation unit 11 executes a process of notifying that the inspection target has an abnormality. Further, the calculation unit 11 executes a process of displaying an image (see the right figure of FIG. 11) showing the quality determination result on the display unit 1b. The information of the image showing the quality determination result is an example of the information based on the information obtained by the detection process by the first detection unit 2 and the information obtained by the detection process by the second detection unit 3.

図4は、マッピング処理手順を示すフローチャートである。第1検出部2は、撮像画像5に含まれる一又は複数のオブジェクト6の位置及び範囲をバウンディングボックス7にて特定すると共に、当該バウンディングボックス7によって囲まれるオブジェクト6の種類を検出する(ステップS31)。 FIG. 4 is a flowchart showing a mapping processing procedure. The first detection unit 2 specifies the position and range of one or more objects 6 included in the captured image 5 in the bounding box 7, and detects the type of the object 6 surrounded by the bounding box 7 (step S31). ).

図5A及び図5Bは、第1検出部2によるオブジェクト検出方法を示す説明図である。図5Aは撮像画像5を示し、図5Bはオブジェクト6の検出結果を示す撮像画像5である。図5Aに示すように、撮像画像5には複数のオブジェクト6が含まれている。例えば、埃の画像であるオブジェクト61、髪の画像であるオブジェクト62、へこみの画像であるオブジェクト63等が含まれている。そして、図5Bに示すように、第1検出部2にて検出された各オブジェクト6はバウンディングボックス7によって囲まれており、オブジェクト6の位置はバウンディングボックス7の位置及び大きさによって表される。例えば、バウンディングボックス71は、埃のオブジェクト61の位置及び範囲を示し、バウンディングボックス72は、髪のオブジェクト62の位置及び範囲を示し、バウンディングボックス73は、へこみのオブジェクト63の位置及び範囲を示している。また、各バウンディングボックス7には、当該バウンディングボックス7に包含されたオブジェクト6の種類が表示される。このように、第1検出部2によれば、撮像画像5に含まれる各オブジェクト6のおおよその位置及び範囲と、種類とが特定される。 5A and 5B are explanatory views showing an object detection method by the first detection unit 2. FIG. 5A shows a captured image 5, and FIG. 5B is a captured image 5 showing a detection result of the object 6. As shown in FIG. 5A, the captured image 5 includes a plurality of objects 6. For example, an object 61 which is an image of dust, an object 62 which is an image of hair, an object 63 which is an image of dents, and the like are included. Then, as shown in FIG. 5B, each object 6 detected by the first detection unit 2 is surrounded by the bounding box 7, and the position of the object 6 is represented by the position and size of the bounding box 7. For example, the bounding box 71 indicates the position and range of the dust object 61, the bounding box 72 indicates the position and range of the hair object 62, and the bounding box 73 indicates the position and range of the dented object 63. There is. Further, in each bounding box 7, the type of the object 6 included in the bounding box 7 is displayed. In this way, according to the first detection unit 2, the approximate position and range of each object 6 included in the captured image 5 and the type are specified.

次いで、第2検出部3は、撮像画像5に含まれるオブジェクト6を画素単位で検出する(ステップS32)。 Next, the second detection unit 3 detects the object 6 included in the captured image 5 in pixel units (step S32).

図6は、第2検出部3によるオブジェクト検出方法を示す説明図である。撮像画像5の画像データがオートエンコーダ31に入力されると、異変部位が取り除かれた撮像画像5本来の特徴を表した特徴抽出画像5aの画像データが出力される。そして、差分データ生成部32は、取得した元の画像データと、オートエンコーダ31から出力された画像データとの差分を演算する。具体的には、差分データ生成部32は、各画像データの同一箇所の画素の画素値の差分を、画素毎に演算する。そして、差分データ生成部32は、画素値の差分と、所定の閾値とを比較することによって二値化する。二値化処理によって、画素単位で検出されたオブジェクト6の画像を含む画像が得られる。以下、画素単位で検出されたオブジェクト6を含む画像を差分画像5bと呼ぶ。差分画像5bには、検査対象物自体は含まれず、異変部位であるオブジェクト6のみが含まれる。例えば、図6右図に示すように、差分画像5bには、埃の画像であるオブジェクト61、髪の画像であるオブジェクト62、へこみの画像であるオブジェクト63が含まれる。 FIG. 6 is an explanatory diagram showing an object detection method by the second detection unit 3. When the image data of the captured image 5 is input to the autoencoder 31, the image data of the feature extraction image 5a representing the original features of the captured image 5 from which the abnormal portion has been removed is output. Then, the difference data generation unit 32 calculates the difference between the acquired original image data and the image data output from the autoencoder 31. Specifically, the difference data generation unit 32 calculates the difference between the pixel values of the pixels at the same location in each image data for each pixel. Then, the difference data generation unit 32 binarizes the difference between the pixel values and a predetermined threshold value. By the binarization process, an image including the image of the object 6 detected in pixel units is obtained. Hereinafter, the image including the object 6 detected in pixel units is referred to as a difference image 5b. The difference image 5b does not include the inspection object itself, but includes only the object 6 which is an abnormal part. For example, as shown in the right figure of FIG. 6, the difference image 5b includes an object 61 which is an image of dust, an object 62 which is an image of hair, and an object 63 which is an image of dents.

次いで、演算部11は、マッピング処理により、画素単位でオブジェクト6の位置及び種類を決定し(ステップS33)、オブジェクト検出に係る処理を終える。なお、ステップS33の処理を実行する演算部11は、第1検出部2及び第2検出部3の検出結果に基づいて、オブジェクト6の位置及び種類を画素単位で決定する決定部として機能する。 Next, the calculation unit 11 determines the position and type of the object 6 on a pixel-by-pixel basis by the mapping process (step S33), and finishes the process related to the object detection. The calculation unit 11 that executes the process of step S33 functions as a determination unit that determines the position and type of the object 6 on a pixel-by-pixel basis based on the detection results of the first detection unit 2 and the second detection unit 3.

図7は、画素単位でオブジェクト6の位置及び種類を決定する方法を示す説明図である。左上図は、第1検出部2によるオブジェクト6の検出結果が反映された撮像画像5である。撮像画像5に含まれる各オブジェクト6の位置はバウンディングボックス7の位置及び寸法によって表されている。また、各オブジェクト6の種類はバウンディングボックス7に付されたラベルによって表されている。バウンディングボックス7は、オブジェクト6の種類を示しているものの、オブジェクト6の位置、形状ないし寸法の正確な情報を有しない。
一方、左下図は、第2検出部3によるオブジェクト6の検出結果が反映された差分画像5bである。差分画像5bに含まれるオブジェクト6の各画素は、オブジェクト6の位置ないし形状を画素単位で正確に示しているものの、オブジェクト6の種類に関する情報を有しない。
中央の図は第2検出部3から出力された差分画像5bに対して、バウンディングボックス7のマッピングを行った状態を概念的に示したものである。バウンディングボックス7を差分画像5bにマッピングすることによって、画素単位でオブジェクト6の種類を決定することが可能になる。つまり、一の種類のバウンディングボックス7に包含されたオブジェクト6の画素に対して、当該一の種類を対応付けることにより、画素単位でオブジェクト6の種類を決定することができる。
右図は、画素単位でオブジェクト6の種類が決定された状態を概念的に示したものである。例えば、埃のオブジェクト61を構成する各画素に対して、種類「埃」が対応付けられている。同様に、髪のオブジェクト62を構成する各画素に対して、種類「髪」が対応付けられ、へこみのオブジェクト63を構成する各画素に対して、種類「へこみ」が対応付けられている。
FIG. 7 is an explanatory diagram showing a method of determining the position and type of the object 6 on a pixel-by-pixel basis. The upper left figure is a captured image 5 in which the detection result of the object 6 by the first detection unit 2 is reflected. The position of each object 6 included in the captured image 5 is represented by the position and dimensions of the bounding box 7. The type of each object 6 is represented by a label attached to the bounding box 7. Although the bounding box 7 indicates the type of the object 6, it does not have accurate information on the position, shape, or dimension of the object 6.
On the other hand, the lower left figure is a difference image 5b in which the detection result of the object 6 by the second detection unit 3 is reflected. Each pixel of the object 6 included in the difference image 5b accurately indicates the position or shape of the object 6 on a pixel-by-pixel basis, but does not have information on the type of the object 6.
The figure in the center conceptually shows a state in which the bounding box 7 is mapped to the difference image 5b output from the second detection unit 3. By mapping the bounding box 7 to the difference image 5b, it is possible to determine the type of the object 6 on a pixel-by-pixel basis. That is, the type of the object 6 can be determined on a pixel-by-pixel basis by associating the one type with the pixels of the object 6 included in the one type of bounding box 7.
The figure on the right conceptually shows a state in which the type of the object 6 is determined for each pixel. For example, the type "dust" is associated with each pixel constituting the dust object 61. Similarly, the type "hair" is associated with each pixel constituting the hair object 62, and the type "dent" is associated with each pixel constituting the dent object 63.

図8は、オブジェクト6の寸法測定に係る処理手順を示すフローチャート、図9は、オブジェクト6の寸法測定方法を示す説明図である。演算部11は、一の種類のオブジェクト6の画素群を選択する(ステップS51)。つまり、一つのオブジェクト6を構成している一群の複数画素を選択する。例えば、図9に示すように、埃のオブジェクト61を構成する一群の複数画素を選択する。オブジェクト6の種類が異なる複数の画素は、たとえ連結ないし隣接していても一群の画素として選択されない。また、オブジェクト6の種類が同一の複数の画素であっても、所定画素以上離隔している場合は一群の画素として選択されない。 FIG. 8 is a flowchart showing a processing procedure for measuring the dimensions of the object 6, and FIG. 9 is an explanatory diagram showing a method of measuring the dimensions of the object 6. The calculation unit 11 selects a pixel group of one type of object 6 (step S51). That is, a group of a plurality of pixels constituting one object 6 is selected. For example, as shown in FIG. 9, a group of plurality of pixels constituting the dust object 61 is selected. A plurality of pixels of different types of objects 6 are not selected as a group of pixels even if they are connected or adjacent to each other. Further, even if a plurality of pixels of the same type of the object 6 are separated from each other by a predetermined pixel or more, they are not selected as a group of pixels.

そして、演算部11は、図9右図に示すように、選択されたオブジェクト6の一群の画素の総数を算出する(ステップS52)。例えば、埃のオブジェクト61を構成する画素の総数は13である。同様に、髪を構成する画素の総数は19である。オブジェクト6を構成する画素の総数は、オブジェクト6の寸法に相当するものである。
なお、オブジェクト6には、塊状のもの、線状のもの等、形状は様々であるが、同一種類のオブジェクト6は概ね同一形状である。このため、オブジェクト6の種類が既知であれば、オブジェクト6を構成する画素の総数を、当該オブジェクト6の寸法を示す情報として利用することができる。
例えば、髪のオブジェクト62を構成する画素の総数は、髪の長さ寸法に相当する。埃のオブジェクト61を構成する画素の総数は、概ね縦横寸法の積に相当する。
Then, the calculation unit 11 calculates the total number of pixels of the group of the selected objects 6 as shown in the right figure of FIG. 9 (step S52). For example, the total number of pixels constituting the dust object 61 is 13. Similarly, the total number of pixels that make up the hair is 19. The total number of pixels that make up the object 6 corresponds to the dimensions of the object 6.
The object 6 has various shapes such as a lumpy object and a linear object, but the objects 6 of the same type have substantially the same shape. Therefore, if the type of the object 6 is known, the total number of pixels constituting the object 6 can be used as information indicating the dimensions of the object 6.
For example, the total number of pixels that make up the hair object 62 corresponds to the length dimension of the hair. The total number of pixels constituting the dust object 61 roughly corresponds to the product of the vertical and horizontal dimensions.

次いで、演算部11は、差分画像5bに含まれる全オブジェクト6の寸法測定を終えたか否かを判定する(ステップS53)。測定を終えていないオブジェクト6があると判定した場合(ステップS53:NO)、処理をステップS51へ戻し、寸法未測定の他のオブジェクト6についても同様の算出処理を実行する。全てのオブジェクト6の測定処理を終えたと判定した場合(ステップS53:YES)、演算部11は寸法測定に係る処理を終える。 Next, the calculation unit 11 determines whether or not the dimensional measurement of all the objects 6 included in the difference image 5b has been completed (step S53). When it is determined that there is an object 6 for which the measurement has not been completed (step S53: NO), the process is returned to step S51, and the same calculation process is executed for the other object 6 whose dimensions have not been measured. When it is determined that the measurement processing of all the objects 6 has been completed (step S53: YES), the calculation unit 11 ends the processing related to the dimension measurement.

図10は、オブジェクト6の良否判定処理手順を示すフローチャート、図11は、オブジェクト6の良否判定方法を示す説明図である。 FIG. 10 is a flowchart showing a pass / fail determination processing procedure for the object 6, and FIG. 11 is an explanatory diagram showing a pass / fail determination method for the object 6.

演算部11は、良否判定の対象であるオブジェクト6の画素群の種類に対応する閾値を選択する(ステップS71)。記憶部16は、オブジェクト6の種類毎に異なる閾値を記憶しており、演算部11は判定対象のオブジェクト6の種類に対応付けられた閾値を選択する。 The calculation unit 11 selects a threshold value corresponding to the type of pixel group of the object 6 that is the target of the pass / fail judgment (step S71). The storage unit 16 stores different threshold values for each type of the object 6, and the calculation unit 11 selects the threshold value associated with the type of the object 6 to be determined.

そして、演算部11は、良否判定対象であるオブジェクト6の画素の総数と、ステップS71にて選択した閾値とを比較し(ステップS72)、比較結果を記憶する(ステップS73)。例えば演算部11は、一のオブジェクト6を構成する画素の総数が閾値以上である場合、当該オブジェクト6は許容できない異変であることを示す情報を記憶する。画素の総数が閾値未満である場合、当該オブジェクト6は許容できる異変であることを示す情報を記憶する。
図11に示すように、埃の大きさを示す画素の総数(Σ画素)は、埃に係る第1閾値未満であるため、許容されると判定される。同様に、へこみの程度を示す画素の総数(Σ画素)は、へこみに係る第3閾値未満であるため、許容されると判定される。しかし、髪の長さを示す画素の総数(Σ画素)は、髪に係る第2閾値以上であるため、許容されない異変と判定される。
Then, the calculation unit 11 compares the total number of pixels of the object 6 to be judged as good or bad with the threshold value selected in step S71 (step S72), and stores the comparison result (step S73). For example, when the total number of pixels constituting one object 6 is equal to or greater than a threshold value, the calculation unit 11 stores information indicating that the object 6 is an unacceptable change. If the total number of pixels is less than the threshold, the object 6 stores information indicating that it is an acceptable anomaly.
As shown in FIG. 11, since the total number of pixels indicating the size of dust (Σ pixels) is less than the first threshold value related to dust, it is determined that it is acceptable. Similarly, the total number of pixels indicating the degree of dents (Σ pixels) is less than the third threshold value related to dents, so it is determined that it is acceptable. However, since the total number of pixels indicating the length of the hair (Σ pixels) is equal to or greater than the second threshold value related to the hair, it is determined that the change is unacceptable.

次いで、演算部11は、全オブジェクト6に対して良否判定を終えたか否かを判定する(ステップS74)。良否判定を終えていないオブジェクト6があると判定した場合(ステップS74:NO)、処理をステップS71へ戻し、良否未測定の他のオブジェクト6についても同様の算出処理を実行する。全てのオブジェクト6の良否判定を終えたと判定した場合(ステップS74:YES)、演算部11は良否判定に係る処理を終える。 Next, the calculation unit 11 determines whether or not the pass / fail determination has been completed for all the objects 6 (step S74). When it is determined that there is an object 6 for which the pass / fail judgment has not been completed (step S74: NO), the process is returned to step S71, and the same calculation process is executed for the other objects 6 whose pass / fail has not been measured. When it is determined that the quality determination of all the objects 6 has been completed (step S74: YES), the calculation unit 11 ends the processing related to the quality determination.

上記の説明は、撮像画像5に含まれる複数のオブジェクト6が互いに離隔している状態を例に説明したが、本実施形態1によればオブジェクト6が重なっていても、画素単位でオブジェクト6の検出、寸法測定及び異常判定を行うことができる。 The above description has been described by taking as an example a state in which a plurality of objects 6 included in the captured image 5 are separated from each other. It can detect, measure dimensions, and determine abnormalities.

図12A、図12B、図12C、図12Dは、重なり合っているオブジェクト6の検出及び寸法測定方法を示す説明図である。図12Aは、埃と髪のオブジェクト61、62が重なりあっている状態を示している。第2検出部3は、各オブジェクト6の種類を区別することなく、埃及び髪のオブジェクト61、62を構成する複数の画素を一群の画素として検出している。
図12Bは、埃の位置及び範囲を示すバウンディングボックス71によりマッピングされた状態を示している。演算部11は、当該バウンディングボックス71に包含される画素群を埃のオブジェクト61を構成する画素として認識し、各画素に種類「埃」を付与する。
図12Cは、髪の位置及び範囲を示すバウンディングボックス72によりマッピングされた状態を示している。演算部11は、当該バウンディングボックス72に包含される画素群を髪のオブジェクト62を構成する画素として認識し、各画素に種類「髪」を付与する。
図12Dは、図12B及び図12Cに示すマッピング処理により、画素単位でオブジェクト6の種類を認識した結果を示している。黒塗りで示した画素は、種類「髪」が付与されている。ハッチングが付された画素は、種類「埃」が付与されている。白塗りの画素は、種類「埃」及び「髪」の双方が付与されている。
このように、オブジェクト6が重なり合っている部分の画素に、両方の種類を付与することにより、オブジェクト6が重なり合っていても、各オブジェクト6の寸法を測定することが可能となる。例えば、「埃」の種類が付与されている画素は、ハッチングが付された画素及び白抜きの画素であり、当該画素の総数を算出することによって、「埃」のオブジェクト61の寸法を測定することができる。同様に、「髪」の種類が付与されている画素は、黒塗りの画素及び白抜きの画素であり、当該画素の総数を算出することによって、「髪」のオブジェクト62の寸法を測定することができる。このように、複数種類のオブジェクト6が重なり合っていても、各オブジェクト6の位置及び種類を画素単位で検出することができ、各オブジェクト6の寸法を測定することもできる。
12A, 12B, 12C, and 12D are explanatory views showing a method of detecting and measuring the dimensions of overlapping objects 6. FIG. 12A shows a state in which dust and hair objects 61 and 62 overlap. The second detection unit 3 detects a plurality of pixels constituting the dust and hair objects 61 and 62 as a group of pixels without distinguishing the type of each object 6.
FIG. 12B shows a state mapped by a bounding box 71 showing the position and range of dust. The calculation unit 11 recognizes the pixel group included in the bounding box 71 as the pixels constituting the dust object 61, and assigns the type "dust" to each pixel.
FIG. 12C shows the state mapped by the bounding box 72 showing the position and range of the hair. The calculation unit 11 recognizes the pixel group included in the bounding box 72 as the pixels constituting the hair object 62, and assigns the type "hair" to each pixel.
FIG. 12D shows the result of recognizing the type of the object 6 on a pixel-by-pixel basis by the mapping process shown in FIGS. 12B and 12C. Pixels shown in black are given the type "hair". The hatched pixels are given the type "dust". The white-painted pixels are given both types of "dust" and "hair".
In this way, by assigning both types to the pixels of the portion where the objects 6 overlap, it is possible to measure the dimensions of each object 6 even if the objects 6 overlap. For example, the pixels to which the type of "dust" is given are the pixels with hatching and the white pixels, and the dimension of the object 61 of "dust" is measured by calculating the total number of the pixels. be able to. Similarly, the pixels to which the type of "hair" is given are black-painted pixels and white pixels, and the dimension of the object 62 of "hair" is measured by calculating the total number of the pixels. Can be done. In this way, even if a plurality of types of objects 6 are overlapped with each other, the position and type of each object 6 can be detected on a pixel-by-pixel basis, and the dimensions of each object 6 can be measured.

以上の通り、本実施形態によれば、第1検出部2及び第2検出部3にてオブジェクト6を検出し、図7に示すマッピング処理を行うことによって、撮像画像5に含まれるオブジェクト6の位置及び種類を画素単位で検出することができる。画素単位でオブジェクト6の位置及び種類を検出することが可能であるため、異変部位であるオブジェクト6の寸法を正確に測定することができる。
また、画素単位で検出された異変部位及びその良否を図11に示すように表示することができる。
例えば、ワイヤハーネスを構成するコネクタ等の検査対象物の異変部位及び種類を画素単位で検出し、当該異変部位の寸法を正確に算出することができる。
As described above, according to the present embodiment, the object 6 is detected by the first detection unit 2 and the second detection unit 3, and the mapping process shown in FIG. 7 is performed to obtain the object 6 included in the captured image 5. The position and type can be detected on a pixel-by-pixel basis. Since the position and type of the object 6 can be detected on a pixel-by-pixel basis, the dimensions of the object 6 which is an abnormal portion can be accurately measured.
In addition, the abnormal portion detected on a pixel-by-pixel basis and its quality can be displayed as shown in FIG.
For example, it is possible to detect the abnormal portion and type of the inspection target such as the connector constituting the wire harness on a pixel-by-pixel basis, and accurately calculate the dimensions of the abnormal portion.

また、オブジェクト6の種類に応じた異なる閾値を用いて、検出されたオブジェクト6が許容される異変か否かを判定することができる。 In addition, it is possible to determine whether or not the detected object 6 is an acceptable change by using different threshold values depending on the type of the object 6.

更に、画素単位で検出されたオブジェクト6の画素の総数と、閾値とを比較する簡単な処理で、オブジェクト6の形状に応じた異なる測定算出処理を行わずとも、上記判定を行うことができる。つまり、複雑な処理で異変部位の寸法を算出しなくても、異変部位の大きさが許容される寸法であるか否かを判定することができる。 Further, it is a simple process of comparing the total number of pixels of the object 6 detected in pixel units with the threshold value, and the above determination can be performed without performing different measurement calculation processes according to the shape of the object 6. That is, it is possible to determine whether or not the size of the abnormal portion is an allowable dimension without calculating the dimension of the abnormal portion by a complicated process.

更にまた、オートエンコーダ31を用いることによって、オブジェクト6の位置を画素単位で正確に検出することができる。また当該オブジェクト6の寸法を正確に算出することができる。 Furthermore, by using the autoencoder 31, the position of the object 6 can be accurately detected on a pixel-by-pixel basis. In addition, the dimensions of the object 6 can be calculated accurately.

更にまた、学習済みの画像認識ニューラルネットワーク21を用いることによって、様々な特徴を有するオブジェクト6を認識し、当該オブジェクト6の位置、範囲及び種類を検出することができる。 Furthermore, by using the trained image recognition neural network 21, it is possible to recognize an object 6 having various characteristics and detect the position, range, and type of the object 6.

なお、本実施形態1では、1台のコンピュータが異変検知装置1として動作し、第1検出部2、第2検出部3及び良否判定部4等として機能する例を説明したが、各機能部を実現する処理の一部又は全部をクラウドコンピュータに実行させるように構成しても良い。また、各機能部を実現する処理を複数のコンピュータで実行させる等、仮想マシンで実行するように構成しても良い。 In the first embodiment, an example in which one computer operates as an incident detection device 1 and functions as a first detection unit 2, a second detection unit 3, a quality determination unit 4, etc. has been described, but each functional unit has been described. The cloud computer may be configured to execute a part or all of the processes for realizing the above. Further, it may be configured to be executed in a virtual machine, such as executing a process for realizing each functional unit on a plurality of computers.

また、本実施形態1では、主に検査対象物の良、不良を検知するシステムを説明したが、検出対象であるオブジェクト6の内容は特に限定されるものでは無い。 Further, in the first embodiment, the system for detecting the quality of the inspection target object is mainly described, but the content of the object 6 to be detected is not particularly limited.

(実施形態2)
<画像認識ニューラルネットワークの追加学習>
図13は、実施形態2に係る異変検知システムの構成例を示すブロック図である。実施形態2に係る異変検知システムは、異変検知装置1と、機械学習装置9とを備える。異変検知装置1は、例えば検査対象物が製造される工場に設置され、機械学習装置9は工場外の施設に設置される。異変検知装置1は実施形態1と同様の構成部であり、更に機械学習装置9との間でデータを送受信するための通信部18を備える。機械学習装置9は、異変検知装置1を構成する画像認識ニューラルネットワーク21を追加学習させるサーバ装置である。機械学習装置9は、コンピュータであり、基本的なハードウェア構成は異変検知装置1と同様である。
(Embodiment 2)
<Additional learning of image recognition neural network>
FIG. 13 is a block diagram showing a configuration example of the incident detection system according to the second embodiment. The incident detection system according to the second embodiment includes an incident detection device 1 and a machine learning device 9. The incident detection device 1 is installed in, for example, a factory where an inspection object is manufactured, and the machine learning device 9 is installed in a facility outside the factory. The incident detection device 1 has the same components as that of the first embodiment, and further includes a communication unit 18 for transmitting and receiving data to and from the machine learning device 9. The machine learning device 9 is a server device that additionally learns the image recognition neural network 21 that constitutes the incident detection device 1. The machine learning device 9 is a computer, and the basic hardware configuration is the same as that of the incident detection device 1.

異変検知装置1と、機械学習装置9とは別個のコンピュータであり、並行的にプログラムを実行して動作する。具体的には、異変検知装置1は画像認識ニューラルネットワーク21のコピーを機械学習装置9へ提供し、異変検知装置1が検査対象物の異変を検知する処理を実行している傍らで、機械学習装置9は画像認識ニューラルネットワーク21の追加学習処理を実行することができる。異変検知装置1は、学習中の画像認識ニューラルネットワーク21では無く、学習前の画像認識ニューラルネットワーク21を用いて異変検知処理を継続する。
なお、機械学習装置9は画像認識ニューラルネットワーク21を構成するための各種パラメータ、例えば画像認識ニューラルネットワーク21の層数、ニューロン数、ニューラルネットワークの種類、重み係数等のパラメータを機械学習装置9へ送信することによって、画像認識ニューラルネットワーク21のコピーを提供する。
The incident detection device 1 and the machine learning device 9 are separate computers, and the programs are executed and operated in parallel. Specifically, the incident detection device 1 provides a copy of the image recognition neural network 21 to the machine learning device 9, and while the incident detection device 1 executes a process of detecting an abnormality of an inspection object, machine learning is performed. The device 9 can execute the additional learning process of the image recognition neural network 21. The incident detection device 1 continues the incident detection process by using the image recognition neural network 21 before learning instead of the image recognition neural network 21 during learning.
The machine learning device 9 transmits various parameters for forming the image recognition neural network 21, for example, parameters such as the number of layers of the image recognition neural network 21, the number of neurons, the type of neural network, and the weighting coefficient to the machine learning device 9. By doing so, a copy of the image recognition neural network 21 is provided.

異変検知装置1は、異変検知処理中、第1検出部2にて検出されたオブジェクト6の位置及び範囲と、第2検出部3にて検出されたオブジェクト6の位置とが整合しない場合、追加学習に係る処理を機械学習装置9に要求する。 The incident detection device 1 is added when the position and range of the object 6 detected by the first detection unit 2 and the position of the object 6 detected by the second detection unit 3 do not match during the incident detection process. The machine learning device 9 is requested to perform the processing related to learning.

図14は、実施形態2に係る追加学習に係る処理手順を示すフローチャートである。異変検知装置1の演算部11は、実施形態1と同様、撮像部1aから画像データを取得し、オブジェクト6の検出に係る処理を実行する(ステップS111)。なお、画像データを取得する処理ブロックを省略してフローチャートを簡略化しているが、具体的な処理内容は実施形態1と同様である。 FIG. 14 is a flowchart showing a processing procedure related to the additional learning according to the second embodiment. Similar to the first embodiment, the calculation unit 11 of the incident detection device 1 acquires image data from the image pickup unit 1a and executes a process related to the detection of the object 6 (step S111). Although the flowchart is simplified by omitting the processing block for acquiring the image data, the specific processing content is the same as that of the first embodiment.

次いで、演算部11は、オブジェクト6の検出に成功したか否かを判定する(ステップS112)。具体的には、演算部11は、第1検出部2によってバウンディングボックス7にて特定されたオブジェクト6の位置及び範囲と、第2検出部3にて検出されたオブジェクト6の画素の位置とが整合している場合、オブジェクト6の検出に成功したと判定し、整合していない場合、オブジェクト6の検出に失敗したと判定する。本実施形態2では、第2検出部3にてオブジェクト6の画素が検出されているにも拘わらず、第1検出部2にてオブジェクト6の種類が検出できていない状態を、検出失敗の例として説明する。 Next, the calculation unit 11 determines whether or not the detection of the object 6 is successful (step S112). Specifically, in the calculation unit 11, the position and range of the object 6 specified by the first detection unit 2 in the bounding box 7 and the position of the pixel of the object 6 detected by the second detection unit 3 are determined. If they are consistent, it is determined that the detection of the object 6 is successful, and if they are not consistent, it is determined that the detection of the object 6 has failed. In the second embodiment, an example of detection failure is a state in which the type of the object 6 cannot be detected by the first detection unit 2 even though the pixels of the object 6 are detected by the second detection unit 3. It is explained as.

オブジェクト6の検出に失敗していないと判定した場合(ステップS112:NO)、演算部11は実施形態1と同様、オブジェクト6の寸法測定、良否判定に係る処理をステップS113及びステップS114で実行する。なお、良否判定時の処理のブロックを省略してフローチャートを簡略化しているが、具体的な処理内容は実施形態1と同様である。 When it is determined that the detection of the object 6 has not failed (step S112: NO), the calculation unit 11 executes the processes related to the dimension measurement and the quality determination of the object 6 in the steps S113 and S114 as in the first embodiment. .. Although the flow chart is simplified by omitting the processing block at the time of pass / fail judgment, the specific processing content is the same as that of the first embodiment.

ステップS112においてオブジェクト6の検出に失敗したと判定した場合(ステップS112:YES)、演算部11は、現在の画像認識ニューラルネットワーク21を通信部18にて、機械学習装置9へ送信する(ステップS115)。具体的には、画像認識ニューラルネットワーク21を構成するための各種パラメータを機械学習装置9へ送信する。 When it is determined in step S112 that the detection of the object 6 has failed (step S112: YES), the calculation unit 11 transmits the current image recognition neural network 21 to the machine learning device 9 by the communication unit 18 (step S115). ). Specifically, various parameters for forming the image recognition neural network 21 are transmitted to the machine learning device 9.

機械学習装置9は、異変検知装置1から送信された画像認識ニューラルネットワーク21を追加学習対象として受信する(ステップS116)。 The machine learning device 9 receives the image recognition neural network 21 transmitted from the incident detection device 1 as an additional learning target (step S116).

ステップS115の処理を終えた異変検知装置1は、学習用データの生成に係る処理を実行する(ステップS117)。 The incident detection device 1 that has completed the process of step S115 executes the process related to the generation of learning data (step S117).

図15は、学習用データの生成に係る処理手順を示すフローチャート、図16及び図17は、学習用データの生成方法を示す説明図である。まず演算部11は、オブジェクト6の検出に失敗した撮像画像5を、図16右図に示すように格子状に分割し、分割された各画像ブロックに対してオブジェクト6に関する情報を示す配列Yを割り当てる(ステップS131)。配列Yは、例えば下記式(1)で表される。ステップS131で割り当てられる配列の各変数の初期値は0である。 FIG. 15 is a flowchart showing a processing procedure related to the generation of learning data, and FIGS. 16 and 17 are explanatory views showing a method of generating learning data. First, the calculation unit 11 divides the captured image 5 that failed to detect the object 6 into a grid pattern as shown in the right figure of FIG. 16, and creates an array Y indicating information about the object 6 for each of the divided image blocks. Allocate (step S131). The array Y is represented by, for example, the following formula (1). The initial value of each variable of the array assigned in step S131 is 0.

Figure 2020031422
Figure 2020031422

配列Yの変数Pは、画像ブロックにオブジェクト6が含まれているか否かを示す。図17に示すように、P=1はオブジェクト6が含まれていることを示し、P=0はオブジェクト6が含まれていないことを示す。
変数Bx、Byは、図17Aに示すように、オブジェクト6の中心位置、例えば画像の重心位置のX座標、及びY座標を示す。座標系の取り方は特に限定されるものでは無いが、例えば図17に示すように、各画像ブロックの左下の頂点を原点とし、撮像画像5の水平方向をX軸、垂直方向をY軸とする直交座標系を用いると良い。
変数Bw、Bhは、オブジェクト6の幅及び高さを示す。
変数C1、C2、C3、…は、オブジェクト6の種類に対応している。例えば、C1は「埃」、C2は「髪」、C3は「へこみ」等に対応している。変数C1=1は、オブジェクト6が「埃」であることを示し、変数C1=0はオブジェクト6が「埃」で無いことを示している。他の変数C2、C3、…も同様である。なお、オブジェクト6の種類を示す変数は、新規のオブジェクト6の種類に対応できるよう、種類「未定」の変数を適宜数用意しておくと良い。
The variable P in the array Y indicates whether or not the image block contains the object 6. As shown in FIG. 17, P = 1 indicates that the object 6 is included, and P = 0 indicates that the object 6 is not included.
As shown in FIG. 17A, the variables Bx and By indicate the X coordinate and the Y coordinate of the center position of the object 6, for example, the position of the center of gravity of the image. The method of taking the coordinate system is not particularly limited, but as shown in FIG. 17, for example, the origin is the lower left vertex of each image block, the horizontal direction of the captured image 5 is the X axis, and the vertical direction is the Y axis. It is preferable to use a Cartesian coordinate system.
The variables Bw and Bh indicate the width and height of the object 6.
The variables C1, C2, C3, ... Correspond to the type of object 6. For example, C1 corresponds to "dust", C2 corresponds to "hair", C3 corresponds to "dent" and the like. The variable C1 = 1 indicates that the object 6 is "dust", and the variable C1 = 0 indicates that the object 6 is not "dust". The same applies to the other variables C2, C3, .... As for the variables indicating the types of the object 6, it is advisable to prepare an appropriate number of variables of the type "undecided" so as to correspond to the new types of the object 6.

ステップS131の処理を終えた演算部11は、第2検出部3の検出結果を参照して、各画像ブロックにおけるオブジェクト6の有無、位置及び寸法を特定する(ステップS132)。そして、演算部11は、図17A及び図17Bに示すように特定結果に従って、各画像ブロックに割り当てられた配列Yの変数P、Bx、By、Bw、Bhに、該当する数値を代入する(ステップS133)。
なお、画像ブロックにオブジェクト6が含まれていない場合、配列Yの各変数は0となる。
The calculation unit 11 that has completed the process of step S131 specifies the presence / absence, position, and dimension of the object 6 in each image block with reference to the detection result of the second detection unit 3 (step S132). Then, as shown in FIGS. 17A and 17B, the calculation unit 11 substitutes the corresponding numerical values into the variables P, Bx, By, Bw, and Bh of the array Y assigned to each image block according to the specific result (step). S133).
If the image block does not include the object 6, each variable in the array Y becomes 0.

次いで、演算部11は、撮像画像5に対して公知の形状認識処理を実行することによって、種類が特定されていなかったオブジェクト6の種類を検出する(ステップS134)。例えば、演算部11は、オブジェクト6のエッジを検出して所定の特徴量を算出し、記憶部16が記憶する特徴量と比較することによって、類似の特徴量に対応するオブジェクト6の種類を特定することによって、オブジェクト6の種類を検出する。また、パターンマッチングによって、オブジェクト6の種類を特定しても良い。 Next, the calculation unit 11 detects the type of the object 6 for which the type has not been specified by executing a known shape recognition process on the captured image 5 (step S134). For example, the calculation unit 11 detects the edge of the object 6, calculates a predetermined feature amount, and compares it with the feature amount stored in the storage unit 16 to specify the type of the object 6 corresponding to the similar feature amount. By doing so, the type of the object 6 is detected. Further, the type of the object 6 may be specified by pattern matching.

そして、ステップS134の処理を終えた演算部11は、オブジェクト6の種類の検出に成功したか否かを判定する(ステップS135)。成功したと判定した場合(ステップS135:YES)、演算部11は、ステップS134の検出結果に応じて、変数C1、C2、C3…に、該当する数値を代入し(ステップS137)、学習用データの生成処理を終える。 Then, the calculation unit 11 that has completed the process of step S134 determines whether or not the detection of the type of the object 6 is successful (step S135). If it is determined to be successful (step S135: YES), the calculation unit 11 substitutes the corresponding numerical values into the variables C1, C2, C3 ... According to the detection result in step S134 (step S137), and the training data. Finishes the generation process of.

ステップS135で失敗したと判定した場合(ステップS135:NO)、演算部11は、操作部1cにてオブジェクト6の種類をユーザから受け付ける(ステップS136)。例えば、演算部11は、問題となる撮像画像5を表示部1bに表示させると共に、オブジェクト6の検出に失敗した画像部分を指し示す指示画像を表示すると良い。例えば、第1検出部2にて検出されず、第2検出部3で検出されたオブジェクト6の画素群を囲む枠画像を撮像画像5に重畳させて表示すると良い。枠画像は一例であり、矢印画像等でも良い。
演算部11は、想定されている複数の種類をユーザに提示し、ユーザによる種類の選択を受け付ける。また新規の種類である場合、演算部11は、種類の名称の登録を受け付けと良い。演算部11は、ユーザから新規の種類の名称を受け付け、種類「未定」の変数名を当該名称に変更登録する。
When it is determined in step S135 that the object has failed (step S135: NO), the calculation unit 11 accepts the type of the object 6 from the user in the operation unit 1c (step S136). For example, the calculation unit 11 may display the captured image 5 in question on the display unit 1b, and may display an instruction image indicating an image portion in which the detection of the object 6 has failed. For example, it is preferable to superimpose the frame image surrounding the pixel group of the object 6 detected by the second detection unit 3 on the captured image 5 without being detected by the first detection unit 2. The frame image is an example, and an arrow image or the like may be used.
The calculation unit 11 presents a plurality of expected types to the user, and accepts the selection of the type by the user. In the case of a new type, the calculation unit 11 may accept registration of the type name. The calculation unit 11 receives a new type name from the user, and changes and registers the variable name of the type "undecided" to the name.

そして、演算部11は、ステップS136で受け付けた内容に従って、変数C1、C2、C3…に、該当する数値を代入し(ステップS137)、学習用データの生成処理を終える。
上記処理によって、オブジェクト6の検出に失敗した画像データと、当該画像データに含まれるオブジェクト6の位置及び範囲並びに種類を示したデータとを組みとした学習用データを生成することができる。
Then, the calculation unit 11 substitutes the corresponding numerical values into the variables C1, C2, C3 ... According to the contents received in step S136 (step S137), and ends the learning data generation process.
By the above processing, it is possible to generate learning data in which the image data in which the detection of the object 6 fails and the data indicating the position, range, and type of the object 6 included in the image data are combined.

ステップS117において学習用データの生成に係る処理を終えた演算部11は、生成した学習用データをデータ蓄積部17に蓄積する(ステップS118)。そして、演算部11は、所定量の学習用データを蓄積したか否かを判定する(ステップS119)。所定量の学習用データが蓄積されていないと判定した場合(ステップS119:NO)、演算部11は処理をステップS113へ戻し、異変検知処理及び学習用データの蓄積を継続する。所定量の学習用データが蓄積されたと判定した場合(ステップS119:YES)、演算部11は、データ蓄積部17に蓄積された学習用データを通信部18にて機械学習装置9へ送信する(ステップS120)。 The calculation unit 11 that has completed the process related to the generation of the learning data in step S117 stores the generated learning data in the data storage unit 17 (step S118). Then, the calculation unit 11 determines whether or not a predetermined amount of learning data has been accumulated (step S119). When it is determined that a predetermined amount of learning data has not been accumulated (step S119: NO), the calculation unit 11 returns the process to step S113, and continues the incident detection process and the accumulation of the learning data. When it is determined that a predetermined amount of learning data has been accumulated (step S119: YES), the calculation unit 11 transmits the learning data accumulated in the data storage unit 17 to the machine learning device 9 by the communication unit 18 (step S119: YES). Step S120).

機械学習装置9は、異変検知装置1から送信された学習用データを受信し(ステップS121)、ステップS116にて受信した画像認識ニューラルネットワーク21を、学習用データを用いて追加学習させる(ステップS122)。つまり、機械学習装置9は、認識不能であったオブジェクト6を含む撮像画像5の画像データが画像認識ニューラルネットワーク21に入力された場合、当該オブジェクト6の位置及び範囲並びに種類を示すデータが出力されるように、学習用データを用いて、画像認識ニューラルネットワーク21を追加学習させる。当該追加学習は、教師有り学習である。 The machine learning device 9 receives the learning data transmitted from the incident detection device 1 (step S121), and additionally learns the image recognition neural network 21 received in step S116 using the learning data (step S122). ). That is, when the image data of the captured image 5 including the unrecognizable object 6 is input to the image recognition neural network 21, the machine learning device 9 outputs data indicating the position, range, and type of the object 6. As described above, the image recognition neural network 21 is additionally trained using the training data. The additional learning is supervised learning.

次いで、機械学習装置9はステップS122にて追加学習された画像認識ニューラルネットワーク21を異変検知装置1へ送信する(ステップS123)。異変検知装置1は、機械学習装置9から送信された追加学習済みの画像認識ニューラルネットワーク21を通信部18にて受信する(ステップS124)。そして、異変検知装置1の演算部11は、追加学習前の画像認識ニューラルネットワーク21を、追加学習済みの新しい画像認識ニューラルネットワーク21に更新し(ステップS125)、処理をステップS111に戻す。 Next, the machine learning device 9 transmits the image recognition neural network 21 additionally learned in step S122 to the incident detection device 1 (step S123). The incident detection device 1 receives the additionally learned image recognition neural network 21 transmitted from the machine learning device 9 by the communication unit 18 (step S124). Then, the calculation unit 11 of the incident detection device 1 updates the image recognition neural network 21 before the additional learning with the new image recognition neural network 21 that has been additionally learned (step S125), and returns the process to step S111.

実施形態2に係る異変検知システムによれば、画像認識ニューラルネットワーク21及びオートエンコーダ31を用いた画素単位でのオブジェクト6の検出に失敗した場合であっても、自動的に学習用データを蓄積し、画像認識ニューラルネットワーク21を追加学習させることができる。 According to the incident detection system according to the second embodiment, even if the detection of the object 6 in pixel units using the image recognition neural network 21 and the autoencoder 31 fails, the learning data is automatically accumulated. , The image recognition neural network 21 can be additionally learned.

具体的には、画像認識ニューラルネットワーク21を用いてオブジェクト6の種類が検出されなかった場合、形状認識によりオブジェクト6の種類を検出し、画像認識ニューラルネットワーク21を追加学習させることができる。 Specifically, when the type of the object 6 is not detected by using the image recognition neural network 21, the type of the object 6 can be detected by shape recognition, and the image recognition neural network 21 can be additionally learned.

また、形状認識処理でもオブジェクト6の種類が特定されなかった場合、ユーザからオブジェクト6の種類を受け付けることによって、追加学習用データを生成し、画像認識ニューラルネットワーク21を追加学習させることができる。 Further, when the type of the object 6 is not specified even in the shape recognition process, by accepting the type of the object 6 from the user, additional learning data can be generated and the image recognition neural network 21 can be additionally learned.

更に、本実施形態2によれば、オブジェクト6の検出ないし検査対象物の異変検知処理と、画像認識ニューラルネットワーク21の追加学習とを並行的に実行することができる。従って、画像認識ニューラルネットワーク21の学習処理中も、オブジェクト6の検出処理を継続することができる。 Further, according to the second embodiment, the detection of the object 6 or the abnormality detection process of the inspection target object and the additional learning of the image recognition neural network 21 can be executed in parallel. Therefore, the detection process of the object 6 can be continued even during the learning process of the image recognition neural network 21.

1 異変検知装置
1a 撮像部
1b 表示部
1c 操作部
2 第1検出部
3 第2検出部
4 良否判定部
5 撮像画像
5a 特徴抽出画像
5b 差分画像
6、61、62、63 オブジェクト
7、71、72、73 バウンディングボックス
9 機械学習装置
11 演算部
12 一時記憶部
13 画像入力部
14 出力部
15 入力部
16 記憶部
16a コンピュータプログラム
17 データ蓄積部
18 通信部
21 画像認識ニューラルネットワーク
31 オートエンコーダ
31a 入力層
31b 出力層
31c コンボリューション層
31d デコンボリューション層
32 差分データ生成部
41 オブジェクト検出処理部
42 寸法測定処理部
43 良否判定処理部
1 Abnormality detection device 1a Imaging unit 1b Display unit 1c Operation unit 2 1st detection unit 3 2nd detection unit 4 Good / bad judgment unit 5 Captured image 5a Feature extraction image 5b Difference image 6, 61, 62, 63 Objects 7, 71, 72 , 73 Bounding box 9 Machine learning device 11 Calculation unit 12 Temporary storage unit 13 Image input unit 14 Output unit 15 Input unit 16 Storage unit 16a Computer program 17 Data storage unit 18 Communication unit 21 Image recognition neural network 31 Autoencoder 31a Input layer 31b Output layer 31c Convolution layer 31d Deconvolution layer 32 Difference data generation unit 41 Object detection processing unit 42 Dimension measurement processing unit 43 Good / bad judgment processing unit

データ蓄積部17は、記憶部16と同様、ハードディスク、EEPROM(登録商標)、フラッシュメモリ等の不揮発性メモリである。データ蓄積部17は、検査対象物の画像データ、異変検知結果等のデータを記憶する。 Like the storage unit 16, the data storage unit 17 is a non-volatile memory such as a hard disk, EEPROM (registered trademark), and a flash memory. The data storage unit 17 stores data such as image data of the inspection object and an abnormality detection result.

Claims (12)

撮像画像に含まれるオブジェクトを検出するオブジェクト検出方法であって、
前記撮像画像に含まれる前記オブジェクトの種類を検出する第1の方式にて前記オブジェクトを検出し、
前記撮像画像に含まれる前記オブジェクトを画素単位で検出する第2の方式にて前記オブジェクトを検出し、
前記第1の方式にて検出された前記オブジェクトの種類、及び前記第2の方式にて検出された前記オブジェクトに基づいて、前記オブジェクトの大きさ及び種類を画素単位で決定し、
前記オブジェクトに関して所定の判定を行うための閾値を、該オブジェクトの種類に基づいて選択し、
画素単位で決定された前記オブジェクトと、前記種類に基づいて選択された閾値とに基づいて前記所定の判定を行う
オブジェクト検出方法。
This is an object detection method that detects objects contained in captured images.
The object is detected by the first method of detecting the type of the object included in the captured image, and the object is detected.
The object is detected by the second method of detecting the object included in the captured image on a pixel-by-pixel basis.
Based on the type of the object detected by the first method and the object detected by the second method, the size and type of the object are determined in pixel units.
A threshold for making a predetermined determination with respect to the object is selected based on the type of the object.
An object detection method for making a predetermined determination based on the object determined on a pixel-by-pixel basis and a threshold value selected based on the type.
前記オブジェクトの一の種類の画素の総数と、該種類に基づいて選択された閾値とを比較することによって、前記所定の判定を行う
請求項1に記載のオブジェクト検出方法。
The object detection method according to claim 1, wherein the predetermined determination is performed by comparing the total number of pixels of one type of the object with the threshold value selected based on the type.
前記第2の方式による前記オブジェクトの検出は、前記撮像画像のデータが入力された場合、入力された該データの特徴が抽出された特徴抽出画像のデータを出力する学習済みオートエンコーダを用いて行う
請求項1又は請求項2に記載のオブジェクト検出方法。
The detection of the object by the second method is performed by using a trained autoencoder that outputs the data of the feature extraction image from which the features of the input data are extracted when the data of the captured image is input. The object detection method according to claim 1 or 2.
前記第1の方式による前記オブジェクトの検出は、前記撮像画像のデータが入力された場合、該撮像画像に含まれる前記オブジェクトの種類を出力する学習済みの画像認識ニューラルネットワークを用いて行う
請求項1から請求項3のいずれか1項に記載のオブジェクト検出方法。
The detection of the object by the first method is performed by using a trained image recognition neural network that outputs the type of the object included in the captured image when the data of the captured image is input. The object detection method according to any one of claims 3.
前記第1の方式による検出結果と、前記第2の方式による検出結果が整合しない場合、前記第1の方式と異なる第3の方式にて前記撮像画像に含まれる前記オブジェクトの種類を検出し、
前記画像認識ニューラルネットワークに前記撮像画像のデータが入力された場合、前記第3の方式にて検出された前記オブジェクトの種類が出力されるように、前記撮像画像及び前記第3の方式に係る検出結果を用いて、前記画像認識ニューラルネットワークを追加学習させる
請求項4に記載のオブジェクト検出方法。
When the detection result by the first method and the detection result by the second method do not match, the type of the object included in the captured image is detected by a third method different from the first method.
When the data of the captured image is input to the image recognition neural network, the captured image and the detection according to the third method are output so that the type of the object detected by the third method is output. The object detection method according to claim 4, wherein the image recognition neural network is additionally trained using the result.
前記第3の方式は、前記オブジェクトの輪郭線の形状パターンに基づいて前記オブジェクトの種類を検出する
請求項5に記載のオブジェクト検出方法。
The object detection method according to claim 5, wherein the third method detects the type of the object based on the shape pattern of the contour line of the object.
前記第3の方式にて前記オブジェクトの種類を検出できなった場合、該オブジェクトの種類をユーザから受け付け、
前記画像認識ニューラルネットワークに前記撮像画像のデータが入力された場合、前記オブジェクトの種類が出力されるように、前記撮像画像及び受け付けた前記オブジェクトの種類を用いて、前記画像認識ニューラルネットワークを追加学習させる
請求項5又は請求項6に記載のオブジェクト検出方法。
When the type of the object cannot be detected by the third method, the type of the object is accepted from the user.
When the data of the captured image is input to the image recognition neural network, the image recognition neural network is additionally learned by using the captured image and the received type of the object so that the type of the object is output. The object detection method according to claim 5 or 6.
前記画像認識ニューラルネットワークを用いた前記オブジェクトの検出と、該画像認識ニューラルネットワークの追加学習とを並行的に実行する
請求項5〜請求項7のいずれか1項に記載のオブジェクト検出方法。
The object detection method according to any one of claims 5 to 7, wherein the detection of the object using the image recognition neural network and the additional learning of the image recognition neural network are executed in parallel.
前記撮像画像は検査対象物を撮像して得た画像であり、検出対象の前記オブジェクトは該検査対象物における異変部位である
請求項1から請求項8のいずれか1項に記載のオブジェクト検出方法。
The object detection method according to any one of claims 1 to 8, wherein the captured image is an image obtained by imaging an inspection target object, and the object to be detected is an abnormal site in the inspection target object. ..
撮像画像に含まれるオブジェクトを検出するオブジェクト検出装置であって、
前記撮像画像に含まれる前記オブジェクトの種類を検出する第1検出部と、
前記撮像画像に含まれる前記オブジェクトを画素単位で検出する第2検出部と、
前記第1検出部にて検出された前記オブジェクトの種類、及び前記第2検出部にて画素単位で検出された前記オブジェクトに基づいて、前記オブジェクトの大きさ及び種類を画素単位で決定する決定部と、
前記オブジェクトに関して所定の判定を行うための閾値を、該オブジェクトの種類に基づいて選択する選択部と、
画素単位で決定された前記オブジェクトと、前記種類に基づいて選択された閾値とに基づいて前記所定の判定を行う判定部と
を備えるオブジェクト検出装置。
An object detection device that detects objects contained in captured images.
A first detection unit that detects the type of the object included in the captured image, and
A second detection unit that detects the object included in the captured image on a pixel-by-pixel basis,
A determination unit that determines the size and type of the object in pixel units based on the type of the object detected by the first detection unit and the object detected in pixel units by the second detection unit. When,
A selection unit that selects a threshold value for making a predetermined determination regarding the object based on the type of the object, and
An object detection device including the object determined on a pixel-by-pixel basis and a determination unit that makes a predetermined determination based on a threshold value selected based on the type.
コンピュータに撮像画像に含まれるオブジェクトを検出させるためのコンピュータプログラムであって、
前記コンピュータに、
前記撮像画像に含まれる前記オブジェクトの種類を検出する第1の方式にて前記オブジェクトを検出し、
前記撮像画像に含まれる前記オブジェクトを画素単位で検出する第2の方式にて前記オブジェクトを検出し、
前記第1の方式にて検出された前記オブジェクトの種類、及び前記第2の方式にて検出された前記オブジェクトに基づいて、前記オブジェクトの大きさ及び種類を画素単位で決定し、
前記オブジェクトに関して所定の判定を行うための閾値を、該オブジェクトの種類に基づいて選択し、
画素単位で決定された前記オブジェクトと、前記種類に基づいて選択された閾値とに基づいて前記所定の判定を行う
処理を実行させるためのコンピュータプログラム。
A computer program that allows a computer to detect objects contained in a captured image.
On the computer
The object is detected by the first method of detecting the type of the object included in the captured image, and the object is detected.
The object is detected by the second method of detecting the object included in the captured image on a pixel-by-pixel basis.
Based on the type of the object detected by the first method and the object detected by the second method, the size and type of the object are determined in pixel units.
A threshold for making a predetermined determination with respect to the object is selected based on the type of the object.
A computer program for executing a process of performing the predetermined determination based on the object determined on a pixel-by-pixel basis and a threshold value selected based on the type.
コンピュータに撮像画像に含まれるオブジェクトを検出して得られる情報を表示させるためのコンピュータプログラムであって、
前記コンピュータに、
前記撮像画像に含まれる前記オブジェクトの種類を検出する第1の方式にて前記オブジェクトを検出して得られた情報と、前記撮像画像に含まれる前記オブジェクトを画素単位で検出する第2の方式にて前記オブジェクトを検出して得られた情報とに基づく情報を表示させる
処理を実行させるためのコンピュータプログラム。
A computer program for displaying information obtained by detecting an object contained in a captured image on a computer.
On the computer
The information obtained by detecting the object by the first method of detecting the type of the object included in the captured image and the second method of detecting the object included in the captured image on a pixel-by-pixel basis. A computer program for executing a process of displaying information based on the information obtained by detecting the object.
JP2020536308A 2018-08-06 2019-03-27 OBJECT DETECTION METHOD, OBJECT DETECTION DEVICE AND COMPUTER PROGRAM Active JP7245451B2 (en)

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2018147979 2018-08-06
JP2018147979 2018-08-06
PCT/JP2019/013129 WO2020031422A1 (en) 2018-08-06 2019-03-27 Object detection method, object detection device, and computer program

Publications (2)

Publication Number Publication Date
JPWO2020031422A1 true JPWO2020031422A1 (en) 2021-08-10
JP7245451B2 JP7245451B2 (en) 2023-03-24

Family

ID=69415459

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020536308A Active JP7245451B2 (en) 2018-08-06 2019-03-27 OBJECT DETECTION METHOD, OBJECT DETECTION DEVICE AND COMPUTER PROGRAM

Country Status (2)

Country Link
JP (1) JP7245451B2 (en)
WO (1) WO2020031422A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170109881A1 (en) * 2015-10-14 2017-04-20 The Regents Of The University Of California Automated segmentation of organ chambers using deep learning methods from medical imaging
WO2018135246A1 (en) * 2017-01-23 2018-07-26 株式会社Nttドコモ Information processing system and information processing device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170109881A1 (en) * 2015-10-14 2017-04-20 The Regents Of The University Of California Automated segmentation of organ chambers using deep learning methods from medical imaging
WO2018135246A1 (en) * 2017-01-23 2018-07-26 株式会社Nttドコモ Information processing system and information processing device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
岡谷貴之: ""画像認識のための深層学習の研究動向 −畳込みニューラルネットワークとその利用法の発展−"", 人工知能, vol. 第31巻, 第2号, JPN6022049319, 2016, pages 169 - 179, ISSN: 0004923873 *

Also Published As

Publication number Publication date
WO2020031422A1 (en) 2020-02-13
JP7245451B2 (en) 2023-03-24

Similar Documents

Publication Publication Date Title
US10885618B2 (en) Inspection apparatus, data generation apparatus, data generation method, and data generation program
US8977035B2 (en) System, method and computer program product for detection of defects within inspection images
EP3499418B1 (en) Information processing apparatus, identification system, setting method, and program
JP3834041B2 (en) Learning type classification apparatus and learning type classification method
JP7131617B2 (en) Method, device, system, program and storage medium for setting lighting conditions
JP2017049974A (en) Discriminator generator, quality determine method, and program
JP2012032370A (en) Defect detection method, defect detection apparatus, learning method, program, and recording medium
JP2012026982A (en) Inspection device
JP2016115331A (en) Identifier generator, identifier generation method, quality determination apparatus, quality determination method and program
US20220114725A1 (en) Microscopy System and Method for Checking Input Data
JP7393313B2 (en) Defect classification device, defect classification method and program
JP7453813B2 (en) Inspection equipment, inspection methods, programs, learning devices, learning methods, and learned datasets
JP6347589B2 (en) Information processing apparatus, information processing method, and program
JP2021086379A (en) Information processing apparatus, information processing method, program, and method of generating learning model
JP2022045688A (en) Defect management device, method, and program
US20020051561A1 (en) Image processing apparatus, image processing method, and recording medium recording image processing program
JP7198438B2 (en) OBJECT DETECTION METHOD, OBJECT DETECTION DEVICE AND COMPUTER PROGRAM
JP2014126445A (en) Alignment device, defect inspection device, alignment method and control program
CN117274258A (en) Method, system, equipment and storage medium for detecting defects of main board image
JP2006292615A (en) Visual examination apparatus, visual inspection method, program for making computer function as visual inspection apparatus, and recording medium
WO2016092783A1 (en) Information processing apparatus, method for processing information, discriminator generating apparatus, method for generating discriminator, and program
JP2023145412A (en) Defect detection method and system
JP7245451B2 (en) OBJECT DETECTION METHOD, OBJECT DETECTION DEVICE AND COMPUTER PROGRAM
CN114998194A (en) Product defect detection method, system and storage medium
EP4352451A1 (en) Texture mapping to polygonal models for industrial inspections

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210204

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210921

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20221118

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221213

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20230223

R150 Certificate of patent or registration of utility model

Ref document number: 7245451

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150