Image harmonization aims to produce visually harmonious composite images by adjusting the foreground appearance to be compatible with the background. When the composite image has photographic foreground and painterly background, the task is called painterly image harmonization. There are only few works on this task, which are either time-consuming or weak in generating well-harmonized results. In this work, we propose a novel painterly harmonization network consisting of a dual-domain generator and a dual-domain discriminator, which harmonizes the composite image in both spatial domain and frequency domain. The dual-domain generator performs harmonization by using AdaIn modules in the spatial domain and our proposed ResFFT modules in the frequency domain. The dual-domain discriminator attempts to distinguish the inharmonious patches based on the spatial feature and frequency feature of each patch, which can enhance the ability of generator in an adversarial manner. Extensive experiments on the benchmark dataset show the effectiveness of our method. Our code and model are available at https://github.com/bcmi/PHDNet-Painterly-Image-Harmonization.
翻译:图像统一的目的是通过调整表面表面外观,使其与背景相容,产生视觉和谐的复合图像。当复合图像具有摄影前景和画家背景时,任务被称为画家图像统一。在这项工作上,只有很少的作品,在产生良好协调的结果方面耗费时间或薄弱。在这项工作中,我们提议建立一个由双面生成器和双面区分器组成的新的画家统一网络,它能协调空间域和频率域的复合图像。双面生成器通过使用空间域中的AdaIn模块和我们提议的频率域中的ResFFT模块进行协调统一。基于每个补丁的空间特征和频率特征的双重歧视尝试,可以提高发电机的能力。关于基准数据集的广泛实验显示我们方法的有效性。我们的代码和模型可在http://github.com/bcmi/PHDNet-Painterly-Image-Harmonization上查阅。