Hi!
I am a new with Python, and I have to produce a small Python script that load a 16bit PNG and run inference with TensorFlow Lite on a Coral board SDK, using an existing model with shape [224, 224, 1]. The input image is 224x224 16bit mono.
image = Image.open(‘input.png’)
CoralAdapter.set_input(interpreter, image)
ValueError: could not broadcast input array from shape (224,224) into shape (224,224,1)
I assume I need to load the PNG file as a (224,224,1) array instead of a (224,224) array.
What is the proper way to load a grayscale PNG this way?
Can TFlite use 16bit mono PNG, or does it only support 24bit RGB?
Thanks!