Closed 2320sharon closed 1 year ago
The resize function is being passed an array of type float16 (a 16-bit floating-point number), which is not supported.
The solution is to convert the est_label array to a different data type before passing it to the resize function. You can do this using the astype method, like this:
est_label = est_label.astype('float32')
This will convert the est_label array to type float32, which should be supported by the resize function.
@ebgoldstein thanks for the help!
This issue was fixed in doodleverse_utils 0.0.18
Bug
When I ran the RGB 4 class model
sat_RGB_4class_6950472
with the images included inRGB.zip
I kept getting the errorRuntimeError: array type dtype('float16') not supported
. I believe the error is coming fromskimage's resize
function that is used within doodleverse_utils'sdo_seg
function in the lineest_label = resize(est_label, (w, h))
.est_label
is of typefloat16
which is causing this bug to appear and(w, h)
are both of type int so they aren't causing the problem. The bug appears forBEST
andENSEMBLE
models and on all imagery I've tested it with,I tried running the same model with coastseg and it worked just fine on these images. I cannot figure out why I'm getting exceptions here and valid results with coastseg. RGB.zip
How I obtained the Error Message
I modified scripts/select_model_and_batch_process_folder.py to print the full traceback for the exception that occurred
Error Message
My Environment
OS: Windows 10 Doodleverse_utils: 0.0.16 Tensorflow: 2.11.0 Latest and up to date version of segmentation zoo 0 GPUs: on my machine. I used
SET_GPU='-1'