miojizzy commited on
Commit
8f60ca0
·
1 Parent(s): 80ab348

Update mhr_recognize_datasets.py

Browse files
Files changed (1) hide show
  1. mhr_recognize_datasets.py +2 -2
mhr_recognize_datasets.py CHANGED
@@ -54,7 +54,7 @@ class MHRRecognizeDatasets(datasets.GeneratorBasedBuilder):
54
  datasets.SplitGenerator(
55
  name=datasets.Split.TRAIN,
56
  gen_kwargs={
57
- "image_path": os.path.join(download_files[self.config.name+"_image"]),
58
  "label_path": os.path.join(download_files[self.config.name+"_label"]),
59
  },
60
  )
@@ -64,7 +64,7 @@ class MHRRecognizeDatasets(datasets.GeneratorBasedBuilder):
64
  print(image_path, label_path)
65
  if self.config.name == "whole_image":
66
  # Read csv with image labels
67
- label_csv = read_csv(_DATA_URL["whole_labels"])
68
  for i, path in enumerate(file_path):
69
  file_name = os.path.basename(path)
70
  # Get image id to filter the respective row of the csv
 
54
  datasets.SplitGenerator(
55
  name=datasets.Split.TRAIN,
56
  gen_kwargs={
57
+ "image_path": os.path.join(download_files[self.config.name+"_image"])+"/train",
58
  "label_path": os.path.join(download_files[self.config.name+"_label"]),
59
  },
60
  )
 
64
  print(image_path, label_path)
65
  if self.config.name == "whole_image":
66
  # Read csv with image labels
67
+ label_csv = read_csv(label_path)
68
  for i, path in enumerate(file_path):
69
  file_name = os.path.basename(path)
70
  # Get image id to filter the respective row of the csv