| --- |
| license: cc-by-nc-4.0 |
| task_categories: |
| - text-to-video |
| - video-to-video |
| language: |
| - en |
| tags: |
| - video-editing |
| - instruction-based-editing |
| - video |
| size_categories: |
| - 1M<n<10M |
| --- |
| |
| <div align="center"> |
|
|
| # Goku: A Million-Scale Universal Dataset and Benchmark for Instruction-Based Video Editing |
|
|
| [](https://arxiv.org/abs/2606.30599) |
| [](https://flying-sky999.github.io/Goku.github.io/) |
| [](https://creativecommons.org/licenses/by-nc/4.0/) |
|
|
| </div> |
|
|
| GOKU-2M is a large-scale, unified **instruction-based video-editing** dataset covering **10 editing tasks**. Each sample provides a source video, an edited target video, and one or more natural-language instructions describing the edit. |
|
|
| ## π¦ Repositories |
|
|
| > β οΈ Because a single Hugging Face account has a free storage quota of about **8.7 TB**, the dataset is split across **two repositories**: |
|
|
| | ποΈ Repository | πΎ Size | π¬ Tasks | |
| |---|---|---| |
| | π΅ [`bigfacing/GOKU-2M`](https://huggingface.co/datasets/bigfacing/GOKU-2M) | **5.11 TB** | add, remove, swap, alter, reference-based add, reference-based swap, camera motion, style transfer | |
| | π’ [`Goku-2M/GOKU-2M`](https://huggingface.co/datasets/Goku-2M/GOKU-2M) | **4.54 TB** | subject movement, multi-step composite editing | |
|
|
| ## Tasks |
|
|
| <div align="center"> |
| <img src="assets/teaser.png" width="100%" alt="GOKU-2M teaser: dataset distribution and per-task editing examples"> |
| </div> |
|
|
| | Folder | Task | Description | |
| |---|---|---| |
| | `add` | Add | Add a new object into the scene | |
| | `remove` | Remove | Remove an object from the scene | |
| | `swap_alter` | Swap / Alter | Replace an object, or alter its attributes | |
| | `reference_add` | Reference Add | Add an object specified by a reference image | |
| | `reference_swap` | Reference Swap | Replace an object with one from a reference image | |
| | `camera` | Camera Motion | Apply a camera movement (pan / tilt / zoom / arc / translate) | |
| | `style_transfer` | Style Transfer | Restyle the whole video | |
| | `subject_movement` | Subject Movement | Edit the motion / action of the subject | |
| | `multi_task` | Multi-step Composite | Chained edits, e.g. subject edit followed by camera motion | |
|
|
| ## Repository Layout |
|
|
| Each task is a folder containing sharded `.tar` files: |
|
|
| ``` |
| <task>/ |
| βββ <task>.videos.part001.tar |
| βββ <task>.videos.part002.tar |
| βββ ... |
| βββ <task>.jsons.tar |
| ``` |
|
|
| Concatenate and extract all shards of a task. After extraction you get two folders: |
|
|
| ``` |
| videos/ |
| βββ <case_id>/ |
| βββ source.mp4 # the input video |
| βββ edited.mp4 # the edited result (single-step tasks) |
| βββ reference.jpg # only for reference_add / reference_swap |
| βββ ... # step videos for multi_task (i2v.mp4, camera.mp4, ...) |
| jsons/ |
| βββ combine_json/ |
| βββ <case_id>_all.json # annotation for the case |
| ``` |
|
|
| `<case_id>` is shared between the `videos/` and `jsons/` folders β the JSON's video paths are relative to the task root (e.g. `videos/<case_id>/source.mp4`). |
|
|
| ## Annotation Format |
|
|
| Every case has one JSON at `jsons/combine_json/<case_id>_all.json`. There are two schemas. |
|
|
| ### 1. Single-step tasks (add, remove, swap_alter, reference_add, reference_swap, style_transfer, subject_movement) |
| |
| Flat schema: |
| |
| ```json |
| { |
| "case_id": "6jqn3hpk8elm4zd5_..._refadd", |
| "step": "reference_add", |
| "source_video": "videos/6jqn3hpk8elm4zd5_..._refadd/source.mp4", |
| "edited_video": "videos/6jqn3hpk8elm4zd5_..._refadd/edited.mp4", |
| "reference_image": "videos/6jqn3hpk8elm4zd5_..._refadd/reference.jpg", |
| "instruction_en": "Add a white, modern ceramic vase ... The object to add is shown in the reference image.", |
| "resolution": { "width": 1280, "height": 720 }, |
| "fps": 25 |
| } |
| ``` |
| |
| Common fields: `case_id`, `step`, `source_video`, `edited_video`, `instruction_en`, `resolution`, `fps`. |
| Task-specific fields: |
| - `reference_image` β present for `reference_add` and `reference_swap`. |
| - `long_instruction_en` β a more detailed instruction, present for `swap_alter` and `reference_swap`. |
| - `instruction_zh` / `long_instruction_zh` β Chinese instructions, present for some tasks (e.g. `swap_alter`, `subject_movement`). |
| - `source_caption` / `edited_caption` β full-scene captions of the input and result, present for `subject_movement`. |
|
|
| ### 2. Multi-step tasks (camera, multi_task) |
| |
| Composite schema with an ordered `steps` list and per-step `pairs`: |
| |
| ```json |
| { |
| "case_id": "1f23d8486d3547e8_translate_down", |
| "combo_name": "subject_camera", |
| "steps": ["i2v", "camera"], |
| "total_instruction_en": "Make the trees lean further inward ..., then move the camera downward", |
| "total_instruction_zh": "...οΌηΆει倴εδΈη§»ε¨", |
| "source_video": "videos/1f23d8486d3547e8_translate_down/source.mp4", |
| "final_video": "videos/1f23d8486d3547e8_translate_down/camera.mp4", |
| "pairs": [ |
| { "step": "i2v", "source_video": "...", "edited_video": "...", "instruction_en": "...", "...": "..." }, |
| { "step": "camera", "source_video": "...", "edited_video": "...", "instruction_en": "...", "cam_type": 8, "cam_name": "..." } |
| ], |
| "resolution": { "width": 736, "height": 704 }, |
| "fps": 25 |
| } |
| ``` |
| |
| Key fields: `steps` (ordered edit types), `total_instruction_en/zh` (overall instruction), `source_video` β `final_video` (start / end of the chain), and `pairs` (each intermediate `sourceβedited` step with its own instruction; camera steps additionally carry `cam_type` / `cam_name`). |
|
|
| ## Usage |
|
|
| Download a single task and extract it: |
|
|
| ```bash |
| # Install the HF CLI |
| pip install -U "huggingface_hub[cli]" |
| |
| # Download one task folder (e.g. "remove" from repo 1) |
| hf download bigfacing/GOKU-2M --repo-type dataset \ |
| --include "remove/*" --local-dir ./GOKU-2M |
| |
| # Extract all shards of that task |
| cd GOKU-2M/remove |
| for f in *.tar; do tar -xf "$f"; done |
| # -> produces videos/ and jsons/ |
| ``` |
|
|
| Load and iterate over annotations: |
|
|
| ```python |
| import json, glob, os |
| |
| task_root = "GOKU-2M/remove" # folder containing videos/ and jsons/ |
| for jp in glob.glob(os.path.join(task_root, "jsons/combine_json/*.json")): |
| ann = json.load(open(jp)) |
| src = os.path.join(task_root, ann["source_video"]) |
| if "pairs" in ann: # multi-step task |
| dst = os.path.join(task_root, ann["final_video"]) |
| instruction = ann["total_instruction_en"] |
| else: # single-step task |
| dst = os.path.join(task_root, ann["edited_video"]) |
| instruction = ann["instruction_en"] |
| ref = ann.get("reference_image") # only reference_add / reference_swap |
| # src -> dst under `instruction` (+ optional reference image) |
| ``` |
|
|
| ## Notes |
|
|
| - Released under **CC-BY-NC-4.0**: free for non-commercial research use with attribution. |
| - Videos contain no audio. |
| - File and case names are non-sensitive identifiers; only video content and JSON annotations carry semantic information. |
| - For the full per-task details, browse the two repositories linked above. |
|
|
| ## Links |
|
|
| - π Paper: https://arxiv.org/abs/2606.30599 |
| - π Project Page: https://flying-sky999.github.io/Goku.github.io/ |
|
|
| ## Citation |
|
|
| If you find GOKU-2M useful for your research, please cite: |
|
|
| ```bibtex |
| @article{liang2026goku, |
| title={Goku: A Million-Scale Universal Dataset and Benchmark for Instruction-Based Video Editing}, |
| author={Liang, Sen and Wang, Cong and Yu, Zhentao and Guan, Fengbin and Zhou, Zhengguang and Hu, Teng and Zhang, Youliang and Zhou, Yuan and Li, Xin and Lu, Qinglin and others}, |
| journal={arXiv preprint arXiv:2606.30599}, |
| year={2026} |
| } |
| ``` |
|
|