referit / README.md
yiqun's picture
fix usage bug
055c5ee verified
|
raw
history blame
663 Bytes
metadata
license: apache-2.0

This repo provides a script to load refcoco, refcocog, and refcoco+ with local files. You should download the data first.

[DATA_ROOT]
|_ images
  |_ train2014
    |_ ... (images)
|_ refcoco
  |_ instances.json
  |_ refs(google).p
  |_ refs(unc).p
|_ refcocog
  |_ instances.json
  |_ refs(google).p
  |_ refs(umd).p
|_ refcoco+
  |_ instances.json
  |_ refs(unc).p

Usage:

REPO_NAME = "yiqun/referit"
dataset = "refcoco"
DATA_ROOT = ...
split = "train"  # choices: train, val, test, testA, testB
split_by = "unc"
datasets.load_dataset(REPO_NAME, dataset, data_dir=DATA_ROOT, split=split, split_by=split_by)