Identifying patterns and extracting features on images using deep learning models

SPCA takes in 7,000 to 9,000 animals each year in Singapore. Half of them are abandoned pets like cats, dogs, rabbits, and guinea pigs. It takes time for the pet to be identified and hence prolongs the wait to be listed for adoption.

NParks has a group of volunteers who meet regularly for bird watching activities. At the same time they help collect data on the avian population in Singapore, but not all of them can identify the birds species correctly.

My project goal is to develop a tool for these 2 organisations: to identify animal breeds for SPCA; and to identify avian species for NParks.

This goal can be translated into an image classification problem for deep learning models. So I explored a simple neural network, and then progressed to convolutional neural network and transfer learning.

Simple Neural Network

First I started with image classification using a simple neural network.

The dataset is from pyimagesearch, which has 3 classes: cat, dog, and panda. There are 3000 images in total, ie, 1000 for each class.

I set up a simple neural network model with only 1 dense layer in the middle and took about 4 minutes to train the model.

The accuracy achieved was 61% and I was ready to test the model with new images.

I input these images to the model, and the simple neural network model was able to make to classify them according to the highest probability.

For example, the model was 58% sure that this is a panda.

But it has legs, so there is a small chance it could be a cat or a dog as well.

I started to be adventurous, however the simple neural network model was unable to make the correct classification. So I trained a convolutional neural network (CNN) model which was able to classify them correctly.

#neural networks

How to Classify Animal Images via a Convolutional Neural Network
1.20 GEEK