chenhsuanlin / spatial-transformer-GAN

ST-GAN: Spatial Transformer Generative Adversarial Networks for Image Compositing :eyeglasses: (CVPR 2018)
MIT License
334 stars 72 forks source link

In the indoor eval code, what is pInit and why is it passed to the model? #14

Closed hanrelan closed 5 years ago

hanrelan commented 5 years ago

When looking at the indoor evaluation/test code, I noticed that in addition to the background and foreground mask, there is an additional "pInit" that's passed to the model. This seems to the X,Y translation of the pertubation. Why is this passed to the model?

If I'm running the eval on my own background + foreground mask (manually created by compositing a random indoor item with a background), what values should pInit take?

Thanks!

chenhsuanlin commented 5 years ago

pInit is the initial warp parameters of the foreground, so with only the translation components active, it defines the initial composite location. This pInit can take an arbitrary value depending on how you define your identity warp, since the subsequently predicted dp are conditioned on the resulting images, not what the value pInit actually takes.