MrPotato commited on
Commit
8ba8eb0
·
1 Parent(s): 37c3415
Files changed (1) hide show
  1. docbank.py +4 -4
docbank.py CHANGED
@@ -48,7 +48,7 @@ _LICENSE = ""
48
  # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
49
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
50
  _URLS = {
51
- "sample": "http://hyperion.bbirke.de/data/docbank/sample.zip",
52
  "full": "",
53
  }
54
 
@@ -59,7 +59,7 @@ _FEATURES = datasets.Features(
59
  "bbox": datasets.Sequence(datasets.Sequence(datasets.Value("int64"))),
60
  # "RGBs": datasets.Sequence(datasets.Sequence(datasets.Value("int64"))),
61
  # "fonts": datasets.Sequence(datasets.Value("string")),
62
- "image": datasets.Array3D(shape=(3, 224, 224), dtype="uint8"),
63
  "original_image": datasets.features.Image(),
64
  "labels": datasets.Sequence(datasets.features.ClassLabel(
65
  names=['abstract', 'author', 'caption', 'date', 'equation', 'figure', 'footer', 'list', 'paragraph',
@@ -217,7 +217,7 @@ class Docbank(datasets.GeneratorBasedBuilder):
217
  # fonts = []
218
  labels = []
219
 
220
- image, size = load_image(f_fp_img, size=224)
221
  original_image, _ = load_image(f_fp_img)
222
 
223
  try:
@@ -256,7 +256,7 @@ class Docbank(datasets.GeneratorBasedBuilder):
256
  "bbox": split_bboxes,
257
  # "RGBs": split_rgbs,
258
  # "fonts": split_fonts,
259
- "image": image,
260
  "original_image": original_image,
261
  "labels": split_labels
262
  }
 
48
  # The HuggingFace Datasets library doesn't host the datasets but only points to the original files.
49
  # This can be an arbitrary nested dict/list of URLs (see below in `_split_generators` method)
50
  _URLS = {
51
+ "sample": "http://hyperion.bbirke.de/data/docbank/sample_resized.zip",
52
  "full": "",
53
  }
54
 
 
59
  "bbox": datasets.Sequence(datasets.Sequence(datasets.Value("int64"))),
60
  # "RGBs": datasets.Sequence(datasets.Sequence(datasets.Value("int64"))),
61
  # "fonts": datasets.Sequence(datasets.Value("string")),
62
+ #"image": datasets.Array3D(shape=(3, 224, 224), dtype="uint8"),
63
  "original_image": datasets.features.Image(),
64
  "labels": datasets.Sequence(datasets.features.ClassLabel(
65
  names=['abstract', 'author', 'caption', 'date', 'equation', 'figure', 'footer', 'list', 'paragraph',
 
217
  # fonts = []
218
  labels = []
219
 
220
+ #image, size = load_image(f_fp_img, size=224)
221
  original_image, _ = load_image(f_fp_img)
222
 
223
  try:
 
256
  "bbox": split_bboxes,
257
  # "RGBs": split_rgbs,
258
  # "fonts": split_fonts,
259
+ #"image": image,
260
  "original_image": original_image,
261
  "labels": split_labels
262
  }