Skip to content

[BUG] running model with compute_masks=False causes cv2.resize error because masks=[0] #1200

@fyz11

Description

@fyz11

I just upgraded to cellpose 4.0.4 today.

I ran the pretrained 'cyto' model with compute_masks=False, and a diameter value which was not None. This led to a cv2.resize error.
Image

Tracing the error it occurs in models.py with the model.eval. When compute_masks=False, masks=[0]. However, it is the current code is still trying to resize this back to the input image resolution. Please could you fix this? I have drawn an arrow to indicate the line needing to fix - thanks !

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions