How can I run external images through my U-net for image segmentation?

Hi I followed this tutorial, Image segmentation  |  TensorFlow Core on image segmentation using tensorflow.

Now I want to see how well it performs segmentation on external images. How can I feed it external images ?

Hi @Thomas_John, Welcome to Tensorflow Forum!

If you want to predict an external image you have to resize the image to model input shape, then you have to add batch size by using tf.expand_dims because the model was trained on (batch_size, height, width, channels), then you can make predictions using model.predict( ). Please refer to this gist for working code example. Thank You.