Neural Network for selfie analysis

Posted to Statistics  |  Tags: ,  |  Nathan Yau

To introduce Convolutional Neural Networks, Andrej Karpathy looked at millions of selfies, left the computer to its own devices, and tried to find what makes a good selfie.

Okay, so we collected 2 million selfies, decided which ones are probably good or bad based on the number of likes they received (controlling for the number of followers), fed all of it to Caffe and trained a ConvNet. The ConvNet “looked” at every one of the 2 million selfies several tens of times, and tuned its filters in a way that best allows it to separate good selfies from bad ones. We can’t very easily inspect exactly what it found (it’s all jumbled up in 140 million numbers that together define the filters). However, we can set it loose on selfies that it has never seen before and try to understand what it’s doing by looking at which images it likes and which ones it does not.

Key tips: Use a filter and border, crop off your forehead, and most importantly, be a female. If male, broader selfies appear to be more ideal.

Naturally, there are questions to ask about cause-and-effect here. For example, in the neural network training, a selfie with a lot of likes qualifies as a good one. It might be that people with more followers tend more to a certain type of photo. Maybe they’re following a trend. Or maybe females take more selfies than men, which is why there are far more women that appear in the top.

In any case, that sort of misses the point. The point here is that neural networks can be fun and can output some interesting stuff. Be sure to scroll to the end of the article for resources and tools that you can play with.


Jobs Charted by State and Salary

Jobs and pay can vary a lot depending on where you live, based on 2013 data from the Bureau of Labor Statistics. Here’s an interactive to look.

A Day in the Life of Americans

I wanted to see how daily patterns emerge at the individual level and how a person’s entire day plays out. So I simulated 1,000 of them.

Life expectancy changes

The data goes back to 1960 and up to the most current estimates for 2009. Each line represents a country.

The Most Unisex Names in US History

Moving on from the most trendy names in US history, let’s look at the most unisex ones. Some names have …