Skip to content

Commit 95a293e

Browse files
committed
Disable normalization for WNet
1 parent 5b994f5 commit 95a293e

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

napari_cellseg3d/code_models/worker_inference.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,16 @@ def load_layer(self):
241241
logger.debug(volume.shape)
242242
logger.debug(volume.dtype)
243243

244+
normalization = (
245+
QuantileNormalization()
246+
if self.config.model_info.name != "WNet"
247+
else lambda x: x
248+
)
244249
if self.config.sliding_window_config.is_enabled():
245250
load_transforms = Compose(
246251
[
247-
QuantileNormalization(),
252+
# QuantileNormalization(),
253+
normalization,
248254
ToTensor(),
249255
# anisotropic_transform,
250256
AddChannel(),
@@ -260,7 +266,8 @@ def load_layer(self):
260266
pad = utils.get_padding_dim(dims_check)
261267
load_transforms = Compose(
262268
[
263-
QuantileNormalization(),
269+
# QuantileNormalization(),
270+
normalization,
264271
ToTensor(),
265272
# anisotropic_transform,
266273
AddChannel(),

0 commit comments

Comments
 (0)