MGDBNet: a mask-guided dual-branch network for high-quality makeup transfer
摘要
This paper proposes MGDBNet (Mask-guided dual-branch makeup transfer network), a novel framework designed for complex makeup transfer scenarios. The method addresses key challenges such as background interference, artifact generation, and degradation of fine-grained makeup details. MGDBNet adopts a dual-branch architecture consisting of a global transfer branch and a local transfer branch. First, the global transfer branch incorporates a semantic mask-constrained global encoding and mask-guided hybrid attention mechanism (MC-GEHA Net), which leverages semantic masks to refine feature modeling and suppress background interference, thereby ensuring stable and consistent makeup style transfer throughout the encoding-decoding process. Second, in the local transfer branch, a multi-scale local style encoding module is developed by integrating a feature pyramid network and dynamic gating units to capture detailed regional makeup attributes. To further enhance the local transfer, a soft mask generation strategy based on color-distance joint decay is introduced, replacing rigid binary masks to enable smooth boundary transitions and reduce edge artifacts by dynamically balancing color similarity and spatial distance. Extensive experiments demonstrate that MGDBNet significantly outperforms existing state-of-the-art methods in terms of makeup fidelity and identity preservation, and, while achieving high-quality generation, also realizes a lightweight design with efficient inference. This allows MGDBNet to fully leverage high-performance computing (HPC) resources for large-scale training and ensures its potential for deployment in real-time applications. This study provides a new paradigm for makeup transfer and highlights its close relevance to the field of supercomputing.