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
47
Active Retrieval Augmented Generation
kiyohiro8
3
980
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
400
Bridging_by_Word__Image-Grounded_Vocabulary_Construction_for_Visual_Captioning.pdf
kiyohiro8
0
1k
Attention on Attention for Image Captioning
kiyohiro8
1
580
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
Agent × Maestro で始める モバイル E2E 端末準備からテスト実行・結果確認まで
sansantech
PRO
0
140
2026-10-24 JAWS JAWS-UG 茨城 #18 IAM Policy Autopilotってなにさ。terraform planからIAM Policyつくれるの? / What's IAM Policy Autopilot
masasuzu
0
120
AWS Continuum for Penetration Testing に Deep Dive してみる
asanoharuki
1
750
その Valkey 使いこなしていますか?
onk
PRO
5
1.9k
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
390
Codex を使った障害対応机上演習の実際
orgachem
PRO
0
330
AI時代のGraphQL
joere
3
370
Practical ransomware detection on macOS (via maths, not AI)
patrickwardle
0
100
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
2
390
AWSセキュリティで活用するAI機能
cmusudakeisuke
1
250
Draft AIエージェントの トークン消費を最小化する 8つの原則
kinopeee
2
980
Refining Active Record
shugo
0
200
Featured
See All Featured
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
310
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Why Our Code Smells
bkeepers
PRO
340
58k
For a Future-Friendly Web
brad_frost
184
10k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Paper Plane
katiecoart
PRO
5
54k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
510
Statistics for Hackers
jakevdp
799
230k
Tell your own story through comics
letsgokoyo
1
1.1k
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に上げます。