Code2Video: 교육용 비디오 생성을 위한 코드 중심 패러다임
Code2Video: A Code-centric Paradigm for Educational Video Generation
October 1, 2025
저자: Yanzhe Chen, Kevin Qinghong Lin, Mike Zheng Shou
cs.AI
초록
최근 생성 모델들이 픽셀 공간에서의 비디오 합성 기술을 발전시키고 있지만, 전문 교육용 비디오 제작에는 여전히 한계가 있습니다. 이러한 비디오는 학문적 지식, 정확한 시각적 구조, 그리고 일관된 전환을 요구하기 때문에 교육 시나리오에서의 적용 가능성이 제한적입니다. 직관적으로, 이러한 요구 사항은 렌더링 가능한 환경을 조작함으로써 더 잘 해결될 수 있으며, 이는 논리적 명령(예: 코드)을 통해 명시적으로 제어될 수 있습니다. 본 연구에서는 실행 가능한 Python 코드를 통해 교육용 비디오를 생성하기 위한 코드 중심의 에이전트 프레임워크인 Code2Video를 제안합니다. 이 프레임워크는 세 가지 협력 에이전트로 구성됩니다: (i) Planner는 강의 내용을 시간적으로 일관된 흐름으로 구조화하고 해당 시각적 자산을 준비합니다; (ii) Coder는 구조화된 지시사항을 실행 가능한 Python 코드로 변환하며, 범위 기반 자동 수정을 통해 효율성을 높입니다; (iii) Critic은 시각적 앵커 프롬프트와 함께 비전-언어 모델(VLM)을 활용하여 공간 레이아웃을 개선하고 명확성을 보장합니다. 체계적인 평가를 지원하기 위해, 우리는 전문적으로 제작된 학문별 교육용 비디오 벤치마크인 MMMC를 구축했습니다. MMMC는 VLM-as-a-Judge 미적 점수, 코드 효율성, 그리고 특히 TeachQuiz라는 새로운 종단 간 메트릭을 통해 평가됩니다. TeachQuiz는 VLM이 생성된 비디오를 시청한 후 지식을 얼마나 잘 회복할 수 있는지를 정량화합니다. 우리의 결과는 Code2Video가 확장 가능하고 해석 가능하며 제어 가능한 접근 방식으로서의 잠재력을 보여주며, 직접 코드 생성보다 40% 향상된 성능을 달성하고 인간이 제작한 튜토리얼에 필적하는 비디오를 생성합니다. 코드와 데이터셋은 https://github.com/showlab/Code2Video에서 확인할 수 있습니다.
English
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.