Datasets:
Tasks:
Token Classification
Languages:
English
Multilinguality:
monolingual
Size Categories:
10K<n<100K
Language Creators:
found
Annotations Creators:
expert-generated
Source Datasets:
original
Tags:
License:
Update coco.py
Browse files
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 |
-
|
123 |
-
|
124 |
yield id_, {
|
125 |
-
"filepath":
|
126 |
-
"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"]
|