Skip to content

Commit

Permalink
fix mask_flows_to_seg to work for multiple inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrariden committed May 3, 2024
1 parent 0ce3653 commit 21789ec
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)

Check warning on line 501 in cellpose/io.py

View check run for this annotation

Codecov / codecov/patch

cellpose/io.py#L501

Added line #L501 was not covered by tests
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 21789ec

Please sign in to comment.