Abstract:Thangka is a prominent form of Tibetan Buddhist culture and traditional art, possessing unique historical significance and artistic value, and constituting a core component of Chinese cultural heritage. Due to factors such as natural erosion and inadequate preservation conditions, many Thangka images have suffered varying degrees of damage. Therefore, the restoration of Thangka images is of great importance for the preservation and continuity of traditional culture. Traditional Thangka restoration primarily relies on manual methods, which are time-consuming, labor-intensive, and inefficient. To address these issues, this study proposes a sketch-guided two-stage generative method for Thangka image inpainting. The method takes the damaged image, its corresponding mask, and a user-drawn structural sketch as input. It utilizes structural information from the sketch to guide the inpainting process, making the restoration results more faithful to the original composition. The inpainting process is divided into two stages: coarse inpainting and fine inpainting. In the coarse stage, multi-layer downsampling is employed to extract global structural features, and dilated residual blocks are introduced to expand the receptive field, enabling the rapid completion of missing regions. The refinement stage integrates perceptual loss and adversarial loss for joint optimization to enhance the overall visual quality of the inpainted image. Experimental results are conducted on a self-constructed Thangka dataset, comparing the proposed method with four other mainstream image inpainting methods through both quantitative and qualitative analyses. The experimental results demonstrate that the proposed method achieves excellent inpainting performance, outperforming the other methods across four key evaluation metrics: peak signal-to-noise ratio (PSNR), structural similarity index (SSIM), Fréchet inception distance (FID), and learned perceptual image patch similarity (LPIPS). This study provides a feasible technical solution for the digital preservation and continuity of Thangka and offers valuable insights for the image restoration of similar types of intangible cultural heritage.