qgyd2021 commited on
Commit
e8bd074
1 Parent(s): f34aa9d

[update]add data

Browse files
Files changed (1) hide show
  1. cppe5.py +4 -4
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
- # 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"],
 
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"],