Resize the image to give it as an input to neural network

I have OpenMV Cam H7
I have two questions regarding TFLite on openmv:-

  1. I built a model using Keras and quantized it using tflite, it has an accuracy of 96% after quantization.
    it takes grayscale images of size 28x28 pixels as an input, how to provide this input to the neural network in openMV. I want the image to scale properly to 28x28.

  2. If I build a model which works on grayscale images with values between 0 and 1 rather than 0-255, how to give this as an input in OpenMV, as OpenMV takes grayscale images but I want them to have a value between 0 and 1. is there a way to multiply each pixel by 1/255?


Our TF module takes cares of all these details for you. You just need to load the network and run it.

  1. Out TF module does this, it will crop and scale the input image to whatever the network takes while maintaining aspect ratio.

  2. Our TF module scales the inputs and outputs of the network to be what is needed. However, if a pixel is between 0-1 it should be a float.

We recommend using Edge Impulse to generate and train your network online.