Giter Club home page Giter Club logo

kaggle-dogs-vs-cats's Introduction

Kaggle Dogs vs Cats with Tensorflow

cat_vs_dog
Dogs vs cats is a competition hosted on Kaggle, the aim is for the participants to write an algorithm for computers to classify images containing dogs or cats.

Preprocessing

The dataset is too large to fit into memory all at once, so it is first wrote into a HDF5 file as described in @pyimagesearch Deep Learning for Computer Vision with Python book. Images are first scaled down (maintaining the aspect ratio), then a 256x256 patch from the centre is cropped. The training dataset from Kaggle is split into 3 sets: 20000 for training, 2500 for validation and 2500 for testing.

AlexNet

The AlexNet model is implemented with Tensorflow for this project. The model was trained for 200 epochs and it completed in ~8hours. Images are randomly augmented during training to reduce overfitting, my implementation is slow thus the long duration of training. An 88% accuracy is achieved on the testing set (this result is very different from the Keras implementation reported in the Deep Learning for Computer Vision with Python book, any ideas?)

Tensorboard training graphs

accuracy loss

utils: folder contatining Python files to preprocess images.
build_h5_dataset.ipynb: write the images and labels into a HDF5 file.
train_alexnet.ipynb: implementing AlexNet in Tensorflow and training

kaggle-dogs-vs-cats's People

Contributors

daquincy avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.