Using a trained inpainting generator (101), a low-resolution inpainted image and a set of attention scores are generated from the low-resolution image (806). The attention scores represent the similarity between inside-mask regions and outside-mask regions. A high-frequency residual image is ...