Skip to content

Commit

Permalink
Don't round channel dim
Browse files Browse the repository at this point in the history
  • Loading branch information
uschmidt83 committed Mar 28, 2022
1 parent d7c05fe commit 003358a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions stardist_napari/_dock_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,15 @@ def _model_name():
else:
return "Custom (folder)"

def _shape_pow2(shape):
return tuple(int(2 ** np.ceil(np.log2(s))) for s in shape)
def _shape_pow2(shape, axes):
return tuple(
s if a == "C" else int(2 ** np.ceil(np.log2(s)))
for s, a in zip(shape, axes)
)

run_props = {
"model": _model_name(),
"image_shape": _shape_pow2(x.shape),
"image_shape": _shape_pow2(x.shape, axes),
"image_axes": axes,
"image_norm": (perc_low, perc_high) if norm_image else False,
"image_scale": input_scale,
Expand Down Expand Up @@ -1289,6 +1292,8 @@ def _analytics_change():
"python": platform.python_version(),
"napari": napari.__version__,
"magicgui": _magicgui_version,
# "tensorflow": tensorflow.__version__,
# "keras": keras.__version__,
"csbdeep": csbdeep.__version__,
"stardist": stardist.__version__,
"stardist-napari": __version__,
Expand Down

0 comments on commit 003358a

Please sign in to comment.