Using Ml5 to recognize people's origins

Presentation of the project

In this project I will attempt to create a machine learning program that can tell you your country or region of origin just with a picture of your face.

By using the Ml5 library which gives us access to machine learning algorithms we can teach a machine to recognize certain charasteristics of the face and make the program give a good guess as to where that person comes from. To do so we can use MobileNets which is a program used to recognize images

MobileNet stores images in its database and classifies them, allowing it to recognize images with the same characteristics in the future Its this exact technology that will allow us to make the AI an expert in recognizing a person's origins.

Setting up the MobileNet

Before feeding the program the images we want it to recognize we need to set up the Mobile.Net code that should look something like this:

With this code we should be able to feed it images in order to make this project work.

What features to recognize?

In order for the program to work we need to teach the AI the different images we want it to recognize. In this case we will need to upload hundreds of portraits of people from different origins and classify them. Thankfully we have the internet, we can find 'average faces' for each nationality online like such:

Or this one for men:

These are just examples, there exists hundreds of 'average faces' that we can use. In order for this to work we need to put each portrait individually and characterize its nationality. In order to have precise results we need to uplaod as many faces as possible.

All done

Once we have uploaded the data we should be able to upload a portrait and have the program tell us which nationality has the highest percentage of similarities. This will never be 100% accurate since the 'average face' is far from universal for each country.

g