Update cell_benchmark.py
Browse files- cell_benchmark.py +2 -2
cell_benchmark.py
CHANGED
@@ -75,13 +75,13 @@ class Cellsegmentation(datasets.GeneratorBasedBuilder):
|
|
75 |
|
76 |
|
77 |
def _generate_examples(self, files, masks_dir, split):
|
78 |
-
masks_dir = masks_dir[0]
|
79 |
for i, path in enumerate(files):
|
80 |
file_name = "/mask_" + os.path.basename(path).replace("jpg", "png")
|
81 |
yield i, {
|
82 |
"image": path,
|
83 |
#"masks": masks_dir + "/mask_" + file_name.replace("jpg", "png"),
|
84 |
-
"masks":
|
85 |
"path": path,
|
86 |
}
|
87 |
|
|
|
75 |
|
76 |
|
77 |
def _generate_examples(self, files, masks_dir, split):
|
78 |
+
masks_dir = [os.path.dirname(path) for i, path in enumerate(masks_dir) if i < 1][0]
|
79 |
for i, path in enumerate(files):
|
80 |
file_name = "/mask_" + os.path.basename(path).replace("jpg", "png")
|
81 |
yield i, {
|
82 |
"image": path,
|
83 |
#"masks": masks_dir + "/mask_" + file_name.replace("jpg", "png"),
|
84 |
+
"masks": masks_dir + file_name,
|
85 |
"path": path,
|
86 |
}
|
87 |
|