返回 VideoClaw
README.md
根目录 / FilmAgent / README.md
1 <p align="center">
2 <img src="../FilmAgent-pics/cover_page.jpg" width="300" style="margin-bottom: 0.2;"/>
3 <p>
4
5 <h2 align="center"> <a href="https://github.com/HITsz-TMG/FilmAgent">FilmAgent: A Multi-Agent Framework for End-to-End Film Automation in Virtual 3D Spaces</a></h2>
6 <!-- <h5 align="center"> If you like our project, please consider giving us a star ⭐ on GitHub to stay updated with the latest developments. </h2> -->
7 <h4 align="center">
8
9 <div align="center">
10 <img src="https://img.shields.io/badge/Version-1.0.0-blue.svg" alt="Version">
11 <img src="https://img.shields.io/badge/License-Apache%202.0-green.svg" alt="License">
12 <img src="https://img.shields.io/github/stars/HITsz-TMG/FilmAgent?color=yellow" alt="Stars">
13 <img src="https://img.shields.io/github/issues/HITsz-TMG/FilmAgent?color=red" alt="Issues">
14 <img src="https://img.shields.io/badge/python-3.8-purple.svg" alt="Python">
15
16 <!-- <img src="https://img.shields.io/github/stars/AIDC-AI/Marco-o1?color=yellow" alt="Stars"> -->
17
18 <!-- [![Project Page](https://img.shields.io/badge/Project_Page-FilmAgent-blue)](https://filmagent.github.io/)
19 [![Project Page](https://img.shields.io/badge/Paper-Arxiv-yellow)](https://arxiv.org/abs/2501.12909)
20 [![Project Page](https://img.shields.io/badge/Video-Youtube-red)](https://www.youtube.com/watch?v=hTI-0777iHU)
21 ![Gitea Stars](https://img.shields.io/gitea/stars/HITsz-TMG/FilmAgent) -->
22
23 </h4>
24
25 <div align="center">
26
27 <!-- **Affiliations:** -->
28
29 _**Zhenran Xu, Longyue Wang, Jifang Wang, Zhouyi Li, Senbao Shi, Xue Yang, Yiyu Wang, Baotian Hu, Jun Yu, Min Zhang**_
30
31 🎯 [**Project Page**](https://filmagent.github.io) :octocat: [**Code**](https://github.com/HITsz-TMG/FilmAgent) 📝 [**Paper**](https://arxiv.org/abs/2501.12909) 🧑‍💻 [**Slides**](https://filmagent.github.io/static/SA24_FilmAgent.pdf) 📽️ [**Video**](https://www.youtube.com/watch?v=hTI-0777iHU)
32
33 </div>
34
35 #
36
37 > [!NOTE]
38 > This repository also keeps **Video-Claw**, but **FilmAgent is an independent legacy research project** from the lab. It is preserved here for archival and reproducibility purposes only. FilmAgent does not depend on Video-Claw, and Video-Claw does not call FilmAgent.
39 >
40 > Current local layout:
41 > - FilmAgent source code: `FilmAgent/`
42 > - FilmAgent TTS service: `TTS/`
43 > - README images: `../FilmAgent-pics/`
44
45 **FilmAgent** is a multi-agent collaborative system for end-to-end film automation in 3D virtual spaces.
46 FilmAgent simulates key crew roles—directors, screenwriters, actors, and cinematographers, and integrates efficient human workflows within a sandbox environment.
47
48 <div align=center><img src="../FilmAgent-pics/intro.png" height="100%" width="78%"/></div>
49
50 ## 💥 News
51
52 - `2025/2/24`: 🚀 We have integrated **DeepSeek**-v3 and r1 for model selection, allowing for more sophisticated decision-making processes.
53 - `2025/2/11`: 🎬 We’ve just released a fan-made video about ***NeZha2***, in celebration of its record-breaking success at the box office. Click the image below to watch the video! 👇
54 [<div align=center><img src="../FilmAgent-pics/nezha_youtube.png" width="450"></div>](https://www.youtube.com/watch?v=jY3n-AzBtUQ)
55 - `2025/1/23`: 🙌 We're excited that FilmAgent is recommended by [AK](https://x.com/_akhaliq/status/1882268452716728789), [el.cine](https://x.com/EHuanglu/status/1882294685919772928) and [Theoretically Media](https://www.youtube.com/watch?v=0ebXKegfxWk&t=899s). Thanks!
56 - `2025/1/22`: 📄 Our paper is now accessible at https://arxiv.org/abs/2501.12909.
57
58
59
60 ## 🚀 Framework
61
62 Following the traditional film studio workflow, we divide the whole film automation process into three sequential stages: idea development, scriptwriting and cinematography, and apply the **Critique-Correct-Verify**, **Debate-Judge** collaboration strategies. After these stages, each line in the script is specified with the positions of the actors, their actions, their dialogue, and the chosen camera shots.
63
64 <div align=center><img src="../FilmAgent-pics/framework.png" height="100%" width="85%"/></div>
65
66 ## 🌟 Build Your own Film with FilmAgent
67
68 > The following commands assume you are in this `FilmAgent/` directory.
69
70 1. Install Package
71 ```Shell
72 cd FilmAgent
73 conda create -n filmagent python==3.9.18
74 conda activate filmagent
75 pip install -r env.txt
76 ```
77
78 2. Create `Script` and `Logs` folders under `FilmAgent/`, then replace the absolute pathname `/path/to/FilmAgent` in `main.py` with the absolute path of this `FilmAgent/` source directory and modify the `topic` in `main.py`. Modify the API keys in `LLMCaller.py`. Run the following commands to get the movie script created by the agents collaboratively:
79 ```bash
80 cd FilmAgent
81 conda activate filmagent
82 python main.py --model "gpt-4o" # openai
83 # python main.py --model "deepseek-chat" ## deepseek-v3
84 # python main.py --model "deepseek-reasoner" ## deepseek-r1 Using this model for a multi-agent process will be very slow, you could try using a single-agent process instead. (Refer to step 6)
85 ```
86
87 3. We use [ChatTTS](https://github.com/2noise/ChatTTS) to provide voice acting for the characters in the script. The TTS-related files are stored in `TTS/`. Download the ChatTTS model files required by `tts_main.py`, then replace `ROOT = "/Path to/TTS"` in `tts_main.py` with the absolute path of `TTS/`. Run the following commands to deploy the text-to-speech service:
88 ```bash
89 cd TTS
90 conda create -n tts python==3.9.18
91 conda activate tts
92 pip install -r env_tts.txt
93 python tts_main.py
94 ```
95
96 4. Modify the `Script_path`, `actos_path`, `Audio_path` and `url` in `GenerateAudio.py`. Run the following commands to get the audio files:
97 ```bash
98 cd FilmAgent
99 conda activate filmagent
100 python GenerateAudio.py
101 ```
102
103 5. We now have the `script.json`, `actors_profile.json`, and a series of `.wav` audio files. Next, we need to execute the script in Unity. The recommended version of the Unity editor is **Unity 2022.3.14f1c1**. You need to download the Unity project file we provide [[Dropbox](https://www.dropbox.com/scl/fi/atxhxnqppeofmt471dxr5/TheBigBang.zip?rlkey=o7zuqficetabkk2h1w1npkv3v&st=5s41rzdv&dl=0)][[Baidu Disk](https://pan.baidu.com/s/10wgfvtcG-xnx1fA9Rd_zwg?pwd=5aif)]. After decompression, open `TheBigBang\Assets\TheBigBang\Manyrooms.unity` with Unity. Then replace all the absolute pathnames '/path/to/' with your specific path in `TheBigBang\Assets\Scirpts\StartVideo.cs` and `TheBigBang\Assets\Scirpts\ScriptExecute.cs`. Press **'ctrl+R'** in the unity interface to recompile, click **'Play'** to enter Game mode, then press **'E'** to start executing the script (sometimes the audio files load slowly, so you may need to play it 2 or 3 times before it can run normally).
104
105 > [!IMPORTANT]
106 > Please add `"com.unity.nuget.newtonsoft-json": "3.0.2"` inside `Packages/manifest.json` if it throws an error, "*the type or namespace name jobject could not be found.*"
107
108 <div align=center><img src="../FilmAgent-pics/unity_1.png" height="100%" width="50%"/><img src="../FilmAgent-pics/unity_2.png" height="100%" width="50%"/></div>
109
110 6. For the tests on 15 topics in our experimental section, we provide three .py files: `test_full.py` (The full FilmAgent framework, utilizing multi-agent collaboration.), `test_no_interation.py` (A single agent is responsible for planning, scriptwriting, and cinematography, representing our FilmAgent framework without multi-agent collaboration algorithms.) and `test_cot.py` (A single agent generates the chain-of-thought rationale and the complete script). Modify the `model` in these `.py` files, you can try different LLMs.
111
112 ## 🌈 Case Study
113
114 ### 🤝 What does Multi-Agent Collaboration do?
115 The following table records some comparisons of the scripts and camera settings **before (⬅️) and after (➡️)** multi-agent collaboration, with excerpts from their discussion process.
116
117 <div align=center><img src="../FilmAgent-pics/cases.png" height="100%" width="70%"/></div>
118
119 📌 **Case Highlights:**
120 - **Case #1** shows that Director-Screenwriter discussion reduces hallucinations in non-existent actions (e.g., standing suggest), enhances plot coherence, and ensures consistency across scenes.
121 - **Case #2** shows that Actor-Director-Screenwriter discussion improves the alignment of dialogue with character profiles.
122 - **Case #3**, in the Debate-Judge method in cinematography, demonstrates the correction of an inappropriate dynamic shot, which is replaced with a medium shot to better convey body language.
123 - **Case #4** replaces a series of identical static shots with a mix of dynamic and static shots, resulting in a more diverse camera setup.
124
125 ### ⚖️ Comparison with Sora
126
127 <div align=center><img src="../FilmAgent-pics/sora.png" height="100%" width="70%"/></div>
128
129 While Sora (🔗 [Video](https://github.com/user-attachments/assets/65bb4c12-cba0-4ee9-a673-63ea5103fd76)) shows great adaptability to diverse locations, characters and shots, it **struggles with consistency and narrative delivery**, along with **strange artifacts**.
130
131 In contrast, FilmAgent requires pre-built 3D spaces, but it produces **coherent, physics-compliant** videos with strong **storytelling capabilities** (▶️ Watch on [Youtube](https://www.youtube.com/watch?v=yOOycdfolFY)).
132
133 ### ✨ Integration with Text-to-Video Models (e.g. Sora, Vidu)
134
135 We are currently working towards **merging the power of text-to-video models with FilmAgent**, unlocking enhanced storytelling, greater adaptability, and improved consistency. 🚀
136
137 Here is a preview of our work—a fan-made tribute to the box office phenomenon *NeZha2* [▶️[video link](https://www.youtube.com/watch?v=jY3n-AzBtUQ)]. This video celebrates *NeZha2* surpassing a CNY 8 billion at the box office, officially crowning it as the highest-grossing film in a single territory! 🎉
138
139 ## 📚 Citation
140
141 If you find FilmAgent useful for your research and applications, please cite using this BibTeX:
142 ```bibtex
143 @misc{xu2025filmagent,
144 title={FilmAgent: A Multi-Agent Framework for End-to-End Film Automation in Virtual 3D Spaces},
145 author={Zhenran Xu and Longyue Wang and Jifang Wang and Zhouyi Li and Senbao Shi and Xue Yang and Yiyu Wang and Baotian Hu and Jun Yu and Min Zhang},
146 year={2025},
147 eprint={2501.12909},
148 archivePrefix={arXiv},
149 primaryClass={cs.CL},
150 url={https://arxiv.org/abs/2501.12909},
151 }
152 ```
153
153 lines MARKDOWN