Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
CycleGAN and InstaGAN
Search
kiyo
November 21, 2019
Technology
1.6k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
CycleGAN and InstaGAN
#8【画像処理 & 機械学習】論文LT会で発表した内容です。GANを用いた画像変換手法である InstaGAN と CycleGAN の紹介です。
kiyo
November 21, 2019
More Decks by kiyo
See All by kiyo
Agent Skill Acquisition for Large Language Models via CycleQD
kiyohiro8
0
46
Active Retrieval Augmented Generation
kiyohiro8
3
960
Reinforcement Learning: An Introduction 輪読会 第5回
kiyohiro8
0
480
Reinforcement Learning: An Introduction 輪読会 第3回
kiyohiro8
0
650
TransGAN: Two Transformers Can Make One Strong GAN
kiyohiro8
0
390
Bridging_by_Word__Image-Grounded_Vocabulary_Construction_for_Visual_Captioning.pdf
kiyohiro8
0
1k
Attention on Attention for Image Captioning
kiyohiro8
1
570
Progressive Growing of GANs for Improved Quality, Stability, and Variation
kiyohiro8
1
190
Graph-Based Global Reasoning Networks
kiyohiro8
0
1.4k
Other Decks in Technology
See All in Technology
Issue 駆動でスペシャリストの意図を届ける、AI 実装のアクセシビリティ向上
thkt
0
110
新機種発売前に見直そう!端末移行で再ログインが要るアプリ・要らないアプリは何が違うのか 〜シームレスに再開できる設計と実装〜
zozotech
PRO
0
200
銀行勘定系システムにおける開発プロセス刷新×AIによる環境モダナイゼーション / Development Process Transformation and AI-Driven Environment Modernization
muit
0
2.2k
DEFCON_CHV_CTF_Write-up.pdf
bata_24
0
150
登壇の自信を奪う3匹のオバケ / 3 Ghosts That Rob You of Your Confidence in Public Speaking
pauli
8
930
アクセスキーこわい やめかたと漏らさない工夫
sassssan68
1
250
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
Geolonia の開発現場における AIの活用について
miya0001
0
100
beyond jj: config & tools ecosystem
indirect
0
440
現場で役立つ技術負債の効果的な返済方法
masuda220
PRO
8
4.1k
omasushiというライブラリを作った
polidog
PRO
0
230
MCPをつなげて作る組織横断のAIエージェント基盤(の開発工程)
tsubakimoto_s
0
130
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.3k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Believing is Seeing
oripsolob
1
220
Raft: Consensus for Rubyists
vanstee
142
7.7k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
330
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
520
Automating Front-end Workflow
addyosmani
1369
210k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
440
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
Transcript
CycleGAN and InstaGAN 第8回画像処理 & 機械学習】論文LT会 2019年11月21日(木) @hrs1985
自己紹介 twitter : @hrs1985 https://qiita.com/hrs1985 https://kiyo.qrunch.io/ 機械学習エンジニアをしています。 最近転職して7月から東京で働いてます。 前々職では実験生物学やってました。 •
深層生成モデル、画像の変換 • 強化学習 • 生物学・化学への機械学習の応用 に興味があります。
紹介する論文 CycleGAN Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks (ICCV
2017) https://arxiv.org/abs/1703.10593 InstaGAN InstaGAN: Instance-aware Image-to-Image Translation (ICLR 2019) https://arxiv.org/abs/1812.10889
画像のスタイル変換 Paired 各ドメインの画像が対になっている Unpaired 各ドメインの画像が対になっていない あるドメインの画像を別のドメインへの対応する画像に変換する操作
CycleGAN による画像変換 左: CycleGAN の論文中の例、右: 自分で実験してみた例
CycleGAN 2つのGeneratorはそれぞれX→Y、Y→Xの変換を行い、 Discriminatorはそれが元々そのドメインの画像だったか Generatorによって変換された画像かを見破る。
CycleGAN の Loss Domain loss (GAN Loss) Content Loss (Cycle
Consistency Loss)
CycleGAN
CycleGAN の問題点 ・オブジェクト形状が大きく変わるような変換はできない。 ・変換するべきオブジェクトが画像のどの部分であるかを明示して変換することはできない。
InstaGAN ・CycleGAN で失敗しやすい、オブジェクト形状が変化するような変換にも対応できる。 ・該当するインスタンスのうち、一部だけを変換することもできる。
InstaGAN
Generator 1. 画像用 Encoder とマスク用 Encoder で特徴を抽出 2. マスク特徴の総和を取っておく 3.
画像用の Decoder に画像特徴とマスク特徴の総和を 入力して変換された画像を得る 4. マスク用の Decoder に画像特徴とマスク特徴の総和と マスク特徴を入力して変換されたマスクを得る
Discriminator 1. 画像用 Encoder とマスク用 Encoder で特徴を抽出 2. マスク特徴の総和を取る 3.
Classifier に画像特徴とマスク特徴の総和を入力して判 別する
InstaGAN の Loss Domain Loss (GAN Loss) Content Loss Domain
Loss: target domain っぽいかどうかを判別するための Loss Content Loss: 元画像の内容や文脈を保持するための Loss
Content Loss の中身 ドメイン X の画像を一旦 Y に変換してからもう一度 X に変換したら元画像戻って欲しいという願い
(CycleGAN の Cycle Consistency Loss と同じ) GXY/GYX はそれぞれドメイン X/Y の画像についてのみ変更してほしいという願い (元々 Y/X だった画像は変更しないでほしい ) マスク領域以外の場所は変更しないでほしいという願い
Sequential Translation 一度に全てのマスクを変換するのではなく、 各 iteration では少数のマスクだけを変換する手法を使っています。
Sequential Translation One: 全てのマスクを 1 iteration で変換 Seq: Sequential に少数ずつ変換 train時/inference時 Train
時にも Inference 時にも Sequential Translation を行った方がよいらしい (一番右)。
結果 ズボン⇔スカートの変換 CycleGANよりも綺麗です。 また、右側中段のように一人分だけ変換することもできています。
結果 ヒツジ⇔キリンの変換 ちゃんとヒツジとキリンの形になっています。 また、InstaGAN では背景部分の変化が小さいです (左側上段など)
結果 ウマ⇔車の変換 この変換の出来は微妙に見えますが論文中では上手くいってる扱いぽいです。 確かにCycleGANよりはマシに見えます。
おまけ 自分で実装してみるために参考に著者実装を見たのですが実装が酷すぎて読むのがつらいです。 各メソッドの全ての変数に selfがついているのでメソッドの中身だけ追っても処理内容が見えづらい あとPyTorchの使い方覚えてほしい
参考 CycleGAN (https://qiita.com/hrs1985/items/050acb15ce33675f07ec) CycleGANを用いたスタイル変換 (https://qiita.com/hrs1985/items/926f9c4e635aac659675) CycleGANを用いたスタイル変換 (2) リベンジ編 (https://qiita.com/hrs1985/items/820d9b0b919fe0425e46) CycleGANのPytorch実装
(https://github.com/kiyohiro8/CycleGAN-pytorch) CycleGANの実装はあまりカッコよくないので色々修正したい。 InstaGANの実装も今やっているので上手くできたら githubに上げます。