Upgrade to Pro — share decks privately, control downloads, hide ads and more …

論文輪読会 第1回 "ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation"

AcademiX
February 19, 2023

論文輪読会 第1回 "ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation"

AcademiX が開催した 第1回 論文輪読会「AI論文読み方講座」に関する資料

日時:2023/02/18
発表者:大熊拓海さん
論文タイトル:ViTPose: Simple Vision Transformer Baselines for Human Pose Estimation

<概要>
シンプルな Vision Transformer (ViT) をベースにした Human Pose Estimation (HPE) 手法を提案した研究。

本研究以前にも Transformer x HPE の研究は存在したが、その多くが複雑なモジュールやCNNとの融合等を用いた研究である一方、本研究はシンプルさを追求し、ViTをほぼそのまま用いたモデルを提案。

AcademiX

February 19, 2023
Tweet

More Decks by AcademiX

Other Decks in Research

Transcript

  1. 経歴 • 2019年 3月 東京大学 工学部 計数工学科卒業 • 2021年 3月

    東京大学 情報理工学系研究科 創造情報学専攻 修士課程 修了 (修了時に研究科長賞受賞) • 2021年 4月 同 博士課程 進学 (休学中) • 2021年 6月 Airion株式会社 創業 • 2022年 7月 AI学生団体「AcademiX」設立 専門分野 • 画像認識(Few-shot Learning、Human Pose Estimation) その他 • 東京大学 工学系研究科 講義「深層学習」講師(2020年度-) • 松尾研スプリングセミナー講義 監修 (画像認識) 講師 (画像認識/生成モデル) • 2021年度未踏アドバンスト事業採択 • Twitter: @shien5963 (link) 大熊拓海 自己紹介
  2. 書誌情報 • 題名:ViTPose: Simple Vision Transformer Baselines for Human Pose

    Estimation [1] • 著者:Yufei Xu, Jing Zhang, Qiming Zhang, Dacheng Tao(シドニー大学の研究チーム) • URL:https://arxiv.org/abs/2204.12484 • Code: https://github.com/ViTAE-Transformer/ViTPose • NeurIPS 2022 採択 ※ 本資料における出典の記載の無い図表は全て [1] より引用 3
  3. 概要 • ViTPose は Transformer ベースの Human Pose Estimation (HPE)

    手法であり、(特殊なモジュールなどを用いない) シンプルな ViT [2] をベースにしている。 • Object Detector → ViT → Decoder の順番に処理を行うこと で、画像中の複数人の姿勢に関する Heatmap を出力。 • Masked Autoencoder [3] による事前学習、モデルのスケー ルアップ、Multi-dataset training 等を用い、MS COCO [4] データセットでの最高精度を実現。 4
  4. 目次 1. 研究の背景 2. Human Pose Estimationとは 3. Vision Transformerとは

    4. ViTPoseの実装 5. 実験 6. 精度の追及 7. まとめ 5
  5. 目次 1. 研究の背景 2. Human Pose Estimationとは 3. Vision Transformerとは

    4. ViTPoseの実装 5. 実験 6. 精度の追及 7. まとめ 6
  6. 研究の背景 • Vision Transformer (ViT) [2] が画像分類タスクで高い精度を発揮したことで、その他 の様々な画像認識タスクにも Transformer が用いられるようになった。

    • 人間の姿勢を推定するタスクである Human Pose Estimation (HPE) においても Transformer ベースの手法が提案されているが、多くの手法では CNN と融合したモ デル、もしくは Transformer 自体も凝ったアーキテクチャとなっている。 • 複雑なアーキテクチャを用いず、シンプルな ViT をベースで高いパフォーマンスを 引き出せるかどうか追求したい。 7
  7. 目次 1. 研究の背景 2. Human Pose Estimationとは 3. Vision Transformerとは

    4. ViTPoseの実装 5. 実験 6. 精度の追及 7. まとめ 8
  8. 9 • Human Pose Estimation (HPE) とは、画像中の人物の特定の点(キーポイント) の位置を推定することで、人物の姿勢を得る画像認識タスク。 Human Pose

    Estimationとは [5] Cao, Zhe, et al. “OpenPose: realtime multi-person 2D pose estimation using Part Affinity Fields.” IEEE transactions on pattern analysis and machine intelligence 43.1 (2019): 172-186. より図を引用 ※ HPE についてより詳しく知りたい方は https://www.slideshare.net/awful/human-pose-estimation の資料を参照
  9. 10 • 姿勢推定を用いることで画像中の人間の動きを詳細に取ることが出来るので、単純 な物体検出では困難な応用が可能となる。 • 例としては以下の様な応用が挙げられる • 歩行者の行動予測 • 不審者・酔っ払いの検出

    • スポーツの審判補助 • オンラインコーチング(スポーツ等) • (挙手等の)行動検知 • ゲームやVRにおけるインターフェイス 他にも様々な例が挙げられる HPEの重要性
  10. 11 応用事例 [6] Dang, Qi, et al. "Deep learning based

    2d human pose estimation: A survey“ Tsinghua Science and Technology 24.6 (2019): 663-676. より図を引用
  11. 目次 1. 研究の背景 2. Human Pose Estimationとは 3. Vision Transformerとは

    4. ViTPoseの実装 5. 実験 6. 精度の追及 7. まとめ 12
  12. 13 • Transformer は Attention と呼ばれる機構を用いたニューラルネットワークであり、 2017年に自然言語処理 (NLP) 用モデルとして登場した [9]。

    • NLPの様々なタスクに対して圧倒的な性能を実現し、以前のLSTM等の回帰型ニューラル ネットワークの手法に取って代わった。 • これ以前にも回帰型NN+Attention モデルは存在したが、Transformer では回帰型NNは使 われていない。 • Transformer を発展させた大規模モデルである BERT や GPT が登場し、NLP ではスタ ンダードになっている。 • その後、画像認識や音声認識、点群認識などにも応用される。 • その他の有名どころでは、タンパク質構造予測の AlphaFold [7] も Transformer がベース。 Transformerとは [7] Senior, Andrew W., et al. "Improved protein structure prediction using potentials from deep learning." Nature 577.7792 (2020): 706-710.
  13. 15 • Attention は”Query”, “Key”, “Value”の3要素を用いて計算される。 • Query を 𝑄

    ∊ ℝ𝑛×𝑑𝑞、Key を K ∊ ℝ𝑛𝑣×𝑑𝑞、Value を V ∊ ℝ𝑛𝑣×𝑑𝑣 として 𝐴𝑡𝑡 𝑄, 𝐾, 𝑉 = 𝑠𝑜𝑓𝑡𝑚𝑎𝑥 𝑄𝐾𝑇 𝑑𝑞 𝑉 と表すことができる (Dot-Product Attention)。 • この式の意味は「query ベクトルと key ベクトルの類似度を求め、 そ の正規化した重みを value ベクトルに適用して値を取り出す」と解釈 でき、出力は 𝑉 の行ごとの重み付き和である。 Attention [9] Vaswani, Ashish, et al. “Attention is all you need.” Advances in neural information processing systems. 2017. よ り図を引用, 一部改変
  14. 17 (今回Decoderは出て来ないので割愛) Transformer Encoderのアーキテクチャ [9] Vaswani, Ashish, et al. "Attention

    is all you need." Advances in neural information processing systems. 2017. より図を引用
  15. 19 • Vision Transformer [2]は、(画像認識において畳み込みを全く用いずに)Attention を用いて 最高精度を達成した最初の研究 (Google Brain の研究)。

    • 画像を一定サイズのパッチに分割してトークンとみなすことで、自然言語処理の Transformer をほぼそのまま用いている。 Vision Transformer (ViT) (1/2) [2] Dosovitskiy, Alexey, et al. "An image is worth 16x16 words: Transformers for image recognition at scale." arXiv preprint arXiv:2010.11929 (2020). より図を引用
  16. 目次 1. 研究の背景 2. Human Pose Estimationとは 3. Vision Transformerとは

    4. ViTPoseの実装 5. 実験 6. 精度の追及 7. まとめ 21
  17. ViTPose • ViTPose [1] は、シンプルな Vision Transformer をベースにしたHPE手法。 • 入力画像をパッチに分割・Embedding

    した後、Transformer Encoder に入力 し、特徴量抽出するところまでは本家ViTと同様。 • 得られた特徴量を HPE 用の Decoder (後述) に入力し、推定結果を得る。 22
  18. 25 • ViTPose は、入力画像に写り込む1人のキーポイントを検出する手法である為、 画像中の複数人のキーポイント座標が欲しい場合、Object Detector を用いて各人の領 域を切り出し、それぞれを ViTPose に入力する必要がある。

    • このような方式を一般に Top-Down と呼ぶ。 • 本研究では、Detector としては主に faster-RCNN [10] を用いる。 ViTPoseの前処理 [6] Dang, Qi, et al. "Deep learning based 2d human pose estimation: A survey“ Tsinghua Science and Technology 24.6 (2019): 663-676. より図を引用
  19. 目次 1. 研究の背景 2. Human Pose Estimationとは 3. Vision Transformerとは

    4. ViTPoseの実装 5. 実験 6. 精度の追及 7. まとめ 26
  20. 実験 • 複数の大きさのViT(ViT-B, ViT-L, ViT-H)を用いる。 • ViTPose への入力画像の解像度は 256 x

    192 。 • Detector によって切り抜かれた画像を上記サイズにリスケールする。 • 前述の2種類の Decoder をそれぞれ用いる。 • MS-COCO データセット [4] を用いる。 • メインの学習に先立ち、後述の Masked AutoEncoder (MAE) [3] と呼ばれる手法を用いた 事前学習を行う。 • 用いるデータセットは基本的に ImageNet-1k [11]。 27
  21. 主結果 • 以下の表に MSCOCO-val に対する結果を示す。 • ViTPose は ResNet [12]

    ベースの手法よりも高い精度を達成し、また ViT-B, L, H とスケールアップするにつれて精度が向上している。 • ResNet では Simple Decoder を用いると精度が大きく劣化するが、ViT では 殆ど変わらない精度となっている。 29
  22. 目次 1. 研究の背景 2. Human Pose Estimationとは 3. Vision Transformerとは

    4. ViTPoseの実装 5. 実験 6. 精度の追及 7. まとめ 31
  23. 解像度のUP • ViT に入力する画像サイズを基準の 256 x 192 から高めることで、 精度の向上が可能。 •

    但し、速度は遅くなる。 • 人間の形の為、縦長の領域が Detector で切り取られることが多い為、 正方形ではなく多少縦に長くにリサイズした方が精度が良い。 • 576 x 432 の場合、精度が基準値から2.0AP向上している。 33
  24. 最高精度の実現 • 高解像度、Multi-Dataset Training に加え、「より大規模なモデル: ViTAE-G [14]」及び「より高 精度なDetector: BigDet [15]」を導入することで、最高精度

    (80.9AP) を達成。 • ViTAE-G は1Bパラメータを持つ超大規模モデルで、ViT-B, L, H の 100M, 300M, 600Mより大きい。 • ViTAE と ViT の違い、及び BigDet の詳細については本資料では割愛。 • アンサンブルを導入することで(少しだが)更に精度向上(ここでは3モデルのアンサンブル)。 35
  25. 目次 1. 研究の背景 2. Human Pose Estimationとは 3. Vision Transformerとは

    4. ViTPoseの実装 5. 実験 6. 精度の追及 7. まとめ 36
  26. 結論 • 本研究では、シンプルな ViT を用いた HPE 手法を提案し、今後の研究のベースライン手法 となり得ると主張。 • 複雑なモジュール等を用いていないにも関わらず、いくつかの工夫を組み合わせることで

    MS COCO データセットに対して最高精度を実現。 • Decoder のアーキテクチャ等に関しては改善の余地があると主張。 • Human Pose Estimation のみならず、Animal Pose Estimation や Face Keypoint Detection 等 への応用も期待できる。 37
  27. 引用 1. Xu, Yufei, et al. "ViTPose: Simple Vision Transformer

    Baselines for Human Pose Estimation." arXiv preprint arXiv:2204.12484 (2022). 2. osovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In International Conference on Learning Representations, 2020. 3. K. He, X. Chen, S. Xie, Y. Li, P. Dollár, and R. Girshick. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 16000–16009, 2022. 4. T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick. Microsoft coco: Common objects in context. In Proceedings of the European Conference on Computer Vision (ECCV), 2014. 5. Cao, Zhe, et al. “OpenPose: realtime multi-person 2D pose estimation using Part Affinity Fields.” IEEE transactions on pattern analysis and machine intelligence 43.1 (2019). 6. Dang, Qi, et al. "Deep learning based 2d human pose estimation: A survey“ Tsinghua Science and Technology 24.6 (2019): 663-676. 7. Senior, Andrew W., et al. "Improved protein structure prediction using potentials from deep learning." Nature 577.7792 (2020): 706-710. 8. .https://www.slideshare.net/DeepLearningJP2016/dltransformer-vit-perceiver-frozen-pretrained-transformer-etc 9. Vaswani, Ashish, et al. “Attention is all you need.” Advances in neural information processing systems. 2017. 10. Girshick, Ross. "Fast r-cnn." Proceedings of the IEEE international conference on computer vision. 2015. 38
  28. 引用 11. J. Deng, W. Dong, R. Socher, L.-J. Li,

    K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 248–255, 2009. 12. K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 770–778, 2016. 13. J. Wu, H. Zheng, B. Zhao, Y. Li, B. Yan, R. Liang, W. Wang, S. Zhou, G. Lin, Y. Fu, et al. Ai challenger: A large-scale dataset for going deeper in image understanding. arXiv preprint arXiv:1711.06475, 2017. 14. Y. Xu, Q. Zhang, J. Zhang, and D. Tao. Vitae: Vision transformer advanced by exploring intrinsic inductive bias. Advances in Neural Information Processing Systems, 34, 2021. 15. L. Cai, Z. Zhang, Y. Zhu, L. Zhang, M. Li, and X. Xue. Bigdetection: A large-scale benchmark for improved object detector pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 4777–4787, 2022. 39