Binary Classification Deep Learning Model for Horses or Human Using TensorFlow Take 3

Template Credit: Adapted from a template made available by Dr. Jason Brownlee of Machine Learning Mastery.

SUMMARY: The purpose of this project is to construct a predictive model using various machine learning algorithms and to document the end-to-end steps using a template. The Horses or Humans dataset is a binary classification situation where we are trying to predict one of the two possible outcomes.

INTRODUCTION: When learning Computer Vision, especially the training of DNNs and CNNs to recognize and classify images, there is a shortage of suitable datasets. Laurence Moroney wanted to fix that problem by creating a dataset that could be used for teaching binary classifiers that were unique and distinct from existing datasets. Laurence also wished to see if he could use Photo-real CGI to train a neural network that could then recognize and classify real images with the same subject matter.

The set contains 500 rendered images of various species of horses in different poses in multiple locations. It also includes 527 rendered images of humans in various poses and locations. Emphasis has been taken to ensure the diversity of humans, and to that end, there are both men and women as well as different ethnic groups present in the training set. The validation set adds six different figures of varying gender, race, and pose to ensure the breadth of data.

In iteration Take1, we constructed and tuned machine learning models for this dataset using TensorFlow with three VGG blocks. Laurence also demonstrated the dataset using a model with five VGG blocks, each block with just one convolution layer. We also observed the best result that we could obtain using different VGG-3 models with a different number of convolution layers.

In iteration Take2, we constructed and tuned machine learning models for this dataset using TensorFlow with four VGG blocks. Laurence also demonstrated the dataset using a model with five VGG blocks, each block with just one convolution layer. We also observed the best result that we could obtain using different VGG-4 models with a different number of convolution layers.

In this Take3 iteration, we will construct and tune machine learning models for this dataset using TensorFlow with three to five VGG blocks with Dropout layers. Laurence also demonstrated the dataset using a model with five VGG blocks, each block with just one convolution layer. We will observe the best result that we could obtain using different VGG models with Dropout.

ANALYSIS: From iteration Take1, the performance of the baseline model achieved an accuracy score of 82.03% on the validation dataset after 15 epochs. After a series of modeling trials, the TensorFlow model with three VGG blocks and two convolution layers processed the validation dataset with an accuracy score of 85.94%.

From iteration Take2, the performance of the baseline model achieved an accuracy score of 83.59% on the validation dataset after 15 epochs. After a series of modeling trials, the TensorFlow model with four VGG blocks and two convolution layers processed the validation dataset with an accuracy score of 86.33%.

From this Take3 iteration, the performance of the baseline model achieved an accuracy score of 82.42% on the validation dataset after 15 epochs. After a series of modeling trials, the TensorFlow model with four VGG blocks and three convolution layers with Dropout processed the validation dataset with an accuracy score of 89.45%.

CONCLUSION: For this dataset, the model built using TensorFlow with four VGG blocks and three convolution layers per block with Dropout improved the result from the baseline model. We should consider using TensorFlow and VGG blocks to model this dataset further.

Dataset Used: Horses or Humans Dataset

Dataset ML Model: Binary Classification with numerical attributes

Dataset Reference: http://www.laurencemoroney.com/horses-or-humans-dataset/

The HTML formatted report can be found here on GitHub.