manuel-delverme commited on
Commit
865ea05
1 Parent(s): 5e7a56d

Upload folder using huggingface_hub

Browse files
annotations/test_annotations/mask.tar.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:dfd6f8788fd7afa16b5f06b83ec83583869a104c564a80598257eaee36d16a80
3
- size 192955
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca6c44dcb881406240292e6ca0bd8c6d8475e87f52e2990a640974be6d91f16f
3
+ size 192553
annotations/train_annotations/mask.tar.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:20d79e7cab1a80e54243276005f99441de994dc5d56fc57941e2f413de651f29
3
- size 1885203
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:09f01270005918df7155bc930067c8397befa8673ca7f7d45138753e21db526f
3
+ size 1887261
annotations/val_annotations/mask.tar.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:9faabc4bf15363c8243fcddd7ade8117ad0fa8d84eeca0ba87196a01ba6be0ea
3
- size 200482
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3a21a2e2ec75b2985dac1f4a9b1f10c4d197adaf409c681029fbb443750d28c
3
+ size 200115
test_repo.py CHANGED
@@ -78,7 +78,7 @@ class PatchyImagenet(datasets.GeneratorBasedBuilder):
78
  "categories": datasets.Value("string"),
79
  "scores": datasets.Sequence(datasets.Value("float32")),
80
  "mask": datasets.Sequence(
81
- datasets.Array2D(shape=(224, 224), dtype="bool")
82
  ),
83
  # "mask": datasets.Sequence(datasets.Image()),
84
  }
@@ -133,8 +133,8 @@ class PatchyImagenet(datasets.GeneratorBasedBuilder):
133
  image_path = os.path.join(image_dir, "images", f"{split}_images", data["file_name"])
134
  sample_name, _extension = os.path.splitext(data["file_name"])
135
  mask_file = os.path.join(mask_dir, "masks", sample_name + ".npy")
136
- mask = np.load(mask_file).astype(bool)
137
- # with open(image_path, "rb") as f:
138
  # breakpoint()
139
  pil_image = PIL.Image.open(image_path)
140
  yield key, {
 
78
  "categories": datasets.Value("string"),
79
  "scores": datasets.Sequence(datasets.Value("float32")),
80
  "mask": datasets.Sequence(
81
+ datasets.Array2D(shape=(224 // 8, 224 // 8), dtype="bool")
82
  ),
83
  # "mask": datasets.Sequence(datasets.Image()),
84
  }
 
133
  image_path = os.path.join(image_dir, "images", f"{split}_images", data["file_name"])
134
  sample_name, _extension = os.path.splitext(data["file_name"])
135
  mask_file = os.path.join(mask_dir, "masks", sample_name + ".npy")
136
+ # mask = np.load(mask_file).astype(bool)
137
+ mask = np.load(mask_file).astype(np.uint8)
138
  # breakpoint()
139
  pil_image = PIL.Image.open(image_path)
140
  yield key, {