Datasets:

Tasks:
Other
Languages:
English
ArXiv:
License:
giu-alb commited on
Commit
d7b3d32
1 Parent(s): 130db22

fix example generation

Browse files

the loading script

according to the dataset card the example format is:
{
"video_id": "41775",
"video": "<ExFileObject name="">",
"text": "moving drawer of night stand",
"label": 33,
"placeholders": ["drawer", "night stand"]}
}

so the label field should be the index of one of the classes defined in classes.py which are copied from the `labels.json` file of the dataset
however, in the split annotations, the field "label" does contain a class label from that list, it is the template field that does
the label field contains a text description obtain by replacing the placeholders in the templates
the script misinterprets this and so it currently doesn't work
by fixing this (patched version attached) the loading script should work again

Files changed (1) hide show
  1. something_something_v2.py +2 -2
something_something_v2.py CHANGED
@@ -156,8 +156,8 @@ class SomethingSomethingV2(datasets.GeneratorBasedBuilder):
156
  "video_id": video_id,
157
  "video": file,
158
  "placeholders": info.get("placeholders", []),
159
- "label": info["label"] if "label" in info else -1,
160
- "text": info["template"],
161
  }
162
 
163
  idx += 1
 
156
  "video_id": video_id,
157
  "video": file,
158
  "placeholders": info.get("placeholders", []),
159
+ "label": info["template"],
160
+ "text": info["label"] if "label" in info else -1,
161
  }
162
 
163
  idx += 1