SlideShare a Scribd company logo
【画像処理&機械学習】論文LT会!#2
Attention Augmented
Convolution Networks
(https://arxiv.org/abs/1904.09925)
2019/05/09
@fam_taro
Agenda
1. イントロ
2. 関連研究
3. Attention Augmented Convolution
4. 個人的な感想
1
1. イントロ
 Conv 層に self-attention を追加
 Attention Augmented Convolution(以下 AAC)
 SE Block 等が channel の重みだけを出力するのに対し、AACは
feature map 自体を出力
 Conv 層を丸々置き換えることもできる
 提案手法を使うことで ResNet 等の精度が上がる
 Detection でも上がることを確認した (RetinaNet on COCO)
 Squeeze-and-Excitation(SE) よりも精度上がる
 かつパラメータ数も SE より少ない
 SE-ResNet 系が置き換わるかも?
 メモリ消費量が大きい(出力を考えれば妥当)
 (height x width)^2 に比例
 画像サイズを2倍にすると16倍のメモリが必要になる?
 適用したブロックだけなので単純に16倍に増えるわけ
ではなさそうだが… 2
2. 関連研究
 Attention mechanisms in networks
 Attention の特徴
 長い距離での関連について capture できる
 NLP 界隈で流行し始める
 RNN を使った Machine Translation
 CV 界隈では
 かなり幅広く応用されてる
 例
 CV用のモデルに組み込んだもの
 CV用モデルとRNN系モデルをあわせたもの
 代表的な例
 Squeeze-and-Excitation(SE Block)
 Gather-Excite(GE Block)
3
2. 関連研究
4
チャンネルに対
する重み
 Squeeze-and-Excitation(SE Block, 2017)
 https://arxiv.org/abs/1709.01507
 チャンネルに重み付けをする方法
 幅広く使える(大抵の Block に組み込める)
 pretrained-model によくある SE~~~ は基本これが
はいっている
3. Attention Augmented Convolution
 先行研究(SE Block 等) と比較して
 事前に AA Block 抜きで pre-training する必要がない
 non-local neural networks などは事前に付与せずに ImageNet 等を学習する必要あり
 The use of multi-head attention allows the model to attend jointly to both spatial and feature
subspaces
 multi-head attention を利用
 → 空間と特徴の部分空間を一緒に扱えるようになった?(意味怪しいです…)
5
3. Attention Augmented Convolution
 理解に必要な事前知識(Attention とは)
 > Attention の基本は query と memory(key, value) です。
 > Attention とは query によって memory から必要な情報を選択的に引っ張ってくること
 下記サイトより引用
6
“作って理解する Transformer / Attention - Qiita” より引用
https://qiita.com/halhorn/items/c91497522be27bde17ce
・query
・key
・value
の3つの単語が出
現したことだけ
押さえましょう
3. Attention Augmented Convolution
 理解に必要な事前知識
 > Attention の基本は query と memory(key, value) です。
 > Attention とは query によって memory から必要な情報を選択的に引っ張ってくること
 下記サイトより引用
7
“作って理解する Transformer / Attention - Qiita” より引用
https://qiita.com/halhorn/items/c91497522be27bde17ce
LSTM 等を使った場合、
この memory は記憶セ
ル等を示す
今回は input をそのま
ま入力
3. Attention Augmented Convolution
 数式的内訳
 変数の定義
 H: height of input
 W: width of input
 F_in: channel of input
 N_h: number of head in multihead-attention (MHA)
 d_v: depth of values in MHA
 d_k: depth of queries and keys in MHA
8
3. Attention Augmented Convolution
 画像が入力された時の操作
 1. H, W について flatten
 2. flatten したベクトル X から各 attention の head について以下の出力を得る
9
3. Attention Augmented Convolution
 画像が入力された時の操作
 1. H, W について flatten
 2. flatten したベクトル X から各 attention の head について以下の出力を得る
10
Query 特徴量に変換 Key 特徴量に変換
Value 特徴量に変換
3. Attention Augmented Convolution
 画像が入力された時の操作
 3. それぞれの head の出力を concat
 4. contat した結果に対して重みをかけて MHA の出力とする
 MHA(X) は (H, W, d_v)
 メモリ消費量が (HW)^2 に比例していることに注意
11
3. Attention Augmented Convolution
 画像が入力された時の操作
 5. Convolution 層と concat
 細かい使用例はコードを参照ください
12
4. 個人的な所感
 むずかしい…
 SE Block は channel の重み付けがメインなのでシンプルでわかりやすかった
 TensorFlow 実装例が出ているのはありがたい
 PyTorch 等の実装がすでに上がっているので試せそう
 https://github.com/leaderj1001/Attention-Augmented-Conv2d
 SE-ResNet 系は丸々置き換わりそう?
 とはいえ GPU 消費量が大きいので使うのが厳しそう…
 誰かが pre-trained model を公開してくれれば…
 pre-trained model がないと現行モデルを差し替えるのが辛いような
 もしかしたら pre-trained model の一部の weight を使い回せばいけるかも?
13
おまけ
 Wide-ResNet に適用した場合の比較
 図の通り top-1 accuracy は AA 使ったほうが良い
 ただし top-5 については 大きい差はない
14
References
 Attention Augmented Convolutional Networks
 https://arxiv.org/abs/1904.09925
 Attention Augmented Convolutional Networks - 医療系AIエンジニアの技術メモ
 https://ai-engineer-memo.hatenablog.com/entry/2019/05/06/182901
 弊社先輩のメモ。本資料より詳しく書かれてます
 Squeeze-and-Excitation Networks - 医療系AIエンジニアの技術メモ
 https://ai-engineer-memo.hatenablog.com/entry/2019/02/04/005845
 [DL輪読会]Attention Is All You Need
 https://www.slideshare.net/DeepLearningJP2016/dlattention-is-all-you-need
 https://github.com/leaderj1001/Attention-Augmented-Conv2d
 PyTorch 実装(はやい)
 論文解説 Attention Is All You Need (Transformer) - ディープラーニングブログ
 http://deeplearning.hatenablog.com/entry/transformer)
 作って理解する Transformer / Attention - Qiita
 https://qiita.com/halhorn/items/c91497522be27bde17ce)
15

More Related Content

What's hot

フーリエ変換と画像圧縮の仕組み
フーリエ変換と画像圧縮の仕組みフーリエ変換と画像圧縮の仕組み
フーリエ変換と画像圧縮の仕組み
yuichi takeda
 
Deep Learning を実装する
Deep Learning を実装するDeep Learning を実装する
Deep Learning を実装する
Shuhei Iitsuka
 
[DL輪読会]“Submodular Field Grammars Representation” and “Deep Submodular Functi...
[DL輪読会]“Submodular Field Grammars Representation” and “Deep Submodular Functi...[DL輪読会]“Submodular Field Grammars Representation” and “Deep Submodular Functi...
[DL輪読会]“Submodular Field Grammars Representation” and “Deep Submodular Functi...
Deep Learning JP
 
[DL輪読会]Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
[DL輪読会]Swin Transformer: Hierarchical Vision Transformer using Shifted Windows[DL輪読会]Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
[DL輪読会]Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
Deep Learning JP
 
【Unity道場 2月】シェーダを書けるプログラマになろう
【Unity道場 2月】シェーダを書けるプログラマになろう【Unity道場 2月】シェーダを書けるプログラマになろう
【Unity道場 2月】シェーダを書けるプログラマになろう
Unity Technologies Japan K.K.
 
Structured Light 技術俯瞰
Structured Light 技術俯瞰Structured Light 技術俯瞰
Structured Light 技術俯瞰
Teppei Kurita
 
CG2013 01
CG2013 01CG2013 01
CG2013 01
shiozawa_h
 
論文解説:スマホカメラを用いたBRDFパラメータ取得技術(非DNN)「Two-Shot SVBRDF Capture for Stationary Mat...
論文解説:スマホカメラを用いたBRDFパラメータ取得技術(非DNN)「Two-Shot SVBRDF Capture for Stationary Mat...論文解説:スマホカメラを用いたBRDFパラメータ取得技術(非DNN)「Two-Shot SVBRDF Capture for Stationary Mat...
論文解説:スマホカメラを用いたBRDFパラメータ取得技術(非DNN)「Two-Shot SVBRDF Capture for Stationary Mat...
Teppei Kurita
 
Chainerチュートリアル -v1.5向け- ViEW2015
Chainerチュートリアル -v1.5向け- ViEW2015Chainerチュートリアル -v1.5向け- ViEW2015
Chainerチュートリアル -v1.5向け- ViEW2015
Ryosuke Okuta
 
PythonによるDeep Learningの実装
PythonによるDeep Learningの実装PythonによるDeep Learningの実装
PythonによるDeep Learningの実装
Shinya Akiba
 
Deep Learning基本理論とTensorFlow
Deep Learning基本理論とTensorFlowDeep Learning基本理論とTensorFlow
Deep Learning基本理論とTensorFlow
Tadaichiro Nakano
 
CG2013 05
CG2013 05CG2013 05
CG2013 05
shiozawa_h
 
【Unite Tokyo 2018】誘導ミサイル完全マスター
【Unite Tokyo 2018】誘導ミサイル完全マスター【Unite Tokyo 2018】誘導ミサイル完全マスター
【Unite Tokyo 2018】誘導ミサイル完全マスター
Unity Technologies Japan K.K.
 
音声認識と深層学習
音声認識と深層学習音声認識と深層学習
音声認識と深層学習
Preferred Networks
 
CUDA1日(?)体験会
CUDA1日(?)体験会CUDA1日(?)体験会
CUDA1日(?)体験会
RinKuriyama
 
20110109第8回CV勉強会(ミーンシフトの原理と応用:6章・7章)shirasy)
20110109第8回CV勉強会(ミーンシフトの原理と応用:6章・7章)shirasy)20110109第8回CV勉強会(ミーンシフトの原理と応用:6章・7章)shirasy)
20110109第8回CV勉強会(ミーンシフトの原理と応用:6章・7章)shirasy)Yoichi Shirasawa
 
Chainerの使い方と自然言語処理への応用
Chainerの使い方と自然言語処理への応用Chainerの使い方と自然言語処理への応用
Chainerの使い方と自然言語処理への応用
Seiya Tokui
 
Androidで画像処理リベンジ
Androidで画像処理リベンジAndroidで画像処理リベンジ
Androidで画像処理リベンジDaisuke Takai
 

What's hot (20)

フーリエ変換と画像圧縮の仕組み
フーリエ変換と画像圧縮の仕組みフーリエ変換と画像圧縮の仕組み
フーリエ変換と画像圧縮の仕組み
 
Deep Learning を実装する
Deep Learning を実装するDeep Learning を実装する
Deep Learning を実装する
 
CMSI計算科学技術特論B(10) 大規模MD並列化の技術1
CMSI計算科学技術特論B(10) 大規模MD並列化の技術1CMSI計算科学技術特論B(10) 大規模MD並列化の技術1
CMSI計算科学技術特論B(10) 大規模MD並列化の技術1
 
[DL輪読会]“Submodular Field Grammars Representation” and “Deep Submodular Functi...
[DL輪読会]“Submodular Field Grammars Representation” and “Deep Submodular Functi...[DL輪読会]“Submodular Field Grammars Representation” and “Deep Submodular Functi...
[DL輪読会]“Submodular Field Grammars Representation” and “Deep Submodular Functi...
 
[DL輪読会]Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
[DL輪読会]Swin Transformer: Hierarchical Vision Transformer using Shifted Windows[DL輪読会]Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
[DL輪読会]Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
 
【Unity道場 2月】シェーダを書けるプログラマになろう
【Unity道場 2月】シェーダを書けるプログラマになろう【Unity道場 2月】シェーダを書けるプログラマになろう
【Unity道場 2月】シェーダを書けるプログラマになろう
 
Structured Light 技術俯瞰
Structured Light 技術俯瞰Structured Light 技術俯瞰
Structured Light 技術俯瞰
 
CG2013 01
CG2013 01CG2013 01
CG2013 01
 
diff template library
diff template librarydiff template library
diff template library
 
論文解説:スマホカメラを用いたBRDFパラメータ取得技術(非DNN)「Two-Shot SVBRDF Capture for Stationary Mat...
論文解説:スマホカメラを用いたBRDFパラメータ取得技術(非DNN)「Two-Shot SVBRDF Capture for Stationary Mat...論文解説:スマホカメラを用いたBRDFパラメータ取得技術(非DNN)「Two-Shot SVBRDF Capture for Stationary Mat...
論文解説:スマホカメラを用いたBRDFパラメータ取得技術(非DNN)「Two-Shot SVBRDF Capture for Stationary Mat...
 
Chainerチュートリアル -v1.5向け- ViEW2015
Chainerチュートリアル -v1.5向け- ViEW2015Chainerチュートリアル -v1.5向け- ViEW2015
Chainerチュートリアル -v1.5向け- ViEW2015
 
PythonによるDeep Learningの実装
PythonによるDeep Learningの実装PythonによるDeep Learningの実装
PythonによるDeep Learningの実装
 
Deep Learning基本理論とTensorFlow
Deep Learning基本理論とTensorFlowDeep Learning基本理論とTensorFlow
Deep Learning基本理論とTensorFlow
 
CG2013 05
CG2013 05CG2013 05
CG2013 05
 
【Unite Tokyo 2018】誘導ミサイル完全マスター
【Unite Tokyo 2018】誘導ミサイル完全マスター【Unite Tokyo 2018】誘導ミサイル完全マスター
【Unite Tokyo 2018】誘導ミサイル完全マスター
 
音声認識と深層学習
音声認識と深層学習音声認識と深層学習
音声認識と深層学習
 
CUDA1日(?)体験会
CUDA1日(?)体験会CUDA1日(?)体験会
CUDA1日(?)体験会
 
20110109第8回CV勉強会(ミーンシフトの原理と応用:6章・7章)shirasy)
20110109第8回CV勉強会(ミーンシフトの原理と応用:6章・7章)shirasy)20110109第8回CV勉強会(ミーンシフトの原理と応用:6章・7章)shirasy)
20110109第8回CV勉強会(ミーンシフトの原理と応用:6章・7章)shirasy)
 
Chainerの使い方と自然言語処理への応用
Chainerの使い方と自然言語処理への応用Chainerの使い方と自然言語処理への応用
Chainerの使い方と自然言語処理への応用
 
Androidで画像処理リベンジ
Androidで画像処理リベンジAndroidで画像処理リベンジ
Androidで画像処理リベンジ
 

Similar to 論文LT会用資料: Attention Augmented Convolution Networks

文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
Toru Tamaki
 
点群SegmentationのためのTransformerサーベイ
点群SegmentationのためのTransformerサーベイ点群SegmentationのためのTransformerサーベイ
点群SegmentationのためのTransformerサーベイ
Takuya Minagawa
 
近年のHierarchical Vision Transformer
近年のHierarchical Vision Transformer近年のHierarchical Vision Transformer
近年のHierarchical Vision Transformer
Yusuke Uchida
 
[part 2]ナレッジグラフ推論チャレンジ・Tech Live!
[part 2]ナレッジグラフ推論チャレンジ・Tech Live![part 2]ナレッジグラフ推論チャレンジ・Tech Live!
[part 2]ナレッジグラフ推論チャレンジ・Tech Live!
KnowledgeGraph
 
葉物野菜を見極めたい!by Keras
葉物野菜を見極めたい!by Keras葉物野菜を見極めたい!by Keras
葉物野菜を見極めたい!by Keras
Yuji Kawakami
 
[AI05] 目指せ、最先端 AI 技術の実活用!Deep Learning フレームワーク 「Microsoft Cognitive Toolkit 」...
[AI05] 目指せ、最先端 AI 技術の実活用!Deep Learning フレームワーク 「Microsoft Cognitive Toolkit 」...[AI05] 目指せ、最先端 AI 技術の実活用!Deep Learning フレームワーク 「Microsoft Cognitive Toolkit 」...
[AI05] 目指せ、最先端 AI 技術の実活用!Deep Learning フレームワーク 「Microsoft Cognitive Toolkit 」...
de:code 2017
 
SeRanet
SeRanetSeRanet
SeRanet
Kosuke Nakago
 
深層学習フレームワーク Chainer の開発と今後の展開
深層学習フレームワーク Chainer の開発と今後の展開深層学習フレームワーク Chainer の開発と今後の展開
深層学習フレームワーク Chainer の開発と今後の展開
Seiya Tokui
 
as-2. メモリと CPU
as-2. メモリと CPUas-2. メモリと CPU
as-2. メモリと CPU
kunihikokaneko1
 
文献紹介:SlowFast Networks for Video Recognition
文献紹介:SlowFast Networks for Video Recognition文献紹介:SlowFast Networks for Video Recognition
文献紹介:SlowFast Networks for Video Recognition
Toru Tamaki
 
VLDB’11勉強会 -Session 9-
VLDB’11勉強会 -Session 9-VLDB’11勉強会 -Session 9-
VLDB’11勉強会 -Session 9-Takeshi Yamamuro
 
Hello Dark-Side C# (Part. 1)
Hello Dark-Side C# (Part. 1)Hello Dark-Side C# (Part. 1)
Hello Dark-Side C# (Part. 1)
Yuto Takei
 
MIRU2014 tutorial deeplearning
MIRU2014 tutorial deeplearningMIRU2014 tutorial deeplearning
MIRU2014 tutorial deeplearning
Takayoshi Yamashita
 
[DL輪読会]An Image is Worth 16x16 Words: Transformers for Image Recognition at S...
[DL輪読会]An Image is Worth 16x16 Words: Transformers for Image Recognition at S...[DL輪読会]An Image is Worth 16x16 Words: Transformers for Image Recognition at S...
[DL輪読会]An Image is Worth 16x16 Words: Transformers for Image Recognition at S...
Deep Learning JP
 
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
Yusuke Uchida
 
TVM の紹介
TVM の紹介TVM の紹介
TVM の紹介
Masahiro Masuda
 
文献紹介:TSM: Temporal Shift Module for Efficient Video Understanding
文献紹介:TSM: Temporal Shift Module for Efficient Video Understanding文献紹介:TSM: Temporal Shift Module for Efficient Video Understanding
文献紹介:TSM: Temporal Shift Module for Efficient Video Understanding
Toru Tamaki
 
機械学習とこれを支える並列計算 : 並列計算の現状と産業応用について
機械学習とこれを支える並列計算 : 並列計算の現状と産業応用について機械学習とこれを支える並列計算 : 並列計算の現状と産業応用について
機械学習とこれを支える並列計算 : 並列計算の現状と産業応用について
ハイシンク創研 / Laboratory of Hi-Think Corporation
 
Efficient Neural Architecture Search via Parameters Sharing @ ICML2018読み会
Efficient Neural Architecture Search via Parameters Sharing @ ICML2018読み会Efficient Neural Architecture Search via Parameters Sharing @ ICML2018読み会
Efficient Neural Architecture Search via Parameters Sharing @ ICML2018読み会
tomohiro kato
 
Deep Learningの基礎と応用
Deep Learningの基礎と応用Deep Learningの基礎と応用
Deep Learningの基礎と応用
Seiya Tokui
 

Similar to 論文LT会用資料: Attention Augmented Convolution Networks (20)

文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
文献紹介:An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
 
点群SegmentationのためのTransformerサーベイ
点群SegmentationのためのTransformerサーベイ点群SegmentationのためのTransformerサーベイ
点群SegmentationのためのTransformerサーベイ
 
近年のHierarchical Vision Transformer
近年のHierarchical Vision Transformer近年のHierarchical Vision Transformer
近年のHierarchical Vision Transformer
 
[part 2]ナレッジグラフ推論チャレンジ・Tech Live!
[part 2]ナレッジグラフ推論チャレンジ・Tech Live![part 2]ナレッジグラフ推論チャレンジ・Tech Live!
[part 2]ナレッジグラフ推論チャレンジ・Tech Live!
 
葉物野菜を見極めたい!by Keras
葉物野菜を見極めたい!by Keras葉物野菜を見極めたい!by Keras
葉物野菜を見極めたい!by Keras
 
[AI05] 目指せ、最先端 AI 技術の実活用!Deep Learning フレームワーク 「Microsoft Cognitive Toolkit 」...
[AI05] 目指せ、最先端 AI 技術の実活用!Deep Learning フレームワーク 「Microsoft Cognitive Toolkit 」...[AI05] 目指せ、最先端 AI 技術の実活用!Deep Learning フレームワーク 「Microsoft Cognitive Toolkit 」...
[AI05] 目指せ、最先端 AI 技術の実活用!Deep Learning フレームワーク 「Microsoft Cognitive Toolkit 」...
 
SeRanet
SeRanetSeRanet
SeRanet
 
深層学習フレームワーク Chainer の開発と今後の展開
深層学習フレームワーク Chainer の開発と今後の展開深層学習フレームワーク Chainer の開発と今後の展開
深層学習フレームワーク Chainer の開発と今後の展開
 
as-2. メモリと CPU
as-2. メモリと CPUas-2. メモリと CPU
as-2. メモリと CPU
 
文献紹介:SlowFast Networks for Video Recognition
文献紹介:SlowFast Networks for Video Recognition文献紹介:SlowFast Networks for Video Recognition
文献紹介:SlowFast Networks for Video Recognition
 
VLDB’11勉強会 -Session 9-
VLDB’11勉強会 -Session 9-VLDB’11勉強会 -Session 9-
VLDB’11勉強会 -Session 9-
 
Hello Dark-Side C# (Part. 1)
Hello Dark-Side C# (Part. 1)Hello Dark-Side C# (Part. 1)
Hello Dark-Side C# (Part. 1)
 
MIRU2014 tutorial deeplearning
MIRU2014 tutorial deeplearningMIRU2014 tutorial deeplearning
MIRU2014 tutorial deeplearning
 
[DL輪読会]An Image is Worth 16x16 Words: Transformers for Image Recognition at S...
[DL輪読会]An Image is Worth 16x16 Words: Transformers for Image Recognition at S...[DL輪読会]An Image is Worth 16x16 Words: Transformers for Image Recognition at S...
[DL輪読会]An Image is Worth 16x16 Words: Transformers for Image Recognition at S...
 
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
Swin Transformer (ICCV'21 Best Paper) を完璧に理解する資料
 
TVM の紹介
TVM の紹介TVM の紹介
TVM の紹介
 
文献紹介:TSM: Temporal Shift Module for Efficient Video Understanding
文献紹介:TSM: Temporal Shift Module for Efficient Video Understanding文献紹介:TSM: Temporal Shift Module for Efficient Video Understanding
文献紹介:TSM: Temporal Shift Module for Efficient Video Understanding
 
機械学習とこれを支える並列計算 : 並列計算の現状と産業応用について
機械学習とこれを支える並列計算 : 並列計算の現状と産業応用について機械学習とこれを支える並列計算 : 並列計算の現状と産業応用について
機械学習とこれを支える並列計算 : 並列計算の現状と産業応用について
 
Efficient Neural Architecture Search via Parameters Sharing @ ICML2018読み会
Efficient Neural Architecture Search via Parameters Sharing @ ICML2018読み会Efficient Neural Architecture Search via Parameters Sharing @ ICML2018読み会
Efficient Neural Architecture Search via Parameters Sharing @ ICML2018読み会
 
Deep Learningの基礎と応用
Deep Learningの基礎と応用Deep Learningの基礎と応用
Deep Learningの基礎と応用
 

More from Yusuke Fujimoto

Paper LT: Mask Scoring R-CNN
Paper LT:  Mask Scoring R-CNNPaper LT:  Mask Scoring R-CNN
Paper LT: Mask Scoring R-CNN
Yusuke Fujimoto
 
Paper: Bounding Box Regression with Uncertainty for Accurate Object Detection
Paper: Bounding Box Regression with Uncertainty for Accurate Object DetectionPaper: Bounding Box Regression with Uncertainty for Accurate Object Detection
Paper: Bounding Box Regression with Uncertainty for Accurate Object Detection
Yusuke Fujimoto
 
Tensor コアを使った PyTorch の高速化
Tensor コアを使った PyTorch の高速化Tensor コアを使った PyTorch の高速化
Tensor コアを使った PyTorch の高速化
Yusuke Fujimoto
 
Paper: Objects as Points(CenterNet)
Paper: Objects as Points(CenterNet)Paper: Objects as Points(CenterNet)
Paper: Objects as Points(CenterNet)
Yusuke Fujimoto
 
Paper: seq2seq 20190320
Paper: seq2seq 20190320Paper: seq2seq 20190320
Paper: seq2seq 20190320
Yusuke Fujimoto
 
Paper: clinically accuratechestx-rayreport generation_noself
Paper: clinically accuratechestx-rayreport generation_noselfPaper: clinically accuratechestx-rayreport generation_noself
Paper: clinically accuratechestx-rayreport generation_noself
Yusuke Fujimoto
 

More from Yusuke Fujimoto (6)

Paper LT: Mask Scoring R-CNN
Paper LT:  Mask Scoring R-CNNPaper LT:  Mask Scoring R-CNN
Paper LT: Mask Scoring R-CNN
 
Paper: Bounding Box Regression with Uncertainty for Accurate Object Detection
Paper: Bounding Box Regression with Uncertainty for Accurate Object DetectionPaper: Bounding Box Regression with Uncertainty for Accurate Object Detection
Paper: Bounding Box Regression with Uncertainty for Accurate Object Detection
 
Tensor コアを使った PyTorch の高速化
Tensor コアを使った PyTorch の高速化Tensor コアを使った PyTorch の高速化
Tensor コアを使った PyTorch の高速化
 
Paper: Objects as Points(CenterNet)
Paper: Objects as Points(CenterNet)Paper: Objects as Points(CenterNet)
Paper: Objects as Points(CenterNet)
 
Paper: seq2seq 20190320
Paper: seq2seq 20190320Paper: seq2seq 20190320
Paper: seq2seq 20190320
 
Paper: clinically accuratechestx-rayreport generation_noself
Paper: clinically accuratechestx-rayreport generation_noselfPaper: clinically accuratechestx-rayreport generation_noself
Paper: clinically accuratechestx-rayreport generation_noself
 

Recently uploaded

FIDO Alliance Osaka Seminar: PlayStation Passkey Deployment Case Study.pdf
FIDO Alliance Osaka Seminar: PlayStation Passkey Deployment Case Study.pdfFIDO Alliance Osaka Seminar: PlayStation Passkey Deployment Case Study.pdf
FIDO Alliance Osaka Seminar: PlayStation Passkey Deployment Case Study.pdf
FIDO Alliance
 
論文紹介:When Visual Prompt Tuning Meets Source-Free Domain Adaptive Semantic Seg...
論文紹介:When Visual Prompt Tuning Meets Source-Free Domain Adaptive Semantic Seg...論文紹介:When Visual Prompt Tuning Meets Source-Free Domain Adaptive Semantic Seg...
論文紹介:When Visual Prompt Tuning Meets Source-Free Domain Adaptive Semantic Seg...
Toru Tamaki
 
CS集会#13_なるほどわからん通信技術 発表資料
CS集会#13_なるほどわからん通信技術 発表資料CS集会#13_なるほどわからん通信技術 発表資料
CS集会#13_なるほどわからん通信技術 発表資料
Yuuitirou528 default
 
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアルLoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
CRI Japan, Inc.
 
【AI論文解説】Consistency ModelとRectified Flow
【AI論文解説】Consistency ModelとRectified Flow【AI論文解説】Consistency ModelとRectified Flow
【AI論文解説】Consistency ModelとRectified Flow
Sony - Neural Network Libraries
 
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
atsushi061452
 
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
yassun7010
 
FIDO Alliance Osaka Seminar: NEC & Yubico Panel.pdf
FIDO Alliance Osaka Seminar: NEC & Yubico Panel.pdfFIDO Alliance Osaka Seminar: NEC & Yubico Panel.pdf
FIDO Alliance Osaka Seminar: NEC & Yubico Panel.pdf
FIDO Alliance
 
TaketoFujikawa_物語のコンセプトに基づく情報アクセス手法の基礎検討_JSAI2024
TaketoFujikawa_物語のコンセプトに基づく情報アクセス手法の基礎検討_JSAI2024TaketoFujikawa_物語のコンセプトに基づく情報アクセス手法の基礎検討_JSAI2024
TaketoFujikawa_物語のコンセプトに基づく情報アクセス手法の基礎検討_JSAI2024
Matsushita Laboratory
 
FIDO Alliance Osaka Seminar: Welcome Slides.pdf
FIDO Alliance Osaka Seminar: Welcome Slides.pdfFIDO Alliance Osaka Seminar: Welcome Slides.pdf
FIDO Alliance Osaka Seminar: Welcome Slides.pdf
FIDO Alliance
 
単腕マニピュレータによる 複数物体の同時組み立ての 基礎的考察 / Basic Approach to Robotic Assembly of Multi...
単腕マニピュレータによる 複数物体の同時組み立ての 基礎的考察 / Basic Approach to Robotic Assembly of Multi...単腕マニピュレータによる 複数物体の同時組み立ての 基礎的考察 / Basic Approach to Robotic Assembly of Multi...
単腕マニピュレータによる 複数物体の同時組み立ての 基礎的考察 / Basic Approach to Robotic Assembly of Multi...
Fukuoka Institute of Technology
 
FIDO Alliance Osaka Seminar: LY-DOCOMO-KDDI-Mercari Panel.pdf
FIDO Alliance Osaka Seminar: LY-DOCOMO-KDDI-Mercari Panel.pdfFIDO Alliance Osaka Seminar: LY-DOCOMO-KDDI-Mercari Panel.pdf
FIDO Alliance Osaka Seminar: LY-DOCOMO-KDDI-Mercari Panel.pdf
FIDO Alliance
 
【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matching
【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matching【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matching
【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matching
harmonylab
 
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)
NTT DATA Technology & Innovation
 
FIDO Alliance Osaka Seminar: CloudGate.pdf
FIDO Alliance Osaka Seminar: CloudGate.pdfFIDO Alliance Osaka Seminar: CloudGate.pdf
FIDO Alliance Osaka Seminar: CloudGate.pdf
FIDO Alliance
 
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。
iPride Co., Ltd.
 

Recently uploaded (16)

FIDO Alliance Osaka Seminar: PlayStation Passkey Deployment Case Study.pdf
FIDO Alliance Osaka Seminar: PlayStation Passkey Deployment Case Study.pdfFIDO Alliance Osaka Seminar: PlayStation Passkey Deployment Case Study.pdf
FIDO Alliance Osaka Seminar: PlayStation Passkey Deployment Case Study.pdf
 
論文紹介:When Visual Prompt Tuning Meets Source-Free Domain Adaptive Semantic Seg...
論文紹介:When Visual Prompt Tuning Meets Source-Free Domain Adaptive Semantic Seg...論文紹介:When Visual Prompt Tuning Meets Source-Free Domain Adaptive Semantic Seg...
論文紹介:When Visual Prompt Tuning Meets Source-Free Domain Adaptive Semantic Seg...
 
CS集会#13_なるほどわからん通信技術 発表資料
CS集会#13_なるほどわからん通信技術 発表資料CS集会#13_なるほどわからん通信技術 発表資料
CS集会#13_なるほどわからん通信技術 発表資料
 
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアルLoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
 
【AI論文解説】Consistency ModelとRectified Flow
【AI論文解説】Consistency ModelとRectified Flow【AI論文解説】Consistency ModelとRectified Flow
【AI論文解説】Consistency ModelとRectified Flow
 
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
 
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
 
FIDO Alliance Osaka Seminar: NEC & Yubico Panel.pdf
FIDO Alliance Osaka Seminar: NEC & Yubico Panel.pdfFIDO Alliance Osaka Seminar: NEC & Yubico Panel.pdf
FIDO Alliance Osaka Seminar: NEC & Yubico Panel.pdf
 
TaketoFujikawa_物語のコンセプトに基づく情報アクセス手法の基礎検討_JSAI2024
TaketoFujikawa_物語のコンセプトに基づく情報アクセス手法の基礎検討_JSAI2024TaketoFujikawa_物語のコンセプトに基づく情報アクセス手法の基礎検討_JSAI2024
TaketoFujikawa_物語のコンセプトに基づく情報アクセス手法の基礎検討_JSAI2024
 
FIDO Alliance Osaka Seminar: Welcome Slides.pdf
FIDO Alliance Osaka Seminar: Welcome Slides.pdfFIDO Alliance Osaka Seminar: Welcome Slides.pdf
FIDO Alliance Osaka Seminar: Welcome Slides.pdf
 
単腕マニピュレータによる 複数物体の同時組み立ての 基礎的考察 / Basic Approach to Robotic Assembly of Multi...
単腕マニピュレータによる 複数物体の同時組み立ての 基礎的考察 / Basic Approach to Robotic Assembly of Multi...単腕マニピュレータによる 複数物体の同時組み立ての 基礎的考察 / Basic Approach to Robotic Assembly of Multi...
単腕マニピュレータによる 複数物体の同時組み立ての 基礎的考察 / Basic Approach to Robotic Assembly of Multi...
 
FIDO Alliance Osaka Seminar: LY-DOCOMO-KDDI-Mercari Panel.pdf
FIDO Alliance Osaka Seminar: LY-DOCOMO-KDDI-Mercari Panel.pdfFIDO Alliance Osaka Seminar: LY-DOCOMO-KDDI-Mercari Panel.pdf
FIDO Alliance Osaka Seminar: LY-DOCOMO-KDDI-Mercari Panel.pdf
 
【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matching
【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matching【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matching
【DLゼミ】XFeat: Accelerated Features for Lightweight Image Matching
 
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)
 
FIDO Alliance Osaka Seminar: CloudGate.pdf
FIDO Alliance Osaka Seminar: CloudGate.pdfFIDO Alliance Osaka Seminar: CloudGate.pdf
FIDO Alliance Osaka Seminar: CloudGate.pdf
 
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。
 

論文LT会用資料: Attention Augmented Convolution Networks

  • 2. Agenda 1. イントロ 2. 関連研究 3. Attention Augmented Convolution 4. 個人的な感想 1
  • 3. 1. イントロ  Conv 層に self-attention を追加  Attention Augmented Convolution(以下 AAC)  SE Block 等が channel の重みだけを出力するのに対し、AACは feature map 自体を出力  Conv 層を丸々置き換えることもできる  提案手法を使うことで ResNet 等の精度が上がる  Detection でも上がることを確認した (RetinaNet on COCO)  Squeeze-and-Excitation(SE) よりも精度上がる  かつパラメータ数も SE より少ない  SE-ResNet 系が置き換わるかも?  メモリ消費量が大きい(出力を考えれば妥当)  (height x width)^2 に比例  画像サイズを2倍にすると16倍のメモリが必要になる?  適用したブロックだけなので単純に16倍に増えるわけ ではなさそうだが… 2
  • 4. 2. 関連研究  Attention mechanisms in networks  Attention の特徴  長い距離での関連について capture できる  NLP 界隈で流行し始める  RNN を使った Machine Translation  CV 界隈では  かなり幅広く応用されてる  例  CV用のモデルに組み込んだもの  CV用モデルとRNN系モデルをあわせたもの  代表的な例  Squeeze-and-Excitation(SE Block)  Gather-Excite(GE Block) 3
  • 5. 2. 関連研究 4 チャンネルに対 する重み  Squeeze-and-Excitation(SE Block, 2017)  https://arxiv.org/abs/1709.01507  チャンネルに重み付けをする方法  幅広く使える(大抵の Block に組み込める)  pretrained-model によくある SE~~~ は基本これが はいっている
  • 6. 3. Attention Augmented Convolution  先行研究(SE Block 等) と比較して  事前に AA Block 抜きで pre-training する必要がない  non-local neural networks などは事前に付与せずに ImageNet 等を学習する必要あり  The use of multi-head attention allows the model to attend jointly to both spatial and feature subspaces  multi-head attention を利用  → 空間と特徴の部分空間を一緒に扱えるようになった?(意味怪しいです…) 5
  • 7. 3. Attention Augmented Convolution  理解に必要な事前知識(Attention とは)  > Attention の基本は query と memory(key, value) です。  > Attention とは query によって memory から必要な情報を選択的に引っ張ってくること  下記サイトより引用 6 “作って理解する Transformer / Attention - Qiita” より引用 https://qiita.com/halhorn/items/c91497522be27bde17ce ・query ・key ・value の3つの単語が出 現したことだけ 押さえましょう
  • 8. 3. Attention Augmented Convolution  理解に必要な事前知識  > Attention の基本は query と memory(key, value) です。  > Attention とは query によって memory から必要な情報を選択的に引っ張ってくること  下記サイトより引用 7 “作って理解する Transformer / Attention - Qiita” より引用 https://qiita.com/halhorn/items/c91497522be27bde17ce LSTM 等を使った場合、 この memory は記憶セ ル等を示す 今回は input をそのま ま入力
  • 9. 3. Attention Augmented Convolution  数式的内訳  変数の定義  H: height of input  W: width of input  F_in: channel of input  N_h: number of head in multihead-attention (MHA)  d_v: depth of values in MHA  d_k: depth of queries and keys in MHA 8
  • 10. 3. Attention Augmented Convolution  画像が入力された時の操作  1. H, W について flatten  2. flatten したベクトル X から各 attention の head について以下の出力を得る 9
  • 11. 3. Attention Augmented Convolution  画像が入力された時の操作  1. H, W について flatten  2. flatten したベクトル X から各 attention の head について以下の出力を得る 10 Query 特徴量に変換 Key 特徴量に変換 Value 特徴量に変換
  • 12. 3. Attention Augmented Convolution  画像が入力された時の操作  3. それぞれの head の出力を concat  4. contat した結果に対して重みをかけて MHA の出力とする  MHA(X) は (H, W, d_v)  メモリ消費量が (HW)^2 に比例していることに注意 11
  • 13. 3. Attention Augmented Convolution  画像が入力された時の操作  5. Convolution 層と concat  細かい使用例はコードを参照ください 12
  • 14. 4. 個人的な所感  むずかしい…  SE Block は channel の重み付けがメインなのでシンプルでわかりやすかった  TensorFlow 実装例が出ているのはありがたい  PyTorch 等の実装がすでに上がっているので試せそう  https://github.com/leaderj1001/Attention-Augmented-Conv2d  SE-ResNet 系は丸々置き換わりそう?  とはいえ GPU 消費量が大きいので使うのが厳しそう…  誰かが pre-trained model を公開してくれれば…  pre-trained model がないと現行モデルを差し替えるのが辛いような  もしかしたら pre-trained model の一部の weight を使い回せばいけるかも? 13
  • 15. おまけ  Wide-ResNet に適用した場合の比較  図の通り top-1 accuracy は AA 使ったほうが良い  ただし top-5 については 大きい差はない 14
  • 16. References  Attention Augmented Convolutional Networks  https://arxiv.org/abs/1904.09925  Attention Augmented Convolutional Networks - 医療系AIエンジニアの技術メモ  https://ai-engineer-memo.hatenablog.com/entry/2019/05/06/182901  弊社先輩のメモ。本資料より詳しく書かれてます  Squeeze-and-Excitation Networks - 医療系AIエンジニアの技術メモ  https://ai-engineer-memo.hatenablog.com/entry/2019/02/04/005845  [DL輪読会]Attention Is All You Need  https://www.slideshare.net/DeepLearningJP2016/dlattention-is-all-you-need  https://github.com/leaderj1001/Attention-Augmented-Conv2d  PyTorch 実装(はやい)  論文解説 Attention Is All You Need (Transformer) - ディープラーニングブログ  http://deeplearning.hatenablog.com/entry/transformer)  作って理解する Transformer / Attention - Qiita  https://qiita.com/halhorn/items/c91497522be27bde17ce) 15