VIDEODIRECTORGPT: CONSISTENT MULTI-SCENEVIDEO GENERATION VIA LLM-GUIDED PLANNING学习笔记
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/e4c8a195c64e706ea7da1f148096dd70.png)
motivation: 现有的T2V工作生成的视频通常显示单个动作(例如,驾驶汽车)的延续或重复模式,而不是多个变化动作/事件的转换和动态
contribution:
两阶段视频生成框架,视频内容规划(使用LLM),grounding(落地)的多场景视频生成(Lay2Vid)
Lay2Vid:将基于图像/文本的layout control ability(布局控制能力)和entity-level temporal consistency(实体级时间一致性)结合在一起。
method
Video Planning:用LLM生成video plan
video plan包含四个部分:
multi-scene descriptions(多场景描述)、entities(物体名称及边界框)、background(场景位置)、consistency groupings(每个实体/背景的场景索引,指示它们应该保持视觉上一致的位置)
第一步:生成多场景描述、实体名称和实体/背景一致性分组。使用 GPT-4 将单个文本提示扩展为多场景视频计划。每个场景都有文本描述、实体列表(名称及其 2D 边界框)和背景。
第二步:为每个场景生成entity layouts(实体布局),我们根据实体和场景描述列表为每一帧中的实体生成边界框列表。
Video Generation:使用Layout2Vid从Video plan生成视频
我们通过将layout control capability(布局控制能力)注入ModelScopeT2V(一个T2V模型包含CLIP ViT-H/14 text encoder、an autoencoder、a diffusion UNet)来实现Layout2Vid。
Guided 2D Attention
由于原始ModelScopeT2V不提供超出文本输入的控制,我们在spatial attention module(空间注意模块)中的2D attention module(2D注意模块)的基础上创建“Guided 2D Attention(引导2D attention)”。这允许使用边界框进行空间控制
spatio-temporal block:包含spatial convolution, temporal convolution, spatial attention, and temporal attention
(N1, N2, N3, N4)设置为(2, 4, 2, 2)
Guided 2D Attention:使用layout tokens(布局标记)和text tokens(文本标记)调制visual representation(视觉表示)
只对Guided 2D Attention进行训练(占用总参数的13%)
目的:将layout guidance capabilities(布局引导能力)注入到 ModelScopeT2V 主干中,同时保留其原始视频生成能力
entity grounding with image+text embeddings
以前的layout-guided的文本到图像生成模型通常仅使用 CLIP text embedding进行布局控制,我们还使用 CLIP image embedding。
h
i
=
MLP
(
P
i
m
g
(
f
i
m
g
(
e
i
)
)
,
P
t
e
x
t
(
f
t
e
x
t
(
e
i
)
)
,
Fourier
(
l
i
)
)
h_i=\text{MLP}(P_{\mathrm{img}}(f_{\mathrm{img}}(e_i)),P_{\mathrm{text}}(f_{\mathrm{text}}(e_i)),\text{Fourier}(l_i))
hi=MLP(Pimg(fimg(ei)),Ptext(ftext(ei)),Fourier(li))
我们在视觉/文本特征上使用可学习的线性投影层
P
i
m
g
/
t
e
x
t
P_{img/text}
Pimg/text,这有助于我们初始实验中训练期间更快的收敛。
image embedding:可以从用户提供图像获得image embedding,可以简单地使用CLIP图像编码器对自定义图像进行编码
Layout-guided denoising steps
两阶段去噪,使用Guided 2D attention 执行
α
∗
N
\alpha*N
α∗N 步,不使用Guided 2D attention执行
(
1
−
α
)
∗
N
(1-\alpha)*N
(1−α)∗N步,
α
∈
[
0
,
1
]
\alpha\in[0,1]
α∈[0,1]
较高的
α
\alpha
α可以增加布局控制,但导致较低的视觉质量