diff options
author | 2015-11-16 23:42:32 -0800 | |
---|---|---|
committer | 2015-11-16 23:42:32 -0800 | |
commit | 4213ac97be449d0e40631a314d2b7bd3901d4967 (patch) | |
tree | b75b2fe8858068929e1bf0365f70cb14b80926ef /tensorflow/examples/label_image/README.md | |
parent | 56313def004795f75ef8281a0294c958d28f1e06 (diff) |
TensorFlow: conv improvements, label_image example, and
a few other changes.
Changes:
- Some improvements to convolution by using 32-bit indices by
@benoitsteiner. Not all calls converted yet. Also some
improvements to pooling as well by @benoitsteiner.
- Improvements to sparse matmul CPU implementation by Ashish
- Some fixes to warnings by @vrv
- Doc fixes to padding by @Yangqing
- Some improvements to Tensor wrappers by Eider
- Speed up of matrix inverse on CPU by Rasmus
- Add an example of doing image inference from a pre-trained model
by @petewarden.
- fixed formula in mnist example by nodir
- Updates to event accumulator by Cassandra
- Slight changes to tensor c api by @mrry
- Handling of strings in listdiff by Phil
- Fix negative fraction-of-queue-full stats by Frank
- Type-checking improvement to importer by Yaroslav
- logdir recursive search for Tensorboard by @danmane
- Session.run() checks for empty graph by Manoj
Base CL: 108013706
Diffstat (limited to 'tensorflow/examples/label_image/README.md')
-rw-r--r-- | tensorflow/examples/label_image/README.md | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tensorflow/examples/label_image/README.md b/tensorflow/examples/label_image/README.md new file mode 100644 index 0000000000..fbad61a22f --- /dev/null +++ b/tensorflow/examples/label_image/README.md @@ -0,0 +1,49 @@ +# Tensorflow C++ Image Recognition Demo + +This example shows how you can load a pre-trained TensorFlow network and use it +to recognize objects in images. + +## Description + +This demo uses a Google Inception model to classify image files that are passed +in on the command line. See +[`googlenet_labels.txt`](data/googlenet_labels.txt) +for the possible classifications, which are the 1,000 categories used in the +Imagenet competition. + +## To build/install/run + +As long as you've managed to build the main TensorFlow framework, you should +have everything you need to run this example installed already. + +To build it, run this command: + +```bash +$ bazel build tensorflow/examples/label_image/... +``` + +That should build a binary executable that you can then run like this: + +```bash +$ bazel-bin/tensorflow/examples/label_image/label_image +``` + +This uses the default example image that ships with the framework, and should +output something similar to this: + +``` +I tensorflow/examples/label_image/main.cc:200] military uniform (866): 0.902268 +I tensorflow/examples/label_image/main.cc:200] bow tie (817): 0.05407 +I tensorflow/examples/label_image/main.cc:200] suit (794): 0.0113195 +I tensorflow/examples/label_image/main.cc:200] bulletproof vest (833): 0.0100269 +I tensorflow/examples/label_image/main.cc:200] bearskin (849): 0.00649746 +``` +In this case, we're using the default image of Admiral Grace Hopper, and you can +see the network correctly spots she's wearing a military uniform, with a high +score of 0.9. + +Next, try it out on your own images by supplying the --image= argument, e.g. + +```bash +$ bazel-bin/tensorflow/examples/label_image/label_image --image=my_image.png +``` |