Datasets:

Languages:
English
Multilinguality:
monolingual
Size Categories:
10K<n<100K
Language Creators:
found
Annotations Creators:
expert-generated
Source Datasets:
original
Tags:
License:
Luka-Wang commited on
Commit
77e3a18
1 Parent(s): 303a595

Update coco.py

Browse files
Files changed (1) hide show
  1. coco.py +4 -4
coco.py CHANGED
@@ -119,11 +119,11 @@ class NewDataset(datasets.GeneratorBasedBuilder):
119
  with open(filepath, encoding="utf-8") as f:
120
  data = json.loads(f)
121
  for image in data["images"]:
122
- filepath = image["filepath"]
123
- filename = image["filename"]
124
  yield id_, {
125
- "filepath": filepath,
126
- "filename": filename
127
  }
128
  #for sentence in image["sentences"]:
129
  # raw = sentence["raw"]
 
119
  with open(filepath, encoding="utf-8") as f:
120
  data = json.loads(f)
121
  for image in data["images"]:
122
+ file_path = image["filepath"]
123
+ file_name = image["filename"]
124
  yield id_, {
125
+ "filepath": file_path,
126
+ "filename": file_name
127
  }
128
  #for sentence in image["sentences"]:
129
  # raw = sentence["raw"]