VideoGeneration

news/2024/9/30 21:29:29

Stable Video Diffusion: Scaling Latent Video Diffusion Models to Large Datasets

主要贡献:设计了一套数据清洗策略来清洗大规模的低质量的数据,用于训练T2V的SOTA模型,并证明了此模型具有足够强的关于动作和3D的先验知识可以用于视频相关的下游任务。

目前主要的T2V的模型都是基于T2I模型进行一些额外的修改(添加序列信息,添加condition等),因此大部分T2V模型的训练会经过以下的流程:image_pretrain ---> video_pretrain ---> video_finetune。模型会现在图片上进行训练,之后是大规模低质量数据,最后实在高质量的数据集上优化。

Data curation workflow

cut detection pipeline \(\rightarrow\) 3 caption method \(\rightarrow\) -> dense optical flow(remove static or text img) \(\rightarrow\) alcu-
late aesthetics scores and text-image similarities.

3 training stage

img

这几个数据集主要揭示了使用经过处理之后的vedio数据集进行预训练,即使经过了后续的finetune,最终的模型性能仍然更加优秀。上述图片是实验结果。

VideoFactory: Swap Attention in Spatiotemporal Diffusions for Text-to-Video Generation

主要贡献:1. 提出了一个交换空间的交叉注意力方式。2. 收集了130M的高质量、无水印的数据集。

swap Spatiotemporal Cross Attention

img

主要是对于连续的UNet Blk,分别使用空间特征和时序特征作为Q来进行交叉注意力。

HD-VG-130M

img

没有详细介绍数据集的收集和清洗过程,使用的是PySceneDetect作为分析工具。

LaMD: Latent Motion Diffusion for Video Generation

主要思想:将视频的motion提取出来,并对motionEbeding做扩散。

img

Stage1包含两个Encoder,2D-CNN Encoder致于提取content特征,3D-CNN Encoder致于提取motion特征,并且在3D Encoder使用了VAE常用的和正太函数比较KL散度,Decoder会结合content特征和motion特征生成最终图像,并在最终添加了一个Discriminator进行监督,增强图像质量。

Stage2是对Stage1得到的motion特征进行扩散(content特征也会作为condition),并且使用CNN作为模型主要结构,由于motion特征维度也很低。

VideoCrafter2: Overcoming Data Limitations for High-Quality Video Diffusion Models (2024.1)

目前在视频生成方面主要具有两种训练方式,首先模型分为两种模块,Spatial、Temporal Modul。一种训练方式固定Spatial(是SD的预训练权重),一种是在Video下Spatial、Temporal一起训练。

如果我们想要使用高质量的图片来微调在低质量视频下训练的模型,我们需要调研不同训练方式(上面两种)和不同微调方式(finetune、LORA)对于模型的影响。

本文做了实验解决了上面的问题,并在图像质量、视频动作方面进行评估。

  • 只训练Temporal得到的模型在之后做LORA会严重降低motion,这是因为Full Train会引入一种Spatial-Temporal Consistency。
  • 采用上面的方式,fine-tune是更好的微调方式,并且只finetune Spatial会得到更好的motion和Picture的效果。

本文还使用了SDXL、Midjourney生成的图像作为微调的数据集(具有真实世界不存在的concept)用于增强模型对于concept的理解。

VideoCrafter1: Open Diffusion Models for High-Quality Video Generation (2023)

似乎是早期的T2V、I2V的模型的通用的实现方式

img

  • 在Video数据上训练一个VAE \(\mathcal{E,D}\),然后在Video Latent Space上做扩散。模型结构如上。
  • Spatial Transformer、Temporal Transformer如下:

\[\begin{aligned}\mathrm{ST=Proj_{in}\circ(Attn_{self}\circ Attn_{cross}\circ MLP)\circ Proj_{out},}\\\mathrm{TT=Proj_{in}\circ(Attn_{temp}\circ Attn_{temp}\circ MLP)\circ Proj_{out}.}\end{aligned} \]

  • 对于ImageEncoder,采用的是CLIPViT最后一层的特征,而不是最后模型对其的输出,认为这层特征包含更多细节信息。
  • 当具有Image作为prompt时候,采用了额外结构来对其Image和Text Prompt。如下:
    img

\[\mathbf{F}_{out}=\mathrm{Softmax}(\frac{\mathbf{Q}\mathbf{K}_{text}^\top}{\sqrt{d}})\mathbf{V}_{text}+\mathrm{Softmax}(\frac{\mathbf{Q}\mathbf{K}_{img}^\top}{\sqrt{d}})\mathbf{V}_{img} \]

Latte: Latent Diffusion Transformer for Video Generation(2024.1)

上海AILab的论文,似乎结果并不怎么好,对比实验给的大部分都是GAN的。

论文对于模型架构、CLIP patch embedding、timestep-clas information injection,temporal positional embedding,learning strategies等做了大量的实验,选取了最好的一个模型。

img

  • 上述关于模型架构,Variant 4效果最好。

img

  • 关于视频编码,a 略微优于 b

img

  • 一种新的注入timestep信息和类别信息\(c(\alpha_c)\)的方式。将timestep和类别共同编码为\(\alpha_c, \beta_c, \gamma_c\),然后\(\beta,\gamma\)作为AdaIN的参数,而\(\alpha\)作为Atten的Scale参数。

  • 让模型交替生成视频和图片能够极大提升模型最终的FID和FVD。

消融实验:
img

AnimateDiff: Animate Your Personalized Text-to-Image Diffusion Models without Specific Tuning

类似于LoRA的可插入式模型,固定base模型,并在其中添加Motion Modeling Module,在这之上训练的Motion Module可以去迁移到其他任意类似模型上,作为类似LoRA的微调模型,生成视频的作用。

img

motion Module就是Temporal Block,在视频上训练这些模块,固定base模型,这要求base模型的数据分布不能和视频的数据分布差别太大,否则无法训练良好的Temporal Block,同时迁移到其他模型也不能和训练的Video数据分布差别太大。

img

StreamingT2V: Consistent, Dynamic, and ExtendableLong Video Generation from Text

code

img

主要流程是

  1. 使用一个T2ShortV生成一个简短的video。
  2. 使用简短的video作为condition,利用了Condition Attention Module(CAM),Appearance Preversation Module来生成长视频。
  3. 使用一种Randomized Blending 生成更长的视频。

  • 希望CAM作为一个短时的模块引入motion的变化,使用APM来维持ID的稳定性。

  • Randomized Blending.这个有点难理解,需要跟进代码。

ShareGPT4Video: Improving Video Understandingand Generation with Better Captions

主要是做数据处理的工作。

  • 差异化滑动窗口字幕策略(DiffSW):采用一种新颖的字幕生成方法,将视频字幕生成任务转化为差异性描述任务。首先为第一帧生成详细字幕,然后使用长度为2的滑动窗口对后续帧进行差异性描述。最后使用GPT-4或者其他语言模型对生成的caption进行总结,输出最终的video caption。
    caption pipeline

  • 构建ShareGPT4Video数据集:利用DiffSW策略,从多种来源收集的视频中生成了40K高质量的视频字幕对,这些字幕涵盖了丰富的世界知识、对象属性、摄像机运动和详细的事件时间描述。

  • 开发ShareCaptioner-Video模型:基于ShareGPT4Video数据集,进一步开发了一个高效的字幕生成模型ShareCaptioner,能够为任意视频生成高质量的字幕。使用该模型为480万美学上有吸引力的视频生成了字幕。该模型能够支持4种方式的caption。

  • 最后在这个480万的数据下训练了一个基于LLaVANext-8B模型的ShareGPT4Video-8B。


最近尝试使用这个模型来对视频进行recaption,任务描述主要是当前的caption:1. caption太短,不详细。2. 并且基本上是人工的caption模式,和Sora模型、LLM生成的caption模型具有较大差别。

最先尝试ShareGPT4-Video,他的技术是:从视频中抽样16帧,并且组成4x4的图片,输入模型生成caption。

  • 生成的caption相比于之前的caption更长。相比于之前的(1).基于masp的caption。(2).使用视频的简短人工的caption和视频抽帧使用Image Caption并且使用LLM总结得到最终的caption。的两种方式的caption更长,但是并不具备更多的信息,多的部分主要在于描述背景。
  • 生成的类似于masp的caption,主要因为masp也是基于GPT4-V的数据进行训练的,因此也很类似Sora的caption模式。
  • 对于长视频,非常容易生成多段文本。类似于下述这种

The video captures a series of intimate moments among a group of young women standing closely together, portraying a strong sense of camaraderie and affection. Initially, the women are seen leaning into each other with their eyes closed, hands placed gently on each other's arms or shoulders, against a plain, light-colored background. This image sets a tone of tranquility and connectedness among the group.

As the video progresses, the framing and composition subtly shift to include more women in the foreground, while maintaining the serene atmosphere and the physical closeness of the group. One woman, notable for her bright yellow eyeshadow, becomes more prominent in the visual narrative, suggesting a slight change in the camera angle or the group's stance to bring her into clearer focus. Throughout, the women maintain their tranquil expressions and gentle touches, reinforcing the portrayal of a closely knit community.

Further into the video, the focus broadens slightly to include additional women, enriching the portrayal of the group's dynamics. The central woman with yellow eyeshadow remains a focal point, surrounded by friends who now share the visual space more equally, emphasizing the collective identity of the group. The background remains consistent, providing a neutral canvas that keeps the emphasis firmly on the subjects.

In the final moments captured, the composition stabilizes with minor adjustments in the positioning of the central woman and her immediate companions, maintaining the established focus and intimacy. The framing continues to highlight the central figures while subtly acknowledging the presence of others in the background, reinforcing the sense of closeness and unity among the group. Throughout, the video maintains a consistent, soft lighting that casts a warm glow over the scenes, accentuating the tranquil and connected

之后尝试了ShareCaptioner,效果不太行,他的fastCaption也容易出现上述的情况。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hjln.cn/news/45106.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈,一经查实,立即删除!

相关文章

Beego仿小米商城RBAC管理模块

Beego仿小米商城RBAC管理模块 原创 Go大神 Go大神 2024-05-20 20:38 浙江一、RBAC表结构 1、表结构图2、models\manager.go package modelsimport ( _ "github.com/jinzhu/gorm")type Manager struct { Id int Username string Password string Mobile …

第1章 计算机网络和因特网

本章流程图1.1 什么是因特网 回答这个问题:我们更够描述因特网的具体构成(nuts and bolts),即构成因特网的基本硬件和软件组件。 我们能够根据为分布式应用提供服务的联网基础设施来描述因特网。1.1.1 具体构成描述 端系统通过通信链路(communication link)和分组交换机(…

TCP协议的客户端和服务端的多路复用

#include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #include <unistd.h> #include <string.h> #include <sys/time.h> #include <sys/select.h> int main(void) {//1.创建套接字in…

Web应用课 第四讲 内外边距、盒子模型、位置、浮动、名片实战

内外边距 margin 内边距 margin属性为给定元素设置所有四个(上下左右)方向的外边距属性。 可以接受1~4个值(上、右、下、左的顺序) 可以分别指明四个方向:margin-top、margin-right、margin-bottom、margin-left 取值 length:固定值 percentage:相对于包含块的宽度,以百…

红日复现为什么失败之struct漏洞复现

struts2漏洞 一、指纹识别 s2的url路径组成(详见struts.xml配置文件):name工程名+namespace命名空间+atcion名称+extends拓展名部署在根目录下,工程名可为空;当然namespace名称也可设置为空;拓展名也可设置为空。 方法一 (1)url会有.action或.do后缀文件名(eg:http://…

使用getaddrinfo函数来获取并打印出www.baidu.com的所有IP地址(IPv4和IPv6)

#include <stdlib.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netdb.h> #include <arpa/inet.h>int main() {struct addrinfo hints, *res, *p;int status;char ipstr[INET6_ADDRSTRLEN];// 设置h…

C138 线段树分治 P2056 [ZJOI2007] 捉迷藏

视频链接:C138 线段树分治 P2056 [ZJOI2007] 捉迷藏_哔哩哔哩_bilibili P2056 [ZJOI2007] 捉迷藏 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn)// 线段树分治 O(nlognlogn) #include <iostream> #include <cstring> #include <algorithm> #include <…

[lnsyoj118/luoguP3369]普通平衡树

平衡树 Treap题意 维护一个数据结构,要求支持插入,删除,根据排名查数,根据数查排名,查询前驱,查询后继\(6\)个操作 sol 考虑到后四个查询的操作,会发现使用二叉搜索树(BST)完全可以实现 为了完成这四个操作,需要在每个节点记录\(3\)个值:\(key\) 表示当前节点的数 \(c…