GOKU-2M / README.md
bigfacing's picture
Update README.md
f289f4b verified
|
Raw
History Blame Contribute Delete
7.82 kB
metadata
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

Goku: A Million-Scale Universal Dataset and Benchmark for Instruction-Based Video Editing

arXiv Project Page License

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 5.11 TB add, remove, swap, alter, reference-based add, reference-based swap, camera motion, style transfer
🟒 Goku-2M/GOKU-2M 4.54 TB subject movement, multi-step composite editing

Tasks

GOKU-2M teaser: dataset distribution and per-task editing examples
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:

{
  "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:

{
  "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:

# 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:

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

Citation

If you find GOKU-2M useful for your research, please cite:

@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}
}