View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12933 Members
Join this group to post and comment.

How To Take A Good Selfie? This Deep Neural Network Has The Answers

Weekend is here and you might have already begun executing the relaxation splurge that you planned in the first five days of the week. Whether it’s a visit to a mall or to the nearby weekend getaway, chances are you will take a selfie at location for your social networking profile. You want that to be absolutely perfect so that you get more likes and favourites. You might have worn the perfect outfit, played around with your hair and searched the perfect location with adequate lighting to make your selfie a hit but once you upload it online you find that it is not a hit that you expected it to be. What if we told you that there is a set of scientifically derived guidelines that you can follow to guarantee a perfect selfie? We will also tell you about a Twitter-bot that will rate your selfie on a scale from 1 to 100. Since we are an engineering and technology blog, we shall discuss the science and the people behind it that are at the heart of this system before giving you the dos and don’ts of selfie.

woody-selfie

The Technology & The People

Andrej Karpathy, a Stanford PhD candidate who has worked for companies like Google Research and DeepMind set out on a quest to develop a system that would be able to analyse a huge volume of photos and try to find out the details in them that made them good. He sought the help of a powerful, 140-million-parameter state-of-the-art Convolutional Neural Network. So, you might be thinking what is a Convolutional Neural Network? In layman terms, it is an artificial intelligence software that is used by a computer to recognise images.

How Does A Convolutional Neural Network Work?

Convolutional Neural Network or ConvNet, in short starts off by accepting an image and then breaks it down into as a 3-dimensional grid of numbers. The user takes small filters and slides them over the image spatially. Each filter accentuates a certain part of the image which is noted by the network. Gradually, the number of filters are increased to such an extent that the system gets to know complex visual patterns. The system then predicts the contents of the image. If its prediction is false, the user informs about the actual image and the system takes a note of it and ConvNet knows to rectify this mistake in future and alters its filters for future image detection.

How Did The ConvNet Learn To Differentiate Good Selfies From The Bad Ones?

Karpathy, first gathered 5 million images from the internet that were tagged as “#selfie”. The huge number was important for the ConvNet as it needs a huge sample size for better learning. The ConvNet was asked to trim down the sample size of about 2 million images that contain at least one face. Karpathy was then responsible for developing the basic parameters which were related to audience size and number of likes received on a photo. Once a set of 50 good and bad selfies was found out the ConvNet taught it to apply the filters and sort the rest of the images into good or bad selfies. This meant at the end of the experiment they had one million good selfies and one million bad selfies.

You might be arguing that the number of likes and followers doesn’t exactly mean whether the photo was good or not. Karpathy acknowledges this fact and then he shows us the training data that was fed to the neural network for learning. You can see and judge the distinction between good ones and bad.

Good Vs Bad
Click on the image for the full size
What Makes A Selfie Great?

ConvNet processed 140 million numbers that together defined the filters and then produced the top 1000 selfies in a collage for Karpathy who deduced the following results.

You have to be a female for a great selfie: Sorry boys, it seems the following comic is actually true.

Boys Selfie

According to ConvNet, women always rated higher than boys in this test, so much so that in the top 100 selfies not a single one was that of a guy. You could always try dressing up as Dolly or Gutthi from Comedy Nights With Kapil and it may work for comic reasons.

Your face should occupy one-third of the selfie and tilting it at a slight angle helps: Anything more or less will result in a bad selfie. When you think of it, it’s actually true. You do not want your face to look too big or too small in a selfie and if you held your head straight it looks like you are taking a photo for your office identity card in which almost no one looks good.

Crop up a small part of your forehead: We do not understand why does it work and nor does Karpathy but with females this strategy of cropping a small part of your forehead results in a likable selfie.

If you have long hair your selfies are more popular [applicable for females only]: When strands of hair run down your shoulders it makes your selfie more favourable. So next time you are at your hairdressers ask them for that look.

Filters and borders do work: Photography purists might argue that the natural look of a photo is important but the results from this test reflect otherwise. If you over saturate a photo with a filter or put a black and white filter on it then it is a sure shot success. If you use borders or frames then make sure that they are white.

Cropping

Do not take photos in low-light: It’s Photography 101. When you click a photo in low lighting it results in more noise and when a picture looks granulated it automatically becomes unfavourable. That is why some smartphone manufacturers are including a front facing flash to complement their large sensors.

Group-fies do not work: Even if the star-studded Academy Awards selfie by Ellen is the most popular image on Twitter of all times, it may not work for average individuals. So when you are in a group you are better of asking another person to take a photo instead of yourselves.

How Good Is My Selfie?

Karpathy has covered you on this one. Just head over to the 140 character social networking website and attach your image to a tweet (or include a link) and mention the bot account @deepselfie anywhere in the tweet. Make sure that the image is in a square format otherwise the image will be forced into a square and the results will get skewed. Once you send out the tweet to the Python based bot, it will reply you back with a score from 1 to 100. You can then experiment with your look and improve your score. A smartphone app could not be made as it was found to be extremely CPU-hungry.

Bot

For a deeper look into this development you can head over to Andrej Karpathy’s blog or its coverage on Engadget
lal
lal • Oct 31, 2015
Even if artificial intelligence is considered analogous to human intelligence in some way, the fact is, every person's taste varies and it is like one person saying a piece of art (in a way) is good or bad. Yes, someone might argue, the result is based on comparisons of millions of photos. Still, that doesn't look appealing enough; this is art we are talking about. 😁

Share this content on your social channels -