Facial images convey important demographic information such as ethnicity and gender. In this paper, machine learning approach is taken to solve the ethnicity classification problem. Artificial neural networks trained by state of the art optimization algorithms are used to classify faces as Caucasian or non-Caucasian based on the color of the skin.Afeedforward neural network is trained usingGalactic Swarm Optimization (GSO) algorithm which gives superior performance to other training algorithms such as backpropagation and Particle SwarmOptimization (PSO) which have been used earlier. In this paper, the RGB values of the skin are taken as inputs to the neural network. Each pixel of the image will be classified according to their RGB values and the class having the maximum number of pixels will be the output. Simulation results indicate that the neural network trained with GSO gives a more accurate classification and converges faster than the other state of the art optimization algorithms. © Springer Nature Singapore Pte Ltd. 2019.