alkzar90 commited on
Commit
f3cd12b
1 Parent(s): 236b9c4

Update cell_benchmark.py

Browse files
Files changed (1) hide show
  1. cell_benchmark.py +5 -3
cell_benchmark.py CHANGED
@@ -1,9 +1,9 @@
1
  import os
2
  import datasets
3
 
4
- #datasets.logging.set_verbosity_debug()
5
  #datasets.logging.set_verbosity_info()
6
- #logger = datasets.logging.get_logger(__name__)
7
 
8
 
9
  _DESCRIPTION = """\
@@ -42,7 +42,9 @@ class Cellsegmentation(datasets.GeneratorBasedBuilder):
42
 
43
  def _split_generators(self, dl_manager):
44
  data_files = dl_manager.download_and_extract(_SPLIT_URLS)
45
- masks_dir = os.path.abspath(data_files["masks"]) + "/masks"
 
 
46
  splits = [
47
  datasets.SplitGenerator(
48
  name=datasets.Split.TRAIN,
 
1
  import os
2
  import datasets
3
 
4
+ datasets.logging.set_verbosity_debug()
5
  #datasets.logging.set_verbosity_info()
6
+ logger = datasets.logging.get_logger(__name__)
7
 
8
 
9
  _DESCRIPTION = """\
 
42
 
43
  def _split_generators(self, dl_manager):
44
  data_files = dl_manager.download_and_extract(_SPLIT_URLS)
45
+ #masks_dir = os.path.abspath(data_files["masks"]) + "/masks"
46
+ masks_dir = [os.path.basename(p) for i, path in enumerate(dl_manager.iter_files([data_files["masks"]])) if i < 1]
47
+
48
  splits = [
49
  datasets.SplitGenerator(
50
  name=datasets.Split.TRAIN,