Skip to content

Instantly share code, notes, and snippets.

@delta2323
Last active September 2, 2015 09:57
Show Gist options
  • Save delta2323/836118061363f4659cc6 to your computer and use it in GitHub Desktop.
Save delta2323/836118061363f4659cc6 to your computer and use it in GitHub Desktop.
JNNS2015
# caffemodelの入手
cd models/bvlc_reference_caffenet/
wget http://dl.caffe.berkeleyvision.org/bvlc_reference_caffenet.caffemodel
# このURLはreadme.mdcaffemodel_urlを参照している
# ダウンロードに結構時間がかかる(30分くらい?)
# imagenet_mean.binaryprotoとsynset_words.txtの入手
cd ../../
./data/ilsvrc12/get_ilsvrc_aux.sh
# テスト画像の入手
wget https://www.dropbox.com/s/0os3y8k96vywq9x/ILSVRC2012_val_00000001.JPEG
# c++ classifierの実行
./build/examples/cpp_classification/classification.bin ./models/bvlc_reference_caffenet/deploy.prototxt ./models/bvlc_reference_caffenet/bvlc_reference_caffenet.caffemodel ./data/ilsvrc12/imagenet_mean.binaryproto ./data/ilsvrc12/synset_words.txt ILSVRC2012_val_00000001.JPEG
cd python/caffe/imagenet
# 失敗したら以下のコマンドを実行して再実行
make pycaffe
# クリップしたmean画像の入手
wget https://www.dropbox.com/s/gbgrpwu3in5tmn9/ilsvrc_2012_mean_cropped.npy
# python classifierの実行
python classify.py --mean_file caffe/imagenet/ilsvrc_2012_mean_cropped.npy --images_dim 227,227 /data/ILSVRC/cropped-val256/ILSVRC2012_val_00000001.JPEG classify_result
# 失敗したら以下のコマンドを実行して再実行
sudo pip install pillow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment