JP2022022139A - Image identification device, method of performing semantic segmentation, and program - Google Patents

Image identification device, method of performing semantic segmentation, and program Download PDF

Info

Publication number
JP2022022139A
JP2022022139A JP2021118014A JP2021118014A JP2022022139A JP 2022022139 A JP2022022139 A JP 2022022139A JP 2021118014 A JP2021118014 A JP 2021118014A JP 2021118014 A JP2021118014 A JP 2021118014A JP 2022022139 A JP2022022139 A JP 2022022139A
Authority
JP
Japan
Prior art keywords
feature
image
feature map
feature amount
loss
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.)
Pending
Application number
JP2021118014A
Other languages
Japanese (ja)
Inventor
淳樹 長内
Atsuki Osanai
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.)
Honda Motor Co Ltd
Original Assignee
Honda Motor Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honda Motor Co Ltd filed Critical Honda Motor Co Ltd
Priority to DE102021118734.6A priority Critical patent/DE102021118734A1/en
Priority to US17/380,129 priority patent/US11587345B2/en
Publication of JP2022022139A publication Critical patent/JP2022022139A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)

Abstract

To provide an image identification device capable of computing significance more accurately, a method of performing semantic segmentation, and a program.SOLUTION: An image identification device is provided, comprising an image acquisition unit for acquiring an image, a feature value extraction unit configured to extract multiple feature values of the acquired image, a feature map generation unit configured to generate a feature map for each of the multiple feature values, and a multiplication unit configured to multiply each feature map by a weight coefficient which is an arbitrary positive value representing significance of the feature.SELECTED DRAWING: Figure 1

Description

本発明は、画像識別装置、セマンティックセグメンテーションを行う方法、およびプログラムに関する。 The present invention relates to an image identification device, a method for performing semantic segmentation, and a program.

セマンティックセグメンテーションは各ピクセルのカテゴリ識別を目的とする基本的、かつ難易度の高い問題であり、自律移動ロボットや自動運転といったシステムを構築するためにその高精度化が求められている。実環境においては、物体のスケール、照明環境、オクルージョンといった要因に対するロバスト性に加え、類似の外観を持つ異なるカテゴリを識別する能力が必要となる。そのため、高精度な認識を実現するためには、より識別性の高い特徴量の獲得および選択が必要となる(例えば、特許文献1、2参照)。 Semantic segmentation is a basic and difficult problem for the purpose of class identification of each pixel, and its high accuracy is required to construct a system such as an autonomous mobile robot or automatic driving. In a real environment, you need the ability to identify different categories with similar appearances, as well as robustness to factors such as object scale, lighting environment, and occlusion. Therefore, in order to realize highly accurate recognition, it is necessary to acquire and select a feature amount with higher distinctiveness (see, for example, Patent Documents 1 and 2).

また、深層学習を用いたセマンティックセグメンテーションは、コンテクスト情報を組み合わせることで大きな改善がもたらされた。近年、コンテクスト把握の技術としては、特徴抽出器(Backbone)から得られる特徴量を、ピクセルレベルあるいはカテゴリレベルの類似度を用いて修正するものが提案されている。 In addition, semantic segmentation using deep learning has been greatly improved by combining contextual information. In recent years, as a technique for grasping a context, a technique has been proposed in which a feature amount obtained from a feature extractor (Backbone) is modified by using a degree of similarity at a pixel level or a category level.

特開2019-128804号公報Japanese Unexamined Patent Publication No. 2019-128804 再公表WO2008/129881号公報Republished WO2008 / 129881

しかしながら、従来技術では、最終的な分類を担うネットワークに入力される特徴量が特徴マップ毎に平等に扱われるため、特徴マップ間の区別がつき辛いという課題があった。また。残差構造を利用した特徴マップの増強を行う従来技術では、増強しか許容しない構造になっており分別性に課題があった。 However, in the prior art, since the feature amount input to the network responsible for the final classification is treated equally for each feature map, there is a problem that it is difficult to distinguish between the feature maps. Also. In the conventional technique for enhancing the feature map using the residual structure, the structure allows only enhancement, and there is a problem in segregation.

本発明は、上記の問題点に鑑みてなされたものであって、従来より正確な重要度を算出することができる画像識別装置、セマンティックセグメンテーションを行う方法、およびプログラムを提供することを目的とする。 The present invention has been made in view of the above problems, and an object of the present invention is to provide an image identification device capable of calculating more accurate importance than before, a method for performing semantic segmentation, and a program. ..

(1)上記目的を達成するため、本発明の一態様に係る画像識別装置は、画像(X)を取得する画像取得部と、取得された前記画像の複数の特徴量を抽出する特徴量抽出部と、前記複数の特徴量のそれぞれについて特徴マップ(X)を作成する特徴マップ作成部と、前記特徴マップごとに特徴の重要度を表現した任意の正の値である重み係数(a)を乗算する乗算部と、を備える。 (1) In order to achieve the above object, the image identification device according to one aspect of the present invention has an image acquisition unit for acquiring an image (X) and feature quantity extraction for extracting a plurality of feature quantities of the acquired image. A feature map creation section that creates a feature map (X i ) for each of the plurality of feature quantities, and a weighting coefficient ( ai i ) that is an arbitrary positive value expressing the importance of the feature for each feature map. ) Is provided with a multiplication unit.

(2)また、本発明の一態様に係る画像識別装置において、重み係数(a)は、前記画像(X)を畳み込み、畳み込み層を作成する処理と、前記畳み込み層にReLU関数を適用し特徴量Fを算出する処理と、特徴量FにGlobal Average Pooling(GAP)層を適用する処理とから計算されるようにしてもよい。 (2) Further, in the image identification device according to one aspect of the present invention, the weight coefficient ( ai ) is a process of convolving the image (X) to create a convolution layer and applying a ReLU function to the convolution layer. It may be calculated from the process of calculating the feature amount F and the process of applying the Global Image Pooling (GAP) layer to the feature amount F.

(3)上記目的を達成するため、本発明の一態様に係る画像識別装置は、画像を取得する画像取得部と、取得された前記画像の複数の特徴量を抽出する特徴量抽出部と、前記複数の特徴量それぞれに対して畳み込み処理によって特徴マップを作成する作成部と、前記特徴マップに対して畳み込み処理によって修正特徴量を算出し、算出した前記修正特徴量に対して全体平均プーリング処理を行ってコンテクストを集約し、チャンネル毎の重み係数であるアテンションを生成し、生成された前記アテンションを前記特徴マップに乗算することで、前記複数の特徴マップに増強と減衰の重み付けを行って重み付けした特徴量を生成する重付特徴量生成部と、を備える。 (3) In order to achieve the above object, the image identification device according to one aspect of the present invention includes an image acquisition unit for acquiring an image, a feature amount extraction unit for extracting a plurality of feature quantities of the acquired image, and a feature amount extraction unit. A creation unit that creates a feature map by convolution processing for each of the plurality of feature quantities, and a correction feature quantity is calculated by convolution processing for the feature map, and an overall average pooling process is performed on the calculated modified feature quantity. To aggregate the context, generate an attention that is a weighting coefficient for each channel, and multiply the generated attention by the feature map to weight the plurality of feature maps by weighting the enhancement and attenuation. It is provided with a weighted feature amount generation unit for generating the created feature amount.

(4)また、本発明の一態様に係る画像識別装置において、前記重み付けした特徴量に対して畳み込みとアップサンプリング処理を行って出力を算出し、算出した前記出力と教師データとを比較して第1損失を算出する第1損失算出部と、前記特徴マップに対して畳み込みとアップサンプリング処理を行って出力を算出し、算出した前記出力と教師データとを比較して第2損失を算出する第2損失算出部と、をさらに備え、前記第1損失と前記第2損失から、全体の損失関数を算出し、算出した前記損失関数を用いて前記重み係数の学習を行うようにしてもよい。 (4) Further, in the image identification device according to one aspect of the present invention, an output is calculated by performing convolution and upsampling processing on the weighted feature amount, and the calculated output is compared with the teacher data. The first loss calculation unit that calculates the first loss and the feature map are convolved and upsampled to calculate the output, and the calculated output is compared with the teacher data to calculate the second loss. A second loss calculation unit may be further provided, the entire loss function may be calculated from the first loss and the second loss, and the weighting coefficient may be learned using the calculated loss function. ..

(5)上記目的を達成するため、本発明の一態様に係るセマンティックセグメンテーションを行う方法は、ニューラルネットワークシステムを使用して画像(X)のセマンティックセグメンテーションを行う方法であって、前記画像を入力する処理と、取得された前記画像の複数の特徴量を抽出する処理と、前記画像が有する複数の特徴量のそれぞれについて特徴マップ(X)を作成する処理と、特徴マップごとに特徴の重要度を表現した任意の正の値である重み係数(a)を乗算する処理とを有する。 (5) In order to achieve the above object, the method of performing semantic segmentation according to one aspect of the present invention is a method of performing semantic segmentation of an image (X) using a neural network system, and the image is input. Processing, processing to extract a plurality of acquired feature quantities of the image, processing to create a feature map ( Xi ) for each of the plurality of feature quantities of the image, and importance of features for each feature map. It has a process of multiplying a weighting coefficient ( ai ) which is an arbitrary positive value expressing.

(6)上記目的を達成するため、本発明の一態様に係るプログラムは、コンピュータに、画像を取得させ、取得された前記画像の複数の特徴量を抽出させ、前記画像が有する複数の特徴量のそれぞれについて特徴マップ(X)を作成させ、前記特徴マップごとに特徴の重要度を表現した任意の正の値である重み係数(a)を乗算させる。 (6) In order to achieve the above object, the program according to one aspect of the present invention causes a computer to acquire an image, extract a plurality of feature quantities of the acquired image, and have a plurality of feature quantities of the image. A feature map (Xi) is created for each of the features, and a weighting coefficient ( ai ) , which is an arbitrary positive value expressing the importance of the feature, is multiplied for each feature map.

(1)~(6)によれば、従来より正確な重要度を算出することができる。 According to (1) to (6), it is possible to calculate the importance more accurately than before.

実施形態に係るセマンティックセグメンテーション装置を含む画像識別装置の構成を示すブロック図である。It is a block diagram which shows the structure of the image identification apparatus which includes the semantic segmentation apparatus which concerns on embodiment. コンテクストを取り入れるネットワーク構造の例を示す図である。It is a figure which shows the example of the network structure which takes in the context. 実施形態に係るCFANetの概略構成図である。It is a schematic block diagram of CFA Net which concerns on embodiment. 本実施形態に係るCFANetを簡略化した計算グラフである。It is a calculation graph which simplified CFA Net which concerns on this embodiment. PASACL VOC 2012 validationセットでの評価結果を示す図である。It is a figure which shows the evaluation result in the PASACL VOC 2012 validation set. PASACL VOC 2012 test setでの評価結果を示す図である。It is a figure which shows the evaluation result in PASACL VOC 2012 test set. Cosine 類似度の可視化結果例を示す図である。It is a figure which shows the example of the visualization result of Cosine similarity. 実施形態に係る画像識別装置の処理手順例のフローチャートである。It is a flowchart of the processing procedure example of the image identification apparatus which concerns on embodiment.

以下、本発明の実施の形態について図面を参照しながら説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.

[実施形態の概要]
特徴マップの重要度を乗算した特徴量を用いることで、各特徴マップの影響度を増大、あるいは減衰させる機構を設け、出力に寄与する特徴マップを区別し易くした。特徴マップの重要度を算出する際に、画像全体のコンテクストを捉えるGlobal Average Pooling層を用いた。重要度を算出するブランチに補助的な推論を行うHeadネットワークを設置することで、より正確な重要度を算出する構造とした。
[Outline of Embodiment]
By using a feature amount multiplied by the importance of the feature map, a mechanism is provided to increase or attenuate the influence of each feature map, making it easier to distinguish the feature maps that contribute to the output. In calculating the importance of the feature map, a Global Average Polling layer was used to capture the context of the entire image. By installing a Head network that performs auxiliary inference in the branch that calculates the importance, a structure that calculates the importance more accurately was adopted.

本実施形態は、課題を解決するために、ContextawareFeature Attention Network(CFANet)を用いる。CFANetでは、Global Average Pooling(GAP)を用いてコンテクストを集約し、チャンネル毎のアテンションを生成する。得られたアテンションは特徴マップに直接乗算され、各特徴マップは増強・減衰という双方向の重み付けがなされる。そのため、従来手法以上の弁別性を獲得することが可能となる。 In this embodiment, the ContextawareFature Attention Network (CFANet) is used to solve the problem. In CFANet, contexts are aggregated using Global Average Polling (GAP) to generate attention for each channel. The obtained attention is directly multiplied by the feature map, and each feature map is weighted in both directions of enhancement and attenuation. Therefore, it is possible to obtain discriminativeness higher than that of the conventional method.

[画像識別装置1の構成例]
図1は、本実施形態に係るセマンティックセグメンテーション装置10を含む画像識別装置1の構成を示すブロック図である。図1のように、画像識別装置1は、画像取得部11、特徴量抽出部12、セマンティックセグメンテーション装置10、および可視化部30を備える。セマンティックセグメンテーション装置10は、特徴量取得部21、乗算部22(特徴マップ作成部、重付特徴量生成部)、第1畳込層23(第1損失算出部)、第2畳込層24(特徴マップ作成部、作成部)、第3畳込層25(特徴マップ作成部、重付特徴量生成部)、GAP部26(特徴マップ作成部、重付特徴量生成部)、および第4畳込層27(第2損失算出部)を備える。可視化部30は、Head31(第1損失算出部)、補助Head32(第2損失算出部)、教師ラベル提供部33、および類似度マップ作成部34を備える。
[Configuration example of image identification device 1]
FIG. 1 is a block diagram showing a configuration of an image identification device 1 including a semantic segmentation device 10 according to the present embodiment. As shown in FIG. 1, the image identification device 1 includes an image acquisition unit 11, a feature amount extraction unit 12, a semantic segmentation device 10, and a visualization unit 30. The semantic segmentation device 10 includes a feature amount acquisition unit 21, a multiplication unit 22 (feature map creation unit, a weighted feature amount generation unit), a first convolutional layer 23 (first loss calculation unit), and a second convolutional layer 24 (feature map creation unit, weighted feature amount generation unit). Feature map creation unit, creation unit), 3rd convolutional layer 25 (feature map creation unit, heavy feature amount generation unit), GAP unit 26 (feature map creation unit, heavy feature amount generation unit), and 4th tatami mat. A built-in layer 27 (second loss calculation unit) is provided. The visualization unit 30 includes a head 31 (first loss calculation unit), an auxiliary head 32 (second loss calculation unit), a teacher label providing unit 33, and a similarity map creation unit 34.

[コンテクストを取り入れるネットワーク構造の例]
ここで、コンテクストを取り入れるネットワーク構造の例を説明する。図2は、コンテクストを取り入れるネットワーク構造の例を示す図である。
図2の画像g110は、特徴量をチャンネル方向に結合する構造例である。図2の画像g120は、コンテクストを残差特徴量として取り込む構造である。図2の画像g130は、本実施形態のコンテクストを考慮して特徴マップを増強・減衰双方向に変調する構造例である。
[Example of network structure that incorporates context]
Here, an example of a network structure that incorporates the context will be described. FIG. 2 is a diagram showing an example of a network structure that incorporates a context.
The image g110 in FIG. 2 is a structural example in which the feature amounts are combined in the channel direction. The image g120 of FIG. 2 has a structure that captures the context as a residual feature amount. The image g130 in FIG. 2 is a structural example in which the feature map is modulated in both directions of enhancement and attenuation in consideration of the context of the present embodiment.

[ネットワーク構造]
図3は、本実施形態に係るCFANetの概略構成図である。実施形態では、BackboneとしてResNetを用いる。参考文献1(Zhao, H., Shi, J., Qi, X., Wang, X. and Jia, J., “Pyramid Scene Parsing Network”, CVPR ,2017)と同様に、ResNetの最終2ブロックにDilated Convolutionを適用し、解像度の低下を入力画像の1/8に抑制している。Backboneから得られた特徴量Fは、破線で示されたCFAモジュールに伝搬する。Fは、Convolution層を通しFに変換され、その後2つの方向へと伝搬する。1つ目はチャンネルレベルのアテンションを生成するためのネットワークである。
このように、Backboneで得られた特徴マップはCFAモジュールに伝搬し、チャンネル毎の重み付けをなされた後にHeadに取り込まれる。
[Network structure]
FIG. 3 is a schematic configuration diagram of CFANet according to the present embodiment. In the embodiment, ResNet is used as the backbone. Similar to Reference 1 (Zhao, H., Shi, J., Qi, X., Wang, X. and Jia, J., “Pyramid Scene Parsing Network”, CVPR, 2017), in the last two blocks of ResNet. A Dilated Convolution is applied to suppress the decrease in resolution to 1/8 of the input image. The feature amount F 0 obtained from the backbone propagates to the CFA module shown by the broken line. F 0 is converted to F 1 through the Convolution layer and then propagates in two directions. The first is a network for generating channel-level attention.
In this way, the feature map obtained by Backbone propagates to the CFA module, is weighted for each channel, and then is incorporated into Head.

はConvolution-BatchNorm-ReLU層を通過した後に、GAP(Global Average Pooling)によって大域的なコンテクストを集約しチャンネル毎のアテンションaへと変換される。具体的に、あるチャンネルcに対するアテンションacは、次式(1)のように表される。 After passing through the Convolution-BatchNorm-ReLU layer, F 1 aggregates the global context by GAP (Global Average Polling) and converts it into attention a for each channel. Specifically, the attention ac for a certain channel c is expressed by the following equation (1).

Figure 2022022139000002
Figure 2022022139000002

ここで、Hは高さ、Wは幅、α∈Rは学習によって適合されるスケール係数、F’は、ReLU後の特徴量(修正特徴量)である。また、u=(c,v,u)であり、vは行方向、uは列方向の位置を表し、それらの和は特徴マップ全体に対して取られる。コンテクストを考慮して重み付けされた特徴量Fは次式(2)で表される。 Here, H is the height, W is the width, α ∈ R is the scale coefficient adapted by learning, and F 1'is the feature amount (corrected feature amount) after ReLU. Further, u = (c, v, u), where v represents the position in the row direction and u represents the position in the column direction, and the sum of them is taken for the entire feature map. The feature amount F 2 weighted in consideration of the context is expressed by the following equation (2).

Figure 2022022139000003
Figure 2022022139000003

得られたFはHeadに入力され出力Yを得る。
のもう一方の伝搬方向は補助Headで、これにより補助出力Y’を得る。それぞれの出力と教師ラベルTを比較し、損失Lmain(第1損失)、およびLaux(第2損失)を得る。全体の損失関数は次式(3)のように定義する。
The obtained F 2 is input to the head to obtain an output Y.
The other propagation direction of F 1 is the auxiliary Head, which obtains the auxiliary output Y'. The respective outputs are compared with the teacher label T to obtain the losses Lmain (first loss) and Laux (second loss). The total loss function is defined by the following equation (3).

Figure 2022022139000004
Figure 2022022139000004

[CFAモジュールの性質]
次に、CFANetと混合エキスパートモデルの等価性、およびCFAモジュールから分岐する補助Headの効果について説明する。説明を簡潔にするために、図4に示すCFANetを簡略化した計算グラフを考える。図4は、本実施形態に係るCFANetを簡略化した計算グラフである。図4では、全ての活性化関数を線形関数とする。また、図3中(c)で表されるConvolution層を省略する。これらは議論の一般性を失わない仮定である。図4において、各Fは特徴量、各WはConvolutionの重み行列を表す。また、aはチャンネル毎のアテンションである、X、Y、およびTはそれぞれ入力画像、推定結果、入力に対応する正解ラベルである。補助Headに対する変数については’を付けて表している。
[Characteristics of CFA module]
Next, the equivalence between CFANet and the mixed expert model, and the effect of the auxiliary head branching from the CFA module will be described. For the sake of brevity, consider a computational graph that simplifies CFANet shown in FIG. FIG. 4 is a calculation graph which simplifies CFA Net according to the present embodiment. In FIG. 4, all activation functions are linear functions. Further, the Convolution layer represented by (c) in FIG. 3 is omitted. These are assumptions that do not lose the generality of the argument. In FIG. 4, each F represents a feature quantity, and each W represents a weight matrix of Convolution. Further, a is the attention for each channel, and X, Y, and T are the input image, the estimation result, and the correct label corresponding to the input, respectively. Variables for auxiliary heads are indicated by'.

[混合エキスパートモデル]
混合エキスパートモデルはC個のエキスパート(E,…,EC―1)とC次元の重みを生成するゲーティングネットワークGからなる。入力xに対し、出力yは次式(4)のように与えられる。
[Mixed expert model]
The mixed expert model consists of C experts (E, ..., EC -1 ) and a gating network G that produces C-dimensional weights. For the input x, the output y is given by the following equation (4).

Figure 2022022139000005
Figure 2022022139000005

ここで、G(x)はインデックスiのエキスパートEに割り当てられた重みである。
混合エキスパートモデルとCFANetの等価性を確認するために、まず図4のHeadに表れる次式(5)の重み行列を考える。
Here, G (x) i is a weight assigned to the expert E i of the index i.
In order to confirm the equivalence between the mixed expert model and CFANet, first consider the weight matrix of the following equation (5) that appears in the Head of FIG.

Figure 2022022139000006
Figure 2022022139000006

式(5)において、kはカーネルサイズ、Cは入力のチャンネル数、Coutは出力のチャンネル数である。最終出力Yは式(2)を用いることで次式(6)のように変形できる。 In equation (5), k 2 is the kernel size, C is the number of input channels, and Cout is the number of output channels. The final output Y can be transformed as in the following equation (6) by using the equation (2).

Figure 2022022139000007
Figure 2022022139000007

ここで、カーネル内の位置依存性をk=(k,k)と表した。
式(4)と式(6)を比較すると、CFANetが混合エキスパートモデルと等価であることが分かる。これによりCFANetは、入力画像に含まれる対象に特有の特徴量に重点を置いて識別することが可能となる。
Here, the position dependence in the kernel is expressed as k = (k v , ku ).
Comparing Eqs. (4) and (6), it can be seen that CFANet is equivalent to the mixed expert model. As a result, the CFA Net can be identified by focusing on the feature amount peculiar to the object included in the input image.

[補助Headの効果]
CFANetに設けた補助Headの存在が、CFAモジュール内の重みWの学習を促進することを示す。出力YからノードFに逆伝搬する勾配をGF2、補助出力Y’からノードFに逆伝搬する勾配をGF1とする(図4中の破線矢印)。
ノードFに伝搬する総勾配は、次式(7)のようになる。
[Effect of auxiliary head]
It is shown that the presence of the auxiliary head provided in the CFA Net promotes the learning of the weight W 2 in the CFA module. The gradient back-propagating from the output Y to the node F 2 is GF2, and the gradient back - propagating from the auxiliary output Y'to the node F1 is GF1 (dashed arrow in FIG. 4).
The total gradient propagating to the node F1 is as shown in the following equation (7).

Figure 2022022139000008
Figure 2022022139000008

GAPを用いてチャンネル毎のアテンションを生成した結果、u=(c,u,v)の依存性は第二項にのみ表れる。連鎖則を用いて重みWについての勾配を求めると、次式(8)のようになる。 As a result of generating the attention for each channel using GAP, the dependence of u = (c, u, v) appears only in the second term. When the gradient for the weight W 1 is obtained by using the chain law, it becomes the following equation (8).

Figure 2022022139000009
Figure 2022022139000009

式(8)の第一項は近似的に次式(9)のように書ける。 The first term of the equation (8) can be approximately written as the following equation (9).

Figure 2022022139000010
Figure 2022022139000010

つまり補助Head を用いなかった場合(GF1=0)、式(8)からk=(k,k)の依存性は完全に消失し、重みWの学習に支障をきたすことになる。補助Headの設置はその依存性を回復し、より識別的な特徴量を得ることに繋がる。 In other words, when the auxiliary head is not used ( GF1 = 0), the dependence of k = ( kv , ku ) from equation ( 8 ) disappears completely, which hinders the learning of the weight W1. .. The installation of the auxiliary head restores its dependence and leads to the acquisition of more discriminating features.

[実験結果]
以下の説明ではCFANetをPASCAL VOC 2012データセット(参考文献2;Everingham, M., Eslami, S. M. A., Van Gool, L., Williams, C. K. I., Winn, J. and Zisserman, A., “The Pascal Visual Object Classes”, (VOC) Challenge, International Journal of Computer Vision ,2010, p303-338)で評価した結果について説明する。評価指標については各クラスのIoUを平均した値(mIoU)を用いる。
[Experimental result]
In the following description, CFANet is referred to as the PASCAL VOC 2012 dataset (Reference 2; Everingham, M., Eslami, SMA, Van Gool, L., Williams, CKI, Winn, J. and Zisserman, A., “The Pascal Visual Object”. Classes ”, (VOC) Challenge, International Journal of Computer Vision, 2010, p303-338) will be explained. As the evaluation index, the average value (mIoU) of IoU of each class is used.

PASCAL VOC 2012は1,464枚のtrainデータ、1,449枚のvalidationデータ、および1,456枚のtestデータからなるデータセットである、その中に含まれるカテゴリは、背景クラスも含め21クラスである。PASCAL VOC 2012データセットに加え、確認ではPASCAL VOC 2011データセットから抽出した10,582枚の画像にアノテーションを施したSBD データセット(参考文献3;Hariharan, B., Arbelaez, P., Bourdev, L., Maji, S. and Malik, J., “Semantic Contours from Inverse Detectors”, ICCV ,2011)も学習に使用した。 PASCAL VOC 2012 is a data set consisting of 1,464 train data, 1,449 validation data, and 1,456 test data. The categories included in it are 21 classes including the background class. be. In addition to the PASCAL VOC 2012 dataset, the SBD dataset annotated 10,582 images extracted from the PASCAL VOC 2011 dataset (Reference 3; Hariharan, B., Arbelaez, P., Bourdev, L. ., Maji, S. and Malik, J., “Semantic Contours from Inverse Detectors”, ICCV, 2011) were also used for learning.

最適化にはSGDを用い、モーメンタムを0.9、重み減衰を0.0001に設定した。学習率のスケジューリングとして、参考文献1に倣い初期設定学習率に(1-iter/(total-iter)0.9を乗じる方法を用いた。事前学習としてSBDデータセットで50エポックの学習を行い、その重みを初期値としてPASCAL VOC 2012データセットで50エポックのファインチューニングを行った。事前学習、およびファインチューニングの学習率はそれぞれ0.0015、0.00015である。
データの水増しとして、水平方向のランダム反転[0.5,2.0]の範囲でのランダムスケーリング、513×513のサイズでのランダムクロッピングを適用した。単一スケールでの評価に加え、左右反転(Flip)、およびマルチスケール化(MS)した入力画像から得られる結果の評価も実施した。
SGD was used for optimization, and the momentum was set to 0.9 and the weight attenuation was set to 0.0001. As the learning rate scheduling, the method of multiplying the initial setting learning rate by (1-itter / (total-ita) 0.9 ) was used according to Reference 1. As pre-learning, 50 epochs were learned with the SBD data set. With the weight as the initial value, 50 epochs of fine tuning were performed on the PASCAL VOC 2012 data set. The pre-learning and fine tuning learning rates were 0.0015 and 0.00015, respectively.
Random scaling in the horizontal random inversion [0.5, 2.0] range and random cropping in a size of 513 × 513 was applied as data padding. In addition to single-scale evaluation, evaluation of results obtained from left-right inverted (Flip) and multi-scale (MS) input images was also performed.

CFANetに取り込んだ三つの要素に対する効果の切り分けをPASCAL VOC 2012 validationセットを用いて行う。まず、ベースラインとしてResNet50をBackboneとするFCNを評価し71.38%の精度を得た。これに対し、ResNetの最終ブロックに含まれる3つの3×3Convolution層のDilationを(4,8,16)とするMulti-Grid(参考文献4;Chen, L.-C., Papandreou, G., Schroff, F. and Adam, H., “Rethinking Atrous Convolution for Semantic Image Segmentation”, arXiv:1706.05587 ,2017)を適用した結果、精度が77.90%まで向上した。これは受容野が広がったために得られる効果であると解釈できる。 The effects on the three elements incorporated into CFANet are isolated using the PASCAL VOC 2012 validation set. First, FCN with ResNet50 as the backbone was evaluated as a baseline, and an accuracy of 71.38% was obtained. On the other hand, Multi-Grid (Reference 4; Chen, L.-C., Papandreou, G.,) having a Dilation of three 3 × 3 Convolution layers included in the final block of ResNet as (4,8,16). As a result of applying Schroff, F. and Adam, H., “Rethinking Atrous Convolution for Semantic Image Segmentation”, arXiv: 1706.05587, 2017), the accuracy improved to 77.90%. This can be interpreted as an effect obtained due to the expansion of the receptive field.

本実施形態の手法であるCFAモジュールの追加は性能を78.90%まで引き上げる。これは大域的なコンテクストを元に、CFAモジュールがチャンネル毎の重要度を適切に推定できた結果であると捉えられる。更に上述した補助Headを加えることで、CFAモジュール内の重みが効果的に学習され、性能が79.46%まで改善した。更なる向上のために、BackboneをResNet101に変更することで、性能は81.54%まで改善し、Flip、およびMSを用いた推論を行うことで最終的に82.33%の性能を達成した。 The addition of the CFA module, which is the method of this embodiment, raises the performance to 78.90%. This is considered to be the result of the CFA module being able to appropriately estimate the importance of each channel based on the global context. Further, by adding the above-mentioned auxiliary head, the weight in the CFA module was effectively learned, and the performance was improved to 79.46%. By changing Backbone to ResNet101 for further improvement, the performance was improved to 81.54%, and finally 82.33% was achieved by inference using Flip and MS. ..

図5は、PASACL VOC 2012 validationセットでの評価結果を示す図である。図5において、MGはMulti-Grid、CFAはCFAモジュール、Auxは補助Head、MS+Flipはマルチスケール、および左右反転入力である。 FIG. 5 is a diagram showing the evaluation results of the PASACL VOC 2012 validation set. In FIG. 5, MG is Multi-Grid, CFA is a CFA module, Aux is an auxiliary head, MS + Flip is a multiscale, and left-right inverted input.

[特徴類似度の可視化]
CFAモジュールの持つ効果を理解しやすくするために、可視化部30は、対象ピクセルとその他のピクセル間の特徴量空間におけるCosine類似度を可視化する。可視化を行う対象として、Headに入力される特徴量(図3のF)に焦点を当てる。また、比較対象としてFCNにおけるHead直前の特徴量に対する類似度も併せて可視化する。
[Visualization of feature similarity]
In order to make it easier to understand the effect of the CFA module, the visualization unit 30 visualizes the Cosine similarity in the feature space between the target pixel and other pixels. Focus on the feature amount (F 2 in FIG. 3) input to the head as the object to be visualized. In addition, as a comparison target, the degree of similarity to the feature amount immediately before Head in FCN is also visualized.

図6は、Cosine類似度の可視化結果例を示す図である。
図6の四角g600(上からg601~g603)は入力画像を表し、類似度計算の対象となるピクセルを十字(g641~g643)でマークしている。
図6の四角g610(上からg611~g613)は入力画像に対応する正解ラベルである。
図6の四角g620(上からg621~g623)、図6の四角g640(上からg631~g633)は、それぞれベースラインであるFCNと実施形態の手法CFANetの類似度マップを示している。
FIG. 6 is a diagram showing an example of visualization results of Cosine similarity.
The square g600 (g601 to g603 from the top) in FIG. 6 represents an input image, and the pixels to be calculated for similarity are marked with crosses (g641 to g643).
The square g610 (g611 to g613 from the top) in FIG. 6 is a correct label corresponding to the input image.
The squares g620 (g621 to g623 from the top) in FIG. 6 and the squares g640 (g631 to g633 from the top) in FIG. 6 show a similarity map between the baseline FCN and the method CFANet of the embodiment, respectively.

類似度マップは赤色に近いピクセル(g651~g656)は類似度が高く、青色に近い箇所(g661~g663)は類似度が低いことを表している。FCNは対象ピクセルと同じ物体領域に高い類似性を示しているものの、背景など同一物体以外の領域にも比較的高い類似度(緑~黄色)(g671~g673)を示してしまっている。
これに対して、実施形態のCFANetは対象領域と無関係な領域がより識別的になっている事が分かる。これはFCNが重要ではない特徴マップも他と等しい寄与度で扱ってしまうのに対し、CFANetではそのような特徴マップの寄与度は落とし、重要なチャンネルの寄与度を高められる効果を示している。この効果が性能の向上、更には弁別性の改善をもたらしている。
In the similarity map, pixels close to red (g651 to g656) have high similarity, and pixels close to blue (g661 to g663) have low similarity. Although FCN shows high similarity to the same object area as the target pixel, it also shows relatively high similarity (green to yellow) (g671 to g673) to areas other than the same object such as the background.
On the other hand, in CFANet of the embodiment, it can be seen that the region unrelated to the target region is more discriminative. This shows the effect that FCN treats non-important feature maps with the same contribution as others, while CFANet reduces the contribution of such feature maps and increases the contribution of important channels. .. This effect leads to an improvement in performance and an improvement in discrimination.

[既存手法との性能比較]
CFANetの性能を他の既存手法とも比較した。比較はPASCAL VOC 2012 のtestセットで行った。このtestセットは入力画像のみが与えられており、自身のモデルで推論した結果を評価サーバに送ることで評価されるという公平な評価方法をとっている。testセットでの評価のために、SBD データセットで学習したモデルを、PASCALVOC 2012 のtrain+validationセットでファインチューニングした。図7にその結果を示す。図7は、PASACL VOC 2012 test setでの評価結果を示す図である。実施形態のCFANetは既存手法を上回る84.5%の精度を達成した。
[Performance comparison with existing methods]
The performance of CFANet was compared with other existing methods. Comparisons were made with the PASCAL VOC 2012 test set. This test set is given only the input image, and adopts a fair evaluation method in which the result inferred by its own model is sent to the evaluation server for evaluation. Models trained on the SBD dataset were fine-tuned on the PASCALVOC 2012 train + assessment set for evaluation on the test set. The result is shown in FIG. FIG. 7 is a diagram showing the evaluation results in the PASACL VOC 2012 test set. The CFA Net of the embodiment achieved an accuracy of 84.5%, which exceeds the existing method.

以上のように、本実施形態では、チャンネルレベルのアテンションを用いて特徴マップの重み付けを行う機構を持つCFANetを用いた。実験結果から、CFANetは従来手法よりも特徴マップを弁別的に扱えている事が特徴マップの可視化によって確認できた。また、弁別性の改善だけでなく性能面でも大きな向上を達成し、PASCAL VOC 2012 testセットにおいて既存手法を上回る精度を達成することができた。 As described above, in the present embodiment, CFANet having a mechanism for weighting the feature map using attention at the channel level is used. From the experimental results, it was confirmed by visualizing the feature map that CFANet can handle the feature map more discriminatively than the conventional method. In addition to the improvement of discriminability, we also achieved a great improvement in performance, and we were able to achieve accuracy higher than the existing method in the PASCAL VOC 2012 test set.

ここで、図2を参照して、コンテクストを取り入れるネットワーク構造の例を、さらに説明する。ここでは、チャンネル次元の依存性に注目している。
画像g110の特徴量をチャンネル方向に結合する構造では、バックボーン(Backbone)g111によって画像から抽出された特徴量がコンテクストモジュールg112に入力される。この構造では、特徴量を重要度にかかわらずチャンネル方向に結合する。
Here, with reference to FIG. 2, an example of a network structure incorporating a context will be further described. Here, we focus on the channel dimension dependency.
In the structure in which the features of the image g110 are combined in the channel direction, the features extracted from the image by the backbone g111 are input to the context module g112. In this structure, features are combined in the channel direction regardless of their importance.

バックボーンは、例えばImageNet(参考文献5;Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L., “Imagenet: A large-scale hierarchical image database”, In: CVPR09 ,2009)で事前に学習したResNet(参考文献1)を用いる。本実施形態では、例えば、PSPNetに倣い、最初の7×7畳み込みを3×3畳み込み層に置き換え、ResNetの最後の2つのブロックでは拡張された畳み込みを使用するため,特徴マップの出力ストライドは8となる。 The backbone is, for example, ImageNet (Reference 5; Deng, J., Dong, W., Socher, R., Li, LJ, Li, K., Fei-Fei, L., “Imagenet: A large-scale hierarchical image”. Use ResNet (Reference 1) learned in advance in database ”, In: CVPR09, 2009). In this embodiment, for example, following PSPNet, the first 7x7 convolution is replaced with a 3x3 convolution layer, and the last two blocks of ResNet use the expanded convolution, so the output stride of the feature map is 8. It becomes.

画像g120のコンテクストを残差特徴量として取り込む構造では、バックボーンg121によって画像から抽出された特徴量は、コンテクストモジュールg122と演算部g123に入力される。この構造では、重要度な特徴量を強調してチャンネル方向に結合する。なお、演算部g123(Element-wise summation)は、バックボーンg121とコンテクストモジュールg122で得られた特徴量の要素毎の加算を行う。すなわち、残差形式は、ピクセル単位のコンテクストを集約することで、各ピクセルの表現を拡張増強している。 In the structure that captures the context of the image g120 as the residual feature amount, the feature amount extracted from the image by the backbone g121 is input to the context module g122 and the calculation unit g123. In this structure, important features are emphasized and combined in the channel direction. The arithmetic unit g123 (Element-wise summation) adds the feature quantities obtained by the backbone g121 and the context module g122 for each element. That is, the residual format expands and enhances the expression of each pixel by aggregating the context of each pixel.

画像g130のコンテクストを考慮して特徴マップを増強・減衰双方向に変調する構造では、バックボーンg131によって画像から抽出された特徴量がコンテクストモジュールg132と演算部g133に入力される。この構造では、重要度の高い特徴量を強調し重要度の低い特徴量を減衰させてチャンネル方向に結合する。なお、演算部g133(Channel-wise multiplication)は、チャンネル毎の積を求める。この構成では、特徴に注目することで、各特徴マップの重みを調整することができる。このため、この構成では、関連する特徴をより識別しやすくすることができる。 In the structure in which the feature map is augmented / attenuated in both directions in consideration of the context of the image g130, the feature amount extracted from the image by the backbone g131 is input to the context module g132 and the calculation unit g133. In this structure, the features with high importance are emphasized and the features with low importance are attenuated and combined in the channel direction. The arithmetic unit g133 (Channel-wise multiplication) obtains the product for each channel. In this configuration, the weight of each feature map can be adjusted by focusing on the features. Therefore, in this configuration, it is possible to make it easier to identify related features.

セマンティックセグメンテーションの目的は、各ピクセルに意味的なカテゴリを割り当てることである。セマンティックセグメンテーションでは、カテゴリの数が増えれば増えるほどクラスが曖昧になる。このためモデルは、より高品質な画像セグメンテーションのために、より識別性の高い特徴を選択するようにモデルを学習する必要がある。
しかしながら、特徴量をチャンネル方向に結合する構造(g110)では、これらの集約された特徴が、ヘッドネットワークによって等しく重要に扱われるため、より特徴的な特定の特徴を識別することは困難である。
The purpose of semantic segmentation is to assign a semantic category to each pixel. In semantic segmentation, the larger the number of categories, the more ambiguous the class. For this reason, the model needs to be trained to select more discriminating features for higher quality image segmentation.
However, in the structure (g110) in which the features are combined in the channel direction, it is difficult to identify a more characteristic specific feature because these aggregated features are treated equally and importantly by the head network.

最新のコンテキスト・モデリング・アプローチでは、ピクセルレベルの類似性マップを利用して,バックボーン特徴を改良している。コンテクストを残差特徴量として取り込む構造(g120)では、残差形式を採用している。しかしながら、この構造では、選択された特徴によって強化されるだけなので、特徴の識別性が制限される。 The latest context modeling approach utilizes pixel-level similarity maps to improve backbone features. In the structure (g120) that captures the context as the residual feature amount, the residual format is adopted. However, this structure limits the distinctiveness of the features as they are only enhanced by the selected features.

このため、本実施形態では図3の構成のCFAモジュール(Context-aware Feature Attention Network(CFANet))を用いるようにした。
CFANetでは、コンテクストを意識した個々の特徴の重要度を適応的に調整するCFA(Contextaware Feature Attention)モジュールを導入した。グローバルなコンテクストを利用することは、正確なセグメンテーションに不可欠である。このため、本実施形態では、グローバルアベレージプーリング(GAP)を用いて,グローバルな特徴を集約し、チャンネルワイズアテンションを直接生成するようにした。
この構成によれば、図2の画像g130に示すように、個々の特徴マップを対応する注目度の重みで強めたり弱めたりすることができる。これにより、本実施形態によれば、注目度の重みは正の値を取ることができるので、他の手法よりも各特徴をより区別して扱うことができる。
Therefore, in this embodiment, the CFA module (Context-aware Feature Attention Network (CFANet)) having the configuration shown in FIG. 3 is used.
CFANet has introduced a CFA (Contextaware Feature Attention) module that adaptively adjusts the importance of individual features that are context conscious. Utilizing a global context is essential for accurate segmentation. Therefore, in this embodiment, global average pooling (GAP) is used to aggregate global features and directly generate channelwise attention.
According to this configuration, as shown in image g130 of FIG. 2, individual feature maps can be strengthened or weakened by the corresponding attention weights. As a result, according to the present embodiment, the weight of attention can take a positive value, so that each feature can be treated more distinctly than other methods.

次に、図3を参照して、CFANetの概略構成について、さらに説明する。
バックボーンネットワークの個々のフィーチャーマップは、入力画像に存在するオブジェクトやスタッフのある種の特徴を表している。その中でも対象となる物体のカテゴリに対応する特徴的なパターンを区別するためには、シーンのコンテクストに基づいて対応する特徴をより重視する必要がある。このため、本実施形態では、このような再優先順位付けを行うために、CFAモジュールを導入した。
Next, the schematic configuration of CFANet will be further described with reference to FIG.
The individual feature maps of the backbone network represent certain features of the objects and staff present in the input image. Among them, in order to distinguish the characteristic patterns corresponding to the category of the target object, it is necessary to place more emphasis on the corresponding characteristics based on the context of the scene. Therefore, in this embodiment, a CFA module is introduced in order to perform such re-prioritization.

取得された画像X(g210)の次元は、3×H×Wである。なお、3はチャンネル数、Hは特徴マップの高さを表し、Wは特徴マップの幅を表す。
上述したように、バックボーンg211には例えばResNetを用いる。バックボーンg211は、バックボーン特徴量F(∈R(Rは二重線文字で実数全体の集合)C×H×W)(g221)を抽出する。なお、Cはチャンネル数である。
The dimension of the acquired image X (g210) is 3 × H 0 × W 0 . Note that 3 represents the number of channels, H represents the height of the feature map, and W represents the width of the feature map.
As described above, for example, ResNet is used for the backbone g211. The backbone g211 extracts the backbone feature quantity F 0 (∈ R (R is a set of all real numbers in double line characters) C × H × W ) (g221). Note that C is the number of channels.

CFAモジュールg220は、バックボーン特徴量Fを、畳み込み層によって特徴マップF(∈RC×H×W)g223に変換する。
次に、CFAモジュールg220は、特徴マップFに対して1×1の畳み込み(g224)を行って、修正特徴量F1’を算出する。
The CFA module g220 converts the backbone feature amount F 0 into the feature map F 1 (∈ RC × H × W ) g223 by the convolution layer.
Next, the CFA module g220 performs 1 × 1 convolution (g224) with respect to the feature map F1 to calculate the modified feature amount F1'.

次に、CFAモジュールg220は、修正特徴量F1’に対し全体平均プーリング(GAP(Global Average Pooling))処理を行って(g225)、チャンネル毎のアテンションa(C×1×1)(g226)を生成する。 Next, the CFA module g220 performs global average pooling (GAP (Global Average Pooling)) processing on the modified feature amount F1'(g225) to obtain attention a (C × 1 × 1) (g226) for each channel. Generate.

次に、CFAモジュールg220は、バックボーン特徴量Fとアテンションaを用いて、グローバルな特徴を集約しチャンネルワイズアテンションを生成する(g227)。この処理では、アテンションaとバックボーン特徴量Fをチャンネル毎に掛け合わせて、重み付けされた特徴量F(∈RC×H×W)(g228)を生成している。 Next, the CFA module g220 aggregates global features and generates channelwise attention using the backbone feature amount F 0 and attention a (g227). In this process, the attention a and the backbone feature amount F 0 are multiplied for each channel to generate a weighted feature amount F 2 (∈ RC × H × W ) (g228).

補助Head32(g232)は、修正特徴量F1’に対して、例えば畳み込みとアップサンプリングを行って出力Y’(Cout×H×W)(g244)を算出して出力する。 The auxiliary Head 32 ( g232 ) calculates and outputs an output Y'(Cout × H0 × W0) ( g244 ) by, for example, convolution and upsampling the modified feature amount F1'.

Head31(g231)は、重み付けされた特徴量Fに対して、例えば畳み込みとアップサンプリングを行って出力Y(Cout×H×W)(g241)を算出して出力する。 The Head 31 ( g231 ) calculates and outputs an output Y (Cout × H0 × W0 ) ( g241 ) by, for example, convolution and upsampling the weighted feature amount F2.

画像識別装置1は、教師ラベルT(Cout×H×W)(g242)と出力Y(g241)とを比較して損失Lmainを算出する。また、画像識別装置1は、教師ラベルT(Cout×H×W)(g242)と出力Y’(g244)とを比較して損失Lauxを算出する。 The image identification device 1 calculates the loss Lmain by comparing the teacher label T (Cout × H0 × W0) ( g242 ) with the output Y ( g241 ). Further, the image identification device 1 calculates the loss Laux by comparing the teacher label T (Cout × H0 × W0) ( g242 ) with the output Y'( g244 ).

次に、CFANetをシンプルな形で表現した図4を参照して、CFANetを簡略化した計算グラフについて、さらに説明する。なお、図4では、活性化関数がすべて線形であると仮定し、図3の畳み込み層(g224等)を省略している。なお、図4では、簡略化のため,図3の畳み込み層(g224等)を省略しているが、説明において一般性は失われていない。 Next, with reference to FIG. 4 in which CFANet is expressed in a simple form, a calculation graph in which CFANet is simplified will be further described. In FIG. 4, it is assumed that all the activation functions are linear, and the convolutional layer (g224, etc.) in FIG. 3 is omitted. In FIG. 4, the convolutional layer (g224, etc.) in FIG. 3 is omitted for simplification, but the generality is not lost in the explanation.

バックボーンg310には、入力画像Xが入力される。バックボーンg310は、重み付けWを用いて、畳み込みg341を行って、バックボーン特徴量Fを算出する。 The input image X is input to the backbone g310. The backbone g310 uses the weighting W 0 to perform convolution g341 to calculate the backbone feature amount F 0 .

CFAモジュールg320は、重み付けWを用いて、特徴マップFに対して畳み込みg344を行って、修正特徴量Fを算出する。
CFAモジュールg320は、GAP処理(g344)によってアテンションaを算出する。
CFAモジュールg320は、アテンションaとバックボーン特徴量Fを用いてチャンネル毎の積を求めて、重み付けされた特徴量Fを算出する(g345)。
なお、CFAモジュールg320は、特徴マップの解像度を維持するために、ダウンサンプリングを行わない。
The CFA module g320 performs a convolution g344 with respect to the feature map F0 using the weighting W1 to calculate the modified feature amount F1.
The CFA module g320 calculates the attention a by GAP processing (g344).
The CFA module g320 calculates the weighted feature amount F 2 by obtaining the product for each channel using the attention a and the backbone feature amount F 0 (g345).
The CFA module g320 does not perform downsampling in order to maintain the resolution of the feature map.

Head31(g330)は、重み付けされた特徴量Fに対して、重み付けWを用いて、畳み込み(g346)を行って出力Yを算出して出力する。
補助Head32(g340)は、修正特徴量Fに対して、重み付けW’を用いて、畳み込み(g347)を行って出力Y’を算出して出力する。
The Head 31 (g330) performs convolution ( g346 ) with respect to the weighted feature amount F2 by using the weighting W2 to calculate and output the output Y.
The auxiliary Head 32 (g340) performs convolution (g347) with respect to the modified feature amount F1 using the weighting W 2'to calculate and output the output Y'.

なお、図3、図4で説明した特徴量、アテンション等の算出に用いる式や算出方法は上述したとおりである。 The formulas and calculation methods used for calculating the features, attention, etc. described in FIGS. 3 and 4 are as described above.

なお、本実施形態では、Head31と補助Head32には、畳み込み層とドロップアウト層からなるネットワークを採用した。また、本実施形態では、最適化を容易にするために、例えばPSPNetで提案されたディープ・スーパービジョン・ヘッドをResNetの最後から2番目のブロックに採用した。本実施形態では、このように、Lmain、Laux、Ldsの3つの損失を計算し、純損失を例えば次式(1)のように算出する。なお、損失Ldsは、バックボーンの中間層の特徴量を用いたセグメンテーション出力に対する損失で、PSPNetで提案されたものである。 In this embodiment, a network composed of a convolution layer and a dropout layer is adopted for the Head 31 and the auxiliary Head 32. Further, in the present embodiment, in order to facilitate optimization, for example, the deep supervision head proposed by PSP Net is adopted as the penultimate block of ResNet. In this embodiment, the three losses of L main , Laux , and L ds are calculated in this way, and the net loss is calculated, for example, by the following equation (1). The loss L ds is a loss for the segmentation output using the feature amount of the backbone intermediate layer, and is proposed by PSP Net.

Figure 2022022139000011
Figure 2022022139000011

なお、式(10)では、PSPNetに従って損失Ldsの重みを0.4に設定しているが重みはこれに限らない。
なお、画像識別装置1は、損失関数または総損失を用いて、重み係数であるアテンションの学習を行う。なお、画像識別装置1は、損失関数または総損失を用いて、第2畳込層24が用いる重みと、第3畳込層25が用いる重みと、第1畳込層23とHead31が用いる重みと、第4畳込層27と補助Head32が用いる重みの学習を行うようにしてもよい。
In the equation (10), the weight of the loss L ds is set to 0.4 according to PSP Net, but the weight is not limited to this.
The image identification device 1 learns attention, which is a weighting coefficient, by using a loss function or total loss. The image identification device 1 uses the loss function or the total loss to use the weights used by the second convolutional layer 24, the weights used by the third convolutional layer 25, and the weights used by the first convolutional layer 23 and the head 31. And, the weights used by the fourth convolutional layer 27 and the auxiliary Head 32 may be learned.

[処理手順]
次に、画像識別装置1の処理手順例を説明する。
図8は、本実施形態に係る画像識別装置1の処理手順例のフローチャートである。
[Processing procedure]
Next, an example of the processing procedure of the image identification device 1 will be described.
FIG. 8 is a flowchart of a processing procedure example of the image identification device 1 according to the present embodiment.

(ステップS1)画像取得部11は、画像を取得する。
(ステップS2)特徴量抽出部12は、重み付けWを用いて、取得された画像に対して畳み込みを行ってバックボーン特徴量Fを抽出する。
(Step S1) The image acquisition unit 11 acquires an image.
(Step S2) The feature amount extraction unit 12 uses the weighting W 0 to convolve the acquired image to extract the backbone feature amount F 0 .

(ステップS3)第2畳込層24は、重み付けWを用いて、バックボーン特徴量Fに対して畳み込みを行って、特徴マップFを算出する。
(ステップS4)第3畳込層25は、特徴マップFに対して畳み込みを行って、修正特徴量F’を算出する。
(Step S3) The second convolution layer 24 uses the weighting W 1 to convolve the backbone feature amount F 0 to calculate the feature map F 1 .
(Step S4) The third convolution layer 25 convolves the feature map F 1 to calculate the modified feature amount F 1 '.

(ステップS5)GAP部26は、修正特徴量F1’に対し全体平均プーリング処理を行って、チャンネル毎のアテンションaを算出する。 (Step S5) The GAP unit 26 performs an overall average pooling process on the modified feature amount F1'to calculate the attention a for each channel.

(ステップS6)乗算部22は、アテンションaとバックボーン特徴量Fをチャンネル毎に掛け合わせて、重み付けされた特徴量Fを算出する。 (Step S6) The multiplication unit 22 calculates the weighted feature amount F 2 by multiplying the attention a and the backbone feature amount F 0 for each channel.

(ステップS7)第1畳込層23とHead31は、重み付けされた特徴量Fに対して、例えば畳み込みとアップサンプリングを行って出力Yを算出して出力する。Head31は、出力Yを用いて損失Lmainを算出する。 (Step S7) The first convolution layer 23 and the Head 31 calculate and output an output Y by, for example, convolution and upsampling the weighted feature amount F2. The Head 31 calculates the loss L mine using the output Y.

(ステップS8)第4畳込層27と補助Head32は、修正特徴量F’に対して例えば畳み込みとアップサンプリングを行って出力Y’を算出して出力する。続けて、補助Head32は、出力Y’を用いて損失Lauxを算出する。 (Step S8) The fourth convolution layer 27 and the auxiliary head 32 perform, for example, convolution and upsampling with respect to the modified feature amount F'to calculate and output an output Y'. Subsequently, the auxiliary Head 32 calculates the loss Laux using the output Y'.

(ステップS9)画像識別装置1は、損失Lmainと損失Lauxから、全体の損失関数を算出し、算出した損失関数Lを用いてアテンションを学習する。 (Step S9) The image identification device 1 calculates the entire loss function from the loss L mine and the loss Laux , and learns the attention using the calculated loss function L.

なお、上述した処理手順は一例であり、これに限らない。例えば、いくつかの処理は平衡して行われてもよく、処理順番が逆であってもよい。また、学習が済んでいる場合、損失、損失関数の算出および学習の処理は行わなくてもよい。 The above-mentioned processing procedure is an example and is not limited to this. For example, some processes may be performed in equilibrium and the order of processes may be reversed. Further, when the learning has been completed, it is not necessary to perform the loss, the calculation of the loss function, and the learning process.

以上のように、本実施形態では、セマンティックセグメンテーションのためのフィーチャーアテンションのアイデアを検討し、グローバルなコンテクストに基づいて対応するフィーチャーマップの重要性を調整するCFA(Context-aware Feature Attention)モジュールを備えるようにした。なお、FCNとCFAモジュールを組み合わせることでCFANetを構築した。
これにより、本実施形態によれば、CFAモジュールを用いたことによって、特徴マップ間の識別性を向上させることができた。
As described above, the present embodiment includes a CFA (Context-aware Feature Attention) module that examines the idea of feature attention for semantic segmentation and adjusts the importance of the corresponding feature map based on the global context. I did it. CFA Net was constructed by combining FCN and CFA module.
As a result, according to the present embodiment, the distinctiveness between the feature maps could be improved by using the CFA module.

また、本実施形態によれば、セマンティックセグメンテーションの精度を向上でき、推定した重みが特徴マップの重要度を示していることを実験的に示すことができた。また、本実施形態によれば、特徴マップ間の分別性を向上でき、ピクセル間の特徴量の類似度を比較した場合に、従来よりも領域間の区別が明瞭につくようになった。 In addition, according to the present embodiment, the accuracy of semantic segmentation can be improved, and it can be experimentally shown that the estimated weight indicates the importance of the feature map. Further, according to the present embodiment, the separability between the feature maps can be improved, and when the similarity of the feature quantities between the pixels is compared, the distinction between the regions becomes clearer than in the conventional case.

また、本実施形態によれば、ピクセル間の分別性が改善したことにより、視覚的な判断が容易になる。本実施形態によれば、判断根拠の理解、誤検知の原因解析等に応用できる。本実施形態によれば、特徴マップの重要度が分かるため、重要度の高いマップのみを抽出することで計算時間を短縮できる。本実施形態によれば、重要度をスパースにすることでチャンネルの枝狩りへ応用でき得る。本実施形態によれば、重要度の分布が学習データを増やす程に先鋭化される傾向がある(データが増える程,重要度の確信度が向上する)。本実施形態によれば、この傾向を利用することで、新しいデータを入力し分布を確認することで、そのデータを教師データとして教示すべきかを判断することができる。これにより、本実施形態によれば、教示のコストを抑えることができる。 Further, according to the present embodiment, the improvement in the separability between pixels facilitates visual judgment. According to this embodiment, it can be applied to understanding the basis of judgment, analyzing the cause of false positives, and the like. According to this embodiment, since the importance of the feature map is known, the calculation time can be shortened by extracting only the map having high importance. According to this embodiment, it can be applied to channel branch hunting by setting the importance to sparse. According to this embodiment, the distribution of importance tends to be sharpened as the training data increases (the more data, the higher the certainty of importance). According to the present embodiment, by utilizing this tendency, by inputting new data and confirming the distribution, it is possible to determine whether the data should be taught as teacher data. Thereby, according to the present embodiment, the cost of teaching can be suppressed.

特徴マップ(チャンネル)毎の重要度を算出するためのネットワーク構造は、上述した構成に限らず、他の構成であってもよい。なお、上述した実施例では、補助分類ネットワークの学習をメインタスクと全く同じタスクで学習させたが、他のタスク(シーン分類,エッジ検出,キャプション生成など)と組み合わせた場合にも適切な重要度が算出できる。また、CFAモジュールやCFAモジュールの各機能部等を挿入する位置は、上述した位置に限らず他の位置であってもよい。また、上述した例では、解釈性の向上のために重要度は正の値に限定したが。負の値を持たせてもよい。 The network structure for calculating the importance of each feature map (channel) is not limited to the above-mentioned configuration, and may be another configuration. In the above-mentioned embodiment, the learning of the auxiliary classification network is trained by the same task as the main task, but the importance is appropriate even when combined with other tasks (scene classification, edge detection, caption generation, etc.). Can be calculated. Further, the position for inserting each functional unit of the CFA module or the CFA module is not limited to the above-mentioned position and may be another position. Also, in the above example, the importance is limited to a positive value in order to improve the interpretability. It may have a negative value.

なお、本発明における画像識別装置1の機能の全てまたは一部を実現するためのプログラムをコンピュータ読み取り可能な記録媒体に記録して、この記録媒体に記録されたプログラムをコンピュータシステムに読み込ませ、実行することにより画像識別装置1が行う処理の全てまたは一部を行ってもよい。なお、ここでいう「コンピュータシステム」とは、OSや周辺機器等のハードウェアを含むものとする。また、「コンピュータシステム」は、ホームページ提供環境(あるいは表示環境)を備えたWWWシステムも含むものとする。また、「コンピュータ読み取り可能な記録媒体」とは、フレキシブルディスク、光磁気ディスク、ROM、CD-ROM等の可搬媒体、コンピュータシステムに内蔵されるハードディスク等の記憶装置のことをいう。さらに「コンピュータ読み取り可能な記録媒体」とは、インターネット等のネットワークや電話回線等の通信回線を介してプログラムが送信された場合のサーバやクライアントとなるコンピュータシステム内部の揮発性メモリ(RAM)のように、一定時間プログラムを保持しているものも含むものとする。 A program for realizing all or part of the functions of the image identification device 1 in the present invention is recorded on a computer-readable recording medium, and the program recorded on the recording medium is read into a computer system and executed. By doing so, all or part of the processing performed by the image identification device 1 may be performed. The term "computer system" as used herein includes hardware such as an OS and peripheral devices. Further, the "computer system" shall also include a WWW system provided with a homepage providing environment (or display environment). Further, the "computer-readable recording medium" refers to a portable medium such as a flexible disk, a magneto-optical disk, a ROM, or a CD-ROM, and a storage device such as a hard disk built in a computer system. Furthermore, a "computer-readable recording medium" is a volatile memory (RAM) inside a computer system that serves as a server or client when a program is transmitted via a network such as the Internet or a communication line such as a telephone line. In addition, it shall include those that hold the program for a certain period of time.

また、上記プログラムは、このプログラムを記憶装置等に格納したコンピュータシステムから、伝送媒体を介して、あるいは、伝送媒体中の伝送波により他のコンピュータシステムに伝送されてもよい。ここで、プログラムを伝送する「伝送媒体」は、インターネット等のネットワーク(通信網)や電話回線等の通信回線(通信線)のように情報を伝送する機能を有する媒体のことをいう。また、上記プログラムは、前述した機能の一部を実現するためのものであってもよい。さらに、前述した機能をコンピュータシステムにすでに記録されているプログラムとの組み合わせで実現できるもの、いわゆる差分ファイル(差分プログラム)であってもよい。 Further, the program may be transmitted from a computer system in which this program is stored in a storage device or the like to another computer system via a transmission medium or by a transmission wave in the transmission medium. Here, the "transmission medium" for transmitting a program refers to a medium having a function of transmitting information, such as a network (communication network) such as the Internet or a communication line (communication line) such as a telephone line. Further, the above program may be for realizing a part of the above-mentioned functions. Further, a so-called difference file (difference program) may be used, which can realize the above-mentioned function in combination with a program already recorded in the computer system.

以上、本発明を実施するための形態について実施形態を用いて説明したが、本発明はこうした実施形態に何等限定されるものではなく、本発明の要旨を逸脱しない範囲内において種々の変形および置換を加えることができる。 Although the embodiments for carrying out the present invention have been described above using the embodiments, the present invention is not limited to these embodiments, and various modifications and substitutions are made without departing from the gist of the present invention. Can be added.

1…画像識別装置、11…画像取得部、12…特徴量抽出部、10…セマンティックセグメンテーション装置、30…可視化部、21…特徴量取得部、22…乗算部、23…第1畳込層、24…第2畳込層、25…第3畳込層、26…GAP部、27…第4畳込層、31…Head、32…補助Head、33…教師ラベル提供部、34…類似度マップ作成部 1 ... image identification device, 11 ... image acquisition unit, 12 ... feature amount extraction unit, 10 ... semantic segmentation device, 30 ... visualization unit, 21 ... feature amount acquisition unit, 22 ... multiplication unit, 23 ... first convolution layer, 24 ... 2nd folding layer, 25 ... 3rd folding layer, 26 ... GAP part, 27 ... 4th folding layer, 31 ... Head, 32 ... Auxiliary Head, 33 ... Teacher label providing part, 34 ... Similarity map Creation department

Claims (6)

画像(X)を取得する画像取得部と、
取得された前記画像の複数の特徴量を抽出する特徴量抽出部と、
前記複数の特徴量のそれぞれについて特徴マップ(X)を作成する特徴マップ作成部と、
前記特徴マップごとに特徴の重要度を表現した任意の正の値である重み係数(a)を乗算する乗算部と、
を備える画像識別装置。
The image acquisition unit that acquires the image (X) and
A feature amount extraction unit that extracts a plurality of feature amounts of the acquired image, and a feature amount extraction unit.
A feature map creation unit that creates a feature map (X i ) for each of the plurality of feature quantities, and a feature map creation unit.
A multiplication unit that multiplies the weighting factor ( ai ), which is an arbitrary positive value expressing the importance of the feature for each feature map, and
An image identification device comprising.
重み係数(a)は、
前記画像(X)を畳み込み、畳み込み層を作成する処理と、
前記畳み込み層にReLU関数を適用し特徴量Fを算出する処理と、
特徴量FにGlobal Average Pooling(GAP)層を適用する処理とから計算される
請求項1に記載の画像識別装置。
The weighting factor ( ai ) is
The process of convolving the image (X) to create a convolution layer,
The process of applying the ReLU function to the convolution layer to calculate the feature amount F, and
The image identification apparatus according to claim 1, which is calculated from a process of applying a Global Average Pooling (GAP) layer to a feature amount F.
画像を取得する画像取得部と、
取得された前記画像の複数の特徴量を抽出する特徴量抽出部と、
前記複数の特徴量それぞれに対して畳み込み処理によって特徴マップを作成する作成部と、
前記特徴マップに対して畳み込み処理によって修正特徴量を算出し、算出した前記修正特徴量に対して全体平均プーリング処理を行ってコンテクストを集約し、チャンネル毎の重み係数であるアテンションを生成し、生成された前記アテンションを前記特徴マップに乗算することで、前記複数の特徴マップに増強と減衰の重み付けを行って重み付けした特徴量を生成する重付特徴量生成部と、
を備える画像識別装置。
The image acquisition unit that acquires images and
A feature amount extraction unit that extracts a plurality of feature amounts of the acquired image, and a feature amount extraction unit.
A creation unit that creates a feature map by convolution processing for each of the plurality of feature quantities,
The modified features are calculated by the convolution process for the feature map, the overall average pooling process is performed on the calculated modified features, the contexts are aggregated, and the attention, which is the weighting coefficient for each channel, is generated and generated. A weighted feature amount generation unit that generates a weighted feature amount by multiplying the feature map by the attention given to the feature map by weighting the plurality of feature maps with enhancement and attenuation.
An image identification device comprising.
前記重み付けした特徴量に対して畳み込みとアップサンプリング処理を行って出力を算出し、算出した前記出力と教師データとを比較して第1損失を算出する第1損失算出部と、
前記特徴マップに対して畳み込みとアップサンプリング処理を行って出力を算出し、算出した前記出力と教師データとを比較して第2損失を算出する第2損失算出部と、
をさらに備え、
前記第1損失と前記第2損失から、全体の損失関数を算出し、算出した前記損失関数を用いて前記重み係数の学習を行う、
請求項3に記載の画像識別装置。
A first loss calculation unit that calculates an output by performing convolution and upsampling processing on the weighted feature amount, compares the calculated output with the teacher data, and calculates the first loss.
A second loss calculation unit that calculates the output by performing convolution and upsampling processing on the feature map, and compares the calculated output with the teacher data to calculate the second loss.
Further prepare
The entire loss function is calculated from the first loss and the second loss, and the weighting coefficient is learned using the calculated loss function.
The image identification device according to claim 3.
ニューラルネットワークシステムを使用して画像(X)のセマンティックセグメンテーションを行う方法であって、
前記画像を入力する処理と、
取得された前記画像の複数の特徴量を抽出する処理と、
前記画像が有する複数の特徴量のそれぞれについて特徴マップ(X)を作成する処理と、
特徴マップごとに特徴の重要度を表現した任意の正の値である重み係数(a)を乗算する処理と
を有するセマンティックセグメンテーションを行う方法。
A method of performing semantic segmentation of an image (X) using a neural network system.
The process of inputting the image and
Processing to extract a plurality of acquired feature quantities of the image and
A process of creating a feature map ( Xi ) for each of the plurality of features of the image, and
A method of performing semantic segmentation with a process of multiplying a weighting factor ( ai ), which is an arbitrary positive value expressing the importance of a feature for each feature map.
コンピュータに、
画像を取得させ、
取得された前記画像の複数の特徴量を抽出させ、
前記画像が有する複数の特徴量のそれぞれについて特徴マップ(X)を作成させ、
前記特徴マップごとに特徴の重要度を表現した任意の正の値である重み係数(a)を乗算させる、
プログラム。
On the computer
Get the image,
A plurality of features of the acquired image are extracted, and the images are extracted.
A feature map ( Xi ) is created for each of the plurality of features of the image.
Multiply each feature map by a weighting factor ( ai ) which is an arbitrary positive value expressing the importance of the feature.
program.
JP2021118014A 2020-07-22 2021-07-16 Image identification device, method of performing semantic segmentation, and program Pending JP2022022139A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
DE102021118734.6A DE102021118734A1 (en) 2020-07-22 2021-07-20 Image identification device, method for performing semantic segregation and program
US17/380,129 US11587345B2 (en) 2020-07-22 2021-07-20 Image identification device, method for performing semantic segmentation, and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2020125627 2020-07-22
JP2020125627 2020-07-22

Publications (1)

Publication Number Publication Date
JP2022022139A true JP2022022139A (en) 2022-02-03

Family

ID=80220779

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021118014A Pending JP2022022139A (en) 2020-07-22 2021-07-16 Image identification device, method of performing semantic segmentation, and program

Country Status (1)

Country Link
JP (1) JP2022022139A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117058473A (en) * 2023-10-12 2023-11-14 深圳易行机器人有限公司 Warehouse material management method and system based on image recognition

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117058473A (en) * 2023-10-12 2023-11-14 深圳易行机器人有限公司 Warehouse material management method and system based on image recognition
CN117058473B (en) * 2023-10-12 2024-01-16 深圳易行机器人有限公司 Warehouse material management method and system based on image recognition

Similar Documents

Publication Publication Date Title
Zhu et al. Learning statistical texture for semantic segmentation
US10943145B2 (en) Image processing methods and apparatus, and electronic devices
US20210264144A1 (en) Human pose analysis system and method
CN115699088A (en) Generating three-dimensional object models from two-dimensional images
CN115147891A (en) System, method, and storage medium for generating synthesized depth data
KR102311796B1 (en) Method and Apparatus for Deblurring of Human Motion using Localized Body Prior
CN117253044B (en) Farmland remote sensing image segmentation method based on semi-supervised interactive learning
Zhang et al. Multiresolution attention extractor for small object detection
CN115410081A (en) Multi-scale aggregated cloud and cloud shadow identification method, system, equipment and storage medium
Liao et al. FERGCN: facial expression recognition based on graph convolution network
Lee et al. Background subtraction using the factored 3-way restricted Boltzmann machines
JP2022022139A (en) Image identification device, method of performing semantic segmentation, and program
Dey Python image processing cookbook: over 60 recipes to help you perform complex image processing and computer vision tasks with ease
Chaitra et al. An approach for copy-move image multiple forgery detection based on an optimized pre-trained deep learning model
Wang et al. Perception-guided multi-channel visual feature fusion for image retargeting
US11587345B2 (en) Image identification device, method for performing semantic segmentation, and storage medium
Adriyanto et al. Classification of dog and cat images using the CNN method
CN112668643B (en) Semi-supervised significance detection method based on lattice tower rule
KR20150094108A (en) Method for generating saliency map based background location and medium for recording the same
Wang et al. Sonar image detection based on multi-scale multi-column convolution neural networks
CN113516670A (en) Non-mode image segmentation method and device with enhanced feedback attention
Liu et al. UnitModule: A lightweight joint image enhancement module for underwater object detection
Pu et al. Differential residual learning for facial expression recognition
Zhou et al. View blind-spot as inpainting: Self-supervised denoising with mask guided residual convolution
El Alami et al. Quaternion discrete orthogonal Hahn moments convolutional neural network for color image classification and face recognition

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20231128