jordyvl commited on
Commit
1ce17d5
1 Parent(s): a3618e4

dunno how to fic

Browse files
Files changed (1) hide show
  1. rvl_cdip_easyOCR.py +19 -1
rvl_cdip_easyOCR.py CHANGED
@@ -74,10 +74,26 @@ _CLASSES = [
74
  _IMAGES_DIR = "images/"
75
 
76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
77
  class RvlCdip_EasyOcr(datasets.GeneratorBasedBuilder):
78
  """Ryerson Vision Lab Complex Document Information Processing dataset."""
79
 
80
  VERSION = datasets.Version("1.0.0")
 
 
81
 
82
  def _info(self):
83
  return datasets.DatasetInfo(
@@ -106,7 +122,9 @@ class RvlCdip_EasyOcr(datasets.GeneratorBasedBuilder):
106
  _URLS["rvl-cdip"]
107
  ) # only download images if need be
108
  labels_path = dl_manager.download(_METADATA_URLS)
109
- from pdb import set_trace; set_trace()
 
 
110
  return [
111
  datasets.SplitGenerator(
112
  name=datasets.Split.TRAIN,
 
74
  _IMAGES_DIR = "images/"
75
 
76
 
77
+ class OCRConfig(datasets.BuilderConfig):
78
+ """BuilderConfig for RedCaps."""
79
+
80
+ def __init__(self, name, **kwargs):
81
+ """BuilderConfig for RedCaps.
82
+ Args:
83
+ **kwargs: keyword arguments forwarded to super.
84
+ """
85
+ assert "description" not in kwargs
86
+ super(OCRConfig, self).__init__(
87
+ version=datasets.Version("1.0.0", ""), name=name, **kwargs
88
+ )
89
+
90
+
91
  class RvlCdip_EasyOcr(datasets.GeneratorBasedBuilder):
92
  """Ryerson Vision Lab Complex Document Information Processing dataset."""
93
 
94
  VERSION = datasets.Version("1.0.0")
95
+ BUILDER_CONFIGS = [OCRConfig("default")]
96
+ DEFAULT_CONFIG_NAME = "default"
97
 
98
  def _info(self):
99
  return datasets.DatasetInfo(
 
122
  _URLS["rvl-cdip"]
123
  ) # only download images if need be
124
  labels_path = dl_manager.download(_METADATA_URLS)
125
+ from pdb import set_trace
126
+
127
+ set_trace()
128
  return [
129
  datasets.SplitGenerator(
130
  name=datasets.Split.TRAIN,