JP7469100B2 - Detection device and program - Google Patents

Detection device and program Download PDF

Info

Publication number
JP7469100B2
JP7469100B2 JP2020057704A JP2020057704A JP7469100B2 JP 7469100 B2 JP7469100 B2 JP 7469100B2 JP 2020057704 A JP2020057704 A JP 2020057704A JP 2020057704 A JP2020057704 A JP 2020057704A JP 7469100 B2 JP7469100 B2 JP 7469100B2
Authority
JP
Japan
Prior art keywords
image
type
learning
model
screw
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2020057704A
Other languages
Japanese (ja)
Other versions
JP2021157550A (en
JP2021157550A5 (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.)
NTT TechnoCross Corp
Original Assignee
NTT TechnoCross Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NTT TechnoCross Corp filed Critical NTT TechnoCross Corp
Priority to JP2020057704A priority Critical patent/JP7469100B2/en
Publication of JP2021157550A publication Critical patent/JP2021157550A/en
Publication of JP2021157550A5 publication Critical patent/JP2021157550A5/ja
Application granted granted Critical
Publication of JP7469100B2 publication Critical patent/JP7469100B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)

Description

本発明は、検出装置及びプログラムに関する。 The present invention relates to a detection device and a program.

画像処理技術や機械学習技術を用いて、製品の検品や不良品の選別、物品数の計測等が従来から行われている(例えば、非特許文献1~3)。 Image processing and machine learning technologies have traditionally been used to inspect products, sort out defective products, and measure the number of items (for example, non-patent literature 1 to 3).

"画像判定トータルソリューション|日立ソリューションズ『画像判定トータルソリューション』のシステム、サービス概要・価格や、解決出来る課題をご紹介",インターネット<URL:https://www.hitachi-solutions.co.jp/mfigazouhantei/>"Image judgment total solution | Introducing the system, service overview, price, and problems that can be solved of Hitachi Solutions' "Image judgment total solution", Internet <URL: https://www.hitachi-solutions.co.jp/mfigazouhantei/> "ブレインパッド、キユーピーの食品工場における不良品の検知をディープラーニングによる画像解析で支援 ブレインパッド",インターネット<URL:http://www.brainpad.co.jp/news/2016/10/25/3816>"Brainpad helps detect defective products at Kewpie's food factories with image analysis using deep learning" (Brainpad), Internet <URL: http://www.brainpad.co.jp/news/2016/10/25/3816> "微小・軽量部品 数量カウント補助システム めばかり君|inrevium|東京エレクトロンデバイス株式会社",インターネット<URL:https://www.inrevium.com/product/mebakarikun/>"Micro/Lightweight Parts Counting Support System Mebakarikun | inrevium | Tokyo Electron Device Co., Ltd.", Internet <URL: https://www.inrevium.com/product/mebakarikun/>

しかしながら、従来では、例えば、検出対象の個体差等により画像から物品を検出できない場合があった。 However, in the past, there were cases where an item could not be detected from an image due to individual differences in the object to be detected, for example.

本発明の一実施形態は、上記の点に鑑みてなされたもので、画像中の検出対象を検出する際の検出率を向上させることを目的とする。 One embodiment of the present invention has been made in consideration of the above points, and aims to improve the detection rate when detecting a detection target in an image.

上記の目的を達成するため、一実施形態に係る検出装置は、1以上の検出対象の物体を撮影した撮影画像を入力する入力手段と、前記撮影画像から地色と異なる色を抽出することで色差分画像を作成する第1の作成手段と、任意の方法により、前記撮影画像中の物体を検知した判定結果と、前記色差分画像とを用いて、前記判定結果で検出されなかった未検出物体を特定する特定手段と、前記未検出物体を含む所定の大きさの画像領域を前記撮影画像から切り出した未検出物体画像を作成する第2の作成手段と、を有することを特徴とする。 To achieve the above object, a detection device according to one embodiment has an input means for inputting a photographed image of one or more detection target objects, a first creation means for creating a color difference image by extracting a color different from the background color from the photographed image, an identification means for identifying an undetected object not detected in the judgment result by using a judgment result of detecting an object in the photographed image by any method and the color difference image, and a second creation means for creating an undetected object image by cutting out an image area of a predetermined size including the undetected object from the photographed image.

画像中の検出対象を検出する際の検出率を向上させることができる。 It is possible to improve the detection rate when detecting objects in an image.

推論時における物品判定装置の全体構成の一例を示す図である。FIG. 2 is a diagram showing an example of the overall configuration of a product evaluation device during inference. 本実施形態に係る物品判定処理の一例を示すフローチャートである。10 is a flowchart showing an example of an item evaluation process according to the present embodiment. 判定対象画像の一例を示す図である。FIG. 13 is a diagram showing an example of a determination target image. 物体検出及びクラス分類結果の画像の一例を示す図である。FIG. 13 is a diagram showing an example of an image resulting from object detection and class classification. 色差分を抽出した画像の一例を示す図である。FIG. 13 is a diagram showing an example of an image from which color differences are extracted. 未検出物体を含む領域を切り出した画像の一例を示す図である。FIG. 13 is a diagram showing an example of an image in which a region including an undetected object is cut out. 学習時における物品判定装置の全体構成の一例を示す図である。FIG. 2 is a diagram showing an example of the overall configuration of the product evaluation device during learning. 第1のモデルパラメータを学習するための学習用画像の作成を説明する図である。11A and 11B are diagrams illustrating the creation of learning images for learning a first model parameter. 第2のモデルパラメータを学習するための学習用画像の作成を説明する図である。13A to 13C are diagrams illustrating the creation of learning images for learning a second model parameter. 本実施形態に係る学習処理の一例を示すフローチャートである。10 is a flowchart illustrating an example of a learning process according to the present embodiment.

以下、本発明の一実施形態について説明する。本実施形態では、1以上の物品を撮影した画像からその物品の種類(例えば、物品名)を判定し、物品の種類毎の物品数を算出する物品判定装置10について説明する。本実施形態に係る物品判定装置10を用いることで、例えば、製品の検品や不良品の選別、物品数の計測等の際に、作業者個人の経験やスキルに依らずに画一的に物品の種類(良品又は不良品等)を判定したりその種類毎の物品数を算出したりすることが可能になる。また、作業者が一つ一つの物品を目視確認する必要がなくなり効率的に物品の種類を判定したりその種類毎の物品数を算出したりすることが可能になる。 An embodiment of the present invention will be described below. In this embodiment, an article evaluation device 10 will be described that determines the type of article (e.g., article name) from an image of one or more articles captured and calculates the number of articles of each type. By using the article evaluation device 10 according to this embodiment, for example, when inspecting products, sorting out defective articles, or measuring the number of articles, it becomes possible to uniformly determine the type of article (good or defective, etc.) and calculate the number of articles of each type without relying on the experience or skill of the individual worker. In addition, it becomes unnecessary for the worker to visually check each article, and it becomes possible to efficiently determine the type of article and calculate the number of articles of each type.

以降では、一例として、判定対象の物品は「ネジ」であり、その種類には「プラスネジ」と「マイナスネジ」とがあるものとする。ただし、これは一例であって、本実施形態は、外観上視認可能な任意の対象(例えば、任意の物品や物体、動植物、食品、物品や物体上の傷又は形状的な欠陥等)を判定対象として、その対象の種類(例えば、物品の機能又は用途等によって分類される種類、物品が良品又は不良品のいずれであるかを示す種類、傷の種類等)を判定する場合にも同様に適用することが可能である。 In the following, as an example, the object to be judged is a "screw," and there are two types: a "phillips screw" and a "flat head screw." However, this is just one example, and this embodiment can be similarly applied to cases where any object that is visible from the outside (e.g., any object or body, animal or plant, food, scratches or geometric defects on an object or body, etc.) is judged as the object to be judged, and the type of the object (e.g., a type classified according to the function or use of the object, a type that indicates whether the object is good or bad, a type of scratch, etc.) is judged.

ここで、本実施形態に係る物品判定装置10は、ニューラルネットワークでそれぞれ実現される2つの分類モデル(第1の分類モデル及び第2の分類モデル)により、画像中の物品の種類を判定する。このため、本実施形態に係る物品判定装置10には、第1の分類モデル及び第2の分類モデルをそれぞれ実現するニューラルネットワークのパラメータを学習する「学習時」と、学習済みのパラメータを用いて第1の分類モデル及び第2の分類モデルにより物品の種類を判定(推論)する「推論時」とがある。そこで、本実施形態では、物品判定装置10の学習時と推論時についてそれぞれ説明する。なお、以降では、第1の分類モデルを実現するニューラルネットワークのパラメータを「第1のモデルパラメータ」、第2の分類モデルを実現するニューラルネットワークのパラメータを「第2のモデルパラメータ」と表す。 Here, the product evaluation device 10 according to this embodiment judges the type of product in an image using two classification models (first classification model and second classification model) each realized by a neural network. For this reason, the product evaluation device 10 according to this embodiment has a "learning time" during which the parameters of the neural networks that realize the first classification model and the second classification model, respectively, are learned, and an "inference time" during which the learned parameters are used to judge (infer) the type of product using the first classification model and the second classification model. Therefore, in this embodiment, the learning time and the inference time of the product evaluation device 10 will be described separately. Note that hereinafter, the parameters of the neural network that realizes the first classification model will be referred to as "first model parameters", and the parameters of the neural network that realizes the second classification model will be referred to as "second model parameters".

[推論時]
まず、第1のモデルパラメータ及び第2のモデルパラメータはそれぞれ学習済みであるものとして、第1のモデルパラメータ及び第2のモデルパラメータを用いて画像中の物品の種類とその数とを判定する推論時について説明する。
[Inference time]
First, assuming that the first model parameters and the second model parameters have already been learned, an inference process for determining the type and number of objects in an image using the first model parameters and the second model parameters will be described.

<推論時における物品判定装置10の全体構成>
推論時における物品判定装置10の全体構成について、図1を参照しながら説明する。図1は、推論時における物品判定装置10の全体構成の一例を示す図である。
<Overall configuration of the product evaluation device 10 during inference>
The overall configuration of the product evaluation device 10 at the time of inference will be described with reference to Fig. 1. Fig. 1 is a diagram showing an example of the overall configuration of the product evaluation device 10 at the time of inference.

図1に示すように、推論時における物品判定装置10は、入力部101と、第1の判定部102と、色差分抽出部103と、未検出物体特定部104と、画像切出部105と、第2の判定部106と、算出部107とを有する。これら各部は、例えば、物品判定装置10にインストールされた1以上のプログラムが、CPU(Central Processing Unit)等のプロセッサに実行させる処理により実現される。 As shown in FIG. 1, the product evaluation device 10 during inference has an input unit 101, a first evaluation unit 102, a color difference extraction unit 103, an undetected object identification unit 104, an image extraction unit 105, a second evaluation unit 106, and a calculation unit 107. Each of these units is realized, for example, by a process in which one or more programs installed in the product evaluation device 10 are executed by a processor such as a CPU (Central Processing Unit).

入力部101は、判定対象となる1以上の物品を撮影した画像(以下、「判定対象画像」という。)を入力する。 The input unit 101 inputs an image of one or more items to be judged (hereinafter referred to as "image to be judged").

第1の判定部102は判定対象画像に対して物体検出と当該物体のクラス分類とを行う第1の分類モデルであり、第1のモデルパラメータを用いて、判定対象画像中に含まれる物品の検出と当該物品(ネジ)が「プラスネジ」又は「マイナスネジ」のいずれのクラスに属するかのクラス分類とを行う。これにより、判定対象画像に対して物体検出及びクラス分類を行った結果を示す画像(以下、「第1の分類結果画像」という。)が得られる。 The first judgment unit 102 is a first classification model that performs object detection and classifying of the object in the judgment target image, and uses the first model parameters to detect an object contained in the judgment target image and classify the object (screw) into either a "Phillips screw" or a "flat head screw" class. This results in an image showing the result of performing object detection and classifying of the judgment target image (hereinafter referred to as the "first classification result image").

なお、第1のモデルパラメータは、後述するように、1以上の物品(ネジ)が含まれる画像に対して、画像領域指定を行い、それらの物品が「プラスネジ」又は「マイナスネジ」のいずれのクラスに属するかを示すアノテーションを行った学習用画像を第1の分類モデルに入力し、各物品のクラス分類結果とアノテーションの結果との誤差を最小化するように学習されたものである。 As described below, the first model parameters are learned by inputting training images, which are images containing one or more objects (screws) and are annotated to indicate whether the objects belong to a "Phillips screw" or a "flat head screw" class, into the first classification model, and minimizing the error between the class classification results for each object and the annotation results.

色差分抽出部103は、判定対象画像から地色(背景)と異なる色の部分を抽出した画像(以下、「色差分画像」という。)を作成する。 The color difference extraction unit 103 creates an image (hereinafter referred to as a "color difference image") by extracting parts of the image to be judged that have a color different from the ground color (background).

未検出物体特定部104は、第1の分類結果画像と色差分画像とを用いて、判定対象画像中の物体のうち、第1の判定部102で検出されなかった物体(つまり、未検出物体)を特定する。 The undetected object identification unit 104 uses the first classification result image and the color difference image to identify objects in the image to be judged that were not detected by the first judgment unit 102 (i.e., undetected objects).

画像切出部105は、判定対象画像中の未検出物体を含む部分領域を切り出した画像(以下、「未検出物体画像」という。)を作成する。 The image cropping unit 105 creates an image (hereinafter referred to as an "undetected object image") by cropping out a partial area that includes an undetected object from the image to be determined.

第2の判定部106は未検出物体画像のクラス分類を行う第2の分類モデルであり、第2のモデルパラメータを用いて、未検出物体画像が「プラスネジ」、「マイナスネジ」又は「ネジ以外」のいずれのクラスに属するかのクラス分類を行う。これにより、未検出物体画像に対してクラス分類を行った結果を示す画像(以下、「第2の分類結果画像」という。)が得られる。 The second determination unit 106 is a second classification model that performs class classification of the undetected object image, and uses the second model parameters to classify the undetected object image into one of the classes of "Phillips screw", "flat head screw", or "other than screw". This results in an image showing the result of classifying the undetected object image (hereinafter referred to as the "second classification result image").

ここで、第2の分類モデルには、未検出物体画像が「プラスネジ」又は「プラスネジ以外」のいずれのクラスに属するかのクラス分類を行う第3の分類モデルと、未検出物体画像が「マイナスネジ」又は「マイナスネジ以外」のいずれのクラスに属するかのクラス分類を行う第4の分類モデルとが含まれる。第2の判定部106は、第3の分類モデルにより未検出物体画像に対してクラス分類を行って「プラスネジ」又は「プラスネジ以外」のいずれであるかを判定し、「プラスネジ以外」であると判定された場合は第4の分類モデルにより未検出物体画像に対してクラス分類を行って「マイナスネジ」又は「マイナスネジ以外」のいずれであるかを判定し、「マイナスネジ以外」であると判定された場合は「ネジ以外」と判定する。これにより、未検出物体画像に含まれる物体が「プラスネジ」、「マイナスネジ」又は「ネジ以外」のいずれかに分類される。 Here, the second classification model includes a third classification model that performs classifying whether the undetected object image belongs to a class of "Phillips screw" or "other than Phillips screw", and a fourth classification model that performs classifying whether the undetected object image belongs to a class of "flat head screw" or "other than Phillips screw". The second determination unit 106 performs class classification on the undetected object image using the third classification model to determine whether it is a "Phillips screw" or "other than Phillips screw", and if it is determined to be a "other than Phillips screw", performs class classification on the undetected object image using the fourth classification model to determine whether it is a "flat head screw" or "other than Phillips screw", and if it is determined to be a "other than Phillips screw", determines it to be "other than screw". As a result, the object included in the undetected object image is classified as either a "Phillips screw", a "flat head screw", or "other than screw".

また、このとき、第2のモデルパラメータには、第3の分類モデルを実現するニューラルネットワークのパラメータである第3のモデルパラメータと、第4の分類モデルを実現するニューラルネットワークのパラメータである第4のパラメータとが含まれる。 In addition, at this time, the second model parameters include a third model parameter that is a parameter of a neural network that realizes a third classification model, and a fourth parameter that is a parameter of a neural network that realizes a fourth classification model.

なお、第3のモデルパラメータは、後述するように、1つの物品(ネジ)が含まれる画像に対してその物品(ネジ)が「プラスネジ」又は「プラスネジ以外」のいずれのクラスに属するか示すラベルを付与した学習用画像を第3の分類モデルに入力し、当該物品のクラス分類結果とラベルとの誤差を最小化するように学習されたものである。同様に、第4のモデルパラメータは、後述するように、1つの物品(ネジ)が含まれる画像に対してその物品が「マイナスネジ」又は「マイナスネジ以外」のいずれのクラスに属するか示すラベルを付与した学習用画像を第4の分類モデルに入力し、当該物品のクラス分類結果とラベルとの誤差を最小化するように学習されたものである。 The third model parameters, as described below, are trained to minimize the error between the class classification result of an object and the label when training images containing an object (screw) are input to the third classification model, with a label indicating whether the object (screw) belongs to a class of "Phillips screw" or "non-Phillips screw". Similarly, the fourth model parameters, as described below, are trained to minimize the error between the class classification result of an object and the label when training images containing an object (screw) are input to the fourth classification model, with a label indicating whether the object belongs to a class of "flat head screw" or "non-flat head screw".

算出部107は、未検出物体特定部104により未検出物体が特定されなかった場合は第1の分類結果画像から種類毎の物品数を算出し、未検出物体特定部104により未検出物体が特定された場合は第1の分類結果画像と第2の分類結果画像から種類毎の物品数を算出する。 The calculation unit 107 calculates the number of items per type from the first classification result image if the undetected object identification unit 104 has not identified an undetected object, and calculates the number of items per type from the first classification result image and the second classification result image if the undetected object identification unit 104 has identified an undetected object.

<物品判定処理>
次に、本実施形態に係る物品判定装置10により判定対象画像中の物品の種類を判定し、その種類毎の物品数を算出する処理について、図2を参照しながら説明する。図2は、本実施形態に係る物品判定処理の一例を示すフローチャートである。
<Product evaluation process>
Next, a process of determining the type of products in an evaluation target image by the product evaluation device 10 according to this embodiment and calculating the number of products of each type will be described with reference to Fig. 2. Fig. 2 is a flowchart showing an example of the product evaluation process according to this embodiment.

入力部101は、判定対象画像を入力する(ステップS101)。ここで、判定対象画像は少なくとも1以上の物品が含まれる画像であり、例えば、物品の製造工程や検品工程等を撮影することで生成された画像である。判定対象画像の一例を図3に示す。図3に示す判定対象画像1000には物品(ネジ)S1~S8が含まれる。なお、物品は一部が重なっていてもよいし、物品以外の物体(例えば、他の物品、塵や埃、異物等)が含まれていてもよい。図3に示す例では、物品S6と物品S7とが一部重なっている。また、図3に示す例では判定対象の物品(ネジ)以外の物品としてナットNが含まれている。 The input unit 101 inputs an image to be judged (step S101). Here, the image to be judged is an image that includes at least one or more items, and is, for example, an image generated by photographing the manufacturing process or inspection process of an item. An example of an image to be judged is shown in FIG. 3. The image to be judged 1000 shown in FIG. 3 includes items (screws) S1 to S8. Note that the items may be partially overlapping, and may include objects other than the items (for example, other items, dust, dirt, foreign matter, etc.). In the example shown in FIG. 3, items S6 and S7 are partially overlapping. Also, in the example shown in FIG. 3, a nut N is included as an item other than the item to be judged (screw).

次に、第1の判定部102は、第1のモデルパラメータを用いて、判定対象画像に対して物体検出と当該物体のクラス分類とを行って、判定対象画像中の物品(ネジ)を検出した上で、検出した物品が「プラスネジ」又は「マイナスネジ」のいずれのクラスに属するかを分類する(ステップS102)。これにより、判定対象画像に対して物体検出及びクラス分類を行った結果を示す第1の分類結果画像が得られる。ここで、図3に示す判定対象画像1000に対して物体検出及びクラス分類を行った結果を示す第1の分類結果画像の一例を図4に示す。図4に示す第1の分類結果画像2000では、物品S1~S2及びS4~S7の画像領域はプラスネジと分類された画像領域であり、物品S8の画像領域はマイナスネジと分類された画像領域である。これにより、物品S1~S2及びS4~S7はプラスネジ、物品S8はマイナスネジと判定される。 Next, the first determination unit 102 performs object detection and class classification of the object on the determination target image using the first model parameters, detects an object (screw) in the determination target image, and classifies the detected object as belonging to either a "Phillips screw" or a "flat head screw" class (step S102). This results in a first classification result image showing the result of performing object detection and class classification on the determination target image. Here, an example of a first classification result image showing the result of performing object detection and class classification on the determination target image 1000 shown in FIG. 3 is shown in FIG. 4. In the first classification result image 2000 shown in FIG. 4, the image regions of the objects S1 to S2 and S4 to S7 are image regions classified as Phillips screws, and the image region of the object S8 is an image region classified as a flat head screw. As a result, the objects S1 to S2 and S4 to S7 are determined to be Phillips screws, and the object S8 is determined to be a flat head screw.

一方で、図4に示す第1の分類結果画像2000では、物品S3及びナットNは第1の判定部102では物体検出及びクラス分類されていない。このように、判定対象の物品(ネジ)であっても、何等かの原因(例えば、光の当たり方や物品の向き、物品の個体差、学習用画像の不足等)によっては第1の分類モデルで検出できないことがある。また、第1の分類モデルでは判定対象の物品(ネジ)以外の物体(例えば、他の物品、塵や埃、異物等)を検出する可能性は極めて低い。 On the other hand, in the first classification result image 2000 shown in FIG. 4, the item S3 and the nut N are not detected as objects or classified by the first determination unit 102. In this way, even if the item to be determined (screw) is an object, it may not be detected by the first classification model due to some cause (e.g., the way the light hits the item, the orientation of the item, individual differences in the item, a lack of learning images, etc.). In addition, the first classification model is highly unlikely to detect objects (e.g., other items, dust, dirt, foreign objects, etc.) other than the item to be determined (screw).

次に、色差分抽出部103は、判定対象画像から地色(背景)と異なる色の抽出した色差分画像を作成する(ステップS103)。ここで、図3に示す判定対象画像1000から地色と異なる色を抽出した色差分画像の一例を図5に示す。図5に示す色差分画像3000では、判定対象画像1000中の全ての物体(つまり、物品(ネジ)S1~S8、ナットN)の画像領域が色差分領域として抽出される。 Next, the color difference extraction unit 103 creates a color difference image by extracting colors different from the ground color (background) from the judgment target image (step S103). FIG. 5 shows an example of a color difference image in which colors different from the ground color are extracted from the judgment target image 1000 shown in FIG. 3. In the color difference image 3000 shown in FIG. 5, the image regions of all objects (i.e., items (screws) S1 to S8 and nut N) in the judgment target image 1000 are extracted as color difference regions.

次に、未検出物体特定部104は、第1の分類結果画像と色差分画像とを用いて、判定対象画像中の物体のうち、第1の判定部102で検出されなかった物体(つまり、未検出物体)を特定する(ステップS104)。未検出物体特定部104は、第1の分類結果画像と色差分画像とを重畳させた場合に、プラスネジの画像領域及びマイナスネジの画像領域と全く重ならない色差分領域を未検出物体の画像領域とすることで、未検出物体を特定する。より具体的には、未検出物体特定部104は、第1の分類結果画像におけるプラスネジ又はマイナスネジの各画像領域中の各画素の位置座標と、色差分画像における各色差分領域中の各画素の位置座標とを比較し、プラスネジ又はマイナスネジの画像領域に全く重ならない色差分領域を未検出物体の画像領域とすることで、未検出物体を特定する。 Next, the undetected object identification unit 104 uses the first classification result image and the color difference image to identify objects in the judgment target image that were not detected by the first judgment unit 102 (i.e., undetected objects) (step S104). When the first classification result image and the color difference image are superimposed, the undetected object identification unit 104 identifies the undetected object by determining the color difference area that does not overlap at all with the image area of the Phillips screw and the image area of the flathead screw as the image area of the undetected object. More specifically, the undetected object identification unit 104 compares the position coordinates of each pixel in each image area of the Phillips screw or the flathead screw in the first classification result image with the position coordinates of each pixel in each color difference area in the color difference image, and identifies the undetected object by determining the color difference area that does not overlap at all with the image area of the Phillips screw or the flathead screw as the image area of the undetected object.

例えば、図4に示す第1の分類結果画像2000と図5に示す色差分画像3000とを重畳させた場合、物品(ネジ)S3の色差分領域とナットNの色差分領域は共にプラスネジの画像領域及びマイナスネジの画像領域と全く重ならない。このため、この場合、物品S3とナットNとが未検出物体として特定される。 For example, when the first classification result image 2000 shown in FIG. 4 and the color difference image 3000 shown in FIG. 5 are superimposed, the color difference region of the object (screw) S3 and the color difference region of the nut N do not overlap at all with the image region of the Phillips screw and the image region of the flathead screw. Therefore, in this case, the object S3 and the nut N are identified as undetected objects.

上記のステップS104で未検出物体が特定されなかった場合(ステップS105でNO)、算出部107は、第1の分類結果画像から物品の種類毎の物品数を算出する(ステップS106)。すなわち、算出部107は、第1の分類結果画像中でプラスネジと判定された物品数とマイナスネジと判定された物品数とをそれぞれ算出する。これにより、判定対象画像中の物品の種類毎の数が得られる。 If an undetected object is not identified in step S104 above (NO in step S105), the calculation unit 107 calculates the number of items for each type of item from the first classification result image (step S106). That is, the calculation unit 107 calculates the number of items determined to be Phillips screws and the number of items determined to be flathead screws in the first classification result image. This obtains the number of each type of item in the image to be determined.

一方で、上記のステップS104で未検出物体が特定された場合(ステップS105でYES)、画像切出部105は、判定対象画像中の未検出物体を含む部分領域をそれぞれ切り出して、未検出物体画像を作成する(ステップS107)。画像切出部105は、例えば、判定対象画像中の未検出物体を含み、かつ、所定の大きさ(サイズ)の矩形の画像領域をそれぞれ切り出することで、1以上の未検出物体画像を作成すればよい。具体的には、例えば、判定対象画像1000中の未検出物体である物品(ネジ)S3及びナットNをそれぞれ含み、かつ、所定の大きさの矩形の画像領域を切り出すことで、図6(a)に示す未検出物体画像4100と図6(b)に示す未検出物体画像4200とが作成される。図6(a)に示す未検出物体画像4100は物品S3を含む所定の大きさの画像であり、図6(b)に示す未検出物体画像4200はナットNを含む所定の大きさの画像である。 On the other hand, if an undetected object is identified in step S104 (YES in step S105), the image cropping unit 105 creates an undetected object image by cropping out a partial area including the undetected object in the judgment target image (step S107). The image cropping unit 105 may create one or more undetected object images by cropping out rectangular image areas of a predetermined size that include the undetected object in the judgment target image. Specifically, for example, the undetected object image 4100 shown in FIG. 6(a) and the undetected object image 4200 shown in FIG. 6(b) are created by cropping out rectangular image areas of a predetermined size that include the item (screw) S3 and the nut N, which are undetected objects in the judgment target image 1000. The undetected object image 4100 shown in FIG. 6(a) is an image of a predetermined size that includes the item S3, and the undetected object image 4200 shown in FIG. 6(b) is an image of a predetermined size that includes the nut N.

次に、第2の判定部106は、第2のモデルパラメータを用いて、各未検出物体画像のクラス分類をそれぞれ行って、これら各未検出物体画像のそれぞれが「プラスネジ」、「マイナスネジ」又は「ネジ以外」のいずれのクラスに属するかを分類する(ステップS108)。 Next, the second determination unit 106 uses the second model parameters to classify each undetected object image into a class of "Phillips screw," "flat head screw," or "non-screw" (step S108).

具体的には、第2の判定部106は、まず、第3のモデルパラメータを用いて、未検出物体画像に対してクラス分類を行って、当該未検出物体画像が「プラスネジ」又は「プラスネジ以外」のいずれのクラスに属するかを分類する。「プラスネジ以外」と分類された場合は、第2の判定部106は、第4のモデルパラメータを用いて、当該未検出物体画像に対してクラス分類を行って、当該未検出物体画像が「マイナスネジ」又は「マイナスネジ以外」のいずれのクラスに属するかを分類する。「マイナスネジ以外」と分類された場合は、第2の判定部106は、当該未検出物体画像を「ネジ以外」のクラスに属すると分類する。これにより、未検出物体画像中の物体が「プラスネジ」、「マイナスネジ」又は「ネジ以外」のいずれかのクラスに分類される。具体的には、例えば、図6(a)に示す未検出物体画像4100中の物体(ネジS3)は「プラスネジ」のクラスに分類され、図6(a)に示す未検出物体画像4200中の物体(ナットN)は「ネジ以外」のクラスに分類される。 Specifically, the second determination unit 106 first uses the third model parameter to perform class classification on the undetected object image to classify whether the undetected object image belongs to a "Phillips screw" or a "non-Phillips screw". If the undetected object image is classified as "non-Phillips screw", the second determination unit 106 uses the fourth model parameter to perform class classification on the undetected object image to classify whether the undetected object image belongs to a "flat head screw" or a "non-flat head screw". If the undetected object image is classified as "non-Phillips screw", the second determination unit 106 classifies the undetected object image as belonging to a "non-screw" class. As a result, the object in the undetected object image is classified into one of the classes of "Phillips screw", "flat head screw", or "non-screw". Specifically, for example, the object (screw S3) in the undetected object image 4100 shown in FIG. 6(a) is classified into the "Phillips screw" class, and the object (nut N) in the undetected object image 4200 shown in FIG. 6(a) is classified into the "non-screw" class.

なお、本実施形態では、一例として、「プラスネジ」及び「プラスネジ以外」の2クラス分類を行う第3の分類モデルと、「マイナスネジ」及び「マイナスネジ以外」の2クラス分類を行う第4の分類モデルとで第2の分類モデルが構成されている場合について説明したが、これに限られず、例えば、第2の分類モデルは「プラスネジ」、「マイナスネジ」及び「ネジ以外」の3クラス分類を行うモデルであってもよい。 In this embodiment, as an example, the second classification model is described as being composed of a third classification model that performs two-class classification, "Phillips screws" and "non-Phillips screws", and a fourth classification model that performs two-class classification, "flat-head screws" and "non-flat-head screws". However, this is not limited to this, and for example, the second classification model may be a model that performs three-class classification, "Phillips screws", "flat-head screws", and "non-screws".

そして、算出部107は、第1の分類結果画像と第2の分類結果画像から物品の種類毎の物品数を算出する(ステップS109)。すなわち、算出部107は、第1の分類結果画像中でプラスネジと判定された物品数をa、第1の分類結果画像中でマイナスネジと判定された物品数b、画像中の物体がプラスネジと判定された第2の分類結果画像数をa、画像中の物体がマイナスネジと判定された第2の分類結果画像数bとして、プラスネジの物体数をa+aで算出し、マイナスネジの物体数をb+bで算出する。これにより、判定対象画像中の物品の種類毎の数が得られる。 Then, the calculation unit 107 calculates the number of items for each type of item from the first classification result image and the second classification result image (step S109). That is, the calculation unit 107 calculates the number of objects that are Phillips screws as a1 + a2 and the number of objects that are flathead screws as b1 + b2, where a1 is the number of items that are determined to be Phillips screws in the first classification result image, b1 is the number of items that are determined to be flathead screws in the first classification result image, a2 is the number of second classification result images in which an object in the image is determined to be a Phillips screw, and b2 is the number of second classification result images in which an object in the image is determined to be a flathead screw . This allows the number of items for each type in the judgment target image to be obtained.

以上のように、本実施形態に係る物品判定装置10は、1以上の物品を撮影した判定対象画像(例えば、物品の製造工程や検品工程等を撮影した画像)を入力として、これらの物品の種類(例えば、プラスネジ又はマイナスネジ)を判定し、その種類毎の物品数を算出することができる。しかも、本実施形態に係る物品判定装置10は、判定対象画像から色差分画像を作成して未検出物体を特定することで、第1の判定部102(第1の分類モデル)で検出されなかった物体のみを第2の判定部106(第2の分類モデル)で判定することが可能となる。これにより、物品の種類及びその種類毎の物体数を効率的かつ高い精度で判定することが可能になる(したがって、判定対象画像中の物品を検出する際の検出率を向上させることが可能になる。)。 As described above, the product evaluation device 10 according to this embodiment can input an evaluation target image (e.g., an image of an item's manufacturing process or inspection process, etc.) in which one or more items are photographed, determine the type of these items (e.g., Phillips or flathead screws), and calculate the number of items of each type. Furthermore, the product evaluation device 10 according to this embodiment can create a color difference image from the evaluation target image to identify undetected objects, thereby enabling the second evaluation unit 106 (second classification model) to evaluate only objects that were not detected by the first evaluation unit 102 (first classification model). This makes it possible to efficiently and accurately determine the type of item and the number of objects of each type (and therefore improve the detection rate when detecting items in the evaluation target image).

また、本実施形態に係る物品判定装置10は、ニューラルネットワークで実現される第1の分類モデル及び第2の分類モデルにより物品の種類を判定するため、例えば、画像中の物品同士の一部が重なっていたとしても高い精度でその種類で判定することが可能になると共に、1以上の物品を撮影する際の撮影環境に依存せずに高い精度で物品の種類を判定することが可能になる。このように、本実施形態に係る物品判定装置10は、ニューラルネットワークで実現される第1の分類モデル及び第2の分類モデルを用いることで、例えば、物品同士の重なりや撮影環境の変化等に対して高いロバスト性を獲得することができる。 In addition, the product evaluation device 10 according to this embodiment determines the type of product using a first classification model and a second classification model realized by a neural network, so that, for example, even if some of the products in the image overlap, it is possible to determine the type of the product with high accuracy, and it is possible to determine the type of the product with high accuracy independent of the shooting environment when shooting one or more products. In this way, by using the first classification model and the second classification model realized by a neural network, the product evaluation device 10 according to this embodiment can achieve high robustness against, for example, overlapping products and changes in the shooting environment.

[学習時]
次に、第1のモデルパラメータ及び第2のモデルパラメータはそれぞれ学習済みでないものとして、これらの第1のモデルパラメータ及び第2のモデルパラメータを学習する学習時について説明する。
[Study]
Next, assuming that the first model parameters and the second model parameters have not yet been learned, the learning process for learning the first model parameters and the second model parameters will be described.

<学習時における物品判定装置10の全体構成>
学習時における物品判定装置10の全体構成について、図7を参照しながら説明する。図7は、学習時における物品判定装置10の全体構成の一例を示す図である。
<Overall configuration of the product evaluation device 10 during learning>
The overall configuration of the product evaluation device 10 during learning will be described with reference to Fig. 7. Fig. 7 is a diagram showing an example of the overall configuration of the product evaluation device 10 during learning.

図7に示すように、学習時における物品判定装置10は、入力部101と、第1の判定部102と、第2の判定部106と、学習用画像作成部108と、学習部109とを有する。これら各部は、例えば、物品判定装置10にインストールされた1以上のプログラムが、CPUやGPU(Graphics Processing Unit)等のプロセッサに実行させる処理により実現される。 As shown in FIG. 7, the product evaluation device 10 during learning has an input unit 101, a first evaluation unit 102, a second evaluation unit 106, a learning image creation unit 108, and a learning unit 109. Each of these units is realized, for example, by a process in which one or more programs installed in the product evaluation device 10 are executed by a processor such as a CPU or a GPU (Graphics Processing Unit).

学習用画像作成部108は、種類が既知の1以上の物品を撮影した画像(以下、「撮影画像」という。)から学習用画像を作成する。 The learning image creation unit 108 creates learning images from images (hereinafter referred to as "captured images") of one or more items whose types are known.

ここで、第1のモデルパラメータを学習する際は、1以上の物品(ネジ)を撮影した撮影画像を用いて、この撮影画像に対して、画像領域指定を行い、これらの物品が「プラスネジ」又は「マイナスネジ」のいずれのクラスに属するかを示すアノテーションを行った第1の学習用画像を作成する。具体的には、例えば、図8に示すように、物品(ネジ)S11~S19を撮影した撮影画像5000を用いて、これらの物品S11~S19の画像領域に対してプラスネジ又はマイナスネジを示すアノテーションを行うことで第1の学習用画像6000を作成する。図8に示す例では、物品S11、S13~S15及びS17~S18の画像領域にはプラスネジを示すアノテーションが行われ、物品S12、S16及びS19の画像領域にはマイナスネジを示すアノテーションが行われている。 Here, when learning the first model parameters, a photographed image of one or more objects (screws) is used, image regions are designated for the photographed image, and a first learning image is created in which annotations are made to indicate whether the objects belong to the "Phillips screw" or "flat head screw" class. Specifically, for example, as shown in FIG. 8, a photographed image 5000 of objects (screws) S11 to S19 is used, and the image regions of objects S11 to S19 are annotated to indicate Phillips screws or flat head screws to create a first learning image 6000. In the example shown in FIG. 8, the image regions of objects S11, S13 to S15, and S17 to S18 are annotated to indicate Phillips screws, and the image regions of objects S12, S16, and S19 are annotated to indicate flat head screws.

また、第3のモデルパラメータを学習する際は、プラスネジである物品を撮影した撮影画像を用いて、この撮影画像に対して当該物品が「プラスネジ」に属することを示すラベルを付与した第2の学習用画像を作成する。同様に、第4のモデルパラメータを学習する際は、マイナスネジである物品を撮影した撮影画像を用いて、この撮影画像に対して当該物品が「マイナスネジ」に属することを示すラベルを付与した第3の学習用画像を作成する。具体的には、図9に示すように、プラスネジである物品S21を撮影した撮影画像6100を用いて、この撮影画像6100に対してプラスネジを示すラベルを付与することで第2の学習用画像7100を作成する。同様に、マイナスネジである物品S22を撮影した撮影画像6200を用いて、この撮影画像6200に対してマイナスネジを示すラベルを付与することで第3の学習用画像7200を作成する。 When learning the third model parameter, a photographed image of an object that is a Phillips head screw is used to create a second learning image by adding a label indicating that the object belongs to a "Phillips head screw" category to the photographed image. Similarly, when learning the fourth model parameter, a photographed image of an object that is a minus head screw is used to create a third learning image by adding a label indicating that the object belongs to a "minus head screw" category to the photographed image. Specifically, as shown in FIG. 9, a photographed image 6100 of an object S21 that is a Phillips head screw is used to create a second learning image 7100 by adding a label indicating that the object is a minus head screw to the photographed image 6100. Similarly, a photographed image 6200 of an object S22 that is a minus head screw is used to create a third learning image 7200 by adding a label indicating that the object belongs to a minus head screw to the photographed image 6200.

なお、アノテーションには、画像領域を指定する処理と、ラベルを付与する処理とを含むが、画像領域を指定する作業は画素単位に手作業で行ってもよいし、プラスネジ又はマイナスネジのいずれかのラベル付与を手作業で行ってもよい。この際、例えば、プラスネジ又はマイナスネジのいずれのラベルを付与するかを複数の評価者が判断してもよい。これにより、物品(ネジ)の種類がプラスネジ又はマイナスネジのいずれであるかを判断する際のばらつきを抑制することができる。また、所定の評価基準に基づいて学習用画像作成部108が自動的にアノテーションを行ってもよい。 Note that annotation includes a process of designating an image area and a process of assigning a label, but the task of designating an image area may be performed manually on a pixel-by-pixel basis, and the labeling of either a Phillips screw or a flathead screw may be performed manually. In this case, for example, multiple evaluators may determine whether to assign a label of a Phillips screw or a flathead screw. This makes it possible to reduce variability when determining whether the type of item (screw) is a Phillips screw or a flathead screw. Alternatively, the learning image creation unit 108 may automatically perform annotation based on a predetermined evaluation criterion.

撮影画像に対してラベルを付与する際も同様であり、手作業でラベルを付与してもよいし、所定の評価基準に基づいて学習用画像作成部108が自動的にラベルを付与してもよい。また、ラベルを手作業で付与する際には、同様に、いずれのラベルを付与するかを複数の評価者が判断してもよい。 The same applies when assigning labels to captured images; the labels may be assigned manually, or the learning image creation unit 108 may assign the labels automatically based on a predetermined evaluation criterion. Similarly, when assigning labels manually, multiple evaluators may decide which label to assign.

入力部101は、学習用画像作成部108により作成された学習用画像(第1の学習用画像、第2の学習用画像又は第3の学習用画像)を入力する。 The input unit 101 inputs a learning image (a first learning image, a second learning image, or a third learning image) created by the learning image creation unit 108.

第1の判定部102は、第1のモデルパラメータを用いて、第1の学習用画像中に含まれる物品(ネジ)の検出と当該物品が「プラスネジ」又は「マイナスネジ」のいずれのクラスに属するかのクラス分類とを行う。 The first determination unit 102 uses the first model parameters to detect objects (screws) contained in the first learning image and classify the objects as to whether they belong to a "Phillips screw" or a "flat head screw" class.

第2の判定部106は、第2のモデルパラメータを用いて、第2の学習用画像又は第3の学習用画像が「プラスネジ」又は「マイナスネジ」のいずれのクラスに属するかのクラス分類を行う。 The second determination unit 106 uses the second model parameters to classify the second learning image or the third learning image into either the "Phillips screw" or "flat head screw" class.

学習部109は、第1の判定部102による検出結果及び判定結果と第1の学習用画像に対して行われたアノテーションの結果との誤差を用いて、この誤差が最小となるように第1のモデルパラメータを更新する。同様に、学習部109は、第2の判定部106による判定結果と第2の学習用画像又は第3の学習用画像に対して付与されたラベルとの誤差を用いて、この誤差が最小となるように第2のモデルパラメータに含まれる第3のモデルパラメータ又は第4のモデルパラメータを更新する。 The learning unit 109 uses the error between the detection result and judgment result by the first judgment unit 102 and the result of annotation performed on the first learning image to update the first model parameters so as to minimize this error. Similarly, the learning unit 109 uses the error between the judgment result by the second judgment unit 106 and the label assigned to the second learning image or the third learning image to update the third model parameters or the fourth model parameters included in the second model parameters so as to minimize this error.

<学習処理>
次に、本実施形態に係る物品判定装置10により第1のモデルパラメータ又は第2のモデルパラメータに含まれる第3のモデルパラメータ若しくは第4のモデルパラメータを学習する処理について、図10を参照しながら説明する。図10は、本実施形態に係る学習処理の一例を示すフローチャートである。
<Learning process>
Next, a process of learning the third model parameter or the fourth model parameter included in the first model parameter or the second model parameter by the product evaluation device 10 according to this embodiment will be described with reference to Fig. 10. Fig. 10 is a flowchart showing an example of the learning process according to this embodiment.

まず、入力部101は、学習用画像作成部108により作成された学習用画像(第1の学習用画像、第2の学習用画像又は第3の学習用画像)を入力する(ステップS201)。 First, the input unit 101 inputs a learning image (first learning image, second learning image, or third learning image) created by the learning image creation unit 108 (step S201).

次に、第1の判定部102又は第2の判定部106は、学習用画像に対してクラス分類を行う(ステップS202)。すなわち、上記のステップS201で第1の学習用画像が入力された場合、第1の判定部102は、第1のモデルパラメータを用いて、第1の分類モデルにより第1の学習用画像中に含まれる物品(ネジ)の検出と当該物品が「プラスネジ」又は「マイナスネジ」のいずれのクラスに属するかのクラス分類とを行う。また、上記のステップS201で第2の学習用画像が入力された場合、第2の判定部106は、第3のモデルパラメータを用いて、第3の分類モデルにより第2の学習用画像が「プラスネジ」又は「プラスネジ以外」のいずれのクラスに属するかのクラス分類を行う。同様に、上記のステップS201で第3の学習用画像が入力された場合、第2の判定部106は、第4のモデルパラメータを用いて、第4の分類モデルにより第3の学習用画像が「マイナスネジ」又は「マイナスネジ以外」のいずれのクラスに属するかのクラス分類を行う。 Next, the first judgment unit 102 or the second judgment unit 106 performs class classification on the learning image (step S202). That is, when the first learning image is input in the above step S201, the first judgment unit 102 uses the first model parameters to detect the object (screw) contained in the first learning image using the first classification model and classify the object into either a "Phillips screw" or a "flat head screw". Also, when the second learning image is input in the above step S201, the second judgment unit 106 uses the third model parameters to classify the second learning image into either a "Phillips screw" or a "non-Phillips screw" using the third classification model. Similarly, when a third learning image is input in step S201 above, the second judgment unit 106 uses the fourth model parameters to classify the third learning image into either a "flat head screw" or a "non-flat head screw" class using a fourth classification model.

そして、学習部109は、第1の判定部102又は第2の判定部106による判定結果(クラス分類結果)と学習用画像に対して行われたアノテーションの結果又は学習用画像に付与されたラベルとの誤差を用いて、この誤差が最小となるように第1のモデルパラメータ又は第2のモデルパラメータを更新する(ステップS203)。すなわち、上記のステップS201で第1の学習用画像が入力された場合、学習部109は、第1の判定部102による各物品(ネジ)のクラス分類結果と当該物品の画像領域に対して行われたアノテーションの結果との誤差を算出し、算出した誤差が最小となるように第1のモデルパラメータを更新する。また、上記のステップS201で第2の学習用画像が入力された場合、学習部109は、第2の判定部106による第2の学習用画像のクラス分類結果と当該第2の学習用画像に付与されたラベルとの誤差を算出し、算出した誤差が最小となるように第3のモデルパラメータを更新する。同様に、上記のステップS201で第3の学習用画像が入力された場合、学習部109は、第2の判定部106による第3の学習用画像のクラス分類結果と当該第3の学習用画像に付与されたラベルとの誤差を算出し、算出した誤差が最小となるように第4のモデルパラメータを更新する。なお、第1のモデルパラメータと第2のモデルパラメータに含まれる第3のモデルパラメータ及び第4のモデルパラメータとの更新には既知の最適化手法を用いればよい。 Then, the learning unit 109 uses the error between the judgment result (classification result) by the first judgment unit 102 or the second judgment unit 106 and the result of annotation performed on the learning image or the label assigned to the learning image to update the first model parameter or the second model parameter so that this error is minimized (step S203). That is, when the first learning image is input in the above step S201, the learning unit 109 calculates the error between the class classification result of each item (screw) by the first judgment unit 102 and the result of annotation performed on the image area of the item, and updates the first model parameter so that the calculated error is minimized. Also, when the second learning image is input in the above step S201, the learning unit 109 calculates the error between the class classification result of the second learning image by the second judgment unit 106 and the label assigned to the second learning image, and updates the third model parameter so that the calculated error is minimized. Similarly, when a third learning image is input in step S201, the learning unit 109 calculates the error between the class classification result of the third learning image by the second determination unit 106 and the label assigned to the third learning image, and updates the fourth model parameters so as to minimize the calculated error. Note that a known optimization method may be used to update the first model parameters and the third model parameters and fourth model parameters included in the second model parameters.

以上により、本実施形態に係る物品判定装置10は、第1のモデルパラメータと第2のモデルパラメータを学習することができる。なお、図10に示す学習処理では、一例として、オンライン学習により第1のモデルパラメータと第2のモデルパラメータを学習する場合について説明したが、これに限られず、例えば、バッチ学習やミニバッチ学習等により第1のモデルパラメータと第2のモデルパラメータが学習されてもよい。 As described above, the product evaluation device 10 according to this embodiment can learn the first model parameters and the second model parameters. Note that, in the learning process shown in FIG. 10, as an example, a case where the first model parameters and the second model parameters are learned by online learning has been described, but this is not limited thereto, and for example, the first model parameters and the second model parameters may be learned by batch learning, mini-batch learning, etc.

本発明は、具体的に開示された上記の実施形態に限定されるものではなく、特許請求の範囲の記載から逸脱することなく、種々の変形や変更、既知の技術との組み合わせ等が可能である。 The present invention is not limited to the specifically disclosed embodiments above, and various modifications, changes, and combinations with known technologies are possible without departing from the scope of the claims.

10 物品判定装置
101 入力部
102 第1の判定部
103 色差分抽出部
104 未検出物体特定部
105 画像切出部
106 第2の判定部
107 算出部
108 学習用画像作成部
109 学習部
REFERENCE SIGNS LIST 10 Product evaluation device 101 Input unit 102 First evaluation unit 103 Color difference extraction unit 104 Undetected object identification unit 105 Image extraction unit 106 Second evaluation unit 107 Calculation unit 108 Learning image creation unit 109 Learning unit

Claims (6)

1以上の検出対象の物体を撮影した撮影画像から地色と異なる色を抽出することで色差分画像を作成する第1の作成手段と、
学習済みの第1のモデルを用いて、前記撮影画像中に含まれる物体を検出し、検出した物体の種類を判定する第1の判定手段と、
記撮影画像中に含まれる物体を検出た結果と、前記色差分画像とを用いて、前記結果で検出されなかった未検出物体を特定する特定手段と、
学習済みの第2のモデルを用いて、前記未検出物体の種類を判定する第2の判定手段と、
前記未検出物体が特定されなかった場合は前記第1の判定手段による判定結果から前記検出対象の物体の種類毎の物体数を算出し、前記未検出物体が特定された場合は前記第1の判定手段による判定結果と前記第2の判定手段による判定結果とから前記検出対象の物体の種類毎の物体数を算出する算出手段と、
を有することを特徴とする検出装置。
a first generating means for generating a color difference image by extracting a color different from a background color from a captured image of one or more detection target objects ;
a first determination means for detecting an object included in the captured image by using a trained first model and determining a type of the detected object;
a detection unit for detecting an object included in the captured image and detecting the color difference image, and for detecting an undetected object that was not detected in the detection result ;
a second determination means for determining a type of the undetected object by using a trained second model;
a calculation means for calculating the number of objects of each type of object to be detected from a determination result by the first determination means when the undetected object is not specified, and for calculating the number of objects of each type of object to be detected from a determination result by the first determination means and a determination result by the second determination means when the undetected object is specified;
A detection device comprising:
前記第1の判定手段は、
検出した物体を、第1の種類を示すクラス又は第2の種類を示すクラスのいずれかに分類することで、前記物体の種類を判定する、ことを特徴とする請求項に記載の検出装置。
The first determination means includes:
2. The detection device according to claim 1 , wherein the type of a detected object is determined by classifying the detected object into either a class indicating a first type or a class indicating a second type.
前記第2の判定手段は、
前記未検出物体画像中に含まれる物体を、第1の種類を示すクラス、第2の種類を示すクラス又は前記検出対象以外を示すクラスのいずれかに分類することで、前記物体が検出対象であるか否かと前記物体が検出対象である場合における種類とを判定する、ことを特徴とする請求項1又は2に記載の検出装置。
The second determination means includes:
The detection device according to claim 1 or 2, characterized in that it determines whether the object is a detection target and, if the object is a detection target, its type by classifying the object contained in the undetected object image into either a class indicating a first type, a class indicating a second type, or a class indicating something other than the detection target.
前記撮影画像から学習用画像を作成する第の作成手段と、
前記学習用画像を用いて、前記第1のモデルのモデルパラメータと前記第2のモデルのモデルパラメータとを学習する学習手段と、を有し、
前記第の作成手段は、
所定の評価基準に基づいて、前記撮影画像に対して第1の種類を示すラベル又は第2の種類を示すラベルのいずれかを付与する、又は、前記撮影画像中に含まれる物体の画像領域を指定し、該画像領域に対して第一の種類を示すラベル又は第二の種類を示すラベルを付与するアノテーションを行うことで、前記学習用画像を作成する、ことを特徴とする請求項1乃至3の何れか一項に記載の検出装置。
A second creating means for creating a learning image from the captured image;
a learning means for learning model parameters of the first model and model parameters of the second model by using the learning image,
The second creating means includes:
The detection device according to any one of claims 1 to 3, characterized in that the learning image is created by assigning either a label indicating a first type or a label indicating a second type to the captured image based on a predetermined evaluation criterion, or by performing annotation to specify an image area of an object contained in the captured image and assign a label indicating a first type or a label indicating a second type to the image area.
前記第1のモデル及び前記第2のモデルは、ニューラルネットワークである、請求項4に記載の検出装置。The detection apparatus of claim 4 , wherein the first model and the second model are neural networks. コンピュータを、請求項1乃至の何れか一項に記載の検出装置における各手段として機能させるためのプログラム。 A program for causing a computer to function as each of the means in the detection device according to any one of claims 1 to 5 .
JP2020057704A 2020-03-27 2020-03-27 Detection device and program Active JP7469100B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020057704A JP7469100B2 (en) 2020-03-27 2020-03-27 Detection device and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020057704A JP7469100B2 (en) 2020-03-27 2020-03-27 Detection device and program

Publications (3)

Publication Number Publication Date
JP2021157550A JP2021157550A (en) 2021-10-07
JP2021157550A5 JP2021157550A5 (en) 2022-11-14
JP7469100B2 true JP7469100B2 (en) 2024-04-16

Family

ID=77918031

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020057704A Active JP7469100B2 (en) 2020-03-27 2020-03-27 Detection device and program

Country Status (1)

Country Link
JP (1) JP7469100B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7360660B1 (en) 2022-09-09 2023-10-13 株式会社マーケットヴィジョン information processing system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007156655A (en) 2005-12-01 2007-06-21 Toshiba Corp Variable region detection apparatus and its method
JP2007287093A (en) 2006-04-20 2007-11-01 Fujitsu Frontech Ltd Program, method and device for detecting mobile object
JP2019008519A (en) 2017-06-23 2019-01-17 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Mobile body detection method, mobile body learning method, mobile body detector, mobile body learning device, mobile body detection system, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007156655A (en) 2005-12-01 2007-06-21 Toshiba Corp Variable region detection apparatus and its method
JP2007287093A (en) 2006-04-20 2007-11-01 Fujitsu Frontech Ltd Program, method and device for detecting mobile object
JP2019008519A (en) 2017-06-23 2019-01-17 パナソニック インテレクチュアル プロパティ コーポレーション オブ アメリカPanasonic Intellectual Property Corporation of America Mobile body detection method, mobile body learning method, mobile body detector, mobile body learning device, mobile body detection system, and program

Also Published As

Publication number Publication date
JP2021157550A (en) 2021-10-07

Similar Documents

Publication Publication Date Title
US10878283B2 (en) Data generation apparatus, data generation method, and data generation program
US10885618B2 (en) Inspection apparatus, data generation apparatus, data generation method, and data generation program
US11982628B2 (en) System and method for detecting defects on imaged items
CN116188475B (en) Intelligent control method, system and medium for automatic optical detection of appearance defects
US20190118226A1 (en) Sorting system
JP7316731B2 (en) Systems and methods for detecting and classifying patterns in images in vision systems
US10636133B2 (en) Automated optical inspection (AOI) image classification method, system and computer-readable media
Eshkevari et al. Automatic dimensional defect detection for glass vials based on machine vision: A heuristic segmentation method
WO2017107533A1 (en) Electronic component sample labeling method and device
JP2022507678A (en) Optimization of setup stage in automated visual inspection process
TW202127014A (en) Intelligent Production Line Monitoring System and Implementation Method Thereof
JP7469100B2 (en) Detection device and program
US11481673B2 (en) Signal analysis device, signal analysis method, and signal analysis program
US20220284699A1 (en) System and method of object detection using ai deep learning models
CN112505049B (en) Mask inhibition-based method and system for detecting surface defects of precision components
CN114226262A (en) Flaw detection method, flaw classification method and flaw detection system
TWI695980B (en) Inspection result prompting device, inspection result prompting method and non-transitory computer readable storage medium
Sarkar et al. Image processing based product label quality control on FMCG products
Khwakhali et al. Fabric defect detection using gray level co-occurence matrix and local binary pattern
Sarkar et al. On online counting of cigarette in packets—an image processing approach
CN113610834A (en) Medical mask defect detection method and device, storage medium and electronic equipment
Hunger et al. Data acqusition challenges in AI-driven surface inspection: a proven solution proposal on coated sheet metal parts
WO2023111600A1 (en) Automated inspection system
JP2023093283A (en) Egg surface defect detection system
Dahal Design of object identification system based on machine vision

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20221104

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221104

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20230907

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20230912

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20231113

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20240111

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20240404

R150 Certificate of patent or registration of utility model

Ref document number: 7469100

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150