# A Review of Image Inpainting Methods Based on Deep Learning
## 4 Deep-Learning-Based Image Inpainting Algorithm
### Boundary-Center Inpainting Method
#### 4.4.3 Diffusion Models  
In recent times, diffusion models have emerged as prominent tools in the realm of image generation. As suggested by several studies [109], in certain applications, the generative power of diffusion models has overshadowed that of generative adversarial networks \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 Places2 & [12] & & 0.7809 & 15.19 & 9.94 & 256 \(\times\) 256 & Central area regular mask (25\%) \\ Paris Street View & [25] & 25 & 0.8563 & & 256 \(\times\) 256 & Central area regular mask (25\%) \\ Celeb A & [40] & 26.32 & 0.9100 & 25.51 & & 256 \(\times\) 256 & Central area regular mask (25\%) \\ \hline \multirow{3}{*}{Celeb A-HQ} & \multirow{3}{*}{[38]} & 25.6 & 0.9010 & - & - & \multirow{3}{*}{256 \(\times\) 256} & Regular mask (25\%) \\  & & 28.6 & 0.9290 & - & - & & & Random mask [75] \\ \cline{1-1} \cline{2-7}  & & \multirow{3}{*}{[39]} & 25.5 & 0.8980 & - & - & \multirow{3}{*}{256 \(\times\) 256} & Regular mask (25\%) \\  & & 28.5 & 0.9280 & - & - & & & Random mask [75] \\ \hline \hline \end{tabular} Refer to the note in Table 2 for arrow indications.  
\end{table} 
Table 7: Quantitative assessments of single-stage inpainting methods. Figure 9: Attention transfer mechanism diagram. (GANs). Many researchers believe that diffusion models have the potential to represent the next generation of image generation models. In the closely related field of image inpainting, some studies [17; 18; 109; 110; 111; 112; 113; 114; 115; 116] have begun to explore the use of diffusion models for image inpainting. Diffusion models [109] can be divided into two processes: the forward process, which continuously adds noise to the real image (diffusion), and the reverse process, which continuously removes noise (reverse diffusion). As illustrated in Figure 10, the diffusion process proceeds from right to left, representing the gradual addition of noise to an image. This noise is superimposed, and its influence is immediate; hence, the diffusion process is a Markov process. If you sample an image from the real dataset and add noise to it multiple times, the image becomes progressively more noisy. When the noise level is high enough, it converges to a standard normal distribution. During the training process, the noise added at each step is known, and according to the properties of the Markov process, it can be recursively derived. The main focus of the diffusion process is the derivation of noise addition and its distribution. The reverse diffusion process goes from left to right, representing the inpainting of an image from noise. If one knows the distribution of the noise under given conditions, it is possible to sample from any noisy image multiple times to produce an image, achieving the goal of image generation. However, because this distribution is known to be challenging, networks are trained to approximate it. Although this distribution might not be known precisely, it can be expressed and derived from other variables, guiding the training process. [PERSON] et al. [110] employed unsupervised posterior estimation, demonstrating the potential of diffusion models for image inpainting. [PERSON] et al. [112] utilized an unconditional generation method, encoding images to be restored with diffusion models and showcasing their potential in lossy image compression. [PERSON] et al. [111] verified that the performance of diffusion models surpassed that of GANs and further refined image inpainting based on diffusion models. [PERSON] et al. [113] sampled from undamaged areas of an image to replace the reverse diffusion process in the diffusion model. This model can handle irregular and free-form damage. It represents a relatively successful modification of the diffusion model used in image inpainting tasks, outperforming both GANs and VAEs. [PERSON] et al.