Jinchen Ge
commited on
Commit
·
2bb73b8
1
Parent(s):
68f1179
Rename dev to valid
Browse files- vqa-lxmert.py +4 -4
vqa-lxmert.py
CHANGED
@@ -45,13 +45,13 @@ These questions require an understanding of vision, language and commonsense kno
|
|
45 |
_URLS = {
|
46 |
"train": "https://nlp.cs.unc.edu/data/lxmert_data/vqa/train.json",
|
47 |
"train_feat": "https://nlp.cs.unc.edu/data/lxmert_data/mscoco_imgfeat/train2014_obj36.zip",
|
48 |
-
"
|
49 |
-
"
|
50 |
"ans2label": "https://raw.githubusercontent.com/airsplay/lxmert/master/data/vqa/trainval_ans2label.json",
|
51 |
}
|
52 |
|
53 |
_TRAIN_IMG_PATH = "train2014_obj36.tsv"
|
54 |
-
|
55 |
|
56 |
FIELDNAMES = [
|
57 |
"img_id", "img_h", "img_w", "objects_id", "objects_conf", "attrs_id", "attrs_conf", "num_boxes", "boxes", "features"
|
@@ -106,7 +106,7 @@ class VqaV2Lxmert(datasets.GeneratorBasedBuilder):
|
|
106 |
),
|
107 |
datasets.SplitGenerator(
|
108 |
name=datasets.Split.VALIDATION,
|
109 |
-
gen_kwargs={"filepath": dl_dir["
|
110 |
),
|
111 |
]
|
112 |
|
|
|
45 |
_URLS = {
|
46 |
"train": "https://nlp.cs.unc.edu/data/lxmert_data/vqa/train.json",
|
47 |
"train_feat": "https://nlp.cs.unc.edu/data/lxmert_data/mscoco_imgfeat/train2014_obj36.zip",
|
48 |
+
"valid": "https://nlp.cs.unc.edu/data/lxmert_data/vqa/valid.json",
|
49 |
+
"valid_feat": "https://nlp.cs.unc.edu/data/lxmert_data/mscoco_imgfeat/val2014_obj36.zip",
|
50 |
"ans2label": "https://raw.githubusercontent.com/airsplay/lxmert/master/data/vqa/trainval_ans2label.json",
|
51 |
}
|
52 |
|
53 |
_TRAIN_IMG_PATH = "train2014_obj36.tsv"
|
54 |
+
_VALID_IMG_PATH = "mscoco_imgfeat/val2014_obj36.tsv"
|
55 |
|
56 |
FIELDNAMES = [
|
57 |
"img_id", "img_h", "img_w", "objects_id", "objects_conf", "attrs_id", "attrs_conf", "num_boxes", "boxes", "features"
|
|
|
106 |
),
|
107 |
datasets.SplitGenerator(
|
108 |
name=datasets.Split.VALIDATION,
|
109 |
+
gen_kwargs={"filepath": dl_dir["valid"], "imgfeat": os.path.join(dl_dir["valid_feat"], _VALID_IMG_PATH)},
|
110 |
),
|
111 |
]
|
112 |
|