update label_image.py (#15022)
* add build rule for label_image.py add label_image_py to BUILD and update README.md accordingly
This commit is contained in:
parent
c457383a1b
commit
25d275280d
@ -51,6 +51,16 @@ tf_cc_binary(
|
||||
}),
|
||||
)
|
||||
|
||||
py_binary(
|
||||
name = "label_image_py",
|
||||
srcs = ["label_image.py"],
|
||||
main = "label_image.py",
|
||||
srcs_version = "PY2AND3",
|
||||
deps = [
|
||||
"//tensorflow:tensorflow_py",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "all_files",
|
||||
srcs = glob(
|
||||
|
@ -73,10 +73,23 @@ Python than the Python code mentioned in the
|
||||
[Inception tutorial](https://www.tensorflow.org/tutorials/image_recognition/).
|
||||
and could be easier to add visualization or debug code.
|
||||
|
||||
With tensorflow python package installed, you can run it like:
|
||||
|
||||
`bazel-bin/tensorflow/examples/label_image/label_image_py` should be there after
|
||||
```bash
|
||||
$ bazel build tensorflow/examples/label_image/...
|
||||
```
|
||||
|
||||
Run
|
||||
|
||||
```bash
|
||||
$ bazel-bin/tensorflow/examples/label_image/label_image_py
|
||||
```
|
||||
|
||||
Or, with tensorflow python package installed, you can run it like:
|
||||
```bash
|
||||
$ python3 tensorflow/examples/label_image/label_image.py
|
||||
```
|
||||
|
||||
And get result similar to this:
|
||||
```
|
||||
military uniform 0.834305
|
||||
|
Loading…
Reference in New Issue
Block a user