计算机工程与应用 ›› 2025, Vol. 61 ›› Issue (8): 155-162.DOI: 10.3778/j.issn.1002-8331.2312-0137

• 模式识别与人工智能 • 上一篇    下一篇

任务分解与自适应面部聚焦的“换脸”方法

谭台哲,蒋林轩,梁邦康,郑乐镔   

  1. 1.广东工业大学 计算机学院,广州 510006
    2.河源市湾区数字经济技术创新中心,广东 河源 517000
    3.湖南大学 土木工程学院,长沙 410082
  • 出版日期:2025-04-15 发布日期:2025-04-15

Face Swapping with Task Decomposition and Adaptive Facial Attention

TAN Taizhe, JIANG Linxuan, LIANG Bangkang, ZHENG Lebin   

  1. 1.School of Computer Science, Guangdong University of Technology, Guangzhou 510006, China
    2.Heyuan Bay Area Digital Economy Technology Innovation Center, Heyuan, Guangdong 517000, China
    3.School of Civil Engineering, Hunan University, Changsha 410082, China
  • Online:2025-04-15 Published:2025-04-15

摘要: 现有“换脸”算法已取得显著进步,但仍难以达成身份传输和背景保持之间的最佳平衡。实际应用中,身份特征易被传递到非面部区域,导致背景失真,换脸效果不明显。同时,由于身份-背景损失之间优化目标的冲突性,换脸后的面部光照,额头发丝等细节也易丢失,缺乏真实感;为缓解上述问题,提出任务分解与自适应面部聚焦的“换脸”方法TDSwap。该方法通过自适应面部聚焦模块,将身份特征传输限制在面部区域内,强化个人身份特征。采用任务分解策略和模块,缓解身份特征损失与全图重构损失之间的冲突,避免陷入局部最优。在FaceForensics++数据集上的实验结果表明,该方法在身份相似度和峰值信噪比方面表现出色,其指标分别达到0.75和28.67,展示了该方法在身份-背景平衡方面的优越性。

关键词: 换脸, 生成对抗网络, 注意力机制, 任务分解

Abstract: Current “face-swapping” algorithms have made progress but still struggle to balance identity transmission and background maintenance. Identity features often leak into non-facial areas, distorting the background and reducing the effectiveness of the swap. Conflicts between identity and background losses also lead to loss of facial details like lighting and hair, reducing realism. To address these issues, this paper proposes TDSwap, a method that combines task decomposition with adaptive facial focusing. This approach restricts identity feature transmission to the face, enhancing identity characteristics, and resolves conflicts between losses to avoid local optima. Experiments on the FaceForensics++ dataset show TDSwap’s superiority in identity-background balance, achieving impressive results in identity similarity and peak signal-to-noise ratio.

Key words: face swapping, generative adversarial network, attention mechanism, task decomposition