Skip to content

TensorFlow version of SqueezeNet with converted pretrained weights

Notifications You must be signed in to change notification settings

avoroshilov/tf-squeezenet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tf-squeezenet

TensorFlow version of SqueezeNet with converted pretrained weights. The official github of SqueezeNet creators has some information on SqueezeNet v1.1.

Usage: squeezenet_tf.py --in identity.jpg

Current implementation is SqueezeNet v 1.1 (signature pool 1/3/5) without bypasses.

synset_words.txt file is a copy from either caffe or torch tutorials.

Model weights are converted from keras HDF5 model file from https://github.com/rcmalli/keras-squeezenet

Originally, this SqueezeNet was implemented for style transfer, see the original repository here: https://github.com/avoroshilov/neural-style/tree/dev The style transfer version contains pretrained weights with classifier chopped off, resulting in even smaller file (<3MB).

Fooling the classifier

The netowork can modify images that will fool the classifier into recognizing the modified image as desired class. Usage: squeezenet_tf.py --in identity.jpg --fool 8 will take the input image identity.jpg and generate new image bnased on it, which will be classified as 'n01514859 hen'. Class number is the number of line in the 'synset_words.txt' file minus 1, i.e. starting with 0.

Dependencies

Releases

No releases published

Packages

No packages published

Languages