GithubHelp home page GithubHelp logo

sebsquire / dogs-and-cats-image-classification-cnn Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 0.0 437 KB

Binary Image Classification using CNN w/ residual layers (Dogs & Cats) (Tensorflow, TFLearn, OpenCV)

Python 100.00%

dogs-and-cats-image-classification-cnn's Introduction

Dogs-and-cats-image-classification-CNN

Binary Image Classification using CNN w/ residual layers (Dogs & Cats) (Tensorflow-GPU, TFLearn, OpenCV)

Modules converted from Sentdex' tutorial (https://pythonprogramming.net/convolutional-neural-network-kats-vs-dogs-machine-learning-tutorial/). Now includes:

  • Improved accuracy through CNN architecture and hyperparameter modification featuring inclusion of residual blocks (Ref: https://arxiv.org/pdf/1512.03385.pdf)
  • Data Augmentation
  • Separated to callable functions for easier hyperparameter optimisation, debugging, and more readable code
  • Added custom image input function
  • Added commands while running to eliminate repeated image processing/model training

Model attains ~90% accuracy on validation data and a log loss of ~0.32 on Kaggle's test data. Results analysed with tensorboard.

Data available at: https://www.kaggle.com/c/dogs-vs-cats-redux-kernels-edition

Modules:

  • Main.py: calls preprocessing.py and CNN_model.py to load and preprocess image data, set model parameters, augment the image collection, and train, test, and produce classification metrics for the model on the validation set.
  • preprocessing.py: Functions for creation of training and test data in .npy files.
  • CNN_model.py: Functions for CNN model creation. Model architecture and more complex hyperparameters can be modified here.
  • modelresults_inspection.py: loads model and test data and outputs images and predicted labels for user inspection.
  • custominput.py: predicts categories and displays images for images located in CustomImageInput directory (will need to be modified to wherever user creates this folder when used).
  • kaggle_submission: loads model to create kaggle submission file (.csv).

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.