Skip to content

EN10/KerasInception

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 

Repository files navigation

Inception Keras

Image Recognition using Keras and Inception-v3

Keras allows 'easy and fast' use of models: example.
Inception-v3 is a trained image recognition model for tensorflow with 93.9% Top-5 Accuracy.

Inception arch

It was trained on 1.2 million images from ImageNet to detect 1000 classes (or labels for the images).

ImageNet

It took 8 NVIDIA Tesla K40s, 2 weeks to train.

K40

This example was built and tested on c9.io or cs50.io as they provide a free Ubuntu VM (docker container) with 512MB RAM and 2GB Disk.

Install

sudo pip install -U pip 
sudo pip install tensorflow 
sudo pip install h5py pillow 

sudo pip install -U pip update pip with tensorflow
... h5py to load weights
... pillow to load image
as from tensorflow.python.keras ... import is used, as keras is not installed separately
keras path correct as of tensorflow 1.4.1

Run

python predict.py
Line 7: Loads image 'image.jpg' then runs inference on InceptionV3.
Line 14: Outputs top 5 predictions and probabilities.

Performance

To disable "cpu_feature_guard":
export TF_CPP_MIN_LOG_LEVEL=2

Improve Performance:
TensorFlow binary compiled to use: SSE4.1 SSE4.2 AVX

Tensorflow Imports

image
inception_v3
preprocess_input(x)

Releases

No releases published

Packages

No packages published

Languages