Multilayer perceptron for image recognition