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.
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.
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.
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.
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.