qgyd2021 commited on
Commit
1b08565
1 Parent(s): bf3f8bb

[update]add data

Browse files
Files changed (2) hide show
  1. cppe5.py +3 -2
  2. main.py +2 -1
cppe5.py CHANGED
@@ -42,7 +42,7 @@ class CPPE5(datasets.GeneratorBasedBuilder):
42
  features = datasets.Features(
43
  {
44
  "image_id": datasets.Value("int64"),
45
- "image": datasets.Image(),
46
  "width": datasets.Value("int32"),
47
  "height": datasets.Value("int32"),
48
  "objects": datasets.Sequence(
@@ -101,9 +101,10 @@ class CPPE5(datasets.GeneratorBasedBuilder):
101
  with open(file_path, "rb") as image_f:
102
  image_bytes = image_f.read()
103
 
 
104
  yield idx, {
105
  "image_id": sample["image_id"],
106
- "image": {"path": file_path, "bytes": image_bytes},
107
  "width": sample["width"],
108
  "height": sample["height"],
109
  "objects": sample["objects"],
 
42
  features = datasets.Features(
43
  {
44
  "image_id": datasets.Value("int64"),
45
+ # "image": datasets.Image(),
46
  "width": datasets.Value("int32"),
47
  "height": datasets.Value("int32"),
48
  "objects": datasets.Sequence(
 
101
  with open(file_path, "rb") as image_f:
102
  image_bytes = image_f.read()
103
 
104
+ print(sample)
105
  yield idx, {
106
  "image_id": sample["image_id"],
107
+ # "image": {"path": file_path, "bytes": image_bytes},
108
  "width": sample["width"],
109
  "height": sample["height"],
110
  "objects": sample["objects"],
main.py CHANGED
@@ -3,7 +3,8 @@
3
  from datasets import load_dataset
4
 
5
  dataset = load_dataset(
6
- "cppe5.py",
 
7
  name=None,
8
  split="train",
9
  )
 
3
  from datasets import load_dataset
4
 
5
  dataset = load_dataset(
6
+ "qgyd2021/cppe-5",
7
+ # "cppe5.py",
8
  name=None,
9
  split="train",
10
  )