简介
sora完成了文本生成视频的任务,其中视频的时长与连贯性都有非常惊艳的效果,不仅将视频时长拓展到了60S的水平,而且即使视频中发生物品遮挡,在之后也能成功接上,视频整体非常连贯。
感谢Datawhale开源社区提供相关资源。
Vision Transformer
基于官网的介绍:
We leverage a transformer architecture that operates on spacetime patches of video and image latent codes.
可见sora的基本架构来源于Transform,这里需要先介绍该领域的经典模型Vision Transformer(ViT)。
Transform 是广泛应用于 NLP 的架构,会将不同的 token 以序列方式进行处理。在 CV 上,也有很多将 Transform 引入的尝试,ViT 基本将原生的架构引入视觉领域。
首先图片不能直接将像素作为一个基本单位作为一个token,这样输入规模将会过大。需要进行分割,将整张图片进行分割,左下角将整张图片分为9个部分,每个部分作为基本的单位,然后将位置信息直接相加,称为 Patch ,接下来将其线性化,输入到Transform Encoder。
Video Vision Transformer
At a high level, we turn videos into patches by first compressing videos into a lower-dimensional latent space, and subsequently decomposing the representation into spacetime patches.
将视频同样进行切块的技术,考虑之前的文章ViViT: A Video Vision Transformer(ViViT)
针对于时间部分,同样是划分为小部分块,称为 tuplet。然后以一定序列的方式进行编码,一维化输入到 Transform。
训练过程为:
Scaling transformers for video generation
整个训练过称为 diffusion model