N
N
nikiladonya2016-09-25 23:26:47
Python
nikiladonya, 2016-09-25 23:26:47

How to use a trained Keras-based neural network model with a single image input?

In general, there is a neural network written and trained using the Keras library. Let's assume this is classic handwritten digit recognition using the MNIST dataset. Neural network weights and architecture can be saved for reuse by standard library functions. A question arose that all documentation and tutorials bypass for some reason. How to submit neuro. networks ONE photo, for example, jpg with the number 3 and get the prediction of the neural network that this is most likely the number three?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vlad_Fedorenko, 2016-09-26
@Vlad_Fedorenko

And how did you train?
You need to transfer a new picture in the same format (vector of 28 * 28 elements, for example)

I
ivodopyanov, 2016-09-27
@ivodopyanov

It depends on how the training data was encoded.
As a rule, the image is decomposed into components (RGBA, HSB, or just grayscale) pixel by pixel and transmitted as a 3d vector (W*H*4 in the case of RGBA)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question