blackLKA Inpainting Module.
It has been well explored that large receptive fields are important for image inpainting [1]}, [2]}. FFC used in LaMa [1]} has the global receptive field in the frequency domain. However, FFC fails to learn reliable feature relations between masked regions and unmasked ones.
On the other hand, various attention mechanisms with long-range dependencies are also incorporated into many inpainting methods [4]}, [5]}, [6]}. But these attention-based methods inevitably overfit certain resolutions without scale invariance.
To unify the advantages of both CNN and attention, we propose to inject large-kernel based convolutions to FTR.
We follow [7]} to decompose LKA with \(K\times K\)  receptive fields into a \(\lceil \frac{K}{d}\rceil \times \lceil \frac{K}{d}\rceil \)  Depth-Wise Convolution (DW-Conv2D) with dilation \(d\) , a \((2d-1)\times (2d-1)\)  depth-wise dilation convolution (DW-D-Conv2D), and a point-wise convolution (Conv2d 1\(\times \) 1) as in the lower right corner of Fig. REF . LKAs are incorporated into upsampling and downsampling blocks of FTR, which are orthogonal to FFCs. Because LKAs devote to learning better feature representations for masked regions with large receptive fields, FFCs tend to facilitate the global learning for regular textures in the frequency domain.
Furthermore,
we also use shortcuts with \(3\times 3\)  convolutions as Feed Forward Networks to ensure the generalization of LKA. Our empirical ablations in Tab. REF  show that LKAs work better than FFCs and vanilla convolutions. Thus LKA with \(K=21\)  is used in ZITS++.
