BLIP-Diffusion: Pre-trained Subject Representation for Controllable Text-to-Image Generation and Edi

  1. 问题引入
  • 针对subject driven image generation的任务,首先根据BLIP2的训练方法训练一个multimodal encoder将subject image映射到和text对齐的representation,也就是输入subject image+category text,输出text -aligned subject representation,之后将该represenation和prompt embedding混合来完成subject driven的生成;
  • 本方法可以不需要test time finetuning这个步骤,但是也可以针对特定subject进行微调;
  1. methods
    在这里插入图片描述
  • Multimodal Representation Learning with BLIP-2:预训练模型得到text aligned image representation,这阶段的模型使用了blip-2中的两个模块,一个是image encoder,另一个是multimodal encoder,multimodal encoder输入可学习的query,在self attn层和text信息融合,在cross attn和image信息相融合,输出的结果就是text aligned image representation,损失函数也继承了BLIP-2,分别是image-text contrastive learning (ITC) loss + mage-grounded text generation (ITG) loss + image-text matching (ITM) loss,训练的数据采用的是generic的image-text成对数据;
  • Subject Representation Learning stage:第二个pretraining stage,也就是将multimodal encoder得到的representation输入到两层MLP得到的结果和text embedding相拼接,之后作为T2I模型的条件,此时还有一个问题就是multimodal中图片输入含有较多背景,影响生成结果和text的align情况,所以此处的解决办法是合成数据(subject提取出来加上随机背景)来作为encoder的输入;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值