# A Review of Image Inpainting Methods Based on Deep Learning
## 4 Deep-Learning-Based Image Inpainting Algorithm
### Boundary-Center Inpainting Method
#### 4.4.2 Single-Stage Network Structure  
Multistage inpainting models divide the image inpainting task into several subtasks. While they have demonstrated good inpainting results, they also increase the model's complexity and computational load. Additionally, manually defining each stage's task makes them less intelligent compared to end-to-end single-stage models. The end-to-end single-stage inpainting model regresses the multistage task into a single-stage task, significantly reducing model complexity and making the model smarter. Single-stage models do not rely on stacking networks to improve quality, so they need to make full use of multiscale features. [PERSON] et al. [81] regressed the previous coarse-to-fine two-stage structure into a single GAN network. They used a pyramid context encoder combined with a multiscale decoder, incorporating an attention transfer mechanism to fully utilize multiscale features. This led to better inpainting results in image structure and color. The network structure is shown in Figure 8.  
The attention transfer mechanism, as shown in Figure 9 [107], introduces a single-stage model that utilizes the fusion of multi-scale dilated convolution layers with different dilation rates to achieve a broader and more effective receptive field. This makes it easier to restore large areas in incomplete images. \begin{table}
\begin{tabular}{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{4}{*}{Places2} & [41] & 26.44 & 0.862 & 2.75 & 256 \(\times\) 256 & Irregular mask (30–40\%) \\  & [45] & 25.66 & 0.914 & & 256 \(\times\) 256 & Irregular mask (20–30\%) \\ \cline{2-6}  & [52] & 26.29 & 0.898 & 1.56 & & \\  & & 24.01 & 0.842 & 2.38 & 256 \(\times\) 256 & Irregular mask (30–30\%) \\ \cline{2-6}  & [73] & 34.78 & 0.975 & 0.36 & & \\  & & 27.71 & 0.920 & 1.31 & & Irregular mask \\ \hline Paris Street View & [26] & 19.72 & & 8.11 & 128 \(\times\) 128 & Central area regular mask (25\%) \\ \hline \hline \end{tabular} Refer to the note in Table 2 for arrow indications.  
\end{table} 
Table 6: Quantitative Evaluations of boundary-center inpainting methods. Figure 8: Network model diagram. Compared to directly regressing to a single-stage network, some methods continue to use the two-stage method thought, splitting the image into structural and textural elements, from rough drawing to detailed inpainting, to realize the single-stage model. The authors of [80] used two parallel branches in place of the sequential dual-stage structure to handle the structure and texture features of the input image separately. [PERSON] et al. [108] incorporated multimodal information, including RGB images, edge textures, and semantic segmentation, in a single-stage network for multiscale spatially aware feature fusion to guide the image inpainting task. To address the large computational load of dual-stage models, [PERSON] et al. [72] introduced a new network structure, PEPSI, which can reduce the number of convolution operations by adopting a structure composed of a single shared encoding network and a parallel decoding network with coarse and inpainting paths. The coarse path produces a preliminary inpainting result, using this result to train the encoding network to predict the features of the context attention module. Compared to traditional coarse-to-fine networks, PEPSI not only reduces the number of convolution operations by nearly half but also outperforms other models in terms of test time and qualitative scores. To capture global context information at a lower hardware cost, [PERSON] et al. 's method [73] based on [PERSON] et al. 's method [72] further introduces a novel rate-adaptive dilated convolution layer. This layer uses universal weights but produces dynamic features based on the given dilation rate, further reducing resource consumption.