Sentence-based Image Editing (SIE) aims to deploy natural language to edit an image. Offering potentials to reduce expensive manual editing, SIE has attracted much interest recently. However, existing methods can hardly produce accurate editing and even lead to failures in attribute editing when the query sentence is with multiple editable attributes. To cope with this problem, by focusing on enhancing the difference between attributes, this paper proposes a novel model called Contrastive Attention Generative Adversarial Network (CA-GAN), which is inspired from contrastive training. Specifically, we first design a novel contrastive attention module to enlarge the editing difference between random combinations of attributes which are formed during training. We then construct an attribute discriminator to ensure effective editing on each attribute. A series of experiments show that our method can generate very encouraging results in sentence-based image editing with multiple attributes on CUB and COCO dataset. Our code is available at https://github.com/Zlq2021/CA-GAN
翻译:基于句子的图像编辑( SIE) 旨在运用自然语言编辑图像。 提供减少昂贵手工编辑的潜力, SIE最近引起了很大的兴趣。 但是, 现有的方法很难产生准确的编辑, 甚至导致属性编辑失败, 当查询句带有多个可编辑属性时。 为应对这一问题, 本文通过注重增强属性之间的差别, 提出了一个新颖的模型, 名为“ 矛盾关注生成辅助网络 ” ( CA- GAN), 它来自对比性培训的启发。 具体地说, 我们首先设计了一个新的对比式关注模块, 以扩大在培训中形成的属性随机组合之间的编辑差异。 然后我们建立一个属性歧视器, 以确保每个属性的有效编辑。 一系列实验显示, 我们的方法可以在CUB 和 COCO 数据集的多个属性的基于句式图像编辑中产生非常令人鼓舞的结果。 我们的代码可以在 https://github. com/ Zlq2021/ CA- GAN 上查阅 。