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

[Journal Club]High-Resolution Image Synthesis With Latent Diffusion Models

[Journal Club]High-Resolution Image Synthesis With Latent Diffusion Models

More Decks by Semantic Machine Intelligence Lab., Keio Univ.

Other Decks in Technology

Transcript

  1. High-Resolution Image Synthesis With Latent Diffusion Models 慶應義塾大学 杉浦孔明研究室 飯岡雄偉

    Rombach, Robin and Blattmann, Andreas and Lorenz, Dominik and Esser, Patrick and Ommer, Bj"orn, in CVPR 2022, pp.10684-10695
  2. 概要:画像生成分野のBreakthroughとなる ◼ 背景 • 画像生成分野の急速な発展と学習コストの増加 ◼ 提案手法:Stable Diffusion • 拡散モデル(Diffusion

    Models; DMs)によって潜在変数を学習 • Cross-attentionの利用によって,多様な条件での学習を可能に ◼ 結論 ✓ 多様な画像生成タスクに応用可能かつ,コストの削減に成功 • Text to Image, Super-Resolution, Inpainting 2
  3. 背景:画像分野の急速な発展 • DALL·E-2[Aditya+, April, 2022] – CLIP[Alec+, 2021]によるImage Embedding –

    Decoderにて拡散モデルによる画像生成 3 • Imagen[Chitwan+, May, 2022] – 段階的な拡散モデルで画像生成 • txt2img, super-resolution A photo of a hedgehog wearing a red coat reading a book sitting on a lounge chair in the middle of a lush forest. https://imagen.research.google/
  4. 背景:画像分野の急速な発展 • DALL·E-2[Aditya+, April, 2022] – CLIP[Alec+, 2021]によるImage Embedding –

    Decoderにて拡散モデルによる画像生成 4 • Imagen[Chitwan+, May, 2022] – 段階的な拡散モデルで画像生成 • txt2img, super-resolution A photo of a hedgehog wearing a red coat reading a book sitting on a lounge chair in the middle of a lush forest. https://imagen.research.google/ 拡散モデルによって,高次元である画像のピクセル空間を直接扱う ⇒パラメータ数の増大によるコストの増加 DALL·E-2:3.5B Imagen:2B(txt2img), 600M and 400M(super-resolution)
  5. 構成(2 / 4):ピクセル空間 • Autoencoderによって低次元に圧縮 – VAE[Kingma+, ICLR14]の構造を採用 • 本モデルは1/8に圧縮

    – 多様体仮説に従う • 意味のあるデータは局所的に固まっている ➢パラメータ数の減少に寄与 7
  6. 構成(3 / 4):潜在空間 – Latent Diffusion Model – 1. ガウシアンノイズを徐々に加える(Forward)

    – 学習なし – 現在の状態のみから次の状態が決まる • マルコフ連鎖 2. ノイズを徐々に取り除く(Reverse) – 学習あり – UNet[Olaf+, MICCAI15]の構造を採用 • 物体の空間的構造をつかむ – 𝜖𝜃 がガウス分布𝜖に近づくことが目標 8
  7. 構成(3 / 4):潜在空間 – Latent Diffusion Model – 1. ガウシアンノイズを徐々に加える(Forward)

    – 学習なし – 現在の状態のみから次の状態が決まる • マルコフ連鎖 2. ノイズを徐々に取り除く(Reverse) – 学習あり – UNet[Olaf+, MICCAI15]の構造を採用 • 物体の空間的構造をつかむ – 𝜖𝜃 がガウス分布𝜖に近づくことが目標 9 微小の不規則変化は,ガウス分布に近似できる (例)ブラウン運動 系列データのインデックス番号 https://www.lab.twcu.ac.jp/~ando_k/qtchmrxn07.pdf
  8. 構成(3 / 4):潜在空間 – Latent Diffusion Model – 10 •

    Reverseの実際の様子 [https://colab.research.google.com/drive/1dlgggNa5Mz8sEAGU0wFCHhGLFooW_pf1?usp=sharing] 𝑡 → 𝑡 − 1 𝑡0 各ステップごとに(100 steps) ‘Shiba Inu wearing a school uniform’
  9. 実験設定:Text-to-Image • 訓練データセット – LAION-400M[Christoph+, 2021] • 画像とテキストのペア • 評価データセット

    – MS-COCO[Holger, CVPR18] • Annotaion付きの画像データセット 12 https://laion.ai/blog/laion-400-open-dataset/
  10. 定量的結果:既存手法を上回る性能 13 FID↓ IS↑ DALL-E [Aditya+, CoRR21] 27.5 17.9 Cog

    View [Ming+, CoRR21] 27.1 18.2 Lafite [Yufan+, CoRR21] 26.94 26.02 提案手法 12.62 26.62 Inception Score[Barratt+, 2018] • 画像生成の評価指標
  11. 定性的結果:細かい指示まで認識 • 3 d goddess close up profile portrait with

    ram skull. beautiful intricately detailed japanese crow, kitsune mask and clasical japanese kimono. betta fish, jellyfish phoenix, bio luminescent, plasma, ice, water, wind, creature, artwork by tooth wu and wlop and beeple and greg rutkowski 14 現時点での最新版 v1.4 LAION-5Bによる学習
  12. 最新モデルとの比較: DALL·E-2, Imagen 15 A photo of a hedgehog wearing

    a red coat reading a book sitting on a lounge chair in the middle of a lush forest. Stable Diffusion DALL·E-2 Imagen 1.5B 3.5B 2.0B, 600M, 400M
  13. まとめ:画像生成のBreakthrough ◼ 背景 • 画像生成分野の急速な発展と学習コストの増加 ◼ 提案手法:Stable Diffusion • 拡散モデル(Diffusion

    Models; DMs)によって潜在変数を学習 • Cross-attentionの利用によって,多様な条件での学習を可能に ◼ 結論 ✓ 多様な画像生成タスクに応用可能かつ,コストの削減に成功 • Text to Image, Super-Resolution, Inpainting 16
  14. 参考資料 • demo – https://huggingface.co/spaces/stabilityai/stable-diffusion • https://stability.ai/blog/stable-diffusion-public-release • https://towardsdatascience.com/stable-diffusion-best-open-source-version-of-dall-e-2-ebcdf1cb64bc •

    https://qiita.com/asparagasu/items/91d1afd4a4f207fcde68 • 構造をステップごとにつかめる – https://colab.research.google.com/drive/1dlgggNa5Mz8sEAGU0wFCHhGLFooW_pf1?usp=sharing 17
  15. Appendix:image-to-image 18 Human Clip Arts Strength : 0.62 An illustration

    of a giraffe in an lush forest, vibrant colors, highly detailed, digital painting, artstation, concept art, smooth, sharp focus, illustration, cinematic lighting, art by artgerm and greg rutkowski and alphonse mucha Strength : 0.75