All Projects → rajshah4 → Image_keras

rajshah4 / Image_keras

Building an image classifier using keras

Projects that are alternatives of or similar to Image keras

Image classifier
CNN image classifier implemented in Keras Notebook 🖼️.
Stars: ✭ 139 (-14.2%)
Mutual labels:  jupyter-notebook, notebook, transfer-learning
Allstate capstone
Allstate Kaggle Competition ML Capstone Project
Stars: ✭ 72 (-55.56%)
Mutual labels:  jupyter-notebook, notebook, keras-tutorials
Keras transfer cifar10
Object classification with CIFAR-10 using transfer learning
Stars: ✭ 120 (-25.93%)
Mutual labels:  jupyter-notebook, transfer-learning
Seq2seq tutorial
Code For Medium Article "How To Create Data Products That Are Magical Using Sequence-to-Sequence Models"
Stars: ✭ 132 (-18.52%)
Mutual labels:  jupyter-notebook, keras-tutorials
Fastdoc
Create publication-quality books from Jupyter notebooks
Stars: ✭ 134 (-17.28%)
Mutual labels:  jupyter-notebook, notebook
Prml
PRML algorithms implemented in Python
Stars: ✭ 10,206 (+6200%)
Mutual labels:  jupyter-notebook, notebook
Spark R Notebooks
R on Apache Spark (SparkR) tutorials for Big Data analysis and Machine Learning as IPython / Jupyter notebooks
Stars: ✭ 109 (-32.72%)
Mutual labels:  jupyter-notebook, notebook
Ipyexperiments
jupyter/ipython experiment containers for GPU and general RAM re-use
Stars: ✭ 128 (-20.99%)
Mutual labels:  jupyter-notebook, notebook
Face generator
DCGAN face generator 🧑.
Stars: ✭ 146 (-9.88%)
Mutual labels:  jupyter-notebook, notebook
Ipyplot
IPyPlot is a small python package offering fast and efficient plotting of images inside Python Notebooks. It's using IPython with HTML for faster, richer and more interactive way of displaying big numbers of images.
Stars: ✭ 152 (-6.17%)
Mutual labels:  jupyter-notebook, notebook
Simfin Tutorials
Tutorials for SimFin - Simple financial data for Python
Stars: ✭ 150 (-7.41%)
Mutual labels:  jupyter-notebook, notebook
Spark Py Notebooks
Apache Spark & Python (pySpark) tutorials for Big Data Analysis and Machine Learning as IPython / Jupyter notebooks
Stars: ✭ 1,338 (+725.93%)
Mutual labels:  jupyter-notebook, notebook
Python Thenotheoryguide
Jupyter NoteBooks to get you boosted with the basics of python with hands-on-practice.
Stars: ✭ 95 (-41.36%)
Mutual labels:  jupyter-notebook, notebook
Dogbreed gluon
kaggle Dog Breed Identification
Stars: ✭ 116 (-28.4%)
Mutual labels:  jupyter-notebook, transfer-learning
Satellite imagery python
Sample sample scripts and notebooks on processing satellite imagery
Stars: ✭ 93 (-42.59%)
Mutual labels:  jupyter-notebook, notebook
Tweet Stance Prediction
Applying NLP transfer learning techniques to predict Tweet stance
Stars: ✭ 91 (-43.83%)
Mutual labels:  jupyter-notebook, transfer-learning
Oreilly Intro To Predictive Clv
Repo that contains the supporting material for O'Reilly Webinar "An Intro to Predictive Modeling for Customer Lifetime Value" on Feb 28, 2017
Stars: ✭ 153 (-5.56%)
Mutual labels:  jupyter-notebook, notebook
Intrusion Detection System Using Deep Learning
VGG-19 deep learning model trained using ISCX 2012 IDS Dataset
Stars: ✭ 85 (-47.53%)
Mutual labels:  jupyter-notebook, transfer-learning
Starcraft2 Replay Analysis
A jupyter notebook that provides analysis for StarCraft 2 replays
Stars: ✭ 90 (-44.44%)
Mutual labels:  jupyter-notebook, notebook
Practical Machine Learning With Python
Master the essential skills needed to recognize and solve complex real-world problems with Machine Learning and Deep Learning by leveraging the highly popular Python Machine Learning Eco-system.
Stars: ✭ 1,868 (+1053.09%)
Mutual labels:  jupyter-notebook, notebook

Building an image classifier using keras

The fact that computers can see is just not that amazing anymore. But, the techniques for teaching a computer to do this are now simpler and more refined than ever. This post shows you how easy it is to build an image classifier. All you need is some basic python skills and at least a few hundred images.

The approach here uses Keras, which is emerging as the best library for building neural networks. The code here also assumes you are using Tensorflow as the underlying library (it won’t run properly if you are using Theano). I have added notebooks for running this in Python and R.

For people attending ODSC Workhop on Deep Learning in R Using Keras:

  • Download this repo locally
  • Install Keras for R with the following commands:
  library(keras)
  install_keras()

To run the code you need to:

  • Get a keras docker container running or install tensorflow/keras on your machine
  • Download the data
  • Work your way through the notebook

Lets go through each of these steps

Get a keras docker container running for Python

Much of deep learning is built around python. Python has many libraries that have conflicting dependencies that make it difficult to replicate work. Deep learning teams now rely on technologies like docker that abstract away these dependencies. It might be a pain to learn, but if you are doing deep learning without docker, you are building an island.

I have tested the notebook on an Ubuntu OS with a docker container ermaker/keras-jupyter. This docker container as of November 2017 has thrown errors, please instead try an alternative docker container is available from gwlabs. This docker container includes keras and tensorflow. After you have installed docker on your system, the following command should get you up and running:

docker run -d -p 8888:8888 -e KERAS_BACKEND=tensorflow -v /Users/rajivshah/Code:/notebook ermaker/keras-jupyter

You should substitute your local path to the notebook and data for /Users/rajivshah/Code

You can skip using a docker container, but make sure to have tensorflow and keras installed on your machine.

Install Tensorflow/Keras for R

The notebook for R includes the commands for installing a local copy of tensorflow and keras on your machine. For more background on using R and Keras, take a look at my blog post.

Download the data

There are two major sources of data for this notebook:

  • Kaggle data of the images of cats and dogs
  • VGG16 weights for a pretrained network A sample of Kaggle images of cats and dogs are already in the github repo, however, it is necessary to download the VGG weights and place them in the model/vgg directory when using the python notebooks.

Work your way through the notebook

The notebook is based off a brilliant blog post by Francois Chollet @fchollet https://blog.keras.io/building-powerful-image-classification-models-using-very-little-data.html and a workbook by Guillaume Dominici @gggdomi https://github.com/gggdominici/keras-workshop

You should read the full blog post to understand the purpose of the notebook and the underlying details. In sum, the blog post covers a set of techniques for building an image classification model using a small amount of image data. It starts with building a small convolutional neural network and then improving it by augmenting the model with more data. The notebook then discusses using a pretrained network VGG 16 layer model and ends by showing how to fine tune a pretrained network by modifying the last layers.

The problem with the blog post is that the code listed doesn’t work when you have tensorflow as a back end. If you read the comments to the code gists, you will find a lot of frustrated people. I spent a lot of time and picked up hints from a lot of places when putting this notebook together. The results should be a smooth experience that can let you focus on building an image classifier.

The first notebook only contains code that is relevant to running models according to Chollet's blog post. I also created a second notebook (notebook_extras) that contains additional code for those who want to inspect the training data, validate their predictions, get more details on the models, use tensorboard, or use quiver to visualize the activation layers in their models.

I have also done a webinar that goes through this workbook and can be seen at https://www.altoros.com/blog/event/image-classification-done-simply-using-keras-and-tensorflow/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].