--- license: cc-by-nc-sa-4.0 task_categories: - video-text-to-text - text-to-video language: - en tags: - video - video-captioning - internvid - tfrecord - tfds pretty_name: InternVid-1M (FLT, recaptioned) size_categories: - 1M__.mp4` | | `youtube_id` | string | Source YouTube video id | | `index` | int64 | Row id **in the parent dataset** (non-contiguous here) | | `caption` | string | InternVid's original short caption | | `recap_caption` | string | Long re-captioned description (median ~347 bytes) | | `start_sec` / `end_sec` | float32 | Clip span within the source video | | `start_timestamp` / `end_timestamp` | string | Same span as `HH:MM:SS.mmm` | | `duration_sec` | float32 | Clip duration (matches the real video to ~0.0002 s median) | | `aesthetic_score` | float32 | Aesthetic predictor score | | `umt_score` | float32 | UMT video-text similarity (the "FLT" filter score) | > **Note:** `index` refers to the parent's row numbering, so it is *not* > contiguous in this subset (observed range 179,080 – 10,634,432). Don't use it > as a row counter. ## Measured clip statistics Measured by parsing MP4 atoms directly (`mvhd`/`mdhd`/`stts`). All sampled clips were perfectly CFR (a single `stts` entry), so these frame rates are exact. **Duration** — heavily right-skewed, most clips are short: ``` min 0.50s p10 1.13s p25 1.90s median 3.70s p75 9.74s p90 19.08s max 110.2s mean 8.31s ``` **Frame rate:** | fps | share | |---|---| | 30.00 | 30% | | 29.97 | 30% | | 25.00 | 28% | | 24.00 / 23.98 | 8% | | other (23.78, 24.98, 29.94, 10.00) | 4% | **Frame count:** median 103, p25 49, p75 250, max 3304. ⚠️ Because the median clip is only ~3.7 s, pipelines that sample a fixed number of frames at a low target fps will frequently come up short — e.g. sampling at 1 fps yields a median of just 3–4 frames. Budget for padding and masking, and check your effective frame counts rather than assuming your requested count. ## Usage ### TFDS (native format) ```python import tensorflow_datasets as tfds builder = tfds.builder_from_directory("data/1.0.0") # after snapshot_download ds = builder.as_dataset(split="train") for ex in tfds.as_numpy(ds.take(1)): mp4_bytes = ex["video_bytes"] # feed to decord / PyAV / ffmpeg print(len(mp4_bytes), ex["recap_caption"].decode()) ``` Download first (412 GiB — fetch a subset of shards if you don't need it all): ```bash hf download Letian2003/internvid-1M --repo-type dataset --local-dir ./internvid-1M ``` Grab just a few shards: ```bash hf download Letian2003/internvid-1M --repo-type dataset --local-dir ./internvid-1M \ --include "data/1.0.0/dataset_info.json" "data/1.0.0/features.json" \ "data/1.0.0/internvid_10m_flt_packed-train.tfrecord-0000[0-3]-of-00206" ``` Note that `dataset_info.json` declares all 206 shards, so TFDS expects them all to be present; for a partial download, read the shards directly with `tf.data.TFRecordDataset` instead. ### Raw TFRecord (no TFDS) ```python import tensorflow as tf FEATURES = { "video_bytes": tf.io.FixedLenFeature([], tf.string), "recap_caption": tf.io.FixedLenFeature([], tf.string), "caption": tf.io.FixedLenFeature([], tf.string), "duration_sec": tf.io.FixedLenFeature([], tf.float32), "umt_score": tf.io.FixedLenFeature([], tf.float32), } ds = tf.data.TFRecordDataset(tf.io.gfile.glob("data/1.0.0/*.tfrecord-*")) ds = ds.map(lambda r: tf.io.parse_single_example(r, FEATURES)) ``` ## Dataset structure ``` data/1.0.0/ ├── dataset_info.json # TFDS metadata: 206 shards, 1,000,000 examples ├── features.json # TFDS feature spec (byte-identical to parent) ├── shard_provenance.json # src -> dst shard mapping for reproducibility ├── README.txt # provenance notes ├── LICENSE └── internvid_10m_flt_packed-train.tfrecord-{00000..00205}-of-00206 ``` The dataset viewer is not available for this repo: the clips are stored as raw MP4 bytes inside TFRecord containers rather than Parquet/WebDataset. ## Limitations - **Not deduplicated by source video.** Clips are independent samples, so two clips from the same YouTube video can both appear. Group by `youtube_id` if you need source-disjoint train/test splits. - **English captions only.** - Inherits any bias and noise present in InternVid-10M-FLT; `recap_caption` is model-generated and not human-verified. - No train/validation split is defined — the whole subset is `train`. ## License `cc-by-nc-sa-4.0`, inherited from InternVid. Non-commercial use only. The underlying videos remain the property of their original YouTube uploaders. ## Citation Please cite the original InternVid paper: ```bibtex @article{wang2023internvid, title={InternVid: A Large-scale Video-Text Dataset for Multimodal Understanding and Generation}, author={Wang, Yi and He, Yinan and Li, Yizhuo and Li, Kunchang and Yu, Jiashuo and Ma, Xin and Chen, Xinyuan and Wang, Yaohui and Luo, Ping and Liu, Ziwei and Wang, Yali and Wang, Limin and Qiao, Yu}, journal={arXiv preprint arXiv:2307.06942}, year={2023} } ```