# A Review of Image Inpainting Methods Based on Deep Learning
## 4 Deep-Learning-Based Image Inpainting Algorithm
### Attention Mechanism
#### 4.3.2 Transformer
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Dataset** & **Reference** & **PSNR\(\uparrow\)** & **SSIM\(\uparrow\)** & **FID\(\downarrow\)** & **L1\(\downarrow\)/\%** & **Image Resolution** & **Mask Type** \\ \hline \multirow{8}{*}{Places2} & [29] & 18.91 & - & - & 8.6 & 256 \(\times\) 256 & Regular mask (25\%) \\  & [41] & - & 0.7809 & 15.19 & 9.94 & 256 \(\times\) 256 & Central area regular mask (25\%) \\  & [31] & 25.59 & 0.7850 & - & 1.93 & 256 \(\times\) 256 & Irregular mask [73] (20–30\%) \\ \cline{2-8}  & [43] & 19.69 & 0.8063 & - & 3.84 & & Central area regular mask (25\%) \\  & [43] & 24.7 & 0.8744 & - & 2.2 & 256 \(\times\) 256 & Random mask [75] \\ \cline{2-8}  & [44] & - & 0.8840 & 4.898 & 5.44 & 512 \(\times\) 512 & Random mask [75] \\ \cline{2-8}  & [42] & 25.1 & 0.8686 & 15.28 & & & Irregular mask [73] (20–30\%) \\  & [42] & 22.89 & 0.8063 & 19.99 & & 256 \(\times\) 256 & Irregular mask [73] (30–40\%) \\  & & 21.22 & 0.7391 & 25.88 & & & Irregular mask [73] (40–50\%) \\ \cline{2-8}  & [35] & 32.45 & 0.962 & & 1.15 & & Irregular mask [73] (20–30\%) \\  & [35] & 26.13 & 0.913 & & 2.44 & 128 \(\times\) 128 & Irregular mask [73] (30–40\%) \\  & & 24.36 & 0.874 & & 3.26 & & Irregular mask [73] (40–50\%) \\ \cline{2-8}  & [77] & 25.69 & 0.861 & 15.72 & & & Irregular mask [73] (20–30\%) \\  & [77] & 24.57 & 0.807 & 22.08 & & 256 \(\times\) 256 & Irregular mask [73] (30–40\%) \\  & & 22.28 & 0.712 & 28.74 & & & Irregular mask [73] (40–50\%) \\ \cline{2-8}  & [82] & 21.69 & 0.8130 & & 3.057 & 256 \(\times\) 256 & Central area regular mask (25\%) \\ \hline \multirow{2}{*}{Image Net} & [13] & 20.1 & - & - & 12.91 & 256 \(\times\) 256 & Central area regular mask (25\%) \\  & [35] & - & 0.5600 & - & 15.61 & 512 \(\times\) 512 & Central area regular mask (20\%) \\ \hline \multirow{2}{*}{Paris Street View} & [34] & 18 & - & - & 10.01 & 128 \(\times\) 128 & Central area regular mask (25\%) \\  & [36] & 26.51 & 0.9 & - & - & 256 \(\times\) 256 & Central area regular mask (25\%) \\ \hline \multirow{2}{*}{Celeb A} & [37] & 26.54 & 0.9310 & - & 1.83 & 256 \(\times\) 256 & Central area regular mask (25\%) \\  & [32] & 32.58 & 0.982 & - & 0.94 & 256 \(\times\) 256 & Irregular mask [73] (20–30\%) \\ \cline{2-8}  & [40] & 26.32 & 0.9100 & 25.51 & - & 256 \(\times\) 256 & Central area regular mask (25\%) \\  & [83] & 29.91 & 0.9345 & 0.959 & 0.98 & 256 \(\times\) 256 & Irregular mask [73] (20–30\%) \\ \hline \multirow{2}{*}{Celeb A-HQ} & [38] & 25.6 & 0.9010 & - & - & 256 \(\times\) 256 & Regular mask (25\%) \\  & [28] & 28.6 & 0.9290 & - & - & 256 \(\times\) 256 & Random mask [75] \\ \cline{2-8}  & [39] & 25.5 & 0.8980 & - & - & 256 \(\times\) 256 & Regular mask (25\%) \\  & [85] & 26.5 & 0.9280 & - & - & 256 \(\times\) 256 & Random mask [75] \\ \cline{2-8}  & [58] & 26.5 & 0.8932 & - & - & 256 \(\times\) 256 & Central area regular mask (25\%) \\ \hline \hline \end{tabular} Refer to the note in Table 2 for arrow indications.  
\end{table} 
Table 3: Quantitative evaluations of attention-based image inpainting methods. [PERSON] et al. [89] viewed Fourier transform as a lightweight alternative to self-attention in transformers. Fast Fourier convolution allows for a receptive field covering the entire image range. This method enables the image inpainting task to adapt to previously unseen high resolutions, offering an approach that is both innovative and more efficient in terms of parameter usage. However, whether Fourier convolution can interpret the deformations of these periodic signals remains a question. Fourier or dilated convolution is not the only choice for achieving a high receptive field; the transformer proposed in [25] abandons RNN and CNN structures, adopting a full attention mechanism that enhances the model's parallel computing ability, thereby speeding up model training and better handling dependencies between data in long sequences. [PERSON] et al. [90] introduced transformers to computer vision and achieved positive results in most visual tasks. [PERSON] et al.