Spatial unbiased GANs — Simple TensorFlow Implementation [Paper]

: Toward Spatially Unbiased Generative Models (ICCV 2021)

Abstract Recent image generation models show remarkable generation performance. However, they mirror strong location preference in datasets, which we call spatial bias. Therefore, generators render poor samples at unseen locations and scales. We argue that the generators rely on their implicit positional encoding to render spatial content. From our observations, the generator’s implicit positional encoding is translation-variant, making the generator spatially biased. To address this issue, we propose injecting explicit positional encoding at each scale of the generator. By learning the spatially unbiased generator, we facilitate the robust use of generators in multiple tasks, such as GAN inversion, multi-scale generation, generation of arbitrary sizes and aspect ratios. Furthermore, we show that our method can also be applied to denoising diffusion probabilistic models.


  • Tensorflow >= 2.x


├── dataset
       ├── 000001.jpg 
       ├── 000002.png
       └── ...


> python --dataset FFHQ --phase train --img_size 256 --batch_size 4 --n_total_image 6400

Generate Video

> python


  • FID: 3.81 (6.4M images, 8GPU, each 4 batch size)



Junho Kim


View Github