Author Login Chief Editor Login Reviewer Login Editor Login Remote Office

Computer Engineering

   

Deformable Sketch-Guided Image Inpainting Method

  

  • Published:2025-10-16

基于可变形草图引导的图像修复方法

Abstract: Sketch-guided image inpainting holds significant application value in photo restoration and creative editing but faces dual challenges of scarce user sketch data and restoration distortion caused by geometric deviations. Existing methods rely on edge detection to generate pseudo-sketches while neglecting user-drawn deviations (e.g., hand tremors, stroke breaks), leading to structural misalignment and detail blurring in complex scenes. To address these challenges, this study proposes an innovative framework combining a deformable sketch generation network with dual-stage guided inpainting. First, a deformable sketch generation network is constructed to model typical hand-drawn deviations, generating a large-scale sketch-image paired dataset with realistic geometric deformation features, effectively alleviating data scarcity. Second, a two-stage inpainting framework is designed: the first stage corrects geometric misalignment and repairs structural breaks in input sketches to optimize the sketches, while the second stage effectively integrates the optimized sketch information into the inpainting network to achieve collaborative optimization of global structural constraints and local texture generation. Experiments on benchmark datasets validate the method's effectiveness, achieving a peak signal-to-noise ratio (PSNR) of 25.78 dB and a structural similarity index (SSIM) of 0.852 on the CelebA-HQ dataset. The results fully demonstrate that this method effectively addresses the challenges of scarce user sketch data and geometric deviations while significantly improving the structural accuracy and perceptual quality of sketch-guided image inpainting.

摘要: 草图引导的图像修复技术在照片修复、创意编辑等领域具有重要的应用价值,但面临用户草图数据稀缺与几何偏差导致的修复失真双重挑战.现有方法依赖边缘检测生成伪草图,但忽略用户手绘偏差(如手抖、笔触断裂),导致复杂场景下结构错位与细节模糊.针对上述挑战,该研究提出一种联合可变形草图生成网络与双阶段引导修复的创新框架.首先构建可变形草图生成网络,通过建模典型手绘偏差,生成具有真实几何变形特征的大规模草图-图像配对数据集,有效缓解数据稀缺问题;其次设计两阶段修复框架包含:第一阶段针对用户输入草图进行几何失准校正与结构断裂修复,实现草图优化,第二阶段将优化后的草图信息有效融入修复网络,实现全局结构约束与局部纹理生成的协同优化.通过在基准数据集上的实验验证了该方法的有效性,在CelebA-HQ数据集上,该方法取得峰值信噪比25.78dB、结构相似性0.852.实验充分证明,该方法有效解决了用户草图数据稀缺与几何偏差问题,显著提升了草图引导图像修复在结构准确性和感知质量方面的性能.