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/
- Tensorflow v2.rc1
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))
MIT License
Note: If you find this project useful, please include reference link in your work.