miojizzy commited on
Commit
43f3353
·
1 Parent(s): fc7e5c6

Update mhr_recognize_datasets.py

Browse files
Files changed (1) hide show
  1. mhr_recognize_datasets.py +4 -4
mhr_recognize_datasets.py CHANGED
@@ -65,18 +65,18 @@ class MHRRecognizeDatasets(datasets.GeneratorBasedBuilder):
65
  ]
66
 
67
  def _generate_examples(self, images, label):
68
- print("1:", images, label)
69
  if True:
70
  # if self.config.name == "whole":
71
  # Read csv with image labels
72
  label_csv = pd.read_csv(label)
73
- print("2:", label_csv)
74
  for i, path in enumerate(images):
75
  file_name = os.path.basename(path)
76
- print("3:", i, path, file_name)
77
  # Get image id to filter the respective row of the csv
78
  image_label = label_csv[label_csv["name"] == file_name]['label']
79
- print("4:", image_label)
80
  yield i, {
81
  "image": path,
82
  "label": image_label.values[0],
 
65
  ]
66
 
67
  def _generate_examples(self, images, label):
68
+ #print("1:", images, label)
69
  if True:
70
  # if self.config.name == "whole":
71
  # Read csv with image labels
72
  label_csv = pd.read_csv(label)
73
+ #print("2:", label_csv)
74
  for i, path in enumerate(images):
75
  file_name = os.path.basename(path)
76
+ #print("3:", i, path, file_name)
77
  # Get image id to filter the respective row of the csv
78
  image_label = label_csv[label_csv["name"] == file_name]['label']
79
+ #print("4:", image_label)
80
  yield i, {
81
  "image": path,
82
  "label": image_label.values[0],