Race Prediction

Let’s learn to predict race or ethnicity from a face image.


Recognizing the race or ethnicity of a person from their facial image can make a large contribution in many cases, such as the following:

  • Locating missing children.
  • Refugee crises
  • Genealogy research
  • Identifying health risks specific to certain populations

Despite these positive applications, recent studies revolving around the identification of distinctive facial attributes embodied in a face image, such as race, have drawn increasing attention. One of the biggest concerns is that AI tends to be more inaccurate in identifying and assessing those with darker skin tones. Since AI-based racial identification is still being debated, it’s important to remember racial prediction results are simply an approximation, and these results have the potential for misuse.


This lesson demonstrates how to make an AI-based race estimation from real-life digital face images while using the Python library DeepFace.

In general, the facial race estimation process consists of two major steps:

  1. Given an input digital image, localize the faces within this image.
  2. Run the race prediction model on the localized faces in order to predict their respective races.

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy