Spaces:
Running
Running
Ziyang Wang commited on
Commit ·
6375fde
1
Parent(s): 1bf5b23
add paper-baseline seed script
Browse files- scripts/seed_paper_baselines.py +130 -0
scripts/seed_paper_baselines.py
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Seed the public leaderboard dataset with the paper's Table 1 baselines.
|
| 2 |
+
|
| 3 |
+
Generates one JSON record per system under seeds/submissions/<uuid>.json.
|
| 4 |
+
UUIDs are deterministic (uuid5 of the method name), so re-running this script
|
| 5 |
+
overwrites existing seed records rather than creating duplicates.
|
| 6 |
+
|
| 7 |
+
To publish to the public dataset, either:
|
| 8 |
+
(a) Drag-drop the resulting folder onto the HF UI of
|
| 9 |
+
Ted412/EgoMemReason-Leaderboard → submissions/, or
|
| 10 |
+
(b) Run:
|
| 11 |
+
from huggingface_hub import HfApi
|
| 12 |
+
HfApi().upload_folder(
|
| 13 |
+
folder_path="seeds/submissions",
|
| 14 |
+
path_in_repo="submissions",
|
| 15 |
+
repo_id="Ted412/EgoMemReason-Leaderboard",
|
| 16 |
+
repo_type="dataset",
|
| 17 |
+
)
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
import json
|
| 21 |
+
import pathlib
|
| 22 |
+
import uuid
|
| 23 |
+
|
| 24 |
+
# Stable seed namespace so uuid5 ids are reproducible across runs.
|
| 25 |
+
SEED_NS = uuid.UUID("5a4f2b1c-0000-4ab2-9c01-deadbeef0001")
|
| 26 |
+
|
| 27 |
+
# Authors uploaded the paper's numbers under this HF handle.
|
| 28 |
+
SEED_HF_USER = "Ted412"
|
| 29 |
+
SEED_DATE = "2026-05-01T00:00:00Z" # COLM submission date — adjust if needed.
|
| 30 |
+
|
| 31 |
+
# Source of truth: Table 1 of the paper PDF (Long_Video_Memory_for_Arxiv_v24.pdf).
|
| 32 |
+
# Columns: Tracking, Counting, Ordering, Linking, Spatial, Activity, Overall.
|
| 33 |
+
PAPER_TABLE = [
|
| 34 |
+
# (method_name, category, model_size, uses_external_data, modality,
|
| 35 |
+
# tracking, counting, ordering, linking, spatial, activity, overall)
|
| 36 |
+
("Random", "Baseline", "—", False, "other",
|
| 37 |
+
19.6, 16.7, 11.1, 17.3, 19.3, 19.2, 16.8),
|
| 38 |
+
|
| 39 |
+
("InternVL3.5-8B", "General MLLM", "8B", False, "frames-only",
|
| 40 |
+
23.0, 29.0, 23.0, 27.0, 34.0, 42.0, 28.0),
|
| 41 |
+
("Qwen-3-VL-8B", "General MLLM", "8B", False, "frames-only",
|
| 42 |
+
35.0, 28.0, 23.0, 21.0, 40.0, 42.0, 29.6),
|
| 43 |
+
("InternVL3.5-38B", "General MLLM", "38B", False, "frames-only",
|
| 44 |
+
33.0, 40.0, 27.0, 24.0, 46.0, 32.0, 32.6),
|
| 45 |
+
("Qwen-3-VL-30B-A3B", "General MLLM", "30B MoE", False, "frames-only",
|
| 46 |
+
36.0, 48.0, 25.0, 26.0, 40.0, 30.0, 34.0),
|
| 47 |
+
("Qwen-3-VL-32B", "General MLLM", "32B", False, "frames-only",
|
| 48 |
+
35.0, 46.0, 27.0, 27.0, 50.0, 46.0, 36.8),
|
| 49 |
+
("GPT-5", "General MLLM", "API", False, "frames-only",
|
| 50 |
+
29.0, 42.0, 20.0, 18.0, 32.0, 28.0, 27.8),
|
| 51 |
+
("Gemini-3-Flash", "General MLLM", "API", False, "frames-only",
|
| 52 |
+
46.0, 28.0, 36.0, 44.0, 44.0, 44.0, 39.6),
|
| 53 |
+
("Gemini-3.1-Pro", "General MLLM", "API", False, "frames-only",
|
| 54 |
+
40.0, 26.0, 44.0, 33.0, 40.0, 48.0, 37.4),
|
| 55 |
+
|
| 56 |
+
("LongVA-7B", "Video-specific MLLM", "7B", False, "frames-only",
|
| 57 |
+
22.0, 18.0, 20.0, 20.0, 20.0, 22.0, 20.6),
|
| 58 |
+
("StreamingVLM", "Video-specific MLLM", "—", False, "video-only",
|
| 59 |
+
25.0, 29.0, 21.0, 20.0, 20.0, 32.0, 24.2),
|
| 60 |
+
("InternVideo-2.5-8B", "Video-specific MLLM", "8B", False, "frames-only",
|
| 61 |
+
29.0, 27.0, 25.0, 15.0, 32.0, 32.0, 25.6),
|
| 62 |
+
("VideoLLaMA3-8B", "Video-specific MLLM", "8B", False, "frames-only",
|
| 63 |
+
23.0, 31.0, 27.0, 32.0, 38.0, 36.0, 30.0),
|
| 64 |
+
("Molmo2-8B", "Video-specific MLLM", "8B", False, "frames-only",
|
| 65 |
+
36.0, 50.0, 27.0, 25.0, 34.0, 22.0, 33.2),
|
| 66 |
+
|
| 67 |
+
("SiLVR", "Agentic Video Framework", "API + 8B", False, "captions-only",
|
| 68 |
+
31.0, 14.0, 27.0, 17.0, 18.0, 28.0, 22.4),
|
| 69 |
+
("Ego-R1", "Agentic Video Framework", "API", False, "frames-only",
|
| 70 |
+
30.0, 18.0, 23.0, 18.0, 48.0, 32.0, 25.8),
|
| 71 |
+
("WorldMM", "Agentic Video Framework", "API", False, "frames-only",
|
| 72 |
+
32.0, 44.0, 21.0, 21.0, 34.0, 36.0, 30.6),
|
| 73 |
+
("AVP", "Agentic Video Framework", "API", False, "frames-only",
|
| 74 |
+
34.0, 42.0, 31.0, 27.0, 38.0, 34.0, 34.0),
|
| 75 |
+
]
|
| 76 |
+
|
| 77 |
+
PROJECT_URL = "https://github.com/Ted412/EgoMemReason"
|
| 78 |
+
PUBLICATION_URL = "https://arxiv.org/abs/<arxiv_id>" # placeholder — fill in after posting
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
def build_record(row):
|
| 82 |
+
(name, category, size, uses_ext, modality,
|
| 83 |
+
tracking, counting, ordering, linking, spatial, activity, overall) = row
|
| 84 |
+
sid = str(uuid.uuid5(SEED_NS, f"paper-baseline:{name}"))
|
| 85 |
+
return {
|
| 86 |
+
"submission_id": sid,
|
| 87 |
+
"submitted_at_utc": SEED_DATE,
|
| 88 |
+
"hf_user_id": SEED_HF_USER,
|
| 89 |
+
"team_name": f"EgoMemReason paper · {category}",
|
| 90 |
+
"method_name": name,
|
| 91 |
+
"model_size": size,
|
| 92 |
+
"uses_external_data": uses_ext,
|
| 93 |
+
"uses_video_frames": modality,
|
| 94 |
+
"method_description": f"Baseline from Table 1 of the EgoMemReason paper ({category}).",
|
| 95 |
+
"project_url": PROJECT_URL,
|
| 96 |
+
"publication_url": PUBLICATION_URL,
|
| 97 |
+
"is_selected": True,
|
| 98 |
+
"metrics": {
|
| 99 |
+
"Cumulative State Tracking": tracking,
|
| 100 |
+
"Temporal Counting": counting,
|
| 101 |
+
"Event Ordering": ordering,
|
| 102 |
+
"Event Linking": linking,
|
| 103 |
+
"Spatial Preference": spatial,
|
| 104 |
+
"Activity Pattern": activity,
|
| 105 |
+
"Overall": overall,
|
| 106 |
+
},
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
def main():
|
| 111 |
+
out_dir = pathlib.Path(__file__).resolve().parents[1] / "seeds" / "submissions"
|
| 112 |
+
out_dir.mkdir(parents=True, exist_ok=True)
|
| 113 |
+
|
| 114 |
+
for row in PAPER_TABLE:
|
| 115 |
+
record = build_record(row)
|
| 116 |
+
path = out_dir / f"{record['submission_id']}.json"
|
| 117 |
+
path.write_text(json.dumps(record, indent=2))
|
| 118 |
+
|
| 119 |
+
print(f"Wrote {len(PAPER_TABLE)} seed records to {out_dir}/")
|
| 120 |
+
print("Next: upload to Ted412/EgoMemReason-Leaderboard via HF UI or:")
|
| 121 |
+
print(" python -c \"from huggingface_hub import HfApi; "
|
| 122 |
+
"HfApi().upload_folder("
|
| 123 |
+
"folder_path='seeds/submissions', "
|
| 124 |
+
"path_in_repo='submissions', "
|
| 125 |
+
"repo_id='Ted412/EgoMemReason-Leaderboard', "
|
| 126 |
+
"repo_type='dataset')\"")
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
if __name__ == "__main__":
|
| 130 |
+
main()
|