In this example, we use SINGA to load the VGG parameters trained by Caffe to do image classification.
You can run this example by simply executing
run.sh vgg16 or
run.sh vgg19 The script does the following work.
A few sample images are downloaded into the
predict.py script creates the VGG model and read the parameters,
usage: predict.py [-h] model_txt model_bin imgclass
imgclass refers to the synsets of imagenet dataset for vgg models. You can start the prediction program by executing the following command:
python predict.py vgg16.prototxt vgg16.caffemodel synset_words.txt
Then you type in the image path, and the program would output the top-5 labels.
More Caffe models would be tested soon.