## 2 Historical Background
### Image Inpainting of Cultural Heritage
[43] proposed a new method based on a multispectral imaging system, using infrared spectral information to separate and restore degraded areas in the visible spectrum, thereby improving the visual quality of degraded historical document images. [PERSON]. [4] proposed an automated system based on hyperspectral imaging for extracting and restoring scratches on the mural on the east wall of Cave 6 at Yungang Grottoes. The authors combined spectral imaging analysis with traditional algorithms, enhancing information through principal component analysis (PCA) and high-pass filtering, using multi-scale top-hat transformation, Otsu's segmentation, connected component analysis, and dilation operations to extract scratch information, and performing virtual restoration through an improved exemplar-based region filling method. The main drawbacks of spectral imaging analysis are its high equipment costs and the extremely large amount of data it generates, which require significant computational resources for processing and storage. It is also more effective at detecting minor damages but less effective for large-scale damage. Currently, machine learning-based image inpainting algorithms, ranging from basic statistical methods like linear regression to complex deep learning models, have been widely applied in the field of cultural heritage restoration, including support vector machines [7], nearest neighbor algorithms [8], clustering algorithms [9], Bayesian methods [10], random forests [10], GANs [11], and CNNs [12,13]. Many traditional machine learning algorithms are combined with traditional methods for image inpainting. Ref. [9] proposed digitally enhancing and restoring degraded mural images through weighted averaging of the original image and mean image, combined with line detection, K-means clustering, pixel averaging, and weighted averaging steps. Ref. [44] proposed a method that combines global and local feature weighting, performing virtual restoration of ancient murals based on structure guidance, using elastic net regularization-sparse representation model and neighborhood similarity estimation to enhance the consistency of global and local features in mural restoration. However, these methods still suffer from the same drawbacks as traditional algorithms mentioned above. Regarding deep learning-based image inpainting methods, they currently offer the best performance and effectiveness in the field of cultural heritage image restoration. These methods excel in restoring complex image structures by learning extensive information from large datasets and typically treat image inpainting as a conditional image generation problem [45], where known pixels are considered as conditions. Ref. [12] proposed the Coherent Semantic Attention (CSA) algorithm, which uses an attention mechanism to find similar regions and utilizes the surrounding areas' similar semantic information to restore the image. Although this method increases the difficulty and time of training, it better preserves the contextual structure of the image. Ref. [18] proposed the SeparaFill method, based on GANs and U-Net, which divides the mural image restoration process into two steps: contour inpainting and content filling. The results show that this method outperforms existing techniques in terms of the restoration effect and detail preservation. Ref. [11] proposed a Sketch-Guided Restoration Generative Adversarial Network (SGRGAN) framework for restoring Chinese landscape paintings, resulting in images that better match human visual perception. Ref. [13] proposed a GAN model for restoring Dunhuang mural images, improving the restoration effect through parallel dual convolution and ternary discriminators. Ref. [46] proposed an image inpainting method based on U-Net, MobileNet, and Pix2 pix for restoring the colored paintings on weathered beams in the Forbidden City, dividing the paintings into three parts: background, golden edges, and dragon patterns, to be restored separately. The results showed good color and detail restoration.