If omnipose processes an image in which there are no objects found, it crashes with the message:
omnipose_logger.info('\texecution time per pixel: {:.6g} sec/px'.format(executionTime0/np.prod(labels.shape)))
AttributeError: 'NoneType' object has no attribute 'shape'
If omnipose processes an image in which there are no objects found, it crashes with the message:
The faulty lines in the current code are: https://github.com/kevinjohncutler/omnipose/blob/main/omnipose/core.py#L1611-L1615
It appears that the
labels
object isNone
when no objects are found, and the message printed in this line therefore crashes. Noticed by @marieanselmet