# Structure-Guided Image Inpainting Based on Multi-Scale Attention Pyramid Network
## 5 Conclusions and Future Work  
Current single-view restoration approaches suffer from low image information utilization and subpar repair effects. To enhance image inpainting quality, this paper introduces a structure-guided multi-scale attention pyramid network for image inpainting. This network comprises a structure repair network and a multi-scale attention pyramid semantic repair network. The former achieves constrained structure prediction through a dual-branch U-Net, and the generated structural view serves as auxiliary information for the latter. The latter network exploits the pyramid structure to extract multi-scale features of the image, facilitating feature interaction within the attention feature fusion module. Moreover, the separable gated convolution strategy used during feature extraction minimizes the impact of invalid information in missing regions, ultimately generating accurate and reasonable features for high-quality image inpainting. In the experimental section, widely-used benchmark datasets such as Paris Street View and CelebA were employed. Quantitative and qualitative comparisons with various methods demonstrate the superiority of the proposed method over existing approaches. Ablation studies were conducted by setting a baseline model and incrementally adding the mechanisms proposed in this paper, comparing each step's results to the new baseline. The analysis of results conclusively demonstrates the effectiveness of the proposed multi-view restoration strategy, separable gated convolution strategy, and multi-scale attention feature fusion strategy. However, despite these advancements, the proposed method does face several challenges. Maintaining consistent texture and structural details in the inpainted regions remains difficult, particularly when dealing with high-contrast edges or large missing areas. The boundaries between the inpainted area and the surrounding regions can sometimes exhibit artifacts, such as visible seams or color mismatches. Moreover, ensuring that the \begin{table}
\begin{tabular}{c c|c c c c} \hline \hline \multirow{2}{*}{**Metrics**} & \multicolumn{3}{c}{**Methods**} \\ \cline{3-6}  & & **Baseline** & **Test1** & **Test2** & **Test3** \\ \hline \multirow{5}{*}{PSNR\(\uparrow\)} & (0.1,0.2] & 30.3147 & 31.4310 & 32.9230 & **33.4027** \\  & (0.2,0.3] & 27.3137 & 27.6520 & 28.6176 & **29.9143** \\  & (0.3,0.4] & 25.2185 & 25.9490 & 26.5112 & **27.7393** \\  & (0.4,0.5] & 23.6249 & 23.9725 & 24.8427 & **25.9754** \\  & (0.5,0.6] & 21.0041 & 21.3820 & 21.7296 & **22.1812** \\ \hline \multirow{5}{*}{SSIM\(\uparrow\)} & (0.1,0.2] & 0.9310 & 0.9473 & 0.9572 & **0.9605** \\  & (0.2,0.3] & 0.8897 & 0.8977 & 0.9066 & **0.9124** \\  & (0.3,0.4] & 0.8204 & 0.8544 & 0.8597 & **0.8701** \\  & (0.4,0.5] & 0.7882 & 0.7933 & 0.8067 & **0.8196** \\  & (0.5,0.6] & 0.6442 & 0.6631 & 0.6793 & **0.7067** \\ \hline \multirow{5}{*}{MAE\(\downarrow\)} & (0.1,0.2] & 0.0169 & 0.0156 & 0.0139 & **0.0124** \\  & (0.2,0.3] & 0.0288 & 0.0258 & 0.0244 & **0.0223** \\  & (0.3,0.4] & 0.0396 & 0.0353 & 0.0354 & **0.0322** \\  & (0.4,0.5] & 0.0463 & 0.0461 & 0.0402 & **0.0342** \\  & (0.5,0.6] & 0.0710 & 0.0658 & 0.0621 & **0.0586** \\ \hline \multirow{5}{*}{FID\(\downarrow\)} & (0.1,0.2] & 30.9133 & 27.0090 & 26.0453 & **15.5520** \\  & (0.2,0.3] & 54.8700 & 49.4695 & 48.9542 & **29.4313** \\  & (0.3,0.4] & 58.6864 & 52.8904 & 47.9085 & **41.2813** \\  & (0.4,0.5] & 80.6867 & 74.0636 & 66.7667 & **61.8977** \\  & (0.5,0.6] & 89.2369 & 83.0700 & 79.8606 & **75.9387** \\ \hline
**Parameters\(\downarrow\)** & & **19.3M** & 30.9M & 33.2M & 23.9M \\ \hline \hline \end{tabular}
\end{table} 
Table 3: This is the experimental data of the proposed image inpainting method in this paper with several other image inpainting methods on the Paris Street View dataset, where the second column represents the percentage of damaged area in the damaged image. The ’M’ here stands for ’million’, representing the number of parameters that need to be learned in the network.