I have trained a tensorflow model and converted it to tflite model.
I want to build a Tensorflow lite (.tflite) model which does pre-processing, model execution, and post-processing. Pre-processing mainly consists of reading a single image, resizing it with padding, and converting it to an array. This array is input to tflite model and output of the model are several arrays. These arrays need to be processed to get meaningful information out of them.
Is it possible to create a tflite model which can do pre-processing and post-processing? I only need to give image as input and get the desired output.
For e.g.
pre-processing.py --> import image, resize image, normalize image, convert to numpy array (float32)
post-processing.py --> read model output arrays, extract segmentation masks, plot on image
WHAT I WANT
input_image.jpg-->model-->output_image.jpg with segmentation mask plotted