Harden construction validation
Browse files- construction/README.md +0 -133
- construction/create_data.py +5 -3
construction/README.md
DELETED
|
@@ -1,133 +0,0 @@
|
|
| 1 |
-
# EVVE construction notes
|
| 2 |
-
|
| 3 |
-
EVVE is a video-to-video specific-event retrieval benchmark introduced at
|
| 4 |
-
CVPR 2013. The published core protocol contains 620 query videos, 2,375
|
| 5 |
-
database videos, 13 events, and 135,213 positive query/database judgments. Its
|
| 6 |
-
optional large-scale track adds 100,000 distractor videos.
|
| 7 |
-
|
| 8 |
-
The original project page releases annotations, evaluation software, and
|
| 9 |
-
descriptors and identifies the media by YouTube ID. Its legal note says that
|
| 10 |
-
the software is BSD-licensed, descriptors are free, and copyright details for
|
| 11 |
-
original videos remain on their YouTube pages. No dataset-wide video license is
|
| 12 |
-
specified. The page does not state an explicit prohibition on redistribution.
|
| 13 |
-
The constructor records this provenance without claiming that redistribution
|
| 14 |
-
is authorized by EVVE or that video copyright was transferred.
|
| 15 |
-
|
| 16 |
-
`s2vs-2023-video-ids.txt` freezes the video IDs present in the public S2VS EVVE
|
| 17 |
-
feature artifact. Of those 2,410 IDs, 2,110 videos were reproducibly obtainable
|
| 18 |
-
from public sources: 2,042 directly from their original YouTube IDs, 67 from
|
| 19 |
-
exact Wayback Machine captures, and one from an exact Internet Archive item.
|
| 20 |
-
`surviving-public-media-video-ids.txt` freezes that packaged set. Intersecting it
|
| 21 |
-
with the checksum-pinned annotation file produces the fixed evaluation protocol:
|
| 22 |
-
|
| 23 |
-
- 466 query videos;
|
| 24 |
-
- 1,644 database videos;
|
| 25 |
-
- all 13 events;
|
| 26 |
-
- 86,925 binary relevance judgments.
|
| 27 |
-
|
| 28 |
-
Filtering the S2VS layer removes 300 unavailable IDs: 38 queries and 262 database
|
| 29 |
-
videos (81 positive and 181 other candidates), eliminating 13,864 qrels. The
|
| 30 |
-
final protocol retains all 13 events, 958 positive database videos, 686 other
|
| 31 |
-
candidates, zero query/corpus ID overlap, and 86,925 positive qrels. Every one
|
| 32 |
-
of the 466 retained queries has at least one positive. `protocol-summary.json`
|
| 33 |
-
records event-by-event original, S2VS-before-filter, and packaged-after-filter
|
| 34 |
-
coverage.
|
| 35 |
-
|
| 36 |
-
This is a reproducible surviving-public-media subset of EVVE, not the complete
|
| 37 |
-
original benchmark. It has 154 fewer queries and 731 fewer database videos than
|
| 38 |
-
the published core, and it omits the original 100,000 distractors. Published
|
| 39 |
-
scores are therefore not directly comparable.
|
| 40 |
-
|
| 41 |
-
Run a metadata-only integrity audit with:
|
| 42 |
-
|
| 43 |
-
```bash
|
| 44 |
-
uv run python scripts/data/evve/create_data.py --work-dir /tmp/evve-mteb
|
| 45 |
-
```
|
| 46 |
-
|
| 47 |
-
Download the exact frozen set reproducibly with yt-dlp. Downloads are resumable,
|
| 48 |
-
limited to video at up to 360p, and never silently remove failures:
|
| 49 |
-
|
| 50 |
-
```bash
|
| 51 |
-
uv run python scripts/data/evve/create_data.py \
|
| 52 |
-
--work-dir /tmp/evve-mteb \
|
| 53 |
-
--download \
|
| 54 |
-
--workers 8
|
| 55 |
-
```
|
| 56 |
-
|
| 57 |
-
YouTube may require proof-of-origin tokens even for public, logged-out media.
|
| 58 |
-
When that happens, install a guest PO-token provider alongside yt-dlp and pass
|
| 59 |
-
its client/runtime settings without using account cookies. For example, with a
|
| 60 |
-
compatible provider listening on its default local port:
|
| 61 |
-
|
| 62 |
-
```bash
|
| 63 |
-
uv run \
|
| 64 |
-
--with 'yt-dlp[default]==2026.7.4' \
|
| 65 |
-
--with 'bgutil-ytdlp-pot-provider==1.3.1' \
|
| 66 |
-
python scripts/data/evve/create_data.py \
|
| 67 |
-
--work-dir /tmp/evve-mteb \
|
| 68 |
-
--download \
|
| 69 |
-
--workers 4 \
|
| 70 |
-
--yt-dlp-arg=--js-runtimes \
|
| 71 |
-
--yt-dlp-arg=node \
|
| 72 |
-
--yt-dlp-arg=--extractor-args \
|
| 73 |
-
--yt-dlp-arg=youtube:player_client=mweb
|
| 74 |
-
```
|
| 75 |
-
|
| 76 |
-
`--yt-dlp-arg` is repeatable so current extractor requirements can be supplied
|
| 77 |
-
explicitly and recorded with a construction run. Authentication cookies are
|
| 78 |
-
optional and are never read unless `--cookies-from-browser` is provided.
|
| 79 |
-
For a distributed or focused resume, `--download-id-file` accepts a newline-
|
| 80 |
-
separated subset of the frozen IDs. It changes only the acquisition queue;
|
| 81 |
-
packaging still validates the complete 2,110-video evaluation manifest.
|
| 82 |
-
|
| 83 |
-
The constructor writes `download-failures.jsonl` and fails until all 2,110
|
| 84 |
-
videos are present and contain decodable frames. Four YouTube IDs whose
|
| 85 |
-
progressive format currently contains MP4 headers but no media payload are
|
| 86 |
-
downloaded from separate video-only and audio streams and merged without
|
| 87 |
-
transcoding. The complete frozen tree was also audited with the same TorchCodec
|
| 88 |
-
10-frame uniform sampler that MTEB applies during evaluation; all 2,110 videos
|
| 89 |
-
passed. On a resumed run it validates existing media
|
| 90 |
-
only once, tries previously unattempted IDs before earlier transient and hard
|
| 91 |
-
failures, and stops the pass immediately if YouTube starts returning its
|
| 92 |
-
bot-confirmation gate. This preserves completed files and prevents temporary
|
| 93 |
-
rate limits from being recorded as dataset attrition. `media-manifest.jsonl`
|
| 94 |
-
then freezes each
|
| 95 |
-
filename, original YouTube URL, actual acquisition URL, byte count, and SHA-256
|
| 96 |
-
digest. `media-source-overrides.json` pins exact public archive captures and
|
| 97 |
-
their checksums for source IDs that are no longer directly downloadable. To use
|
| 98 |
-
an existing media tree, pass `--media-root`; files may be named
|
| 99 |
-
`<youtube-id>.*` or placed beneath a directory named `<youtube-id>`.
|
| 100 |
-
|
| 101 |
-
After validating the complete frozen set, push the standard MTEB `corpus`,
|
| 102 |
-
`queries`, and `qrels` configurations plus the dataset card and manifests:
|
| 103 |
-
|
| 104 |
-
```bash
|
| 105 |
-
uv run python scripts/data/evve/create_data.py \
|
| 106 |
-
--work-dir /tmp/evve-mteb \
|
| 107 |
-
--repo-id Cerru02/EVVE \
|
| 108 |
-
--push
|
| 109 |
-
```
|
| 110 |
-
|
| 111 |
-
The Hub upload uses the currently authenticated Hugging Face identity and writes
|
| 112 |
-
the immutable final revision to `hub_revision.txt`.
|
| 113 |
-
|
| 114 |
-
Sources:
|
| 115 |
-
|
| 116 |
-
- Original paper: https://openaccess.thecvf.com/content_cvpr_2013/html/Revaud_Event_Retrieval_in_2013_CVPR_paper.html
|
| 117 |
-
- Archived project page: https://web.archive.org/web/20241102150758id_/http://pascal.inrialpes.fr/data2/evve/index.html
|
| 118 |
-
- S2VS source revision: https://github.com/gkordo/s2vs/tree/03eb0c9a9a7455d132c4210b797fa6ef563b52ea
|
| 119 |
-
- S2VS feature artifact: https://mever.iti.gr/s2vs/features/evve.hdf5
|
| 120 |
-
- Surviving evaluator copy: https://github.com/fyang93/BURST/blob/c0f59d49ffe6b4069809794697554c8a1ce969d9/eval_evve.py
|
| 121 |
-
|
| 122 |
-
The original evaluator uses trapezoidal AP and removes event-specific `null`
|
| 123 |
-
videos from each ranking. It reports query-weighted `overall mAP` and the mean
|
| 124 |
-
of 13 event-level mAP values as `avg-mAP`. Table 3 identifies the latter as
|
| 125 |
-
`Event avg-mAP`. The MTEB task therefore retrieves all 1,644 database videos,
|
| 126 |
-
preserves the per-query ignored-ID field (empty in the pinned annotation
|
| 127 |
-
snapshot), and exposes event-balanced `evve_avg_map` as `main_score`;
|
| 128 |
-
`evve_overall_map` is also reported. Ordinary pytrec
|
| 129 |
-
`map_at_k` remains useful but is not identical to the source score.
|
| 130 |
-
|
| 131 |
-
The original 100,000-video distractor collection is not publicly available and
|
| 132 |
-
is not included. Together with core attrition, that makes scores on this frozen
|
| 133 |
-
reduced corpus not directly comparable to source-paper results.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
construction/create_data.py
CHANGED
|
@@ -517,8 +517,11 @@ def _video_is_decodable(path: Path) -> bool:
|
|
| 517 |
|
| 518 |
try:
|
| 519 |
from torchcodec.decoders import VideoDecoder # type: ignore[attr-defined]
|
| 520 |
-
except ImportError:
|
| 521 |
-
|
|
|
|
|
|
|
|
|
|
| 522 |
try:
|
| 523 |
duration = VideoDecoder(str(path)).metadata.duration_seconds
|
| 524 |
return duration is not None and duration > 0
|
|
@@ -1151,7 +1154,6 @@ def push_dataset(
|
|
| 1151 |
for local_path, path_in_repo in (
|
| 1152 |
(card_path, "README.md"),
|
| 1153 |
(Path(__file__), "construction/create_data.py"),
|
| 1154 |
-
(Path(__file__).with_name("README.md"), "construction/README.md"),
|
| 1155 |
(
|
| 1156 |
PROTOCOL_MANIFEST,
|
| 1157 |
f"construction/{PROTOCOL_MANIFEST.name}",
|
|
|
|
| 517 |
|
| 518 |
try:
|
| 519 |
from torchcodec.decoders import VideoDecoder # type: ignore[attr-defined]
|
| 520 |
+
except ImportError as error:
|
| 521 |
+
raise RuntimeError(
|
| 522 |
+
"Media validation requires ffprobe or TorchCodec. Install FFmpeg or "
|
| 523 |
+
"MTEB's `video` extra before downloading or packaging EVVE."
|
| 524 |
+
) from error
|
| 525 |
try:
|
| 526 |
duration = VideoDecoder(str(path)).metadata.duration_seconds
|
| 527 |
return duration is not None and duration > 0
|
|
|
|
| 1154 |
for local_path, path_in_repo in (
|
| 1155 |
(card_path, "README.md"),
|
| 1156 |
(Path(__file__), "construction/create_data.py"),
|
|
|
|
| 1157 |
(
|
| 1158 |
PROTOCOL_MANIFEST,
|
| 1159 |
f"construction/{PROTOCOL_MANIFEST.name}",
|