How good is your selfie?

Check out how good is your selfie here(link will be available soon)!

In this article, we’ll see how to create a model (including it’s API) for classifying a selfie as ‘ugly’, ‘bad’,’normal’, ‘good’ and ‘excellent’ .

Dataset Description

I downloaded the dataset from and modified it according to the needs of model. You can directly download the modified dataset from my github repo.

The modified dataset contains 46000+ different selfies of people all around the world which are labelled as ‘ugly’, ‘bad’,’normal’, ‘good’, ‘excellent’. The labelling is done based on the likes/comments received by the selfie on the platform where it was uploaded.

Some selfies:

everyone looks good 😍 😁

Note: We won’t code a single line! 😈

We’ll use Deep Learning Studio by for creating and developing our model and API.

If you aren’t familiar with Deep Learning Studio, do checkout my article on it.

Let’s get started.

1. Uploading the dataset on Deep Learning Studio

The dataset is greater than 1GB so you need to copy the data directly from your PC to Workspace as shown below:

Copy the data(zip file) inside Datasets folder(drag and drop)
Left:Create folder ‘SefieData’ and extract the zip file in this folder, Right: choose the dataset in the Data section

It may take a while to extract the data inside ‘SelfieData’, so be patient.

Model Architecture

Model Architecture

We’ll use pre-trained WideResNet as the model architecture. Deep Learning studio makes this very easy for us. Just drag-drop ‘WideResNet’ from Pre-trained models(left pane) and we are done! Click on WideResNet layer and set trainable to 25. This means that we just want to train top 25% of the layers of WideResNet.

Training the model:

Press start training and it’s done

We got a decent accuracy just by using pre-trained WideResNet.

If you want to have a glance over my hyperparameters, they are here:

6:epochs with Adam:optimiser

Let’s Deploy the Rocket!

Go to Inference-> deploy section and click Deploy 😎

After you click on ‘Deploy’, a link will be generated which will take you this :

Upload your selfie and check how good it is!

Let’s see output Aishwarya Rai’s photo😁.

Left:input, Right:output

Source: Deep Learning on Medium