yoyo-nb / Thin-Plate-Spline-Motion-Model

[CVPR 2022] Thin-Plate Spline Motion Model for Image Animation.
MIT License
3.39k stars 555 forks source link

about self.norm #25

Open SEUvictor opened 2 years ago

SEUvictor commented 2 years ago

Hi,

Thanks for your excellent work.

Why does the regularization method in the model use nn.InstanceNorm2d instead of BN?

yoyo-nb commented 2 years ago

I think the image animation task is a generation task, since there is only one input source image, it is important to preserve the style (identity). And using IN helps to preserve the style (identity) of the source image.

The reason for not using BN: on one hand, I don't have too many GPUs, so the batchsize can't be set too large, only 28. Using BN with small batchsize may have a negative impact on model training. On the other hand, I think BN is more suitable for classification, regression and other task that the dataset has common laws, while the generation task generates results with various of different characteristics, so BN is not suitable for generation task (especially when the batchsize is small).