Different neural network architechtures implemented in tensorflow for image classification. Weights converted from caffemodels. Some weights were converted using
misc/convert.py others using caffe-tensorflow. The weights can be downloaded from here. Tested with Tensorflow 1.0. Weights for inception-V3 taken from Keras implementation provided here. Contributions are welcome!
- A single call program to classify images using different architechtures (vgg-f, caffenet, vgg-16, vgg-19, googlenet, resnet-50, resnet-152, inception-V3)
- Returns networks as a dictionary of layers, so accessing activations at intermediate layers is easy
- Functions to classify single image or evaluate on whole validation set
- For classification of a single image,
python classify.py --network 'resnet152' --img_path 'misc/sample.jpg'
- For evaluation over whole ilsvrc validation set
python classify.py --network 'resnet152' --img_list '<list with image names>' --gt_labels '<list with gt labels corresponding to images>'
- Currently the
--networkargument can take vggf, caffenet, vgg16, vgg19, googlenet, resnet50, resnet152, inceptionv3.
These converted models have the following performance on the ilsvrc validation set, with each image resized to 224x224 (227 or 299 depending on architechture), and per channel mean subtraction.
|Network||Top-1 Accuracy||Top-5 Accuracy|