wao.ai logowao.ai blog - data labeling and applied machine learning
Blog HomeCan AI Guess Our Sex?How did I make this?Where does the model fail?Will AI be able to instantly and precisely identify our sex in the future?Dataset vs Ground-Truth DatasetIntroducing the Universal Data ToolLabel Bounding Boxes with the Universal Data ToolSingle-Label Image Classification with Google AutoMLSingle-Label Image Classification with Keras

Can Artificial Intelligence Guess Our Sex?

I trained a machine learning model to predict the sex of a face. The model was trained on AI-generated faces from generated.photos which were labeled on wao.ai. Some sample faces from the training set (total size about 2,000 images) are shown below.

some sample faces

The model scored about 95% accuracy. That means this AI can guess a person's sex 19 out of 20 times. Don't believe me? Try it below!

Note: This algorithm runs completely in your browser, your webcam image is NOT sent to the cloud.

Sex Classifier Demo
Our AI can use your webcam to guess your sex based on your face. None of your webcam data is sent to the cloud or saved. We'll ask for permission from your browser after you click the button below.

How did I make this?

You can see every step of the process in Creating a Sex Classification Model in Google AutoML. The model uses Tensorflow.js to run in the browser. I was also able to create a keras model with 80% accuracy. The dataset was uploaded to wao.ai for ground-truth labeling.

Where does the model fail?

Children and gender-neutral haircuts seem to be the biggest sources of confusion.

edge cases

Confusion matrix shown below. There doesn't seem to be a bias towards male or female despite the dataset being uneven with around 66% of the faces being female.

confusion matrix

Will AI be able to instantly and precisely identify our sex in the future?

Definitely. This model is trained on a really small dataset of about 2,000 images, with more data and some additional image preprocessing it would be possible to get much higher accuracies.

Learn about applied machine learning with a new article every two weeks. Unsubscribe anytime.
You can also follow @waoai_ on twitter.