Skip to content

Commit a35e776

Browse files
committed
Config + disable remap in inference
1 parent a4a71b5 commit a35e776

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

napari_cellseg3d/code_models/worker_inference.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
ONNXModelWrapper,
3535
QuantileNormalization,
3636
QuantileNormalizationd,
37-
RemapTensor,
3837
WeightsDownloader,
3938
)
4039

@@ -718,15 +717,15 @@ def inference(self):
718717
if not post_process_config.thresholding.enabled:
719718
post_process_transforms = Compose(
720719
[
721-
RemapTensor(new_max=1.0, new_min=0.0),
720+
# RemapTensor(new_max=1.0, new_min=0.0),
722721
EnsureType(),
723722
]
724723
)
725724
else:
726725
t = post_process_config.thresholding.threshold_value
727726
post_process_transforms = Compose(
728727
[
729-
RemapTensor(new_max=1.0, new_min=0.0),
728+
# RemapTensor(new_max=1.0, new_min=0.0),
730729
AsDiscrete(threshold=t),
731730
EnsureType(),
732731
]

napari_cellseg3d/code_plugins/plugin_model_training.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def __init__(
186186

187187
self.epoch_choice = ui.IntIncrementCounter(
188188
lower=2,
189-
upper=200,
189+
upper=999,
190190
default=self.default_config.max_epochs,
191191
text_label="Number of epochs : ",
192192
)

napari_cellseg3d/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ class TrainingWorkerConfig:
247247
weights_info: WeightsInfo = None
248248
train_data_dict: dict = None
249249
validation_percent: float = 0.8
250-
max_epochs: int = 5
250+
max_epochs: int = 50
251251
loss_function: callable = None
252252
learning_rate: np.float64 = 1e-3
253253
scheduler_patience: int = 10

0 commit comments

Comments
 (0)