iMTE

DiscoGAN 본문

Deep learning/GAN

DiscoGAN

Wonju Seo 2018. 7. 20. 13:05

DiscoGAN

Learning to Discover Cross-Domain Relations with Generative Adversarial Networks

Kim, Taeksoo, et al. "Learning to discover cross-domain relations with generative adversarial networks." arXiv preprint arXiv:1703.05192 (2017).

GAN에서 직접적으로 결과를 보여줄 수 있는 것은 역시나 이미지인 것 같다. cycleGAN도 그렇고, 이미지로 확 impact를 주니.. 안궁금할 수가 없는 것 같다. cycleGAN과 굉장히 유사한 개념을 기반으로 loss function을 정했고, network를 구성했다. 이 논문에서 cycleGAN과 비슷하게 paired data를 얻는 것이 어렵다는 점을 지목했다.

"To avoid costly paring, we address the task of discovering cross-domain relations given unpaired data"

DiscoGAN (Discovers cross-domain relations with GANs)이 풀고자하는 문제도 image-to-image translation으로 paired data가 없는 상태에서 one domain에서 다른 domain으로 mapping 하는 generative model을 구하는 것이다. 

이 논문에서는 3가지 형태의 NN구조를 설명하는데, 첫번째는 일반적인 GAN, 두번째는 reconstruction을 고려한 GNA, 마지막으로는 이 논문이 제시하는 DiscoGAN이다.

이 논문에서 (c)의 구조를 제안한 핵심 아이디어는 A->B로 B->A로 mapping을 제약하는 것이다. (a)는 A에서 B로 domain을 옮기면서 mode collapsing이 발생할 수 있고, (b)는 A에서 B로의 domain translation은 mode collapsing을 해결할 수 있지만, B에서 A로의 domain translation에 mode collapsing 문제가 생길 수 있다. 이 문제는 다음 그림에서 잘 설명하고 있다.

(a)가 ideal한 경우로 generative model은 mode collapsing문제 없이 domain translation을 잘하고 있다. (b)는 standard GAN에서 발견되는 문제로, mode collapsing이 발생한 결과이다. (c)는 A가 B의 mode에는 match가 되지만, domain B가 A의 mode중 하나만 연결을 하고 있다.

-> "However, this model lacks a constraint on mapping from B to A, and these two conditions alone does not guarantee a cross-domain relation because the mapping satisfying these constraints is one-directional. In other words, the mapping is an injection, not biinjection, and one-to-one correspondence is not guaranteed" (논문은 이점을 문제로 여겼다.)

논문에서는 reconstruction loss()를 추가한 경우에, reconstruction된 sample을 원본과 일치하도록 강제하더라도, 이런 변화는 mode collapse를 해결하지 못한다.

따라서, 논문은 (b)에서 generator와 discriminator를 추가해서 cycleGAN처럼 서로 다른 domain에서 생성된 거짓 data를 discriminator가 분류함으로써 adversarial learning을 구현했다. (constraint를 추가한 형태) 따라서, 전체 Loss는 다음과 같다.

"Now, this model is constrained by to  losses and  "

논문에서 다음과 같은 결과를 보여주고 있다. 매우 잘 학습이되어서 변환을 잘하고 있음을 보여주고있다.

(a,b)를 보면 남성 사진이 여성 사진으로 바뀌었다는 것을 볼 수 있다. (Translation of gender) 그리고 (c)는 금발이 black으로 black이 금발로 바뀌는 것을 확인할 수 있다. (d)는 eyeglass conversion, (e)는 gender와 hair color를 바꾼것, (f)는 hair color와 gender의 conversion을 계속해본 결과를 보여주고 있다. (A->B->A->B)

Keras로 Edges2shoes dataset을 학습시켜보았다.



batch size가 1이고 워낙 dataset이 큰지, 1 epoch 학습하는데 많은 시간이 걸리지만, 학습을 하면서 image-to-image translation이 잘 진행되고 있다는 것을 확인할 수 있다.

'Deep learning > GAN' 카테고리의 다른 글

starGAN  (0) 2018.07.25
Pix2Pix  (0) 2018.07.21
CycleGAN  (0) 2018.07.19
Super-resolution GAN (SRGAN)  (0) 2018.07.19
Conditional GAN  (0) 2018.06.15
Comments