Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple C++ prediction example #2487

Closed
flx42 opened this issue May 18, 2015 · 2 comments · Fixed by #2498
Closed

Simple C++ prediction example #2487

flx42 opened this issue May 18, 2015 · 2 comments · Fixed by #2498

Comments

@flx42
Copy link
Contributor

flx42 commented May 18, 2015

Hi,

I want to contribute a simple C++ prediction example to the codebase, is this something you are interested in adding? If yes, what kind of features would you like to see in this sample app?

From my point of view, I think the sample application should take as input the following files: deploy file, trained weights, labels, mean file and input image to classify.
It would be nice to be able to use file models/bvlc_reference_caffenet/deploy.prototxt as-is, without requiring to add an extra layer for preprocessing (like cropping, resizing, mean subtraction), so I think the processing should be done from the sample app after probing the network for the dimensions of its input layer. This way, the app should hopefully work with caffenet and MNIST by just changing the input files (and those files are either already present in the repo, or are downloadable through a provided script).

What do you think? Any other feature request? I'm already excluding features like image batching or oversampling from the list, for the sake of readability.

@boaz001
Copy link

boaz001 commented May 21, 2015

Feel free to add it here if you like.

flx42 added a commit to flx42/caffe that referenced this issue May 21, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
@flx42
Copy link
Contributor Author

flx42 commented May 21, 2015

I think such code should be part of the main project since the C++ API is the "original" API. I just sent a PR, comments welcomed!

flx42 added a commit to flx42/caffe that referenced this issue May 21, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
flx42 added a commit to flx42/caffe that referenced this issue May 21, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
flx42 added a commit to flx42/caffe that referenced this issue May 23, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
flx42 added a commit to flx42/caffe that referenced this issue May 30, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
flx42 added a commit to flx42/caffe that referenced this issue May 30, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
flx42 added a commit to flx42/caffe that referenced this issue May 30, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
flx42 added a commit to flx42/caffe that referenced this issue May 30, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
ShaggO pushed a commit to ShaggO/caffe that referenced this issue Jun 1, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
matthiasplappert pushed a commit to matthiasplappert/caffe that referenced this issue Aug 10, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
cbfinn pushed a commit to cbfinn/caffe that referenced this issue Aug 12, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
wangyida pushed a commit to wangyida/caffe that referenced this issue Sep 14, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
wangyida pushed a commit to wangyida/caffe that referenced this issue Sep 22, 2015
Closes BVLC#2487

Example usage:
./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 \
  examples/images/cat.jpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants