JP2020160921A - Image recognition device, method for image recognition, and program - Google Patents
Image recognition device, method for image recognition, and program Download PDFInfo
- Publication number
- JP2020160921A JP2020160921A JP2019061039A JP2019061039A JP2020160921A JP 2020160921 A JP2020160921 A JP 2020160921A JP 2019061039 A JP2019061039 A JP 2019061039A JP 2019061039 A JP2019061039 A JP 2019061039A JP 2020160921 A JP2020160921 A JP 2020160921A
- Authority
- JP
- Japan
- Prior art keywords
- image
- feature amount
- image recognition
- data
- amount map
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 30
- 238000012545 processing Methods 0.000 claims abstract description 48
- 238000004364 calculation method Methods 0.000 claims abstract description 27
- 238000012937 correction Methods 0.000 claims description 54
- 238000010801 machine learning Methods 0.000 claims description 45
- 238000012549 training Methods 0.000 claims description 8
- 230000008878 coupling Effects 0.000 abstract 1
- 238000010168 coupling process Methods 0.000 abstract 1
- 238000005859 coupling reaction Methods 0.000 abstract 1
- 238000010586 diagram Methods 0.000 description 16
- 238000013500 data storage Methods 0.000 description 6
- 239000000284 extract Substances 0.000 description 6
- 230000006870 function Effects 0.000 description 6
- 238000004891 communication Methods 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 3
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
Images
Landscapes
- Image Analysis (AREA)
Abstract
Description
本発明は、画像から対象物を認識するための画像認識装置及び画像認識方法に関し、更には、これらを実現するためのプログラムに関する。 The present invention relates to an image recognition device and an image recognition method for recognizing an object from an image, and further relates to a program for realizing these.
近年、機械学習モデルを用いて画像認識を行う画像認識装置が開発されている(例えば、特許文献1及び2参照)。このような画像認識装置によれば、予め学習させた人物、動物、自動車等を、画像から検出することができる。このため、画像認識装置は、映像監視システム、車両に搭載される事故防止システム等に利用されている。
In recent years, an image recognition device that performs image recognition using a machine learning model has been developed (see, for example,
ここで、従来からの画像認識装置における処理について図11を用いて説明する。図11は、従来からの画像認識装置で行われる処理を示すフロー図である。また、この画像認識装置は、特定の物体を認識する機械学習モデルを備えている。機械学習モデルは、ディープラーニングによって構築されている。 Here, the processing in the conventional image recognition device will be described with reference to FIG. FIG. 11 is a flow chart showing processing performed by a conventional image recognition device. In addition, this image recognition device includes a machine learning model that recognizes a specific object. Machine learning models are built by deep learning.
図11に示すように、最初に、画像認識装置は、外部の撮像装置又は記憶装置から画像データを取得する(ステップS1)。取得された画像データは、画像認識装置に搭載されたメモリ等に格納される。 As shown in FIG. 11, first, the image recognition device acquires image data from an external image pickup device or storage device (step S1). The acquired image data is stored in a memory or the like mounted on the image recognition device.
次に、画像認識装置は、取得した画像において検知対象物が含まれる可能性のある部分の範囲を指定する(ステップS2)。具体的には、画像認識装置は、ステップS2において、画面左上の座標、領域の横幅、及び領域の高さを指定することによって、範囲を指定する。また、ステップS2では、取得した画像の部分的な指定の代わりに、画像全体が指定される場合もある。 Next, the image recognition device specifies the range of the portion of the acquired image that may include the detection object (step S2). Specifically, in step S2, the image recognition device specifies a range by designating the coordinates at the upper left of the screen, the width of the area, and the height of the area. Further, in step S2, the entire image may be specified instead of the partial designation of the acquired image.
次に、画像認識装置は、ステップS2で指定された範囲内に、水平方向及び垂直方向の解像度が予め設定された矩形の領域を設定し、設定した領域の画像の切り出しを実行する(ステップS3)。ステップS3は、後述するように複数回繰り返し実行される。また、矩形の領域の設定は、実行の度に、その位置を設定画素数分だけスライドしながら行われる。この方式は、スライディング方式と呼ばれ、矩形の領域はスライディングウィンドウと呼ばれる。 Next, the image recognition device sets a rectangular area in which the resolutions in the horizontal direction and the vertical direction are preset within the range specified in step S2, and cuts out an image in the set area (step S3). ). Step S3 is repeatedly executed a plurality of times as described later. Further, the setting of the rectangular area is performed by sliding the position by the set number of pixels each time the execution is performed. This method is called a sliding method, and the rectangular area is called a sliding window.
また、この方式では、スライディングウィンドウは、指定された範囲の左上の端を基点にして、まず、水平方向に沿って、設定画素数分スライドされ、右上の端に到達すると、垂直方向に設定画素数分スライドさせた位置で、更に左端から右端へとスライドされる。また、スライド量となる設定画素数は、位置的に隣接するスライディングウィンドウ同士の端の部分が重なるように行われる。 In this method, the sliding window is first slid by the set number of pixels along the horizontal direction with the upper left edge of the specified range as the base point, and when it reaches the upper right edge, the set pixels are vertically set. At the position where it is slid for a few minutes, it is further slid from the left end to the right end. Further, the set number of pixels, which is the slide amount, is set so that the edges of the sliding windows that are positionedly adjacent to each other overlap each other.
次に、画像認識装置は、ステップS3で切り出された画像を、機械学習モデルに入力して、画像中の物体について推論を実行し、物体が特定の物体であることの確からしさ示すスコアを算出する(ステップS4)。 Next, the image recognition device inputs the image cut out in step S3 into the machine learning model, executes inference about the object in the image, and calculates a score indicating the certainty that the object is a specific object. (Step S4).
次に、画像認識装置は、ステップS4で算出されたスコアと、別のスライディングウィンドウについてのステップS4で先に算出されたスコアとを比較する。そして、画像認識装置は、値が高い方のスコアと、スコアの高い方のスライディングウィンドウの座標と、このスライディングウィンドウの画像識別番号とを保存する(ステップS5)。 Next, the image recognition device compares the score calculated in step S4 with the score previously calculated in step S4 for another sliding window. Then, the image recognition device stores the score having the higher value, the coordinates of the sliding window having the higher score, and the image identification number of the sliding window (step S5).
次に、画像認識装置は、ステップS2で指定された範囲全てについて、ステップS3〜S5が実行されているかどうかを判定する(ステップS6)。ステップS6の判定の結果、ステップS2で指定された範囲全てについて、ステップS3〜S5が実行されていない場合は、上述したように、画像認識装置は、スライディングウィンドウをスライドさせて、再度ステップS3を実行する。 Next, the image recognition device determines whether or not steps S3 to S5 are executed for the entire range specified in step S2 (step S6). As a result of the determination in step S6, if steps S3 to S5 are not executed for the entire range specified in step S2, the image recognition device slides the sliding window and repeats step S3 as described above. Execute.
一方、ステップS6の判定の結果、ステップS2で指定された範囲全てについて、ステップS3〜S5が実行されている場合は、画像認識装置は、保存しているスコアと、座標と、画像識別番号とを、外部に出力する。 On the other hand, as a result of the determination in step S6, when steps S3 to S5 are executed for the entire range specified in step S2, the image recognition device includes the stored score, coordinates, and image identification number. Is output to the outside.
このように、従来の画像認識装置では、スライディングウィンドウ単位で、学習モデルを用いた推論が行われて、画像認識が行われる。 As described above, in the conventional image recognition device, inference using the learning model is performed for each sliding window, and image recognition is performed.
しかしながら、従来の画像認識装置には、処理効率が低く、処理速度の向上が難しいという問題がある。具体的には、従来の画像認識装置は、上述したようにスライディングウィンドウ毎に、推論を実行する。そして、各スライディングウィンドウは、隣接する別のスライディングウィンドウと重なるように設定されている。このため、従来の画像認識装置は、重なっている部分については、重複して推論を実行しており、無駄な処理を行っている。結果、上述した問題が生じてしまう。 However, the conventional image recognition device has a problem that the processing efficiency is low and it is difficult to improve the processing speed. Specifically, the conventional image recognition device executes inference for each sliding window as described above. Then, each sliding window is set so as to overlap with another adjacent sliding window. For this reason, the conventional image recognition device performs inference in duplicate for the overlapping portion, and performs unnecessary processing. As a result, the above-mentioned problem occurs.
本発明の目的の一例は、上記問題を解消し、機械学習モデルを利用した画像認識において、処理効率の向上を図り得る、画像認識装置、画像認識方法、及びプログラムを提供することにある。 An example of an object of the present invention is to provide an image recognition device, an image recognition method, and a program capable of solving the above problems and improving processing efficiency in image recognition using a machine learning model.
上記目的を達成するため、本発明の一側面における画像認識装置は、
画像から特定の物体を検出するための機械学習モデルの畳み込み層を用いて、画像認識の対象となる画像の特徴量マップを生成する、特徴量マップ生成部と、
前記特徴量マップ上に、仮想のウィンドウを設定し、前記ウィンドウを設定量だけスライドさせながら、複数の所定の位置において、前記特徴量マップの前記ウィンドウ内の領域を、前記機械学習モデルの全結合層に入力して、前記所定の位置毎に、当該領域に前記特定の物体が存在している可能性を示すスコアを算出する、スコア算出部と、
を備えている、ことを特徴とする。
In order to achieve the above object, the image recognition device in one aspect of the present invention is
A feature map generator that generates a feature map of an image to be image-recognized using a convolutional layer of a machine learning model for detecting a specific object from an image.
A virtual window is set on the feature amount map, and while sliding the window by a set amount, the area in the window of the feature amount map is fully combined with the machine learning model at a plurality of predetermined positions. A score calculation unit that inputs to the layer and calculates a score indicating the possibility that the specific object exists in the region at each predetermined position.
It is characterized by having.
また、上記目的を達成するため、本発明の一側面における画像認識方法は、
(a)画像から特定の物体を検出するための機械学習モデルの畳み込み層を用いて、画像認識の対象となる画像の特徴量マップを生成する、ステップと、
(b)前記特徴量マップ上に、仮想のウィンドウを設定し、前記ウィンドウを設定量だけスライドさせながら、複数の所定の位置において、前記特徴量マップの前記ウィンドウ内の領域を、前記機械学習モデルの全結合層に入力して、前記所定の位置毎に、当該領域に前記特定の物体が存在している可能性を示すスコアを算出する、ステップと、
を有する、ことを特徴とする。
Further, in order to achieve the above object, the image recognition method in one aspect of the present invention is:
(A) A step of generating a feature map of an image to be image-recognized using a convolution layer of a machine learning model for detecting a specific object from an image.
(B) A virtual window is set on the feature amount map, and while sliding the window by a set amount, a region in the window of the feature amount map is displayed at a plurality of predetermined positions in the machine learning model. To calculate a score indicating the possibility that the specific object is present in the region at each predetermined position by inputting into the fully connected layer of the step.
It is characterized by having.
更に、上記目的を達成するため、本発明の一側面におけるプログラムは、
コンピュータに、
(a)画像から特定の物体を検出するための機械学習モデルの畳み込み層を用いて、画像認識の対象となる画像の特徴量マップを生成する、ステップと、
(b)前記特徴量マップ上に、仮想のウィンドウを設定し、前記ウィンドウを設定量だけスライドさせながら、複数の所定の位置において、前記特徴量マップの前記ウィンドウ内の領域を、前記機械学習モデルの全結合層に入力して、前記所定の位置毎に、当該領域に前記特定の物体が存在している可能性を示すスコアを算出する、ステップと、
を実行させる、ことを特徴とする。
Further, in order to achieve the above object, the program in one aspect of the present invention is:
On the computer
(A) A step of generating a feature map of an image to be image-recognized using a convolution layer of a machine learning model for detecting a specific object from an image.
(B) A virtual window is set on the feature amount map, and while sliding the window by a set amount, a region in the window of the feature amount map is displayed at a plurality of predetermined positions in the machine learning model. To calculate a score indicating the possibility that the specific object is present in the region at each predetermined position by inputting into the fully connected layer of the step.
It is characterized by executing.
以上のように、本発明によれば、機械学習モデルを利用した画像認識において、処理効率の向上を図ることができる。 As described above, according to the present invention, it is possible to improve the processing efficiency in image recognition using a machine learning model.
(実施の形態1)
以下、本発明の実施の形態1における画像認識装置、画像認識方法、及びプログラムについて、図1〜図5を参照しながら説明する。
(Embodiment 1)
Hereinafter, the image recognition device, the image recognition method, and the program according to the first embodiment of the present invention will be described with reference to FIGS. 1 to 5.
[装置構成]
最初に、図1を用いて、本発明の実施の形態1における画像認識装置の概略構成について説明する。図1は、本発明の実施の形態1における画像認識装置の概略構成を示すブロック図である。
[Device configuration]
First, the schematic configuration of the image recognition device according to the first embodiment of the present invention will be described with reference to FIG. FIG. 1 is a block diagram showing a schematic configuration of an image recognition device according to the first embodiment of the present invention.
図1に示す、本実施の形態1における画像認識装置10は、画像から特定の物体を検出する装置である。図1に示すように、画像認識装置10は、特徴量マップ生成部11と、スコア算出部12とを備えている。
The
特徴量マップ生成部11は、画像から特定の物体を検出するための機械学習モデルの畳み込み層を用いて、画像認識の対象となる画像の特徴量マップを生成する。
The feature amount
スコア算出部12は、特徴量マップ上に、仮想のウィンドウを設定し、このウィンドウを設定量だけスライドさせながら、複数の所定の位置において、特徴量マップのウィンドウ内の領域を、機械学習モデルの全結合層に入力する。そして、この入力処理の結果から、スコア算出部12は、所定の位置毎に、このウィンドウ内の領域に特定の物体が存在している可能性を示すスコアを算出する。
The
このように、本実施の形態1では、まず、機械学習モデルの畳み込み層を用いて、特徴量マップが生成され、そして、この特徴量マップ上でスライディングウィンドウによる処理が行われる。このため、従来に比べて、重複して行われる処理が大きく低減されるので、本実施の形態1によれば、機械学習モデルを利用した画像認識において、処理効率の向上を図ることができる。 As described above, in the first embodiment, first, the feature amount map is generated by using the convolution layer of the machine learning model, and then the processing by the sliding window is performed on the feature amount map. Therefore, since the duplicated processing is greatly reduced as compared with the conventional case, according to the first embodiment, it is possible to improve the processing efficiency in the image recognition using the machine learning model.
続いて、図2〜図4を用いて、本実施の形態1における画像認識装置10の構成及び機能について具体的に説明する。図2は、本発明の実施の形態1における画像認識装置の構成を具体的に示すブロック図である。図3は、本発明の実施の形態1で得られる特徴量マップの一例を示す図である。図4は、本発明の実施の形態1において用いられる識別器(機械学習モデル)の一例を示す図である。
Subsequently, the configuration and function of the
図2に示すように、本実施の形態では、画像認識装置10は、上述した特徴量マップ生成部11及びスコア算出部12に加えて、対象画像設定部13と、特徴量マップ記憶部14と、認識処理部15と、機械学習モデルである識別器20とを更に備えている。
As shown in FIG. 2, in the present embodiment, the
なお、識別器20は、図2の例では、画像認識装置10内に備えられているが、この例に限定されるものではない。識別器20は、画像認識装置10以外の装置に設けられていても良い。
In the example of FIG. 2, the
対象画像設定部13は、まず、画像認識の対象となる画像の画像データを取得する。続いて、対象画像設定部13は、取得した画像データで特定される画像において、画像認識の対象となる範囲を設定する。
The target
具体的には、対象画像設定部13は、画像において、認識対象が含まれる可能性のある範囲を特定し、その範囲を設定する。また、認識対象が含まれる可能性のある範囲の特定は、例えば、画像中の物体の輪郭検出を行い、検出された輪郭が存在する範囲を特定することによって行われる。更に、範囲の設定は、設定された範囲の左上の座標、横幅、及び高さを設定することによって行われる。加えて、対象画像設定部13は、画像データの画像全体を、画像認識の対象となる範囲として設定することもできる。
Specifically, the target
特徴量マップ生成部11は、本実施の形態では、対象画像設定部13によって設定された範囲について、識別器20の畳み込み層(図4参照)を用いて、特徴量マップを生成する。また、特徴量マップ生成部11は、生成した特徴量マップを、特徴量マップ記憶部14に格納する。特徴量マップ記憶部14は、例えば、メモリであり、その記憶領域上に、特徴量マップを格納する。
In the present embodiment, the feature amount
具体的には、図3に示すように、特徴量マップ生成部11は、まず、対象画像設定部13によって設定された範囲の画像データから、水平方向における全画素による行(ライン)をNライン分毎に取り出す(N:任意の自然数)。続いて、特徴量マップ生成部11は
、取り出したN行分の画像データを、順に、識別器20の畳み込み層に入力する。これにより、Nライン分毎に、特徴量マップが生成される。図3においては、Nライン分の画像データと、それから生成された特徴量マップとが示されている。また、特徴量マップにおいて、格子は画素を示し、■は特徴量を示している。
Specifically, as shown in FIG. 3, the feature amount
スコア算出部12は、本実施の形態では、まず、特徴量マップ記憶部14から、Nライン分の特徴量マップを取り出す。続いて、スコア算出部12は、取り出したNライン分の特徴量マップ上で、設定した仮想のウィンドウを設定量だけスライドさせながら、複数の所定の位置において、特徴量マップのウィンドウ内の領域を、識別器20の全結合層(図4参照)に入力する。そして、スコア算出部12は、所定の位置毎の全結合層の出力結果を、所定の位置毎のスコアとする。なお、図3において、矩形の破線は、仮想のウィンドウを示している。
In the present embodiment, the
また、図4に示すように、識別器20は、畳み込み層21〜24と、全結合層25とを備えている。図4の例では、画像データは、まず、畳み込み層21に入力され、畳み込み層21の出力が、畳み込み層22と畳み込み層24とに入力される。畳み込み層24は、入力データに対してサイズ変換を行い、サイズ変換後の入力データを出力する。更に、畳み込み層22の出力が、畳み込み層23に入力され、畳み込み層23の出力と畳み込み層24の出力とが合成されて、特徴量マップとなる。
Further, as shown in FIG. 4, the
全結合層25は、スコア算出部12によって、特徴量マップのウィンドウ内の領域が入力されると、入力された領域に対して識別を行い、クラス毎に、画像中の物体がそのクラスに該当する確率を算出し、算出した確率を出力する。スコア算出部12は、出力された確率を、スコアとする。
When the area in the window of the feature amount map is input by the
認識処理部15は、まず、スコア算出部12によって、所定の位置毎に算出されたスコアの中から、最も値の大きいスコアと、そのときの所定の位置とを特定する。そして、認識処理部15は、この特定したスコアと所定の位置とを、画像認識の結果として、出力する。この出力結果によれば、画像中に、特定の物体が存在しているかどうかを判断することができる。
First, the
[装置動作]
次に、本実施の形態1における画像認識装置10の動作について図5を用いて説明する。図5は、本発明の実施の形態1における画像認識装置の動作を示すフロー図である。以下の説明においては、適宜図1〜図4を参照する。また、本実施の形態1では、画像認識装置10を動作させることによって、画像認識方法が実施される。よって、本実施の形態1における画像認識方法の説明は、以下の画像認識装置10の動作説明に代える。
[Device operation]
Next, the operation of the
図5に示すように、最初に、対象画像設定部13は、画像認識の対象となる画像の画像データを取得する(ステップA1)。次に、対象画像設定部13は、ステップA1で取得した画像データの画像において、画像認識の対象となる範囲を設定する(ステップA2)。
As shown in FIG. 5, first, the target
次に、特徴量マップ生成部11は、ステップA2で設定された範囲の画像データから、Nライン分の画像データを取り出す(ステップA3)。続いて、特徴量マップ生成部11は、取り出したNライン分の画像データを、識別器20の畳み込み層に入力して、特徴量マップを生成する(ステップA4)。また、特徴量マップ生成部11は、生成した特徴量マップを、特徴量マップ記憶部14に格納する。
Next, the feature amount
次に、スコア算出部12は、特徴量マップ記憶部14から、Nライン分の特徴量マップ
を取り出す。そして、スコア算出部12は、取り出した特徴量マップ上で、仮想のウィンドウをスライドさせながら、複数の所定の位置において、特徴量マップのウィンドウ内の領域を、識別器20の全結合層に入力して、スコアを算出する(ステップA5)。
Next, the
次に、認識処理部15は、ステップA5において所定の位置毎に算出されたスコアの中から、最も値の大きいスコアと、そのときの所定の位置とを特定し、この特定したスコアと所定の位置とを、画像認識の結果として、出力する(ステップA6)。
Next, the
次に、認識処理部15は、ステップA2で設定された範囲全てについて、ステップA3〜A6の処理が終了しているかどうかを判定する(ステップA7)。
Next, the
ステップA7の判定の結果、ステップA2で設定された範囲全てについて、ステップA3〜A6の処理が終了していない場合は、認識処理部15は、特徴量マップ生成部11に再度ステップA3を実行させる。これにより、特徴量マップ生成部11は、前回の画像データの下方に位置するNライン分の画像データを取り出す。
As a result of the determination in step A7, if the processing of steps A3 to A6 is not completed for all the ranges set in step A2, the
一方、ステップA7の判定の結果、ステップA2で設定された範囲全てについて、ステップA3〜A6の処理が終了している場合は、画像認識装置における処理は終了する。 On the other hand, as a result of the determination in step A7, if the processing in steps A3 to A6 is completed for the entire range set in step A2, the processing in the image recognition device is completed.
[実施の形態1における効果]
以上のように、本実施の形態1では、画像のNライン分毎に特徴量マップが生成され、Nライン分の特徴量マップ毎に、全結合層を用いたスコアの算出が行われる。このため、従来のように、重複した特徴量マップの生成は行われないので、本実施の形態1によれば、機械学習モデルを利用した画像認識において、処理効率の向上を図ることができる。
[Effect in Embodiment 1]
As described above, in the first embodiment, the feature amount map is generated for each N line portion of the image, and the score is calculated using the fully connected layer for each feature amount map for the N line portion. Therefore, unlike the conventional case, the duplicate feature amount map is not generated. Therefore, according to the first embodiment, it is possible to improve the processing efficiency in the image recognition using the machine learning model.
[プログラム]
本実施の形態1におけるプログラムは、コンピュータに、図5に示すステップA1〜A7を実行させるプログラムであれば良い。このプログラムをコンピュータにインストールし、実行することによって、本実施の形態1における画像認識装置10と画像認識方法とを実現することができる。この場合、コンピュータのプロセッサは、特徴量マップ生成部11、スコア算出部12、対象画像設定部13、及び認識処理部15として機能し、処理を行なう。
[program]
The program according to the first embodiment may be any program that causes a computer to execute steps A1 to A7 shown in FIG. By installing this program on a computer and executing it, the
また、本実施の形態におけるプログラムは、複数のコンピュータによって構築されたコンピュータシステムによって実行されても良い。この場合は、例えば、各コンピュータが、それぞれ、特徴量マップ生成部11、スコア算出部12、対象画像設定部13、及び認識処理部15のいずれかとして機能しても良い。
Further, the program in the present embodiment may be executed by a computer system constructed by a plurality of computers. In this case, for example, each computer may function as any of the feature amount
(実施の形態2)
次に、本発明の実施の形態2における画像認識装置、画像認識方法、及びプログラムについて、図6〜図9を参照しながら説明する。
(Embodiment 2)
Next, the image recognition device, the image recognition method, and the program according to the second embodiment of the present invention will be described with reference to FIGS. 6 to 9.
[装置構成]
最初に、図6を用いて、本発明の実施の形態2における画像認識装置の概略構成について説明する。図6は、本発明の実施の形態2における画像認識装置の構成を具体的に示すブロック図である。
[Device configuration]
First, the schematic configuration of the image recognition device according to the second embodiment of the present invention will be described with reference to FIG. FIG. 6 is a block diagram specifically showing the configuration of the image recognition device according to the second embodiment of the present invention.
図6に示すように、本実施の形態2における画像認識装置30は、実施の形態1における画像認識装置10と同様の構成を備えているが、以下の点で異なっている。以下、実施の形態1との相違点を中心に説明する。
As shown in FIG. 6, the
まず、本実施の形態2における画像認識装置30は、識別器(機械学習モデル)20の構築に用いられた学習データに、パディングデータが付加されており、それによって、特徴量マップに余分なデータが付加される場合に対応している。このため、画像認識装置30は、実施の形態1における画像認識装置10と異なり、補正データ生成部31と、補正データ記憶部32とを備えている。
First, in the
補正データ生成部31は、補正データを生成し、生成した補正データを補正データ記憶部32に格納する。補正データは、学習データに付加されたパディングによって特徴量マップに付加されたデータを補正するための、データである。スコア算出部12は、本実施の形態2では、補正データ生成部31によって生成された補正データを用いて、特徴量マップを補正し、補正後の特徴量マップを用いて、スコアを算出する。
The correction
また、本実施の形態2において用いられる識別器20は、入力されたデータのサイズが、出力時において小さくなるという特性を有している。このため、上述したように、識別器20の構築に用いられた学習データに、パディングデータが付加されている。
Further, the
パディングとは、畳み込み層に入力されたデータのサイズと、それから出力されるデータのサイズとが変わらないように、入力されたデータに、新たにデータ(パディングデータ)を追加することである。例えば、畳み込み層のカーネルの幅及び高さが共にKであるとする(幅w=高さh=K)。この場合、パディングデータを付加しないと、畳み込み層から出力されたデータのサイズは、幅及び高さ共に、入力時のサイズから「−(K−1)」となる。具体的には、K=3の場合は、幅及び高さ共に「2」小さくなる。 Padding is to add new data (padding data) to the input data so that the size of the data input to the convolution layer and the size of the data output from it do not change. For example, assume that the width and height of the kernel of the convolution layer are both K (width w = height h = K). In this case, if the padding data is not added, the size of the data output from the convolution layer is "-(K-1)" from the size at the time of input in both width and height. Specifically, when K = 3, both the width and the height are reduced by "2".
従って、入力されるデータの矩形の外側に(K−1)/2ピクセルずつ、パディングデータを付加すれば、入力時と出力時とでデータの実質的なサイズを同一にすることができる。また、パディングデータの付加は、一般に、最初の畳み込み層(入力層)に対してだけではなく、下層の各畳み込み層に対しても行われる。また、通常は、パディングデータとしては、データ値がゼロとなったデータが使われる。この場合のパディングは「ゼロパディング」と称される。 Therefore, if padding data is added to the outside of the rectangle of the input data by (K-1) / 2 pixels, the actual size of the data can be made the same at the time of input and at the time of output. Further, the padding data is generally added not only to the first convolution layer (input layer) but also to each convolution layer of the lower layer. Further, normally, as the padding data, the data whose data value is zero is used. The padding in this case is called "zero padding".
ここで、図7及び図8を用いて、本実施の形態2における特徴量マップ生成部11及び補正データ生成部31の機能についてより具体的に説明する。図7は、本発明の実施の形態2における識別器(機械学習モデル)の一例を示す図である。図8は、本発明の実施の形態2において識別器の畳み込み層が出力するデータの一例を示す図である。
Here, the functions of the feature amount
上述したように、ゼロパディングのように固定値をパディングすると、それにより矩形の境界において、畳み込み層からの出力結果が変化してしまう可能性がある。このため、本実施の形態では、特徴量マップ生成部11は、対象画像設定部13によって設定された範囲の画像データにパディングデータを付加し、パディング後の画像データを、畳み込み層21に入力する。
As mentioned above, padding a fixed value, such as zero padding, can change the output result from the convolution layer at the rectangular boundaries. Therefore, in the present embodiment, the feature amount
また、このため、本実施の形態2では、識別器20の構築に用いられる学習データにおいても、学習データとなる画像の周辺の画素データがパディングされる。例えば、スライディングウィンドウの矩形サイズが64画素×80画素であり、畳み込み層のカーネルのサイズがK=3であるとする。この場合、機械学習においては、学習データとなる画像の周辺の1画素(=(K−1)/2)を含めた66画素×82画素の画像が使用される。
Therefore, in the second embodiment, the pixel data around the image, which is the learning data, is also padded in the learning data used for constructing the
ところで、入力層(畳み込み層21)以外の畳み込み層では、適切なパディングデータの値を特定することが困難である。なお、畳み込み層24は、入力データに対してサイズ
変換を行うだけであるので、そのカーネルは、1×1であり、畳み込み層24では、パディングは発生しない。
By the way, in the convolution layer other than the input layer (convolution layer 21), it is difficult to specify an appropriate padding data value. Since the
このため、本実施の形態2では、図7に示すように、補正データ生成部31は、畳み込み層22及び23のパディングデータに対応する補正データを生成する。また、補正データ生成部31は、対応する畳み込み層の数だけ、補正ブロックを有している。図8の例では、補正データ生成部31は、補正ブロック31aと、補正ブロック31bとを有している。また、補正データ生成部31は、畳み込み層での処理と同じに処理を実行でき、補正データ生成による処理の遅延を抑制している。
Therefore, in the second embodiment, as shown in FIG. 7, the correction
ここで、図8に示すように、畳み込み層(入力層)21の出力をp[n,m]、畳み込み層22の出力をq[n,m]、畳み込み層23の出力をR[n,m]とする。また、補正データ生成部31による補正データによって補正された後の畳み込み層23の出力をr[n,m]とする。なお、nは行を示し、mは列を示す。
Here, as shown in FIG. 8, the output of the convolution layer (input layer) 21 is p [n, m], the output of the
この場合、補正後の出力r[n,m]は、ゼロパディングが行われていた場合と同一となる。よって、r[1,4]を例に挙げると、以下の数1によって算出される。
In this case, the corrected output r [n, m] is the same as when zero padding was performed. Therefore, taking r [1,4] as an example, it is calculated by the
[数1]
r[1,4] = q[0,4]*w2[0,1]+q[0,5]*w2[0,2]
+q[1,4]*w2[1,1]+q[1,5]*w2[1,2]
+q[2,4]*w2[2,1]+q[2,5]*w2[2,2]
[Number 1]
r [1,4] = q [0,4] * w2 [0,1] + q [0,5] * w2 [0,2]
+ q [1,4] * w2 [1,1] + q [1,5] * w2 [1,2]
+ q [2,4] * w2 [2,1] + q [2,5] * w2 [2,2]
これに対して、本実施の形態2では、実施の形態1で述べたように、Nライン分のデータが畳み込みの対象となるので、パディングデータとして実データが用いられている。従って、畳み込み層23の出力R[1,4]は、以下の数2によって算出される。
On the other hand, in the second embodiment, as described in the first embodiment, the data for N lines is the target of convolution, so that the actual data is used as the padding data. Therefore, the output R [1,4] of the
[数2]
R[1,4] = q[0,3]*w2[0,0] + { q[0,4]*w2[0,1]+q[0,5]*w2[0,2] }
+q[1,3]*w2[1,0] + { q[1,4]*w2[1,1]+q[1,5]*w2[1,2] }
+q[2,3]*w2[2,0] + { q[2,4]*w2[2,1]+q[2,5]*w2[2,2] }
= r[1,4] + { q[0,3]*w2[0,0] + q[1,3]*w2[1,0] + q[2,3]*w2[2,0] }
[Number 2]
R [1,4] = q [0,3] * w2 [0,0] + {q [0,4] * w2 [0,1] + q [0,5] * w2 [0,2]}
+ q [1,3] * w2 [1,0] + {q [1,4] * w2 [1,1] + q [1,5] * w2 [1,2]}
+ q [2,3] * w2 [2,0] + {q [2,4] * w2 [2,1] + q [2,5] * w2 [2,2]}
= r [1,4] + {q [0,3] * w2 [0,0] + q [1,3] * w2 [1,0] + q [2,3] * w2 [2,0] }
また、上記数2において、r[1,4]をR[1,4]で表すと、下記数3に示す通りとなる。
Further, in the
[数3]
r[1,4] = R[1,4] - { q[0,3]*w2[0,0] + q[1,3]*w2[1,0] + q[2,3]*w2[2,0] }
[Number 3]
r [1,4] = R [1,4]-{q [0,3] * w2 [0,0] + q [1,3] * w2 [1,0] + q [2,3] * w2 [2,0]}
ここで、上記数3において、{}内をCr[1,4]とすると、上記数3は、下記の数4によって表すことができる。
Here, assuming that the inside of {} is Cr [1,4] in the
[数4]
r[1,4] = R[1,4] - Cr[1,4]
[Number 4]
r [1,4] = R [1,4] --Cr [1,4]
上記数4におけるC[1,4]が、パディングを補正するための補正データとなる。本実施の形態2においては、補正データ生成部31の補正ブロック31bは、この補正データを生成し、これを補正データ記憶部32に格納する。
C [1,4] in the
また、畳み込み層22の出力q[n,m]も、畳み込み層21でのパディングの影響を受ける。但し、畳み込み層21からの出力には、パディングデータは含まれていない。このため
、補正ブロック31aも、上述の補正ブロック31bと同様の処理を実行する。
The output q [n, m] of the
[装置動作]
次に、本実施の形態2における画像認識装置30の動作について図9を用いて説明する。図9は、本発明の実施の形態2における画像認識装置の動作を示すフロー図である。以下の説明においては、適宜図6〜図8を参照する。また、本実施の形態2においても、画像認識装置30を動作させることによって、画像認識方法が実施される。よって、本実施の形態2における画像認識方法の説明は、以下の画像認識装置30の動作説明に代える。
[Device operation]
Next, the operation of the
図9に示すように、最初に、対象画像設定部13は、画像認識の対象となる画像の画像データを取得する(ステップB1)。次に、対象画像設定部13は、ステップA1で取得した画像データの画像において、画像認識の対象となる範囲を設定する(ステップB2)。
As shown in FIG. 9, first, the target
次に、特徴量マップ生成部11は、ステップB2で設定された範囲の画像データから、Nライン分の画像データを取り出す(ステップB3)。続いて、特徴量マップ生成部11は、取り出したNライン分の画像データを、識別器20の畳み込み層に入力して、特徴量マップを生成する(ステップB4)。また、特徴量マップ生成部11は、生成した特徴量マップを、特徴量マップ記憶部14に格納する。
Next, the feature amount
次に、補正データ生成部31は、パディングによって特徴量マップに付加されたデータを補正するため、補正データを生成し、生成した補正データを補正データ記憶部32に格納する(ステップB5)。なお、ステップB5は、ステップB4と同じに実行されても良い。
Next, the correction
次に、スコア算出部12は、特徴量マップ記憶部14から、Nライン分の特徴量マップを取り出し、更に、補正データ記憶部32から補正データを取り出す。そして、スコア算出部12は、取り出した特徴量マップを、補正データを用いて補正する(ステップB6)。
Next, the
次に、スコア算出部12は、補正後の特徴量マップ上で、仮想のウィンドウをスライドさせながら、複数の所定の位置において、特徴量マップのウィンドウ内の領域を、識別器20の全結合層に入力して、スコアを算出する(ステップB7)。
Next, the
次に、認識処理部15は、ステップB7において所定の位置毎に算出されたスコアの中から、最も値の大きいスコアと、そのときの所定の位置とを特定し、この特定したスコアと所定の位置とを、画像認識の結果として、出力する(ステップB8)。
Next, the
次に、認識処理部15は、ステップB2で設定された範囲全てについて、ステップB3〜B8の処理が終了しているかどうかを判定する(ステップB9)。
Next, the
ステップB9の判定の結果、ステップB2で設定された範囲全てについて、ステップB3〜B8の処理が終了していない場合は、認識処理部15は、特徴量マップ生成部11に再度ステップB3を実行させる。これにより、特徴量マップ生成部11は、前回の画像データの下方に位置するNライン分の画像データを取り出す。
As a result of the determination in step B9, if the processing of steps B3 to B8 is not completed for all the ranges set in step B2, the
一方、ステップB9の判定の結果、ステップB2で設定された範囲全てについて、ステップB3〜B8の処理が終了している場合は、画像認識装置における処理は終了する。 On the other hand, as a result of the determination in step B9, if the processing in steps B3 to B8 is completed for the entire range set in step B2, the processing in the image recognition device is completed.
[実施の形態2における効果]
以上のように、本実施の形態2によれば、学習データにパディングが必要となる識別器20が用いられる場合において、パディングデータを補正することができ、このような場合における識別精度の低下を抑制できる。また、本実施の形態2においても、実施の形態1と同様に、機械学習モデルを利用した画像認識において、処理効率の向上を図ることができる。
[Effect in Embodiment 2]
As described above, according to the second embodiment, when the
[プログラム]
本実施の形態2におけるプログラムは、コンピュータに、図9に示すステップB1〜B9を実行させるプログラムであれば良い。このプログラムをコンピュータにインストールし、実行することによって、本実施の形態2における画像認識装置30と画像認識方法とを実現することができる。この場合、コンピュータのプロセッサは、特徴量マップ生成部11、スコア算出部12、対象画像設定部13、認識処理部15、及び補正データ生成部31として機能し、処理を行なう。
[program]
The program according to the second embodiment may be any program that causes the computer to execute steps B1 to B9 shown in FIG. By installing this program on a computer and executing it, the
また、本実施の形態におけるプログラムは、複数のコンピュータによって構築されたコンピュータシステムによって実行されても良い。この場合は、例えば、各コンピュータが、それぞれ、特徴量マップ生成部11、スコア算出部12、対象画像設定部13、認識処理部15、及び補正データ生成部31のいずれかとして機能しても良い。
Further, the program in the present embodiment may be executed by a computer system constructed by a plurality of computers. In this case, for example, each computer may function as one of the feature amount
(変形例)
上述した実施の形態1及び2においては、図3及び図4に例示した識別器20が用いられているが、実施の形態1及び2において、識別器は特に限定されるものではない。特に、実施の形態1においては、パディングが必要のない識別器が用いられていても良い。
(Modification example)
In the above-described first and second embodiments, the
(物理構成)
ここで、実施の形態1及び2におけるプログラムを実行することによって、画像認識装置を実現するコンピュータについて図10を用いて説明する。図10は、本発明の実施の形態における画像認識装置を実現するコンピュータの一例を示すブロック図である。
(Physical configuration)
Here, a computer that realizes an image recognition device by executing the programs of the first and second embodiments will be described with reference to FIG. FIG. 10 is a block diagram showing an example of a computer that realizes the image recognition device according to the embodiment of the present invention.
図10に示すように、コンピュータ110は、CPU111と、メインメモリ112と、記憶装置113と、入力インターフェイス114と、表示コントローラ115と、データリーダ/ライタ116と、通信インターフェイス117とを備える。これらの各部は、バス121を介して、互いにデータ通信可能に接続される。また、コンピュータ110は、CPU111に加えて、又はCPU111に代えて、GPU(Graphics Processing Unit)、又はFPGA(Field-Programmable Gate Array)又はASIC(Application Specific IC)を備えていても良い。
As shown in FIG. 10, the
CPU111は、記憶装置113に格納された、本実施の形態におけるプログラム(コード)をメインメモリ112に展開し、これらを所定順序で実行することにより、各種の演算を実施する。メインメモリ112は、典型的には、DRAM(Dynamic Random Access Memory)等の揮発性の記憶装置である。また、本実施の形態におけるプログラムは、コンピュータ読み取り可能な記録媒体120に格納された状態で提供される。なお、本実施の形態におけるプログラムは、通信インターフェイス117を介して接続されたインターネット上で流通するものであっても良い。
The CPU 111 expands the programs (codes) of the present embodiment stored in the
また、記憶装置113の具体例としては、ハードディスクドライブの他、フラッシュメモリ等の半導体記憶装置が挙げられる。入力インターフェイス114は、CPU111と、キーボード及びマウスといった入力機器118との間のデータ伝送を仲介する。表示コントローラ115は、ディスプレイ装置119と接続され、ディスプレイ装置119での表示を制御する。
Further, specific examples of the
データリーダ/ライタ116は、CPU111と記録媒体120との間のデータ伝送を仲介し、記録媒体120からのプログラムの読み出し、及びコンピュータ110における処理結果の記録媒体120への書き込みを実行する。通信インターフェイス117は、CPU111と、他のコンピュータとの間のデータ伝送を仲介する。
The data reader /
また、記録媒体120の具体例としては、CF(Compact Flash(登録商標))及びSD(Secure Digital)等の汎用的な半導体記憶デバイス、フレキシブルディスク(Flexible Disk)等の磁気記録媒体、又はCD−ROM(Compact Disk Read Only Memory)などの光学記録媒体が挙げられる。
Specific examples of the
なお、本実施の形態における画像認識装置は、プログラムがインストールされたコンピュータではなく、各部に対応したハードウェアを用いることによっても実現可能である。更に、画像認識装置は、一部がプログラムで実現され、残りの部分がハードウェアで実現されていてもよい。 The image recognition device in the present embodiment can also be realized by using hardware corresponding to each part instead of the computer in which the program is installed. Further, the image recognition device may be partially realized by a program and the rest may be realized by hardware.
上述した実施の形態の一部又は全部は、以下に記載する(付記1)〜(付記12)によって表現することができるが、以下の記載に限定されるものではない。 A part or all of the above-described embodiments can be expressed by the following descriptions (Appendix 1) to (Appendix 12), but the present invention is not limited to the following description.
(付記1)
画像から特定の物体を検出するための機械学習モデルの畳み込み層を用いて、画像認識の対象となる画像の特徴量マップを生成する、特徴量マップ生成部と、
前記特徴量マップ上に、仮想のウィンドウを設定し、前記ウィンドウを設定量だけスライドさせながら、複数の所定の位置において、前記特徴量マップの前記ウィンドウ内の領域を、前記機械学習モデルの全結合層に入力して、前記所定の位置毎に、当該領域に前記特定の物体が存在している可能性を示すスコアを算出する、スコア算出部と、
を備えている、ことを特徴とする画像認識装置。
(Appendix 1)
A feature map generator that generates a feature map of an image to be image-recognized using a convolutional layer of a machine learning model for detecting a specific object from an image.
A virtual window is set on the feature amount map, and while sliding the window by a set amount, the area in the window of the feature amount map is fully combined with the machine learning model at a plurality of predetermined positions. A score calculation unit that inputs to the layer and calculates a score indicating the possibility that the specific object exists in the region at each predetermined position.
An image recognition device characterized by being equipped with.
(付記2)
付記1に記載の画像認識装置であって、
画像データを取得し、取得した画像データで特定される画像において、前記画像認識の対象となる範囲を設定する、対象画像設定部を、更に備え、
前記特徴量マップ生成部が、設定された範囲について、前記特徴量マップを生成する、ことを特徴とする画像認識装置。
(Appendix 2)
The image recognition device according to
Further, a target image setting unit for acquiring image data and setting a range to be targeted for image recognition in the image specified by the acquired image data is further provided.
An image recognition device characterized in that the feature amount map generation unit generates the feature amount map for a set range.
(付記3)
付記1または2に記載の画像認識装置であって、
前記所定の位置毎に算出された前記スコアの中から、最も値の大きい前記スコアと、そのときの前記所定の位置とを特定し、特定した前記スコアと前記所定の位置とを出力する、認識処理部を、更に備えている、
ことを特徴とする画像認識装置。
(Appendix 3)
The image recognition device according to
From the scores calculated for each predetermined position, the score having the largest value and the predetermined position at that time are specified, and the specified score and the predetermined position are output. It also has a processing unit,
An image recognition device characterized by this.
(付記4)
付記1〜3のいずれかに記載の画像認識装置であって、
前記機械学習モデルの構築に用いられた学習データに、パディングデータが付加されており、それによって、前記特徴量マップに余分なデータが付加される場合に、付加されているデータを補正するための、補正データを生成する、補正データ生成部を、更に備え、
前記スコア算出部は、生成された前記補正データを用いて、前記特徴量マップを補正し、補正後の前記特徴量マップを用いて、前記スコアを算出する、
ことを特徴とする画像認識装置。
(Appendix 4)
The image recognition device according to any one of
When padding data is added to the training data used for constructing the machine learning model and extra data is added to the feature amount map, the added data is corrected. , A correction data generation unit is further provided to generate correction data.
The score calculation unit corrects the feature amount map using the generated correction data, and calculates the score using the corrected feature amount map.
An image recognition device characterized by this.
(付記5)
(a)画像から特定の物体を検出するための機械学習モデルの畳み込み層を用いて、画像認識の対象となる画像の特徴量マップを生成する、ステップと、
(b)前記特徴量マップ上に、仮想のウィンドウを設定し、前記ウィンドウを設定量だけスライドさせながら、複数の所定の位置において、前記特徴量マップの前記ウィンドウ内の領域を、前記機械学習モデルの全結合層に入力して、前記所定の位置毎に、当該領域に前記特定の物体が存在している可能性を示すスコアを算出する、ステップと、
を有する、ことを特徴とする画像認識方法。
(Appendix 5)
(A) A step of generating a feature map of an image to be image-recognized using a convolution layer of a machine learning model for detecting a specific object from an image.
(B) A virtual window is set on the feature amount map, and while sliding the window by a set amount, a region in the window of the feature amount map is displayed at a plurality of predetermined positions in the machine learning model. To calculate a score indicating the possibility that the specific object is present in the region at each predetermined position by inputting into the fully connected layer of the step.
An image recognition method characterized by having.
(付記6)
付記5に記載の画像認識方法であって、
(c)画像データを取得し、取得した画像データで特定される画像において、前記画像認識の対象となる範囲を設定する、ステップを、更に有する、
前記(a)のステップにおいて、設定された範囲について、前記特徴量マップを生成する、
ことを特徴とする画像認識方法。
(Appendix 6)
The image recognition method described in
(C) Further having a step of acquiring image data and setting a range to be targeted for the image recognition in the image specified by the acquired image data.
In the step (a), the feature amount map is generated for the set range.
An image recognition method characterized by that.
(付記7)
付記5または6に記載の画像認識方法であって、
(d)前記所定の位置毎に算出された前記スコアの中から、最も値の大きい前記スコアと、そのときの前記所定の位置とを特定し、特定した前記スコアと前記所定の位置とを出力する、ステップを、更に有する、
ことを特徴とする画像認識方法。
(Appendix 7)
The image recognition method according to
(D) From the scores calculated for each predetermined position, the score having the largest value and the predetermined position at that time are specified, and the specified score and the predetermined position are output. Have more steps,
An image recognition method characterized by that.
(付記8)
付記5〜7のいずれかに記載の画像認識方法であって、
(e)前記機械学習モデルの構築に用いられた学習データに、パディングデータが付加されており、それによって、前記特徴量マップに余分なデータが付加される場合に、付加されているデータを補正するための、補正データを生成する、ステップを、更に有し、
前記(b)のステップにおいて、生成された前記補正データを用いて、前記特徴量マップを補正し、補正後の前記特徴量マップを用いて、前記スコアを算出する、
ことを特徴とする画像認識方法。
(Appendix 8)
The image recognition method according to any one of
(E) When padding data is added to the training data used for constructing the machine learning model and extra data is added to the feature amount map, the added data is corrected. Further has steps to generate correction data for
In the step (b), the generated correction data is used to correct the feature amount map, and the corrected feature amount map is used to calculate the score.
An image recognition method characterized by that.
(付記9)
コンピュータに、
(a)画像から特定の物体を検出するための機械学習モデルの畳み込み層を用いて、画像認識の対象となる画像の特徴量マップを生成する、ステップと、
(b)前記特徴量マップ上に、仮想のウィンドウを設定し、前記ウィンドウを設定量だけスライドさせながら、複数の所定の位置において、前記特徴量マップの前記ウィンドウ内の領域を、前記機械学習モデルの全結合層に入力して、前記所定の位置毎に、当該領域に前記特定の物体が存在している可能性を示すスコアを算出する、ステップと、
を実行させる、プログラム。
(Appendix 9)
On the computer
(A) A step of generating a feature map of an image to be image-recognized using a convolution layer of a machine learning model for detecting a specific object from an image.
(B) A virtual window is set on the feature amount map, and while sliding the window by a set amount, a region in the window of the feature amount map is displayed at a plurality of predetermined positions in the machine learning model. To calculate a score indicating the possibility that the specific object is present in the region at each predetermined position by inputting into the fully connected layer of the step.
A program that runs.
(付記10)
付記9に記載のプログラムであって、
前記コンピュータに、
(c)画像データを取得し、取得した画像データで特定される画像において、前記画像認識の対象となる範囲を設定する、ステップを、更に実行させ、
前記(a)のステップにおいて、設定された範囲について、前記特徴量マップを生成す
る、
ことを特徴とするプログラム。
(Appendix 10)
The program described in Appendix 9
On the computer
(C) Further execute the step of acquiring the image data and setting the range to be the target of the image recognition in the image specified by the acquired image data.
In the step (a), the feature amount map is generated for the set range.
A program characterized by that.
(付記11)
付記9または10に記載のプログラムであって、
前記コンピュータに、
(d)前記所定の位置毎に算出された前記スコアの中から、最も値の大きい前記スコアと、そのときの前記所定の位置とを特定し、特定した前記スコアと前記所定の位置とを出力する、ステップを、更に実行させ、
ことを特徴とするプログラム。
(Appendix 11)
The program described in
On the computer
(D) From the scores calculated for each predetermined position, the score having the largest value and the predetermined position at that time are specified, and the specified score and the predetermined position are output. To do, to perform more steps,
A program characterized by that.
(付記12)
付記9〜11のいずれかに記載のプログラムであって、
前記コンピュータに、
(e)前記機械学習モデルの構築に用いられた学習データに、パディングデータが付加されており、それによって、前記特徴量マップに余分なデータが付加される場合に、付加されているデータを補正するための、補正データを生成する、ステップを、更に実行させ、
前記(b)のステップにおいて、生成された前記補正データを用いて、前記特徴量マップを補正し、補正後の前記特徴量マップを用いて、前記スコアを算出する、
ことを特徴とするプログラム。
(Appendix 12)
The program described in any of the appendices 9 to 11 and
On the computer
(E) When padding data is added to the training data used for constructing the machine learning model and extra data is added to the feature amount map, the added data is corrected. To perform further steps to generate correction data,
In the step (b), the generated correction data is used to correct the feature amount map, and the corrected feature amount map is used to calculate the score.
A program characterized by that.
以上のように、本発明によれば、機械学習モデルを利用した画像認識において、処理効率の向上を図ることができる。本発明は、画像認識が必要される種々のシステムに有用である。 As described above, according to the present invention, it is possible to improve the processing efficiency in image recognition using a machine learning model. The present invention is useful for various systems that require image recognition.
10 画像認識装置(実施の形態1)
11 特徴量マップ生成部
12 スコア算出部
13 対象画像設定部
14 特徴量マップ記憶部
15 認識処理部
20 機械学習モデルである識別器
21〜24 畳み込み層
25 全結合層
30 画像認識装置(実施の形態2)
31 補正データ生成部
31a、31b 補正ブロック
32 補正データ記憶部
110 コンピュータ
111 CPU
112 メインメモリ
113 記憶装置
114 入力インターフェイス
115 表示コントローラ
116 データリーダ/ライタ
117 通信インターフェイス
118 入力機器
119 ディスプレイ装置
120 記録媒体
121 バス
10 Image recognition device (Embodiment 1)
11 Feature
31 Correction
112
Claims (12)
前記特徴量マップ上に、仮想のウィンドウを設定し、前記ウィンドウを設定量だけスライドさせながら、複数の所定の位置において、前記特徴量マップの前記ウィンドウ内の領域を、前記機械学習モデルの全結合層に入力して、前記所定の位置毎に、当該領域に前記特定の物体が存在している可能性を示すスコアを算出する、スコア算出部と、
を備えている、ことを特徴とする画像認識装置。 A feature map generator that generates a feature map of an image to be image-recognized using a convolutional layer of a machine learning model for detecting a specific object from an image.
A virtual window is set on the feature amount map, and while sliding the window by a set amount, the area in the window of the feature amount map is fully combined with the machine learning model at a plurality of predetermined positions. A score calculation unit that inputs to the layer and calculates a score indicating the possibility that the specific object exists in the region at each predetermined position.
An image recognition device characterized by being equipped with.
画像データを取得し、取得した画像データで特定される画像において、前記画像認識の対象となる範囲を設定する、対象画像設定部を、更に備え、
前記特徴量マップ生成部が、設定された範囲について、前記特徴量マップを生成する、ことを特徴とする画像認識装置。 The image recognition device according to claim 1.
Further, a target image setting unit for acquiring image data and setting a range to be targeted for image recognition in the image specified by the acquired image data is further provided.
An image recognition device characterized in that the feature amount map generation unit generates the feature amount map for a set range.
前記所定の位置毎に算出された前記スコアの中から、最も値の大きい前記スコアと、そのときの前記所定の位置とを特定し、特定した前記スコアと前記所定の位置とを出力する、認識処理部を、更に備えている、
ことを特徴とする画像認識装置。 The image recognition device according to claim 1 or 2.
From the scores calculated for each predetermined position, the score having the largest value and the predetermined position at that time are specified, and the specified score and the predetermined position are output. It also has a processing unit,
An image recognition device characterized by this.
前記機械学習モデルの構築に用いられた学習データに、パディングデータが付加されており、それによって、前記特徴量マップに余分なデータが付加される場合に、付加されているデータを補正するための、補正データを生成する、補正データ生成部を、更に備え、
前記スコア算出部は、生成された前記補正データを用いて、前記特徴量マップを補正し、補正後の前記特徴量マップを用いて、前記スコアを算出する、
ことを特徴とする画像認識装置。 The image recognition device according to any one of claims 1 to 3.
When padding data is added to the training data used for constructing the machine learning model and extra data is added to the feature amount map, the added data is corrected. , A correction data generation unit is further provided to generate correction data.
The score calculation unit corrects the feature amount map using the generated correction data, and calculates the score using the corrected feature amount map.
An image recognition device characterized by this.
(b)前記特徴量マップ上に、仮想のウィンドウを設定し、前記ウィンドウを設定量だけスライドさせながら、複数の所定の位置において、前記特徴量マップの前記ウィンドウ内の領域を、前記機械学習モデルの全結合層に入力して、前記所定の位置毎に、当該領域に前記特定の物体が存在している可能性を示すスコアを算出する、ステップと、
を有する、ことを特徴とする画像認識方法。 (A) A step of generating a feature map of an image to be image-recognized using a convolution layer of a machine learning model for detecting a specific object from an image.
(B) A virtual window is set on the feature amount map, and while sliding the window by a set amount, a region in the window of the feature amount map is displayed at a plurality of predetermined positions in the machine learning model. To calculate a score indicating the possibility that the specific object is present in the region at each predetermined position by inputting into the fully connected layer of the step.
An image recognition method characterized by having.
(c)画像データを取得し、取得した画像データで特定される画像において、前記画像認識の対象となる範囲を設定する、ステップを、更に有する、
前記(a)のステップにおいて、設定された範囲について、前記特徴量マップを生成する、
ことを特徴とする画像認識方法。 The image recognition method according to claim 5.
(C) Further having a step of acquiring image data and setting a range to be targeted for the image recognition in the image specified by the acquired image data.
In the step (a), the feature amount map is generated for the set range.
An image recognition method characterized by that.
(d)前記所定の位置毎に算出された前記スコアの中から、最も値の大きい前記スコアと、そのときの前記所定の位置とを特定し、特定した前記スコアと前記所定の位置とを出力する、ステップを、更に有する、
ことを特徴とする画像認識方法。 The image recognition method according to claim 5 or 6.
(D) From the scores calculated for each predetermined position, the score having the largest value and the predetermined position at that time are specified, and the specified score and the predetermined position are output. Have more steps,
An image recognition method characterized by that.
(e)前記機械学習モデルの構築に用いられた学習データに、パディングデータが付加されており、それによって、前記特徴量マップに余分なデータが付加される場合に、付加されているデータを補正するための、補正データを生成する、ステップを、更に有し、
前記(b)のステップにおいて、生成された前記補正データを用いて、前記特徴量マップを補正し、補正後の前記特徴量マップを用いて、前記スコアを算出する、
ことを特徴とする画像認識方法。 The image recognition method according to any one of claims 5 to 7.
(E) When padding data is added to the training data used for constructing the machine learning model and extra data is added to the feature amount map, the added data is corrected. Further has steps to generate correction data for
In the step (b), the generated correction data is used to correct the feature amount map, and the corrected feature amount map is used to calculate the score.
An image recognition method characterized by that.
(a)画像から特定の物体を検出するための機械学習モデルの畳み込み層を用いて、画像認識の対象となる画像の特徴量マップを生成する、ステップと、
(b)前記特徴量マップ上に、仮想のウィンドウを設定し、前記ウィンドウを設定量だけスライドさせながら、複数の所定の位置において、前記特徴量マップの前記ウィンドウ内の領域を、前記機械学習モデルの全結合層に入力して、前記所定の位置毎に、当該領域に前記特定の物体が存在している可能性を示すスコアを算出する、ステップと、
を実行させる、プログラム。 On the computer
(A) A step of generating a feature map of an image to be image-recognized using a convolution layer of a machine learning model for detecting a specific object from an image.
(B) A virtual window is set on the feature amount map, and while sliding the window by a set amount, a region in the window of the feature amount map is displayed at a plurality of predetermined positions in the machine learning model. To calculate a score indicating the possibility that the specific object is present in the region at each predetermined position by inputting into the fully connected layer of the step.
A program that runs.
前記コンピュータに、
(c)画像データを取得し、取得した画像データで特定される画像において、前記画像認識の対象となる範囲を設定する、ステップを、更に実行させ、
前記(a)のステップにおいて、設定された範囲について、前記特徴量マップを生成する、
ことを特徴とするプログラム。 The program according to claim 9.
On the computer
(C) Further execute the step of acquiring the image data and setting the range to be the target of the image recognition in the image specified by the acquired image data.
In the step (a), the feature amount map is generated for the set range.
A program characterized by that.
前記コンピュータに、
(d)前記所定の位置毎に算出された前記スコアの中から、最も値の大きい前記スコアと、そのときの前記所定の位置とを特定し、特定した前記スコアと前記所定の位置とを出力する、ステップを、更に実行させ、
ことを特徴とするプログラム。 The program according to claim 9 or 10.
On the computer
(D) From the scores calculated for each predetermined position, the score having the largest value and the predetermined position at that time are specified, and the specified score and the predetermined position are output. To do, to perform more steps,
A program characterized by that.
前記コンピュータに、
(e)前記機械学習モデルの構築に用いられた学習データに、パディングデータが付加されており、それによって、前記特徴量マップに余分なデータが付加される場合に、付加されているデータを補正するための、補正データを生成する、ステップを、更に実行させ、
前記(b)のステップにおいて、生成された前記補正データを用いて、前記特徴量マップを補正し、補正後の前記特徴量マップを用いて、前記スコアを算出する、
ことを特徴とするプログラム。 The program according to any one of claims 9 to 11.
On the computer
(E) When padding data is added to the training data used for constructing the machine learning model and extra data is added to the feature amount map, the added data is corrected. To perform further steps to generate correction data,
In the step (b), the generated correction data is used to correct the feature amount map, and the corrected feature amount map is used to calculate the score.
A program characterized by that.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019061039A JP7287650B2 (en) | 2019-03-27 | 2019-03-27 | Image recognition device, image recognition method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019061039A JP7287650B2 (en) | 2019-03-27 | 2019-03-27 | Image recognition device, image recognition method, and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2020160921A true JP2020160921A (en) | 2020-10-01 |
JP7287650B2 JP7287650B2 (en) | 2023-06-06 |
Family
ID=72643616
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019061039A Active JP7287650B2 (en) | 2019-03-27 | 2019-03-27 | Image recognition device, image recognition method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7287650B2 (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016219004A (en) * | 2015-05-18 | 2016-12-22 | ゼロックス コーポレイションXerox Corporation | Multi-object tracking using generic object proposals |
JP2018005520A (en) * | 2016-06-30 | 2018-01-11 | クラリオン株式会社 | Object detection device and object detection method |
JP2018010568A (en) * | 2016-07-15 | 2018-01-18 | パナソニックIpマネジメント株式会社 | Image recognition system |
-
2019
- 2019-03-27 JP JP2019061039A patent/JP7287650B2/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016219004A (en) * | 2015-05-18 | 2016-12-22 | ゼロックス コーポレイションXerox Corporation | Multi-object tracking using generic object proposals |
JP2018005520A (en) * | 2016-06-30 | 2018-01-11 | クラリオン株式会社 | Object detection device and object detection method |
JP2018010568A (en) * | 2016-07-15 | 2018-01-18 | パナソニックIpマネジメント株式会社 | Image recognition system |
Also Published As
Publication number | Publication date |
---|---|
JP7287650B2 (en) | 2023-06-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2017152794A1 (en) | Method and device for target tracking | |
US20200134313A1 (en) | Detection method and detection device | |
JP4738469B2 (en) | Image processing apparatus, image processing program, and image processing method | |
JP6075110B2 (en) | Image processing apparatus, image processing method, and image processing program | |
US9076067B2 (en) | Information processing apparatus and method for classifier-based object detection | |
JP4694613B2 (en) | Document orientation determination apparatus, document orientation determination method, program, and recording medium therefor | |
KR101916855B1 (en) | Apparatus and method for correcting lesion in image frame | |
US20070183665A1 (en) | Face feature point detecting device and method | |
JP2019117577A (en) | Program, learning processing method, learning model, data structure, learning device and object recognition device | |
US20160379088A1 (en) | Apparatus and method for creating an image recognizing program having high positional recognition accuracy | |
US20230368033A1 (en) | Information processing device, control method, and program | |
KR102200608B1 (en) | Apparatus and method for character detection | |
JP2020160921A (en) | Image recognition device, method for image recognition, and program | |
JP6989153B2 (en) | Image processing equipment, image processing methods, and programs | |
JP2006133941A (en) | Image processing device, image processing method, image processing program, and portable terminal | |
JP2010102396A (en) | Person detection device, person detection method, and program | |
US20220392107A1 (en) | Image processing apparatus, image processing method, image capturing apparatus, and non-transitory computer-readable storage medium | |
KR20210055532A (en) | Electronic Device and the Method for Generating Action Instance and Recording Medium | |
US20220301140A1 (en) | Anomaly detection device, anomaly detection method, and computer program product | |
WO2021157213A1 (en) | Image processing device and image processing method | |
JP6962450B2 (en) | Image processing equipment, image processing methods, and programs | |
JP2007156954A (en) | Reliability table creation method, optical flow estimation method, reliability table creation device, optical flow estimation device, and program | |
WO2023275941A1 (en) | Image processing apparatus, feature map generating apparatus, learning model generation apparatus, image processing method, and computer-readable recording medium | |
JP2020129298A (en) | Computation system | |
JP7521704B2 (en) | Posture estimation device, learning model generation device, posture estimation method, learning model generation method, and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220209 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230127 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230214 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230413 |
|
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: 20230425 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230518 |
|
R151 | Written notification of patent or utility model registration |
Ref document number: 7287650 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |