Slide 1

Slide 1 text

ディープラーニングで 芸術はできるか︖ 〜⽣成系ネットワークの進展〜 2020/1/11 板垣正敏@Python機械学習勉強会 in 新潟 Restart #10

Slide 2

Slide 2 text

⾃⼰紹介 š 板垣 正敏 š 1955年村上市⽣まれ š 県内IT企業の技術顧問 (2020/3まで) š 中⼩企業診断⼠ š ⽇本Rubyの会 š 新潟オープンソース協会 š Python機械学習勉強会 in 新潟 š TensorFlow Users Group š JAWS-UG Niigata š @itagakim š https://github.com/masa-ita

Slide 3

Slide 3 text

4,900万円で 落札された絵画 š 2018/10/25 クリスティーズのオー クションで $432,500-で落札 š 製作者はフランスのアートグルー プ Obvious š 架空の家族の肖像画の1つとして、 GAN(Generative Adversarial Network)を使って⽣成された š 落札者は匿名 http://www.obvious-art.com/edmond-de-belamy.html Edmond De Belamy

Slide 4

Slide 4 text

AI 美空ひばり š NHK、YAMAHA、秋元康らによる 美空ひばりの歌声の再現 š 「新曲」「あれから」をボーカロ イドに歌わせた

Slide 5

Slide 5 text

NEON? https://www.youtube.com/watch?reload=9&v=Q6f6EXX-79w`

Slide 6

Slide 6 text

画像⽣成のさまざまな試み

Slide 7

Slide 7 text

Deep Dream š 学習したものをテク スチャ化し、写真と 合成 š 「悪夢」のような写 真でインパクト š https://ai.googleblog.co m/2015/07/deepdream -code-example-for- visualizing.html š https://github.com/goo gle/deepdream š https://photos.google.c om/share/AF1QipPX0SC l7OzWilt9LnuQliattX4O UCj_8EP65_cTVnBmS1j nYgsGQAieQUc1VQWdg Q?key=aVBxWjhwSzg2R jJWLWRuVFBBZEN1d20 5bUdEMnhB

Slide 8

Slide 8 text

スタイル変換 Neural Style Transfer š 画家の持つ「タッ チ」を絵や写真に適 ⽤するモデル š A Neural Algorithm of Artistic Style š https://arxiv.org/abs/1 508.06576 š Unofficial Implementation š https://github.com/ani shathalye/neural-style

Slide 9

Slide 9 text

VAE: Variational AutoEncoder š Auto-Encoding Variational Bayes š https://arxiv.org/abs/1312.6114 š Stochastic Backpropagation and Approximate Inference in Deep Generative Models š https://arxiv.org/abs/1401.4082 š 特徴量の抽出を⾏うAutoencoder の隠れベクトルをガウス空間内 のサンプルと仮定し、Encoderに はそのパラメータを出⼒させる š 学習されたガウス空間からのサ ンプルをDecoderに⼊⼒すること で、新たな画像を⽣成できる https://qiita.com/shionhonda/items/e2cf9fe93ae1034dd771

Slide 10

Slide 10 text

GAN: Generative Adversarial Network

Slide 11

Slide 11 text

GANの仕組みと 歴史 š GANは画像を⽣成するGeneratorと画像が本物か偽物か を⾒分けるDiscriminatorとを競い合わせながら学習させ る š ゲーム理論での「ナッシュ均衡」、つまりどちらもそ れ以上改善の余地がない状態を⽬指す š GANの元になった考え⽅としては、Gutmann他によるノ イズコントラスト推定やNiemitaloのブログ記事に敵対 的ネットワークのアイデアがあるといわれる š 実装まで⾏ったのは、Goodfellow他の論⽂ が初めてと されている https://qiita.com/shionhonda/items/330c9fdf78e62db3402b min $ max ' )~+,()) [log ()] + 7~+ 8 [log(1 − )]

Slide 12

Slide 12 text

GANのバリエーション 構造の最適化 š 畳み込み š DCGAN š 条件付き š CGANs š InfoGAN š ACGAN š Autoencoder š AAE š BiGAN š ALI š AGE š VAE-GAN ⽬的関数の最適化 š Unrolled GAN š f-GAN š Mode-Regularized GAN š Least-Square GAN š Loss-Sensitive GAN š EBGAN š WGAN š WGAN-GP š WGAN-LP https://ieeexplore.ieee.org/document/8667290

Slide 13

Slide 13 text

GANの応⽤ š 超解像度画像⽣成 š SRGAN š ESRGAN š 画像変換 š pix2pix š pix2pixHD š CycleGAN š DiscoGAN š DualGAN š StarGAN š テクスチャ⽣成 š MGAN š SGAN š SPGAN š 顔⽣成 š SAGAN š BigGAN š MoCoGAN š テキスト⽣成 š SeqGAN š RankGAN š その他 š AnoGAN(異常検知)

Slide 14

Slide 14 text

StyleGAN š A Style-Based Generator Architecture for Generative Adversarial Networks š https://arxiv.org/abs/1812.04948 š https://github.com/NVlabs/stylegan

Slide 15

Slide 15 text

StyleGAN2 š Analyzing and Improving the Image Quality of StyleGAN š https://arxiv.org/abs/1912.04958 š https://github.com/NVlabs/stylegan2

Slide 16

Slide 16 text

No content

Slide 17

Slide 17 text

No content

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

SinGAN: Learning a Generative Model from a Single Natural Image š SinGAN: Learning a Generative Model from a Single Natural Image š https://arxiv.org/abs/1905.01164 š https://github.com/tamarott/SinGAN

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

vid2vid š Video-to-Video Synthesis š https://arxiv.org/abs/1808.06601 š https://github.com/NVIDIA/vid2vid

Slide 24

Slide 24 text

vid2vidの ネットワーク 構造 š 動画のフレーム間にはマ ルコフ過程を仮定 š フレームの⽣成にはオプ ティカルフロー (FlowNet2)と Conditional GANを組み合 わせている š ⾼精細化のために、⼊⼒ 画像をダウンサンプルし、 残差ネットワークを構成 Residual blocks ... Residual blocks ... Residual blocks ... Residual blocks ... Semantic maps Previous images Intermediate image Flow map Mask Figure 8: The network architecture (G1 ) for low-res videos. Our network takes in a number of semantic label maps and previously generated images, and outputs the intermediate frame as well as the flow map and the mask. ... Residual blocks G2 ... ... ... ... G2 G1 Figure 9: The network architecture (G2 ) for higher resolution videos. The label maps and previous frames are downsampled and fed into the low-res network G1 . Then, the features from the high-res network and the last layer of the low-res network are summed and fed into another series of residual blocks to output the final images. A Network Architecture A.1 Generators Our network adopts a coarse-to-fine architecture. For the lowest resolution, the network takes in a number of semantic label maps st t L and previously generated frames ˜ xt 1 t L as input. The label maps are concatenated together and undergo several residual blocks to form intermediate high-level features. We apply the same processing for the previously generated images. Then, these two intermediate layers are added and fed into two separate residual networks to output the hallucinated image ˜ ht as well as the flow map ˜ wt and the mask ˜ mt (Figure 8). Next, to build from low-res results to higher-res results, we use another network G2 on top of the low-res network G1 (Figure 9). In particular, we first downsample the inputs and fed them into G1 . Then, we extract features from the last feature layer of G and add them to the intermediate feature

Slide 25

Slide 25 text

Few-shot Video-to-Video Synthesis š Few-shot Video-to-Video Synthesis š https://arxiv.org/abs/1910.12713 š https://nvlabs.github.io/few-shot-vid2vid/

Slide 26

Slide 26 text

Few-Shot vid2vidの構造 š 少数の画像をCNNにかけて特徴抽出することで、 画像⽣成ネットワークの重みを⽣成 š 例えば顔の動画を⽣成する場合、必要なのは画像 と顔のキーポイントデータ

Slide 27

Slide 27 text

No content

Slide 28

Slide 28 text

画像以外の⽣成モデル

Slide 29

Slide 29 text

テキスト⽣成 š GPT-2 š テスラ・モーターズのイーロン・マス クなどが設⽴した OpenAI が開発したテ キスト⽣成モデル š ⼈間が⼊⼒した⽂に続けてもっともら しい内容を⽣成 š 当初、フェイクニュースの⽣成に悪⽤ されるのを恐れて公開されなかった š https://openai.com/blog/better-language- models/ š https://openai.com/blog/gpt-2-1-5b- release/ š https://github.com/openai/gpt-2 š https://talktotransformer.com In a shocking finding, scientist discovered a herd of unicorns living in a remote, previously unexplored valley, in the Andes Mountains. Even more surprising to the researchers was the fact that the unicorns spoke perfect English. MODEL COMPLETION (MACHINE-WRITTEN, 10 TRIES) The scientist named the population, after their distinctive horn, Ovid’s Unicorn. These four-horned, silver-white unicorns were previously unknown to science. Now, after almost two centuries, the mystery of what sparked this odd phenomenon is finally solved. Dr. Jorge Pérez, an evolutionary biologist from the University of La Paz, and several companions, were exploring the Andes Mountains when they found a small valley, with no other animals or humans. Pérez noticed that the valley had what appeared to be a natural fountain, surrounded by two peaks of rock and silver snow. Pérez and the others then ventured further into the valley. “By the time we reached the top of one peak, the water looked blue, with some crystals on top,” said Pérez. …

Slide 30

Slide 30 text

⾳楽⽣成 š Google Magenta š VAEやGANによる⾳楽⽣成 š https://magenta.tensorflow.org/ š Building An A.I. Music Generator Transformer, BERT, seq2seq etc. š テキスト⽣成の⾳楽への応⽤ š https://towardsdatascience.com/creating-a-pop-music-generator-with-the- transformer-5867511b382a š https://musicautobot.com/

Slide 31

Slide 31 text

Deep Learningの「作品」は 芸術か︖

Slide 32

Slide 32 text

「帰納法」は創造的になれるか︖ š機械学習の本質は「帰納法」 š既存の作品を学習して「似て⾮なるもの」 を⽣成することしかできないのでは︖ š創造ではなく「贋作」か︖

Slide 33

Slide 33 text

表現しようという意思 š でたらめ(ランダム性)は芸術といえるのか︖ š ⼈間が製作したアートにも、ランダム性に依存し たものはある (ペンキをぶちまける、⽕薬を発⽕させる、etc.) š アートには何かを表現したい(伝えたい)という 意思が必要︖ š コンピューターに意識や意思はあるのかという問 題に

Slide 34

Slide 34 text

DeepFake への対抗策

Slide 35

Slide 35 text

AIが⾃動⽣成、 ⼤量の「フェイ ク顔」がトラン プ⽒を⽀持する š AIが⾃動⽣成する実在しな い「フェイク顔」のアカウ ントが、フェイスブックを 舞台に⼤量発⽣し、トラン プ⼤統領の再選を⽀持する ――。 š フェイスブックはこの動き に対し、600を超すアカウ ント、さらに関連するフェ イクブックページやグルー プの削除を発表した。 š またフェイスブックの発表 と合わせて、⼤⼿シンクタ ンクなどが調査報告書を公 表。AIによる「フェイク 顔」アカウントの⼤量発⽣ の仕組みを解き明かしてい る。 https://kaztaira.wordpress.com/2019/12/27/fake_face_swarm/

Slide 36

Slide 36 text

Deepfake Detection Challenge š https://www.kaggle.com/c/deepfake-detection-challenge š AWS, Facebook, Microsoft が共同で Deepfake を検出する機械学習モデ ルを開発するコンテストを実施 š 動画の中からDeepfakeを検出 š 賞⾦総額は100万ドル︕