논문리뷰

Arbitrary Style Transfer in Real-Time with Adaptive Instance Normalization

자월현 2021. 7. 8.

https://openaccess.thecvf.com/content_ICCV_2017/papers/Huang_Arbitrary_Style_Transfer_ICCV_2017_paper.pdf

 

# Abstract

Gatys et al. 에서 이미지를 다른 스타일로 바꾸는 "style transfer" algorithm을 소개

--> slow iterative optimization process로 인해 현실 세계 적용이 어려움.

Fast approximations with FFNN (feed-forward neural network)는 neural style transfer의 속도를 높이기 위해 제안되었으나 제한된 style만 적용가능. 

이 논문은 arbitrary style을 real-time으로 이미지에 적용하는 첫 논문이고, (AdaIN) adaptive instance normalization layer가 content feature의 mean, variance를 style feature의 mean, variance와 align 시키는 것을 도움으로써 가능케한다. 

이 외에도 content-style trade-off, style interpolation, color & spatial controls과 같은 single feed-forward neural network를 이용하는 많은 기법들을 가능하게 한다.

 

# Introduction

optimization-based framework의 flexibility와 feed-forward approaches의 speed를 합친 논문.

Feed-forward style transfer에서 매우 효율적으로 작동했던 Instance normalization (IN) layer에서 영감을 받았다. 

--> Instance normalization이 feature statistics를 normalize함으로써 style normalization을 수행하는데, 그럼으로써 image의 style information을 뽑아낼 수 있다. 이걸 이용해서 content input과 style input의 mean, variance가 서로 맞오록 조정한다. AdaIN은 transferring feature statistics를 통해 content와 style을 통합한다. 

 

# Related Work

1. Style transfer

non-photo-realistic rendering, texture synthesis and transfer에 뿌리를 두고있다.

이전에는 histogram matching on linear filter responses, non-parametric sampling 등을 이용했지만 low-level statistics에 의존적이다보니 semantic structure를 제대로 캐치 못하는 경우도 있었다. 

Convolutional layer에서 match feature statistics 하는 Gatys가 처음으로 볼만한 결과를 만들었구 Li~ 가 markov random field를 기반으로 하여 local pattern enforce하는 framework도 제안하였다. Ruder가 temporal constraint를 활용함으로써 비디오에서 style transfer하는 것도 해봤다.  

Wang은 multi-resolution architecture를 활용해서 granularity를 높였다.

Chen~이 training 때 보지 않은 arbitrary style을 style swap layer를 이용해 transfer한 경우도 있다. 

--> 이건 content에 가장 가까운 style feature를 patch-by-patch manner로 바꿔주는 역할을 한다. 그래서 시간이 좀 걸림.

 

그럼 loss function은 뭘 이용할까?

match second-order statistics between feature activations, captured by Gram matrix.

이외에도 MRF loss, adversarial loss, histogram loss, CORAL loss, MMD loss, distance between channel-wise mean and variance 가 있다.

--> match feature statistics between style image and synthesized image.

 

2. Deep generative image modeling

variational auto-encoders, auto-regressive models, GAN(generative adversarial networks)이 image generation을 잘하는데, GAN에 conditional generation, multi-stage processing, better training objectives등을 이용하여 더 개선하는 경우도 많다.

GAN도 style transfer나 cross-domain image generation에 쓰이기도 한다. 

 

# Background

1. Batch Normalization (BN)

Ioffe~ 가 제안한, normalizing feature statistics로 feed-forward network의 학습을 굉장히 쉽게해준 그 기술을 Batch Normalization이라고 함.

원래는 discriminative network의 학습을 도와주는 용도였는데, generative image modelling에도 효과만점이다.

즉 NxCxHxW batch가 있을 때 N,H,W에 대해 mean std를 구하는것.

보통 channel은 RGB일테니 mean std를 구함으로써 이미지가 3차원으로 줄어드는 것이다?

보통 mini-batch statistics를 적용하여, training과 inference간 차이를 유도되기도 하는데, Batch renormalization으로 그런 단점을 해결하였다. 또한 BN은 recomputing popular statistics in target domain 함으로써 domain shift를 줄이는 효과를 보이기도 한다.

 

2. Instance Normalization

IN은 channel 뿐만 아니라 각 sample에 대해서도 spatial dimension 정보들이 따로 계산된다.

 

3. Conditional Instance Normalization

learns a different set of parameters gamma and beta for each style s

network can generate images in different styles by using same convolutional parameters but different affine parameters in IN layers.

댓글