Update edit benchmark evaluation docs
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- benchmarks/edit/build_six_method_manifest.py +82 -0
- benchmarks/edit/code/IVEBench/metrics/__pycache__/ivebench.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/__pycache__/ivebench_utils.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/__pycache__/vebench.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/__pycache__/instruction_satisfaction.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/__pycache__/overall_semantic_consistency.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/__pycache__/phrase_semantic_consistency.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/__pycache__/quantity_accuracy.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/datasets/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/datasets/__pycache__/transforms.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/bertwarper.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/fuse_modules.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/groundingdino.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/ms_deform_attn.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/transformer.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/transformer_vanilla.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/utils.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/backbone/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/backbone/__pycache__/backbone.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/backbone/__pycache__/position_encoding.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/backbone/__pycache__/swin_transformer.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/__pycache__/registry.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/box_ops.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/get_tokenlizer.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/misc.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/slconfig.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/utils.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/visualizer.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/vl_utils.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/qwen_vl_utils/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/qwen_vl_utils/__pycache__/vision_process.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/__pycache__/modeling.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/text_encoder/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/text_encoder/__pycache__/model_text_encoder.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/text_encoder/__pycache__/simple_tokenizer.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/text_encoder/__pycache__/text_encoder.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/vision_encoder/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/vision_encoder/__pycache__/clip_vision.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/vision_encoder/__pycache__/model_vision_encoder.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/fidelity/__pycache__/__init__.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/fidelity/__pycache__/content_fidelity.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/fidelity/__pycache__/motion_fidelity.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/fidelity/__pycache__/semantic_fidelity.cpython-312.pyc +0 -0
- benchmarks/edit/code/IVEBench/metrics/fidelity/cotracker/__pycache__/__init__.cpython-312.pyc +0 -0
benchmarks/edit/build_six_method_manifest.py
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Build manifests for the six val20/val100 edit-result folders."""
|
| 3 |
+
|
| 4 |
+
from __future__ import annotations
|
| 5 |
+
|
| 6 |
+
import argparse
|
| 7 |
+
import json
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
METHODS = ("wan_only", "ditto_global", "full", "text", "vace_hint", "vace_context")
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
def read_jsonl(path: Path) -> list[dict]:
|
| 15 |
+
rows: list[dict] = []
|
| 16 |
+
with path.open("r", encoding="utf-8") as handle:
|
| 17 |
+
for line in handle:
|
| 18 |
+
text = line.strip()
|
| 19 |
+
if text:
|
| 20 |
+
rows.append(json.loads(text))
|
| 21 |
+
return rows
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def build_split(repo_root: Path, split: str, samples_path: Path, outputs_root: Path, output_path: Path) -> None:
|
| 25 |
+
samples = read_jsonl(samples_path)
|
| 26 |
+
output_path.parent.mkdir(parents=True, exist_ok=True)
|
| 27 |
+
count = 0
|
| 28 |
+
with output_path.open("w", encoding="utf-8") as handle:
|
| 29 |
+
for sample in samples:
|
| 30 |
+
sample_id = str(sample["id"])
|
| 31 |
+
source_video = Path(str(sample["control_video"]))
|
| 32 |
+
if not source_video.is_absolute():
|
| 33 |
+
source_video = repo_root / source_video
|
| 34 |
+
for method in METHODS:
|
| 35 |
+
edited_video = outputs_root / method / f"{sample_id}.mp4"
|
| 36 |
+
row = {
|
| 37 |
+
"split": split,
|
| 38 |
+
"sample_id": sample_id,
|
| 39 |
+
"method": method,
|
| 40 |
+
"instruction": sample["prompt"],
|
| 41 |
+
"source_video": str(source_video),
|
| 42 |
+
"edited_video": str(edited_video),
|
| 43 |
+
"source_prompt": sample.get("source_prompt", ""),
|
| 44 |
+
"target_prompt": sample.get("target_prompt", sample["prompt"]),
|
| 45 |
+
}
|
| 46 |
+
handle.write(json.dumps(row, ensure_ascii=False) + "\n")
|
| 47 |
+
count += 1
|
| 48 |
+
print(f"{split}: wrote {count} rows -> {output_path}")
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
def main() -> None:
|
| 52 |
+
parser = argparse.ArgumentParser()
|
| 53 |
+
parser.add_argument("--repo-root", type=Path, default=Path.cwd())
|
| 54 |
+
parser.add_argument("--output-dir", type=Path, default=Path("out/edit_model_face_stage1/traditional_eval_manifests"))
|
| 55 |
+
args = parser.parse_args()
|
| 56 |
+
|
| 57 |
+
repo_root = args.repo_root.resolve()
|
| 58 |
+
base = repo_root / "out/edit_model_face_stage1"
|
| 59 |
+
output_dir = args.output_dir if args.output_dir.is_absolute() else repo_root / args.output_dir
|
| 60 |
+
|
| 61 |
+
jobs = [
|
| 62 |
+
(
|
| 63 |
+
"val20",
|
| 64 |
+
base / "eval_samples/val_20.jsonl",
|
| 65 |
+
base / "eval_outputs",
|
| 66 |
+
output_dir / "val20.jsonl",
|
| 67 |
+
),
|
| 68 |
+
(
|
| 69 |
+
"val100",
|
| 70 |
+
base / "eval_samples/val_100.jsonl",
|
| 71 |
+
base / "eval_outputs_val100",
|
| 72 |
+
output_dir / "val100.jsonl",
|
| 73 |
+
),
|
| 74 |
+
]
|
| 75 |
+
for split, samples_path, outputs_root, output_path in jobs:
|
| 76 |
+
if not samples_path.exists():
|
| 77 |
+
raise FileNotFoundError(samples_path)
|
| 78 |
+
build_split(repo_root, split, samples_path, outputs_root, output_path)
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
if __name__ == "__main__":
|
| 82 |
+
main()
|
benchmarks/edit/code/IVEBench/metrics/__pycache__/ivebench.cpython-312.pyc
ADDED
|
Binary file (13.4 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/__pycache__/ivebench_utils.cpython-312.pyc
ADDED
|
Binary file (5.25 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/__pycache__/vebench.cpython-312.pyc
ADDED
|
Binary file (12.9 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (467 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/__pycache__/instruction_satisfaction.cpython-312.pyc
ADDED
|
Binary file (21.5 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/__pycache__/overall_semantic_consistency.cpython-312.pyc
ADDED
|
Binary file (17.5 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/__pycache__/phrase_semantic_consistency.cpython-312.pyc
ADDED
|
Binary file (18.1 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/__pycache__/quantity_accuracy.cpython-312.pyc
ADDED
|
Binary file (24.1 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (180 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/datasets/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (189 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/datasets/__pycache__/transforms.cpython-312.pyc
ADDED
|
Binary file (15.9 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (263 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/bertwarper.cpython-312.pyc
ADDED
|
Binary file (11 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/fuse_modules.cpython-312.pyc
ADDED
|
Binary file (16 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/groundingdino.cpython-312.pyc
ADDED
|
Binary file (18.4 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/ms_deform_attn.cpython-312.pyc
ADDED
|
Binary file (18.3 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/transformer.cpython-312.pyc
ADDED
|
Binary file (33.5 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/transformer_vanilla.cpython-312.pyc
ADDED
|
Binary file (5.16 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/__pycache__/utils.cpython-312.pyc
ADDED
|
Binary file (15.4 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/backbone/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (260 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/backbone/__pycache__/backbone.cpython-312.pyc
ADDED
|
Binary file (9.65 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/backbone/__pycache__/position_encoding.cpython-312.pyc
ADDED
|
Binary file (9.42 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/GroundingDINO/backbone/__pycache__/swin_transformer.cpython-312.pyc
ADDED
|
Binary file (33.9 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (651 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/models/__pycache__/registry.cpython-312.pyc
ADDED
|
Binary file (2.99 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (185 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/box_ops.cpython-312.pyc
ADDED
|
Binary file (6.83 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/get_tokenlizer.cpython-312.pyc
ADDED
|
Binary file (1.91 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/misc.cpython-312.pyc
ADDED
|
Binary file (35.9 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/slconfig.cpython-312.pyc
ADDED
|
Binary file (20.3 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/utils.cpython-312.pyc
ADDED
|
Binary file (29.9 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/visualizer.cpython-312.pyc
ADDED
|
Binary file (14.8 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/groundingdino/util/__pycache__/vl_utils.cpython-312.pyc
ADDED
|
Binary file (4.27 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/qwen_vl_utils/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (345 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/qwen_vl_utils/__pycache__/vision_process.cpython-312.pyc
ADDED
|
Binary file (17.8 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (184 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/__pycache__/modeling.cpython-312.pyc
ADDED
|
Binary file (1.13 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/text_encoder/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (231 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/text_encoder/__pycache__/model_text_encoder.cpython-312.pyc
ADDED
|
Binary file (27.3 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/text_encoder/__pycache__/simple_tokenizer.cpython-312.pyc
ADDED
|
Binary file (8.97 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/text_encoder/__pycache__/text_encoder.cpython-312.pyc
ADDED
|
Binary file (3.74 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/vision_encoder/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (495 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/vision_encoder/__pycache__/clip_vision.cpython-312.pyc
ADDED
|
Binary file (17.1 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/compliance/videoclipxl_utils/vision_encoder/__pycache__/model_vision_encoder.cpython-312.pyc
ADDED
|
Binary file (4.19 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/fidelity/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (403 Bytes). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/fidelity/__pycache__/content_fidelity.cpython-312.pyc
ADDED
|
Binary file (22.3 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/fidelity/__pycache__/motion_fidelity.cpython-312.pyc
ADDED
|
Binary file (25 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/fidelity/__pycache__/semantic_fidelity.cpython-312.pyc
ADDED
|
Binary file (17.9 kB). View file
|
|
|
benchmarks/edit/code/IVEBench/metrics/fidelity/cotracker/__pycache__/__init__.cpython-312.pyc
ADDED
|
Binary file (174 Bytes). View file
|
|
|