Hello,
I have loaded bvlc_alexnet caffe model in Torch and classifying the
images from ImageNet Dataset. I am unable to interpret the answers based
on class labels. I am printing out the index of class label that has
highest probability. I am getting '670' & '795' for most of the
images. I have tried with more than 5 images per class (elephant, black
olive, beer bottles, digital clock).
Would someone please help me interpreting these results. Also, would
someone help me with decoding true labels of 1000 classes (bvlc_alexnet
caffe model) corresponding to synset_words.txt (ImageNet)
require 'clnn'
require 'ccn2'
require 'loadcaffe'
require 'nn'
require 'inn'
require 'cunn'
require 'image'
model = loadcaffe.load('deploy.prototxt.lua','bvlc_alexnet.caffemodel','ccn2')
model:evaluate()
--print(model)
--reading images of batch size 32
img = image.load('elephant.jpeg')
img_sca = image.scale(img,227,227)
imB =torch.CudaTensor(32,3,227,227)
for i = 1,32 do imB[i]=img_sca end
--passing it to model--
model:forward(imB)
--Classification--
op26 = model.modules[26].output[1]
max_op26, class_idx = torch.max(op26,1)
print(class_idx)
--
You received this message because you are subscribed to the Google Groups "torch7" group.
To unsubscribe from this group and stop receiving emails from it, send an email to torch7+un...@googlegroups.com.
To post to this group, send email to tor...@googlegroups.com.
Visit this group at http://groups.google.com/group/torch7.
For more options, visit https://groups.google.com/d/optout.
You are not preprocessing the images.Check how it's done here https://github.com/torch/tutorials/blob/master/7_imagenet_classification/classify.lua