Image matting and image harmonization are two important tasks in image composition. Image matting, aiming to achieve foreground boundary details, and image harmonization, aiming to make the background compatible with the foreground, are both promising yet challenging tasks. Previous works consider optimizing these two tasks separately, which may lead to a sub-optimal solution. We propose to optimize matting and harmonization simultaneously to get better performance on both the two tasks and achieve more natural results. We propose a new Generative Adversarial (GAN) framework which optimizing the matting network and the harmonization network based on a self-attention discriminator. The discriminator is required to distinguish the natural images from different types of fake synthesis images. Extensive experiments on our constructed dataset demonstrate the effectiveness of our proposed method. Our dataset and dataset generating pipeline can be found in \url{https://git.io/HaMaGAN}
翻译:图像交配和图像统一是图像构成的两个重要任务。图像交配的目的是实现前景边界细节和图像协调,目的是使背景与前景相容,两者都是充满希望但富有挑战性的任务。先前的工作考虑分别优化这两项任务,这可能导致一个次优化的解决办法。我们提议同时优化交配和统一,以便在这两项任务上取得更好的业绩,并取得更自然的结果。我们提议一个新的基因对齐框架(GAN),以优化交配网络和基于自我关注歧视器的统一网络。需要歧视者将自然图像与不同类型假合成图像区分开来。关于我们构建的数据集的广泛实验显示了我们拟议方法的有效性。我们在\url{https://git.io/HaMaGAN}中可以找到生成管道的数据集和数据集。