MrPotato commited on
Commit
6ca3074
·
1 Parent(s): e3e663e
Files changed (1) hide show
  1. ref_seg_ger.py +4 -3
ref_seg_ger.py CHANGED
@@ -208,7 +208,7 @@ class RefSeg(datasets.GeneratorBasedBuilder):
208
  #print(paths)
209
  key = 0
210
  for f in paths:
211
- print(f)
212
  df = pd.read_csv(f)
213
  input_ids = []
214
  labels = []
@@ -245,13 +245,14 @@ class RefSeg(datasets.GeneratorBasedBuilder):
245
  else:
246
  continue
247
 
248
- print('got all')
249
  for chunk_id, index in enumerate(range(0, len(input_ids), self.CHUNK_SIZE)):
250
  split_ids = input_ids[index:max(len(input_ids), index + self.CHUNK_SIZE)]
251
  #split_bboxes = bboxes[index:index + self.CHUNK_SIZE]
252
  # split_rgbs = rgbs[index:index + self.CHUNK_SIZE]
253
  # split_fonts = fonts[index:index + self.CHUNK_SIZE]
254
- split_labels = input_ids[index:max(len(input_ids), index + self.CHUNK_SIZE)]
 
255
 
256
  yield key, {
257
  "id": f"{os.path.basename(f)}_{chunk_id}",
 
208
  #print(paths)
209
  key = 0
210
  for f in paths:
211
+ #print(f)
212
  df = pd.read_csv(f)
213
  input_ids = []
214
  labels = []
 
245
  else:
246
  continue
247
 
248
+ #print('got all')
249
  for chunk_id, index in enumerate(range(0, len(input_ids), self.CHUNK_SIZE)):
250
  split_ids = input_ids[index:max(len(input_ids), index + self.CHUNK_SIZE)]
251
  #split_bboxes = bboxes[index:index + self.CHUNK_SIZE]
252
  # split_rgbs = rgbs[index:index + self.CHUNK_SIZE]
253
  # split_fonts = fonts[index:index + self.CHUNK_SIZE]
254
+ split_labels = labels[index:max(len(input_ids), index + self.CHUNK_SIZE)]
255
+
256
 
257
  yield key, {
258
  "id": f"{os.path.basename(f)}_{chunk_id}",