Abstract

주어진 text description에서 이미지를 생성하는 것은 두 가지 목표를 가지고 있다.

  1. visual realism

    얼마나 이미지를 정교하게 만들었는가

  2. semantic consistency

    이미지가 주어진 text description을 잘 반영했는가.

GAN을 사용해서 이 문제를 해결하고자 하는 노력이 많이 있었다. 하지만 좋은 성능을 보이지 못했고, 이 논문에서 novel global-local attentive와 semantic-preserving text-to-image-to-text framework인 MirrorGAN을 제안한다.

MirrorGAN은 semantic text embedding module(STEM), global-local collaborative attentive module for cascaded image generation(GLAM), semantic text regeneration and alignment module (STREAM) 이라는 세 모듈로 구성되어 있다.

STEM은 word, sentence-level embedding을 만들고, GLAM은 target image를 다양하고 의미론적으로 유의미하게 만들기 위해 local word attention과 global sentence attention을 사용한다.

STREAM은 생성된 이미지로부터 다시 text description을 생성함으로써 의미론적으로 잘 맞는지 확인한다.

1. Introduction

기존의 T2I 모델들은 text와 상관없는 이미지를 만드는 경우가 많았기 때문에 NLP, vision 모두에서 연구 대상이었다. GAN으로 image를 생성하는 것이 좋은 성능을 보였으나 여전히 text를 input으로 넣었을 때에는 좋지 못했다.

이에 대해서 수많은 연구들이 진행되었지만, text와 image 사이의 gap으로 인해서 어려움을 겪었다. 최근에는 attention mechanism이 이러한 문제를 해결하는 것처럼 보였지만 word-level attention을 홀로 사용하는 것은 text와 image modalities 사이의 다양성으로 인해 global semantic consistency를 보장하지 못했다.

T2I는 image captioning의 반대 문제이다. 따라서 이를 활용하기 때문에 MirroGAN이라고 부르게 된다.(뒤의 모델을 보면 이해가 될 것이다.) 앞서 말한 것과 같이 MirroGAN은 STEM, GLAM, STREAM을 가지고 있다.

모델을 end-to-end로 학습하기 위해서 visual realism adversarial loss 와 text-image paired semantic consistency adversarial loss를 가지고 있다.

내용을 요약하면 다음과 같다.

  • T2I와 I2T를 동시에 활용하기 때문에 MirrorGAN이라고 부른다.
  • preserve cross-domain semantic consistency와 smoothen the generative process를 위해서 global-local collaborative attention 모델을 제안한다.
  • GAN에서 사용하던 loss를 사용하지 않고 다른 loss를 사용한다.

2. Related work

생략

3. MirrorGAN for text-to-image generation

Figure 2는 MirrorGAN의 전반적인 구조다.

3.1 STEM : Semantic Text Embedding Medule

text description을 local word-level feature과 global sentence-level feature으로 만든다. text desciption T로 부터 semantic embedding를 추출하기 위해서 RNN을 사용한다. Text의 다양성 때문에 few permutation을 가진 text는 비슷한 의미를 공유한다. 따라서 conditioning augmentation 방법을 사용한다. robustness를 부여 할 수 있다.

3.2 GLAM: Global-Local collaborative Attentive Module in Cascaded Image Generators

세 개의 image generation network를 연속적으로 쌓음으로써 multi-stage cascaded generator를 구축한다. 이는 좋은 성능을 낸다.

word-level attention model으로 word-context feature를 생성한다. 이 것은 word embedding w와 visual feature f 를 input으로 넣어준다. word embedding w는 visual feature의 semantic space로 변환한다. 그리고 이 것은 이전 visual feature와 곱해진다. 최종적으로 내적 연산을 통해서 word-context feature를 얻는다.

sentence-level attention model로 global constraint를 강화한다. augmented sentece vector는 visual feature의 semantic space로 변환한다. 그 다음에 element-wise 곱을 한다.

3.3 STREAM: Semantic Text REgeneration and Alignment Module

위에서 설명한 것과 같이, MirrorGAN은 주어진 text 설명과 의미론적으로 일치하게 만들기 위해서 생성된 image에서 text 설명을 다시 생성하는 STREAM 단계를 가지고 있다. 널리 사용하는 image caption framework 기반의 encoder-decoder를 사용한다. 더 나은 image captioning model을 사용하면 더 좋은 결과를 얻을 수 있을 것이다. 그러나 이번 연구에서는 제안한 아이디어를 확인하기 위해서 간단한 구조를 사용했다.

encoder는 ImageNet으로 pretrain된 CNN을 사용하고 decoder는 RNN을 사용한다. 최종 단계에서 생성된 image를 CNN encoder와 RNN decoder에 넣어준다.

pre-trained STREAM은 MirrorGAN이 더 안정적인 훈련 과정과 수렴속도를 빠르게 만든다.

3.4 Objective functions

MirrorGAN의 훈련과정에서 G와 D가 서로 훈련이 된다.

G는 위 loss를 최소화함으로써 훈련이 된다. Ii는 생성된 의미지를 의미한다. 첫 번째 term은 visual realism adversarial loss이고 image가 visual 쪽으로 real인지 fake인지를 판단한다. 두 번째 term은 text와 image가 의미론적으로 일치하는 가를 나타낸다.

여기에 STREAM loss를 추가한다.

최종 G Loss는 다음과 같이 사용한다.

Discriminator loss는 위와 같이 사용한다.

4. Experiments

+ Recent posts