[update]add data
Browse files
cppe5.py
CHANGED
|
@@ -100,13 +100,13 @@ class CPPE5(datasets.GeneratorBasedBuilder):
|
|
| 100 |
file_path = dl_manager.download(file_path)
|
| 101 |
|
| 102 |
with open(file_path, "rb") as image_f:
|
| 103 |
-
|
| 104 |
-
image = Image.open(image_f)
|
| 105 |
|
| 106 |
yield idx, {
|
| 107 |
"image_id": sample["image_id"],
|
| 108 |
-
|
| 109 |
-
"image": image,
|
| 110 |
"width": sample["width"],
|
| 111 |
"height": sample["height"],
|
| 112 |
"objects": sample["objects"],
|
|
|
|
| 100 |
file_path = dl_manager.download(file_path)
|
| 101 |
|
| 102 |
with open(file_path, "rb") as image_f:
|
| 103 |
+
image_bytes = image_f.read()
|
| 104 |
+
# image = Image.open(image_f)
|
| 105 |
|
| 106 |
yield idx, {
|
| 107 |
"image_id": sample["image_id"],
|
| 108 |
+
"image": {"path": file_path, "bytes": image_bytes},
|
| 109 |
+
# "image": image,
|
| 110 |
"width": sample["width"],
|
| 111 |
"height": sample["height"],
|
| 112 |
"objects": sample["objects"],
|