You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JFYI, I've noticed an issue while using metrics.iou when the input is np.uint8 and the smooth parameter is a float -by default:
import numpy as np
from keras_unet.metrics import iou
tshape = (30, 50)
input = np.zeros(tshape, dtype=np.uint8)
iou(input, input, smooth=1.).numpy()
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py in raise_from_not_ok_status(e, name)
6841 message = e.message + (" name: " + name if name is not None else "")
6842 # pylint: disable=protected-access
-> 6843 six.raise_from(core._status_to_exception(e.code, message), None)
6844 # pylint: enable=protected-access
6845
/usr/local/lib/python3.6/dist-packages/six.py in raise_from(value, from_value)
InvalidArgumentError: cannot compute AddV2 as input #1(zero-based) was expected to be a uint8 tensor but is a float tensor [Op:AddV2]iou
To sum up:
Input np.uint8 with smooth type float generates an error
Input np.uint8 with smooth type np.uint8 generates works
Input np.float32 with smooth type float/np.uint8 works
The text was updated successfully, but these errors were encountered:
Thanks again for this nice package.
JFYI, I've noticed an issue while using
metrics.iou
when the input isnp.uint8
and the smooth parameter is a float -by default:To sum up:
np.uint8
with smooth typefloat
generates an errornp.uint8
with smooth typenp.uint8
generates worksnp.float32
with smooth typefloat
/np.uint8
worksThe text was updated successfully, but these errors were encountered: