This project aims to build a deep learning model to classify the images of dogs and cats.
Motivation: Using similar principle, different classifier could be trained and modeled for various use case.
Clone this project. Folders named train and test are already created here.
- extractData.py : Downloads the data from the imagenet url and separates them into the train and test folder with label. Link has to be changed for each object to be downloaded from Imagenet.
- train.py: Convolution Neural Network is implemented to train the model. The model is then tested using the test data. The train and test data are split here prior to start of training.
Since the motivation of this project was to extend this classifier to be able to use in similar case scenario. Instead of downloading data from kaggle as in traditional approach. I decided to extract images from Imagent.. This enables in the future to get any images and train & test with this model.
For this project I decided to train only around 1000 images. Feel free to download more and play with more data or you can get started with the dataset from kaggle here.
The training and testing data are included in this project. Start the project with
python train.py
Because of the restriction in computation power in my system, I am planning to make use of Papersace train the model further. If you too do not have such huge computation power in the system, here is the $10 in credit to get started. This will give a descent 10-20 hours of computational time.
The basic knowledge of TensorFlow and Deep Learning was acquired from Tensorflow Tutorial. Also, if you wish to learn more follow here.
With 1000 training data set , the accuracy of prediction is not quite good as shown in the figure.
But with the help of training the model using Paperspace, I believe we will achieve a descent predictive model.