I’m working on a very simple app: It takes a model I trained in Keras on the MNIST dataset and tries to
recognize handwritten digits from pictures you take with the app.
I take the picture, resize it to 28x28 and turn it to black and white. Then I create a ByteBuffer to receive the pixels and pass it to the TensorFlow Lite interpreter. However the intepreter always returns the same values for whatever input I use, returning always the same probabilities, which leads me to think this is an input generation problem.
I know some of you out there have used TensorFlow Lite before (@rheza_h) so it would be great if someone could take a look at the repo and see if you spot any problems.
2 cent from me, just in case you didn’t check for this:
When I tried to do a “quick and dirty” mnist trained digit recognition software, the black and white values were the opposite in the camera and in the database. E.g. in the mnist database black was 0 and white was 255, but the image I was feeding the network was 0 for white and 255 for black.