Skip to content

Commit

Permalink
adding if statement for 3D stitching
Browse files Browse the repository at this point in the history
  • Loading branch information
carsen-stringer committed Sep 13, 2023
1 parent e89c20e commit 958e0a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cellpose/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,8 @@ def _run_cp(self, x, compute_masks=True, normalize=True, invert=False,
resize = [shape[1], shape[2]] if not resample else None
for i in iterator:
outputs = dynamics.compute_masks(dP[:,i], cellprob[i], niter=niter, cellprob_threshold=cellprob_threshold,
flow_threshold=flow_threshold, interp=interp, resize=resize, min_size=min_size,
flow_threshold=flow_threshold, interp=interp, resize=resize,
min_size=min_size if stitch_threshold==0 or nimg==1 else None,
use_gpu=self.gpu, device=self.device)
masks.append(outputs[0])
p.append(outputs[1])
Expand Down

0 comments on commit 958e0a6

Please sign in to comment.