Leyo commited on
Commit
37eaf3e
1 Parent(s): f966a1a

rename variables

Browse files
Files changed (1) hide show
  1. 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
- "path": datasets.Value("string"),
55
  "duration": datasets.Value("float32"),
56
- "starts": datasets.features.Sequence(datasets.Value("float32")),
57
- "ends": datasets.features.Sequence(datasets.Value("float32")),
58
- "captions": datasets.features.Sequence(datasets.Value("string"))
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
- "path": path,
111
  "duration": float(infos[id]["duration"]),
112
- "starts": starts,
113
- "ends": ends,
114
- "captions": captions,
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
  }