166 Views
July 04, 25
スライド概要
MIT 6.5940(https://hanlab.mit.edu/courses/2024-fall-65940)について勉強したときのスライド
AI-Driven graduate student
Lecture 17: Efficient GAN, Video, and Point Cloud Ryota Murai AI Vision Lab. Tokyo Polytechnic University
今回の内容 • 効率的なGANs • GANの圧縮 • AnyCost GAN • データ効率に優れた、GANのための微分可能な拡張 • 効率的な映像理解 • TSM • 効率的な点群理解 • PVCNN / SPVCNN • BEVFusion MIT 6.5940: TinyML and Efficient Deep Learning Computing 2
今回の内容 • 効率的なGANs • GANの圧縮 • AnyCost GAN • データ効率に優れた、GANのための微分可能な拡張 • 効率的な映像理解 • TSM • 効率的な点群理解 • PVCNN / SPVCNN • BEVFusion MIT 6.5940: TinyML and Efficient Deep Learning Computing 3
生成モデルの基本概念 近づける 学習データ の分布 生成データ の分布 学習データ 学習 猫生成モデル 生成 https://www.pakutaso.com/animal/cat/index.html MIT 6.5940: TinyML and Efficient Deep Learning Computing 4
GANの基本(Goodfellow et al., 2014) Generative Adversarial Networks(敵対的生成ネットワーク) Discriminator(識別器)は本物と偽物を判定できるように学習を進め、 Generatorは識別器を騙せるような画像を生成するように学習を進める https://sthalles.github.io/intro-to-gans/ https://developers.google.com/machine-learning/gan/gan_structure MIT 6.5940: TinyML and Efficient Deep Learning Computing 5
GANの基本 例: MNISTデータセットを使用して手書き数字画像の生成を学習する 初期化(ランダムノイズ) 学習中の生成器サンプル https://sthalles.github.io/intro-to-gans/ MIT 6.5940: TinyML and Efficient Deep Learning Computing 6
GANの基本: Conditional vs. unconditional • Unconditional(無条件) GAN: ランダムノイズを使用して生成する • Conditional(条件付き) GAN: ラベルが与えられる(生成に制御性を追加する) • クラスラベル/セグメンテーションマップ/ストローク/など… CycleGAN(Zhu et al., ICCV 2017) GauGAN(NVIDIA, 2022) https://junyanz.github.io/CycleGAN/ https://www.youtube.com/watch?v=p5U4NgVGAwg MIT 6.5940: TinyML and Efficient Deep Learning Computing 7
GANの課題: 計算コストが高い • 生成モデルは識別モデルよりも遥かに計算コストが高い (積和演算回数) GAN Compression: Efficient Architectures for Interactive Conditional GANs [Li et al., CVPR 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 8
今回の内容 • 効率的なGANs • GANの圧縮 • AnyCost GAN • データ効率に優れた、GANのための微分可能な拡張 • 効率的な映像理解 • TSM • 効率的な点群理解 • PVCNN / SPVCNN • BEVFusion MIT 6.5940: TinyML and Efficient Deep Learning Computing 9
GANの圧縮 Conditional GANsの圧縮 1. 知識蒸留 • 教師𝐺’(𝑥)と生徒𝐺(𝑥)の 出力を近づけるように学習 • 中間層の特徴マップも 近づけるように損失を加える ① ②,③ 2. より小さくて高性能な チャネル幅の組合せを探索する 3. 最良構成のFine-Tuning GAN Compression: Efficient Architectures for Interactive Conditional GANs [Li et al., CVPR 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 10
GANの圧縮 Conditional GANsの圧縮 GAN Compression: Efficient Architectures for Interactive Conditional GANs [Li et al., CVPR 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 11
今回の内容 • 効率的なGANs • GANの圧縮 • AnyCost GAN • データ効率に優れた、GANのための微分可能な拡張 • 効率的な映像理解 • TSM • 効率的な点群理解 • PVCNN / SPVCNN • BEVFusion MIT 6.5940: TinyML and Efficient Deep Learning Computing 12
AnyCost GANs:動機 GANは画像編集に利用できるが、生成速度が遅いため、 インタラクティブなアプリケーションには適さない 潜在空間内の値を変更することで画像生成を制御する Anycost gans for interactive image synthesis and editing [Lin et al., 2021] MIT 6.5940: TinyML and Efficient Deep Learning Computing 13
AnyCost GANs:動機 レイトレーシングでは計算する光の量を減らすことで高速にプレビューしている このようなアプローチをGANにも適用できないか? MIT 6.5940: TinyML and Efficient Deep Learning Computing 14
AnyCost GANs:動機 レイトレーシングでは計算する光の量を減らすことで高速にプレビューしている このようなアプローチをGANにも適用できないか? プレビュー時には 軽量なモデル 最終的には 完全なモデル Anycost gans for interactive image synthesis and editing [Lin et al., 2021] MIT 6.5940: TinyML and Efficient Deep Learning Computing 15
AnyCost GANs モデルを訓練し、異なる解像度・異なるチャンネル数で一貫した出力が 得られるようにする Anycost gans for interactive image synthesis and editing [Lin et al., CVPR2021] MIT 6.5940: TinyML and Efficient Deep Learning Computing 16
AnyCost GANs モデルを訓練し、異なる解像度・異なるチャンネル数で一貫した出力が 得られるようにする 単一の解像度をランダムにサンプリング Anycost gans for interactive image synthesis and editing [Lin et al., CVPR2021] MIT 6.5940: TinyML and Efficient Deep Learning Computing 17
AnyCost GANs モデルを訓練し、異なる解像度・異なるチャンネル数で一貫した出力が 得られるようにする Anycost gans for interactive image synthesis and editing [Lin et al., CVPR2021] MIT 6.5940: TinyML and Efficient Deep Learning Computing 18
AnyCost GANs モデルを訓練し、異なる解像度・異なるチャンネル数で一貫した出力が 得られるようにする チャンネル構成をOne-hotエンコーディング し全結合層で処理 Anycost gans for interactive image synthesis and editing [Lin et al., CVPR2021] https://hanlab.mit.edu/projects/anycost-gan MIT 6.5940: TinyML and Efficient Deep Learning Computing 19
AnyCost GANs Anycost gans for interactive image synthesis and editing [Lin et al., CVPR2021] https://hanlab.mit.edu/projects/anycost-gan MIT 6.5940: TinyML and Efficient Deep Learning Computing 20
今回の内容 • 効率的なGANs • GANの圧縮 • AnyCost GAN • データ効率に優れた、GANのための微分可能な拡張 • 効率的な映像理解 • TSM • 効率的な点群理解 • PVCNN / SPVCNN • BEVFusion MIT 6.5940: TinyML and Efficient Deep Learning Computing 21
データ効率の高いGAN 大規模データの構築は非常に大変 限られた学習データではGANは大きく劣化する Differentiable Augmentation for Data-Efficient GAN Training [Zhao et al., NeurIPS 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 22
データ効率の高いGAN • 識別器はデータが少ないほどオーバフィッティングし、 生成器の性能を悪化させている Differentiable Augmentation for Data-Efficient GAN Training [Zhao et al., NeurIPS 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 23
データ効率の高いGAN • 識別器はデータが少ないほどオーバフィッティングし、 生成器の性能を悪化させている • 一般的に、オーバフィッティングにはデータ拡張が有効である • GANの文脈ではどのように行えばよいか? Differentiable Augmentation for Data-Efficient GAN Training [Zhao et al., NeurIPS 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 24
微分可能な拡張 • 方法1: 本物の画像のみを拡張する • 問題点:適用した拡張の影響が生成画像に現れる • 生成器「Color jitterを模倣したほうが本物だと認識してくれるっぽいな」 Differentiable Augmentation for Data-Efficient GAN Training [Zhao et al., NeurIPS 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 25
微分可能な拡張 • 方法2:識別器の入力のみを拡張する • 問題点:精度が不均衡になり訓練を難しくする • 生成器が生成した画像と識別器が見ている画像は異なるので、 識別器に対抗する方法が分からない Differentiable Augmentation for Data-Efficient GAN Training [Zhao et al., NeurIPS 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 26
微分可能な拡張 • 方法3:Differentiable Augmentation • 拡張を、判別器と生成器の両方のforward/backwardに適用 Differentiable Augmentation for Data-Efficient GAN Training [Zhao et al., NeurIPS 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 27
微分可能な拡張 • 方法3:Differentiable Augmentation • 特に少ないデータ数でのGANの改善がみられた Differentiable Augmentation for Data-Efficient GAN Training [Zhao et al., NeurIPS 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 28
微分可能な拡張 • 方法3:Differentiable Augmentation • 100枚程度でもオーバフィッティングしづらい Differentiable Augmentation for Data-Efficient GAN Training [Zhao et al., NeurIPS 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 29
今回の内容 • 効率的なGANs • GANの圧縮 • AnyCost GAN • データ効率に優れた、GANのための微分可能な拡張 • 効率的な映像理解 • TSM • 効率的な点群理解 • PVCNN / SPVCNN • BEVFusion MIT 6.5940: TinyML and Efficient Deep Learning Computing 30
効率的な映像理解:背景 映像の量は増え続けている クラウドやエッジデバイスでは高効率な映像処理が必須 MIT 6.5940: TinyML and Efficient Deep Learning Computing 31
効率的な映像理解:背景 • 数多くの用途 • 行動認識 • シーン理解 • 動画検索 • 自動運転のための未来フレーム予測 • など… https://github.com/open-mmlab/mmaction2 MIT 6.5940: TinyML and Efficient Deep Learning Computing 32
効率的な映像理解:これまでの研究 (2D CNN-based) フレームごとにCNNで処理しそれぞれの スコアを集計する(平均や最大など) 代表例: TSN(Temporal Segment Network) Temporal Segment Networks: Towards Good Practices for Deep Action Recognition [Wang et al. ECCV2016] MIT 6.5940: TinyML and Efficient Deep Learning Computing 33
効率的な映像理解:これまでの研究 (2D CNN-based) Two-Stream CNNを使う手法 フレーム画像とOptical Flowを 2系統に流し両者の結果を統合 Optical Flow: 物体の動きをベクトルで表現したもの 計算は比較的遅い Two-Stream Convolutional Networks for Action Recognition in Videos [Simonyan et al., NeurIPS 2014] MIT 6.5940: TinyML and Efficient Deep Learning Computing 34
効率的な映像理解:これまでの研究 (2D CNN-based) 2DCNN + Post-Fusion(LSTMなど) 低レベルな情報はCNN部分で失われやすい Long-term Recurrent Convolutional Networks for Visual Recognition and Description [Donahue et al., CVPR 2016] MIT 6.5940: TinyML and Efficient Deep Learning Computing 35
効率的な映像理解:これまでの研究 (2D CNN-based) • 利点 • 計算コストは低い。画像認識モデルを再利用できる • 欠点 • CNNは時系列情報を持たない。映像ベンチマークの結果は良くない • Optical Flowの計算は遅い • Late Fusion型は低レベルな時間的な関係性をモデル化できない MIT 6.5940: TinyML and Efficient Deep Learning Computing 36
効率的な映像理解:これまでの研究 (3D CNN-based) C3D(Convolutional 3D):空間方向だけでなく、時間方向にも畳み込みを行う 時空間的な情報を保持するようになる Learning Spatiotemporal Features with 3D Convolutional Networks [Tran et al. ICCV 2015] MIT 6.5940: TinyML and Efficient Deep Learning Computing 37
効率的な映像理解:これまでの研究 (3D CNN-based) I3D(Inflated 3D ConvNet): • 2DCNN(GoogLe Net)の重みで初期化し3Dに膨張(inflation)させる • Kineticsという大規模データセットで訓練する →2つの工夫で、より深い構造が可能に Quo Vadis, Action Recognition? A New Model and the Kinetics Dataset [Carreira et al. CVPR 2017] MIT 6.5940: TinyML and Efficient Deep Learning Computing 38
効率的な映像理解:これまでの研究 (3D CNN-based) • 利点 • 時空間情報を統合してモデル化できる • 低~高レベルの情報をモデル化できる • 欠点 • モデルサイズや計算量が増大する MIT 6.5940: TinyML and Efficient Deep Learning Computing 39
効率的な映像理解:これまでの研究 (3D CNN-based) • 利点 • 時空間情報を統合してモデル化できる • 低~高レベルの情報をモデル化できる • 欠点 • モデルサイズや計算量が増大する → 3DCNNの性能を2DCNNのコストで実現できないか? MIT 6.5940: TinyML and Efficient Deep Learning Computing 40
効率的な映像理解: Temporal Shift Module (TSN) • Offline TSM Model • 適用範囲:行動認識、落下検知、映像レコメンデーションなど • 前後の情報をモデル化する TSM: Temporal Shift Module for Efficient Video Understanding [Lin et al., ICCV 2019] MIT 6.5940: TinyML and Efficient Deep Learning Computing 41
効率的な映像理解: Temporal Shift Module (TSN) • Online TSM Model • 適用範囲:自動運転など • 過去→未来へ情報を一方向に伝播させる TSM: Temporal Shift Module for Efficient Video Understanding [Lin et al., ICCV 2019] MIT 6.5940: TinyML and Efficient Deep Learning Computing 42
効率的な映像理解: Temporal Shift Module (TSN) • ECO系より三倍、I3D系より最大6倍 高速 • Something-Somethingデータセット でより良い精度を達成 TSM: Temporal Shift Module for Efficient Video Understanding [Lin et al., ICCV 2019] MIT 6.5940: TinyML and Efficient Deep Learning Computing 43
効率的な映像理解: Temporal Shift Module (TSN) • スループット向上により、リアルタイム推論が改善した TSM: Temporal Shift Module for Efficient Video Understanding [Lin et al., ICCV 2019] https://developer.nvidia.com/embedded/community/jetson-projects/tsm_online MIT 6.5940: TinyML and Efficient Deep Learning Computing 44
効率的な映像理解: Temporal Shift Module (TSN) スケールアップ スケールダウン Training kinetics in 15 minutes: Large-scale distributed training on videos [Lin et al., 2019] MIT 6.5940: TinyML and Efficient Deep Learning Computing 45
効率的な映像理解: Temporal Shift Module (TSN) 低FLOPs, 低I/O時間による高速な訓練 Training kinetics in 15 minutes: Large-scale distributed training on videos [Lin et al., 2019] MIT 6.5940: TinyML and Efficient Deep Learning Computing 46
効率的な映像理解: Temporal Shift Module (TSN) 低FLOPs, 低I/O時間による高速な訓練 Training kinetics in 15 minutes: Large-scale distributed training on videos [Lin et al., 2019] MIT 6.5940: TinyML and Efficient Deep Learning Computing 47
今回の内容 • 効率的なGANs • GANの圧縮 • AnyCost GAN • データ効率に優れた、GANのための微分可能な拡張 • 効率的な映像理解 • TSM • 効率的な点群理解 • PVCNN / SPVCNN • BEVFusion MIT 6.5940: TinyML and Efficient Deep Learning Computing 48
3D センサー MIT 6.5940: TinyML and Efficient Deep Learning Computing 49
3D Point Cloud 点群:三次元空間上の点の集まり https://github.com/alvinwan/pc2vid MIT 6.5940: TinyML and Efficient Deep Learning Computing 50
3D Point Cloud 適用領域:自動運転、ARなど https://learnopencv.com/3d-lidar-object-detection/ https://www.youtube.com/watch?v=et34mpAxaJc MIT 6.5940: TinyML and Efficient Deep Learning Computing 51
3D Point Cloud:課題 • 画像よりも非常にスパース • メモリに不規則に配置される • CNNなどでは処理できない • 自動運転など、リソース制限のある エッジへのデプロイが求められる https://learnopencv.com/3d-lidar-object-detection/ https://www.youtube.com/watch?v=et34mpAxaJc MIT 6.5940: TinyML and Efficient Deep Learning Computing 52
今回の内容 • 効率的なGANs • GANの圧縮 • AnyCost GAN • データ効率に優れた、GANのための微分可能な拡張 • 効率的な映像理解 • TSM • 効率的な点群理解 • PVCNN / SPVCNN • BEVFusion MIT 6.5940: TinyML and Efficient Deep Learning Computing 53
Point-Voxel CNN • 点群をそのまま入力として使う場合 • 幾何情報を直接扱え高精度だが局在的な空間構造の抽出が難しい • 点群を3次元グリッド(Voxel)に変換し、3D CNNで処理する場合 • 空間的な隣接関係をうまく扱えるがメモリコストが増大する →両者のいいとこ取りをしたい Point-Voxel CNN for Efficient 3D Deep Learning [Liu et al., NeurIPS 2019] MIT 6.5940: TinyML and Efficient Deep Learning Computing 54
Point-Voxel CNN Point-Voxel CNN for Efficient 3D Deep Learning [Liu et al., NeurIPS 2019] MIT 6.5940: TinyML and Efficient Deep Learning Computing 55
Point-Voxel CNN Point-Voxel CNN for Efficient 3D Deep Learning [Liu et al., NeurIPS 2019] MIT 6.5940: TinyML and Efficient Deep Learning Computing 56
Point-Voxel CNN Point-Voxel CNN for Efficient 3D Deep Learning [Liu et al., NeurIPS 2019] MIT 6.5940: TinyML and Efficient Deep Learning Computing 57
Point-Voxel CNN:限界 情報の損失が発生している Point-Voxel CNN for Efficient 3D Deep Learning [Liu et al., NeurIPS 2019] MIT 6.5940: TinyML and Efficient Deep Learning Computing 58
Sparse Point-Voxel Convolution (SPVConv) スパースに畳み込むことで情報損失を減らす Searching Efficient 3D Architectures with Sparse Point-Voxel Convolution [Tang et al., ECCV 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 59
Sparse Point-Voxel Convolution (SPVConv) スパースに畳み込むことで情報損失を減らす Searching Efficient 3D Architectures with Sparse Point-Voxel Convolution [Tang et al., ECCV 2020] MIT 6.5940: TinyML and Efficient Deep Learning Computing 60
今回の内容 • 効率的なGANs • GANの圧縮 • AnyCost GAN • データ効率に優れた、GANのための微分可能な拡張 • 効率的な映像理解 • TSM • 効率的な点群理解 • PVCNN / SPVCNN • BEVFusion MIT 6.5940: TinyML and Efficient Deep Learning Computing 61
多センサー化によるビューの不一致 多ビュー情報の統合には情報の損失を最小限に抑えた共有空間が必要になる BEVFusion: Multi-Task Multi-Sensor Fusion with Unified Bird's-Eye View Representation [Liu et al., ICRA 2023] MIT 6.5940: TinyML and Efficient Deep Learning Computing 62
Bird’s-Eye View (BEV) Fusion カメラの意味的密度とLiDARの幾何学的構造を保持する BEVFusion: Multi-Task Multi-Sensor Fusion with Unified Bird's-Eye View Representation [Liu et al., ICRA 2023] MIT 6.5940: TinyML and Efficient Deep Learning Computing 63
Bird’s-Eye View (BEV) Fusion カメラの意味的密度とLiDARの幾何学的構造を保持する BEVFusion: Multi-Task Multi-Sensor Fusion with Unified Bird's-Eye View Representation [Liu et al., ICRA 2023] MIT 6.5940: TinyML and Efficient Deep Learning Computing 64
Bird’s-Eye View (BEV) Fusion 複数種類のセンサーを用いて 車両検知や車線分割など 複数タスクに対応可能 BEVFusion: Multi-Task Multi-Sensor Fusion with Unified Bird's-Eye View Representation [Liu et al., ICRA 2023] MIT 6.5940: TinyML and Efficient Deep Learning Computing 65
今回の内容 • 効率的なGANs • GANの圧縮 • AnyCost GAN • データ効率に優れた、GANのための微分可能な拡張 • 効率的な映像理解 • TSM • 効率的な点群理解 • PVCNN / SPVCNN • BEVFusion MIT 6.5940: TinyML and Efficient Deep Learning Computing 66