Add MNIST support to classify.py script#735
Closed
petewarden wants to merge 3 commits intoBVLC:masterfrom
Closed
Conversation
Member
|
Excellent to hear you are working on a beginner's guide to Caffe and holding a webinar. I hope that you can contribute back the documentation, examples, and instructions you've made as you've started to here. Note that we do not accept PRs to master as a rule. However, since this change is slight and is part of an effort to explain Caffe I will review, merge to dev, then release in master. This way I can combine it with @longjon's improvements in #733 . |
This was referenced Jul 28, 2014
Member
|
Sorry for the wait while I was traveling. I've included your improvements with minor changes in #816. The latest pycaffe will be released to master soon. Closing since this PR is against master. Thanks for the nice label output and grayscale option! |
Author
|
Thanks Evan, looks good! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For a beginner's guide to Caffe I'm working on, I need a simple way for newbies to train their own network, and then try it out for themselves. The MNIST documentation is great for the training part, but the python scripts for running forward prediction on images were missing a couple of features I needed:
To test that it didn't break the existing Imagenet functionality, I've been running this command:
python python/classify.py --print_results examples/images/cat.jpg fooThe results continue to be the expected 'kit fox' label.
Running an MNIST network created from the tutorial against a sample image is done with the command line:
python python/classify.py --print_results --model_def examples/mnist/lenet.prototxt --pretrained_model examples/mnist/lenet_iter_10000 --force_grayscale --center_only --labels_file data/mnist/mnist_words.txt --images_dim 28,28 data/mnist/sample_2.png fooI think it would be a big help to new users if they could quickly try out networks and see results, so I hope this makes it in.