image-segmentation-keras
image-segmentation-keras copied to clipboard
Grayscale PNG images wrong assertion on prediction
When loading grayscale images they have shape=2, whick causes bellow assertion to fire in predict.py::predict():
assert (len(inp.shape) == 3 or len(inp.shape) == 1 or len(inp.shape) == 4), "Image should be h,w,3"
Changing it to the following solves the issue:
assert (len(inp.shape) == 3 or len(inp.shape) == 1 or len(inp.shape) == 4 or len(inp.shape) == 2), "Image should be h,w,3"
Hello, were you able to get any prediction for the gray scale images? I converted my grayscale to RGB, so 3 channels before training and for prediction. But although the accuracy is high during training, the prediction is all blank. Were you able to get the prediction for your dataset? I am using the vgg model