Yesterday while testing out segmentation zoo I discovered a bug with do_seg. You can find the full issue in detail [here].(https://github.com/Doodleverse/segmentation_zoo/issues/22) It was failing to resize imagery due to the image being converted to datatype float16 which was incompatible with skimage'sresize function. With @ebgoldstein's help, I was able to find that the image needs to be converted to datatype float32 before being passed to the resize function.
The following block of code shows how to resize est_label to float32 within do_seg
est_label /= counter + 1
# new line: changes est_label from float16 to float32
est_label = est_label.astype('float32')
est_label = resize(est_label, (w, h))
I've tested this code and it works great for the RGB models. If est_label was never meant to be type float16 it might be worth looking into how that happened within the code.
I'll be submitting a PR to fix this later today and I recommend updating the package as soon as possible.
Yesterday while testing out segmentation zoo I discovered a bug with
do_seg
. You can find the full issue in detail [here].(https://github.com/Doodleverse/segmentation_zoo/issues/22) It was failing to resize imagery due to the image being converted to datatypefloat16
which was incompatible with skimage'sresize
function. With @ebgoldstein's help, I was able to find that the image needs to be converted to datatypefloat32
before being passed to the resize function.The following block of code shows how to resize
est_label
tofloat32
withindo_seg
I've tested this code and it works great for the RGB models. If
est_label
was never meant to be typefloat16
it might be worth looking into how that happened within the code.I'll be submitting a PR to fix this later today and I recommend updating the package as soon as possible.