AdaIN-TF icon indicating copy to clipboard operation
AdaIN-TF copied to clipboard

Why use normalised_vgg model as the encoder ?

Open JunbinWang opened this issue 6 years ago • 2 comments

Hi Eridgd,

I saw most of the AdaIN-TF implementation used the normalised-vgg19 network as the encoder (include the original author)

Do you know the difference between normalised_vgg network and original VGG-19 network? And can we implement AdaIN-TF with the original vgg-19 network as encoder ?

JunbinWang avatar May 16 '18 20:05 JunbinWang

Hi,

The normalized VGG differs in three ways from standard VGG19:

  • Pre-processing is done as part of the network in the first layer. It expects RGB in [0,1], scales that with 1x1 conv filters to [0,255] and changes order to BGR, then subtracts the mean as a bias.

  • According to the authors of the caffe version, the weights "are scaled such that the mean activation of each filter over images and positions is equal to one."

  • Reflect padding is used instead of zero padding to avoid 'border artifacts'.

I believe that I tried using the original VGG19 from Keras as the encoder instead and got more or less the same results as the normalized version. See vgg.py under this branch https://github.com/eridgd/AdaIN-TF/tree/vgg_keras

eridgd avatar May 16 '18 20:05 eridgd

@eridgd Thank you very much for your reply! In that case, I think I can use the original VGG-network to re-implement it... Thanks again ! I will check your code again~

JunbinWang avatar May 16 '18 20:05 JunbinWang