Through my journey of working on the convolutional neural network (CNN) section of Udacity’s deep learning nanodegree, I decided to work on my own project to see if CNN’s would be able to classify between the genders of Lego minifigures.

The reason I decided to do this is because I’m a Lego fan and have been collecting minifigures for many years now. I think I now have over 200 of the little guys, mostly obtained from blind bags.

Oh and I also take photos of them which I share on Instagram!

Why use transfer learning?

Transfer learning is when you use a pre-trained neural network, and use it for a different dataset.

Since I have a small dataset, I wanted to utilize ImageNet’s pre-trained images as it has many pictures of people and clothing, so it should be easier to determine the features of the minifigures. With the similarities in human features and clothing of the minifigures, I would categorize my dataset to be similar to what is present in ImageNet.

According to Udacity, if the new dataset is small and similar to the original training data, you have to change the neural network as follows:

  • slice off the end of the neural network
  • add a new fully connected layer that matches the number of classes in the new data set
  • randomize the weights of the new fully connected layer; freeze all the weights from the pre-trained network (to avoid over-fitting)
  • train the network to update the weights of the new fully connected layer

#transfer-learning #classification #convolutional-network #lego #deep-learning

Lego Minifigure Gender Classification Using Deep Learning
2.35 GEEK