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
Β Β βββ YOUR_DATASET_NAME
βββ 000001.jpg
βββ 000002.png
βββ ...
```
python main.py --dataset FFHQ --phase train --img_size 256 --batch_size 4 --n_total_image 6400 ```
```
python generate_video.py ```