arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.01174cs.CVcs.AIcs.CLcs.HCcs.MM
收藏

Code2Video:一种面向教育视频生成的以代码为中心的范式

Code2Video: A Code-centric Paradigm for Educational Video Generation

Show Lab, National University of Singapore(Show实验室,新加坡国立大学)

Yanzhe Chen, Kevin Qinghong Lin, Mike Zheng Shou

AI总结:

针对现有生成模型难以生成专业教育视频的问题,提出以代码为中心的Code2Video框架,通过三个协同智能体生成教育视频,构建MMMC基准验证其效果优于直接代码生成,视频质量媲美人工制作。

摘要:

尽管近期的生成模型推动了像素空间视频合成的发展,但它们在生成专业教育视频方面仍存在局限——这类视频需要学科知识、精确的视觉结构和连贯的转场效果,这限制了生成模型在教育场景中的适用性。直观来看,通过操作可渲染环境能更好地满足这些需求,这类环境可通过逻辑命令(例如代码)进行显式控制。\n在本研究中,我们提出Code2Video,这是一个以代码为中心的智能体框架,通过可执行Python代码生成教育视频。该框架包含三个协同工作的智能体:(1)Planner(规划器),将课程内容组织为时间连贯的流程并准备对应的视觉素材;(2)Coder(编码器),将结构化指令转换为可执行Python代码,同时采用作用域引导的自动修复机制提升效率;(3)Critic(评审器),利用带视觉锚点提示的视觉语言模型(VLM)优化空间布局并确保清晰度。\n为支持系统性评估,我们构建了MMMC——一个由专业制作的、分学科的教育视频组成的基准。我们从多个维度对MMMC进行评估,包括VLM-as-a-Judge(视觉语言模型作为评审)的美学评分、代码效率,尤其是TeachQuiz——一种新型端到端指标,用于量化经过遗忘处理的VLM通过观看生成视频恢复知识的效果。结果表明Code2Video作为一种可扩展、可解释且可控的方法具有潜力,相比直接代码生成实现了40%的提升,生成的视频质量可与人工制作的教程相媲美。代码和数据集可在https://github.com/showlab/Code2Video获取。

英文摘要:

While recent generative models advance pixel-space video synthesis, they remain limited in producing professional educational videos, which demand disciplinary knowledge, precise visual structures, and coherent transitions, limiting their applicability in educational scenarios. Intuitively, such requirements are better addressed through the manipulation of a renderable environment, which can be explicitly controlled via logical commands (e.g., code). In this work, we propose Code2Video, a code-centric agent framework for generating educational videos via executable Python code. The framework comprises three collaborative agents: (i) Planner, which structures lecture content into temporally coherent flows and prepares corresponding visual assets; (ii) Coder, which converts structured instructions into executable Python codes while incorporating scope-guided auto-fix to enhance efficiency; and (iii) Critic, which leverages vision-language models (VLM) with visual anchor prompts to refine spatial layout and ensure clarity. To support systematic evaluation, we build MMMC, a benchmark of professionally produced, discipline-specific educational videos. We evaluate MMMC across diverse dimensions, including VLM-as-a-Judge aesthetic scores, code efficiency, and particularly, TeachQuiz, a novel end-to-end metric that quantifies how well a VLM, after unlearning, can recover knowledge by watching the generated videos. Our results demonstrate the potential of Code2Video as a scalable, interpretable, and controllable approach, achieving 40% improvement over direct code generation and producing videos comparable to human-crafted tutorials. The code and datasets are available at https://github.com/showlab/Code2Video.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑