fix example generation
Browse filesthe 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
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["
|
160 |
-
"text": info["
|
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
|