Skip to content

Commit

Permalink
bug with denoise model
Browse files Browse the repository at this point in the history
  • Loading branch information
carsen-stringer committed Oct 20, 2024
1 parent 9322787 commit 7dfe3b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions cellpose/denoise.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,10 +502,10 @@ def __init__(self, gpu=False, pretrained_model=False, model_type=None,
pretrained_model=pretrained_model, device=device)

def eval(self, x, batch_size=8, channels=None, channel_axis=None, z_axis=None,
normalize=True, rescale=None, diameter=None, tile=True, tile_overlap=0.1,
normalize=True, rescale=None, diameter=None, tile_overlap=0.1,
augment=False, resample=True, invert=False, flow_threshold=0.4,
cellprob_threshold=0.0, do_3D=False, anisotropy=None, stitch_threshold=0.0,
min_size=15, niter=None, interp=True, bsize=224):
min_size=15, niter=None, interp=True, bsize=224, dP_smooth=0):
"""
Restore array or list of images using the image restoration model, and then segment.
Expand Down Expand Up @@ -547,6 +547,7 @@ def eval(self, x, batch_size=8, channels=None, channel_axis=None, z_axis=None,
anisotropy (float, optional): for 3D segmentation, optional rescaling factor (e.g. set to 2.0 if Z is sampled half as dense as X or Y). Defaults to None.
stitch_threshold (float, optional): if stitch_threshold>0.0 and not do_3D, masks are stitched in 3D to return volume segmentation. Defaults to 0.0.
min_size (int, optional): all ROIs below this size, in pixels, will be discarded. Defaults to 15.
dP_smooth (int, optional): if do_3D and dP_smooth>0, smooth flows with gaussian filter of this stddev. Defaults to 0.
niter (int, optional): number of iterations for dynamics computation. if None, it is set proportional to the diameter. Defaults to None.
interp (bool, optional): interpolate during 2D dynamics (not available in 3D) . Defaults to True.
Expand Down
2 changes: 1 addition & 1 deletion cellpose/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def eval(self, x, batch_size=8, resample=True, channels=None, channel_axis=None,
flow_threshold (float, optional): flow error threshold (all cells with errors below threshold are kept) (not used for 3D). Defaults to 0.4.
cellprob_threshold (float, optional): all pixels with value above threshold kept for masks, decrease to find more and larger masks. Defaults to 0.0.
do_3D (bool, optional): set to True to run 3D segmentation on 3D/4D image input. Defaults to False.
dP_smooth (int, optional): if do_3D and dP_smooth>0, smooth flows with gaussian filter of this sigma. Defaults to 0.
dP_smooth (int, optional): if do_3D and dP_smooth>0, smooth flows with gaussian filter of this stddev. Defaults to 0.
anisotropy (float, optional): for 3D segmentation, optional rescaling factor (e.g. set to 2.0 if Z is sampled half as dense as X or Y). Defaults to None.
stitch_threshold (float, optional): if stitch_threshold>0.0 and not do_3D, masks are stitched in 3D to return volume segmentation. Defaults to 0.0.
min_size (int, optional): all ROIs below this size, in pixels, will be discarded. Defaults to 15.
Expand Down

0 comments on commit 7dfe3b7

Please sign in to comment.