考虑到在实际的语料中,与视觉内容相关的词汇一般与体现语言风格相关的词汇共存,使得风格化记忆模块难以学习到干净的风格化语料。我们在本文中提出一种句子分解算法,分离与视觉内容相关的部分以及与语言风格相关的部分。 二.方法 方法概览 MemCap 模型包含风格化记忆模块 M,风格化图像描述模块 C,图片场景图生成器 E,句子场景图生成器 F 以及风格化句子分解模块 P,如图 3 所示。风格化记忆模块将场景图作为输入,检索与场景图有关的风格化知识 m。这部分知识与场景图送入图像描述模块 C 中,生成最终的描述。 由于本文方法只使用未配对的风格化句子进行微调,我们将风格化的句子分解为与内容相关的部分 W_c 和与风格相关的部分 W_s,并将 W_c 转换为场景图,作为 M 和 C 的输入。同时,W_s 被用于更新 M 中存储的风格化知识。M 与 C 通过端到端的方式进行训练。在测试时,将图片转换为场景图,作为 M 和 C 的输入。图 3 :MemCap 模型示意图。其中蓝色部分表示使用风格化语料微调的过程,红色部分表示生成风格化描述的过程。
风格化句子分解 给定风格化句子 y^s,句子分解的目的是分离出与风格无关的部分 W_c 以及与语言风格有关的部分 W_s。考虑到与语言风格有关的部分在客观描述(factual description)中很少出现,我们先获取句子的依存解析树,然后从解析树中去除导致较高困惑度的部分,即与语言风格有关的部分。在依存树中,每个单词 w_i 对应树中的一个节点 v_i。将第 t 次迭代中剩余的句子记作 y_((t))^s。在第 t 次迭代中,尝试去除节点 v_j 及其子树,并重新评价剩余的句子的困惑度。若困惑度最低的句子 y ̂_((t,j))^s 的困惑度小于 y_((t))^s 的困惑度则进入下一次迭代,否则算法中止,并将 y_((t))^s 作为与风格无关的部分。
参考文献:[1] Rennie, Steven J., et al. "Self-critical sequence training for image captioning." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2017.[2] Anderson, Peter, et al. "Bottom-up and top-down attention for image captioning and visual question answering." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2018.[3] Guo, Longteng, et al. "MSCap: Multi-Style Image Captioning With Unpaired Stylized Text." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2019.[4] Chen, Tianlang, et al. "``Factual''or``Emotional'': Stylized Image Captioning with Adaptive Learning and Attention." Proceedings of the European Conference on Computer Vision (ECCV). 2018.[5] Gan, Chuang, et al. "Stylenet: Generating attractive visual captions with styles." Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. 2017.