id stringlengths 25 27 | features list |
|---|---|
COCO_test2015_000000218871 | [[0.0,0.0,0.09222412109375,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.26123046875,0.0,0.0,0.0(...TRUNCATED) |
COCO_val2014_000000214520 | [[0.0,0.0,0.0,0.0,0.5986328125,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.08233642578125,0.0,0.0,(...TRUNCATED) |
COCO_train2014_000000237791 | [[0.0,0.0,0.0,1.0712890625,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.5263671875,0.0,0.0,0.0,0.0,0.0,0.0,0.0,(...TRUNCATED) |
COCO_test2015_000000104864 | [[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.79833984375,0.0,(...TRUNCATED) |
COCO_train2014_000000217461 | [[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,2.3125,2.64453125,0.0,0.0,0.0,0.0,0.0,0.0,(...TRUNCATED) |
COCO_val2014_000000446359 | [[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.(...TRUNCATED) |
COCO_test2015_000000149387 | [[0.0,0.0,0.077392578125,0.0,1.3720703125,0.0,0.37646484375,0.0,0.0,0.21923828125,0.0,0.0,0.0,0.0,0.(...TRUNCATED) |
COCO_test2014_000000420949 | [[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.(...TRUNCATED) |
COCO_train2014_000000124840 | [[0.0,0.0,0.0,0.0,1.810546875,0.001953125,0.0,0.0,0.0,2.888671875,0.0,0.0,0.1944580078125,0.0,0.6191(...TRUNCATED) |
COCO_test2015_000000381648 | [[0.0,0.0,0.08477783203125,0.0,0.96533203125,0.0,0.0084228515625,0.04150390625,0.0,0.23046875,0.0,0.(...TRUNCATED) |
VL-Adapter Datasets
Processed CLIP-ResNet101 grid features and annotations for VL-Adapter: Parameter-Efficient Transfer Learning for Vision-and-Language Tasks (Sung, Cho, Bansal — CVPR 2022), code at ylsung/VL_adapter.
This repository replaces the original Google Drive download, which is no longer
available. It holds the same data in a Hub-native layout, plus a script that
rebuilds the exact datasets/ directory tree the training code expects.
Quick start — rebuild the original datasets/ tree
pip install huggingface_hub pyarrow h5py numpy
wget https://huggingface.co/datasets/ylsung/VL-Adapter-datasets/raw/main/restore_datasets.py
python restore_datasets.py --out ./datasets
This downloads one shard at a time and deletes it after expanding, so it needs
less than ~1 GB of scratch space beyond the final tree. It is resumable — rerun
it and it skips what is already on disk. Expect roughly 145 GB for the
restored tree (the .h5 files are uncompressed) and ~49 GB of download.
To restore a subset:
python restore_datasets.py --out ./datasets --datasets GQA --datasets nlvr
python restore_datasets.py --out ./datasets --only annotations
Using the features directly
If you just want the features and not the VL-Adapter directory layout:
from datasets import load_dataset
ds = load_dataset("ylsung/VL-Adapter-datasets", "GQA", split="train", streaming=True)
row = next(iter(ds))
row["id"] # '2336439' -> the image id
row["features"] # (49, 2048) float16 CLIP-RN101 attention-pool grid features
Contents
| Path | Rows / files | Size | Notes |
|---|---|---|---|
features/COCO/data_clip_RN101_att/ |
245,496 | ~17 GB | train2014 82,783 · val2014 40,504 · test2015 122,209 |
features/GQA/data_clip_RN101_att/ |
148,854 | ~10 GB | |
features/VG/data_clip_RN101_att/ |
108,079 | ~7.5 GB | |
features/nlvr/data_clip_RN101_att/ |
119,354 | ~8.3 GB | NLVR2 train/dev/test1 |
annotations/ |
43 files | ~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 |
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<fixed_size_list<float16>[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 ~150 zstd-compressed parquet shards of
4,096 rows each. 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, 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 and place
them at datasets/nlvr/images/.
Raw COCO, GQA and Visual Genome images are likewise not included; get them from COCO, GQA and Visual Genome.
Extracting your own features
See 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, Visual Genome, GQA, VQA v2 and NLVR2 — and the derived features are released for research use on the same terms.
Citation
@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}
}
- Downloads last month
- 833