Skip to content

Commit

Permalink
Merge pull request #932 from mrariden/mask_flow_to_seg-fix
Browse files Browse the repository at this point in the history
fix mask_flows_to_seg to work for multiple inputs
  • Loading branch information
carsen-stringer authored May 7, 2024
2 parents 0ce3653 + 21789ec commit 9cc49ef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cellpose/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,9 @@ def masks_flows_to_seg(images, masks, flows, file_names, diams=30., channels=Non
if not isinstance(diams, (list, np.ndarray)):
diams = diams * np.ones(len(masks), np.float32)
if imgs_restore is None:
imgs_restore = [] * len(masks)
imgs_restore = [None] * len(masks)
if isinstance(file_names, str):
file_names = [file_names] * len(masks)
for k, [image, mask, flow, diam,
file_name, img_restore] in enumerate(zip(images, masks, flows, diams, file_names, imgs_restore)):
channels_img = channels
Expand Down

0 comments on commit 9cc49ef

Please sign in to comment.