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

Amazon SageMakerでImagenを動かして猫画像生成してみた

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Amazon SageMakerでImagenを動かして猫画像生成してみた

Avatar for クルトン

クルトン

August 05, 2022
Tweet

More Decks by クルトン

Other Decks in Programming

Transcript

  1. 7 Imagenとは Googleが提案したモデル • 学習: テキストと画像をセットにしたもの • 推論: テキストから画像を生成 モデルの詳説:

    https://arxiv.org/pdf/2205.11487.pdf 引用元: https://imagen.research.google/ 学習済みのモデルへテキスト(英文)を入れると画像が生成 されている
  2. 13 Imagenとは • 学習 ◦ 画像とテキストをセットで画像のノイズを取り除く過程を学習さ せる • 推論 ◦

    テキストとノイズ画像から求める画像を生成する 猫画像をテキストを与える事で生成
  3. 16 学習環境 • epoch数 ◦ 20万回 • GPU使用 ◦ インスタンス’ml.g4dn.xlarge’

    • 学習時間 ◦ 122650秒(1日と10時間ほど) ▪ CPUでは5日で学習終わらずMaxRuntimeExceededで止まる
  4. 20 画像生成: インプットしたテキスト 1. 'A transparent sculpture of a cat

    made out of glass.' 2. 'A giant cobra cat on a farm. The cat is made out of corn.' 3. 'A majestic oil painting of a cat Queen wearing red French royal gown. The painting is hanging on an ornate wall decorated with wallpaper.' 4. 'A dog looking curiously in the mirror, seeing a cat.' 5. 'Cat Mascot made from bamboo.' 6. 'A cat made of chocolate powder, mango, and whipped cream.' 7. 'A marble statue of a Cat DJ in front of a marble statue of a turntable. The Koala has wearing large marble headphones.' 8. 'A cat is sitting on the Kings throne wearing a crown. Two tiger soldiers are standing next to the throne.' 9. 'A photo of a cat riding a bike in Times Square. It is wearing sunglasses and a beach hat.'
  5. 21 画像生成: テキスト(日本語訳) 1. ガラスで作られた透明な猫の像 2. 農場にいる巨大なコブラ猫。ネコはトウモロコシでできている。 3. 赤いフランス王室のガウンを着た猫の女王を描いた荘厳な油絵。この絵は壁 紙で飾られた華やかな壁に掛けられている。

    4. 鏡を不思議そうに見ている犬が、猫を見ている。 5. 竹製の猫のマスコット 6. チョコレートパウダーとマンゴーと生クリームでできた猫 7. ターンテーブルの大理石像の前に猫のDJの大理石像がある。コアラは大きな 大理石のヘッドホンをしている。 8. 王様の玉座に王冠をかぶった猫が座っている。玉座の横には2匹の虎の兵隊 が立っている。 9. タイムズスクエアで自転車に乗っている猫の写真。サングラスとビーチハット を被っている。