--- license: mit language: - en pretty_name: VL-Adapter Datasets (CLIP-RN101 features) size_categories: - 100K the image id row["features"] # (49, 2048) float16 CLIP-RN101 attention-pool grid features ``` Shards are written with 128-row row groups, so reading a single row costs about an 8.6 MB fetch rather than the whole 275 MB shard — measured at ~5 s to the first row, against ~9 minutes when the shards were a single row group. Streaming a full pass still transfers everything, so for repeated training runs restore the tree once with `restore_datasets.py` rather than streaming it each epoch. ## Contents | Path | Rows / files | Download | Restored | Notes | |---|---|---|---|---| | `features/COCO/data_clip_RN101_att/` | 245,496 | 16.5 GB | 49.9 GB | train2014 82,783 · val2014 40,504 · test2015 122,209 | | `features/GQA/data_clip_RN101_att/` | 148,854 | 10.1 GB | 30.2 GB | | | `features/VG/data_clip_RN101_att/` | 108,079 | 7.3 GB | 22.0 GB | | | `features/nlvr/data_clip_RN101_att/` | 119,354 | 7.9 GB | 24.3 GB | NLVR2 train/dev/test1 | | `annotations/` | 43 files | 5.7 GB | 5.7 GB | verbatim copies of the original JSON/TXT/PY files | | `manifest.json.gz` | — | small | — | every original path with its size and CRC-32, used to verify a restore | | **total** | | **47.4 GB** | **132 GB** | | "Download" is the zstd-compressed parquet on the Hub; "Restored" is the uncompressed `.h5` tree that `restore_datasets.py` writes. Restoring a single dataset costs only its own row — `--datasets GQA` needs 30.2 GB, not 132 GB. ### Feature schema Each row is one image: | column | type | meaning | |---|---|---| | `id` | `string` | image id — the `.h5` filename stem and the HDF5 group name | | `features` | `fixed_size_list[2048]>[49]` | CLIP-RN101 attention-pool grid features, shape `(49, 2048)` | In the original release each of these rows was a standalone `.h5` file holding a single group named `id` with one `(49, 2048)` float16 dataset called `features`. 621,783 such files exceed the Hub's recommended limits (<100k files per repo, <10k per folder), so they are packed into 154 zstd-compressed parquet shards of 4,096 rows each, subdivided into 128-row row groups. `restore_datasets.py` unpacks them back to identical `.h5` files — the arrays it writes are bit-exact and the files are the same 203,136 bytes; only an internal HDF5 heap offset differs. ### Annotations `annotations/` mirrors the original folder layout byte-for-byte (`annotations/vqa/karpathy_train.json` → `datasets/vqa/karpathy_train.json`). They are left as raw JSON rather than converted to parquet because their schemas vary widely and the training code parses them directly. `annotations/GQA/paragraph_testdev.json` is 0 bytes, and `COCO/clip_features/data_clip_RN101_fc/` and `paragraphs/` are empty, in the original release too. ## NLVR2 images are not included The original archive also contained 119,354 NLVR2 photographs. The NLVR2 authors do not own their copyright and [ask that they not be shared publicly](https://github.com/lil-lab/nlvr/tree/master/nlvr2), so only the CLIP features derived from them are published here. Every script under `VL-T5/scripts/image/` reads `clip_features` and runs without the images. They are needed only for the end-to-end pixel training paths (`VL-T5/src/*_raw_data.py`). Request them from the [NLVR2 repository](https://github.com/lil-lab/nlvr/tree/master/nlvr2) and place them at `datasets/nlvr/images/`. Raw COCO, GQA and Visual Genome images are likewise not included; get them from [COCO](https://cocodataset.org/#download), [GQA](https://cs.stanford.edu/people/dorarad/gqa/download.html) and [Visual Genome](https://homes.cs.washington.edu/~ranjay/visualgenome/api.html). ## Extracting your own features See [`feature_extraction/`](https://github.com/ylsung/VL_adapter/tree/main/feature_extraction) in the code repository to build features for other CLIP backbones. ## Licensing The packaging code and the VL-Adapter project are MIT licensed. The underlying annotations and images keep the licenses of their original sources — [MS COCO](https://cocodataset.org/#termsofuse), [Visual Genome](https://homes.cs.washington.edu/~ranjay/visualgenome/api.html), [GQA](https://cs.stanford.edu/people/dorarad/gqa/about.html), [VQA v2](https://visualqa.org/terms.html) and [NLVR2](https://github.com/lil-lab/nlvr/tree/master/nlvr2) — and the derived features are released for research use on the same terms. ## Citation ```bibtex @inproceedings{sung2022vladapter, title = {VL-Adapter: Parameter-Efficient Transfer Learning for Vision-and-Language Tasks}, author = {Yi-Lin Sung, Jaemin Cho, Mohit Bansal}, booktitle = {CVPR}, year = {2022} } ```