Skip to content

Commit ed298df

Browse files
committed
removing user specific code
1 parent a4b88b2 commit ed298df

File tree

3 files changed

+3
-68
lines changed

3 files changed

+3
-68
lines changed

napari_cellseg3d/plugin_crop.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,19 +72,7 @@ def __init__(self, viewer: "napari.viewer.Viewer", parent):
7272

7373
self.build()
7474

75-
###########################################
76-
if utils.ENABLE_TEST_MODE():
77-
# TODO : remove/disable once done
78-
if self.as_folder:
79-
self.image_path = "C:/Users/Cyril/Desktop/Proj_bachelor/data/visual_png/sample"
80-
if self.crop_label_choice.isChecked():
81-
self.label_path = "C:/Users/Cyril/Desktop/Proj_bachelor/data/visual_png/sample_labels"
82-
else:
83-
self.image_path = "C:/Users/Cyril/Desktop/Proj_bachelor/data/visual_tif/volumes/images.tif"
84-
if self.crop_label_choice.isChecked():
85-
self.label_path = "C:/Users/Cyril/Desktop/Proj_bachelor/data/visual_tif/labels/testing_im.tif"
86-
87-
###########################################
75+
8876

8977
def toggle_label_path(self):
9078
if self.crop_label_choice.isChecked():

napari_cellseg3d/plugin_metrics.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,7 @@ def __init__(self, viewer: "napari.viewer.Viewer", parent):
6767

6868
self.build()
6969

70-
######################################
71-
# TODO test remove
72-
import glob
73-
import os
74-
75-
if utils.ENABLE_TEST_MODE():
76-
ground_directory = "C:/Users/Cyril/Desktop/Proj_bachelor/data/cropped_visual/train/lab"
77-
# ground_directory = "C:/Users/Cyril/Desktop/test/labels"
78-
pred_directory = "C:/Users/Cyril/Desktop/test/pred"
79-
# pred_directory = "C:/Users/Cyril/Desktop/test"
80-
self.images_filepaths = sorted(
81-
glob.glob(os.path.join(ground_directory, "*.tif"))
82-
)
83-
self.labels_filepaths = sorted(
84-
glob.glob(os.path.join(pred_directory, "*.tif"))
85-
)
86-
###############################################################################
70+
8771

8872
def build(self):
8973
"""Builds the layout of the widget."""

napari_cellseg3d/plugin_model_training.py

Lines changed: 1 addition & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -132,44 +132,7 @@ def __init__(
132132

133133
self.save_as_zip = False
134134
"""Whether to zip results folder once done. Creates a zipped copy of the results folder."""
135-
######################
136-
######################
137-
######################
138-
# TEST TODO REMOVE
139-
import glob
140-
141-
if utils.ENABLE_TEST_MODE():
142-
directory = os.path.dirname(os.path.realpath(__file__)) + str(
143-
Path("/models/dataset/volumes")
144-
)
145-
self.data_path = directory
146-
147-
lab_directory = os.path.dirname(os.path.realpath(__file__)) + str(
148-
Path("/models/dataset/lab_sem")
149-
)
150-
self.label_path = lab_directory
151-
152-
self.images_filepaths = sorted(
153-
glob.glob(os.path.join(directory, "*.tif"))
154-
)
155-
156-
self.labels_filepaths = sorted(
157-
glob.glob(os.path.join(lab_directory, "*.tif"))
158-
)
159-
160-
if results_path == "":
161-
self.results_path = "C:/Users/Cyril/Desktop/test/models"
162-
else:
163-
self.results_path = results_path
164-
165-
if data_path != "":
166-
self.data_path = data_path
167-
168-
if label_path != "":
169-
self.label_path = label_path
170-
#######################
171-
#######################
172-
#######################
135+
173136

174137
# recover default values
175138
self.num_samples = samples

0 commit comments

Comments
 (0)