Update coco.py
Browse files
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 |
-
|
124 |
-
raw = sentence["raw"]
|
125 |
-
yield id_, {
|
126 |
"filepath": filepath,
|
127 |
-
"filename": filename
|
128 |
-
|
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 |
+
# }
|