Skip to content

Latest commit

 

History

History
59 lines (31 loc) · 1.26 KB

README.md

File metadata and controls

59 lines (31 loc) · 1.26 KB

Keras-squeezenet2

CircleCI

SqueezeNet v1.1 Implementation using tf.Keras for tensorflow version 2

This is a rework of the original work by Refik Can MALLI

git clone https://github.com/daviddexter/keras_squeezenet2
pip install -q keras_squeezenet2/

Library Versions

  • Tensorflow v2.rc1

Example Usage

import numpy as np
from keras_squeezenet_tf2 import SqueezeNet
from tensorflow.keras.applications.imagenet_utils import preprocess_input, decode_predictions
from tensorflow.keras.preprocessing import image

model = SqueezeNet()

img = image.load_img('../images/cat.jpeg', target_size=(227, 227))
x = image.img_to_array(img)
x = np.expand_dims(x, axis=0)
x = preprocess_input(x)

preds = model.predict(x)
print('Predicted:', decode_predictions(preds))

References

  1. Tensorflow Framework

  2. SqueezeNet Official Github Repo

  3. SqueezeNet Paper

Licence

MIT License

Note: If you find this project useful, please include reference link in your work.