Datasets:
rename variables
Browse files- ActivityNet_Captions.py +8 -8
ActivityNet_Captions.py
CHANGED
@@ -51,11 +51,11 @@ class ActivityNet(datasets.GeneratorBasedBuilder):
|
|
51 |
features=datasets.Features(
|
52 |
{
|
53 |
"video_id": datasets.Value("string"),
|
54 |
-
"
|
55 |
"duration": datasets.Value("float32"),
|
56 |
-
"
|
57 |
-
"
|
58 |
-
"
|
59 |
}
|
60 |
),
|
61 |
supervised_keys=None,
|
@@ -107,9 +107,9 @@ class ActivityNet(datasets.GeneratorBasedBuilder):
|
|
107 |
captions = [str(caption) for caption in infos[id]["sentences"]]
|
108 |
yield idx, {
|
109 |
"video_id": id,
|
110 |
-
"
|
111 |
"duration": float(infos[id]["duration"]),
|
112 |
-
"
|
113 |
-
"
|
114 |
-
"
|
115 |
}
|
|
|
51 |
features=datasets.Features(
|
52 |
{
|
53 |
"video_id": datasets.Value("string"),
|
54 |
+
"video_path": datasets.Value("string"),
|
55 |
"duration": datasets.Value("float32"),
|
56 |
+
"captions_starts": datasets.features.Sequence(datasets.Value("float32")),
|
57 |
+
"captions_ends": datasets.features.Sequence(datasets.Value("float32")),
|
58 |
+
"en_captions": datasets.features.Sequence(datasets.Value("string"))
|
59 |
}
|
60 |
),
|
61 |
supervised_keys=None,
|
|
|
107 |
captions = [str(caption) for caption in infos[id]["sentences"]]
|
108 |
yield idx, {
|
109 |
"video_id": id,
|
110 |
+
"video_path": path,
|
111 |
"duration": float(infos[id]["duration"]),
|
112 |
+
"captions_starts": starts,
|
113 |
+
"captions_ends": ends,
|
114 |
+
"en_captions": captions,
|
115 |
}
|