Luka-Wang commited on
Commit
654641a
·
1 Parent(s): e0b8f82

Update coco.py

Browse files
Files changed (1) hide show
  1. coco.py +12 -8
coco.py CHANGED
@@ -82,8 +82,8 @@ class NewDataset(datasets.GeneratorBasedBuilder):
82
  features=datasets.Features(
83
  {
84
  "filepath": datasets.Value("string"),
85
- "filename": datasets.Value("string"),
86
- "raw": datasets.Value("string")
87
  }
88
  ),
89
  return datasets.DatasetInfo(
@@ -120,10 +120,14 @@ class NewDataset(datasets.GeneratorBasedBuilder):
120
  for image in data["images"]:
121
  filepath = image["filepath"]
122
  filename = image["filename"]
123
- for sentence in image["sentences"]:
124
- raw = sentence["raw"]
125
- yield id_, {
126
  "filepath": filepath,
127
- "filename": filename,
128
- "raw": raw
129
- }
 
 
 
 
 
 
 
82
  features=datasets.Features(
83
  {
84
  "filepath": datasets.Value("string"),
85
+ "filename": datasets.Value("string")
86
+ #"raw": datasets.Value("string")
87
  }
88
  ),
89
  return datasets.DatasetInfo(
 
120
  for image in data["images"]:
121
  filepath = image["filepath"]
122
  filename = image["filename"]
123
+ yield id_, {
 
 
124
  "filepath": filepath,
125
+ "filename": filename
126
+ }
127
+ #for sentence in image["sentences"]:
128
+ # raw = sentence["raw"]
129
+ # yield id_, {
130
+ # "filepath": filepath,
131
+ # "filename": filename,
132
+ # "raw": raw
133
+ # }